shopify 5.0.0 → 5.0.2

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 (330) hide show
  1. package/dist/{analytics-Q6QDIDYT.js → analytics-NMMVOF4B.js} +1 -1
  2. package/dist/{analytics-VKKJNJ62.js → analytics-UK77WNLG.js} +1 -1
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/{chunk-Q5MEFIMV.js → chunk-224UPIYS.js} +1 -1
  5. package/dist/{chunk-XBQDMGUN.js → chunk-26PWHH3B.js} +1 -1
  6. package/dist/{chunk-46MSIQ6Z.js → chunk-27NXPOAS.js} +1 -1
  7. package/dist/{chunk-SFPXYHHL.js → chunk-2A2JSAAA.js} +1 -1
  8. package/dist/{chunk-P33TONYG.js → chunk-2L6AN3QA.js} +1 -1
  9. package/dist/{chunk-43KLFFP7.js → chunk-2MT3LSMZ.js} +1 -1
  10. package/dist/{chunk-PGLWZMJU.js → chunk-2T4HDR6R.js} +1 -1
  11. package/dist/{chunk-5UWMXOHM.js → chunk-2WJOTJOD.js} +1 -1
  12. package/dist/{chunk-HIRTL45Q.js → chunk-2ZBXHCQZ.js} +1 -1
  13. package/dist/chunk-33ZE3DRQ.js +16 -0
  14. package/dist/{chunk-WFWISGLS.js → chunk-34MOWGRL.js} +1 -1
  15. package/dist/{chunk-AXC2MHHO.js → chunk-35XFNKNB.js} +1 -1
  16. package/dist/{chunk-LHKVXJPX.js → chunk-3JSKNXL7.js} +1 -1
  17. package/dist/{chunk-Q2SZCZE7.js → chunk-3KM5ZOW2.js} +1 -1
  18. package/dist/{chunk-KJQDS5HI.js → chunk-3MG4MTWQ.js} +1 -1
  19. package/dist/{chunk-MDRVCBDO.js → chunk-3MYDSQHF.js} +1 -1
  20. package/dist/{chunk-MYAIWSOO.js → chunk-3ODQKAEA.js} +1 -1
  21. package/dist/{chunk-6DXP7PQ7.js → chunk-3XRI3D44.js} +1 -1
  22. package/dist/{chunk-KGRIYAMA.js → chunk-3Z3MADXZ.js} +1 -1
  23. package/dist/{chunk-GB6E3ATN.js → chunk-4KECSZTL.js} +1 -1
  24. package/dist/{chunk-G6ZMSWEU.js → chunk-4WYKPIN3.js} +1 -1
  25. package/dist/{chunk-M3ACZWMR.js → chunk-5AEZJZNQ.js} +1 -1
  26. package/dist/chunk-5ED7SOQZ.js +20 -0
  27. package/dist/{chunk-FFHH5LOR.js → chunk-5IDJALJH.js} +1 -1
  28. package/dist/{chunk-GXORLBVN.js → chunk-62EOM3Y2.js} +1 -1
  29. package/dist/{chunk-EXFBZPZS.js → chunk-64G5TGFF.js} +1 -1
  30. package/dist/{chunk-QN3774QI.js → chunk-66TMIQMB.js} +1 -1
  31. package/dist/{chunk-L7MSPGDS.js → chunk-67L7FIB6.js} +1 -1
  32. package/dist/{chunk-7UOA4DI7.js → chunk-6ES4KRFW.js} +1 -1
  33. package/dist/{chunk-XMODGI45.js → chunk-74NRFUGQ.js} +1 -1
  34. package/dist/{chunk-YVY32DNA.js → chunk-7CCTPBCT.js} +1 -1
  35. package/dist/{chunk-2DID73ML.js → chunk-7GUMJ5E4.js} +1 -1
  36. package/dist/{chunk-IUTZIN2T.js → chunk-7NFTSBHQ.js} +1 -1
  37. package/dist/{chunk-TPSA4JN5.js → chunk-ACZNWIRY.js} +1 -1
  38. package/dist/{chunk-CCMDZX35.js → chunk-AQ6EVL73.js} +1 -1
  39. package/dist/{chunk-7WPUV7GY.js → chunk-AQKWPRZE.js} +1 -1
  40. package/dist/chunk-AUE7LM32.js +1 -0
  41. package/dist/{chunk-PIAD3F6M.js → chunk-AXL2VIWA.js} +1 -1
  42. package/dist/{chunk-CVVQQLCF.js → chunk-B2O3ANRZ.js} +1 -1
  43. package/dist/chunk-B3ZJGYZY.js +3 -0
  44. package/dist/{chunk-4SS6DXC7.js → chunk-BWN2QG6D.js} +1 -1
  45. package/dist/{chunk-6BNKBCCU.js → chunk-C3RFAKWR.js} +1 -1
  46. package/dist/{chunk-SNNZ4U2W.js → chunk-CCUQM4FX.js} +1 -1
  47. package/dist/{chunk-EITIW5OX.js → chunk-CGVROSPS.js} +1 -1
  48. package/dist/{chunk-7QUZWCJZ.js → chunk-CLUUA3HX.js} +1 -1
  49. package/dist/{chunk-X7HVAVSZ.js → chunk-CXI3RHPW.js} +1 -1
  50. package/dist/chunk-CYEEGTVZ.js +11 -0
  51. package/dist/{chunk-CZ22VZDA.js → chunk-D2KIGKBI.js} +108 -108
  52. package/dist/chunk-DBDTE3EE.js +5 -0
  53. package/dist/{chunk-YKS7MH3F.js → chunk-DLVB3237.js} +1 -1
  54. package/dist/{chunk-UZROQRLX.js → chunk-DN6X7SHW.js} +1 -1
  55. package/dist/{chunk-OGWPS55W.js → chunk-DZKFP6H2.js} +1 -1
  56. package/dist/{chunk-S67I4E7M.js → chunk-E5COIKGY.js} +1 -1
  57. package/dist/{chunk-CW2T7EOQ.js → chunk-E6RONHMT.js} +1 -1
  58. package/dist/{chunk-2CMEKSI7.js → chunk-EAZIQI2D.js} +1 -1
  59. package/dist/{chunk-FNLECT7B.js → chunk-EEY4FKAW.js} +1 -1
  60. package/dist/{chunk-YGYEM6QO.js → chunk-EKFPTBXC.js} +1 -1
  61. package/dist/{chunk-VW6QS7DO.js → chunk-ER6C5WS3.js} +1 -1
  62. package/dist/{chunk-MR2AUT7Q.js → chunk-ESFCYB46.js} +1 -1
  63. package/dist/{chunk-GRGFA26K.js → chunk-F3CK3EJJ.js} +1 -1
  64. package/dist/{chunk-M4BVLMPH.js → chunk-FEBOZ2XX.js} +1 -1
  65. package/dist/{chunk-5OMJFPQW.js → chunk-GNCVDN7U.js} +1 -1
  66. package/dist/{chunk-H4V55Y3Z.js → chunk-GQLNG537.js} +83 -83
  67. package/dist/{chunk-IEQ4UOH3.js → chunk-GVI3DWSB.js} +1 -1
  68. package/dist/{chunk-DFQ4WTET.js → chunk-GW7YIJPJ.js} +1 -1
  69. package/dist/{chunk-SFQEHDJY.js → chunk-H6GNKWYM.js} +1 -1
  70. package/dist/{chunk-5TB52UUV.js → chunk-H6GYBLVQ.js} +1 -1
  71. package/dist/chunk-HSKDFEXW.js +1 -0
  72. package/dist/{chunk-JYMDWR25.js → chunk-HTRJU4R4.js} +1 -1
  73. package/dist/{chunk-EMSF57ZB.js → chunk-HXZAY5OA.js} +1 -1
  74. package/dist/{chunk-WJSUIUBW.js → chunk-I4CEH7AK.js} +1 -1
  75. package/dist/{chunk-4ARCB6DT.js → chunk-I7PEEJVH.js} +1 -1
  76. package/dist/{chunk-CCQNP5YR.js → chunk-IHMATNOR.js} +1 -1
  77. package/dist/{chunk-N2RFDHRY.js → chunk-IHXGZW42.js} +1 -1
  78. package/dist/chunk-IJY3RJPJ.js +47 -0
  79. package/dist/{chunk-52FDK2LC.js → chunk-ISKQQXLZ.js} +1 -1
  80. package/dist/{chunk-UVRKTMF7.js → chunk-J55GQLP4.js} +1 -1
  81. package/dist/{chunk-3LVCG4JB.js → chunk-J5ERDFIC.js} +1 -1
  82. package/dist/{chunk-LWCTKI4Z.js → chunk-JLQRDFR5.js} +3 -3
  83. package/dist/{chunk-HCZG7YJ6.js → chunk-JPWRZ5SL.js} +1 -1
  84. package/dist/{chunk-BWRNXCVN.js → chunk-K7ZSPQKL.js} +1 -1
  85. package/dist/{chunk-4GCI2YCZ.js → chunk-KNWT7JLL.js} +1 -1
  86. package/dist/{chunk-U25W35TX.js → chunk-KZRLZWOU.js} +1 -1
  87. package/dist/chunk-L5TSPCSY.js +26 -0
  88. package/dist/{chunk-J6TW43TG.js → chunk-LEHBZKK3.js} +1 -1
  89. package/dist/chunk-LGXI7EGM.js +8 -0
  90. package/dist/{chunk-3A3DZVEJ.js → chunk-LHXFTFFM.js} +1 -1
  91. package/dist/{chunk-4RDFMBRG.js → chunk-LUGMXSRI.js} +1 -1
  92. package/dist/chunk-M2CWCOFU.js +11 -0
  93. package/dist/{chunk-2VSNFOKD.js → chunk-M5VIFG2V.js} +1 -1
  94. package/dist/{chunk-IWEKM5Y3.js → chunk-MADINS4Z.js} +1 -1
  95. package/dist/{chunk-VMMUJN4T.js → chunk-MEYVUHQH.js} +1 -1
  96. package/dist/{chunk-PEVIRAMR.js → chunk-MGHPF7HU.js} +1 -1
  97. package/dist/{chunk-ZT5WFUKJ.js → chunk-MHR5OHT5.js} +1 -1
  98. package/dist/{chunk-5NEGOQT6.js → chunk-MXEXP3HT.js} +1 -1
  99. package/dist/{chunk-IQVRP7CT.js → chunk-N57Y7THE.js} +1 -1
  100. package/dist/{chunk-FWB3GLMW.js → chunk-NVKJ7ZLP.js} +1 -1
  101. package/dist/{chunk-GQNOVEKP.js → chunk-NXAEBGMO.js} +1 -1
  102. package/dist/{chunk-PYIICTLX.js → chunk-OJULL7HT.js} +1 -1
  103. package/dist/{chunk-SL3VBI62.js → chunk-OMPQ7REW.js} +1 -1
  104. package/dist/{chunk-NK2MGR6A.js → chunk-OR4IJ4BQ.js} +1 -1
  105. package/dist/{chunk-CIK5BF7V.js → chunk-P2RMFHQP.js} +1 -1
  106. package/dist/{chunk-R7EMV77H.js → chunk-P4VZYOKO.js} +2 -2
  107. package/dist/{chunk-NDKSG4CC.js → chunk-PDZBKVWL.js} +1 -1
  108. package/dist/{chunk-QKVVJXWS.js → chunk-PF53E2DC.js} +1 -1
  109. package/dist/{chunk-XNNKLUTN.js → chunk-PLSS456F.js} +1 -1
  110. package/dist/{chunk-XM7YUXTF.js → chunk-PTSCGSQV.js} +2 -2
  111. package/dist/{chunk-KSDU4YOB.js → chunk-PWAT52M4.js} +1 -1
  112. package/dist/{chunk-NOH63WC6.js → chunk-Q2KWXZQB.js} +1 -1
  113. package/dist/{chunk-EGCWR5AS.js → chunk-Q4JYAUVL.js} +1 -1
  114. package/dist/{chunk-4CRBTSVP.js → chunk-Q5IC3IYY.js} +1 -1
  115. package/dist/{chunk-Z5SILNH2.js → chunk-QDCLL5OI.js} +1 -1
  116. package/dist/{chunk-VB7YQMAM.js → chunk-QEKGGTMN.js} +1 -1
  117. package/dist/{chunk-BJPDJIS4.js → chunk-QEVTBD33.js} +1 -1
  118. package/dist/{chunk-PZUGDE7N.js → chunk-QF5WKTPD.js} +1 -1
  119. package/dist/{chunk-7NSK77WG.js → chunk-QFSENE5T.js} +1 -1
  120. package/dist/{chunk-IUP7POIE.js → chunk-QQJNQNKP.js} +1 -1
  121. package/dist/{chunk-PSSYLJG4.js → chunk-QW52RPAU.js} +1 -1
  122. package/dist/{chunk-ULD7CIOY.js → chunk-R4UVIYZP.js} +1 -1
  123. package/dist/{chunk-M5TGCSUK.js → chunk-RLNIOJH3.js} +1 -1
  124. package/dist/{chunk-ZYQ2XWC5.js → chunk-RPCIFYCY.js} +1 -1
  125. package/dist/{chunk-C3KEDG33.js → chunk-RPVZ2JON.js} +1 -1
  126. package/dist/{chunk-I4OVLRQR.js → chunk-RW6G4ZPU.js} +1 -1
  127. package/dist/{chunk-4GOJQKY5.js → chunk-S4LOWCGS.js} +1 -1
  128. package/dist/{chunk-OQU3HLAE.js → chunk-S5P7KWY4.js} +1 -1
  129. package/dist/{chunk-UWMZ5CSB.js → chunk-SACNUF4I.js} +1 -1
  130. package/dist/chunk-SB27UOXX.js +1 -0
  131. package/dist/{chunk-YVVU4J5O.js → chunk-SHD4VV5V.js} +1 -1
  132. package/dist/{chunk-M7LPHCP2.js → chunk-SIL6HPMK.js} +2 -2
  133. package/dist/{chunk-AJMDF3QC.js → chunk-SK7EPN6C.js} +1 -1
  134. package/dist/{chunk-XITZIDCL.js → chunk-SLY27GDC.js} +1 -1
  135. package/dist/{chunk-C7V755IT.js → chunk-SNH4XZ6E.js} +1 -1
  136. package/dist/{chunk-POKY4RWR.js → chunk-T4XJKM6B.js} +1 -1
  137. package/dist/{chunk-7MVWDCI3.js → chunk-TAWCKJKP.js} +1 -1
  138. package/dist/{chunk-BCYTZ7LM.js → chunk-TFPW2VGN.js} +1 -1
  139. package/dist/{chunk-UOS2XLGG.js → chunk-TODZ3TJR.js} +1 -1
  140. package/dist/chunk-U2T5HPRD.js +319 -0
  141. package/dist/{chunk-XTREQ4A2.js → chunk-U6YOP562.js} +1 -1
  142. package/dist/{chunk-53BG3NLH.js → chunk-UBP3LQFY.js} +1 -1
  143. package/dist/{chunk-GFVKTWFT.js → chunk-UKWIWCOH.js} +1 -1
  144. package/dist/{chunk-GAMC2BNY.js → chunk-UPPO3BMT.js} +1 -1
  145. package/dist/{chunk-Q2XRITUG.js → chunk-URXM5A2K.js} +1 -1
  146. package/dist/chunk-USXIXANP.js +103 -0
  147. package/dist/{chunk-R2BDABJD.js → chunk-UUAKOX7E.js} +1 -1
  148. package/dist/{chunk-WGUOLSMG.js → chunk-UV5GAGAD.js} +1 -1
  149. package/dist/{chunk-AYL6KBPE.js → chunk-UXVXVI6O.js} +1 -1
  150. package/dist/{chunk-VWH3VPYI.js → chunk-UY6W2EVZ.js} +1 -1
  151. package/dist/{chunk-BVSKBX7T.js → chunk-UYELAINQ.js} +1 -1
  152. package/dist/{chunk-KDPQXURV.js → chunk-VAVXDIUX.js} +1 -1
  153. package/dist/{chunk-OX7UVDSU.js → chunk-VEUKT5EI.js} +1 -1
  154. package/dist/chunk-VGSH52JM.js +1 -0
  155. package/dist/chunk-VHZ6RL67.js +1 -0
  156. package/dist/{chunk-UK6576EO.js → chunk-VQA3X7O3.js} +1 -1
  157. package/dist/{chunk-TTEF7GTX.js → chunk-VZCMJRYV.js} +1 -1
  158. package/dist/{chunk-3G4HJO72.js → chunk-W37IFK3P.js} +1 -1
  159. package/dist/{chunk-LMQGNECW.js → chunk-W56ZGEQQ.js} +1 -1
  160. package/dist/{chunk-GCNA3HXH.js → chunk-WBVS5NBV.js} +1 -1
  161. package/dist/{chunk-XKRJKUA7.js → chunk-WCC52MR2.js} +1 -1
  162. package/dist/{chunk-LDU5T3DN.js → chunk-WESTVWWD.js} +1 -1
  163. package/dist/{chunk-24NUJTIH.js → chunk-WRZWHT6M.js} +1 -1
  164. package/dist/{chunk-4TI7U2PN.js → chunk-WSDKCQH6.js} +1 -1
  165. package/dist/{chunk-UIQL5ZF3.js → chunk-X2PFXSU4.js} +1 -1
  166. package/dist/{chunk-NB4BRW3H.js → chunk-X5NIAZA4.js} +1 -1
  167. package/dist/{chunk-RFGEM5JC.js → chunk-XBMD3FEZ.js} +1 -1
  168. package/dist/{chunk-I6FRVYGE.js → chunk-XDVPIGXE.js} +1 -1
  169. package/dist/chunk-XLIJYJ6Q.js +1 -0
  170. package/dist/chunk-XUHGWIWW.js +4 -0
  171. package/dist/{chunk-2ORRV7GH.js → chunk-XWSWXQCC.js} +1 -1
  172. package/dist/{chunk-Q66CI37F.js → chunk-Y55T4IIQ.js} +1 -1
  173. package/dist/{chunk-WMAFG2JD.js → chunk-Y5CVX5LJ.js} +1 -1
  174. package/dist/{chunk-VHUD3CBC.js → chunk-Y6J46XYF.js} +1 -1
  175. package/dist/{chunk-DJAZBPYA.js → chunk-YKMINHYY.js} +1 -1
  176. package/dist/{chunk-KKPOOIE4.js → chunk-YSWVYPWR.js} +1 -1
  177. package/dist/{chunk-D7NB7YR6.js → chunk-YV2TP44L.js} +1 -1
  178. package/dist/{chunk-7IFE4UQY.js → chunk-Z2WAW6MM.js} +1 -1
  179. package/dist/chunk-ZBL7XMJ6.js +25 -0
  180. package/dist/{chunk-YTUDXZLN.js → chunk-ZGBTO46A.js} +1 -1
  181. package/dist/{chunk-ZQDDRIBA.js → chunk-ZJOX5HW4.js} +4 -4
  182. package/dist/{chunk-MXJAH2GW.js → chunk-ZOOT3GBY.js} +1 -1
  183. package/dist/{chunk-ZAA2DXK5.js → chunk-ZRI3SSLG.js} +1 -1
  184. package/dist/cli/commands/app/build.js +1 -1
  185. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  186. package/dist/cli/commands/app/bulk/execute.js +1 -1
  187. package/dist/cli/commands/app/bulk/status.js +1 -1
  188. package/dist/cli/commands/app/config/link.js +1 -1
  189. package/dist/cli/commands/app/config/pull.js +1 -1
  190. package/dist/cli/commands/app/config/use.js +1 -1
  191. package/dist/cli/commands/app/config/validate.js +1 -1
  192. package/dist/cli/commands/app/demo/watcher.js +1 -1
  193. package/dist/cli/commands/app/deploy.js +1 -1
  194. package/dist/cli/commands/app/dev/clean.js +1 -1
  195. package/dist/cli/commands/app/dev.js +1 -1
  196. package/dist/cli/commands/app/env/pull.js +1 -1
  197. package/dist/cli/commands/app/env/show.js +1 -1
  198. package/dist/cli/commands/app/execute.js +1 -1
  199. package/dist/cli/commands/app/function/build.js +1 -1
  200. package/dist/cli/commands/app/function/info.js +1 -1
  201. package/dist/cli/commands/app/function/replay.js +1 -1
  202. package/dist/cli/commands/app/function/run.js +1 -1
  203. package/dist/cli/commands/app/function/schema.js +1 -1
  204. package/dist/cli/commands/app/function/typegen.js +1 -1
  205. package/dist/cli/commands/app/generate/extension.js +1 -1
  206. package/dist/cli/commands/app/graphiql.js +1 -1
  207. package/dist/cli/commands/app/import/channel-config.js +1 -1
  208. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
  209. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
  210. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  211. package/dist/cli/commands/app/import-extensions.js +1 -1
  212. package/dist/cli/commands/app/info.js +1 -1
  213. package/dist/cli/commands/app/init.js +1 -1
  214. package/dist/cli/commands/app/logs.js +1 -1
  215. package/dist/cli/commands/app/release.js +1 -1
  216. package/dist/cli/commands/app/security/check.js +1 -1
  217. package/dist/cli/commands/app/security/clean.js +1 -1
  218. package/dist/cli/commands/app/security/instructions.js +1 -1
  219. package/dist/cli/commands/app/security/record.js +1 -1
  220. package/dist/cli/commands/app/security/review.js +1 -1
  221. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  222. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  223. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  224. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  225. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  226. package/dist/cli/commands/app/versions/list.js +1 -1
  227. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  228. package/dist/cli/commands/auth/login.js +1 -1
  229. package/dist/cli/commands/auth/logout.js +1 -1
  230. package/dist/cli/commands/cache/clear.js +1 -1
  231. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  232. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  233. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  234. package/dist/cli/commands/debug/command-flags.js +1 -1
  235. package/dist/cli/commands/doc/fetch.js +1 -1
  236. package/dist/cli/commands/doc/search.js +1 -1
  237. package/dist/cli/commands/docs/generate.js +1 -1
  238. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  239. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  240. package/dist/cli/commands/help.js +1 -1
  241. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  242. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  243. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  244. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  245. package/dist/cli/commands/notifications/generate.js +1 -1
  246. package/dist/cli/commands/notifications/list.js +1 -1
  247. package/dist/cli/commands/organization/list.js +1 -1
  248. package/dist/cli/commands/search.js +1 -1
  249. package/dist/cli/commands/send-analytics.js +1 -1
  250. package/dist/cli/commands/theme/check.js +1 -1
  251. package/dist/cli/commands/theme/console.js +1 -1
  252. package/dist/cli/commands/theme/delete.js +1 -1
  253. package/dist/cli/commands/theme/dev.js +1 -1
  254. package/dist/cli/commands/theme/duplicate.js +1 -1
  255. package/dist/cli/commands/theme/info.js +1 -1
  256. package/dist/cli/commands/theme/init.js +1 -1
  257. package/dist/cli/commands/theme/language-server.js +1 -1
  258. package/dist/cli/commands/theme/list.js +1 -1
  259. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  260. package/dist/cli/commands/theme/open.js +1 -1
  261. package/dist/cli/commands/theme/package.js +1 -1
  262. package/dist/cli/commands/theme/preview.js +1 -1
  263. package/dist/cli/commands/theme/profile.js +1 -1
  264. package/dist/cli/commands/theme/publish.js +1 -1
  265. package/dist/cli/commands/theme/pull.js +1 -1
  266. package/dist/cli/commands/theme/push.js +1 -1
  267. package/dist/cli/commands/theme/rename.js +1 -1
  268. package/dist/cli/commands/theme/share.js +1 -1
  269. package/dist/cli/commands/upgrade.js +1 -1
  270. package/dist/cli/commands/version.js +1 -1
  271. package/dist/cli/help.js +1 -1
  272. package/dist/{command-json-schema-2UMKY7MY.js → command-json-schema-F5XF7XHL.js} +1 -1
  273. package/dist/command-registry.js +1 -1
  274. package/dist/{conf-store-RI3TL6I4.js → conf-store-5CBLWTOC.js} +1 -1
  275. package/dist/{custom-oclif-loader-IZCKN67O.js → custom-oclif-loader-UDVUFKMD.js} +1 -1
  276. package/dist/{deprecations-IFVUXXDB.js → deprecations-EOHPSTCS.js} +1 -1
  277. package/dist/dist-RNV3GFZ7.js +1 -0
  278. package/dist/dist-ZFKWJVNB.js +1 -0
  279. package/dist/{environments-CYMEN7NV.js → environments-4FLRZW4P.js} +1 -1
  280. package/dist/{error-IL6WQMSW.js → error-JY2ADS6S.js} +1 -1
  281. package/dist/{error-handler-74HKA23T.js → error-handler-4GCXKC6I.js} +1 -1
  282. package/dist/{fs-AINFLJ2E.js → fs-XS5YF34R.js} +1 -1
  283. package/dist/hooks/did-you-mean.js +1 -1
  284. package/dist/hooks/hydrogen-init.js +1 -1
  285. package/dist/hooks/postrun.js +1 -1
  286. package/dist/hooks/prerun.js +1 -1
  287. package/dist/hooks/public-metadata.js +1 -1
  288. package/dist/hooks/sensitive-metadata.js +1 -1
  289. package/dist/hooks/tunnel-provider.js +1 -1
  290. package/dist/hooks/tunnel-start.js +1 -1
  291. package/dist/index.js +12 -12
  292. package/dist/{is-global-2VLKV46Q.js → is-global-27MUENOK.js} +1 -1
  293. package/dist/{json-error-HZB5YIHV.js → json-error-S5XFS3UX.js} +1 -1
  294. package/dist/{local-KOZETREJ.js → local-OKPVB4NH.js} +1 -1
  295. package/dist/{metadata-IBPHZB7N.js → metadata-2YJBAKR7.js} +1 -1
  296. package/dist/{node-package-manager-DXSRNEDC.js → node-package-manager-B3OW3PFQ.js} +1 -1
  297. package/dist/{notifications-system-XA3EBOGJ.js → notifications-system-BWTDYBG2.js} +1 -1
  298. package/dist/{os-X73O7BAB.js → os-F6QKJCFW.js} +1 -1
  299. package/dist/{output-3OYXK3Z5.js → output-BRIPK7UC.js} +1 -1
  300. package/dist/{system-JWYYT4PM.js → system-466QKFDI.js} +1 -1
  301. package/dist/tsconfig.tsbuildinfo +1 -1
  302. package/dist/{ui-PCG5D6RZ.js → ui-VJTNGCS6.js} +1 -1
  303. package/dist/{upgrade-7U2TUNC4.js → upgrade-VHVJLXKX.js} +1 -1
  304. package/dist/{version-7DGU2KYH.js → version-FETZRLZO.js} +1 -1
  305. package/dist/version-T4XXTJMB.js +1 -0
  306. package/dist/{workerd-MQZ3NKJI.js → workerd-32DMKLMN.js} +1 -1
  307. package/oclif.manifest.json +6 -3
  308. package/package.json +7 -7
  309. package/dist/chunk-3C6VLJ5D.js +0 -319
  310. package/dist/chunk-4C2DAX5T.js +0 -1
  311. package/dist/chunk-7LAKWAKX.js +0 -25
  312. package/dist/chunk-7RPFJZLP.js +0 -1
  313. package/dist/chunk-CEIJKJOF.js +0 -11
  314. package/dist/chunk-DNMXVMJM.js +0 -47
  315. package/dist/chunk-FDXHQZTO.js +0 -26
  316. package/dist/chunk-JDR6UVZA.js +0 -8
  317. package/dist/chunk-JEA3C7ON.js +0 -3
  318. package/dist/chunk-JOJV5E2K.js +0 -1
  319. package/dist/chunk-LVLAOBJM.js +0 -103
  320. package/dist/chunk-OQ5CLM2H.js +0 -4
  321. package/dist/chunk-OVWUGAEU.js +0 -11
  322. package/dist/chunk-PMHP57MH.js +0 -20
  323. package/dist/chunk-RVQV6G5M.js +0 -1
  324. package/dist/chunk-T2IUXXCT.js +0 -1
  325. package/dist/chunk-WDFCOZAY.js +0 -16
  326. package/dist/chunk-X2H6I2WW.js +0 -5
  327. package/dist/chunk-ZGV3HNEV.js +0 -1
  328. package/dist/dist-4H2B7BMN.js +0 -1
  329. package/dist/dist-QNWOGQN3.js +0 -1
  330. package/dist/version-SXQTRBXB.js +0 -1
@@ -1 +1 @@
1
- import{T as i}from"./chunk-CZ22VZDA.js";import{yb as o}from"./chunk-LWCTKI4Z.js";import{j as d}from"./chunk-FZCGRIOM.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();import{Writable as m}from"node:stream";import{StringDecoder as f}from"node:string_decoder";function p(){return d()!=="json"?{stdout:process.stdout,stderr:process.stderr}:{stdout:u(),stderr:u()}}function u(){let e=new f("utf8");return new m({write(r,t,c){let s=e.write(r);s&&o(s),c()},final(r){let t=e.end();t&&o(t),r()}})}async function y(e,r){let t=p();try{await i(e,r,t.stdout===process.stdout?{stdio:"inherit"}:{stdin:"inherit",...t})}finally{t.stdout!==process.stdout&&t.stdout.end(),t.stderr!==process.stderr&&t.stderr.end()}}export{p as a,y as b};
1
+ import{T as i}from"./chunk-D2KIGKBI.js";import{yb as o}from"./chunk-JLQRDFR5.js";import{j as d}from"./chunk-FZCGRIOM.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();import{Writable as m}from"node:stream";import{StringDecoder as f}from"node:string_decoder";function p(){return d()!=="json"?{stdout:process.stdout,stderr:process.stderr}:{stdout:u(),stderr:u()}}function u(){let e=new f("utf8");return new m({write(r,t,c){let s=e.write(r);s&&o(s),c()},final(r){let t=e.end();t&&o(t),r()}})}async function y(e,r){let t=p();try{await i(e,r,t.stdout===process.stdout?{stdio:"inherit"}:{stdin:"inherit",...t})}finally{t.stdout!==process.stdout&&t.stdout.end(),t.stderr!==process.stderr&&t.stderr.end()}}export{p as a,y as b};
@@ -1,3 +1,3 @@
1
- import{a as R,b as T,c as m,d as F,g as v}from"./chunk-YVVU4J5O.js";import{p as S,v as w}from"./chunk-DJAZBPYA.js";import{ua as h}from"./chunk-H4V55Y3Z.js";import{b as l,c as f}from"./chunk-Q2SZCZE7.js";import{a as c}from"./chunk-BN7ZXAZJ.js";import{S as d,wb as n}from"./chunk-LWCTKI4Z.js";import{b as P}from"./chunk-YTUUU33R.js";import{e as O,g as r}from"./chunk-VKWPEFWQ.js";r();r();var j=c({name:"ThemeShareResult",schema:m.schema,definitions:m.definitions}),o={...j,encode:m.encode};r();function g(s,e){e==="json"?n(o.encode(T(s))):F(s,"text")}function x(s){let e=s.map(t=>"error"in t?t:(R.safeParse(t.result).data?.hasErrors&&(process.exitCode=1),{...t,result:t.result??{status:"skipped",reason:"unsafe-directory"}}));n(o.encode({environments:e}))}var u=O(P(),1);var p=class extends w{static get jsonOutputSchema(){return o}static summary="Creates a shareable, unpublished, and new theme on your theme library with a randomized name.";static descriptionWithMarkdown=`Uploads your theme as a new, unpublished theme in your theme library. The theme is given a randomized name.
1
+ import{a as R,b as T,c as m,d as F,g as v}from"./chunk-SHD4VV5V.js";import{p as S,v as w}from"./chunk-YKMINHYY.js";import{ua as h}from"./chunk-GQLNG537.js";import{b as l,c as f}from"./chunk-3KM5ZOW2.js";import{a as c}from"./chunk-BN7ZXAZJ.js";import{S as d,wb as n}from"./chunk-JLQRDFR5.js";import{b as P}from"./chunk-YTUUU33R.js";import{e as O,g as r}from"./chunk-VKWPEFWQ.js";r();r();var j=c({name:"ThemeShareResult",schema:m.schema,definitions:m.definitions}),o={...j,encode:m.encode};r();function g(s,e){e==="json"?n(o.encode(T(s))):F(s,"text")}function x(s){let e=s.map(t=>"error"in t?t:(R.safeParse(t.result).data?.hasErrors&&(process.exitCode=1),{...t,result:t.result??{status:"skipped",reason:"unsafe-directory"}}));n(o.encode({environments:e}))}var u=O(P(),1);var p=class extends w{static get jsonOutputSchema(){return o}static summary="Creates a shareable, unpublished, and new theme on your theme library with a randomized name.";static descriptionWithMarkdown=`Uploads your theme as a new, unpublished theme in your theme library. The theme is given a randomized name.
2
2
 
3
3
  This command returns a [preview link](https://help.shopify.com/manual/online-store/themes/adding-themes#share-a-theme-preview-with-others) that you can share with others.`;static description=this.descriptionForHelp();static flags={...l,...f,...S,force:u.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"}),listing:u.Flags.string({description:"The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",env:"SHOPIFY_FLAG_LISTING"})};static multiEnvironmentsFlags=["store","password","path"];async command(e,t,a,C,y){let b={environment:e.environment,force:e.force,noColor:e["no-color"],password:e.password,path:e.path,store:e.store,theme:d("creative"),unpublished:!0,listing:e.listing};h("theme-command:share");let i=await v(b,t,a,y);return i?.hasErrors&&(process.exitCode=1),e.json&&a||(i?g(i,e.json?"json":"text"):e.json&&n(o.encode({status:"cancelled"}))),h("theme-command:share"),i??(e.json&&a?{status:"skipped",reason:"unsafe-directory"}:void 0)}renderEnvironmentResults(e){x(e)}};export{p as a};
@@ -1 +1 @@
1
- import{a as o}from"./chunk-EXFBZPZS.js";import{b as a}from"./chunk-ZQDDRIBA.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var t=class extends a{static description="View the UI kit components that process async tasks";static hidden=!0;async run(){await o()}};export{t as a};
1
+ import{a as o}from"./chunk-64G5TGFF.js";import{b as a}from"./chunk-ZJOX5HW4.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var t=class extends a{static description="View the UI kit components that process async tasks";static hidden=!0;async run(){await o()}};export{t as a};
@@ -1,4 +1,4 @@
1
- import{a as j}from"./chunk-ZGV3HNEV.js";import{a as D}from"./chunk-FWB3GLMW.js";import{Ba as u,Ca as _,Ma as L}from"./chunk-3C6VLJ5D.js";import{b as $,c as P}from"./chunk-Q2SZCZE7.js";import{A as R,B as A}from"./chunk-CZ22VZDA.js";import{a as S}from"./chunk-BN7ZXAZJ.js";import{h as a}from"./chunk-2VSNFOKD.js";import{Sa as O,ab as v,ta as E,va as N,wb as F}from"./chunk-LWCTKI4Z.js";import{b as s}from"./chunk-FZCGRIOM.js";import{b as X}from"./chunk-YTUUU33R.js";import{c as m,e as w,f,h as T,i as C}from"./chunk-IWTNUJGY.js";import{e as z,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();async function k({remoteApp:t,developerPlatformClient:e}){let n=await e.channelSpecExport(t);if(n.status===404)throw new a("The channel spec export endpoint is not available for this app.","Check that the app and organization are correct.");if(!n.ok){let i=typeof n.body?.reason=="string"?n.body.reason:void 0;if(n.status===426)throw new a(`Failed to fetch the channel spec export: ${i??"This version of the Shopify CLI is no longer supported."}`,"Upgrade the Shopify CLI and try again.");if(n.status===422)return{success:!1,reason:i??`http_${n.status}`};throw n.status===401||n.status===403?new a(`Failed to fetch the channel spec export: authentication failed (status ${n.status}).`,"Run `shopify auth logout` and try again."):new a(`Failed to fetch the channel spec export: the server responded with status ${n.status}.`,"Try again in a moment.")}let{handle:r,filename:p,toml:o,warnings:h}=n.body;if(typeof r!="string"||typeof p!="string"||typeof o!="string")throw new a("Failed to fetch the channel spec export: the response was missing required fields.");return{success:!0,handle:r,filename:p,toml:o,warnings:B(h)}}function B(t){return Array.isArray(t)?t.flatMap(e=>e&&typeof e=="object"&&typeof e.code=="string"&&typeof e.message=="string"?[e]:[]):[]}c();var M=s.object({code:s.string(),message:s.string()}).strict(),d=S({name:"ImportChannelConfigResult",schema:s.object({status:s.literal("success"),handle:s.string().min(1),filename:s.string().min(1),path:s.string().regex(/^(?:\/|[a-zA-Z]:[\\/]|\\\\)/,"The path must be absolute.").describe("Absolute path of the written TOML file."),toml:s.string().describe("Native channel_config TOML content, unchanged from the export."),warnings:s.array(M).describe("Warnings returned with the channel spec export.")}).strict(),definitions:{ChannelSpecExportWarning:M}});var g=m("extensions","channel-config"),he=m(g,_),x="shopify.extension.toml",G=`name = "Channel config"
1
+ import{a as j}from"./chunk-VHZ6RL67.js";import{a as D}from"./chunk-NVKJ7ZLP.js";import{Ba as u,Ca as _,Ma as L}from"./chunk-U2T5HPRD.js";import{b as $,c as P}from"./chunk-3KM5ZOW2.js";import{A as R,B as A}from"./chunk-D2KIGKBI.js";import{a as S}from"./chunk-BN7ZXAZJ.js";import{h as a}from"./chunk-M5VIFG2V.js";import{Sa as O,ab as v,ta as E,va as N,wb as F}from"./chunk-JLQRDFR5.js";import{b as s}from"./chunk-FZCGRIOM.js";import{b as X}from"./chunk-YTUUU33R.js";import{c as m,e as w,f,h as T,i as C}from"./chunk-IWTNUJGY.js";import{e as z,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();async function k({remoteApp:t,developerPlatformClient:e}){let n=await e.channelSpecExport(t);if(n.status===404)throw new a("The channel spec export endpoint is not available for this app.","Check that the app and organization are correct.");if(!n.ok){let i=typeof n.body?.reason=="string"?n.body.reason:void 0;if(n.status===426)throw new a(`Failed to fetch the channel spec export: ${i??"This version of the Shopify CLI is no longer supported."}`,"Upgrade the Shopify CLI and try again.");if(n.status===422)return{success:!1,reason:i??`http_${n.status}`};throw n.status===401||n.status===403?new a(`Failed to fetch the channel spec export: authentication failed (status ${n.status}).`,"Run `shopify auth logout` and try again."):new a(`Failed to fetch the channel spec export: the server responded with status ${n.status}.`,"Try again in a moment.")}let{handle:r,filename:p,toml:o,warnings:h}=n.body;if(typeof r!="string"||typeof p!="string"||typeof o!="string")throw new a("Failed to fetch the channel spec export: the response was missing required fields.");return{success:!0,handle:r,filename:p,toml:o,warnings:B(h)}}function B(t){return Array.isArray(t)?t.flatMap(e=>e&&typeof e=="object"&&typeof e.code=="string"&&typeof e.message=="string"?[e]:[]):[]}c();var M=s.object({code:s.string(),message:s.string()}).strict(),d=S({name:"ImportChannelConfigResult",schema:s.object({status:s.literal("success"),handle:s.string().min(1),filename:s.string().min(1),path:s.string().regex(/^(?:\/|[a-zA-Z]:[\\/]|\\\\)/,"The path must be absolute.").describe("Absolute path of the written TOML file."),toml:s.string().describe("Native channel_config TOML content, unchanged from the export."),warnings:s.array(M).describe("Warnings returned with the channel spec export.")}).strict(),definitions:{ChannelSpecExportWarning:M}});var g=m("extensions","channel-config"),he=m(g,_),x="shopify.extension.toml",G=`name = "Channel config"
2
2
  type = "${u}"
3
3
  handle = "channel-config"
4
4
  `,U=["extensions/*"],q={no_exportable_frozen_record:"This app doesn't have a channel spec that can be exported yet.",multiple_exportable_records:"This app has more than one channel spec, so it can't be exported automatically.",not_allowlisted:"This app isn't part of the channel spec export prototype yet.",contains_no_public_fields:"This app's channel spec has no public channel_config fields.",invalid_public_schema:"This app's channel spec doesn't match the public channel_config schema."};async function H(t){let{app:e,remoteApp:n,developerPlatformClient:r,force:p}=t,o=await k({remoteApp:n,developerPlatformClient:r});if(!o.success){let y=q[o.reason];throw y?new a(y):new a(`The channel spec for this app could not be exported (reason: ${o.reason}).`)}let{extensionDirectory:h,createExtension:i}=Z(e),l=w(h,_,C(o.filename));if(!p&&await O(l))throw new a(`A channel spec already exists at ${f(e.directory,l)}.`,"Re-run with `--force` to replace it.");let I=d.validate({status:"success",handle:o.handle,filename:C(o.filename),path:l,toml:o.toml,warnings:o.warnings.map(({code:y,message:Y})=>({code:y,message:Y}))});return await N(T(l)),i&&await E(m(h,x),G),await E(l,I.toml),{...I,extensionConfigurationPath:i?w(h,x):null}}function Z(t){let e=t.allExtensions.filter(i=>i.type===u);if(e.length>1){let i=e.map(l=>f(t.directory,l.directory)).join(", ");throw new a(`This app has more than one ${u} extension (${i}).`,"Only one is allowed. Remove the extras and try again.")}if(e.length===1)return{extensionDirectory:e[0].directory,createExtension:!1};let n=t.configuration.extension_directories,r=n&&n.length>0?n:U;if(!r.some(i=>v(`${g}/${x}`,`${i}/*.extension.toml`)))throw new a(`Your shopify.app.toml only loads extensions from ${r.join(", ")}, so a new extension at ${g} wouldn't be deployed.`,`Create a ${u} extension in one of those directories with a ${x} like:
@@ -1 +1 @@
1
- import{b as n}from"./chunk-GRGFA26K.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();var o=class extends Error{type;constructor(e,p){super(p),this.type=e}},i=r=>async()=>r,s=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var d="cloudflare",v=i({name:d});export{o as a,s as b,d as c,v as d};
1
+ import{b as n}from"./chunk-F3CK3EJJ.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();var o=class extends Error{type;constructor(e,p){super(p),this.type=e}},i=r=>async()=>r,s=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var d="cloudflare",v=i({name:d});export{o as a,s as b,d as c,v as d};
@@ -0,0 +1,103 @@
1
+ import{a as z,b as bt}from"./chunk-JLGA3B7P.js";import{a as Tt,b as Rt,f as Ae,g as le,h as N,j as de,k as Pt,m as vt,p as $t}from"./chunk-IJY3RJPJ.js";import{a as J,l as St,m as Ft}from"./chunk-H6GYBLVQ.js";import{s as ce,t as B}from"./chunk-YKMINHYY.js";import{a as W,b as M,e as dt,g as ut,i as pt,j as mt,k as ft,n as ht,p as gt,q as yt,r as ae,s as I,u as Et,w as wt}from"./chunk-Q7BOSHWX.js";import{da as xt}from"./chunk-RLNIOJH3.js";import{va as j,xa as D}from"./chunk-GQLNG537.js";import{B as L,C as re,D as ct,U as lt,z as at}from"./chunk-D2KIGKBI.js";import{c as it}from"./chunk-335BUVBP.js";import{h as k}from"./chunk-M5VIFG2V.js";import{Bb as v,Cb as U,O as nt,Sa as b,Va as O,Z as Le,ab as Ce,la as _,na as qe,qb as C,sb as oe,ta as je,va as rt,xa as ot,yb as ie}from"./chunk-JLQRDFR5.js";import{c as x,e as et,f as A,h as tt,i as st,j as H,n as _e}from"./chunk-IWTNUJGY.js";import{e as Ke,g as m}from"./chunk-VKWPEFWQ.js";m();m();m();var fs=".shopifyignore",It=/templates\/\*(\.(json|liquid))?$/,kt=new Set;function ue(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[o=[],i=[]]=He(s),[a=[],u=[]]=He(n),[p=[],c=[]]=He(r),l=e.filter(G(o,".shopifyignore"));return l=l.filter(G(a,"--ignore")),l=l.filter(G(p,"--only",!0)),i.length>0&&(l=l.concat(e.filter(G(i,".shopifyignore",!0)))),u.length>0&&(l=l.concat(e.filter(G(u,"--ignore",!0)))),c.length>0&&(l=l.filter(G(c,"--only"))),nt(l,w=>w.key)}function G(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(i=>hs(n,i)||Es(i)&&ys(n,ws(i)));return(s?!r:r)?(v(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function _t(e){let t=x(e,fs);return await b(t)?(await _(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function He(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function hs(e,t){let s={matchBase:!0,noglobstar:!0};return Ce(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!kt.has(t)&&(kt.add(t),L({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),gs(t)?Ce(e,t.replace(It,"templates/**/*$1"),s):!1)}function gs(e){return It.test(e)}function ys(e,t){return t.test(e)}function Es(e){return e.startsWith("/")&&e.endsWith("/")}function ws(e){return new RegExp(e.slice(1,-1))}m();import Lt from"fs/promises";var pe=class{notifyPath;isValidUrl;constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&U("Notification skipped: notifyPath is an empty string")}async notify(t){if(this.notifyPath!=="")try{v(`Notifying filechange listener at ${this.notifyPath}...`),this.isValidUrl?await this.notifyUrl(t):await this.notifyFile(t)}catch(s){j(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),U(n)}}async notifyUrl(t){let s=await fetch(this.notifyPath,{method:"POST",body:JSON.stringify({files:[t]}),headers:{"Content-Type":"application/json"}});if(!s.ok)throw new Error(s.statusText)}async notifyFile(t){await Lt.writeFile(this.notifyPath,t),await Lt.utimes(this.notifyPath,new Date,new Date)}validateUrl(t){try{let s=new URL(t);return s.protocol==="http:"||s.protocol==="https:"}catch{return!1}}};m();m();m();import xs from"node:events";var qt=["assets/**/*.*","locales/**/*.json","blocks/**/*.liquid","snippets/**/*.liquid"];function jt(e){let t=new Map,s=new Set,n=new xs,r=(c,l)=>{n.emit(c,l)},o=async c=>{let l=await fe(e,c),f=me(c,l),w=typeof l=="string"?l:"",h=Buffer.isBuffer(l)?l.toString("base64"):"";return t.set(c,J({key:c,checksum:f,value:w,attachment:h})),l},i=O(qt,{cwd:e,deep:3,ignore:B}).then(c=>Promise.all(c.map(o))),a=(c,l)=>{let f=A(e,l),w=o(f).then(()=>{let h=t.get(f);return s.add(h.key),h.value??h.attachment??""});lt(5).then(()=>{s.delete(f)}).catch(()=>{}),r(c,{fileKey:f,onContent:h=>{w.then(y=>{y&&h(y)}).catch(()=>{})},onSync:h=>{}})},u=c=>{let l=A(e,c);s.delete(l),t.delete(l),r("unlink",{fileKey:l,onSync:f=>f()})},p=new Set(qt.map(c=>x(e,c.split("/").shift()??"")));return{root:e,files:t,unsyncedFileKeys:s,ready:async()=>i.then(()=>{}),delete:async c=>{t.delete(c)},write:async c=>{t.set(c.key,c)},read:o,addEventListener:(c,l)=>{n.on(c,l)},startWatcher:async()=>{let{default:c}=await import("./chokidar-5RWEYTNQ.js");c.watch([...p],{ignored:B,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}).on("add",a.bind(null,"add")).on("change",a.bind(null,"change")).on("unlink",u.bind(null))}}}m();m();var Ts="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function Ct(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function At(e){return(0,String.raw)`<!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>${e.title}</title>
5
+ <link rel="stylesheet" href="${Ts}" />
6
+ </head>
7
+ <body>
8
+ <div style="display: flex; justify-content: center; padding-top: 2rem;">
9
+ <div style="width: 80%;">
10
+ <div class="Polaris-Banner Polaris-Banner--withinPage" tabindex="0" role="alert" aria-live="polite">
11
+ <div class="Polaris-Box" style="--pc-box-width:100%">
12
+ <div
13
+ class="Polaris-BlockStack"
14
+ style="--pc-block-stack-align:space-between;--pc-block-stack-order:column"
15
+ >
16
+ <div
17
+ class="Polaris-Box"
18
+ style="--pc-box-color: var(--p-color-text-critical-on-bg-fill); --pc-box-background: var(--p-color-bg-fill-critical); --pc-box-padding-block-start-xs: var(--p-space-300); --pc-box-padding-block-end-xs: var(--p-space-300); --pc-box-padding-inline-start-xs: var(--p-space-300); --pc-box-padding-inline-end-xs: var(--p-space-300); --pc-box-border-start-start-radius: var(--p-border-radius-300); --pc-box-border-start-end-radius: var(--p-border-radius-300);"
19
+ >
20
+ <div
21
+ class="Polaris-InlineStack"
22
+ style="--pc-inline-stack-align:space-between;--pc-inline-stack-block-align:center;--pc-inline-stack-wrap:nowrap;--pc-inline-stack-gap-xs:var(--p-space-200);--pc-inline-stack-flex-direction-xs:row"
23
+ >
24
+ <div
25
+ class="Polaris-InlineStack"
26
+ style="--pc-inline-stack-wrap:nowrap;--pc-inline-stack-gap-xs:var(--p-space-100);--pc-inline-stack-flex-direction-xs:row"
27
+ >
28
+ <span class="Polaris-Banner--textCriticalOnBgFill">
29
+ <span class="Polaris-Icon">
30
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
31
+ <path d="M10 6a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5a.75.75 0 0 1 .75-.75Z" />
32
+ <path d="M11 13a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" />
33
+ <path
34
+ fill-rule="evenodd"
35
+ d="M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Zm-1.5 0a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z"
36
+ />
37
+ </svg>
38
+ </span>
39
+ </span>
40
+ <h2 class="Polaris-Text--root Polaris-Text--headingSm Polaris-Text--break">
41
+ ${e.header}
42
+ </h2>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ <div
47
+ class="Polaris-Box"
48
+ style="--pc-box-padding-block-start-xs:var(--p-space-300);--pc-box-padding-block-end-xs:var(--p-space-300);--pc-box-padding-block-end-md:var(--p-space-400);--pc-box-padding-inline-start-xs:var(--p-space-300);--pc-box-padding-inline-start-md:var(--p-space-400);--pc-box-padding-inline-end-xs:var(--p-space-300);--pc-box-padding-inline-end-md:var(--p-space-400)"
49
+ >
50
+ <div
51
+ class="Polaris-BlockStack"
52
+ style="--pc-block-stack-order:column;--pc-block-stack-gap-xs:var(--p-space-300)"
53
+ >
54
+ ${e.errors.map(s=>`
55
+ <div>
56
+ <span class="Polaris-Text--root Polaris-Text--headingSm">${Ct(s.message)}</span>
57
+ <ul class="Polaris-List">
58
+ <li class="Polaris-List__Item">${Ct(s.code)}</li>
59
+ </ul>
60
+ </div>`).join("")}
61
+ </div>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </body>
69
+ </html>`}m();m();var Rs=/<head(\s[^>]*)?>/i,Ne="https://cdn.shopify.com/storefront",Ss=`${Ne}/standard-events.js`,Fs=`${Ne}/standard-events.dev.js`,Ht=`${Ne}/standard-events-inspector.js`,Ot="shopify-cli-standard-events-inspector",Ps=new RegExp(`<script\\b[^>]*(?:\\bid=["']${Oe(Ot)}["']|\\bsrc=["']${Oe(Ht)}["'])[^>]*>`,"i"),vs=new RegExp(Oe(Ss),"g");function he(e){return Ps.test(e)?e:e.replace(Rs,t=>`${t}<script id="${Ot}" src="${Ht}" defer></script>`)}function Nt(e){return e.replace(vs,Fs)}function Oe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}m();var Dt=80;function K(e,t,s){if(!$s(e)||s.type==="theme-extension")return;let n=e.path.length>Dt?`${e.path.substring(0,Dt)}...`:e.path,o=t.headers.get("server-timing")?.match(/cfRequestDuration;dur=([\d.]+)/)?.[1],i=o?`${Math.round(Number(o))}ms`:"",a=bs(t.status),u=e.method.padStart(6);ie(oe`• ${ce.format(new Date)} Request ${C.raw("\xBB")} ${u} ${a(String(t.status))} ${n} ${C.gray(i)}`)}function $s(e){let t=[V,Y,"/checkouts","/payments"],s=[".js",".css",".json",".map"];if(t.some(o=>e.path.startsWith(o)))return!1;let[n]=e.path.split("?"),r=H(n);return!s.includes(r)}function bs(e){return e<300?C.green:e<400?C.yellow:C.errorText}var Y="/cdn/",V="/ext/cdn/",De="/api/collect",ks=/^\/cart\//,Is=/^\/cart(\/|\.js|\.json|$)/,ge=/^\/checkouts\/(?!internal\/)/,Wt=/^\/account(\/login\/multipass(\/[^/]+)?|\/logout)?\/?$/,_s=new RegExp(`^${Y}`),Ls=new RegExp(`^${V}`),qs=/^\/api\/(unstable|\d{4}-\d{2})\/graphql\.json/,js=["/.well-known","/shopify/monorail","/mini-profiler-resources","/web-pixels-manager","/web-pixels@","/wpm","/services/",De,"/cdn-cgi/challenge-platform"],Mt="_shopify_essential",Cs=new RegExp(`${Mt}=([^;]*)(;|$)`);function Bt(e,t){return I(async s=>{if(js.some(n=>s.path.startsWith(n)))return null;if(As(s)){let n=s.path.split("?")[0]??"";return We(s,t).then(async r=>{if(K(s,r,t),r.ok){let o=n.split("/").at(-1)??"";if(t.localThemeFileSystem.files.has(`assets/${o}.liquid`)){let i=ee(await r.text(),t);return new Response(i,r)}}return r}).catch(async r=>{let{status:o,statusText:i,...a}=N(r,`Failed to proxy request to ${n}`);return o>=500&&!n.endsWith(".js.map")&&L(a),new Response(r.message,{status:o,statusText:i})})}})}function As(e){if(e.method!=="GET"||e.path.match(ks)||e.path.match(ge)||e.path.match(Wt)||e.path.match(_s)||e.path.match(Ls))return!0;let[t]=e.path.split("?"),s=H(t),n=e.headers.get("accept")??"*/*";return s===".html"||n.includes("text/html")?!1:!!s||n!=="*/*"}function Hs(e){let[t]=e.split("?");return!(Is.test(t)||ge.test(t)||Wt.test(t))}function ye(e){return e.session.storeFqdn.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function Os(e){return qs.test(e.path)}function ee(e,t){let s=e,n=`(data-shs-beacon-endpoint=["'])https://${ye(t)}${De}`,r=new RegExp(n,"g");s=s.replace(r,`$1${De}`);let o=new RegExp(`(https?:)?//${ye(t)}${Y}`,"g");s=s.replace(o,Y);let i=/(?:https?:)?\/\/cdn\.shopify\.com\/(.*?\/(assets\/[^?#"'`>\s]+))/g,a=c=>c.startsWith("assets/"),u=new Set([...t.localThemeFileSystem.files.keys()].filter(a)),p=new Set([...t.localThemeExtensionFileSystem.files.keys()].filter(a));return s=s.replace(i,(c,l,f)=>{let w=f&&u.has(f),h=f&&p.has(f)&&l.startsWith("extensions/");return z(f).startsWith("image/")?c:h?`${V}${l}`:w?`${Y}${l}`:c}),t.options.standardEventsDevBundle&&(s=Nt(s)),s}function Ns(e,t){let s=`http://${t.options.host}:${t.options.port}`,n=new RegExp(`data-base-url=["']((?:https?:)?//${ye(t)})[^"']*?["']`,"g");return e.replace(n,(r,o)=>r.replace(o,s))}function Ds(e,t){let s=new RegExp(`Domain=${ye(t)};\\s*`,"gi");return e.map(n=>n.replace(s,""))}async function te(e,t,s,n){let r=zt(e,t,n);if(r.status>=300&&r.status<400)return r;t.headers.get("content-type")?.includes("application/json")||r.headers.set("content-type","text/html; charset=utf-8");let a=await r.text();return a=ee(a,e),a=Ns(a,e),e.options.standardEventsInspector&&(a=he(a)),s&&(a=s(a)??a),new Response(a,r)}var Jt=["connection","keep-alive","proxy-authenticate","proxy-authorization","te","trailer","transfer-encoding","upgrade","expect","content-security-policy","host"];function zt(e,t,s){let n=new Response(t.body,t);n.headers.delete("content-length"),n.headers.delete("content-encoding");for(let a of Jt)n.headers.delete(a);n.headers.delete("access-control-allow-origin"),n.headers.delete("access-control-allow-credentials"),n.headers.delete("access-control-allow-methods"),n.headers.delete("access-control-allow-headers"),n.headers.delete("access-control-expose-headers"),n.headers.delete("access-control-max-age");let r=n.headers.get("Link");r&&n.headers.set("Link",ee(r,e));let o=n.headers.get("Location");o&&n.headers.set("Location",Us(e,o,s));let i=n.headers.getSetCookie();if(i?.length){n.headers.set("Set-Cookie",Ds(i,e).join(","));let a=i.join(",").match(Cs)?.[1];a&&(e.session.sessionCookies[Mt]=a)}return n}function Us(e,t,s){if(!s?.keepExternalRedirects){let i=new URL(t,"https://shopify.dev");return ge.test(i.pathname)?t:Ut(i)}let n=`https://${e.session.storeFqdn}`,r=new URL(t,n),o=r.host===new URL(n).host;return o&&!ge.test(r.pathname)?Ut(r):!o&&t.startsWith("//")?r.href:t}function Ut(e){return e.searchParams.delete("_fd"),e.searchParams.delete("pb"),e.href.replace(e.origin,"")}function Ue(e){let t=dt(e);for(let n of Jt)delete t[n];delete t["upgrade-insecure-requests"];let s=ut(e);return s&&(t["X-Forwarded-For"]=s),t}function We(e,t){let s=e.path.replace(new RegExp(V,"g"),"/"),n=e.path.startsWith(V)?"cdn.shopify.com":t.session.storeFqdn,r=new URL(s,`https://${n}`);if(r.hostname!==n)return Promise.reject(new Error(`Request failed: Hostname mismatch. Expected host: ${n}. Resulting URL hostname: ${r.hostname}`));let o=pt(e),i=Ue(e);return Os(e)||(/\/assets\/[^/]+\.(css|js)$/.test(r.pathname)&&/\?\d+$/.test(r.search)&&(r.search=`?v=${Date.now()}`),r.searchParams.set("_fd","0"),r.searchParams.set("pb","0"),i=Rt({...i,...Tt(),...n===t.session.storeFqdn?t.session.crawlerSignatureHeaders:{},referer:r.origin,Cookie:vt(t.session,{headers:i}),...t.type==="theme"&&Hs(e.path)?{Authorization:`Bearer ${t.session.storefrontToken}`}:{}})),fetch(r,{method:e.method,body:o,duplex:o?"half":void 0,redirect:"manual",headers:i}).then(a=>zt(t,a)).catch(a=>{throw le(j(a),r)})}var Me=0,Ws=5;function Yt(e,t){return I(s=>{let[n="/",r=""]=s.path.split("?");return Bs(s)&&(t.lastRequestedPath=s.path),t.options.errorOverlay!=="silent"&&t.localThemeFileSystem.uploadErrors.size>0?Gt(t,{status:500,statusText:"Internal Server Error"},{title:"Failed to Upload Theme Files",header:"Upload Errors",errors:Array.from(t.localThemeFileSystem.uploadErrors.entries()).map(([i,a])=>({message:i,code:a.join(`
70
+ `)}))}):de(t.session,{method:s.method,path:n,query:[...new URLSearchParams(r)],themeId:String(e.id),sectionId:"",headers:Ue(s),replaceExtensionTemplates:we(t),replaceTemplates:Be(t,n,mt(s,"localization")?.toLowerCase())}).then(async i=>{if(i.status>=400&&i.status<500&&!Ms(s)){let a=await Js(s,t,i);if(a)return K(s,a,t),a}return K(s,i,t),te(t,i,a=>(zs(i,a,String(e.id)),Me=0,Je(a,t)),{keepExternalRedirects:Pt({method:s.method,path:n})})}).catch(async i=>{if(i instanceof Ee&&(v(`Theme ID mismatch: expected ${i.getExpectedThemeId()} but got ${i.getActualThemeId()}; refreshing session...`),D("theme-service:error-page:theme-id-mismatch"),t.session.refresh)){Me++,Me>Ws&&(ct(new k(i.getMessage())),process.exit(1)),await t.session.refresh();let w=new URLSearchParams(r),h=new URLSearchParams([...w].filter(([ke])=>!ke.startsWith("__sfr"))),y=n+(h.toString()?`?${h}`:"");return new Response(null,{status:302,headers:{Location:y}})}let{status:a,statusText:u,cause:p,...c}=N(i,"Failed to render storefront"),[l,...f]=c.headline.split(`
71
+ `);return re(c),Gt(t,{status:a,statusText:u},{title:l,header:l,errors:[{message:[...f,p.message].join("<br>"),code:p.stack?.replace(`${p.message}
72
+ `,"")??""}]})})})}function Gt(e,t,s){let n=Je(At(s),e);return e.options.standardEventsInspector&&(n=he(n)),D("theme-service:error-page:rendered"),new Response(n,{...t,headers:t.headers??{"Content-Type":"text/html; charset=utf-8"}})}function Ms(e){let t=new URLSearchParams(e.path.split("?")[1]);return["section_id","sections","app_block_id"].some(s=>t.has(s))}function Bs(e){return e.headers.get("sec-fetch-mode")==="navigate"}async function Js(e,t,s){v(`Render failed for ${e.path} with ${s.status} (x-request-id: ${s.headers.get("x-request-id")}), trying proxy...`);let n=await We(e,t).catch(r=>new Response(null,N(r)));if(n.status<400)return v(`Proxy status: ${n.status}. Returning proxy response.`),t.options.standardEventsInspector&&(n.headers.get("content-type")??"").includes("text/html")?te(t,n):n;v(`Proxy status: ${n.status}. Returning render error.`)}function zs(e,t,s){let n=t.match(/Shopify\.theme\s*=\s*{[^}]+?"id":\s*"?(\d+)"?(}|,)/)?.[1];if(n&&n!==s)throw new Ee(s,n,e)}var Ee=class extends Error{response;expectedThemeId;actualThemeId;constructor(t,s,n){super([`Theme ID mismatch: expected ${t} but got ${s}.`,`Request ID: ${n.headers.get("x-request-id")}`,`URL: ${n.url}`,"This is likely related to an issue in upstream Shopify APIs.","Please try again in a few minutes and report this issue:","https://community.shopify.dev/c/shopify-cli-libraries/14"].join(`
73
+ `)),this.response=n,this.expectedThemeId=t,this.actualThemeId=s}getMessage(){return this.message}getResponse(){return this.response}getExpectedThemeId(){return this.expectedThemeId}getActualThemeId(){return this.actualThemeId}};m();m();function xe(e,t){let s=new RegExp(`{%-?\\s*${t}\\s*-?%}`),n=new RegExp(`{%-?\\s*end${t}\\s*-?%}`),r=s.exec(e);if(!r)return;let o=r.index+r[0].length;n.lastIndex=o;let i=n.exec(e);if(!i)return;let a=i.index;return e.slice(o,a)}m();function Te(e){let{pathname:t,search:s,searchParams:n}=new URL(e.path,"http://e.c");return{pathname:t,search:s,searchParams:n}}var Gs={stylesheet:new Map,javascript:new Map};function Vt(e,t){return I(async s=>{if(s.method!=="GET")return;if(Zs(s,t))return Qs(s,t);let{file:n,fileKey:r,isUnsynced:o}=Xs(s,t);if(!r)return;let i=z(r);if(i.startsWith("image/")&&s.path.includes("&")&&!o)return;if(ht(s,"X-Local-Asset","true"),!n){o&&M(s,W({statusCode:404,statusMessage:"Not found"}));return}let a=n.value?Buffer.from(ee(n.value,t)):Buffer.from(n.attachment??"","base64");return ae(s,{getContents:()=>a,getMeta:()=>({type:i,size:a.length,mtime:n.stats?.mtime})})})}var Ys=/^(?:\/cdn\/(?!extensions\/).*?)?\/assets\/([^?]+)/,Vs=/^(?:\/(?:ext\/)?cdn\/extensions\/.*?)?\/assets\/([^?]+)/;function Xs(e,t){let s=(n,r)=>{let o=e.path.match(n)?.[1];if(o){let i=x("assets",o),a=r.files.get(i),u=r.unsyncedFileKeys.has(i);if(a||u)return{file:a,isUnsynced:u,fileKey:i}}};return s(Ys,t.localThemeFileSystem)??s(Vs,t.localThemeExtensionFileSystem)??{isUnsynced:!1,fileKey:void 0,file:void 0}}function Zs(e,t){return t.type==="theme"&&e.path.includes("/compiled_assets")}function Qs(e,t){switch(Te(e).pathname.split("/").at(-1)){case"styles.css":return Ks(t,e);case"block-scripts.js":return ze(t,e,"block");case"snippet-scripts.js":return ze(t,e,"snippet");case"scripts.js":return ze(t,e,"section");case void 0:break;default:break}}function Ks(e,t){let s=Re(e,"section"),n=Re(e,"block"),r=Re(e,"snippet"),o=[`/*** GENERATED LOCALLY ***/
74
+ `];for(let[,a]of[...s,...n,...r]){let u=Xt(a,"stylesheet");u&&o.push(u)}let i=o.join(`
75
+ `);return ae(t,{getContents:()=>i,getMeta:()=>({type:"text/css",size:Buffer.byteLength(i),mtime:new Date})})}function ze(e,t,s){let n=Re(e,s),r=`${s}s`,o=[`
76
+ /*** GENERATED LOCALLY ***/
77
+
78
+ (function () {
79
+ var __${r}__ = {};
80
+
81
+ (function () {
82
+ var element = document.getElementById("${r}-script");
83
+ var attribute = element ? element.getAttribute("data-${r}") : "";
84
+ var ${r} = attribute.split(",").filter(Boolean);
85
+
86
+ for (var i = 0; i < ${r}.length; i++) {
87
+ __${r}__[${r}[i]] = true;
88
+ }
89
+ })();`];for(let[a,u]of n){let p=a.split("/").pop()?.replace(".liquid",""),c=Xt(u,"javascript")??"";p&&c&&o.push(`
90
+ (function () {
91
+ if (!__${r}__["${p}"] && !Shopify.designMode) return;
92
+ try {
93
+ ${c}
94
+ } catch (e) {
95
+ console.error(e);
96
+ }
97
+ })();`)}o.push("})();");let i=o.join(`
98
+ `);return ae(t,{getContents:()=>i,getMeta:()=>({type:"text/javascript",size:Buffer.byteLength(i),mtime:new Date})})}function Re(e,t){return[...e.localThemeFileSystem.files.entries()].filter(([s])=>s.endsWith(".liquid")&&s.startsWith(`${t}s/`)).sort(([s],[n])=>s.localeCompare(n))}function Xt(e,t){let s=Gs[t],n=s.get(e.key);if(n?.checksum===e.checksum)return n.content;if(s.delete(e.key),!e.value)return;let r=[`/* ${e.key} */`],o=xe(e.value??"",t)?.trimEnd();if(o&&r.push(o),r.length>1){let i=r.join(`
99
+ `);return s.set(e.key,{checksum:e.checksum,content:i}),i}}m();import*as Zt from"node:os";function en(e,t){let s=new Set,n=`:${t}`,r=e.toLowerCase().trim();if(s.add(`${r}${n}`),["localhost","127.0.0.1","::1","0.0.0.0"].includes(r)&&(s.add(`localhost${n}`),s.add(`127.0.0.1${n}`),s.add(`[::1]${n}`)),r==="0.0.0.0"||r==="::")for(let i of Object.values(Zt.networkInterfaces()))for(let a of i??[]){let u=a.address.toLowerCase().split("%")[0],c=a.family==="IPv6"?`[${u}]`:u;s.add(`${c}${n}`)}return s}function tn(e){if(e)return e.toLowerCase().replace(/\.(?=:\d|$)/,"")}function Qt(e,t){let s=en(e,t);return I(n=>{let r=n.node.req.headers.host,o=tn(r);if(!o||!s.has(o))return M(n,W({statusCode:400,statusMessage:"Bad Request",message:"Invalid Host header"}))})}m();function Kt(){return es()}function Gr(){return es()}function es(){return{root:"",files:new Map,unsyncedFileKeys:new Set,uploadErrors:new Map,ready:()=>Promise.resolve(),delete:async e=>{},read:async e=>"",write:async e=>{},stat:async e=>({mtime:new Date,size:1}),addEventListener:()=>{},startWatcher:async()=>{}}}import{createServer as sn}from"node:http";async function io(e,t){let s=await rn(e,t);return await on(e,s),nn(e,s)}function nn(e,t){let s=Et();s.use(Qt(t.options.host,t.options.port)),s.use(ts(e,t)),s.use(Vt(e,t)),s.use(Bt(e,t)),s.use(Yt(e,t));let n=sn(wt(s));return{dispatch:s.handler.bind(s),start:async()=>new Promise(r=>n.listen({port:t.options.port,host:t.options.host},()=>r({close:async()=>{await Promise.all([new Promise(o=>{n.closeAllConnections(),n.close(o)})])}})))}}async function rn(e,t){let{adminSession:s,storefrontPassword:n,themeExtensionPort:r,themeExtensionDirectory:o,crawlerSignatureHeaders:i}=t,a="127.0.0.1",u=r??9293,p=Kt(),c=jt(o);return await c.ready(),{session:await $t(e.id.toString(),s,void 0,n,i),localThemeFileSystem:p,localThemeExtensionFileSystem:c,directory:o,type:"theme-extension",lastRequestedPath:"",options:{themeEditorSync:!1,noDelete:!1,ignore:[],only:[],host:a,port:u,liveReload:"hot-reload",standardEventsDevBundle:!1,standardEventsInspector:!1,open:!1,errorOverlay:"default"}}}async function on(e,t){let s=t.localThemeExtensionFileSystem,n=({fileKey:r,onContent:o,onSync:i})=>{o(()=>{Se(e,t,i,{type:"update",key:r,payload:{isThemeExtension:!0}})})};return s.addEventListener("add",n),s.addEventListener("change",n),s.ready().then(async()=>s.startWatcher())}function we(e){let t={},s=e.localThemeExtensionFileSystem;for(let n of s.unsyncedFileKeys){let r=s.files.get(n),o=r?.value??r?.attachment;o&&(t[n]=o)}return t}var ve=Ke(xt(),1);import an from"node:events";var Ge=new Map,se=new Map;function ss(e,t){let s=(0,ve.parseJSON)(t,null,!0);if(!s)return;let n=s?.sections;n&&!e.startsWith("locales/")?se.set(e,Object.entries(n||{}).map(([r,{type:o}])=>[o,r])):se.delete(e)}function Ye(e){return!e.startsWith("assets/")&&[".liquid",".json"].includes(H(e))}function Be(e,t,s){let n={},r=/^templates\/.+\.json$/,o=t?`${x("templates",t.replace(/^\//,"").replace(/\.html$/,"")||"index")}.json`:"",i=!!t&&e.localThemeFileSystem.files.has(o),a=/^locales\/.+\.json$/,u=!!s&&(e.localThemeFileSystem.files.has(`locales/${s}.json`)||e.localThemeFileSystem.files.has(`locales/${s}.default.json`));for(let p of e.localThemeFileSystem.unsyncedFileKeys)if(Ye(p)){if(i&&r.test(p)){if(p!==o)continue}else if(a.test(p)){if(u){if(!p.startsWith(`locales/${s}.`))continue}else if(!p.includes(".default."))continue}n[p]=e.localThemeFileSystem.files.get(p)?.value??""}return n}function So(e,t){let s=({fileKey:r,onContent:o,onSync:i})=>{let a=H(r);o(u=>{!pn(r)&&Ye(r)&&a===".json"&&ss(r,u),Se(e,t,i,{type:"update",key:r,payload:dn(r,t)})})},n=({fileKey:r,onSync:o})=>{se.delete(r),Se(e,t,o,{type:"delete",key:r})};return t.localThemeFileSystem.addEventListener("add",s),t.localThemeFileSystem.addEventListener("change",s),t.localThemeFileSystem.addEventListener("unlink",n),t.localThemeFileSystem.ready().then(async()=>{let r=[...t.localThemeFileSystem.files];return Promise.allSettled(r.map(async([o,i])=>{if(o.endsWith(".json")){let a=i.value??await t.localThemeFileSystem.read(o);a&&typeof a=="string"&&ss(o,a)}else o.endsWith(".liquid")&&is(i)}))})}var cn="1",rs=new an;function Pe(e){rs.emit("hot-reload",{...e,version:cn})}function ts(e,t){return I(s=>{let n=s.headers.get("accept")==="text/event-stream",r=Te(s).searchParams;if(n){let o=yt(s);return rs.on("hot-reload",i=>{o.push(JSON.stringify(i)).catch(a=>{L({headline:"Failed to send HotReload event.",body:a.stack})})}),Pe({type:"open",pid:String(process.pid),themeId:String(e.id)}),o.send().then(()=>o.flush())}if(r.has("hr-log")){let o=(0,ve.parseJSON)(r.get("hr-log")??"",null);return o&&(o.headline=`[HotReload] ${o.headline}`,o.type==="error"?re(o):o.type==="warn"?L(o):o.type==="info"?at(o):L({headline:`Unknown HotReload log type: ${o.type}`})),null}if(s.path===os)return _($e()).then(o=>ft(s,o,"application/javascript")).catch(o=>M(s,W({cause:o})));if(r.has("section_id")||r.has("app_block_id")){let o=r.get("section_key")??"",i=r.get("section_id")??"",a=r.get("app_block_id")??"",u=s.path.split("?")[0]??"",p=new URLSearchParams(r);if(p.delete("section_key"),p.delete("section_id"),p.delete("app_block_id"),p.delete("_fd"),p.delete("pb"),i===""&&a==="")return;let c={};if(i){let l=t.localThemeFileSystem.unsyncedFileKeys;if(l.has(o)){let f=t.localThemeFileSystem.files.get(o)?.value;if(!f)return"";c[o]=f}for(let f of l)if(f.endsWith(".json")){for(let[w,h]of se.get(f)??[])if(i.endsWith(`__${h}`)){let y=t.localThemeFileSystem.files.get(f)?.value;y&&(c[f]=y);continue}}}return de(t.session,{method:s.method,path:u??"/",query:[...p.entries()],themeId:String(e.id),sectionId:i,appBlockId:a,replaceTemplates:c,headers:gt(s),replaceExtensionTemplates:we(t)}).then(async l=>{if(!l.ok)throw D("theme-service:hot-reload:section:render-failed"),le(l);return te(t,l)}).catch(async l=>{let{status:f,statusText:w,...h}=N(j(l),"Failed to render section on Hot Reload");return D("theme-service:hot-reload:section:render-error"),a||L(h),new Response(null,{status:f,statusText:w})})}})}var ne=(e,t)=>Pe({themeId:String(e),type:"full",key:t});function Se(e,t,s,n){let r=()=>ne(e.id,n.key);if(t.options.liveReload==="off")return;if(t.options.liveReload==="full-page"){s(r);return}let o=String(e.id);Pe({sync:"local",themeId:o,...n}),s(()=>Pe({sync:"remote",themeId:o,...n}),r)}function ln(e,t){let s=new Set;if(e.endsWith(".json")){let n=t.localThemeFileSystem.files.get(e)?.value;if(n){let r=(0,ve.parseJSON)(n,null,!0)?.sections;for(let o of Object.keys(r??{}))s.add(o)}}else{let n=e.match(/^sections\/(.+)\.liquid$/)?.[1];if(n)for(let[r,o]of se)for(let[i,a]of o)i===n&&s.add(a)}return[...s]}function dn(e,t){let[s]=e.split("/"),n=t.localThemeFileSystem.files.get(e);return{sectionNames:s==="sections"?ln(e,t):[],replaceTemplates:Ye(e)?Be(t):{},updatedFileParts:n&&is(n)}}var Fe="hot-reload-client",un="/cdn/shopifycloud/theme-hot-reload/theme-hot-reload.js",ns=new RegExp(`<script id="${Fe}"[^>]*>[^<]*</script>`),os="/@shopify/theme-hot-reload";function Je(e,t){return t.options.liveReload==="off"?e.replace(ns,""):process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD?e.replace(ns,"").replace(/<\/head>/,`<script id="${Fe}" src="${os}" defer></script></head>`):e.includes(`<script id="${Fe}"`)?e:e.replace(/<\/head>/,`<script id="${Fe}" src="${un}" defer></script></head>`)}function pn(e){return e.startsWith("assets/")}function is(e){if(!(["sections/","snippets/","blocks/"].some(c=>e.key.startsWith(c))&&e.key.endsWith(".liquid")))return;let n={stylesheetTag:!1,javascriptTag:!1,schemaTag:!1,liquid:!1},r={checksum:e.checksum,liquid:"",stylesheetTag:"",javascriptTag:"",schemaTag:""},o=Ge.get(e.key);if(o?.checksum===e.checksum||(Ge.delete(e.key),!e.value))return n;let i=["stylesheet","javascript","schema"],a=c=>c?.replace(/\s+/g," ").trim(),u=e.value,p=(c,l)=>{u=u.replace(l,"");let f=a(l),w=`${c}Tag`;n[w]=!o||f!==o[w],r[w]=f};for(let c of i){let l=xe(e.value??"",c);l&&p(c,l)}return u=a(u.replace(/<!--[\s\S]*?-->/g,"").replace(/{%\s*comment\s*%}[\s\S]*?{%\s*endcomment\s*%}/g,"").replace(/{%\s*doc\s*%}[\s\S]*?{%\s*enddoc\s*%}/g,"")),r.liquid=u,n.liquid=!o||u!==o.liquid,Ge.set(e.key,r),n}m();m();import{lstat as mn}from"node:fs/promises";async function Ve(e){try{return await mn(e),!0}catch(t){if(t instanceof Error&&"code"in t&&(t.code==="ENOENT"||t.code==="ENOTDIR"))return!1;throw t}}async function as(e,t){return e===t||await Ve(e)?e:as(tt(e),t)}function X(e){if(!e||e==="."||e===".."||/[\\/]/.test(e)||/^[a-z]:/i.test(e))throw new k(`Unsafe listing name: ${e}`)}async function P(e,t){let s=t.replace(/\\/g,"/");if(!t||/^[\\/]/.test(t)||/^[a-z]:/i.test(t)||s.split("/").includes(".."))throw new k(`Unsafe theme file key: ${t}`);let n=et(e),r=x(n,s);if(A(n,r)===""||!_e(n,r,{native:!0}))throw new k(`Unsafe theme file key: ${t}`);let o=await as(r,n);try{let i=await qe(n),a=await qe(o);if(!_e(i,a,{native:!0}))throw new k(`Unsafe theme file key: ${t}`)}catch{throw new k(`Unsafe theme file key: ${t}`)}return r}var cs=Ke(xt(),1);function fn(e){return(e.startsWith("templates/")||e.startsWith("sections/"))&&e.endsWith(".json")}async function ls(e,t,s){if(X(t),fn(s)){await P(e,s);let n=await P(e,x("listings",t,s));if(await b(n))return n}}async function ds(e,t){X(t);let s=await P(e,"config/settings_data.json"),n=await _(s,{encoding:"utf8"}),r=(0,cs.parseJSON)(n,null,!0);return r?(r.current=Le(t),JSON.stringify(r,null,2)):n}async function Ho(e,t){X(t);let s=x(e,"listings"),n=x(s,t);if(await Ve(e)&&(await P(e,"listings"),await P(e,x("listings",t))),await b(n))return;let o=[];await b(s)&&(o=await O("*",{cwd:s,onlyDirectories:!0,deep:1}));let i=o.length>0?`Available presets: ${o.map(a=>`"${Le(a)}"`).join(", ")}`:'No presets found under "listings/"';throw new k(`Listing preset "${t}" was not found. ${i}.`,`Add the preset to config/settings_data.json and its corresponding "listings/${t}" folder, or remove the --listing flag to use the default theme settings.`)}import hn from"node:events";import{fileURLToPath as gn}from"node:url";var yn=250,us=["AGENTS.md","DESIGN.md","assets/**/*.*","config/**/*.json","config/styles.css","layout/**/*.liquid","locales/**/*.json","sections/**/*.{liquid,json}","blocks/**/*.liquid","snippets/**/*.liquid","templates/**/*.{liquid,json}","templates/customers/**/*.{liquid,json}"],$={documentationFilesRegex:/^(AGENTS|DESIGN)\.md$/,layoutLiquidRegex:/^layout\/.+\.liquid$/,sectionLiquidRegex:/^sections\/.+\.liquid$/,blockLiquidRegex:/^blocks\/.+\.liquid$/,configSchemaRegex:/^config\/settings_schema\.json$/,configDataRegex:/^config\/settings_data\.json$/,configStylesheetRegex:/^config\/styles\.css$/,sectionJsonRegex:/^sections\/.+\.json$/,templateJsonRegex:/^templates\/.+\.json$/,jsonRegex:/^(?!config\/).*\.json$/,contextualizedJsonRegex:/\.context\.[^.]+\.json$/i,staticAssetRegex:/^assets\/(?!.*\.liquid$)/};function ni(e,t){t?.listing!==void 0&&X(t.listing);let s=new Map,n=new Map,r=new Set,o={ignoreFromFile:[],ignore:t?.filters?.ignore??[],only:t?.filters?.only??[]},i=new hn,a=(d,E)=>{i.emit(d,E)},u=t?.notify?new pe(t.notify):void 0,p=async d=>{let E=t?.listing?await wn(e,d,t.listing):await fe(e,d),g=me(d,E);return s.set(d,J({key:d,checksum:g,value:typeof E=="string"?E:"",attachment:Buffer.isBuffer(E)?E.toString("base64"):""})),E},c=O(us,{cwd:e,deep:3,ignore:B}).then(async d=>{o.ignoreFromFile.push(...await _t(e));let E=ue(d.map(g=>({key:g})),o);await Promise.all(E.map(({key:g})=>p(g)))}),l=d=>A(e,d),f=d=>ue([{key:d}],o).length===0;function w(d,E,g,T){if(process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&T===$e()){ne(E,T);return}let S=l(T);if(t?.listing&&S.startsWith(`listings/${t.listing}/`)){let R=S.replace(`listings/${t.listing}/`,"");if(R.startsWith("templates/")||R.startsWith("sections/"))S=R;else return}h(S).then(()=>{switch(d){case"add":case"change":return y(d,E,g,S);case"unlink":return ke(E,g,S,n)}}).catch(R=>{U(`Error handling file event for ${S}: ${R}`)})}function h(d){return u?.notify(d)??Promise.resolve()}let y=(d,E,g,T)=>{if(f(T))return;let S=s.get(T)?.checksum,R=p(T).then(async()=>{let F=s.get(T);if(F)return F.checksum!==S&&r.add(T),{value:F.value||void 0,attachment:F.attachment}}),q=R.then(F=>{if(F)return En(r,n,T,E,g)(F)}).catch(Ae(T,"upload"));a(d,{fileKey:T,onContent:F=>{R.then(Z=>{r.has(T)&&F(Z?.value??Z?.attachment??"")}).catch(()=>{})},onSync:(F,Z)=>{q.then(Q=>{Q?F():Z?.()}).catch(()=>{})}})},ke=(d,E,g,T)=>{if(f(g))return;T.delete(g),s.delete(g),r.add(g);let S=t?.noDelete?Promise.resolve():St(Number(d),[g],E).then(async R=>{if(!R[0]?.success)throw new Error(`Failed to delete file "${g}" from remote theme.`);return r.delete(g),ps("delete",g),!0}).catch(R=>(Ae(g,"delete")(R),!1));a("unlink",{fileKey:g,onSync:R=>{S.then(q=>{q&&R()}).catch(()=>{})}})},Ie=new Set(us.map(d=>x(e,d.split("/").shift()??"")));return t?.listing&&Ie.add(x(e,"listings",t.listing)),process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&Ie.add($e()),{root:e,files:s,unsyncedFileKeys:r,uploadErrors:n,ready:()=>c,delete:async d=>{await P(e,d),s.delete(d),await xn(e,d)},write:async d=>{await P(e,d.key);let E=(d.key.startsWith("templates/")||d.key.startsWith("sections/"))&&d.key.endsWith(".json");if(t?.listing&&E){let g=x("listings",t.listing,d.key),T=await P(e,g),S=await b(T);s.set(d.key,J({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),S?await Xe(e,{...d,key:g}):await Xe(e,d);return}s.set(d.key,J({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),await Xe(e,d)},read:p,applyIgnoreFilters:d=>ue(d,o),addEventListener:(d,E)=>{i.on(d,E)},startWatcher:async(d,E)=>{let{default:g}=await import("./chokidar-5RWEYTNQ.js"),T=g.watch([...Ie],{ignored:B,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}),S=new Map,R=(q,F)=>{let Q=`${l(F)}:${q}`,Qe=S.get(Q);Qe&&clearTimeout(Qe);let ms=setTimeout(()=>{S.delete(Q),w(q,d,E,F)},yn);S.set(Q,ms)};T.on("add",R.bind(null,"add")).on("change",R.bind(null,"change")).on("unlink",R.bind(null,"unlink")).on("error",q=>{U(`File watcher error: ${q}`),j("theme-service:file-watcher:error")})}}}function En(e,t,s,n,r){return async o=>{if(!e.has(s))return!1;let[i]=await Ft(Number(n),[{key:s,...o}],r);if(!i?.success){let a=i?.errors?.asset??["Response was not successful."];throw t.set(s,a),ne(n,s),new Error(a.join(`
100
+ `))}return t.delete(s)&&ne(n,s),e.delete(s),ps("update",s),!0}}async function Xe(e,{key:t,attachment:s,value:n}){let r=await P(e,t);if(await Tn(r),s){let o=Buffer.from(s,"base64");await je(r,o,{encoding:"base64"})}else await je(r,n??"")}async function fe(e,t){let s=be(t)?{encoding:"utf8"}:{},n=await P(e,t);if(!await b(n)){v(`File ${n} can't be read because it doesn't exist...`);return}return _(n,s)}async function wn(e,t,s){if(t==="config/settings_data.json")return ds(e,s);let n=await ls(e,s,t);if(n){let r=be(t)?{encoding:"utf8"}:{};return _(n,r)}return fe(e,t)}async function xn(e,t){let s=await P(e,t);if(!await b(s)){v(`File ${s} can't be removed because it doesn't exist...`);return}await ot(s)}function ri(e){let t=[],s=[],n=[],r=[],o=[],i=[],a=[],u=[],p=[],c=[],l=[],f=[],w=[];return e.forEach(h=>{let y=h.key;$.documentationFilesRegex.test(y)?w.push(h):y.endsWith(".liquid")?$.sectionLiquidRegex.test(y)?t.push(h):$.blockLiquidRegex.test(y)?l.push(h):$.layoutLiquidRegex.test(y)?f.push(h):s.push(h):$.configSchemaRegex.test(y)?a.push(h):$.configDataRegex.test(y)?u.push(h):$.configStylesheetRegex.test(y)?p.push(h):$.jsonRegex.test(y)?$.contextualizedJsonRegex.test(y)?i.push(h):$.sectionJsonRegex.test(y)?n.push(h):$.templateJsonRegex.test(y)?r.push(h):o.push(h):$.staticAssetRegex.test(y)&&c.push(h)}),{sectionLiquidFiles:t,otherLiquidFiles:s,sectionJsonFiles:n,templateJsonFiles:r,contextualizedJsonFiles:i,otherJsonFiles:o,configSchemaFile:a,configDataFile:u,configStylesheetFiles:p,staticAssetFiles:c,blockLiquidFiles:l,layoutFiles:f,documentationFiles:w}}function be(e){return bt({liquid:"application/liquid",sass:"text/x-sass",scss:"text/x-scss"}),["application/javascript","application/json","application/liquid","text/css","text/x-sass","text/x-scss","image/svg+xml","text/markdown"].includes(z(e))}async function oi(e){let t=new Set(await O("*",{cwd:e,deep:1,onlyDirectories:!0}));return["config","layout","templates"].every(n=>t.has(n))}async function Tn(e){let t=Rn(e);await b(t)||await rt(t)}function Rn(e){let t=st(e),s=e.lastIndexOf(t);return e.substring(0,s)}function ps(e,t){ie(oe`• ${ce.format(new Date)} Synced ${C.raw("\xBB")} ${e} ${t}`)}function $e(){let e=process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD;return!e||e==="true"?x(gn(import.meta.url.split("/cli/")[0]??""),"theme-hot-reload/dist/theme-hot-reload.js"):e}function me(e,t){return t?Buffer.isBuffer(t)?Ze(t):vn(e)?Sn(t):Fn(e,t):""}function Sn(e){let t=e;return t=t.replace(/\r\n/g,`
101
+ `),t=t.replace(/\/\*[\s\S]*?\*\//,""),t=Pn(t),Ze(t)}function Fn(e,t){let s=t;return be(e)&&(s=s.replace(/\r\n/g,`
102
+ `)),Ze(s)}function Pn(e){let t=!1,s=!1,n="";for(let r of e)r==='"'&&!s&&(t=!t),!(!t&&(r===" "||r===`
103
+ `))&&(n+=r,s=r==="\\"&&!s);return n}function Ze(e){let t=Buffer.isBuffer(e)?e:Buffer.from(e);return it(t)}function di(e){let t=new Set(e.filter(({key:s})=>s.startsWith("assets/")&&s.endsWith(".liquid")).map(({key:s})=>s));return e.filter(({key:s})=>s.startsWith("assets/")?!t.has(`${s}.liquid`):!0)}function vn(e){return e.endsWith("/settings_data.json")}export{di as a,Bt as b,Yt as c,Vt as d,Qt as e,Gr as f,io as g,So as h,ts as i,ne as j,ls as k,Ho as l,ni as m,ri as n,oi as o};
@@ -1,4 +1,4 @@
1
- import{a as uo,e as fo,f as po}from"./chunk-XM7YUXTF.js";import{a as ho}from"./chunk-7UOA4DI7.js";import{c as mo,i as go,o as Ur}from"./chunk-YLQ3LNNY.js";import{b as et}from"./chunk-ZQDDRIBA.js";import{Da as oo,M as Yt,O as Jt,R as Wt,ha as Bt,l as qt,la as zt,u as je}from"./chunk-H4V55Y3Z.js";import{B as eo,D as to,l as Kt,m as Xt,p as Zt,x as Ze}from"./chunk-IUP7POIE.js";import{b as lo,c as ce}from"./chunk-Q2SZCZE7.js";import{A as ie,B as Y,D as no,E as G,F as M,I as io,K as se,N as so,z as q}from"./chunk-CZ22VZDA.js";import{a as Mt,c as Vt}from"./chunk-J6TW43TG.js";import{o as Ht}from"./chunk-335BUVBP.js";import{a as re}from"./chunk-BN7ZXAZJ.js";import{h as p,k as Fe}from"./chunk-2VSNFOKD.js";import{Ba as Xe,Bb as I,Da as _e,Sa as w,T as jt,Va as Dt,W as Ft,Y as Nt,_ as Lt,_a as Ut,ib as Qt,la as R,nb as ro,oa as ne,qb as J,rb as ao,sb as ae,ta as C,va as $e,wb as co,xa as Ie,yb as F}from"./chunk-LWCTKI4Z.js";import{i as E}from"./chunk-B4OMIONW.js";import{b as S,h as Gt,j as Te}from"./chunk-FZCGRIOM.js";import{b as ke}from"./chunk-YTUUU33R.js";import{a as Tt}from"./chunk-JD5P5RAJ.js";import{c as g,e as b,f as Q,h as O,i as K,j as Oe,m as Qe,p as Ke}from"./chunk-IWTNUJGY.js";import{b as Dr}from"./chunk-JFBCE4HN.js";import{e as ye,g as l}from"./chunk-VKWPEFWQ.js";l();import{createRequire as Hr}from"node:module";import{pathToFileURL as yo}from"node:url";var wo=Hr(import.meta.url);async function So(e){let t;try{t=wo.resolve("vite",process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[e]})}catch(s){throw s instanceof Error&&s.code==="MODULE_NOT_FOUND"?new p("Could not find the 'vite' package in your project.","Hydrogen uses Vite to run this command.",["Run this command from the root directory of your Hydrogen app.","Install your project dependencies (for example, by running `npm install`) and try again."]):s}let o=await eo(t),r=o.content.exports?.["."];typeof r!="string"&&(r=r?.import),typeof r!="string"&&(r=r.default);let n=g(O(o.path),r);return import(yo(n).href)}function Gr(e,t){let o=wo.resolve(e,process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[t]});return import(yo(o).href)}l();l();import{isAbsolute as Mr,resolve as Vr}from"node:path";var Pi=S.string().refine(Mr,"Expected an absolute native filesystem path").transform(e=>Vr(e)),vo=S.string().datetime({precision:0}),we=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefront\/\d+$/).describe("A Shopify HydrogenStorefront GID."),Ei=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefrontEnvironment\/\d+$/).describe("A Shopify HydrogenStorefrontEnvironment GID."),bo=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefrontDeployment\/\d+$/).describe("A Shopify HydrogenStorefrontDeployment GID."),xo=S.enum(["success","partial","skipped","cancelled"]),tt=S.string().regex(/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/).nullable();function Po(e){return new Date(e).toISOString().replace(/\.\d{3}Z$/,"Z")}function Ne(e){let t=e?.toLowerCase();return t&&/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/.test(t)?t:null}l();import{format as qr}from"node:util";async function Eo(e){if(!X())return e();let t={log:console.log,info:console.info,debug:console.debug},o={...t};for(let r of["log","info","debug"])o[r]=(...n)=>{X()?Mt(["--json"],()=>F(qr(...n))):t[r](...n)},console[r]=o[r];try{return await e()}finally{for(let r of["log","info","debug"])console[r]===o[r]&&(console[r]=t[r])}}function X(){return Te()==="json"||Ht()}function Le(e,t,o=X()){return o?(co(e.encode(t)),!0):!1}l();var Co=S.object({gid:bo,createdAt:vo,commitMessage:S.string().nullable()}).strict(),ot=S.object({gid:we,name:S.string(),productionUrl:S.string().url().nullable()}).strict().describe("All projected fields are present; unavailable productionUrl is null."),Ro=ot.extend({currentProductionDeployment:Co.nullable()}).strict();function rt(e){return{gid:e.id,name:e.title,productionUrl:e.productionUrl||null}}function Ni({shop:e,storefronts:t}){return{storeDomain:Ne(e),storefronts:t.map(o=>({...rt(o),currentProductionDeployment:o.currentProductionDeployment?{gid:o.currentProductionDeployment.id,createdAt:Po(o.currentProductionDeployment.createdAt),commitMessage:o.currentProductionDeployment.commitMessage??null}:null}))}}var Li=re({name:"HydrogenListResult",schema:S.object({storeDomain:tt,storefronts:S.array(Ro)}).strict().describe("The complete list of Hydrogen storefronts for the store."),definitions:{Storefront:Ro,Deployment:Co}}),nt=re({name:"HydrogenLinkResult",schema:S.object({status:xo,changed:S.boolean(),storeDomain:tt,storefront:ot.nullable()}).strict(),definitions:{Storefront:ot}}),Di=re({name:"HydrogenUnlinkResult",schema:S.object({status:S.literal("success"),changed:S.boolean(),storefront:S.object({gid:we,name:S.string()}).strict().nullable()}).strict()});var We=ye(ke(),1);l();var $o=ye(ke(),1);l();import{createRequire as Ao}from"node:module";function ko({id:e,projectPath:t}){if(!(!e||!Yr(t,e)))throw new p(`\`shopify ${e.replace(/:/g," ")}\` is not supported by this version of Hydrogen`,"The installed version of @shopify/hydrogen disables this command.",["Use your framework or package tooling instead."])}function Yr(e,t){try{let n=Ao(g(e,"package.json"))("@shopify/hydrogen/package.json")?.shopify?.cli?.disabledCommands;return Array.isArray(n)&&n.includes(t)}catch{return!1}}function Oo(e){try{let o=Ao(import.meta.url)(g(e,"package.json"));return[o?.dependencies,o?.devDependencies,o?.peerDependencies].some(r=>!!r?.["@shopify/hydrogen"])}catch{return!1}}var le=class extends et{static baseFlags={...et.baseFlags,...lo};async _run(){let t=()=>Eo(()=>super._run()),{flags:o}=await $o.Parser.parse([],{flags:ce});return o.json&&(process.env.SHOPIFY_FLAG_JSON="true"),o.json&&Te()!=="json"?Gt({outputMode:"json",sink:Vt},t):t()}async init(){if(await super.init(),!this.id?.startsWith("hydrogen:")||this.id==="hydrogen:init")return;let t=this.argv.indexOf("--"),o=t<0?this.argv:this.argv.slice(0,t);if(o.some(i=>["--help","-h","--json-schema"].includes(i))||Tt(process.env.SHOPIFY_FLAG_JSON_SCHEMA))return;let r=o.findIndex(i=>/^--path($|=)/.test(i)),n=r<0?process.env.SHOPIFY_HYDROGEN_FLAG_PATH:o[r]?.startsWith("--path=")?o[r].slice(7):o[r+1],s=n&&!n.startsWith("--")?b(Ke(),n):Ke();if(!Oo(s))throw new p("Looks like you're trying to run a Hydrogen command outside of a Hydrogen project.","Run `shopify hydrogen init` to create a new Hydrogen project or use the `--path` flag to specify an existing Hydrogen project.");ko({id:this.id,projectPath:s})}};l();var A=ye(ke(),1);l();l();l();import{fileURLToPath as Io}from"node:url";import{existsSync as Br}from"node:fs";l();import{exec as Jr}from"node:child_process";import{promisify as Wr}from"node:util";var D=Wr(Jr);function ns(){let e=process.listeners("warning")[0];e&&(process.removeAllListeners("warning"),process.prependListener("warning",t=>{t.name!="ExperimentalWarning"&&e(t)}))}var st=new URL("../../..",import.meta.url).pathname,Se=(()=>{try{let e=g(O(st),"templates","skeleton");return Br(e)}catch{return!1}})(),ms=Se?st:void 0,zr="assets/hydrogen",Qr="starter",Z="routes",it;async function Kr(){if(it??=await Ut("package.json",{cwd:Io(import.meta.url),type:"file"}),!it)throw new p("Could not find assets directory","Please report this error.");return it}async function U(e,...t){return g(O(await Kr()),process.env.SHOPIFY_UNIT_TEST?"assets":`dist/${zr}`,e??"",...t)}async function ve(e,t){t??=await at();let o=new URL(`${t}/app${e?`/${e}`:""}`,import.meta.url);return o.protocol==="file:"?Io(o):o.toString()}function at(e=!!process.env.SHOPIFY_UNIT_TEST){return e?De():U(Qr)}function De(){if(!Se)throw new p("Trying to use skeleton source dir outside of Hydrogen monorepo.","Please report this error.");return g(O(st),"templates","skeleton")}function Xr(){return g(De(),"node_modules")}async function _o(){if(Se)return Xr();let{stdout:e}=await D("npm root");return e.trim()}var ct=["tailwind","vanilla-extract","css-modules","postcss"];async function To(e,t,o,r=(n,s)=>n){let n=await U(e);return Promise.all(Object.entries(t).map(async([s,i])=>{let a=await R(g(n,s));await C(g(o,i),r(a,s))}))}async function jo(e,t,o){let r=Object.values(e).map(s=>w(g(t,s)).then(i=>i?s:null)),n=(await Promise.all(r)).filter(Boolean);return!(n.length>0&&!o&&!await M({message:`Some files already exist (${n.join(", ")}). Overwrite?`,defaultValue:!1}))}l();l();import{readdir as Zr}from"node:fs/promises";l();Ur();import*as Fo from"fs/promises";import*as No from"path";var lt={arrowParens:"always",singleQuote:!0,bracketSpacing:!1,trailingComma:"all"};async function V(e=process.cwd()){let t=(await Fo.lstat(e)).isFile()?e:No.resolve(e,"prettier.file");try{return await mo(t)||lt}catch{return lt}}async function ee(e,t=lt,o=""){let r=Oe(o);return go(e,{parser:r===".tsx"||r===".ts"?"typescript":"babel",...t})}async function ue(e,t,o){let r=await o(await R(e));if(typeof r=="string")return t&&(r=await ee(r,t,e)),C(e,r)}var en=["tsx","ts","jsx","js","mjs","cjs"];async function T(e,t,o=en){let r=await Zr(e);if(r.includes(t)){let n=b(e,t);if(!await _e(n))return{filepath:n};for(let s of["ts","js"]){let i=b(e,`${t}/index.${s}`);if(await w(b(e,i)))return{filepath:i,extension:s,astType:s}}}else for(let n of o){let s=`${t}.${n}`;if(r.includes(s)){let i=n==="mjs"||n==="cjs"?"js":n;return{filepath:b(e,s),extension:n,astType:i}}}return{}}var Lo=Object.freeze(["dependencies","devDependencies","peerDependencies"]);async function Ue(e,t,o){let r=await Ze(g(t,"package.json")),n=await Ze(g(e,"package.json")),s=new Set(["comment",...o?.ignoredKeys??[]]),i=Object.keys(n).filter(c=>!Lo.includes(c));for(let c of i){if(s.has(c))continue;let u=n[c],f=r[c],m=Array.isArray(u)&&Array.isArray(f)?[...f,...u]:typeof u=="object"&&typeof f=="object"?{...f,...u}:u;r[c]=m}let a=Object.entries(r.dependencies||{}).find(([c])=>c.startsWith("@remix-run/"))?.[1];for(let c of Lo)s.has(c)||n[c]&&(r[c]=[...new Set([...Object.keys(r[c]??{}),...Object.keys(n[c]??{})])].sort().reduce((u,f)=>{let m=n[c]?.[f]??r[c]?.[f];return f.startsWith("@remix-run/")&&a&&(m=a),u[f]=m,u},{}));await to(t,o?.onResult?.(r)??r)}l();l();async function be(e){let t=await import("@ast-grep/napi");if(!(e in t))throw new Error(`Wrong language for AST: ${e}`);return t[e]}async function Do(e,t,o){let{filepath:r,astType:n}=await T(e,"root");if(!r||!n)throw new p(`Could not find root file in ${e}`);await ue(r,t,async s=>{let i=`import ${o.isDefault?o.name:`{${o.name}}`} from '${(o.isAbsolute?"":"./")+o.path}';`;if(s.includes(i.split("from")[0]))return;let c=(await be(n)).parse(s).root(),u=c.findAll({rule:{kind:"import_statement"}}).reverse(),f=u.find(v=>v.text().includes(".css"))||u.shift(),m=c.find({rule:{kind:"jsx_element",regex:"resetStyles",has:{kind:"jsx_opening_element",has:{kind:"identifier",pattern:"link"}}}});if(!f||!m)throw new p('Could not find a "links" export in root file. Please add one and try again.');let d=f.text(),h=m.text(),x=o.isConditional?`{${o.name} && <link rel="stylesheet" href={${o.name}}></link>}`:`<link rel="stylesheet" href={${o.name}}></link>`;return s.replace(d,d+`
1
+ import{a as uo,e as fo,f as po}from"./chunk-PTSCGSQV.js";import{a as ho}from"./chunk-6ES4KRFW.js";import{c as mo,i as go,o as Ur}from"./chunk-YLQ3LNNY.js";import{b as et}from"./chunk-ZJOX5HW4.js";import{Da as oo,M as Yt,O as Jt,R as Wt,ha as Bt,l as qt,la as zt,u as je}from"./chunk-GQLNG537.js";import{B as eo,D as to,l as Kt,m as Xt,p as Zt,x as Ze}from"./chunk-QQJNQNKP.js";import{b as lo,c as ce}from"./chunk-3KM5ZOW2.js";import{A as ie,B as Y,D as no,E as G,F as M,I as io,K as se,N as so,z as q}from"./chunk-D2KIGKBI.js";import{a as Mt,c as Vt}from"./chunk-LEHBZKK3.js";import{o as Ht}from"./chunk-335BUVBP.js";import{a as re}from"./chunk-BN7ZXAZJ.js";import{h as p,k as Fe}from"./chunk-M5VIFG2V.js";import{Ba as Xe,Bb as I,Da as _e,Sa as w,T as jt,Va as Dt,W as Ft,Y as Nt,_ as Lt,_a as Ut,ib as Qt,la as R,nb as ro,oa as ne,qb as J,rb as ao,sb as ae,ta as C,va as $e,wb as co,xa as Ie,yb as F}from"./chunk-JLQRDFR5.js";import{i as E}from"./chunk-B4OMIONW.js";import{b as S,h as Gt,j as Te}from"./chunk-FZCGRIOM.js";import{b as ke}from"./chunk-YTUUU33R.js";import{a as Tt}from"./chunk-JD5P5RAJ.js";import{c as g,e as b,f as Q,h as O,i as K,j as Oe,m as Qe,p as Ke}from"./chunk-IWTNUJGY.js";import{b as Dr}from"./chunk-JFBCE4HN.js";import{e as ye,g as l}from"./chunk-VKWPEFWQ.js";l();import{createRequire as Hr}from"node:module";import{pathToFileURL as yo}from"node:url";var wo=Hr(import.meta.url);async function So(e){let t;try{t=wo.resolve("vite",process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[e]})}catch(s){throw s instanceof Error&&s.code==="MODULE_NOT_FOUND"?new p("Could not find the 'vite' package in your project.","Hydrogen uses Vite to run this command.",["Run this command from the root directory of your Hydrogen app.","Install your project dependencies (for example, by running `npm install`) and try again."]):s}let o=await eo(t),r=o.content.exports?.["."];typeof r!="string"&&(r=r?.import),typeof r!="string"&&(r=r.default);let n=g(O(o.path),r);return import(yo(n).href)}function Gr(e,t){let o=wo.resolve(e,process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[t]});return import(yo(o).href)}l();l();import{isAbsolute as Mr,resolve as Vr}from"node:path";var Pi=S.string().refine(Mr,"Expected an absolute native filesystem path").transform(e=>Vr(e)),vo=S.string().datetime({precision:0}),we=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefront\/\d+$/).describe("A Shopify HydrogenStorefront GID."),Ei=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefrontEnvironment\/\d+$/).describe("A Shopify HydrogenStorefrontEnvironment GID."),bo=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefrontDeployment\/\d+$/).describe("A Shopify HydrogenStorefrontDeployment GID."),xo=S.enum(["success","partial","skipped","cancelled"]),tt=S.string().regex(/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/).nullable();function Po(e){return new Date(e).toISOString().replace(/\.\d{3}Z$/,"Z")}function Ne(e){let t=e?.toLowerCase();return t&&/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/.test(t)?t:null}l();import{format as qr}from"node:util";async function Eo(e){if(!X())return e();let t={log:console.log,info:console.info,debug:console.debug},o={...t};for(let r of["log","info","debug"])o[r]=(...n)=>{X()?Mt(["--json"],()=>F(qr(...n))):t[r](...n)},console[r]=o[r];try{return await e()}finally{for(let r of["log","info","debug"])console[r]===o[r]&&(console[r]=t[r])}}function X(){return Te()==="json"||Ht()}function Le(e,t,o=X()){return o?(co(e.encode(t)),!0):!1}l();var Co=S.object({gid:bo,createdAt:vo,commitMessage:S.string().nullable()}).strict(),ot=S.object({gid:we,name:S.string(),productionUrl:S.string().url().nullable()}).strict().describe("All projected fields are present; unavailable productionUrl is null."),Ro=ot.extend({currentProductionDeployment:Co.nullable()}).strict();function rt(e){return{gid:e.id,name:e.title,productionUrl:e.productionUrl||null}}function Ni({shop:e,storefronts:t}){return{storeDomain:Ne(e),storefronts:t.map(o=>({...rt(o),currentProductionDeployment:o.currentProductionDeployment?{gid:o.currentProductionDeployment.id,createdAt:Po(o.currentProductionDeployment.createdAt),commitMessage:o.currentProductionDeployment.commitMessage??null}:null}))}}var Li=re({name:"HydrogenListResult",schema:S.object({storeDomain:tt,storefronts:S.array(Ro)}).strict().describe("The complete list of Hydrogen storefronts for the store."),definitions:{Storefront:Ro,Deployment:Co}}),nt=re({name:"HydrogenLinkResult",schema:S.object({status:xo,changed:S.boolean(),storeDomain:tt,storefront:ot.nullable()}).strict(),definitions:{Storefront:ot}}),Di=re({name:"HydrogenUnlinkResult",schema:S.object({status:S.literal("success"),changed:S.boolean(),storefront:S.object({gid:we,name:S.string()}).strict().nullable()}).strict()});var We=ye(ke(),1);l();var $o=ye(ke(),1);l();import{createRequire as Ao}from"node:module";function ko({id:e,projectPath:t}){if(!(!e||!Yr(t,e)))throw new p(`\`shopify ${e.replace(/:/g," ")}\` is not supported by this version of Hydrogen`,"The installed version of @shopify/hydrogen disables this command.",["Use your framework or package tooling instead."])}function Yr(e,t){try{let n=Ao(g(e,"package.json"))("@shopify/hydrogen/package.json")?.shopify?.cli?.disabledCommands;return Array.isArray(n)&&n.includes(t)}catch{return!1}}function Oo(e){try{let o=Ao(import.meta.url)(g(e,"package.json"));return[o?.dependencies,o?.devDependencies,o?.peerDependencies].some(r=>!!r?.["@shopify/hydrogen"])}catch{return!1}}var le=class extends et{static baseFlags={...et.baseFlags,...lo};async _run(){let t=()=>Eo(()=>super._run()),{flags:o}=await $o.Parser.parse([],{flags:ce});return o.json&&(process.env.SHOPIFY_FLAG_JSON="true"),o.json&&Te()!=="json"?Gt({outputMode:"json",sink:Vt},t):t()}async init(){if(await super.init(),!this.id?.startsWith("hydrogen:")||this.id==="hydrogen:init")return;let t=this.argv.indexOf("--"),o=t<0?this.argv:this.argv.slice(0,t);if(o.some(i=>["--help","-h","--json-schema"].includes(i))||Tt(process.env.SHOPIFY_FLAG_JSON_SCHEMA))return;let r=o.findIndex(i=>/^--path($|=)/.test(i)),n=r<0?process.env.SHOPIFY_HYDROGEN_FLAG_PATH:o[r]?.startsWith("--path=")?o[r].slice(7):o[r+1],s=n&&!n.startsWith("--")?b(Ke(),n):Ke();if(!Oo(s))throw new p("Looks like you're trying to run a Hydrogen command outside of a Hydrogen project.","Run `shopify hydrogen init` to create a new Hydrogen project or use the `--path` flag to specify an existing Hydrogen project.");ko({id:this.id,projectPath:s})}};l();var A=ye(ke(),1);l();l();l();import{fileURLToPath as Io}from"node:url";import{existsSync as Br}from"node:fs";l();import{exec as Jr}from"node:child_process";import{promisify as Wr}from"node:util";var D=Wr(Jr);function ns(){let e=process.listeners("warning")[0];e&&(process.removeAllListeners("warning"),process.prependListener("warning",t=>{t.name!="ExperimentalWarning"&&e(t)}))}var st=new URL("../../..",import.meta.url).pathname,Se=(()=>{try{let e=g(O(st),"templates","skeleton");return Br(e)}catch{return!1}})(),ms=Se?st:void 0,zr="assets/hydrogen",Qr="starter",Z="routes",it;async function Kr(){if(it??=await Ut("package.json",{cwd:Io(import.meta.url),type:"file"}),!it)throw new p("Could not find assets directory","Please report this error.");return it}async function U(e,...t){return g(O(await Kr()),process.env.SHOPIFY_UNIT_TEST?"assets":`dist/${zr}`,e??"",...t)}async function ve(e,t){t??=await at();let o=new URL(`${t}/app${e?`/${e}`:""}`,import.meta.url);return o.protocol==="file:"?Io(o):o.toString()}function at(e=!!process.env.SHOPIFY_UNIT_TEST){return e?De():U(Qr)}function De(){if(!Se)throw new p("Trying to use skeleton source dir outside of Hydrogen monorepo.","Please report this error.");return g(O(st),"templates","skeleton")}function Xr(){return g(De(),"node_modules")}async function _o(){if(Se)return Xr();let{stdout:e}=await D("npm root");return e.trim()}var ct=["tailwind","vanilla-extract","css-modules","postcss"];async function To(e,t,o,r=(n,s)=>n){let n=await U(e);return Promise.all(Object.entries(t).map(async([s,i])=>{let a=await R(g(n,s));await C(g(o,i),r(a,s))}))}async function jo(e,t,o){let r=Object.values(e).map(s=>w(g(t,s)).then(i=>i?s:null)),n=(await Promise.all(r)).filter(Boolean);return!(n.length>0&&!o&&!await M({message:`Some files already exist (${n.join(", ")}). Overwrite?`,defaultValue:!1}))}l();l();import{readdir as Zr}from"node:fs/promises";l();Ur();import*as Fo from"fs/promises";import*as No from"path";var lt={arrowParens:"always",singleQuote:!0,bracketSpacing:!1,trailingComma:"all"};async function V(e=process.cwd()){let t=(await Fo.lstat(e)).isFile()?e:No.resolve(e,"prettier.file");try{return await mo(t)||lt}catch{return lt}}async function ee(e,t=lt,o=""){let r=Oe(o);return go(e,{parser:r===".tsx"||r===".ts"?"typescript":"babel",...t})}async function ue(e,t,o){let r=await o(await R(e));if(typeof r=="string")return t&&(r=await ee(r,t,e)),C(e,r)}var en=["tsx","ts","jsx","js","mjs","cjs"];async function T(e,t,o=en){let r=await Zr(e);if(r.includes(t)){let n=b(e,t);if(!await _e(n))return{filepath:n};for(let s of["ts","js"]){let i=b(e,`${t}/index.${s}`);if(await w(b(e,i)))return{filepath:i,extension:s,astType:s}}}else for(let n of o){let s=`${t}.${n}`;if(r.includes(s)){let i=n==="mjs"||n==="cjs"?"js":n;return{filepath:b(e,s),extension:n,astType:i}}}return{}}var Lo=Object.freeze(["dependencies","devDependencies","peerDependencies"]);async function Ue(e,t,o){let r=await Ze(g(t,"package.json")),n=await Ze(g(e,"package.json")),s=new Set(["comment",...o?.ignoredKeys??[]]),i=Object.keys(n).filter(c=>!Lo.includes(c));for(let c of i){if(s.has(c))continue;let u=n[c],f=r[c],m=Array.isArray(u)&&Array.isArray(f)?[...f,...u]:typeof u=="object"&&typeof f=="object"?{...f,...u}:u;r[c]=m}let a=Object.entries(r.dependencies||{}).find(([c])=>c.startsWith("@remix-run/"))?.[1];for(let c of Lo)s.has(c)||n[c]&&(r[c]=[...new Set([...Object.keys(r[c]??{}),...Object.keys(n[c]??{})])].sort().reduce((u,f)=>{let m=n[c]?.[f]??r[c]?.[f];return f.startsWith("@remix-run/")&&a&&(m=a),u[f]=m,u},{}));await to(t,o?.onResult?.(r)??r)}l();l();async function be(e){let t=await import("@ast-grep/napi");if(!(e in t))throw new Error(`Wrong language for AST: ${e}`);return t[e]}async function Do(e,t,o){let{filepath:r,astType:n}=await T(e,"root");if(!r||!n)throw new p(`Could not find root file in ${e}`);await ue(r,t,async s=>{let i=`import ${o.isDefault?o.name:`{${o.name}}`} from '${(o.isAbsolute?"":"./")+o.path}';`;if(s.includes(i.split("from")[0]))return;let c=(await be(n)).parse(s).root(),u=c.findAll({rule:{kind:"import_statement"}}).reverse(),f=u.find(v=>v.text().includes(".css"))||u.shift(),m=c.find({rule:{kind:"jsx_element",regex:"resetStyles",has:{kind:"jsx_opening_element",has:{kind:"identifier",pattern:"link"}}}});if(!f||!m)throw new p('Could not find a "links" export in root file. Please add one and try again.');let d=f.text(),h=m.text(),x=o.isConditional?`{${o.name} && <link rel="stylesheet" href={${o.name}}></link>}`:`<link rel="stylesheet" href={${o.name}}></link>`;return s.replace(d,d+`
2
2
  `+i).replace(h,x+`
3
3
  `+h)})}async function He(e,t,o,r){let{filepath:n,astType:s}=await T(e,"vite.config");if(!n||!s)throw new p(`Could not find vite.config file in ${e}`);await ue(n,t,async i=>{let a=`import ${o.isDefault?o.name:`{${o.name}}`} from '${o.path}';`;if(new RegExp(`['"]${o.path.replace("/","\\/")}['"]`).test(i))return;let u=(await be(s)).parse(i).root(),f=u.findAll({rule:{kind:"import_statement"}}).pop(),m=u.find(tn);if(!f||!m)throw new p('Could not find a "plugins" key in Vite config file. Please add one and try again.');let d=f.text(),h=m.text(),x=`${o.name}(${r?JSON.stringify(r):""})`;return i.replace(d,d+`
4
4
  `+a).replace(h,h.replace("[",`[${x},`))})}var tn={rule:{pattern:"[$$$]",inside:{kind:"pair",stopBy:"neighbor",has:{field:"key",regex:"^plugins$",stopBy:"neighbor"},inside:{kind:"object",stopBy:"neighbor",all:[{inside:{kind:"export_statement",regex:"export default",stopBy:"end"}},{not:{inside:{kind:"object",stopBy:"end"}}}]}}}};var Uo="styles/tailwind.css";async function Ho({rootDirectory:e,appDirectory:t},o=!1){let r=Q(e,t),n={"tailwind.css":g(r,Uo)};if(!await jo(n,e,o)){F("Skipping CSS setup as some files already exist. You may use `--force` or `-f` to override it.");return}return{workPromise:Promise.all([Ue(await U("tailwind"),e),To("tailwind",n,e),V(e).then(i=>Promise.all([Do(t,i,{name:"tailwindCss",path:`${Uo}?url`,isDefault:!0}),He(e,i,{name:"tailwindcss",path:"@tailwindcss/vite",isDefault:!0})]))]),generatedAssets:Object.values(n),needsInstallDeps:!0}}l();async function Go({rootDirectory:e}){return{workPromise:Promise.all([Ue(await U("vanilla-extract"),e),V(e).then(o=>He(e,o,{path:"@vanilla-extract/vite-plugin",name:"vanillaExtractPlugin",isDefault:!1}))]),generatedAssets:[],needsInstallDeps:!0}}var ut=[...ct,"none"],ft={tailwind:"Tailwind v4","vanilla-extract":"Vanilla Extract","css-modules":"CSS Modules",postcss:"PostCSS"},ia={postcss:"https://vitejs.dev/guide/features.html#postcss","css-modules":"https://vitejs.dev/guide/features.html#css-modules","vanilla-extract":"https://vanilla-extract.style/documentation/styling/",tailwind:"https://tailwindcss.com/docs/configuration"};function Mo(e,t,o){switch(e){case"tailwind":return Ho(t,o);case"vanilla-extract":return Go(t);case"postcss":case"css-modules":return{workPromise:Promise.resolve(),generatedAssets:[],needsInstallDeps:!1};default:throw new Error("Unknown strategy")}}async function Vo(e){let t=Object.entries({...ft,...e?.extraChoices});return G({message:"Select a styling library",...e,choices:t.map(([o,r])=>({value:o,label:r})),defaultValue:"tailwind"})}l();l();l();l();async function te(e,t,o=!0){let{transpileTs:r}=await import("./morph-CRY35DIK.js");return r(e,t,o)}l();var qo={checkJs:!1,target:"ES2022",module:"ES2022",moduleResolution:"bundler",baseUrl:".",paths:{"~/*":["app/*"]}},on=new Set(["noLib","target","module","moduleResolution","checkJs","experimentalDecorators","allowSyntheticDefaultImports","baseUrl","paths",...Object.keys(qo)]);function rn(e,t=!1){let o={compilerOptions:{...qo}};if(e.include&&(o.include=e.include.filter(r=>t||!r.endsWith(".d.ts")).map(r=>r.replace(/(?<!\.d)\.ts(x?)$/,".js$1"))),e.compilerOptions)for(let r of on)e.compilerOptions[r]!==void 0&&(o.compilerOptions[r]=e.compilerOptions[r]);return o}async function pt(e,t=!0){let o=g(e,"app/routes.ts");if(await w(o)){let i=(await R(o)).replace("./layout.tsx","./layout.jsx");await C(o,i)}let r=await Dt("**/*.+(ts|tsx)",{absolute:!0,cwd:e,dot:!0,ignore:["**/node_modules/**"]}),n=await V();for(let s of r){if(s.endsWith(".d.ts")){t||await Ie(s);continue}let i=await R(s),a=await ee(await te(i,s,t),n);await Ie(s),await C(s.replace(/\.ts(x?)$/,".js$1"),a)}try{let s=g(e,"remix.config.js"),i=await R(s);i=i.replace(/\/server\.ts/gim,"/server.js"),await C(s,i)}catch(s){I(`Could not change TS extensions in remix.config.js:
@@ -1 +1 @@
1
- import{i as l,na as d,sa as z,ta as y}from"./chunk-WDFCOZAY.js";import{b as n}from"./chunk-ZQDDRIBA.js";import{b as g,c as f,d as h}from"./chunk-Q2SZCZE7.js";import{H as c}from"./chunk-CZ22VZDA.js";import{a as u}from"./chunk-BN7ZXAZJ.js";import{wb as p}from"./chunk-LWCTKI4Z.js";import{b as o}from"./chunk-FZCGRIOM.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();var L=o.object({id:o.string(),gid:o.string(),name:o.string(),status:o.enum(l),shopCount:o.number().nullable(),url:o.string()}).strict(),r=u({name:"OrganizationListResult",schema:o.object({organizations:o.array(L)}).strict(),definitions:{OrganizationListEntry:L}});function e(s,t){if(t==="json"){p(r.encode(s));return}c({rows:s.organizations.map(a=>({id:a.id,name:a.name})),columns:{id:{header:"ID"},name:{header:"NAME"}}})}i();async function O(){return{organizations:(await y()).map(t=>({id:t.id,gid:d(t.id),name:t.businessName,status:t.status,shopCount:t.shopCount,url:t.url}))}}var m=class s extends n{static baseFlags={...n.baseFlags,...h};static summary="List Shopify organizations you have access to.";static descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs.";static description=this.descriptionForHelp();static flags={...g,...f};static get jsonOutputSchema(){return r}async run(){let{flags:t}=await this.parse(s);try{let a=await O();e(a,t.json?"json":"text")}catch(a){if(t.json&&a instanceof z){e({organizations:[]},"json");return}throw a}}};export{m as a};
1
+ import{j as l,sa as d,xa as z,ya as y}from"./chunk-33ZE3DRQ.js";import{b as n}from"./chunk-ZJOX5HW4.js";import{b as g,c as f,d as h}from"./chunk-3KM5ZOW2.js";import{H as c}from"./chunk-D2KIGKBI.js";import{a as u}from"./chunk-BN7ZXAZJ.js";import{wb as p}from"./chunk-JLQRDFR5.js";import{b as o}from"./chunk-FZCGRIOM.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();var L=o.object({id:o.string(),gid:o.string(),name:o.string(),status:o.enum(l),shopCount:o.number().nullable(),url:o.string()}).strict(),r=u({name:"OrganizationListResult",schema:o.object({organizations:o.array(L)}).strict(),definitions:{OrganizationListEntry:L}});function e(s,t){if(t==="json"){p(r.encode(s));return}c({rows:s.organizations.map(a=>({id:a.id,name:a.name})),columns:{id:{header:"ID"},name:{header:"NAME"}}})}i();async function O(){return{organizations:(await y()).map(t=>({id:t.id,gid:d(t.id),name:t.businessName,status:t.status,shopCount:t.shopCount,url:t.url}))}}var m=class s extends n{static baseFlags={...n.baseFlags,...h};static summary="List Shopify organizations you have access to.";static descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs.";static description=this.descriptionForHelp();static flags={...g,...f};static get jsonOutputSchema(){return r}async run(){let{flags:t}=await this.parse(s);try{let a=await O();e(a,t.json?"json":"text")}catch(a){if(t.json&&a instanceof z){e({organizations:[]},"json");return}throw a}}};export{m as a};
@@ -1,4 +1,4 @@
1
- import{v as xy}from"./chunk-DJAZBPYA.js";import{A as Iy,B as Ny,C as zy,D as hi,E as Oy,F as zn,G as Ay,H as Ly,I as ja,J as qy,K as $a,L as Wy,M as ls,N as r0,O as Hy,P as Ba,Q as cs,R as ds,S as On,T as Uy,U as ln,V as Va,W as Ga,X as $,Y as i0,Z as o0,b as Y,d as La,da as qu,e as ky,f as Nn,g as Te,h as qa,i as Cy,j as Ty,k as _y,l as Ey,m as Ry,n as as,o as Dy,p as Wa,q as J,r as Ha,s as Fy,t as Ua,u as Jt,v as Py,w as G,x as dt,y as Dr,z as My}from"./chunk-M5TGCSUK.js";import{b as Sy}from"./chunk-Q2SZCZE7.js";import{a as Vt,b as ee,c as w,d as wy,e as Gt,f as Kt,g as h}from"./chunk-VKWPEFWQ.js";var Ui=w(ht=>{"use strict";h();Object.defineProperty(ht,"__esModule",{value:!0});ht.stringArray=ht.array=ht.func=ht.error=ht.number=ht.string=ht.boolean=void 0;function s0(n){return n===!0||n===!1}ht.boolean=s0;function jy(n){return typeof n=="string"||n instanceof String}ht.string=jy;function a0(n){return typeof n=="number"||n instanceof Number}ht.number=a0;function l0(n){return n instanceof Error}ht.error=l0;function c0(n){return typeof n=="function"}ht.func=c0;function $y(n){return Array.isArray(n)}ht.array=$y;function d0(n){return $y(n)&&n.every(e=>jy(e))}ht.stringArray=d0});var cp=w(B=>{"use strict";h();Object.defineProperty(B,"__esModule",{value:!0});B.Message=B.NotificationType9=B.NotificationType8=B.NotificationType7=B.NotificationType6=B.NotificationType5=B.NotificationType4=B.NotificationType3=B.NotificationType2=B.NotificationType1=B.NotificationType0=B.NotificationType=B.RequestType9=B.RequestType8=B.RequestType7=B.RequestType6=B.RequestType5=B.RequestType4=B.RequestType3=B.RequestType2=B.RequestType1=B.RequestType=B.RequestType0=B.AbstractMessageSignature=B.ParameterStructures=B.ResponseError=B.ErrorCodes=void 0;var ui=Ui(),By;(function(n){n.ParseError=-32700,n.InvalidRequest=-32600,n.MethodNotFound=-32601,n.InvalidParams=-32602,n.InternalError=-32603,n.jsonrpcReservedErrorRangeStart=-32099,n.serverErrorStart=-32099,n.MessageWriteError=-32099,n.MessageReadError=-32098,n.PendingResponseRejected=-32097,n.ConnectionInactive=-32096,n.ServerNotInitialized=-32002,n.UnknownErrorCode=-32001,n.jsonrpcReservedErrorRangeEnd=-32e3,n.serverErrorEnd=-32e3})(By=B.ErrorCodes||(B.ErrorCodes={}));var Wu=class n extends Error{constructor(e,t,r){super(t),this.code=ui.number(e)?e:By.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,n.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};B.ResponseError=Wu;var Rt=class n{constructor(e){this.kind=e}static is(e){return e===n.auto||e===n.byName||e===n.byPosition}toString(){return this.kind}};B.ParameterStructures=Rt;Rt.auto=new Rt("auto");Rt.byPosition=new Rt("byPosition");Rt.byName=new Rt("byName");var _e=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return Rt.auto}};B.AbstractMessageSignature=_e;var Hu=class extends _e{constructor(e){super(e,0)}};B.RequestType0=Hu;var Uu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.RequestType=Uu;var ju=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.RequestType1=ju;var $u=class extends _e{constructor(e){super(e,2)}};B.RequestType2=$u;var Bu=class extends _e{constructor(e){super(e,3)}};B.RequestType3=Bu;var Vu=class extends _e{constructor(e){super(e,4)}};B.RequestType4=Vu;var Gu=class extends _e{constructor(e){super(e,5)}};B.RequestType5=Gu;var Ku=class extends _e{constructor(e){super(e,6)}};B.RequestType6=Ku;var Ju=class extends _e{constructor(e){super(e,7)}};B.RequestType7=Ju;var Xu=class extends _e{constructor(e){super(e,8)}};B.RequestType8=Xu;var Yu=class extends _e{constructor(e){super(e,9)}};B.RequestType9=Yu;var Qu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.NotificationType=Qu;var Zu=class extends _e{constructor(e){super(e,0)}};B.NotificationType0=Zu;var ep=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.NotificationType1=ep;var tp=class extends _e{constructor(e){super(e,2)}};B.NotificationType2=tp;var np=class extends _e{constructor(e){super(e,3)}};B.NotificationType3=np;var rp=class extends _e{constructor(e){super(e,4)}};B.NotificationType4=rp;var ip=class extends _e{constructor(e){super(e,5)}};B.NotificationType5=ip;var op=class extends _e{constructor(e){super(e,6)}};B.NotificationType6=op;var sp=class extends _e{constructor(e){super(e,7)}};B.NotificationType7=sp;var ap=class extends _e{constructor(e){super(e,8)}};B.NotificationType8=ap;var lp=class extends _e{constructor(e){super(e,9)}};B.NotificationType9=lp;var h0;(function(n){function e(i){let o=i;return o&&ui.string(o.method)&&(ui.string(o.id)||ui.number(o.id))}n.isRequest=e;function t(i){let o=i;return o&&ui.string(o.method)&&i.id===void 0}n.isNotification=t;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(ui.string(o.id)||ui.number(o.id)||o.id===null)}n.isResponse=r})(h0=B.Message||(B.Message={}))});var hp=w(tr=>{"use strict";h();var Vy;Object.defineProperty(tr,"__esModule",{value:!0});tr.LRUCache=tr.LinkedMap=tr.Touch=void 0;var gt;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(gt=tr.Touch||(tr.Touch={}));var Ka=class{constructor(){this[Vy]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=gt.None){let r=this._map.get(e);if(r)return t!==gt.None&&this.touch(r,t),r.value}set(e,t,r=gt.None){let i=this._map.get(e);if(i)i.value=t,r!==gt.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case gt.None:this.addItemLast(i);break;case gt.First:this.addItemFirst(i);break;case gt.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[(Vy=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==gt.First&&t!==gt.Last)){if(t===gt.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===gt.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}};tr.LinkedMap=Ka;var dp=class extends Ka{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=gt.AsNew){return super.get(e,t)}peek(e){return super.get(e,gt.None)}set(e,t){return super.set(e,t,gt.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};tr.LRUCache=dp});var Gy=w(hs=>{"use strict";h();Object.defineProperty(hs,"__esModule",{value:!0});hs.Disposable=void 0;var u0;(function(n){function e(t){return{dispose:t}}n.create=e})(u0=hs.Disposable||(hs.Disposable={}))});var Fr=w(mp=>{"use strict";h();Object.defineProperty(mp,"__esModule",{value:!0});var up;function pp(){if(up===void 0)throw new Error("No runtime abstraction layer installed");return up}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");up=t}n.install=e})(pp||(pp={}));mp.default=pp});var ji=w(pi=>{"use strict";h();Object.defineProperty(pi,"__esModule",{value:!0});pi.Emitter=pi.Event=void 0;var p0=Fr(),m0;(function(n){let e={dispose(){}};n.None=function(){return e}})(m0=pi.Event||(pi.Event={}));var fp=class{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e)if(this._contexts[i]===t){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let t=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{t.push(r[o].apply(i[o],e))}catch(a){(0,p0.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Ja=class n{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new fp),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=n._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};pi.Emitter=Ja;Ja._noop=function(){}});var Ya=w(mi=>{"use strict";h();Object.defineProperty(mi,"__esModule",{value:!0});mi.CancellationTokenSource=mi.CancellationToken=void 0;var f0=Fr(),g0=Ui(),gp=ji(),bp;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:gp.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:gp.Event.None});function e(t){let r=t;return r&&(r===n.None||r===n.Cancelled||g0.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(bp=mi.CancellationToken||(mi.CancellationToken={}));var b0=Object.freeze(function(n,e){let t=(0,f0.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}}),Xa=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?b0:(this._emitter||(this._emitter=new gp.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},vp=class{get token(){return this._token||(this._token=new Xa),this._token}cancel(){this._token?this._token.cancel():this._token=bp.Cancelled}dispose(){this._token?this._token instanceof Xa&&this._token.dispose():this._token=bp.None}};mi.CancellationTokenSource=vp});var Ky=w($i=>{"use strict";h();Object.defineProperty($i,"__esModule",{value:!0});$i.SharedArrayReceiverStrategy=$i.SharedArraySenderStrategy=void 0;var v0=Ya(),us;(function(n){n.Continue=0,n.Cancelled=1})(us||(us={}));var yp=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=us.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,us.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};$i.SharedArraySenderStrategy=yp;var wp=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===us.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Sp=class{constructor(e){this.token=new wp(e)}cancel(){}dispose(){}},xp=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new v0.CancellationTokenSource:new Sp(t)}};$i.SharedArrayReceiverStrategy=xp});var Cp=w(Qa=>{"use strict";h();Object.defineProperty(Qa,"__esModule",{value:!0});Qa.Semaphore=void 0;var y0=Fr(),kp=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,y0.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};Qa.Semaphore=kp});var Jy=w(nr=>{"use strict";h();Object.defineProperty(nr,"__esModule",{value:!0});nr.ReadableStreamMessageReader=nr.AbstractMessageReader=nr.MessageReader=void 0;var _p=Fr(),Bi=Ui(),Tp=ji(),w0=Cp(),S0;(function(n){function e(t){let r=t;return r&&Bi.func(r.listen)&&Bi.func(r.dispose)&&Bi.func(r.onError)&&Bi.func(r.onClose)&&Bi.func(r.onPartialMessage)}n.is=e})(S0=nr.MessageReader||(nr.MessageReader={}));var Za=class{constructor(){this.errorEmitter=new Tp.Emitter,this.closeEmitter=new Tp.Emitter,this.partialMessageEmitter=new Tp.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Bi.string(e.message)?e.message:"unknown"}`)}};nr.AbstractMessageReader=Za;var Ep;(function(n){function e(t){let r,i,o,s=new Map,a,l=new Map;if(t===void 0||typeof t=="string")r=t??"utf-8";else{if(r=t.charset??"utf-8",t.contentDecoder!==void 0&&(o=t.contentDecoder,s.set(o.name,o)),t.contentDecoders!==void 0)for(let c of t.contentDecoders)s.set(c.name,c);if(t.contentTypeDecoder!==void 0&&(a=t.contentTypeDecoder,l.set(a.name,a)),t.contentTypeDecoders!==void 0)for(let c of t.contentTypeDecoders)l.set(c.name,c)}return a===void 0&&(a=(0,_p.default)().applicationJson.decoder,l.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:l}}n.fromOptions=e})(Ep||(Ep={}));var Rp=class extends Za{constructor(e,t){super(),this.readable=e,this.options=Ep.fromOptions(t),this.buffer=(0,_p.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new w0.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error("Header must provide a Content-Length property."));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error("Content-Length value must be a number."));return}this.nextMessageLength=o}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,_p.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};nr.ReadableStreamMessageReader=Rp});var Zy=w(rr=>{"use strict";h();Object.defineProperty(rr,"__esModule",{value:!0});rr.WriteableStreamMessageWriter=rr.AbstractMessageWriter=rr.MessageWriter=void 0;var Xy=Fr(),ps=Ui(),x0=Cp(),Yy=ji(),k0="Content-Length: ",Qy=`\r
1
+ import{v as xy}from"./chunk-YKMINHYY.js";import{A as Iy,B as Ny,C as zy,D as hi,E as Oy,F as zn,G as Ay,H as Ly,I as ja,J as qy,K as $a,L as Wy,M as ls,N as r0,O as Hy,P as Ba,Q as cs,R as ds,S as On,T as Uy,U as ln,V as Va,W as Ga,X as $,Y as i0,Z as o0,b as Y,d as La,da as qu,e as ky,f as Nn,g as Te,h as qa,i as Cy,j as Ty,k as _y,l as Ey,m as Ry,n as as,o as Dy,p as Wa,q as J,r as Ha,s as Fy,t as Ua,u as Jt,v as Py,w as G,x as dt,y as Dr,z as My}from"./chunk-RLNIOJH3.js";import{b as Sy}from"./chunk-3KM5ZOW2.js";import{a as Vt,b as ee,c as w,d as wy,e as Gt,f as Kt,g as h}from"./chunk-VKWPEFWQ.js";var Ui=w(ht=>{"use strict";h();Object.defineProperty(ht,"__esModule",{value:!0});ht.stringArray=ht.array=ht.func=ht.error=ht.number=ht.string=ht.boolean=void 0;function s0(n){return n===!0||n===!1}ht.boolean=s0;function jy(n){return typeof n=="string"||n instanceof String}ht.string=jy;function a0(n){return typeof n=="number"||n instanceof Number}ht.number=a0;function l0(n){return n instanceof Error}ht.error=l0;function c0(n){return typeof n=="function"}ht.func=c0;function $y(n){return Array.isArray(n)}ht.array=$y;function d0(n){return $y(n)&&n.every(e=>jy(e))}ht.stringArray=d0});var cp=w(B=>{"use strict";h();Object.defineProperty(B,"__esModule",{value:!0});B.Message=B.NotificationType9=B.NotificationType8=B.NotificationType7=B.NotificationType6=B.NotificationType5=B.NotificationType4=B.NotificationType3=B.NotificationType2=B.NotificationType1=B.NotificationType0=B.NotificationType=B.RequestType9=B.RequestType8=B.RequestType7=B.RequestType6=B.RequestType5=B.RequestType4=B.RequestType3=B.RequestType2=B.RequestType1=B.RequestType=B.RequestType0=B.AbstractMessageSignature=B.ParameterStructures=B.ResponseError=B.ErrorCodes=void 0;var ui=Ui(),By;(function(n){n.ParseError=-32700,n.InvalidRequest=-32600,n.MethodNotFound=-32601,n.InvalidParams=-32602,n.InternalError=-32603,n.jsonrpcReservedErrorRangeStart=-32099,n.serverErrorStart=-32099,n.MessageWriteError=-32099,n.MessageReadError=-32098,n.PendingResponseRejected=-32097,n.ConnectionInactive=-32096,n.ServerNotInitialized=-32002,n.UnknownErrorCode=-32001,n.jsonrpcReservedErrorRangeEnd=-32e3,n.serverErrorEnd=-32e3})(By=B.ErrorCodes||(B.ErrorCodes={}));var Wu=class n extends Error{constructor(e,t,r){super(t),this.code=ui.number(e)?e:By.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,n.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};B.ResponseError=Wu;var Rt=class n{constructor(e){this.kind=e}static is(e){return e===n.auto||e===n.byName||e===n.byPosition}toString(){return this.kind}};B.ParameterStructures=Rt;Rt.auto=new Rt("auto");Rt.byPosition=new Rt("byPosition");Rt.byName=new Rt("byName");var _e=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return Rt.auto}};B.AbstractMessageSignature=_e;var Hu=class extends _e{constructor(e){super(e,0)}};B.RequestType0=Hu;var Uu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.RequestType=Uu;var ju=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.RequestType1=ju;var $u=class extends _e{constructor(e){super(e,2)}};B.RequestType2=$u;var Bu=class extends _e{constructor(e){super(e,3)}};B.RequestType3=Bu;var Vu=class extends _e{constructor(e){super(e,4)}};B.RequestType4=Vu;var Gu=class extends _e{constructor(e){super(e,5)}};B.RequestType5=Gu;var Ku=class extends _e{constructor(e){super(e,6)}};B.RequestType6=Ku;var Ju=class extends _e{constructor(e){super(e,7)}};B.RequestType7=Ju;var Xu=class extends _e{constructor(e){super(e,8)}};B.RequestType8=Xu;var Yu=class extends _e{constructor(e){super(e,9)}};B.RequestType9=Yu;var Qu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.NotificationType=Qu;var Zu=class extends _e{constructor(e){super(e,0)}};B.NotificationType0=Zu;var ep=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.NotificationType1=ep;var tp=class extends _e{constructor(e){super(e,2)}};B.NotificationType2=tp;var np=class extends _e{constructor(e){super(e,3)}};B.NotificationType3=np;var rp=class extends _e{constructor(e){super(e,4)}};B.NotificationType4=rp;var ip=class extends _e{constructor(e){super(e,5)}};B.NotificationType5=ip;var op=class extends _e{constructor(e){super(e,6)}};B.NotificationType6=op;var sp=class extends _e{constructor(e){super(e,7)}};B.NotificationType7=sp;var ap=class extends _e{constructor(e){super(e,8)}};B.NotificationType8=ap;var lp=class extends _e{constructor(e){super(e,9)}};B.NotificationType9=lp;var h0;(function(n){function e(i){let o=i;return o&&ui.string(o.method)&&(ui.string(o.id)||ui.number(o.id))}n.isRequest=e;function t(i){let o=i;return o&&ui.string(o.method)&&i.id===void 0}n.isNotification=t;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(ui.string(o.id)||ui.number(o.id)||o.id===null)}n.isResponse=r})(h0=B.Message||(B.Message={}))});var hp=w(tr=>{"use strict";h();var Vy;Object.defineProperty(tr,"__esModule",{value:!0});tr.LRUCache=tr.LinkedMap=tr.Touch=void 0;var gt;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(gt=tr.Touch||(tr.Touch={}));var Ka=class{constructor(){this[Vy]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=gt.None){let r=this._map.get(e);if(r)return t!==gt.None&&this.touch(r,t),r.value}set(e,t,r=gt.None){let i=this._map.get(e);if(i)i.value=t,r!==gt.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case gt.None:this.addItemLast(i);break;case gt.First:this.addItemFirst(i);break;case gt.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[(Vy=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==gt.First&&t!==gt.Last)){if(t===gt.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===gt.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}};tr.LinkedMap=Ka;var dp=class extends Ka{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=gt.AsNew){return super.get(e,t)}peek(e){return super.get(e,gt.None)}set(e,t){return super.set(e,t,gt.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};tr.LRUCache=dp});var Gy=w(hs=>{"use strict";h();Object.defineProperty(hs,"__esModule",{value:!0});hs.Disposable=void 0;var u0;(function(n){function e(t){return{dispose:t}}n.create=e})(u0=hs.Disposable||(hs.Disposable={}))});var Fr=w(mp=>{"use strict";h();Object.defineProperty(mp,"__esModule",{value:!0});var up;function pp(){if(up===void 0)throw new Error("No runtime abstraction layer installed");return up}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");up=t}n.install=e})(pp||(pp={}));mp.default=pp});var ji=w(pi=>{"use strict";h();Object.defineProperty(pi,"__esModule",{value:!0});pi.Emitter=pi.Event=void 0;var p0=Fr(),m0;(function(n){let e={dispose(){}};n.None=function(){return e}})(m0=pi.Event||(pi.Event={}));var fp=class{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e)if(this._contexts[i]===t){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let t=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{t.push(r[o].apply(i[o],e))}catch(a){(0,p0.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Ja=class n{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new fp),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=n._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};pi.Emitter=Ja;Ja._noop=function(){}});var Ya=w(mi=>{"use strict";h();Object.defineProperty(mi,"__esModule",{value:!0});mi.CancellationTokenSource=mi.CancellationToken=void 0;var f0=Fr(),g0=Ui(),gp=ji(),bp;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:gp.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:gp.Event.None});function e(t){let r=t;return r&&(r===n.None||r===n.Cancelled||g0.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(bp=mi.CancellationToken||(mi.CancellationToken={}));var b0=Object.freeze(function(n,e){let t=(0,f0.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}}),Xa=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?b0:(this._emitter||(this._emitter=new gp.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},vp=class{get token(){return this._token||(this._token=new Xa),this._token}cancel(){this._token?this._token.cancel():this._token=bp.Cancelled}dispose(){this._token?this._token instanceof Xa&&this._token.dispose():this._token=bp.None}};mi.CancellationTokenSource=vp});var Ky=w($i=>{"use strict";h();Object.defineProperty($i,"__esModule",{value:!0});$i.SharedArrayReceiverStrategy=$i.SharedArraySenderStrategy=void 0;var v0=Ya(),us;(function(n){n.Continue=0,n.Cancelled=1})(us||(us={}));var yp=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=us.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,us.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};$i.SharedArraySenderStrategy=yp;var wp=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===us.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Sp=class{constructor(e){this.token=new wp(e)}cancel(){}dispose(){}},xp=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new v0.CancellationTokenSource:new Sp(t)}};$i.SharedArrayReceiverStrategy=xp});var Cp=w(Qa=>{"use strict";h();Object.defineProperty(Qa,"__esModule",{value:!0});Qa.Semaphore=void 0;var y0=Fr(),kp=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,y0.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};Qa.Semaphore=kp});var Jy=w(nr=>{"use strict";h();Object.defineProperty(nr,"__esModule",{value:!0});nr.ReadableStreamMessageReader=nr.AbstractMessageReader=nr.MessageReader=void 0;var _p=Fr(),Bi=Ui(),Tp=ji(),w0=Cp(),S0;(function(n){function e(t){let r=t;return r&&Bi.func(r.listen)&&Bi.func(r.dispose)&&Bi.func(r.onError)&&Bi.func(r.onClose)&&Bi.func(r.onPartialMessage)}n.is=e})(S0=nr.MessageReader||(nr.MessageReader={}));var Za=class{constructor(){this.errorEmitter=new Tp.Emitter,this.closeEmitter=new Tp.Emitter,this.partialMessageEmitter=new Tp.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Bi.string(e.message)?e.message:"unknown"}`)}};nr.AbstractMessageReader=Za;var Ep;(function(n){function e(t){let r,i,o,s=new Map,a,l=new Map;if(t===void 0||typeof t=="string")r=t??"utf-8";else{if(r=t.charset??"utf-8",t.contentDecoder!==void 0&&(o=t.contentDecoder,s.set(o.name,o)),t.contentDecoders!==void 0)for(let c of t.contentDecoders)s.set(c.name,c);if(t.contentTypeDecoder!==void 0&&(a=t.contentTypeDecoder,l.set(a.name,a)),t.contentTypeDecoders!==void 0)for(let c of t.contentTypeDecoders)l.set(c.name,c)}return a===void 0&&(a=(0,_p.default)().applicationJson.decoder,l.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:l}}n.fromOptions=e})(Ep||(Ep={}));var Rp=class extends Za{constructor(e,t){super(),this.readable=e,this.options=Ep.fromOptions(t),this.buffer=(0,_p.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new w0.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error("Header must provide a Content-Length property."));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error("Content-Length value must be a number."));return}this.nextMessageLength=o}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,_p.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};nr.ReadableStreamMessageReader=Rp});var Zy=w(rr=>{"use strict";h();Object.defineProperty(rr,"__esModule",{value:!0});rr.WriteableStreamMessageWriter=rr.AbstractMessageWriter=rr.MessageWriter=void 0;var Xy=Fr(),ps=Ui(),x0=Cp(),Yy=ji(),k0="Content-Length: ",Qy=`\r
2
2
  `,C0;(function(n){function e(t){let r=t;return r&&ps.func(r.dispose)&&ps.func(r.onClose)&&ps.func(r.onError)&&ps.func(r.write)}n.is=e})(C0=rr.MessageWriter||(rr.MessageWriter={}));var el=class{constructor(){this.errorEmitter=new Yy.Emitter,this.closeEmitter=new Yy.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${ps.string(e.message)?e.message:"unknown"}`)}};rr.AbstractMessageWriter=el;var Dp;(function(n){function e(t){return t===void 0||typeof t=="string"?{charset:t??"utf-8",contentTypeEncoder:(0,Xy.default)().applicationJson.encoder}:{charset:t.charset??"utf-8",contentEncoder:t.contentEncoder,contentTypeEncoder:t.contentTypeEncoder??(0,Xy.default)().applicationJson.encoder}}n.fromOptions=e})(Dp||(Dp={}));var Fp=class extends el{constructor(e,t){super(),this.writable=e,this.options=Dp.fromOptions(t),this.errorCount=0,this.writeSemaphore=new x0.Semaphore(1),this.writable.onError(r=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(k0,r.byteLength.toString(),Qy),i.push(Qy),this.doWrite(e,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};rr.WriteableStreamMessageWriter=Fp});var ew=w(tl=>{"use strict";h();Object.defineProperty(tl,"__esModule",{value:!0});tl.AbstractMessageBuffer=void 0;var T0=13,_0=10,E0=`\r
3
3
  `,Pp=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let t=0,r=0,i=0,o=0;e:for(;r<this._chunks.length;){let c=this._chunks[r];for(i=0;i<c.length;){switch(c[i]){case T0:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case _0:switch(t){case 1:t=2;break;case 3:t=4,i++;break e;default:t=0}break;default:t=0}i++}o+=c.byteLength,r++}if(t!==4)return;let s=this._read(o+i),a=new Map,l=this.toString(s,"ascii").split(E0);if(l.length<2)return a;for(let c=0;c<l.length-2;c++){let d=l[c],p=d.indexOf(":");if(p===-1)throw new Error("Message header must separate key and value using :");let m=d.substr(0,p),g=d.substr(p+1).trim();a.set(e?m.toLowerCase():m,g)}return a}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(o)}if(this._chunks[0].byteLength>e){let o=this._chunks[0],s=this.asNative(o,e);return this._chunks[0]=o.slice(e),this._totalLength-=e,s}let t=this.allocNative(e),r=0,i=0;for(;e>0;){let o=this._chunks[i];if(o.byteLength>e){let s=o.slice(0,e);t.set(s,r),r+=e,this._chunks[i]=o.slice(e),this._totalLength-=e,e-=e}else t.set(o,r),r+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,e-=o.byteLength}return t}};tl.AbstractMessageBuffer=Pp});var aw=w(j=>{"use strict";h();Object.defineProperty(j,"__esModule",{value:!0});j.createMessageConnection=j.ConnectionOptions=j.MessageStrategy=j.CancellationStrategy=j.CancellationSenderStrategy=j.CancellationReceiverStrategy=j.RequestCancellationReceiverStrategy=j.IdCancellationReceiverStrategy=j.ConnectionStrategy=j.ConnectionError=j.ConnectionErrors=j.LogTraceNotification=j.SetTraceNotification=j.TraceFormat=j.TraceValues=j.Trace=j.NullLogger=j.ProgressType=j.ProgressToken=void 0;var tw=Fr(),Me=Ui(),X=cp(),nw=hp(),ms=ji(),Mp=Ya(),gs;(function(n){n.type=new X.NotificationType("$/cancelRequest")})(gs||(gs={}));var rw;(function(n){function e(t){return typeof t=="string"||typeof t=="number"}n.is=e})(rw=j.ProgressToken||(j.ProgressToken={}));var fs;(function(n){n.type=new X.NotificationType("$/progress")})(fs||(fs={}));var Ip=class{constructor(){}};j.ProgressType=Ip;var Np;(function(n){function e(t){return Me.func(t)}n.is=e})(Np||(Np={}));j.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var ge;(function(n){n[n.Off=0]="Off",n[n.Messages=1]="Messages",n[n.Compact=2]="Compact",n[n.Verbose=3]="Verbose"})(ge=j.Trace||(j.Trace={}));var R0;(function(n){n.Off="off",n.Messages="messages",n.Compact="compact",n.Verbose="verbose"})(R0=j.TraceValues||(j.TraceValues={}));(function(n){function e(r){if(!Me.string(r))return n.Off;switch(r=r.toLowerCase(),r){case"off":return n.Off;case"messages":return n.Messages;case"compact":return n.Compact;case"verbose":return n.Verbose;default:return n.Off}}n.fromString=e;function t(r){switch(r){case n.Off:return"off";case n.Messages:return"messages";case n.Compact:return"compact";case n.Verbose:return"verbose";default:return"off"}}n.toString=t})(ge=j.Trace||(j.Trace={}));var cn;(function(n){n.Text="text",n.JSON="json"})(cn=j.TraceFormat||(j.TraceFormat={}));(function(n){function e(t){return Me.string(t)?(t=t.toLowerCase(),t==="json"?n.JSON:n.Text):n.Text}n.fromString=e})(cn=j.TraceFormat||(j.TraceFormat={}));var iw;(function(n){n.type=new X.NotificationType("$/setTrace")})(iw=j.SetTraceNotification||(j.SetTraceNotification={}));var zp;(function(n){n.type=new X.NotificationType("$/logTrace")})(zp=j.LogTraceNotification||(j.LogTraceNotification={}));var nl;(function(n){n[n.Closed=1]="Closed",n[n.Disposed=2]="Disposed",n[n.AlreadyListening=3]="AlreadyListening"})(nl=j.ConnectionErrors||(j.ConnectionErrors={}));var Vi=class n extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,n.prototype)}};j.ConnectionError=Vi;var ow;(function(n){function e(t){let r=t;return r&&Me.func(r.cancelUndispatched)}n.is=e})(ow=j.ConnectionStrategy||(j.ConnectionStrategy={}));var Lp;(function(n){function e(t){let r=t;return r&&(r.kind===void 0||r.kind==="id")&&Me.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Me.func(r.dispose))}n.is=e})(Lp=j.IdCancellationReceiverStrategy||(j.IdCancellationReceiverStrategy={}));var sw;(function(n){function e(t){let r=t;return r&&r.kind==="request"&&Me.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Me.func(r.dispose))}n.is=e})(sw=j.RequestCancellationReceiverStrategy||(j.RequestCancellationReceiverStrategy={}));var Op;(function(n){n.Message=Object.freeze({createCancellationTokenSource(t){return new Mp.CancellationTokenSource}});function e(t){return Lp.is(t)||sw.is(t)}n.is=e})(Op=j.CancellationReceiverStrategy||(j.CancellationReceiverStrategy={}));var Ap;(function(n){n.Message=Object.freeze({sendCancellation(t,r){return t.sendNotification(gs.type,{id:r})},cleanup(t){}});function e(t){let r=t;return r&&Me.func(r.sendCancellation)&&Me.func(r.cleanup)}n.is=e})(Ap=j.CancellationSenderStrategy||(j.CancellationSenderStrategy={}));var qp;(function(n){n.Message=Object.freeze({receiver:Op.Message,sender:Ap.Message});function e(t){let r=t;return r&&Op.is(r.receiver)&&Ap.is(r.sender)}n.is=e})(qp=j.CancellationStrategy||(j.CancellationStrategy={}));var Wp;(function(n){function e(t){let r=t;return r&&Me.func(r.handleMessage)}n.is=e})(Wp=j.MessageStrategy||(j.MessageStrategy={}));var D0;(function(n){function e(t){let r=t;return r&&(qp.is(r.cancellationStrategy)||ow.is(r.connectionStrategy)||Wp.is(r.messageStrategy))}n.is=e})(D0=j.ConnectionOptions||(j.ConnectionOptions={}));var dn;(function(n){n[n.New=1]="New",n[n.Listening=2]="Listening",n[n.Closed=3]="Closed",n[n.Disposed=4]="Disposed"})(dn||(dn={}));function F0(n,e,t,r){let i=t!==void 0?t:j.NullLogger,o=0,s=0,a=0,l="2.0",c,d=new Map,p,m=new Map,g=new Map,S,F=new nw.LinkedMap,P=new Map,I=new Set,x=new Map,y=ge.Off,R=cn.Text,O,W=dn.New,ke=new ms.Emitter,Fe=new ms.Emitter,jt=new ms.Emitter,Mt=new ms.Emitter,Tt=new ms.Emitter,_t=r&&r.cancellationStrategy?r.cancellationStrategy:qp.Message;function Pn(v){if(v===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+v.toString()}function ci(v){return v===null?"res-unknown-"+(++a).toString():"res-"+v.toString()}function $t(){return"not-"+(++s).toString()}function It(v,D){X.Message.isRequest(D)?v.set(Pn(D.id),D):X.Message.isResponse(D)?v.set(ci(D.id),D):v.set($t(),D)}function Er(v){}function Bt(){return W===dn.Listening}function Mn(){return W===dn.Closed}function Ye(){return W===dn.Disposed}function Rr(){(W===dn.New||W===dn.Listening)&&(W=dn.Closed,Fe.fire(void 0))}function is(v){ke.fire([v,void 0,void 0])}function Ai(v){ke.fire(v)}n.onClose(Rr),n.onError(is),e.onClose(Rr),e.onError(Ai);function Li(){S||F.size===0||(S=(0,tw.default)().timer.setImmediate(()=>{S=void 0,Nu()}))}function qi(v){X.Message.isRequest(v)?zu(v):X.Message.isNotification(v)?Au(v):X.Message.isResponse(v)?Ou(v):Aa(v)}function Nu(){if(F.size===0)return;let v=F.shift();try{let D=r?.messageStrategy;Wp.is(D)?D.handleMessage(v,qi):qi(v)}finally{Li()}}let di=v=>{try{if(X.Message.isNotification(v)&&v.method===gs.type.method){let D=v.params.id,z=Pn(D),U=F.get(z);if(X.Message.isRequest(U)){let be=r?.connectionStrategy,ze=be&&be.cancelUndispatched?be.cancelUndispatched(U,Er):void 0;if(ze&&(ze.error!==void 0||ze.result!==void 0)){F.delete(z),x.delete(D),ze.id=U.id,K(ze,v.method,Date.now()),e.write(ze).catch(()=>i.error("Sending response for canceled message failed."));return}}let Ce=x.get(D);if(Ce!==void 0){Ce.cancel(),Et(v);return}else I.add(D)}It(F,v)}finally{Li()}};function zu(v){if(Ye())return;function D(ce,Pe,fe){let Ve={jsonrpc:l,id:v.id};ce instanceof X.ResponseError?Ve.error=ce.toJson():Ve.result=ce===void 0?null:ce,K(Ve,Pe,fe),e.write(Ve).catch(()=>i.error("Sending response failed."))}function z(ce,Pe,fe){let Ve={jsonrpc:l,id:v.id,error:ce.toJson()};K(Ve,Pe,fe),e.write(Ve).catch(()=>i.error("Sending response failed."))}function U(ce,Pe,fe){ce===void 0&&(ce=null);let Ve={jsonrpc:l,id:v.id,result:ce};K(Ve,Pe,fe),e.write(Ve).catch(()=>i.error("Sending response failed."))}De(v);let Ce=d.get(v.method),be,ze;Ce&&(be=Ce.type,ze=Ce.handler);let Ae=Date.now();if(ze||c){let ce=v.id??String(Date.now()),Pe=Lp.is(_t.receiver)?_t.receiver.createCancellationTokenSource(ce):_t.receiver.createCancellationTokenSource(v);v.id!==null&&I.has(v.id)&&Pe.cancel(),v.id!==null&&x.set(ce,Pe);try{let fe;if(ze)if(v.params===void 0){if(be!==void 0&&be.numberOfParams!==0){z(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${v.method} defines ${be.numberOfParams} params but received none.`),v.method,Ae);return}fe=ze(Pe.token)}else if(Array.isArray(v.params)){if(be!==void 0&&be.parameterStructures===X.ParameterStructures.byName){z(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by name but received parameters by position`),v.method,Ae);return}fe=ze(...v.params,Pe.token)}else{if(be!==void 0&&be.parameterStructures===X.ParameterStructures.byPosition){z(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by position but received parameters by name`),v.method,Ae);return}fe=ze(v.params,Pe.token)}else c&&(fe=c(v.method,v.params,Pe.token));let Ve=fe;fe?Ve.then?Ve.then(ft=>{x.delete(ce),D(ft,v.method,Ae)},ft=>{x.delete(ce),ft instanceof X.ResponseError?z(ft,v.method,Ae):ft&&Me.string(ft.message)?z(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${v.method} failed with message: ${ft.message}`),v.method,Ae):z(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${v.method} failed unexpectedly without providing any details.`),v.method,Ae)}):(x.delete(ce),D(fe,v.method,Ae)):(x.delete(ce),U(fe,v.method,Ae))}catch(fe){x.delete(ce),fe instanceof X.ResponseError?D(fe,v.method,Ae):fe&&Me.string(fe.message)?z(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${v.method} failed with message: ${fe.message}`),v.method,Ae):z(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${v.method} failed unexpectedly without providing any details.`),v.method,Ae)}}else z(new X.ResponseError(X.ErrorCodes.MethodNotFound,`Unhandled method ${v.method}`),v.method,Ae)}function Ou(v){if(!Ye())if(v.id===null)v.error?i.error(`Received response message without id: Error is:
4
4
  ${JSON.stringify(v.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let D=v.id,z=P.get(D);if(Z_(v,z),z!==void 0){P.delete(D);try{if(v.error){let U=v.error;z.reject(new X.ResponseError(U.code,U.message,U.data))}else if(v.result!==void 0)z.resolve(v.result);else throw new Error("Should never happen.")}catch(U){U.message?i.error(`Response handler '${z.method}' failed with message: ${U.message}`):i.error(`Response handler '${z.method}' failed unexpectedly.`)}}}}function Au(v){if(Ye())return;let D,z;if(v.method===gs.type.method){let U=v.params.id;I.delete(U),Et(v);return}else{let U=m.get(v.method);U&&(z=U.handler,D=U.type)}if(z||p)try{if(Et(v),z)if(v.params===void 0)D!==void 0&&D.numberOfParams!==0&&D.parameterStructures!==X.ParameterStructures.byName&&i.error(`Notification ${v.method} defines ${D.numberOfParams} params but received none.`),z();else if(Array.isArray(v.params)){let U=v.params;v.method===fs.type.method&&U.length===2&&rw.is(U[0])?z({token:U[0],value:U[1]}):(D!==void 0&&(D.parameterStructures===X.ParameterStructures.byName&&i.error(`Notification ${v.method} defines parameters by name but received parameters by position`),D.numberOfParams!==v.params.length&&i.error(`Notification ${v.method} defines ${D.numberOfParams} params but received ${U.length} arguments`)),z(...U))}else D!==void 0&&D.parameterStructures===X.ParameterStructures.byPosition&&i.error(`Notification ${v.method} defines parameters by position but received parameters by name`),z(v.params);else p&&p(v.method,v.params)}catch(U){U.message?i.error(`Notification handler '${v.method}' failed with message: ${U.message}`):i.error(`Notification handler '${v.method}' failed unexpectedly.`)}else jt.fire(v)}function Aa(v){if(!v){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
@@ -1 +1 @@
1
- import{a as j}from"./chunk-ZGV3HNEV.js";import{a as C}from"./chunk-FWB3GLMW.js";import{Ma as O,ja as N}from"./chunk-3C6VLJ5D.js";import{b as R,c as k}from"./chunk-Q2SZCZE7.js";import{H as w}from"./chunk-CZ22VZDA.js";import{a as y}from"./chunk-BN7ZXAZJ.js";import{h as S}from"./chunk-2VSNFOKD.js";import{Hb as b,ba as v,qb as x,sb as E,wb as I,yb as f}from"./chunk-LWCTKI4Z.js";import{i as T}from"./chunk-B4OMIONW.js";import{b as o}from"./chunk-FZCGRIOM.js";import{i as L}from"./chunk-IWTNUJGY.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();var B=o.object({createdAt:o.string(),createdBy:o.string(),versionTag:o.string().nullable().optional(),status:o.string(),versionId:o.string(),message:o.string()}),u=y({name:"AppVersionsListResult",schema:o.array(B),definitions:{AppVersion:B}});r();async function M(i,t){let n=await i.appVersions(t);if(!n.app)throw new S(`Shopify did not return app information for API key ${t.apiKey}.`);return{appVersions:n.app.appVersions.nodes.map(e=>({createdAt:v(new Date(e.createdAt)),createdBy:e.createdBy?.displayName??"",versionTag:e.versionTag,status:e.status,versionId:e.versionId,message:e.message??""})),totalResults:n.app.appVersions.pageInfo.totalResults}}r();var $=12;async function D({app:i,appVersions:t,totalResults:n,remoteApp:e,organization:p,developerPlatformClient:m},d){if(d==="json"){I(u.encode(t));return}if(N({org:p.businessName,appName:e.title,configFile:L(i.configPath)}),t.length===0){f("No app versions found for this app");return}let g=t.map(({versionId:s,...a})=>({...a,status:a.status==="active"?T.green(`\u2605 ${a.status}`):a.status})),l=(process.stdout.columns??75)-$,c=l;g.forEach(s=>{let a=s.message.length+(s.versionTag?.length??0)+b(s.status).length+s.createdAt.length+s.createdBy.length;if(a>l){let J=a-s.message.length,A=Math.max(l-J,10);A<c&&(c=A)}}),g.forEach(s=>{s.message.length>c&&(s.message=`${s.message.slice(0,c-3)}...`)}),w({rows:g,columns:{versionTag:{header:"VERSION"},status:{header:"STATUS"},message:{header:"MESSAGE"},createdAt:{header:"DATE CREATED"},createdBy:{header:"CREATED BY"}}});let F=x.link(m.webUiName,[await m.appDeepLink(e),"versions"].join("/"));f(E`\nView all ${String(n)} app versions in the ${F}`)}var h=class i extends j{static summary="List deployed versions of your app.";static descriptionWithMarkdown="Lists the deployed app versions. An app version is a snapshot of your app extensions.";static get jsonOutputSchema(){return u}static description=this.descriptionForHelp();static flags={...R,...C,...k};async run(){let{flags:t}=await this.parse(i),{app:n,remoteApp:e,developerPlatformClient:p,organization:m}=await O({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),d=await M(p,e);return await D({app:n,remoteApp:e,organization:m,developerPlatformClient:p,...d},t.json?"json":"text"),{app:n}}};export{h as a};
1
+ import{a as j}from"./chunk-VHZ6RL67.js";import{a as C}from"./chunk-NVKJ7ZLP.js";import{Ma as O,ja as N}from"./chunk-U2T5HPRD.js";import{b as R,c as k}from"./chunk-3KM5ZOW2.js";import{H as w}from"./chunk-D2KIGKBI.js";import{a as y}from"./chunk-BN7ZXAZJ.js";import{h as S}from"./chunk-M5VIFG2V.js";import{Hb as b,ba as v,qb as x,sb as E,wb as I,yb as f}from"./chunk-JLQRDFR5.js";import{i as T}from"./chunk-B4OMIONW.js";import{b as o}from"./chunk-FZCGRIOM.js";import{i as L}from"./chunk-IWTNUJGY.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();var B=o.object({createdAt:o.string(),createdBy:o.string(),versionTag:o.string().nullable().optional(),status:o.string(),versionId:o.string(),message:o.string()}),u=y({name:"AppVersionsListResult",schema:o.array(B),definitions:{AppVersion:B}});r();async function M(i,t){let n=await i.appVersions(t);if(!n.app)throw new S(`Shopify did not return app information for API key ${t.apiKey}.`);return{appVersions:n.app.appVersions.nodes.map(e=>({createdAt:v(new Date(e.createdAt)),createdBy:e.createdBy?.displayName??"",versionTag:e.versionTag,status:e.status,versionId:e.versionId,message:e.message??""})),totalResults:n.app.appVersions.pageInfo.totalResults}}r();var $=12;async function D({app:i,appVersions:t,totalResults:n,remoteApp:e,organization:p,developerPlatformClient:m},d){if(d==="json"){I(u.encode(t));return}if(N({org:p.businessName,appName:e.title,configFile:L(i.configPath)}),t.length===0){f("No app versions found for this app");return}let g=t.map(({versionId:s,...a})=>({...a,status:a.status==="active"?T.green(`\u2605 ${a.status}`):a.status})),l=(process.stdout.columns??75)-$,c=l;g.forEach(s=>{let a=s.message.length+(s.versionTag?.length??0)+b(s.status).length+s.createdAt.length+s.createdBy.length;if(a>l){let J=a-s.message.length,A=Math.max(l-J,10);A<c&&(c=A)}}),g.forEach(s=>{s.message.length>c&&(s.message=`${s.message.slice(0,c-3)}...`)}),w({rows:g,columns:{versionTag:{header:"VERSION"},status:{header:"STATUS"},message:{header:"MESSAGE"},createdAt:{header:"DATE CREATED"},createdBy:{header:"CREATED BY"}}});let F=x.link(m.webUiName,[await m.appDeepLink(e),"versions"].join("/"));f(E`\nView all ${String(n)} app versions in the ${F}`)}var h=class i extends j{static summary="List deployed versions of your app.";static descriptionWithMarkdown="Lists the deployed app versions. An app version is a snapshot of your app extensions.";static get jsonOutputSchema(){return u}static description=this.descriptionForHelp();static flags={...R,...C,...k};async run(){let{flags:t}=await this.parse(i),{app:n,remoteApp:e,developerPlatformClient:p,organization:m}=await O({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),d=await M(p,e);return await D({app:n,remoteApp:e,organization:m,developerPlatformClient:p,...d},t.json?"json":"text"),{app:n}}};export{h as a};
@@ -1,4 +1,4 @@
1
- import{b as s}from"./chunk-ZQDDRIBA.js";import{e as j}from"./chunk-ZT5WFUKJ.js";import{b as m,c as u}from"./chunk-Q2SZCZE7.js";import{D as F,F as I,z as h}from"./chunk-CZ22VZDA.js";import{a as O}from"./chunk-BN7ZXAZJ.js";import{h as v}from"./chunk-2VSNFOKD.js";import{Bb as W,wb as E}from"./chunk-LWCTKI4Z.js";import{b as S}from"./chunk-FZCGRIOM.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();n();n();function b(o=k()){return!!o.get("autocorrectEnabled")}function N(o,r=k()){r.set("autocorrectEnabled",o)}function k(){return D??=new j({projectName:"did-you-mean"}),D}var D;function J(){return{enabled:b()}}function y(o){return N(o),{enabled:o}}n();n();var i=O({name:"AutocorrectResult",schema:S.object({enabled:S.boolean()}).strict()});n();var w={on:"Autocorrect on. The system will automatically run commands even when you mistype them.",off:"Autocorrect off. You'll need to confirm corrections for mistyped commands."};function f(o,r){if(r==="json"){E(i.encode({enabled:o.enabled}));return}h({body:o.enabled?w.on:w.off})}var d=class o extends s{static summary="Enable autocorrect. Off by default.";static descriptionWithMarkdown=`Enable autocorrect. Off by default.
1
+ import{b as s}from"./chunk-ZJOX5HW4.js";import{e as j}from"./chunk-MHR5OHT5.js";import{b as m,c as u}from"./chunk-3KM5ZOW2.js";import{D as F,F as I,z as h}from"./chunk-D2KIGKBI.js";import{a as O}from"./chunk-BN7ZXAZJ.js";import{h as v}from"./chunk-M5VIFG2V.js";import{Bb as W,wb as E}from"./chunk-JLQRDFR5.js";import{b as S}from"./chunk-FZCGRIOM.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();n();n();function b(o=k()){return!!o.get("autocorrectEnabled")}function N(o,r=k()){r.set("autocorrectEnabled",o)}function k(){return D??=new j({projectName:"did-you-mean"}),D}var D;function J(){return{enabled:b()}}function y(o){return N(o),{enabled:o}}n();n();var i=O({name:"AutocorrectResult",schema:S.object({enabled:S.boolean()}).strict()});n();var w={on:"Autocorrect on. The system will automatically run commands even when you mistype them.",off:"Autocorrect off. You'll need to confirm corrections for mistyped commands."};function f(o,r){if(r==="json"){E(i.encode({enabled:o.enabled}));return}h({body:o.enabled?w.on:w.off})}var d=class o extends s{static summary="Enable autocorrect. Off by default.";static descriptionWithMarkdown=`Enable autocorrect. Off by default.
2
2
 
3
3
  When autocorrection is enabled, Shopify CLI automatically runs a corrected version of your command if a correction is available.
4
4
 
@@ -1,4 +1,4 @@
1
- import{a as s,c as i,d as n}from"./chunk-2ORRV7GH.js";import{b as e}from"./chunk-ZQDDRIBA.js";import{b as a,c as r}from"./chunk-Q2SZCZE7.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class u extends e{static summary="Check whether auto-upgrade is enabled, disabled, or not yet configured.";static descriptionWithMarkdown=`Check whether auto-upgrade is enabled, disabled, or not yet configured.
1
+ import{a as s,c as i,d as n}from"./chunk-XWSWXQCC.js";import{b as e}from"./chunk-ZJOX5HW4.js";import{b as a,c as r}from"./chunk-3KM5ZOW2.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class u extends e{static summary="Check whether auto-upgrade is enabled, disabled, or not yet configured.";static descriptionWithMarkdown=`Check whether auto-upgrade is enabled, disabled, or not yet configured.
2
2
 
3
3
  When auto-upgrade is enabled, Shopify CLI automatically updates to the latest version after each command.
4
4
 
@@ -1,4 +1,4 @@
1
- import{b as R,c as p}from"./chunk-BAHIL37I.js";import{b as v}from"./chunk-ZQDDRIBA.js";import{k as y}from"./chunk-H4V55Y3Z.js";import{b as g,c as w}from"./chunk-Q2SZCZE7.js";import{h as i}from"./chunk-2VSNFOKD.js";import{wb as m}from"./chunk-LWCTKI4Z.js";import{b as d}from"./chunk-FZCGRIOM.js";import{b as I}from"./chunk-YTUUU33R.js";import{e as P,g as s}from"./chunk-VKWPEFWQ.js";s();s();var O="https://shopify.dev/assistant/search",_="X-Shopify-Surface",j="cli",D=d.array(R.strip().extend({domain:d.string().nullish()}));async function x(t,e,c){let h=new URLSearchParams({query:t});e&&h.append("api_name",e),c&&h.append("api_version",c);let a;try{a=await y(`${O}?${h.toString()}`,{headers:{Accept:"application/json",[_]:j}})}catch{throw new i("Could not reach shopify.dev to run the search.","Check your network connection and try again.")}let n=await a.text();if(!a.ok){let r=`${a.status} ${a.statusText}`;try{let o=JSON.parse(n);o?.error&&(r=o.error)}catch(o){if(!(o instanceof SyntaxError))throw o}throw new i(`Search failed: ${r}`)}let l;try{l=JSON.parse(n)}catch(r){if(!(r instanceof SyntaxError))throw r;return{status:"invalid-response",body:n}}let S=D.safeParse(l);return S.success?{status:"success",results:S.data.map(({score:r,content:o,url:b,title:E,domain:F})=>({score:r,content:o,url:b,title:E,domain:F??null})),pageInfo:{hasNextPage:null},body:n}:{status:"invalid-response",body:n}}s();function A(t,e){if(e==="text"){m(t.body);return}if(t.status==="invalid-response")throw new i("Search returned an invalid documentation response.");m(p.encode({results:t.results,pageInfo:t.pageInfo}))}var u=P(I(),1),f=class t extends v{static descriptionWithMarkdown="Query the shopify.dev vector store and print the most relevant documentation chunks as JSON. Best for programmatic discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`.";static description=this.descriptionForHelp();static examples=[`# search shopify.dev for a topic
1
+ import{b as R,c as p}from"./chunk-BAHIL37I.js";import{b as v}from"./chunk-ZJOX5HW4.js";import{k as y}from"./chunk-GQLNG537.js";import{b as g,c as w}from"./chunk-3KM5ZOW2.js";import{h as i}from"./chunk-M5VIFG2V.js";import{wb as m}from"./chunk-JLQRDFR5.js";import{b as d}from"./chunk-FZCGRIOM.js";import{b as I}from"./chunk-YTUUU33R.js";import{e as P,g as s}from"./chunk-VKWPEFWQ.js";s();s();var O="https://shopify.dev/assistant/search",_="X-Shopify-Surface",j="cli",D=d.array(R.strip().extend({domain:d.string().nullish()}));async function x(t,e,c){let h=new URLSearchParams({query:t});e&&h.append("api_name",e),c&&h.append("api_version",c);let a;try{a=await y(`${O}?${h.toString()}`,{headers:{Accept:"application/json",[_]:j}})}catch{throw new i("Could not reach shopify.dev to run the search.","Check your network connection and try again.")}let n=await a.text();if(!a.ok){let r=`${a.status} ${a.statusText}`;try{let o=JSON.parse(n);o?.error&&(r=o.error)}catch(o){if(!(o instanceof SyntaxError))throw o}throw new i(`Search failed: ${r}`)}let l;try{l=JSON.parse(n)}catch(r){if(!(r instanceof SyntaxError))throw r;return{status:"invalid-response",body:n}}let S=D.safeParse(l);return S.success?{status:"success",results:S.data.map(({score:r,content:o,url:b,title:E,domain:F})=>({score:r,content:o,url:b,title:E,domain:F??null})),pageInfo:{hasNextPage:null},body:n}:{status:"invalid-response",body:n}}s();function A(t,e){if(e==="text"){m(t.body);return}if(t.status==="invalid-response")throw new i("Search returned an invalid documentation response.");m(p.encode({results:t.results,pageInfo:t.pageInfo}))}var u=P(I(),1),f=class t extends v{static descriptionWithMarkdown="Query the shopify.dev vector store and print the most relevant documentation chunks as JSON. Best for programmatic discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`.";static description=this.descriptionForHelp();static examples=[`# search shopify.dev for a topic
2
2
  shopify doc search --query "subscribe to webhooks"
3
3
 
4
4
  # narrow the search to a specific API and version
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-3MYDSQHF.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends o{};export{t as a};
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-3MYDSQHF.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends o{};export{t as a};
@@ -1 +1 @@
1
- import{a as d}from"./chunk-VB7YQMAM.js";import{a as p,b as m}from"./chunk-GXORLBVN.js";import{d as r,j as c}from"./chunk-NDKSG4CC.js";import{a as s}from"./chunk-ZGV3HNEV.js";import{Ma as a}from"./chunk-3C6VLJ5D.js";import{c as n}from"./chunk-Q2SZCZE7.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class u extends s{static summary="Schedules manual-billing subscriptions to migrate to Shopify-managed app pricing.";static descriptionWithMarkdown="Schedules manual-billing subscriptions to migrate to Shopify-managed app pricing.\n\nWhen `--input` is omitted, the command reads CSV data from stdin. Use `--input <path>` to read from a file. `--input -` is also supported as an explicit stdin path.\n\n- Required CSV columns: `shop_id`, `target_plan_handle`, and `price_behavior`.\n- Optional CSV column: `notification`.\n- Example header: `shop_id,target_plan_handle,price_behavior,notification`.\n- Example row: `123456789,pro,HONOR_BILLING_PRICE,WHEN_REQUIRED`.\n\n`price_behavior` must be `HONOR_BILLING_PRICE` or `PLAN_PRICE`. `notification` can be `OPT_OUT` or `WHEN_REQUIRED` and defaults to `WHEN_REQUIRED` when omitted or blank.\n\nValidation is atomic: the command submits no operations unless the entire CSV is valid. Valid rows are submitted in batches of 250 shops. Preserve every operation GID printed by the command so you can check or cancel the submitted operations.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.\n\nUse `--force` to skip confirmation and immediately submit every valid row. With `--watch`, human-readable output shows accepted identifiers before polling begins, then displays operation progress and the final outcome. With `--json --watch`, the command outputs one structured JSON document after every operation reaches a terminal status.";static description=this.descriptionForHelp();static examples=["<%= config.bin %> <%= command.id %> --input migrations.csv --force","cat migrations.csv | <%= config.bin %> <%= command.id %> --force","<%= config.bin %> <%= command.id %> --input migrations.csv --path ../my-app --config staging --force --json","<%= config.bin %> <%= command.id %> --input migrations.csv --client-id <client-id> --force","<%= config.bin %> <%= command.id %> --input - --force --watch"];static flags={...r,...n};static get jsonOutputSchema(){return c}async run(){let{flags:i}=await this.parse(u),{app:l,remoteApp:h}=await a({directory:i.path,clientId:i["client-id"],forceRelink:i.reset,userProvidedConfigName:i.config}),f=await d({action:"schedule",input:i.input??"-",clientId:h.apiKey,skipConfirmation:i.force,watch:i.watch,...i.watch&&!i.json?{onSubmissionAccepted:p}:{}}),e=m(f,{json:i.json,watch:i.watch});return e!==0&&(process.exitCode=e),{app:l}}};export{t as a};
1
+ import{a as d}from"./chunk-QEKGGTMN.js";import{a as p,b as m}from"./chunk-62EOM3Y2.js";import{d as r,j as c}from"./chunk-PDZBKVWL.js";import{a as s}from"./chunk-VHZ6RL67.js";import{Ma as a}from"./chunk-U2T5HPRD.js";import{c as n}from"./chunk-3KM5ZOW2.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class u extends s{static summary="Schedules manual-billing subscriptions to migrate to Shopify-managed app pricing.";static descriptionWithMarkdown="Schedules manual-billing subscriptions to migrate to Shopify-managed app pricing.\n\nWhen `--input` is omitted, the command reads CSV data from stdin. Use `--input <path>` to read from a file. `--input -` is also supported as an explicit stdin path.\n\n- Required CSV columns: `shop_id`, `target_plan_handle`, and `price_behavior`.\n- Optional CSV column: `notification`.\n- Example header: `shop_id,target_plan_handle,price_behavior,notification`.\n- Example row: `123456789,pro,HONOR_BILLING_PRICE,WHEN_REQUIRED`.\n\n`price_behavior` must be `HONOR_BILLING_PRICE` or `PLAN_PRICE`. `notification` can be `OPT_OUT` or `WHEN_REQUIRED` and defaults to `WHEN_REQUIRED` when omitted or blank.\n\nValidation is atomic: the command submits no operations unless the entire CSV is valid. Valid rows are submitted in batches of 250 shops. Preserve every operation GID printed by the command so you can check or cancel the submitted operations.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.\n\nUse `--force` to skip confirmation and immediately submit every valid row. With `--watch`, human-readable output shows accepted identifiers before polling begins, then displays operation progress and the final outcome. With `--json --watch`, the command outputs one structured JSON document after every operation reaches a terminal status.";static description=this.descriptionForHelp();static examples=["<%= config.bin %> <%= command.id %> --input migrations.csv --force","cat migrations.csv | <%= config.bin %> <%= command.id %> --force","<%= config.bin %> <%= command.id %> --input migrations.csv --path ../my-app --config staging --force --json","<%= config.bin %> <%= command.id %> --input migrations.csv --client-id <client-id> --force","<%= config.bin %> <%= command.id %> --input - --force --watch"];static flags={...r,...n};static get jsonOutputSchema(){return c}async run(){let{flags:i}=await this.parse(u),{app:l,remoteApp:h}=await a({directory:i.path,clientId:i["client-id"],forceRelink:i.reset,userProvidedConfigName:i.config}),f=await d({action:"schedule",input:i.input??"-",clientId:h.apiKey,skipConfirmation:i.force,watch:i.watch,...i.watch&&!i.json?{onSubmissionAccepted:p}:{}}),e=m(f,{json:i.json,watch:i.watch});return e!==0&&(process.exitCode=e),{app:l}}};export{t as a};
@@ -1 +1 @@
1
- import{a as f,b as h}from"./chunk-3LVCG4JB.js";import{f as d,k as u,r as l}from"./chunk-NDKSG4CC.js";import{a as m}from"./chunk-ZGV3HNEV.js";import{Ma as c}from"./chunk-3C6VLJ5D.js";import{c as p}from"./chunk-Q2SZCZE7.js";import{h as s}from"./chunk-2VSNFOKD.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();e();async function g({clientId:a,operationIds:t,getOperation:n=l}){return Promise.all(t.map(async i=>{let o=await n({clientId:a,operationId:i});if(!o)throw new s(`Migration operation not found: ${i}`);return o}))}var r=class a extends m{static summary="Checks the status of app subscription migration operations.";static descriptionWithMarkdown="Checks app subscription migration operation status.\n\nRepeat `--id` for every operation GID returned by a multi-batch submission. With `--watch`, the command displays the current state while polling and outputs the final state after all requested operations reach a terminal status.\n\n`RUNNING` means an operation is still processing. `COMPLETED` means processing finished, but you must inspect the per-shop results to confirm each outcome. `FAILED` means the operation failed, and `CANCELED` means cancellation stopped further processing.\n\nUse `--json` to output every operation and its per-shop results as structured JSON.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.";static description=this.descriptionForHelp();static examples=["<%= config.bin %> <%= command.id %> --id <operation-id>","<%= config.bin %> <%= command.id %> --path ../my-app --config staging --id <operation-id-1> --id <operation-id-2> --watch","<%= config.bin %> <%= command.id %> --client-id <client-id> --id <operation-id> --json"];static flags={...d,...p};static get jsonOutputSchema(){return u}async run(){let{flags:t}=await this.parse(a),{app:n,remoteApp:i}=await c({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),o=t.watch?await h({clientId:i.apiKey,operationIds:t.id}):await g({clientId:i.apiKey,operationIds:t.id});return f(o,t.json),{app:n}}};export{r as a};
1
+ import{a as f,b as h}from"./chunk-J5ERDFIC.js";import{f as d,k as u,r as l}from"./chunk-PDZBKVWL.js";import{a as m}from"./chunk-VHZ6RL67.js";import{Ma as c}from"./chunk-U2T5HPRD.js";import{c as p}from"./chunk-3KM5ZOW2.js";import{h as s}from"./chunk-M5VIFG2V.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();e();async function g({clientId:a,operationIds:t,getOperation:n=l}){return Promise.all(t.map(async i=>{let o=await n({clientId:a,operationId:i});if(!o)throw new s(`Migration operation not found: ${i}`);return o}))}var r=class a extends m{static summary="Checks the status of app subscription migration operations.";static descriptionWithMarkdown="Checks app subscription migration operation status.\n\nRepeat `--id` for every operation GID returned by a multi-batch submission. With `--watch`, the command displays the current state while polling and outputs the final state after all requested operations reach a terminal status.\n\n`RUNNING` means an operation is still processing. `COMPLETED` means processing finished, but you must inspect the per-shop results to confirm each outcome. `FAILED` means the operation failed, and `CANCELED` means cancellation stopped further processing.\n\nUse `--json` to output every operation and its per-shop results as structured JSON.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.";static description=this.descriptionForHelp();static examples=["<%= config.bin %> <%= command.id %> --id <operation-id>","<%= config.bin %> <%= command.id %> --path ../my-app --config staging --id <operation-id-1> --id <operation-id-2> --watch","<%= config.bin %> <%= command.id %> --client-id <client-id> --id <operation-id> --json"];static flags={...d,...p};static get jsonOutputSchema(){return u}async run(){let{flags:t}=await this.parse(a),{app:n,remoteApp:i}=await c({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),o=t.watch?await h({clientId:i.apiKey,operationIds:t.id}):await g({clientId:i.apiKey,operationIds:t.id});return f(o,t.json),{app:n}}};export{r as a};