@shopify/cli 4.4.0 → 4.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/dist/{analytics-DWUYMFHO.js → analytics-CIKTYXZ6.js} +1 -1
  2. package/dist/{analytics-SOXP4UBD.js → analytics-DM7CBV2M.js} +1 -1
  3. package/dist/assets/hydrogen/starter/CHANGELOG.md +8 -0
  4. package/dist/assets/hydrogen/starter/README.md +4 -4
  5. package/dist/assets/hydrogen/starter/package.json +1 -1
  6. package/dist/assets/hydrogen/starter/vite.config.ts +6 -0
  7. package/dist/bootstrap.js +1 -1
  8. package/dist/{chunk-DLNBTHKL.js → chunk-2FIDORHT.js} +1 -1
  9. package/dist/{chunk-HA6NISOZ.js → chunk-2GDACKZF.js} +1 -1
  10. package/dist/{chunk-5W443CKL.js → chunk-2HZMOK4U.js} +2 -2
  11. package/dist/{chunk-7UOPCYMV.js → chunk-2MNOWKMI.js} +1 -1
  12. package/dist/{chunk-J3HXFQ2L.js → chunk-2WDKXDFM.js} +1 -1
  13. package/dist/{chunk-ZEENHLSC.js → chunk-3GMW7IEC.js} +2 -2
  14. package/dist/{chunk-WRRUFK4Y.js → chunk-3QVXHF6I.js} +1 -1
  15. package/dist/{chunk-POAICASX.js → chunk-3SJHCEQR.js} +1 -1
  16. package/dist/{chunk-7LATYPLU.js → chunk-3YCTWCHH.js} +1 -1
  17. package/dist/{chunk-2EROVVCL.js → chunk-4E354M4H.js} +1 -1
  18. package/dist/{chunk-47MGPVED.js → chunk-4TC4M4RC.js} +1 -1
  19. package/dist/{chunk-J5TNYNR5.js → chunk-5JCREGSD.js} +1 -1
  20. package/dist/{chunk-QPN2M26G.js → chunk-5K4DONQJ.js} +1 -1
  21. package/dist/{chunk-2NWWMNU5.js → chunk-5NY4HKJF.js} +1 -1
  22. package/dist/{chunk-BIMOHK2P.js → chunk-5PLLJPEW.js} +1 -1
  23. package/dist/{chunk-PJYNAUQB.js → chunk-5T3OVTF5.js} +1 -1
  24. package/dist/{chunk-73W5BGAZ.js → chunk-5U6MXSNY.js} +1 -1
  25. package/dist/{chunk-AY4GIVME.js → chunk-5UXPTCSD.js} +1 -1
  26. package/dist/{chunk-G2I2ZUBV.js → chunk-6XLVKD6Q.js} +1 -1
  27. package/dist/{chunk-DZLA2RJP.js → chunk-6Y3QXASG.js} +1 -1
  28. package/dist/{chunk-DHBYYHBT.js → chunk-6ZMNEURG.js} +1 -1
  29. package/dist/chunk-6ZRHK4ON.js +1 -0
  30. package/dist/{chunk-GTUKM3ZW.js → chunk-72K36DID.js} +1 -1
  31. package/dist/{chunk-FPLUMESQ.js → chunk-7USHLXEN.js} +1 -1
  32. package/dist/{chunk-ZAMDXIVC.js → chunk-7XQDZF73.js} +1 -1
  33. package/dist/{chunk-OORCODNK.js → chunk-7ZLKT2TB.js} +1 -1
  34. package/dist/{chunk-HCN6HXA5.js → chunk-AH2ZJ73H.js} +1 -1
  35. package/dist/{chunk-SP2WUATO.js → chunk-AI756VJI.js} +1 -1
  36. package/dist/{chunk-UYK6CXAU.js → chunk-ALQKJAHP.js} +1 -1
  37. package/dist/{chunk-PMXCJIBP.js → chunk-APYASWBA.js} +1 -1
  38. package/dist/{chunk-J2WCMQZZ.js → chunk-ASOT7VNB.js} +1 -1
  39. package/dist/{chunk-MFLQRQQT.js → chunk-AVMNXIXF.js} +1 -1
  40. package/dist/{chunk-7SVMAJTR.js → chunk-BEXQB4RT.js} +1 -1
  41. package/dist/{chunk-Y3WIZSRU.js → chunk-BVFIJSD7.js} +1 -1
  42. package/dist/{chunk-45MEVWH5.js → chunk-BZAZMLII.js} +1 -1
  43. package/dist/{chunk-HZYRCG4R.js → chunk-C5U4NLNU.js} +1 -1
  44. package/dist/{chunk-PETINPMX.js → chunk-CGULQAB5.js} +1 -1
  45. package/dist/{chunk-HZSAUZBX.js → chunk-CNOL26GA.js} +1 -1
  46. package/dist/{chunk-V3RZ3DTW.js → chunk-COTYR5RC.js} +1 -1
  47. package/dist/{chunk-NADNFSKS.js → chunk-DA4LHFJQ.js} +1 -1
  48. package/dist/{chunk-Y66GQ6V2.js → chunk-DCUAVLTM.js} +1 -1
  49. package/dist/{chunk-FA4K3JRN.js → chunk-DDVT2K7E.js} +1 -1
  50. package/dist/{chunk-OQORDQLH.js → chunk-DE3WCNP6.js} +1 -1
  51. package/dist/{chunk-V6ZSIUO3.js → chunk-DKKBJ4H5.js} +1 -1
  52. package/dist/{chunk-ZZFZBFVM.js → chunk-DQE7XRCK.js} +1 -1
  53. package/dist/{chunk-PZYP3MCL.js → chunk-DU5LZYQX.js} +1 -1
  54. package/dist/{chunk-6EZ7JWBK.js → chunk-E24W34C4.js} +4 -4
  55. package/dist/{chunk-TKG42KLM.js → chunk-E7OLCSAL.js} +1 -1
  56. package/dist/{chunk-5QWYIBE6.js → chunk-EAXEV45I.js} +1 -1
  57. package/dist/{chunk-I73E3BD5.js → chunk-EDSKA6UB.js} +1 -1
  58. package/dist/{chunk-WKBVT5WG.js → chunk-ELIH6GCC.js} +1 -1
  59. package/dist/{chunk-QJ7TI6CK.js → chunk-EXQXGSGY.js} +1 -1
  60. package/dist/{chunk-DONEJHDG.js → chunk-EYDNSYYE.js} +2 -2
  61. package/dist/{chunk-SKLUHLS2.js → chunk-FO6FNY6P.js} +1 -1
  62. package/dist/{chunk-UUC5YKAS.js → chunk-FOPGI6GO.js} +1 -1
  63. package/dist/{chunk-H6WN7GP4.js → chunk-FPCPFECH.js} +1 -1
  64. package/dist/{chunk-YGKQCEVG.js → chunk-G7QLHXVA.js} +1 -1
  65. package/dist/{chunk-3OZ6ZZ4T.js → chunk-GAYQKMOM.js} +1 -1
  66. package/dist/{chunk-SWI3LCPE.js → chunk-GKQ6CSJZ.js} +1 -1
  67. package/dist/{chunk-IPQH2RHD.js → chunk-GQG6WELZ.js} +1 -1
  68. package/dist/{chunk-YQH2JHFA.js → chunk-GXUZ3V7S.js} +1 -1
  69. package/dist/{chunk-TJGUNVRI.js → chunk-H3QZN45D.js} +1 -1
  70. package/dist/{chunk-X4DIJTIK.js → chunk-H7DDRARV.js} +1 -1
  71. package/dist/{chunk-G24L7MB3.js → chunk-H7PNMMDO.js} +1 -1
  72. package/dist/{chunk-733R5OKQ.js → chunk-HHSUBF73.js} +1 -1
  73. package/dist/{chunk-IX4KP6E3.js → chunk-HXYWEKMS.js} +1 -1
  74. package/dist/{chunk-GKRCTMWY.js → chunk-IBBFRL3Y.js} +1 -1
  75. package/dist/{chunk-5GVXMNC4.js → chunk-ICFFBMFB.js} +1 -1
  76. package/dist/{chunk-UKK5P74A.js → chunk-IDKUJQIG.js} +3 -3
  77. package/dist/{chunk-EKHWL542.js → chunk-IHUCBI6L.js} +47 -47
  78. package/dist/{chunk-G2S346IS.js → chunk-IIHPONSQ.js} +1 -1
  79. package/dist/{chunk-JAW32T6G.js → chunk-IOU6EKTT.js} +1 -1
  80. package/dist/{chunk-3CYHS4W2.js → chunk-IQYZAALJ.js} +1 -1
  81. package/dist/{chunk-442S5SDM.js → chunk-IRH6IGFT.js} +1 -1
  82. package/dist/{chunk-WNWQSHEC.js → chunk-IRTCLR3F.js} +1 -1
  83. package/dist/chunk-J3KRY2SD.js +1 -0
  84. package/dist/{chunk-KKUDXLK2.js → chunk-JCNRQYRP.js} +1 -1
  85. package/dist/{chunk-F5QG42MA.js → chunk-JNEGEJH6.js} +1 -1
  86. package/dist/{chunk-J7UQBC45.js → chunk-JO4ZHVOD.js} +1 -1
  87. package/dist/{chunk-JOZXRV5K.js → chunk-JOYM7AEQ.js} +1 -1
  88. package/dist/{chunk-ZULTG2D2.js → chunk-JVMYTC3J.js} +1 -1
  89. package/dist/{chunk-PUAMSBXS.js → chunk-KC2TN7AR.js} +1 -1
  90. package/dist/{chunk-CD5O2BIT.js → chunk-KHXDP3SF.js} +1 -1
  91. package/dist/{chunk-6YPEONHB.js → chunk-KOB6T6NK.js} +1 -1
  92. package/dist/{chunk-YLGSM42I.js → chunk-KOUKBXOZ.js} +1 -1
  93. package/dist/{chunk-KN3FTJDU.js → chunk-LUG2BZJP.js} +1 -1
  94. package/dist/{chunk-AT2GDXN7.js → chunk-M2AS5BWX.js} +1 -1
  95. package/dist/{chunk-67KMRBSZ.js → chunk-MCATVWHC.js} +1 -1
  96. package/dist/{chunk-DQ4HA72R.js → chunk-MKCXLBQ4.js} +1 -1
  97. package/dist/{chunk-C3CVLSLS.js → chunk-MMKBIMMC.js} +1 -1
  98. package/dist/{chunk-2MMGFZDP.js → chunk-MOCD7GFI.js} +1 -1
  99. package/dist/{chunk-XH6ZP7M5.js → chunk-MQXSMZQZ.js} +1 -1
  100. package/dist/{chunk-VQW35HIQ.js → chunk-MYQQOOGA.js} +1 -1
  101. package/dist/{chunk-75LJTY7F.js → chunk-N5HGT3TE.js} +1 -1
  102. package/dist/{chunk-VFWWZMOQ.js → chunk-NGPJXONG.js} +1 -1
  103. package/dist/{chunk-U73TPLFE.js → chunk-NV5IDANV.js} +1 -1
  104. package/dist/{chunk-GFCLUGAG.js → chunk-O2PI2PYG.js} +1 -1
  105. package/dist/{chunk-KSZ5K6LJ.js → chunk-O7MONSF7.js} +1 -1
  106. package/dist/{chunk-VOJWKGCW.js → chunk-OASPW2P2.js} +1 -1
  107. package/dist/{chunk-Z4LC3WE5.js → chunk-OCYPWE2O.js} +1 -1
  108. package/dist/{chunk-SXTDVUT3.js → chunk-ODH2U44N.js} +1 -1
  109. package/dist/{chunk-4N6YTHFD.js → chunk-OHASEW7T.js} +1 -1
  110. package/dist/{chunk-IIOIDMG3.js → chunk-OVLTFTZW.js} +1 -1
  111. package/dist/{chunk-Z74QYLNC.js → chunk-P6S5YLOP.js} +1 -1
  112. package/dist/{chunk-GUO7S4NW.js → chunk-PGKP7W5T.js} +1 -1
  113. package/dist/{chunk-LOHUNOQ7.js → chunk-PGN5EZTI.js} +1 -1
  114. package/dist/chunk-PGODIZ64.js +1 -0
  115. package/dist/{chunk-D6YDSGR4.js → chunk-PTIJDS6I.js} +1 -1
  116. package/dist/{chunk-3FBSBMSQ.js → chunk-Q2UHGP2Z.js} +1 -1
  117. package/dist/{chunk-RF6NUGCU.js → chunk-Q2X7IXPQ.js} +1 -1
  118. package/dist/{chunk-H5C3QTOO.js → chunk-Q6LCSRIW.js} +1 -1
  119. package/dist/{chunk-ZIREP3EZ.js → chunk-QDYDB7DY.js} +1 -1
  120. package/dist/{chunk-WLO5H255.js → chunk-QMSYJIAU.js} +1 -1
  121. package/dist/{chunk-T5GSCWN5.js → chunk-QPJQ67GU.js} +1 -1
  122. package/dist/{chunk-QS3FMN67.js → chunk-QPY6WJTT.js} +1 -1
  123. package/dist/{chunk-WAGAC3YI.js → chunk-QVYZZNAS.js} +1 -1
  124. package/dist/{chunk-CZXGQ53M.js → chunk-RFDT525K.js} +1 -1
  125. package/dist/{chunk-NY5OGHM5.js → chunk-RIRSTGFU.js} +1 -1
  126. package/dist/{chunk-APN3VWN4.js → chunk-SFMXFH33.js} +1 -1
  127. package/dist/{chunk-NWDP5IZ2.js → chunk-SKM44SK5.js} +1 -1
  128. package/dist/{chunk-O6KTFMCD.js → chunk-SRAHMYWJ.js} +1 -1
  129. package/dist/{chunk-OAI7VSLW.js → chunk-T3AJL2M5.js} +1 -1
  130. package/dist/{chunk-B7S23DLF.js → chunk-T5DF2GGD.js} +1 -1
  131. package/dist/{chunk-6DIHOMCB.js → chunk-TDCY3BRI.js} +1 -1
  132. package/dist/{chunk-5JNEWYD5.js → chunk-TDSR2X7X.js} +1 -1
  133. package/dist/{chunk-IG6LPVS4.js → chunk-TVU4YD2H.js} +1 -1
  134. package/dist/{chunk-FZKKKGUJ.js → chunk-TXJEP4FB.js} +1 -1
  135. package/dist/{chunk-LOQIRLTD.js → chunk-U2LQBJJL.js} +1 -1
  136. package/dist/{chunk-WZVQHMGI.js → chunk-U7ZRDNZU.js} +1 -1
  137. package/dist/{chunk-RYGZCBO4.js → chunk-UB5BVO76.js} +1 -1
  138. package/dist/{chunk-LCPD2BYX.js → chunk-UHJ65YFN.js} +1 -1
  139. package/dist/{chunk-5QQN3SKH.js → chunk-UYNCJGMC.js} +1 -1
  140. package/dist/{chunk-ATXODH6C.js → chunk-UZ7U322K.js} +1 -1
  141. package/dist/{chunk-HZMP62GK.js → chunk-VHAZBDFE.js} +1 -1
  142. package/dist/{chunk-GW3VY3FZ.js → chunk-VRRDIXFQ.js} +2 -2
  143. package/dist/{chunk-MZMYBFZQ.js → chunk-VSZS3FAJ.js} +1 -1
  144. package/dist/{chunk-B7BUEEBR.js → chunk-WIXW233Y.js} +1 -1
  145. package/dist/{chunk-CPE7XCC6.js → chunk-WMDYHUPS.js} +1 -1
  146. package/dist/{chunk-DO2SHYFU.js → chunk-WO5YOBQ7.js} +1 -1
  147. package/dist/{chunk-4TST2MNC.js → chunk-XDEAZP2I.js} +1 -1
  148. package/dist/{chunk-GBZL4TTY.js → chunk-XH5FCMS5.js} +1 -1
  149. package/dist/chunk-XU6CCL4P.js +278 -0
  150. package/dist/{chunk-XV3I45NA.js → chunk-XWQ72WTQ.js} +1 -1
  151. package/dist/chunk-YB3SGPFF.js +1 -0
  152. package/dist/{chunk-QMXKGSFH.js → chunk-YBFCDINU.js} +1 -1
  153. package/dist/{chunk-BCD4KTLJ.js → chunk-YJCJDCVP.js} +1 -1
  154. package/dist/{chunk-TQUSREKP.js → chunk-YYHCPLBX.js} +1 -1
  155. package/dist/{chunk-6RL7FUPD.js → chunk-YZY4M6IH.js} +1 -1
  156. package/dist/{chunk-WVHB2HCQ.js → chunk-ZDQNCYRH.js} +1 -1
  157. package/dist/{chunk-7EJ4UVYI.js → chunk-ZHPXJRHR.js} +1 -1
  158. package/dist/{chunk-YYL356OX.js → chunk-ZNWFTUFV.js} +1 -1
  159. package/dist/{chunk-ZQ5JVD5X.js → chunk-ZVQBSXE4.js} +1 -1
  160. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  161. package/dist/cli/commands/app/build.js +1 -1
  162. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  163. package/dist/cli/commands/app/bulk/execute.js +1 -1
  164. package/dist/cli/commands/app/bulk/status.js +1 -1
  165. package/dist/cli/commands/app/config/link.js +1 -1
  166. package/dist/cli/commands/app/config/pull.js +1 -1
  167. package/dist/cli/commands/app/config/use.js +1 -1
  168. package/dist/cli/commands/app/config/validate.js +1 -1
  169. package/dist/cli/commands/app/demo/watcher.js +1 -1
  170. package/dist/cli/commands/app/deploy.js +1 -1
  171. package/dist/cli/commands/app/dev/clean.js +1 -1
  172. package/dist/cli/commands/app/dev.js +1 -1
  173. package/dist/cli/commands/app/env/pull.js +1 -1
  174. package/dist/cli/commands/app/env/show.js +1 -1
  175. package/dist/cli/commands/app/execute.js +1 -1
  176. package/dist/cli/commands/app/function/build.js +1 -1
  177. package/dist/cli/commands/app/function/info.js +1 -1
  178. package/dist/cli/commands/app/function/replay.js +1 -1
  179. package/dist/cli/commands/app/function/run.js +1 -1
  180. package/dist/cli/commands/app/function/schema.js +1 -1
  181. package/dist/cli/commands/app/function/typegen.js +1 -1
  182. package/dist/cli/commands/app/generate/extension.js +1 -1
  183. package/dist/cli/commands/app/graphiql.js +1 -1
  184. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  185. package/dist/cli/commands/app/import-extensions.js +1 -1
  186. package/dist/cli/commands/app/info.js +1 -1
  187. package/dist/cli/commands/app/init.js +1 -1
  188. package/dist/cli/commands/app/logs.js +1 -1
  189. package/dist/cli/commands/app/release.js +1 -1
  190. package/dist/cli/commands/app/versions/list.js +1 -1
  191. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  192. package/dist/cli/commands/auth/login.js +1 -1
  193. package/dist/cli/commands/auth/logout.js +1 -1
  194. package/dist/cli/commands/cache/clear.js +1 -1
  195. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  196. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  197. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  198. package/dist/cli/commands/debug/command-flags.js +1 -1
  199. package/dist/cli/commands/doc/fetch.js +1 -1
  200. package/dist/cli/commands/doc/search.js +1 -1
  201. package/dist/cli/commands/docs/generate.js +1 -1
  202. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  203. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  204. package/dist/cli/commands/help.js +1 -1
  205. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  206. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  207. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  208. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  209. package/dist/cli/commands/notifications/generate.js +1 -1
  210. package/dist/cli/commands/notifications/list.js +1 -1
  211. package/dist/cli/commands/organization/list.js +1 -1
  212. package/dist/cli/commands/search.js +1 -1
  213. package/dist/cli/commands/theme/check.js +1 -1
  214. package/dist/cli/commands/theme/console.js +1 -1
  215. package/dist/cli/commands/theme/delete.js +1 -1
  216. package/dist/cli/commands/theme/dev.js +1 -1
  217. package/dist/cli/commands/theme/duplicate.js +1 -1
  218. package/dist/cli/commands/theme/info.js +1 -1
  219. package/dist/cli/commands/theme/init.js +1 -1
  220. package/dist/cli/commands/theme/language-server.js +1 -1
  221. package/dist/cli/commands/theme/list.js +1 -1
  222. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  223. package/dist/cli/commands/theme/open.js +1 -1
  224. package/dist/cli/commands/theme/package.js +1 -1
  225. package/dist/cli/commands/theme/preview.js +1 -1
  226. package/dist/cli/commands/theme/profile.js +1 -1
  227. package/dist/cli/commands/theme/publish.js +1 -1
  228. package/dist/cli/commands/theme/pull.js +1 -1
  229. package/dist/cli/commands/theme/push.js +1 -1
  230. package/dist/cli/commands/theme/rename.js +1 -1
  231. package/dist/cli/commands/theme/share.js +1 -1
  232. package/dist/cli/commands/upgrade.js +1 -1
  233. package/dist/cli/commands/version.js +1 -1
  234. package/dist/command-registry.js +1 -1
  235. package/dist/{conf-store-C2LOYIOU.js → conf-store-OC4XCP45.js} +1 -1
  236. package/dist/{deprecations-QOHE6JG6.js → deprecations-M5JGGK47.js} +1 -1
  237. package/dist/dist-3SP7TISC.js +1 -0
  238. package/dist/{dist-FF6C4ZHS.js → dist-Z4H2OM7V.js} +1 -1
  239. package/dist/{environments-EGD263DV.js → environments-ZLSO534C.js} +1 -1
  240. package/dist/{error-66U2HJ37.js → error-ZBG2MA5U.js} +1 -1
  241. package/dist/{error-handler-SW2ALZ5Z.js → error-handler-MCUV4RZV.js} +1 -1
  242. package/dist/{fs-JPQRUGZI.js → fs-7LCRIUF3.js} +1 -1
  243. package/dist/hooks/app-init.js +1 -1
  244. package/dist/hooks/did-you-mean.js +1 -1
  245. package/dist/hooks/hydrogen-init.js +1 -1
  246. package/dist/hooks/postrun.js +1 -1
  247. package/dist/hooks/prerun.js +1 -1
  248. package/dist/hooks/public-metadata.js +1 -1
  249. package/dist/hooks/sensitive-metadata.js +1 -1
  250. package/dist/hooks/tunnel-provider.js +1 -1
  251. package/dist/hooks/tunnel-start.js +1 -1
  252. package/dist/index.js +14 -14
  253. package/dist/{is-global-QWTDUPNR.js → is-global-RURDJZDU.js} +1 -1
  254. package/dist/{local-FRYN3NWL.js → local-5AKD7T5X.js} +1 -1
  255. package/dist/{local-storage-DFH3LT5G.js → local-storage-TJU77VRQ.js} +1 -1
  256. package/dist/{metadata-KZVLHQII.js → metadata-D5GLZOLV.js} +1 -1
  257. package/dist/{node-package-manager-LVFBY4LY.js → node-package-manager-FA3Y6DPG.js} +1 -1
  258. package/dist/notifications-system-76GJJAJP.js +1 -0
  259. package/dist/{output-NH4I5Y3C.js → output-FYS764MJ.js} +1 -1
  260. package/dist/{system-GNOF6HMI.js → system-KDM2BB7R.js} +1 -1
  261. package/dist/tsconfig.tsbuildinfo +1 -1
  262. package/dist/{ui-QOGKADWB.js → ui-QIHGXICT.js} +1 -1
  263. package/dist/upgrade-DY4L43H4.js +1 -0
  264. package/dist/{version-FJFTTOZU.js → version-LULWCT5R.js} +1 -1
  265. package/dist/version-WIERCO5R.js +1 -0
  266. package/dist/{workerd-U6WWWY73.js → workerd-N25GY5MX.js} +1 -1
  267. package/oclif.manifest.json +21 -7
  268. package/package.json +8 -8
  269. package/dist/chunk-FU232KQ7.js +0 -1
  270. package/dist/chunk-HM5H7WBE.js +0 -1
  271. package/dist/chunk-MQICT2LR.js +0 -1
  272. package/dist/chunk-UMT7DWR4.js +0 -1
  273. package/dist/chunk-ZIXWWU2N.js +0 -275
  274. package/dist/dist-Q676YGVI.js +0 -1
  275. package/dist/notifications-system-DP443VTE.js +0 -1
  276. package/dist/upgrade-K4S6JW64.js +0 -1
  277. package/dist/version-ZI4GZX72.js +0 -1
  278. /package/dist/{morph-CG6HEMCQ.js → morph-QZGREMO2.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as C}from"./chunk-HM5H7WBE.js";import{a as E}from"./chunk-ZAMDXIVC.js";import{Fa as y,W as F,X as _,Y as x}from"./chunk-ATXODH6C.js";import{b as I}from"./chunk-H5C3QTOO.js";import{D as A,v,x as h}from"./chunk-6EZ7JWBK.js";import{d as w}from"./chunk-WRRUFK4Y.js";import{f as k}from"./chunk-WKBVT5WG.js";import{r as b}from"./chunk-T6CC5WUU.js";import{e as T,g as d}from"./chunk-VKWPEFWQ.js";d();d();async function P(n){let{developerPlatformClient:e,app:m,remoteApp:o}=n,{extensionIdentifiersBreakdown:a,versionDetails:r}=await F(e,o,n.version),l=await _({developerPlatformClient:e,apiKey:o.apiKey,localApp:m,remoteApp:o,versionAppModules:r.appModuleVersions.map(t=>({...t})),release:!0});if(!await x({configExtensionIdentifiersBreakdown:l,extensionIdentifiersBreakdown:a,appTitle:o.title,release:!0,force:n.force,allowUpdates:n.allowUpdates,allowDeletes:n.allowDeletes}))throw new k;let f=[{title:"Releasing version",task:async t=>{t.appRelease=await e.release({app:o,version:{versionId:r.uuid,appVersionId:r.id}})}}],{appRelease:{appRelease:i}}=await A(f),u=[{link:{label:r.versionTag??void 0,url:r.location}},r.message?`
1
+ import{a as C}from"./chunk-6ZRHK4ON.js";import{a as E}from"./chunk-7XQDZF73.js";import{Fa as y,W as F,X as _,Y as x}from"./chunk-UZ7U322K.js";import{b as I}from"./chunk-Q6LCSRIW.js";import{D as A,v,x as h}from"./chunk-E24W34C4.js";import{d as w}from"./chunk-3QVXHF6I.js";import{f as k}from"./chunk-ELIH6GCC.js";import{r as b}from"./chunk-T6CC5WUU.js";import{e as T,g as d}from"./chunk-VKWPEFWQ.js";d();d();async function P(n){let{developerPlatformClient:e,app:m,remoteApp:o}=n,{extensionIdentifiersBreakdown:a,versionDetails:r}=await F(e,o,n.version),l=await _({developerPlatformClient:e,apiKey:o.apiKey,localApp:m,remoteApp:o,versionAppModules:r.appModuleVersions.map(t=>({...t})),release:!0});if(!await x({configExtensionIdentifiersBreakdown:l,extensionIdentifiersBreakdown:a,appTitle:o.title,release:!0,force:n.force,allowUpdates:n.allowUpdates,allowDeletes:n.allowDeletes}))throw new k;let f=[{title:"Releasing version",task:async t=>{t.appRelease=await e.release({app:o,version:{versionId:r.uuid,appVersionId:r.id}})}}],{appRelease:{appRelease:i}}=await A(f),u=[{link:{label:r.versionTag??void 0,url:r.location}},r.message?`
2
2
  ${r.message}`:""];if(i.userErrors&&i.userErrors.length>0){let t=i.userErrors?.map(R=>R.message).join(", ");h({headline:"Version couldn't be released.",body:[...u,`${u.length>0?`
3
3
 
4
4
  `:""}${t}`]})}else v({headline:"Version released to users.",body:u})}var p=T(b(),1);var g,s=class extends C{async run(){let{flags:e}=await this.parse(g),m=e["client-id"];await w(()=>({cmd_app_reset_used:e.reset}));let o=e["allow-updates"],a=e["allow-deletes"],r=!!(o&&a),l=[];!o&&!a&&l.push("allow-updates"),this.failMissingNonTTYFlags(e,l);let{app:c,remoteApp:f,developerPlatformClient:i}=await y({directory:e.path,clientId:m,forceRelink:e.reset,userProvidedConfigName:e.config});return await P({app:c,remoteApp:f,developerPlatformClient:i,force:r,allowUpdates:o,allowDeletes:a,version:e.version}),{app:c}}};g=s;s.summary="Release an app version.";s.usage="app release --version <version>";s.descriptionWithMarkdown="Releases an existing app version. Pass the name of the version that you want to release using the `--version` flag.";s.description=g.descriptionWithoutMarkdown();s.flags={...I,...E,"allow-updates":p.Flags.boolean({hidden:!1,description:"Allows adding and updating extensions and configuration without requiring user confirmation. Recommended option for CI/CD environments.",env:"SHOPIFY_FLAG_ALLOW_UPDATES"}),"allow-deletes":p.Flags.boolean({hidden:!1,description:"Allows removing extensions and configuration without requiring user confirmation. For CI/CD environments, the recommended flag is --allow-updates.",env:"SHOPIFY_FLAG_ALLOW_DELETES"}),version:p.Flags.string({hidden:!1,description:"The name of the app version to release.",env:"SHOPIFY_FLAG_VERSION",required:!0})};var G=s;export{G as a};
@@ -1 +1 @@
1
- import{a as T}from"./chunk-HA6NISOZ.js";import{b as P,c as w,d as v}from"./chunk-7UOPCYMV.js";import{a as F}from"./chunk-MQICT2LR.js";import{a as x}from"./chunk-ZAMDXIVC.js";import{Ga as y}from"./chunk-ATXODH6C.js";import{b as h,c as m}from"./chunk-H5C3QTOO.js";import{B as d,I as l}from"./chunk-6EZ7JWBK.js";import{Pb as r}from"./chunk-DONEJHDG.js";import{r as N}from"./chunk-T6CC5WUU.js";import{e as A,g}from"./chunk-VKWPEFWQ.js";g();var s=A(N(),1);var p,a="_start",e=class extends F{async run(){let{flags:t}=await this.parse(p),n=a,{app:c}=await y({directory:t.path,userProvidedConfigName:t.config}),o=await w(c,t.path);if(t.export!==void 0)r(`Using export ${t.export} from the --export flag.`),n=t.export;else if(o.configuration.targeting!==void 0&&o.configuration.targeting.length>0){let i=o.configuration.targeting;if(i.length>1&&l({})){let b=i.map(f=>({label:f.target,value:f.export||a}));n=await d({message:"Which target would you like to execute?",choices:b})}else n=i?.[0]?.export||a,r(`Using export '${n}'. Use the --export flag or an interactive terminal to select a different export.`)}else r(`No targeting information found. Using the default export '${n}'. Use the --export flag or an interactive terminal to select a different export.`);let u=o?.configuration.targeting?.[0]?.input_query,U=u&&`${o?.directory}/${u}`,_=await v(o,t.path,t["client-id"],t.reset,t.config);return await T({functionExtension:o,json:t.json,inputPath:t.input,export:n,stdin:"inherit",schemaPath:_,queryPath:U}),{app:c}}};p=e;e.summary="Run a function locally for testing.";e.descriptionWithMarkdown="Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors).";e.description=p.descriptionWithoutMarkdown();e.flags={...h,...x,...P,...m,input:s.Flags.string({char:"i",description:"The input JSON to pass to the function. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),export:s.Flags.string({char:"e",hidden:!1,description:"Name of the WebAssembly export to invoke.",env:"SHOPIFY_FLAG_EXPORT"})};var G=e;export{G as a};
1
+ import{a as T}from"./chunk-2GDACKZF.js";import{b as P,c as w,d as v}from"./chunk-2MNOWKMI.js";import{a as F}from"./chunk-YB3SGPFF.js";import{a as x}from"./chunk-7XQDZF73.js";import{Ga as y}from"./chunk-UZ7U322K.js";import{b as h,c as m}from"./chunk-Q6LCSRIW.js";import{B as d,I as l}from"./chunk-E24W34C4.js";import{Pb as r}from"./chunk-EYDNSYYE.js";import{r as N}from"./chunk-T6CC5WUU.js";import{e as A,g}from"./chunk-VKWPEFWQ.js";g();var s=A(N(),1);var p,a="_start",e=class extends F{async run(){let{flags:t}=await this.parse(p),n=a,{app:c}=await y({directory:t.path,userProvidedConfigName:t.config}),o=await w(c,t.path);if(t.export!==void 0)r(`Using export ${t.export} from the --export flag.`),n=t.export;else if(o.configuration.targeting!==void 0&&o.configuration.targeting.length>0){let i=o.configuration.targeting;if(i.length>1&&l({})){let b=i.map(f=>({label:f.target,value:f.export||a}));n=await d({message:"Which target would you like to execute?",choices:b})}else n=i?.[0]?.export||a,r(`Using export '${n}'. Use the --export flag or an interactive terminal to select a different export.`)}else r(`No targeting information found. Using the default export '${n}'. Use the --export flag or an interactive terminal to select a different export.`);let u=o?.configuration.targeting?.[0]?.input_query,U=u&&`${o?.directory}/${u}`,_=await v(o,t.path,t["client-id"],t.reset,t.config);return await T({functionExtension:o,json:t.json,inputPath:t.input,export:n,stdin:"inherit",schemaPath:_,queryPath:U}),{app:c}}};p=e;e.summary="Run a function locally for testing.";e.descriptionWithMarkdown="Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors).";e.description=p.descriptionWithoutMarkdown();e.flags={...h,...x,...P,...m,input:s.Flags.string({char:"i",description:"The input JSON to pass to the function. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),export:s.Flags.string({char:"e",hidden:!1,description:"Name of the WebAssembly export to invoke.",env:"SHOPIFY_FLAG_EXPORT"})};var G=e;export{G as a};
@@ -1 +1 @@
1
- import{a as u}from"./chunk-FPLUMESQ.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();var m=!1;function v(){return m}function y(){let t=0,e=!1,i=setInterval(()=>{if(!e){if(v()||t>=12e4){e=!0,clearInterval(i),u(process.pid,"SIGINT",!1,()=>{process.exit(0)});return}t+=100}},100)}var k=async({config:a,Command:o})=>{await I(o);let t=await import("./metadata-KZVLHQII.js"),{commandStartOptions:e}=t.getAllSensitiveMetadata();e&&await t.addSensitiveMetadata(()=>({commandStartOptions:{...e,endTime:new Date().getTime()}}));let{postrun:i}=await import("./deprecations-QOHE6JG6.js");i(o);let{outputDebug:n}=await import("./output-NH4I5Y3C.js"),r=o.id.replace(/:/g," ");n(`Completed command ${r}`),!r.includes("notifications")&&!r.includes("upgrade")&&await M();let{reportAnalyticsEvent:p}=await import("./analytics-SOXP4UBD.js");await p({config:a,exitMode:"ok"}),m=!0};async function M(){let{versionToAutoUpgrade:a,warnIfUpgradeAvailable:o}=await import("./upgrade-K4S6JW64.js"),t=a();if(!t){await o();return}if(process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1")await l(t);else{let{runAtMinimumInterval:i}=await import("./conf-store-C2LOYIOU.js");await i("auto-upgrade",{days:1},async()=>{await l(t)})}}async function l(a){let[{CLI_KIT_VERSION:o},{isMajorVersionChange:t},{outputWarn:e,outputDebug:i},{getOutputUpdateCLIReminder:n,runCLIUpgrade:r,hasBlockingAutoUpgradeNotification:p},s]=await Promise.all([import("./version-ZI4GZX72.js"),import("./version-FJFTTOZU.js"),import("./output-NH4I5Y3C.js"),import("./upgrade-K4S6JW64.js"),import("./metadata-KZVLHQII.js")]);if(t(o,a)){e(n(a,!0)),await s.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"major_version"}));return}if(await p()){await s.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"blocked_by_notification"}));return}try{await r({autoupgrade:!0}),await s.addPublicMetadata(()=>({env_auto_upgrade_success:!0}))}catch(f){let c=`Auto-upgrade failed: ${f}`;i(c),e(n(a)),await s.addPublicMetadata(()=>({env_auto_upgrade_success:!1}));let[{sendErrorToBugsnag:g},{inferPackageManagerForGlobalCLI:w}]=await Promise.all([import("./error-handler-SW2ALZ5Z.js"),import("./is-global-QWTDUPNR.js")]),_=Object.assign(new Error(c),{packageManager:w(),platform:process.platform,cliVersion:o});await g(_,"expected_error")}}async function I(a){let o=new Date().getTime();if(a&&"analyticsStopCommand"in a&&typeof a.analyticsStopCommand=="function"){let t=a.analyticsStopCommand();if(t){let e=await import("./metadata-KZVLHQII.js"),{commandStartOptions:i}=e.getAllSensitiveMetadata();if(!i)return;await e.addSensitiveMetadata(()=>({commandStartOptions:{...i,startTime:o,startCommand:t}}))}}}export{y as a,k as b};
1
+ import{a as u}from"./chunk-7USHLXEN.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();var m=!1;function v(){return m}function y(){let t=0,e=!1,i=setInterval(()=>{if(!e){if(v()||t>=12e4){e=!0,clearInterval(i),u(process.pid,"SIGINT",!1,()=>{process.exit(0)});return}t+=100}},100)}var k=async({config:a,Command:o})=>{await I(o);let t=await import("./metadata-D5GLZOLV.js"),{commandStartOptions:e}=t.getAllSensitiveMetadata();e&&await t.addSensitiveMetadata(()=>({commandStartOptions:{...e,endTime:new Date().getTime()}}));let{postrun:i}=await import("./deprecations-M5JGGK47.js");i(o);let{outputDebug:n}=await import("./output-FYS764MJ.js"),r=o.id.replace(/:/g," ");n(`Completed command ${r}`),!r.includes("notifications")&&!r.includes("upgrade")&&await M();let{reportAnalyticsEvent:p}=await import("./analytics-DM7CBV2M.js");await p({config:a,exitMode:"ok"}),m=!0};async function M(){let{versionToAutoUpgrade:a,warnIfUpgradeAvailable:o}=await import("./upgrade-DY4L43H4.js"),t=a();if(!t){await o();return}if(process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1")await l(t);else{let{runAtMinimumInterval:i}=await import("./conf-store-OC4XCP45.js");await i("auto-upgrade",{days:1},async()=>{await l(t)})}}async function l(a){let[{CLI_KIT_VERSION:o},{isMajorVersionChange:t},{outputWarn:e,outputDebug:i},{getOutputUpdateCLIReminder:n,runCLIUpgrade:r,hasBlockingAutoUpgradeNotification:p},s]=await Promise.all([import("./version-WIERCO5R.js"),import("./version-LULWCT5R.js"),import("./output-FYS764MJ.js"),import("./upgrade-DY4L43H4.js"),import("./metadata-D5GLZOLV.js")]);if(t(o,a)){e(n(a,!0)),await s.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"major_version"}));return}if(await p()){await s.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"blocked_by_notification"}));return}try{await r({autoupgrade:!0}),await s.addPublicMetadata(()=>({env_auto_upgrade_success:!0}))}catch(f){let c=`Auto-upgrade failed: ${f}`;i(c),e(n(a)),await s.addPublicMetadata(()=>({env_auto_upgrade_success:!1}));let[{sendErrorToBugsnag:g},{inferPackageManagerForGlobalCLI:w}]=await Promise.all([import("./error-handler-MCUV4RZV.js"),import("./is-global-RURDJZDU.js")]),_=Object.assign(new Error(c),{packageManager:w(),platform:process.platform,cliVersion:o});await g(_,"expected_error")}}async function I(a){let o=new Date().getTime();if(a&&"analyticsStopCommand"in a&&typeof a.analyticsStopCommand=="function"){let t=a.analyticsStopCommand();if(t){let e=await import("./metadata-D5GLZOLV.js"),{commandStartOptions:i}=e.getAllSensitiveMetadata();if(!i)return;await e.addSensitiveMetadata(()=>({commandStartOptions:{...i,startTime:o,startCommand:t}}))}}}export{y as a,k as b};
@@ -1 +1 @@
1
- import{c as u}from"./chunk-J2WCMQZZ.js";import{w as c}from"./chunk-6EZ7JWBK.js";import{e as s}from"./chunk-WRRUFK4Y.js";import{$a as d}from"./chunk-DONEJHDG.js";import{q as m}from"./chunk-773TIA5M.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();function o(e,n){n||c(e)}async function P(e,n,t){let r=await l(n,t);if(!r){o({body:"Environment file not found."},t?.silent);return}let a=(await u.read(r)).content.environments;if(!a){o({body:["No environments found in",{command:r},{char:"."}]},t?.silent);return}let i=a[e];if(!i){o({body:["Environment",{command:e},"not found."]},t?.silent);return}return await s(()=>({environmentFlags:JSON.stringify(i)})),i}async function l(e,n){let t=n?.from&&n.from!=="."?n.from:m();return d(e,{cwd:t,type:"file"})}export{P as a,l as b};
1
+ import{c as u}from"./chunk-ASOT7VNB.js";import{w as c}from"./chunk-E24W34C4.js";import{e as s}from"./chunk-3QVXHF6I.js";import{$a as d}from"./chunk-EYDNSYYE.js";import{q as m}from"./chunk-773TIA5M.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();function o(e,n){n||c(e)}async function P(e,n,t){let r=await l(n,t);if(!r){o({body:"Environment file not found."},t?.silent);return}let a=(await u.read(r)).content.environments;if(!a){o({body:["No environments found in",{command:r},{char:"."}]},t?.silent);return}let i=a[e];if(!i){o({body:["Environment",{command:e},"not found."]},t?.silent);return}return await s(()=>({environmentFlags:JSON.stringify(i)})),i}async function l(e,n){let t=n?.from&&n.from!=="."?n.from:m();return d(e,{cwd:t,type:"file"})}export{P as a,l as b};
@@ -1,3 +1,3 @@
1
- import{a as h}from"./chunk-VQW35HIQ.js";import{p as m,v as a}from"./chunk-D6YDSGR4.js";import{ua as t}from"./chunk-5W443CKL.js";import{b as s}from"./chunk-H5C3QTOO.js";import{T as n}from"./chunk-DONEJHDG.js";import{r as f}from"./chunk-T6CC5WUU.js";import{e as w,g as i}from"./chunk-VKWPEFWQ.js";i();var o=w(f(),1);var d,e=class extends a{async command(r,p,c,y,l){let u={environment:r.environment,force:r.force,noColor:r["no-color"],password:r.password,path:r.path,store:r.store,theme:n("creative"),unpublished:!0,listing:r.listing};t("theme-command:share"),await h(u,p,c,l),t("theme-command:share")}};d=e;e.summary="Creates a shareable, unpublished, and new theme on your theme library with a randomized name.";e.descriptionWithMarkdown=`Uploads your theme as a new, unpublished theme in your theme library. The theme is given a randomized name.
1
+ import{a as h}from"./chunk-MYQQOOGA.js";import{p as m,v as a}from"./chunk-PTIJDS6I.js";import{ua as t}from"./chunk-2HZMOK4U.js";import{b as s}from"./chunk-Q6LCSRIW.js";import{T as n}from"./chunk-EYDNSYYE.js";import{r as f}from"./chunk-T6CC5WUU.js";import{e as w,g as i}from"./chunk-VKWPEFWQ.js";i();var o=w(f(),1);var d,e=class extends a{async command(r,p,c,y,l){let u={environment:r.environment,force:r.force,noColor:r["no-color"],password:r.password,path:r.path,store:r.store,theme:n("creative"),unpublished:!0,listing:r.listing};t("theme-command:share"),await h(u,p,c,l),t("theme-command:share")}};d=e;e.summary="Creates a shareable, unpublished, and new theme on your theme library with a randomized name.";e.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.`;e.description=d.descriptionWithoutMarkdown();e.flags={...s,...m,force:o.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:o.Flags.string({description:"The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",env:"SHOPIFY_FLAG_LISTING"})};e.multiEnvironmentsFlags=["store","password","path"];var I=e;export{I as a};
@@ -1 +1 @@
1
- import{c as m,d as f,e as p}from"./chunk-67KMRBSZ.js";import{d as c,f as w,j as T}from"./chunk-PJYNAUQB.js";import{g as d}from"./chunk-D6YDSGR4.js";import{B as u}from"./chunk-6EZ7JWBK.js";import{d as l}from"./chunk-WKBVT5WG.js";import{U as i}from"./chunk-DONEJHDG.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();async function A(e,r){let n=await m(e),t=new p(r.filter),a=e.storeFqdn;if(t.any())return f(a,n,t)[0];let y=r.header??"",h=n.map(o=>{let S=o.id.toString()===d()?" [current]":"";return{value:async()=>o,label:`${o.name}${S}`,group:i(o.role)}});return r.create&&h.unshift(g(e)),(await u({message:y,choices:h}))()}async function B(e,r){return(await m(e)).find(t=>t.id.toString()===r)}async function C(e,r){let n=await m(e),t=new p(r),a=e.storeFqdn;return t.any()?f(a,n,t):[]}function g(e){return{value:async()=>{let r=c,n=await w("Name of the new theme"),t=await T({name:n,role:r},e);if(!t)throw new l("The theme could not be created.");return t},label:"[Create a new theme]",group:i(c)}}export{A as a,B as b,C as c};
1
+ import{c as m,d as f,e as p}from"./chunk-MCATVWHC.js";import{d as c,f as w,j as T}from"./chunk-5T3OVTF5.js";import{g as d}from"./chunk-PTIJDS6I.js";import{B as u}from"./chunk-E24W34C4.js";import{d as l}from"./chunk-ELIH6GCC.js";import{U as i}from"./chunk-EYDNSYYE.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();async function A(e,r){let n=await m(e),t=new p(r.filter),a=e.storeFqdn;if(t.any())return f(a,n,t)[0];let y=r.header??"",h=n.map(o=>{let S=o.id.toString()===d()?" [current]":"";return{value:async()=>o,label:`${o.name}${S}`,group:i(o.role)}});return r.create&&h.unshift(g(e)),(await u({message:y,choices:h}))()}async function B(e,r){return(await m(e)).find(t=>t.id.toString()===r)}async function C(e,r){let n=await m(e),t=new p(r),a=e.storeFqdn;return t.any()?f(a,n,t):[]}function g(e){return{value:async()=>{let r=c,n=await w("Name of the new theme"),t=await T({name:n,role:r},e);if(!t)throw new l("The theme could not be created.");return t},label:"[Create a new theme]",group:i(c)}}export{A as a,B as b,C as c};
@@ -1,4 +1,4 @@
1
- import{p,v as d}from"./chunk-D6YDSGR4.js";import{a as u}from"./chunk-ZIREP3EZ.js";import{aa as P}from"./chunk-T5GSCWN5.js";import{b as l}from"./chunk-H5C3QTOO.js";import{v as f}from"./chunk-6EZ7JWBK.js";import{d as i}from"./chunk-WKBVT5WG.js";import{Ta as c,ma as h}from"./chunk-DONEJHDG.js";import{f as r,n as m}from"./chunk-773TIA5M.js";import{e as w,g as n}from"./chunk-VKWPEFWQ.js";n();n();var g=w(P(),1),k=["assets/**","blocks/**","config/**","layout/**","listings/**/*","locales/**","sections/**","snippets/**","templates/**","templates/customers/**","release-notes.md","update_extension.json"].join("|");async function y(e){let t=await v(e),o=`${e}/${t}`,a=`${e}/(${k})`;await u({inputDirectory:e,outputZipPath:o,matchFilePattern:a}),f({body:["Your local theme was packaged in",{filePath:m(o)}]})}async function v(e){let t=r(e,"config/settings_schema.json");if(!await c(t))throw new i("Provide a config/settings_schema.json to package your theme.");let o=await j(t);if(o===void 0||o.theme_name===void 0)throw new i("Provide a theme_info.theme_name configuration in config/settings_schema.json.");return`${[o.theme_name,o.theme_version].filter(Boolean).join("-")}.zip`}async function j(e){let t=(0,g.parseJSON)(await h(e),null,!0);if(!t)throw new i("The file config/settings_schema.json contains an error. Please check if the file is valid JSON and includes the theme_info.theme_name configuration.");return t.find(o=>o.name==="theme_info")}var _,s=class extends d{async command(t){await y(t.path)}};_=s;s.summary="Package your theme into a .zip file, ready to upload to the Online Store.";s.descriptionWithMarkdown=`Packages your local theme files into a ZIP file that can be uploaded to Shopify.
1
+ import{p,v as d}from"./chunk-PTIJDS6I.js";import{a as u}from"./chunk-QDYDB7DY.js";import{aa as P}from"./chunk-QPJQ67GU.js";import{b as l}from"./chunk-Q6LCSRIW.js";import{v as f}from"./chunk-E24W34C4.js";import{d as i}from"./chunk-ELIH6GCC.js";import{Ta as c,ma as h}from"./chunk-EYDNSYYE.js";import{f as r,n as m}from"./chunk-773TIA5M.js";import{e as w,g as n}from"./chunk-VKWPEFWQ.js";n();n();var g=w(P(),1),k=["assets/**","blocks/**","config/**","layout/**","listings/**/*","locales/**","sections/**","snippets/**","templates/**","templates/customers/**","release-notes.md","update_extension.json"].join("|");async function y(e){let t=await v(e),o=`${e}/${t}`,a=`${e}/(${k})`;await u({inputDirectory:e,outputZipPath:o,matchFilePattern:a}),f({body:["Your local theme was packaged in",{filePath:m(o)}]})}async function v(e){let t=r(e,"config/settings_schema.json");if(!await c(t))throw new i("Provide a config/settings_schema.json to package your theme.");let o=await j(t);if(o===void 0||o.theme_name===void 0)throw new i("Provide a theme_info.theme_name configuration in config/settings_schema.json.");return`${[o.theme_name,o.theme_version].filter(Boolean).join("-")}.zip`}async function j(e){let t=(0,g.parseJSON)(await h(e),null,!0);if(!t)throw new i("The file config/settings_schema.json contains an error. Please check if the file is valid JSON and includes the theme_info.theme_name configuration.");return t.find(o=>o.name==="theme_info")}var _,s=class extends d{async command(t){await y(t.path)}};_=s;s.summary="Package your theme into a .zip file, ready to upload to the Online Store.";s.descriptionWithMarkdown=`Packages your local theme files into a ZIP file that can be uploaded to Shopify.
2
2
 
3
3
  Only folders that match the [default Shopify theme folder structure](https://shopify.dev/docs/storefronts/themes/tools/cli#directory-structure) are included in the package.
4
4
 
@@ -1 +1 @@
1
- import{c as u,d as t,l as h}from"./chunk-WKBVT5WG.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var o=e=>new a(e),s=e=>new n(e),a=class{constructor(r){this.value=r}isErr(){return!1}doOnOk(r){return r(this.value),o(this.value)}valueOrBug(){return this.value}valueOrAbort(){return this.value}map(r){return o(r(this.value))}mapError(r){return o(this.value)}},n=class{constructor(r){this.error=r}isErr(){return!0}doOnOk(r){return s(this.error)}valueOrBug(){throw this.error}valueOrAbort(){if(this.error instanceof u)throw this.error;if(this.error instanceof h.ExtendableError||this.error instanceof Error){let r=new t(this.error.message);throw r.stack=this.error.stack,r}else throw new t(`${this.error}`)}map(r){return s(this.error)}mapError(r){return s(r(this.error))}};export{o as a,s as b};
1
+ import{c as u,d as t,l as h}from"./chunk-ELIH6GCC.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var o=e=>new a(e),s=e=>new n(e),a=class{constructor(r){this.value=r}isErr(){return!1}doOnOk(r){return r(this.value),o(this.value)}valueOrBug(){return this.value}valueOrAbort(){return this.value}map(r){return o(r(this.value))}mapError(r){return o(this.value)}},n=class{constructor(r){this.error=r}isErr(){return!0}doOnOk(r){return s(this.error)}valueOrBug(){throw this.error}valueOrAbort(){if(this.error instanceof u)throw this.error;if(this.error instanceof h.ExtendableError||this.error instanceof Error){let r=new t(this.error.message);throw r.stack=this.error.stack,r}else throw new t(`${this.error}`)}map(r){return s(this.error)}mapError(r){return s(r(this.error))}};export{o as a,s as b};
@@ -1 +1 @@
1
- import{Y as u,aa as l,ba as p}from"./chunk-442S5SDM.js";import{b as d,c as f}from"./chunk-H5C3QTOO.js";import{b as c}from"./chunk-UKK5P74A.js";import{C as m}from"./chunk-6EZ7JWBK.js";import{Lb as s}from"./chunk-DONEJHDG.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();async function g(t){let i;try{i=await p()}catch(a){if(t.json&&a instanceof l){s(JSON.stringify({organizations:[]},null,2));return}throw a}if(t.json){let a={organizations:i.map(r=>({id:r.id,gid:u(r.id),name:r.businessName}))};s(JSON.stringify(a,null,2));return}h(i)}function h(t){let i=t.map(a=>({id:a.id,name:a.businessName}));m({rows:i,columns:{id:{header:"ID"},name:{header:"NAME"}}})}var e,o=class extends c{async run(){let{flags:i}=await this.parse(e);await g({json:i.json})}};e=o;o.summary="List Shopify organizations you have access to.";o.descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs.";o.description=e.descriptionWithoutMarkdown();o.flags={...d,...f};var x=o;export{x as a};
1
+ import{Y as u,aa as l,ba as p}from"./chunk-IRH6IGFT.js";import{b as d,c as f}from"./chunk-Q6LCSRIW.js";import{b as c}from"./chunk-IDKUJQIG.js";import{C as m}from"./chunk-E24W34C4.js";import{Lb as s}from"./chunk-EYDNSYYE.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();async function g(t){let i;try{i=await p()}catch(a){if(t.json&&a instanceof l){s(JSON.stringify({organizations:[]},null,2));return}throw a}if(t.json){let a={organizations:i.map(r=>({id:r.id,gid:u(r.id),name:r.businessName}))};s(JSON.stringify(a,null,2));return}h(i)}function h(t){let i=t.map(a=>({id:a.id,name:a.businessName}));m({rows:i,columns:{id:{header:"ID"},name:{header:"NAME"}}})}var e,o=class extends c{async run(){let{flags:i}=await this.parse(e);await g({json:i.json})}};e=o;o.summary="List Shopify organizations you have access to.";o.descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs.";o.description=e.descriptionWithoutMarkdown();o.flags={...d,...f};var x=o;export{x as a};
@@ -1,4 +1,4 @@
1
- import{b as S,c as A,d as R}from"./chunk-7UOPCYMV.js";import{a as N}from"./chunk-MQICT2LR.js";import{a as P}from"./chunk-ZAMDXIVC.js";import{Ga as T,b as y,c as x}from"./chunk-ATXODH6C.js";import{b,c as g}from"./chunk-H5C3QTOO.js";import{u as h}from"./chunk-6EZ7JWBK.js";import{Fb as l,Hb as m,Lb as d}from"./chunk-DONEJHDG.js";import{d as f}from"./chunk-773TIA5M.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();function C(n,t){let o={};return n.targeting?.forEach(e=>{e.target&&(o[e.target]={...e.input_query&&{inputQueryPath:`${t}/${e.input_query}`},...e.export&&{export:e.export}})}),o}function I(n,t,o,e,i,r){return JSON.stringify({handle:t.handle,name:n.name,apiVersion:t.api_version,targeting:o,schemaPath:r,wasmPath:i,functionRunnerPath:e},null,2)}function j(n,t){return{title:`CONFIGURATION
1
+ import{b as S,c as A,d as R}from"./chunk-2MNOWKMI.js";import{a as N}from"./chunk-YB3SGPFF.js";import{a as P}from"./chunk-7XQDZF73.js";import{Ga as T,b as y,c as x}from"./chunk-UZ7U322K.js";import{b,c as g}from"./chunk-Q6LCSRIW.js";import{u as h}from"./chunk-E24W34C4.js";import{Fb as l,Hb as m,Lb as d}from"./chunk-EYDNSYYE.js";import{d as f}from"./chunk-773TIA5M.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();function C(n,t){let o={};return n.targeting?.forEach(e=>{e.target&&(o[e.target]={...e.input_query&&{inputQueryPath:`${t}/${e.input_query}`},...e.export&&{export:e.export}})}),o}function I(n,t,o,e,i,r){return JSON.stringify({handle:t.handle,name:n.name,apiVersion:t.api_version,targeting:o,schemaPath:r,wasmPath:i,functionRunnerPath:e},null,2)}function j(n,t){return{title:`CONFIGURATION
2
2
  `,body:{tabularData:[["Handle",n.handle??"N/A"],["Name",t??"N/A"],["API Version",n.api_version??"N/A"]],firstColumnSubdued:!0}}}function O(n){if(Object.keys(n).length===0)return null;let t=[];return Object.entries(n).forEach(([o,e])=>{t.push([m`${l.cyan(o)}`.value,""]),e.inputQueryPath&&t.push([{subdued:" Input Query Path"},{filePath:e.inputQueryPath}]),e.export&&t.push([{subdued:" Export"},e.export])}),{title:`
3
3
  TARGETING
4
4
  `,body:{tabularData:t}}}function v(n,t){return{title:`
@@ -1 +1 @@
1
- import{a as v}from"./chunk-HM5H7WBE.js";import{a as k}from"./chunk-ZAMDXIVC.js";import{Ba as w,Da as A,Ea as P,Fa as C}from"./chunk-ATXODH6C.js";import{b as y}from"./chunk-H5C3QTOO.js";import{v as u}from"./chunk-6EZ7JWBK.js";import{d as h}from"./chunk-WKBVT5WG.js";import{j as p}from"./chunk-773TIA5M.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();async function f(l){let{directory:o,configName:e,configPath:a,configuration:n,remoteApp:i}=l;if(!n.client_id)throw new h("The selected configuration is not linked to a remote app.","Run `shopify app config link` first to link this configuration to a Shopify app.");let c=i.developerPlatformClient,m=await w({developerPlatformClient:c,app:i}),d=i.flags,b={directory:o,configName:e,developerPlatformClient:c,apiKey:n.client_id},g=await A(b,m,d,i.apiKey),x=p(a),F=await P({remoteApp:i,developerPlatformClient:c,specifications:m,flags:d,configFileName:x,appDirectory:g.appDirectory??o,localAppOptions:g});return{configPath:a,configuration:F,remoteApp:i}}var s,t=class extends v{async run(){let{flags:o}=await this.parse(s),{app:e,remoteApp:a}=await C({directory:o.path,clientId:o["client-id"],forceRelink:o.reset,userProvidedConfigName:o.config}),{configuration:n,configPath:i}=await f({directory:o.path,configName:o.config,configPath:e.configPath,configuration:e.configuration,remoteApp:a});return u({headline:`Pulled latest configuration for "${n.name}"`,body:`Updated ${p(i)} with the remote data.`}),{app:e}}};s=t;t.summary="Refresh an already-linked app configuration without prompts.";t.descriptionWithMarkdown="Pulls the latest configuration from the already-linked Shopify app and updates the selected configuration file.\n\nThis command reuses the existing linked app and organization and skips all interactive prompts. Use `--config` to target a specific configuration file, or omit it to use the default one.";t.description=s.descriptionWithoutMarkdown();t.flags={...y,...k};var z=t;export{z as a};
1
+ import{a as v}from"./chunk-6ZRHK4ON.js";import{a as k}from"./chunk-7XQDZF73.js";import{Ba as w,Da as A,Ea as P,Fa as C}from"./chunk-UZ7U322K.js";import{b as y}from"./chunk-Q6LCSRIW.js";import{v as u}from"./chunk-E24W34C4.js";import{d as h}from"./chunk-ELIH6GCC.js";import{j as p}from"./chunk-773TIA5M.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();async function f(l){let{directory:o,configName:e,configPath:a,configuration:n,remoteApp:i}=l;if(!n.client_id)throw new h("The selected configuration is not linked to a remote app.","Run `shopify app config link` first to link this configuration to a Shopify app.");let c=i.developerPlatformClient,m=await w({developerPlatformClient:c,app:i}),d=i.flags,b={directory:o,configName:e,developerPlatformClient:c,apiKey:n.client_id},g=await A(b,m,d,i.apiKey),x=p(a),F=await P({remoteApp:i,developerPlatformClient:c,specifications:m,flags:d,configFileName:x,appDirectory:g.appDirectory??o,localAppOptions:g});return{configPath:a,configuration:F,remoteApp:i}}var s,t=class extends v{async run(){let{flags:o}=await this.parse(s),{app:e,remoteApp:a}=await C({directory:o.path,clientId:o["client-id"],forceRelink:o.reset,userProvidedConfigName:o.config}),{configuration:n,configPath:i}=await f({directory:o.path,configName:o.config,configPath:e.configPath,configuration:e.configuration,remoteApp:a});return u({headline:`Pulled latest configuration for "${n.name}"`,body:`Updated ${p(i)} with the remote data.`}),{app:e}}};s=t;t.summary="Refresh an already-linked app configuration without prompts.";t.descriptionWithMarkdown="Pulls the latest configuration from the already-linked Shopify app and updates the selected configuration file.\n\nThis command reuses the existing linked app and organization and skips all interactive prompts. Use `--config` to target a specific configuration file, or omit it to use the default one.";t.description=s.descriptionWithoutMarkdown();t.flags={...y,...k};var z=t;export{z as a};
@@ -1,2 +1,2 @@
1
- import{Fb as e,Hb as r,Pb as n,Ta as o,ua as g,wa as d}from"./chunk-DONEJHDG.js";import{d as i}from"./chunk-773TIA5M.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var f=".shopify";async function E(p){let t=i(p,f),a=i(t,".gitignore"),[h,u]=await Promise.all([o(t),o(a)]);return h||(n(r`Creating hidden .shopify folder at ${e.path(t)}...`),await d(t)),u||(n(r`Creating .gitignore in ${e.path(t)}...`),await g(a,`# Ignore the entire ${f} directory
1
+ import{Fb as e,Hb as r,Pb as n,Ta as o,ua as g,wa as d}from"./chunk-EYDNSYYE.js";import{d as i}from"./chunk-773TIA5M.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var f=".shopify";async function E(p){let t=i(p,f),a=i(t,".gitignore"),[h,u]=await Promise.all([o(t),o(a)]);return h||(n(r`Creating hidden .shopify folder at ${e.path(t)}...`),await d(t)),u||(n(r`Creating .gitignore in ${e.path(t)}...`),await g(a,`# Ignore the entire ${f} directory
2
2
  *`)),t}export{E as a};
@@ -1,4 +1,4 @@
1
- import{v as Yv}from"./chunk-D6YDSGR4.js";import{A as hy,B as ii,C as uy,D as Fn,E as py,F as my,G as za,H as fy,I as Oa,J as gy,K as rs,L as kT,M as by,N as Aa,O as is,P as os,Q as Pn,R as vy,S as sn,T as La,U as qa,V,W as CT,X as _T,a as ee,aa as Eu,b as Fa,c as Zv,d as Dn,e as ke,f as Pa,g as ey,h as ty,i as ny,j as ry,k as iy,l as ns,m as oy,n as Ma,o as K,p as Ia,q as sy,r as Na,s as Vt,t as ay,u as B,v as lt,w as kr,x as ly,y as cy,z as dy}from"./chunk-T5GSCWN5.js";import{b as Qv}from"./chunk-H5C3QTOO.js";import{a as jt,b as Z,c as w,d as Xv,e as $t,f as Bt,g as d}from"./chunk-VKWPEFWQ.js";var Ai=w(ct=>{"use strict";d();Object.defineProperty(ct,"__esModule",{value:!0});ct.stringArray=ct.array=ct.func=ct.error=ct.number=ct.string=ct.boolean=void 0;function TT(n){return n===!0||n===!1}ct.boolean=TT;function yy(n){return typeof n=="string"||n instanceof String}ct.string=yy;function RT(n){return typeof n=="number"||n instanceof Number}ct.number=RT;function ET(n){return n instanceof Error}ct.error=ET;function DT(n){return typeof n=="function"}ct.func=DT;function wy(n){return Array.isArray(n)}ct.array=wy;function FT(n){return wy(n)&&n.every(e=>yy(e))}ct.stringArray=FT});var Yu=w(j=>{"use strict";d();Object.defineProperty(j,"__esModule",{value:!0});j.Message=j.NotificationType9=j.NotificationType8=j.NotificationType7=j.NotificationType6=j.NotificationType5=j.NotificationType4=j.NotificationType3=j.NotificationType2=j.NotificationType1=j.NotificationType0=j.NotificationType=j.RequestType9=j.RequestType8=j.RequestType7=j.RequestType6=j.RequestType5=j.RequestType4=j.RequestType3=j.RequestType2=j.RequestType1=j.RequestType=j.RequestType0=j.AbstractMessageSignature=j.ParameterStructures=j.ResponseError=j.ErrorCodes=void 0;var oi=Ai(),Sy;(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})(Sy=j.ErrorCodes||(j.ErrorCodes={}));var Du=class n extends Error{constructor(e,t,r){super(t),this.code=oi.number(e)?e:Sy.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}};j.ResponseError=Du;var Tt=class n{constructor(e){this.kind=e}static is(e){return e===n.auto||e===n.byName||e===n.byPosition}toString(){return this.kind}};j.ParameterStructures=Tt;Tt.auto=new Tt("auto");Tt.byPosition=new Tt("byPosition");Tt.byName=new Tt("byName");var Ce=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return Tt.auto}};j.AbstractMessageSignature=Ce;var Fu=class extends Ce{constructor(e){super(e,0)}};j.RequestType0=Fu;var Pu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.RequestType=Pu;var Mu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.RequestType1=Mu;var Iu=class extends Ce{constructor(e){super(e,2)}};j.RequestType2=Iu;var Nu=class extends Ce{constructor(e){super(e,3)}};j.RequestType3=Nu;var zu=class extends Ce{constructor(e){super(e,4)}};j.RequestType4=zu;var Ou=class extends Ce{constructor(e){super(e,5)}};j.RequestType5=Ou;var Au=class extends Ce{constructor(e){super(e,6)}};j.RequestType6=Au;var Lu=class extends Ce{constructor(e){super(e,7)}};j.RequestType7=Lu;var qu=class extends Ce{constructor(e){super(e,8)}};j.RequestType8=qu;var Wu=class extends Ce{constructor(e){super(e,9)}};j.RequestType9=Wu;var Hu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.NotificationType=Hu;var Uu=class extends Ce{constructor(e){super(e,0)}};j.NotificationType0=Uu;var ju=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.NotificationType1=ju;var $u=class extends Ce{constructor(e){super(e,2)}};j.NotificationType2=$u;var Bu=class extends Ce{constructor(e){super(e,3)}};j.NotificationType3=Bu;var Vu=class extends Ce{constructor(e){super(e,4)}};j.NotificationType4=Vu;var Gu=class extends Ce{constructor(e){super(e,5)}};j.NotificationType5=Gu;var Ku=class extends Ce{constructor(e){super(e,6)}};j.NotificationType6=Ku;var Ju=class extends Ce{constructor(e){super(e,7)}};j.NotificationType7=Ju;var Xu=class extends Ce{constructor(e){super(e,8)}};j.NotificationType8=Xu;var Qu=class extends Ce{constructor(e){super(e,9)}};j.NotificationType9=Qu;var PT;(function(n){function e(i){let o=i;return o&&oi.string(o.method)&&(oi.string(o.id)||oi.number(o.id))}n.isRequest=e;function t(i){let o=i;return o&&oi.string(o.method)&&i.id===void 0}n.isNotification=t;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(oi.string(o.id)||oi.number(o.id)||o.id===null)}n.isResponse=r})(PT=j.Message||(j.Message={}))});var ep=w(Kn=>{"use strict";d();var xy;Object.defineProperty(Kn,"__esModule",{value:!0});Kn.LRUCache=Kn.LinkedMap=Kn.Touch=void 0;var ft;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(ft=Kn.Touch||(Kn.Touch={}));var Wa=class{constructor(){this[xy]="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=ft.None){let r=this._map.get(e);if(r)return t!==ft.None&&this.touch(r,t),r.value}set(e,t,r=ft.None){let i=this._map.get(e);if(i)i.value=t,r!==ft.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case ft.None:this.addItemLast(i);break;case ft.First:this.addItemFirst(i);break;case ft.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}[(xy=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!==ft.First&&t!==ft.Last)){if(t===ft.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===ft.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)}};Kn.LinkedMap=Wa;var Zu=class extends Wa{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=ft.AsNew){return super.get(e,t)}peek(e){return super.get(e,ft.None)}set(e,t){return super.set(e,t,ft.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Kn.LRUCache=Zu});var ky=w(ss=>{"use strict";d();Object.defineProperty(ss,"__esModule",{value:!0});ss.Disposable=void 0;var MT;(function(n){function e(t){return{dispose:t}}n.create=e})(MT=ss.Disposable||(ss.Disposable={}))});var Cr=w(rp=>{"use strict";d();Object.defineProperty(rp,"__esModule",{value:!0});var tp;function np(){if(tp===void 0)throw new Error("No runtime abstraction layer installed");return tp}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");tp=t}n.install=e})(np||(np={}));rp.default=np});var Li=w(si=>{"use strict";d();Object.defineProperty(si,"__esModule",{value:!0});si.Emitter=si.Event=void 0;var IT=Cr(),NT;(function(n){let e={dispose(){}};n.None=function(){return e}})(NT=si.Event||(si.Event={}));var ip=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,IT.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Ha=class n{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new ip),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)}};si.Emitter=Ha;Ha._noop=function(){}});var ja=w(ai=>{"use strict";d();Object.defineProperty(ai,"__esModule",{value:!0});ai.CancellationTokenSource=ai.CancellationToken=void 0;var zT=Cr(),OT=Ai(),op=Li(),sp;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:op.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:op.Event.None});function e(t){let r=t;return r&&(r===n.None||r===n.Cancelled||OT.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(sp=ai.CancellationToken||(ai.CancellationToken={}));var AT=Object.freeze(function(n,e){let t=(0,zT.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}}),Ua=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?AT:(this._emitter||(this._emitter=new op.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},ap=class{get token(){return this._token||(this._token=new Ua),this._token}cancel(){this._token?this._token.cancel():this._token=sp.Cancelled}dispose(){this._token?this._token instanceof Ua&&this._token.dispose():this._token=sp.None}};ai.CancellationTokenSource=ap});var Cy=w(qi=>{"use strict";d();Object.defineProperty(qi,"__esModule",{value:!0});qi.SharedArrayReceiverStrategy=qi.SharedArraySenderStrategy=void 0;var LT=ja(),as;(function(n){n.Continue=0,n.Cancelled=1})(as||(as={}));var lp=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]=as.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,as.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};qi.SharedArraySenderStrategy=lp;var cp=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===as.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},dp=class{constructor(e){this.token=new cp(e)}cancel(){}dispose(){}},hp=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new LT.CancellationTokenSource:new dp(t)}};qi.SharedArrayReceiverStrategy=hp});var pp=w($a=>{"use strict";d();Object.defineProperty($a,"__esModule",{value:!0});$a.Semaphore=void 0;var qT=Cr(),up=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,qT.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()}}};$a.Semaphore=up});var _y=w(Jn=>{"use strict";d();Object.defineProperty(Jn,"__esModule",{value:!0});Jn.ReadableStreamMessageReader=Jn.AbstractMessageReader=Jn.MessageReader=void 0;var fp=Cr(),Wi=Ai(),mp=Li(),WT=pp(),HT;(function(n){function e(t){let r=t;return r&&Wi.func(r.listen)&&Wi.func(r.dispose)&&Wi.func(r.onError)&&Wi.func(r.onClose)&&Wi.func(r.onPartialMessage)}n.is=e})(HT=Jn.MessageReader||(Jn.MessageReader={}));var Ba=class{constructor(){this.errorEmitter=new mp.Emitter,this.closeEmitter=new mp.Emitter,this.partialMessageEmitter=new mp.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: ${Wi.string(e.message)?e.message:"unknown"}`)}};Jn.AbstractMessageReader=Ba;var gp;(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,fp.default)().applicationJson.decoder,l.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:l}}n.fromOptions=e})(gp||(gp={}));var bp=class extends Ba{constructor(e,t){super(),this.readable=e,this.options=gp.fromOptions(t),this.buffer=(0,fp.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new WT.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,fp.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))}};Jn.ReadableStreamMessageReader=bp});var Dy=w(Xn=>{"use strict";d();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.WriteableStreamMessageWriter=Xn.AbstractMessageWriter=Xn.MessageWriter=void 0;var Ty=Cr(),ls=Ai(),UT=pp(),Ry=Li(),jT="Content-Length: ",Ey=`\r
1
+ import{v as Yv}from"./chunk-PTIJDS6I.js";import{A as hy,B as ii,C as uy,D as Fn,E as py,F as my,G as za,H as fy,I as Oa,J as gy,K as rs,L as kT,M as by,N as Aa,O as is,P as os,Q as Pn,R as vy,S as sn,T as La,U as qa,V,W as CT,X as _T,a as ee,aa as Eu,b as Fa,c as Zv,d as Dn,e as ke,f as Pa,g as ey,h as ty,i as ny,j as ry,k as iy,l as ns,m as oy,n as Ma,o as K,p as Ia,q as sy,r as Na,s as Vt,t as ay,u as B,v as lt,w as kr,x as ly,y as cy,z as dy}from"./chunk-QPJQ67GU.js";import{b as Qv}from"./chunk-Q6LCSRIW.js";import{a as jt,b as Z,c as w,d as Xv,e as $t,f as Bt,g as d}from"./chunk-VKWPEFWQ.js";var Ai=w(ct=>{"use strict";d();Object.defineProperty(ct,"__esModule",{value:!0});ct.stringArray=ct.array=ct.func=ct.error=ct.number=ct.string=ct.boolean=void 0;function TT(n){return n===!0||n===!1}ct.boolean=TT;function yy(n){return typeof n=="string"||n instanceof String}ct.string=yy;function RT(n){return typeof n=="number"||n instanceof Number}ct.number=RT;function ET(n){return n instanceof Error}ct.error=ET;function DT(n){return typeof n=="function"}ct.func=DT;function wy(n){return Array.isArray(n)}ct.array=wy;function FT(n){return wy(n)&&n.every(e=>yy(e))}ct.stringArray=FT});var Yu=w(j=>{"use strict";d();Object.defineProperty(j,"__esModule",{value:!0});j.Message=j.NotificationType9=j.NotificationType8=j.NotificationType7=j.NotificationType6=j.NotificationType5=j.NotificationType4=j.NotificationType3=j.NotificationType2=j.NotificationType1=j.NotificationType0=j.NotificationType=j.RequestType9=j.RequestType8=j.RequestType7=j.RequestType6=j.RequestType5=j.RequestType4=j.RequestType3=j.RequestType2=j.RequestType1=j.RequestType=j.RequestType0=j.AbstractMessageSignature=j.ParameterStructures=j.ResponseError=j.ErrorCodes=void 0;var oi=Ai(),Sy;(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})(Sy=j.ErrorCodes||(j.ErrorCodes={}));var Du=class n extends Error{constructor(e,t,r){super(t),this.code=oi.number(e)?e:Sy.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}};j.ResponseError=Du;var Tt=class n{constructor(e){this.kind=e}static is(e){return e===n.auto||e===n.byName||e===n.byPosition}toString(){return this.kind}};j.ParameterStructures=Tt;Tt.auto=new Tt("auto");Tt.byPosition=new Tt("byPosition");Tt.byName=new Tt("byName");var Ce=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return Tt.auto}};j.AbstractMessageSignature=Ce;var Fu=class extends Ce{constructor(e){super(e,0)}};j.RequestType0=Fu;var Pu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.RequestType=Pu;var Mu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.RequestType1=Mu;var Iu=class extends Ce{constructor(e){super(e,2)}};j.RequestType2=Iu;var Nu=class extends Ce{constructor(e){super(e,3)}};j.RequestType3=Nu;var zu=class extends Ce{constructor(e){super(e,4)}};j.RequestType4=zu;var Ou=class extends Ce{constructor(e){super(e,5)}};j.RequestType5=Ou;var Au=class extends Ce{constructor(e){super(e,6)}};j.RequestType6=Au;var Lu=class extends Ce{constructor(e){super(e,7)}};j.RequestType7=Lu;var qu=class extends Ce{constructor(e){super(e,8)}};j.RequestType8=qu;var Wu=class extends Ce{constructor(e){super(e,9)}};j.RequestType9=Wu;var Hu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.NotificationType=Hu;var Uu=class extends Ce{constructor(e){super(e,0)}};j.NotificationType0=Uu;var ju=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.NotificationType1=ju;var $u=class extends Ce{constructor(e){super(e,2)}};j.NotificationType2=$u;var Bu=class extends Ce{constructor(e){super(e,3)}};j.NotificationType3=Bu;var Vu=class extends Ce{constructor(e){super(e,4)}};j.NotificationType4=Vu;var Gu=class extends Ce{constructor(e){super(e,5)}};j.NotificationType5=Gu;var Ku=class extends Ce{constructor(e){super(e,6)}};j.NotificationType6=Ku;var Ju=class extends Ce{constructor(e){super(e,7)}};j.NotificationType7=Ju;var Xu=class extends Ce{constructor(e){super(e,8)}};j.NotificationType8=Xu;var Qu=class extends Ce{constructor(e){super(e,9)}};j.NotificationType9=Qu;var PT;(function(n){function e(i){let o=i;return o&&oi.string(o.method)&&(oi.string(o.id)||oi.number(o.id))}n.isRequest=e;function t(i){let o=i;return o&&oi.string(o.method)&&i.id===void 0}n.isNotification=t;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(oi.string(o.id)||oi.number(o.id)||o.id===null)}n.isResponse=r})(PT=j.Message||(j.Message={}))});var ep=w(Kn=>{"use strict";d();var xy;Object.defineProperty(Kn,"__esModule",{value:!0});Kn.LRUCache=Kn.LinkedMap=Kn.Touch=void 0;var ft;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(ft=Kn.Touch||(Kn.Touch={}));var Wa=class{constructor(){this[xy]="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=ft.None){let r=this._map.get(e);if(r)return t!==ft.None&&this.touch(r,t),r.value}set(e,t,r=ft.None){let i=this._map.get(e);if(i)i.value=t,r!==ft.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case ft.None:this.addItemLast(i);break;case ft.First:this.addItemFirst(i);break;case ft.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}[(xy=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!==ft.First&&t!==ft.Last)){if(t===ft.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===ft.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)}};Kn.LinkedMap=Wa;var Zu=class extends Wa{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=ft.AsNew){return super.get(e,t)}peek(e){return super.get(e,ft.None)}set(e,t){return super.set(e,t,ft.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Kn.LRUCache=Zu});var ky=w(ss=>{"use strict";d();Object.defineProperty(ss,"__esModule",{value:!0});ss.Disposable=void 0;var MT;(function(n){function e(t){return{dispose:t}}n.create=e})(MT=ss.Disposable||(ss.Disposable={}))});var Cr=w(rp=>{"use strict";d();Object.defineProperty(rp,"__esModule",{value:!0});var tp;function np(){if(tp===void 0)throw new Error("No runtime abstraction layer installed");return tp}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");tp=t}n.install=e})(np||(np={}));rp.default=np});var Li=w(si=>{"use strict";d();Object.defineProperty(si,"__esModule",{value:!0});si.Emitter=si.Event=void 0;var IT=Cr(),NT;(function(n){let e={dispose(){}};n.None=function(){return e}})(NT=si.Event||(si.Event={}));var ip=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,IT.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Ha=class n{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new ip),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)}};si.Emitter=Ha;Ha._noop=function(){}});var ja=w(ai=>{"use strict";d();Object.defineProperty(ai,"__esModule",{value:!0});ai.CancellationTokenSource=ai.CancellationToken=void 0;var zT=Cr(),OT=Ai(),op=Li(),sp;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:op.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:op.Event.None});function e(t){let r=t;return r&&(r===n.None||r===n.Cancelled||OT.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(sp=ai.CancellationToken||(ai.CancellationToken={}));var AT=Object.freeze(function(n,e){let t=(0,zT.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}}),Ua=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?AT:(this._emitter||(this._emitter=new op.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},ap=class{get token(){return this._token||(this._token=new Ua),this._token}cancel(){this._token?this._token.cancel():this._token=sp.Cancelled}dispose(){this._token?this._token instanceof Ua&&this._token.dispose():this._token=sp.None}};ai.CancellationTokenSource=ap});var Cy=w(qi=>{"use strict";d();Object.defineProperty(qi,"__esModule",{value:!0});qi.SharedArrayReceiverStrategy=qi.SharedArraySenderStrategy=void 0;var LT=ja(),as;(function(n){n.Continue=0,n.Cancelled=1})(as||(as={}));var lp=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]=as.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,as.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};qi.SharedArraySenderStrategy=lp;var cp=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===as.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},dp=class{constructor(e){this.token=new cp(e)}cancel(){}dispose(){}},hp=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new LT.CancellationTokenSource:new dp(t)}};qi.SharedArrayReceiverStrategy=hp});var pp=w($a=>{"use strict";d();Object.defineProperty($a,"__esModule",{value:!0});$a.Semaphore=void 0;var qT=Cr(),up=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,qT.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()}}};$a.Semaphore=up});var _y=w(Jn=>{"use strict";d();Object.defineProperty(Jn,"__esModule",{value:!0});Jn.ReadableStreamMessageReader=Jn.AbstractMessageReader=Jn.MessageReader=void 0;var fp=Cr(),Wi=Ai(),mp=Li(),WT=pp(),HT;(function(n){function e(t){let r=t;return r&&Wi.func(r.listen)&&Wi.func(r.dispose)&&Wi.func(r.onError)&&Wi.func(r.onClose)&&Wi.func(r.onPartialMessage)}n.is=e})(HT=Jn.MessageReader||(Jn.MessageReader={}));var Ba=class{constructor(){this.errorEmitter=new mp.Emitter,this.closeEmitter=new mp.Emitter,this.partialMessageEmitter=new mp.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: ${Wi.string(e.message)?e.message:"unknown"}`)}};Jn.AbstractMessageReader=Ba;var gp;(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,fp.default)().applicationJson.decoder,l.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:l}}n.fromOptions=e})(gp||(gp={}));var bp=class extends Ba{constructor(e,t){super(),this.readable=e,this.options=gp.fromOptions(t),this.buffer=(0,fp.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new WT.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,fp.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))}};Jn.ReadableStreamMessageReader=bp});var Dy=w(Xn=>{"use strict";d();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.WriteableStreamMessageWriter=Xn.AbstractMessageWriter=Xn.MessageWriter=void 0;var Ty=Cr(),ls=Ai(),UT=pp(),Ry=Li(),jT="Content-Length: ",Ey=`\r
2
2
  `,$T;(function(n){function e(t){let r=t;return r&&ls.func(r.dispose)&&ls.func(r.onClose)&&ls.func(r.onError)&&ls.func(r.write)}n.is=e})($T=Xn.MessageWriter||(Xn.MessageWriter={}));var Va=class{constructor(){this.errorEmitter=new Ry.Emitter,this.closeEmitter=new Ry.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: ${ls.string(e.message)?e.message:"unknown"}`)}};Xn.AbstractMessageWriter=Va;var vp;(function(n){function e(t){return t===void 0||typeof t=="string"?{charset:t??"utf-8",contentTypeEncoder:(0,Ty.default)().applicationJson.encoder}:{charset:t.charset??"utf-8",contentEncoder:t.contentEncoder,contentTypeEncoder:t.contentTypeEncoder??(0,Ty.default)().applicationJson.encoder}}n.fromOptions=e})(vp||(vp={}));var yp=class extends Va{constructor(e,t){super(),this.writable=e,this.options=vp.fromOptions(t),this.errorCount=0,this.writeSemaphore=new UT.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(jT,r.byteLength.toString(),Ey),i.push(Ey),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()}};Xn.WriteableStreamMessageWriter=yp});var Fy=w(Ga=>{"use strict";d();Object.defineProperty(Ga,"__esModule",{value:!0});Ga.AbstractMessageBuffer=void 0;var BT=13,VT=10,GT=`\r
3
3
  `,wp=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 BT:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case VT: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(GT);if(l.length<2)return a;for(let c=0;c<l.length-2;c++){let h=l[c],p=h.indexOf(":");if(p===-1)throw new Error("Message header must separate key and value using :");let f=h.substr(0,p),b=h.substr(p+1).trim();a.set(e?f.toLowerCase():f,b)}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}};Ga.AbstractMessageBuffer=wp});var Ay=w(U=>{"use strict";d();Object.defineProperty(U,"__esModule",{value:!0});U.createMessageConnection=U.ConnectionOptions=U.MessageStrategy=U.CancellationStrategy=U.CancellationSenderStrategy=U.CancellationReceiverStrategy=U.RequestCancellationReceiverStrategy=U.IdCancellationReceiverStrategy=U.ConnectionStrategy=U.ConnectionError=U.ConnectionErrors=U.LogTraceNotification=U.SetTraceNotification=U.TraceFormat=U.TraceValues=U.Trace=U.NullLogger=U.ProgressType=U.ProgressToken=void 0;var Py=Cr(),Pe=Ai(),J=Yu(),My=ep(),cs=Li(),Sp=ja(),hs;(function(n){n.type=new J.NotificationType("$/cancelRequest")})(hs||(hs={}));var Iy;(function(n){function e(t){return typeof t=="string"||typeof t=="number"}n.is=e})(Iy=U.ProgressToken||(U.ProgressToken={}));var ds;(function(n){n.type=new J.NotificationType("$/progress")})(ds||(ds={}));var xp=class{constructor(){}};U.ProgressType=xp;var kp;(function(n){function e(t){return Pe.func(t)}n.is=e})(kp||(kp={}));U.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var fe;(function(n){n[n.Off=0]="Off",n[n.Messages=1]="Messages",n[n.Compact=2]="Compact",n[n.Verbose=3]="Verbose"})(fe=U.Trace||(U.Trace={}));var KT;(function(n){n.Off="off",n.Messages="messages",n.Compact="compact",n.Verbose="verbose"})(KT=U.TraceValues||(U.TraceValues={}));(function(n){function e(r){if(!Pe.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})(fe=U.Trace||(U.Trace={}));var an;(function(n){n.Text="text",n.JSON="json"})(an=U.TraceFormat||(U.TraceFormat={}));(function(n){function e(t){return Pe.string(t)?(t=t.toLowerCase(),t==="json"?n.JSON:n.Text):n.Text}n.fromString=e})(an=U.TraceFormat||(U.TraceFormat={}));var Ny;(function(n){n.type=new J.NotificationType("$/setTrace")})(Ny=U.SetTraceNotification||(U.SetTraceNotification={}));var Cp;(function(n){n.type=new J.NotificationType("$/logTrace")})(Cp=U.LogTraceNotification||(U.LogTraceNotification={}));var Ka;(function(n){n[n.Closed=1]="Closed",n[n.Disposed=2]="Disposed",n[n.AlreadyListening=3]="AlreadyListening"})(Ka=U.ConnectionErrors||(U.ConnectionErrors={}));var Hi=class n extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,n.prototype)}};U.ConnectionError=Hi;var zy;(function(n){function e(t){let r=t;return r&&Pe.func(r.cancelUndispatched)}n.is=e})(zy=U.ConnectionStrategy||(U.ConnectionStrategy={}));var Rp;(function(n){function e(t){let r=t;return r&&(r.kind===void 0||r.kind==="id")&&Pe.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Pe.func(r.dispose))}n.is=e})(Rp=U.IdCancellationReceiverStrategy||(U.IdCancellationReceiverStrategy={}));var Oy;(function(n){function e(t){let r=t;return r&&r.kind==="request"&&Pe.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Pe.func(r.dispose))}n.is=e})(Oy=U.RequestCancellationReceiverStrategy||(U.RequestCancellationReceiverStrategy={}));var _p;(function(n){n.Message=Object.freeze({createCancellationTokenSource(t){return new Sp.CancellationTokenSource}});function e(t){return Rp.is(t)||Oy.is(t)}n.is=e})(_p=U.CancellationReceiverStrategy||(U.CancellationReceiverStrategy={}));var Tp;(function(n){n.Message=Object.freeze({sendCancellation(t,r){return t.sendNotification(hs.type,{id:r})},cleanup(t){}});function e(t){let r=t;return r&&Pe.func(r.sendCancellation)&&Pe.func(r.cleanup)}n.is=e})(Tp=U.CancellationSenderStrategy||(U.CancellationSenderStrategy={}));var Ep;(function(n){n.Message=Object.freeze({receiver:_p.Message,sender:Tp.Message});function e(t){let r=t;return r&&_p.is(r.receiver)&&Tp.is(r.sender)}n.is=e})(Ep=U.CancellationStrategy||(U.CancellationStrategy={}));var Dp;(function(n){function e(t){let r=t;return r&&Pe.func(r.handleMessage)}n.is=e})(Dp=U.MessageStrategy||(U.MessageStrategy={}));var JT;(function(n){function e(t){let r=t;return r&&(Ep.is(r.cancellationStrategy)||zy.is(r.connectionStrategy)||Dp.is(r.messageStrategy))}n.is=e})(JT=U.ConnectionOptions||(U.ConnectionOptions={}));var ln;(function(n){n[n.New=1]="New",n[n.Listening=2]="Listening",n[n.Closed=3]="Closed",n[n.Disposed=4]="Disposed"})(ln||(ln={}));function XT(n,e,t,r){let i=t!==void 0?t:U.NullLogger,o=0,s=0,a=0,l="2.0",c,h=new Map,p,f=new Map,b=new Map,C,D=new My.LinkedMap,P=new Map,A=new Set,S=new Map,y=fe.Off,R=an.Text,N,q=ln.New,Se=new cs.Emitter,De=new cs.Emitter,Wt=new cs.Emitter,Dt=new cs.Emitter,kt=new cs.Emitter,Ct=r&&r.cancellationStrategy?r.cancellationStrategy:Ep.Message;function wr(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 ni(v){return v===null?"res-unknown-"+(++a).toString():"res-"+v.toString()}function Ht(){return"not-"+(++s).toString()}function Ft(v,E){J.Message.isRequest(E)?v.set(wr(E.id),E):J.Message.isResponse(E)?v.set(ni(E.id),E):v.set(Ht(),E)}function Sr(v){}function Ut(){return q===ln.Listening}function Rn(){return q===ln.Closed}function pt(){return q===ln.Disposed}function xr(){(q===ln.New||q===ln.Listening)&&(q=ln.Closed,De.fire(void 0))}function Zo(v){Se.fire([v,void 0,void 0])}function Mi(v){Se.fire(v)}n.onClose(xr),n.onError(Zo),e.onClose(xr),e.onError(Mi);function Ii(){C||D.size===0||(C=(0,Py.default)().timer.setImmediate(()=>{C=void 0,ku()}))}function Ni(v){J.Message.isRequest(v)?Cu(v):J.Message.isNotification(v)?Tu(v):J.Message.isResponse(v)?_u(v):Da(v)}function ku(){if(D.size===0)return;let v=D.shift();try{let E=r?.messageStrategy;Dp.is(E)?E.handleMessage(v,Ni):Ni(v)}finally{Ii()}}let ri=v=>{try{if(J.Message.isNotification(v)&&v.method===hs.type.method){let E=v.params.id,I=wr(E),H=D.get(I);if(J.Message.isRequest(H)){let ge=r?.connectionStrategy,Ne=ge&&ge.cancelUndispatched?ge.cancelUndispatched(H,Sr):void 0;if(Ne&&(Ne.error!==void 0||Ne.result!==void 0)){D.delete(I),S.delete(E),Ne.id=H.id,G(Ne,v.method,Date.now()),e.write(Ne).catch(()=>i.error("Sending response for canceled message failed."));return}}let xe=S.get(E);if(xe!==void 0){xe.cancel(),_t(v);return}else A.add(E)}Ft(D,v)}finally{Ii()}};function Cu(v){if(pt())return;function E(ce,Fe,me){let Be={jsonrpc:l,id:v.id};ce instanceof J.ResponseError?Be.error=ce.toJson():Be.result=ce===void 0?null:ce,G(Be,Fe,me),e.write(Be).catch(()=>i.error("Sending response failed."))}function I(ce,Fe,me){let Be={jsonrpc:l,id:v.id,error:ce.toJson()};G(Be,Fe,me),e.write(Be).catch(()=>i.error("Sending response failed."))}function H(ce,Fe,me){ce===void 0&&(ce=null);let Be={jsonrpc:l,id:v.id,result:ce};G(Be,Fe,me),e.write(Be).catch(()=>i.error("Sending response failed."))}Re(v);let xe=h.get(v.method),ge,Ne;xe&&(ge=xe.type,Ne=xe.handler);let Oe=Date.now();if(Ne||c){let ce=v.id??String(Date.now()),Fe=Rp.is(Ct.receiver)?Ct.receiver.createCancellationTokenSource(ce):Ct.receiver.createCancellationTokenSource(v);v.id!==null&&A.has(v.id)&&Fe.cancel(),v.id!==null&&S.set(ce,Fe);try{let me;if(Ne)if(v.params===void 0){if(ge!==void 0&&ge.numberOfParams!==0){I(new J.ResponseError(J.ErrorCodes.InvalidParams,`Request ${v.method} defines ${ge.numberOfParams} params but received none.`),v.method,Oe);return}me=Ne(Fe.token)}else if(Array.isArray(v.params)){if(ge!==void 0&&ge.parameterStructures===J.ParameterStructures.byName){I(new J.ResponseError(J.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by name but received parameters by position`),v.method,Oe);return}me=Ne(...v.params,Fe.token)}else{if(ge!==void 0&&ge.parameterStructures===J.ParameterStructures.byPosition){I(new J.ResponseError(J.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by position but received parameters by name`),v.method,Oe);return}me=Ne(v.params,Fe.token)}else c&&(me=c(v.method,v.params,Fe.token));let Be=me;me?Be.then?Be.then(mt=>{S.delete(ce),E(mt,v.method,Oe)},mt=>{S.delete(ce),mt instanceof J.ResponseError?I(mt,v.method,Oe):mt&&Pe.string(mt.message)?I(new J.ResponseError(J.ErrorCodes.InternalError,`Request ${v.method} failed with message: ${mt.message}`),v.method,Oe):I(new J.ResponseError(J.ErrorCodes.InternalError,`Request ${v.method} failed unexpectedly without providing any details.`),v.method,Oe)}):(S.delete(ce),E(me,v.method,Oe)):(S.delete(ce),H(me,v.method,Oe))}catch(me){S.delete(ce),me instanceof J.ResponseError?E(me,v.method,Oe):me&&Pe.string(me.message)?I(new J.ResponseError(J.ErrorCodes.InternalError,`Request ${v.method} failed with message: ${me.message}`),v.method,Oe):I(new J.ResponseError(J.ErrorCodes.InternalError,`Request ${v.method} failed unexpectedly without providing any details.`),v.method,Oe)}}else I(new J.ResponseError(J.ErrorCodes.MethodNotFound,`Unhandled method ${v.method}`),v.method,Oe)}function _u(v){if(!pt())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 E=v.id,I=P.get(E);if(yT(v,I),I!==void 0){P.delete(E);try{if(v.error){let H=v.error;I.reject(new J.ResponseError(H.code,H.message,H.data))}else if(v.result!==void 0)I.resolve(v.result);else throw new Error("Should never happen.")}catch(H){H.message?i.error(`Response handler '${I.method}' failed with message: ${H.message}`):i.error(`Response handler '${I.method}' failed unexpectedly.`)}}}}function Tu(v){if(pt())return;let E,I;if(v.method===hs.type.method){let H=v.params.id;A.delete(H),_t(v);return}else{let H=f.get(v.method);H&&(I=H.handler,E=H.type)}if(I||p)try{if(_t(v),I)if(v.params===void 0)E!==void 0&&E.numberOfParams!==0&&E.parameterStructures!==J.ParameterStructures.byName&&i.error(`Notification ${v.method} defines ${E.numberOfParams} params but received none.`),I();else if(Array.isArray(v.params)){let H=v.params;v.method===ds.type.method&&H.length===2&&Iy.is(H[0])?I({token:H[0],value:H[1]}):(E!==void 0&&(E.parameterStructures===J.ParameterStructures.byName&&i.error(`Notification ${v.method} defines parameters by name but received parameters by position`),E.numberOfParams!==v.params.length&&i.error(`Notification ${v.method} defines ${E.numberOfParams} params but received ${H.length} arguments`)),I(...H))}else E!==void 0&&E.parameterStructures===J.ParameterStructures.byPosition&&i.error(`Notification ${v.method} defines parameters by position but received parameters by name`),I(v.params);else p&&p(v.method,v.params)}catch(H){H.message?i.error(`Notification handler '${v.method}' failed with message: ${H.message}`):i.error(`Notification handler '${v.method}' failed unexpectedly.`)}else Wt.fire(v)}function Da(v){if(!v){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
@@ -0,0 +1 @@
1
+ import{f as o}from"./chunk-IRH6IGFT.js";import{b as r}from"./chunk-IDKUJQIG.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();var e=class extends r{environmentsFilename(){return o.appEnvironments}};export{e as a};
@@ -1,3 +1,3 @@
1
- import{a as ce}from"./chunk-GFCLUGAG.js";import{G as L,O as $,va as te,xa as N,ya as re,z as y}from"./chunk-5W443CKL.js";import{b as x}from"./chunk-47MGPVED.js";import{a as me,b as ue}from"./chunk-UKK5P74A.js";import{a as ee}from"./chunk-5C7HDTHJ.js";import{A as ie,a as Z,t as se,w as U,x as I}from"./chunk-6EZ7JWBK.js";import{d as oe,e as ne}from"./chunk-WRRUFK4Y.js";import{d as F,g as ae}from"./chunk-WKBVT5WG.js";import{Fa as X,Fb as R,Hb as h,Pb as A,Ua as _}from"./chunk-DONEJHDG.js";import{d as Q,f as k,i as V,q as P}from"./chunk-773TIA5M.js";import{r as xe}from"./chunk-T6CC5WUU.js";import{e as ve,g as f}from"./chunk-VKWPEFWQ.js";f();var T=ve(xe(),1);var q={path:T.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>{let e=k(t);return _(e)?X(e)?e:(I({headline:"The path must be a directory, not a file.",body:[`The provided path is not a directory: ${e}`,`Did you mean: ${V(e)}`]}),process.exit(1)):(I({headline:"A path was explicitly provided but doesn't exist.",body:[`Please check the path and try again: ${e}`]}),process.exit(1))},default:async()=>P(),noCacheDefault:!0}),password:T.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:T.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async t=>y(t)}),environment:T.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},de="Wrap the value in double quotes if you're using wildcards.",Ne=t=>({only:T.Flags.string({char:"o",multiple:!0,description:`${t.charAt(0).toUpperCase()+t.slice(1)} only the specified files (Multiple flags allowed). ${de}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:T.Flags.string({char:"x",multiple:!0,description:`Skip ${t}ing the specified files (Multiple flags allowed). ${de}`,env:"SHOPIFY_FLAG_IGNORE"})});f();f();import{AsyncLocalStorage as Te}from"node:async_hooks";var pe=new Te,O,j,D,M;function l(){return O??(O=new x({projectName:"shopify-cli-theme-conf"})),O}function B(){return j??(j=new x({projectName:"shopify-cli-development-theme-config"})),j}function G(){return D??(D=new x({projectName:"shopify-cli-repl-theme-config"})),D}function H(){return M??(M=new x({projectName:"shopify-cli-theme-store-password"})),M}function z(t=l()){return pe.getStore()?.store??t.get("themeStore")}function fe(t,e=l()){e.set("themeStore",t)}function Me(t=l()){return A(h`Getting development theme...`),B().get(v(t))}function Be(t,e=l()){A(h`Setting development theme...`),B().set(v(e),t)}function Ge(t=l()){A(h`Removing development theme...`),B().delete(v(t))}function He(t=l()){return A(h`Getting REPL theme...`),G().get(v(t))}function ze(t,e=l()){A(h`Setting REPL theme to ${t}...`),G().set(v(e),t)}function Ye(t=l()){A(h`Removing REPL theme...`),G().delete(v(t))}function Je(t=l()){let e=v(t);return A(h`Getting storefront password for shop ${e}...`),H().get(e)}function We(t,e=l()){let o=v(e);A(h`Setting storefront password for shop ${o}...`),H().set(o,t)}function Ke(t=l()){let e=v(t);A(h`Removing storefront password for ${e}...`),H().delete(e)}function v(t=l()){let e=z(t);if(!e)throw new ae("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function he(t,e){return pe.run({store:t},e)}function le(t){let e=t.store??z();if(!e)throw te(new F("A store is required",`Specify the store passing ${h`${R.genericShellCommand(`--${q.store.name}=example.myshopify.com`)}`.value} or set the ${h`${R.genericShellCommand(q.store.env)}`.value} environment variable.`));return fe(e),e}f();f();var Se="shopify.theme.toml",st=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),it=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json","**/{blocks,layout,snippets}/**/*.liquid.tmp.*","**/{config,locales}/**/*.json.tmp.*","**/{sections,templates}/**/*.{liquid,json}.tmp.*"],at=50;f();f();var Y="7e9cb568cfd431c538f36d1ad3f2b4f6";var Ie="shopify-cli-store",St=240*1e3,J;function C(){return J??(J=new x({projectName:Ie})),J}function E(t){return`${Y}::${_e(t)}`}function _e(t){return t.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function d(t){return typeof t=="string"}function Fe(t){if(!t||typeof t!="object")return;let e=t;if(typeof e.id=="number")return{id:e.id,...d(e.email)?{email:e.email}:{},...d(e.firstName)?{firstName:e.firstName}:{},...d(e.lastName)?{lastName:e.lastName}:{},...typeof e.accountOwner=="boolean"?{accountOwner:e.accountOwner}:{}}}function Ee(t){if(!t||typeof t!="object")return;let e=t;if(!(!d(e.shopId)||!d(e.name)||!d(e.createdAt)))return{shopId:e.shopId,name:e.name,createdAt:e.createdAt,...d(e.placeholderAccountUuid)?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...d(e.country)?{country:e.country}:{},...d(e.accessUrl)?{accessUrl:e.accessUrl}:{}}}function be(t){if(!t||typeof t!="object")return;let e=t;if(!d(e.store)||!d(e.clientId)||!d(e.userId)||!d(e.accessToken)||!Array.isArray(e.scopes)||!e.scopes.every(d)||!d(e.acquiredAt))return;let o=Fe(e.associatedUser),r=e.kind==="preview"?"preview":"standard",n=r==="preview"?Ee(e.preview):void 0;if(!(r==="preview"&&!n))return{store:e.store,clientId:e.clientId,userId:e.userId,accessToken:e.accessToken,scopes:e.scopes,acquiredAt:e.acquiredAt,...d(e.refreshToken)?{refreshToken:e.refreshToken}:{},...d(e.expiresAt)?{expiresAt:e.expiresAt}:{},...d(e.refreshTokenExpiresAt)?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...o?{associatedUser:o}:{},...r==="preview"?{kind:r}:{},...n?{preview:n}:{}}}function ge(t,e,o){if(!e||typeof e!="object")return;let{sessionsByUserId:r,currentUserId:n}=e;if(!(r!==void 0||n!==void 0))return;let i=E(t);if(!r||typeof r!="object"||Array.isArray(r)||typeof n!="string"){o.delete(i);return}let a=Object.fromEntries(Object.entries(r).flatMap(([m,c])=>{let p=be(c);return p?[[m,p]]:[]}));if(Object.keys(a).length!==Object.keys(r).length)if(a[n])o.set(i,{currentUserId:n,sessionsByUserId:a});else{o.delete(i);return}return{currentUserId:n,sessionsByUserId:a}}function W(t,e){return ge(t,e.get(E(t)),e)}function ke(t){return t.config?.store??{}}function ye(t=C()){let e=[],o=`${Y}::`;for(let[r,n]of Object.entries(ke(t))){if(!r.startsWith(o))continue;let s=ge(r.slice(o.length),n,t),i=s?.sessionsByUserId[s.currentUserId];i&&e.push(i)}return e}function we(t,e=C()){let o=y(t),r=W(o,e);if(!r)return;let n=r.sessionsByUserId[r.currentUserId];if(!n){e.delete(E(o));return}return n}function gt(t,e=C()){let o=E(t.store),r=W(t.store,e),n={currentUserId:t.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[t.userId]:t}};e.set(o,n)}function yt(t,e,o){let r=y(t),n=typeof e=="string"?e:void 0,s=(typeof e=="string"?o:e)??C(),i=E(r);if(!n){s.delete(i);return}let a=W(r,s);if(!a)return;let{[n]:m,...c}=a.sessionsByUserId,p=Object.keys(c);if(p.length===0){s.delete(i);return}s.set(i,{currentUserId:a.currentUserId===n?p[0]:a.currentUserId,sessionsByUserId:c})}var K=class extends ue{environmentsFilename(){return Se}async command(e,o,r=!1,n,s){}async run(e){let o=this.constructor,r=o.multiEnvironmentsFlags,{args:n,flags:s}=await this.parse(o),i="password"in o.flags,a=(Array.isArray(s.environment)?s.environment:[s.environment]).filter(Boolean),m=r!==null&&r.some(u=>Array.isArray(u)?u.includes("store"):u==="store");if(a.length<=1){if(a[0]&&!s.store&&m)throw new F("Please provide a valid environment.");let u=i?await this.createSession(s):void 0,w=this.constructor.name.toLowerCase();if(N(`theme-command:${w}:single-env:authenticated`),s.path&&!_(s.path))throw new F(`Path does not exist: ${s.path}`);try{await this.command(s,u,!1,n)}finally{await this.logAnalyticsData(u)}return}if(r===null){U({body:"This command does not support multiple environments."});return}let{flags:c}=await this.parse(me(o),this.argv);if("path"in c){this.errorOnGlobalPath();return}let p=await this.loadEnvironments(a,s,c),S=await this.validateEnvironments(p,r,i);"force"in o.flags&&!s.force&&!await this.showConfirmation(this.constructor.name,r,S)||await this.runConcurrent(S.valid)}storeAuthScopes(){return[]}async loadEnvironments(e,o,r){let n=new Map;for(let s of e){let i=await ce(s,"shopify.theme.toml",{from:o.path,silent:!0});i?.store&&typeof i.store=="string"&&(i.store=y(i.store)),i?.path&&typeof i.path=="string"&&(i.path=k(i.path)),n.set(s,{flags:{...o,...i,...r,environment:[s]},validationFlags:{...i,...r}})}return n}async validateEnvironments(e,o,r){let n=[],s=[],i=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:m})=>m)):new Map,a=Array.from(e.entries()).map(([m,{flags:c,validationFlags:p}])=>({environmentName:m,flags:c,validationFlags:p,storeAuthSession:this.storeAuthSessionFromCache(p,i)}));for(let{environmentName:m,flags:c,validationFlags:p,storeAuthSession:S}of a){let g=this.validConfig(p,o,m,S);if(g!==!0){let u=g.join(", ");s.push({environment:m,reason:`Missing flags: ${u}`});continue}n.push({environment:m,flags:c,requiresAuth:r,storeAuthSession:S})}return{valid:n,invalid:s}}async showConfirmation(e,o,r){let i={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},a=[...r.valid.map(({environment:m,flags:c})=>{let p=o.map(S=>{let g=Array.isArray(S)?S.find(u=>c[u]):S;if(g==="password")return"password";if(g==="path"&&typeof c.path=="string"){let u=c.path.split(/[/\\]/);if(u.length===1)return`path: ${c.path}`;let w=u[0]===""?`/${u[1]}`:u[0],b=u.at(-1);return`path: ${w}/.../${b}`}return g&&`${g}: ${c[g]}`}).join(", ");return[m,{subdued:p||"No flags required"}]}),...r.invalid.map(({environment:m,reason:c})=>[m,{error:`Skipping | ${c}`}])];return i.infoTable={Environment:a},r.invalid.length>0&&(i.confirmationMessage="Proceed anyway (will skip invalid environments)"),ie(i)}async runConcurrent(e){let o=new Z,r=e.map(i=>i.flags.store),n=new Set(r),s=r.length===n.size?[e]:this.createSequentialGroups(e);for(let i of s)await se({processes:i.map(({environment:a,flags:m,requiresAuth:c,storeAuthSession:p})=>({prefix:a,action:async(S,g,u)=>{try{let w=m.store;await he(w,async()=>{let b=c?await this.createSession(m,p):void 0,Ae=this.constructor.name.toLowerCase();N(`theme-command:${Ae}:multi-env:authenticated`);try{await this.command(m,b,!0,{},{stdout:S,stderr:g})}finally{await this.logAnalyticsData(b)}})}catch(w){w instanceof Error&&(w.message=`Environment ${a} failed:
1
+ import{a as ce}from"./chunk-O2PI2PYG.js";import{G as L,O as $,va as te,xa as N,ya as re,z as y}from"./chunk-2HZMOK4U.js";import{b as x}from"./chunk-4TC4M4RC.js";import{a as me,b as ue}from"./chunk-IDKUJQIG.js";import{a as ee}from"./chunk-5C7HDTHJ.js";import{A as ie,a as Z,t as se,w as U,x as I}from"./chunk-E24W34C4.js";import{d as oe,e as ne}from"./chunk-3QVXHF6I.js";import{d as F,g as ae}from"./chunk-ELIH6GCC.js";import{Fa as X,Fb as R,Hb as h,Pb as A,Ua as _}from"./chunk-EYDNSYYE.js";import{d as Q,f as k,i as V,q as P}from"./chunk-773TIA5M.js";import{r as xe}from"./chunk-T6CC5WUU.js";import{e as ve,g as f}from"./chunk-VKWPEFWQ.js";f();var T=ve(xe(),1);var q={path:T.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>{let e=k(t);return _(e)?X(e)?e:(I({headline:"The path must be a directory, not a file.",body:[`The provided path is not a directory: ${e}`,`Did you mean: ${V(e)}`]}),process.exit(1)):(I({headline:"A path was explicitly provided but doesn't exist.",body:[`Please check the path and try again: ${e}`]}),process.exit(1))},default:async()=>P(),noCacheDefault:!0}),password:T.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:T.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async t=>y(t)}),environment:T.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},de="Wrap the value in double quotes if you're using wildcards.",Ne=t=>({only:T.Flags.string({char:"o",multiple:!0,description:`${t.charAt(0).toUpperCase()+t.slice(1)} only the specified files (Multiple flags allowed). ${de}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:T.Flags.string({char:"x",multiple:!0,description:`Skip ${t}ing the specified files (Multiple flags allowed). ${de}`,env:"SHOPIFY_FLAG_IGNORE"})});f();f();import{AsyncLocalStorage as Te}from"node:async_hooks";var pe=new Te,O,j,D,M;function l(){return O??(O=new x({projectName:"shopify-cli-theme-conf"})),O}function B(){return j??(j=new x({projectName:"shopify-cli-development-theme-config"})),j}function G(){return D??(D=new x({projectName:"shopify-cli-repl-theme-config"})),D}function H(){return M??(M=new x({projectName:"shopify-cli-theme-store-password"})),M}function z(t=l()){return pe.getStore()?.store??t.get("themeStore")}function fe(t,e=l()){e.set("themeStore",t)}function Me(t=l()){return A(h`Getting development theme...`),B().get(v(t))}function Be(t,e=l()){A(h`Setting development theme...`),B().set(v(e),t)}function Ge(t=l()){A(h`Removing development theme...`),B().delete(v(t))}function He(t=l()){return A(h`Getting REPL theme...`),G().get(v(t))}function ze(t,e=l()){A(h`Setting REPL theme to ${t}...`),G().set(v(e),t)}function Ye(t=l()){A(h`Removing REPL theme...`),G().delete(v(t))}function Je(t=l()){let e=v(t);return A(h`Getting storefront password for shop ${e}...`),H().get(e)}function We(t,e=l()){let o=v(e);A(h`Setting storefront password for shop ${o}...`),H().set(o,t)}function Ke(t=l()){let e=v(t);A(h`Removing storefront password for ${e}...`),H().delete(e)}function v(t=l()){let e=z(t);if(!e)throw new ae("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function he(t,e){return pe.run({store:t},e)}function le(t){let e=t.store??z();if(!e)throw te(new F("A store is required",`Specify the store passing ${h`${R.genericShellCommand(`--${q.store.name}=example.myshopify.com`)}`.value} or set the ${h`${R.genericShellCommand(q.store.env)}`.value} environment variable.`));return fe(e),e}f();f();var Se="shopify.theme.toml",st=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),it=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json","**/{blocks,layout,snippets}/**/*.liquid.tmp.*","**/{config,locales}/**/*.json.tmp.*","**/{sections,templates}/**/*.{liquid,json}.tmp.*"],at=50;f();f();var Y="7e9cb568cfd431c538f36d1ad3f2b4f6";var Ie="shopify-cli-store",St=240*1e3,J;function C(){return J??(J=new x({projectName:Ie})),J}function E(t){return`${Y}::${_e(t)}`}function _e(t){return t.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function d(t){return typeof t=="string"}function Fe(t){if(!t||typeof t!="object")return;let e=t;if(typeof e.id=="number")return{id:e.id,...d(e.email)?{email:e.email}:{},...d(e.firstName)?{firstName:e.firstName}:{},...d(e.lastName)?{lastName:e.lastName}:{},...typeof e.accountOwner=="boolean"?{accountOwner:e.accountOwner}:{}}}function Ee(t){if(!t||typeof t!="object")return;let e=t;if(!(!d(e.shopId)||!d(e.name)||!d(e.createdAt)))return{shopId:e.shopId,name:e.name,createdAt:e.createdAt,...d(e.placeholderAccountUuid)?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...d(e.country)?{country:e.country}:{},...d(e.accessUrl)?{accessUrl:e.accessUrl}:{}}}function be(t){if(!t||typeof t!="object")return;let e=t;if(!d(e.store)||!d(e.clientId)||!d(e.userId)||!d(e.accessToken)||!Array.isArray(e.scopes)||!e.scopes.every(d)||!d(e.acquiredAt))return;let o=Fe(e.associatedUser),r=e.kind==="preview"?"preview":"standard",n=r==="preview"?Ee(e.preview):void 0;if(!(r==="preview"&&!n))return{store:e.store,clientId:e.clientId,userId:e.userId,accessToken:e.accessToken,scopes:e.scopes,acquiredAt:e.acquiredAt,...d(e.refreshToken)?{refreshToken:e.refreshToken}:{},...d(e.expiresAt)?{expiresAt:e.expiresAt}:{},...d(e.refreshTokenExpiresAt)?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...o?{associatedUser:o}:{},...r==="preview"?{kind:r}:{},...n?{preview:n}:{}}}function ge(t,e,o){if(!e||typeof e!="object")return;let{sessionsByUserId:r,currentUserId:n}=e;if(!(r!==void 0||n!==void 0))return;let i=E(t);if(!r||typeof r!="object"||Array.isArray(r)||typeof n!="string"){o.delete(i);return}let a=Object.fromEntries(Object.entries(r).flatMap(([m,c])=>{let p=be(c);return p?[[m,p]]:[]}));if(Object.keys(a).length!==Object.keys(r).length)if(a[n])o.set(i,{currentUserId:n,sessionsByUserId:a});else{o.delete(i);return}return{currentUserId:n,sessionsByUserId:a}}function W(t,e){return ge(t,e.get(E(t)),e)}function ke(t){return t.config?.store??{}}function ye(t=C()){let e=[],o=`${Y}::`;for(let[r,n]of Object.entries(ke(t))){if(!r.startsWith(o))continue;let s=ge(r.slice(o.length),n,t),i=s?.sessionsByUserId[s.currentUserId];i&&e.push(i)}return e}function we(t,e=C()){let o=y(t),r=W(o,e);if(!r)return;let n=r.sessionsByUserId[r.currentUserId];if(!n){e.delete(E(o));return}return n}function gt(t,e=C()){let o=E(t.store),r=W(t.store,e),n={currentUserId:t.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[t.userId]:t}};e.set(o,n)}function yt(t,e,o){let r=y(t),n=typeof e=="string"?e:void 0,s=(typeof e=="string"?o:e)??C(),i=E(r);if(!n){s.delete(i);return}let a=W(r,s);if(!a)return;let{[n]:m,...c}=a.sessionsByUserId,p=Object.keys(c);if(p.length===0){s.delete(i);return}s.set(i,{currentUserId:a.currentUserId===n?p[0]:a.currentUserId,sessionsByUserId:c})}var K=class extends ue{environmentsFilename(){return Se}async command(e,o,r=!1,n,s){}async run(e){let o=this.constructor,r=o.multiEnvironmentsFlags,{args:n,flags:s}=await this.parse(o),i="password"in o.flags,a=(Array.isArray(s.environment)?s.environment:[s.environment]).filter(Boolean),m=r!==null&&r.some(u=>Array.isArray(u)?u.includes("store"):u==="store");if(a.length<=1){if(a[0]&&!s.store&&m)throw new F("Please provide a valid environment.");let u=i?await this.createSession(s):void 0,w=this.constructor.name.toLowerCase();if(N(`theme-command:${w}:single-env:authenticated`),s.path&&!_(s.path))throw new F(`Path does not exist: ${s.path}`);try{await this.command(s,u,!1,n)}finally{await this.logAnalyticsData(u)}return}if(r===null){U({body:"This command does not support multiple environments."});return}let{flags:c}=await this.parse(me(o),this.argv);if("path"in c){this.errorOnGlobalPath();return}let p=await this.loadEnvironments(a,s,c),S=await this.validateEnvironments(p,r,i);"force"in o.flags&&!s.force&&!await this.showConfirmation(this.constructor.name,r,S)||await this.runConcurrent(S.valid)}storeAuthScopes(){return[]}async loadEnvironments(e,o,r){let n=new Map;for(let s of e){let i=await ce(s,"shopify.theme.toml",{from:o.path,silent:!0});i?.store&&typeof i.store=="string"&&(i.store=y(i.store)),i?.path&&typeof i.path=="string"&&(i.path=k(i.path)),n.set(s,{flags:{...o,...i,...r,environment:[s]},validationFlags:{...i,...r}})}return n}async validateEnvironments(e,o,r){let n=[],s=[],i=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:m})=>m)):new Map,a=Array.from(e.entries()).map(([m,{flags:c,validationFlags:p}])=>({environmentName:m,flags:c,validationFlags:p,storeAuthSession:this.storeAuthSessionFromCache(p,i)}));for(let{environmentName:m,flags:c,validationFlags:p,storeAuthSession:S}of a){let g=this.validConfig(p,o,m,S);if(g!==!0){let u=g.join(", ");s.push({environment:m,reason:`Missing flags: ${u}`});continue}n.push({environment:m,flags:c,requiresAuth:r,storeAuthSession:S})}return{valid:n,invalid:s}}async showConfirmation(e,o,r){let i={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},a=[...r.valid.map(({environment:m,flags:c})=>{let p=o.map(S=>{let g=Array.isArray(S)?S.find(u=>c[u]):S;if(g==="password")return"password";if(g==="path"&&typeof c.path=="string"){let u=c.path.split(/[/\\]/);if(u.length===1)return`path: ${c.path}`;let w=u[0]===""?`/${u[1]}`:u[0],b=u.at(-1);return`path: ${w}/.../${b}`}return g&&`${g}: ${c[g]}`}).join(", ");return[m,{subdued:p||"No flags required"}]}),...r.invalid.map(({environment:m,reason:c})=>[m,{error:`Skipping | ${c}`}])];return i.infoTable={Environment:a},r.invalid.length>0&&(i.confirmationMessage="Proceed anyway (will skip invalid environments)"),ie(i)}async runConcurrent(e){let o=new Z,r=e.map(i=>i.flags.store),n=new Set(r),s=r.length===n.size?[e]:this.createSequentialGroups(e);for(let i of s)await se({processes:i.map(({environment:a,flags:m,requiresAuth:c,storeAuthSession:p})=>({prefix:a,action:async(S,g,u)=>{try{let w=m.store;await he(w,async()=>{let b=c?await this.createSession(m,p):void 0,Ae=this.constructor.name.toLowerCase();N(`theme-command:${Ae}:multi-env:authenticated`);try{await this.command(m,b,!0,{},{stdout:S,stderr:g})}finally{await this.logAnalyticsData(b)}})}catch(w){w instanceof Error&&(w.message=`Environment ${a} failed:
2
2
 
3
3
  ${w.message}`,I({body:[w.message]}))}}})),abortSignal:o.signal,showTimestamps:!0,renderOptions:{stdout:process.stderr}})}createSequentialGroups(e){let o=[];return e.forEach(r=>{let n=o.find(s=>!s.some(i=>i.flags.store===r.flags.store));n?n.push(r):o.push([r])}),o}async createSession(e,o){let r=le({store:e.store}),n=e.password;return n?await $(r,n):o??await this.storeAuthSessionForTheme({store:r})??await $(r,n)}async storeAuthSessionForTheme(e){let o=typeof e.store=="string"?e.store:void 0,r=e.password;if(!o||r)return;let n=y(o),s=we(n);if(s)return this.adminSessionFromStoreAuthSession(s,n)}storeAuthSessionsForTheme(e){let o=new Set(e.filter(({store:r,password:n})=>typeof r=="string"&&!n).map(({store:r})=>y(r)));return o.size===0?new Map:new Map(ye().map(r=>{let n=y(r.store);if(!o.has(n))return;let s=this.adminSessionFromStoreAuthSession(r,n);return s?[n,s]:void 0}).filter(r=>r!==void 0))}storeAuthSessionFromCache(e,o){let r=typeof e.store=="string"?e.store:void 0,n=e.password;if(!(!r||n))return o.get(y(r))}adminSessionFromStoreAuthSession(e,o){if(this.hasRequiredStoreAuthScopes(e.scopes))return L(e.userId),{token:e.accessToken,storeFqdn:o}}expandImpliedStoreAuthScopes(e){let o=new Set(e);for(let r of e){let n=r.match(/^(unauthenticated_)?write_(.*)$/);n&&o.add(`${n[1]??""}read_${n[2]}`)}return o}hasRequiredStoreAuthScopes(e){if(e.length===0)return!0;let o=this.expandImpliedStoreAuthScopes(e);return this.storeAuthScopes().every(r=>o.has(r))}validConfig(e,o,r,n){let s=o.filter(i=>Array.isArray(i)?!i.some(a=>this.hasRequiredFlag(e,a,n)):!this.hasRequiredFlag(e,i,n)).map(i=>Array.isArray(i)?i.join(" or "):i);return s.length>0?(U({body:[`Missing required flags in environment configuration${r?` for ${r}`:""}:`,{list:{items:s}}]}),s):!0}hasRequiredFlag(e,o,r){return o==="password"&&r?!0:!!e[o]}errorOnGlobalPath(){let e=Q(P(),"shopify.theme.toml"),o=_(e);I({body:["Can't use `--path` flag with multiple environments.",...o?["Configure each environment's theme path in your shopify.theme.toml file instead."]:["Run this command from the directory containing shopify.theme.toml.","No shopify.theme.toml found in current directory."]]})}async logAnalyticsData(e){if(!e)return;let o=re();await oe(()=>({store_fqdn_hash:ee(e.storeFqdn),store_domain:e.storeFqdn,cmd_theme_timings:JSON.stringify(o.timings),cmd_theme_errors:JSON.stringify(o.errors),cmd_theme_retries:JSON.stringify(o.retries),cmd_theme_events:JSON.stringify(o.events)})),await ne(()=>({store_fqdn:e.storeFqdn}))}};export{Y as a,ye as b,we as c,gt as d,yt as e,z as f,Me as g,Be as h,Ge as i,He as j,ze as k,Ye as l,Je as m,We as n,Ke as o,q as p,Ne as q,le as r,st as s,it as t,at as u,K as v};
@@ -1 +1 @@
1
- import{b as r}from"./chunk-7EJ4UVYI.js";import{b as a}from"./chunk-UKK5P74A.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var i=class extends a{static{this.summary="Upgrades Shopify CLI."}static{this.descriptionWithMarkdown="Upgrades Shopify CLI using your package manager."}static{this.description=this.descriptionWithoutMarkdown()}async run(){await r()}};export{i as a};
1
+ import{b as r}from"./chunk-ZHPXJRHR.js";import{b as a}from"./chunk-IDKUJQIG.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var i=class extends a{static{this.summary="Upgrades Shopify CLI."}static{this.descriptionWithMarkdown="Upgrades Shopify CLI using your package manager."}static{this.description=this.descriptionWithoutMarkdown()}async run(){await r()}};export{i as a};
@@ -1 +1 @@
1
- import{b as u,c as d}from"./chunk-7UOPCYMV.js";import{a as m}from"./chunk-MQICT2LR.js";import{a}from"./chunk-ZAMDXIVC.js";import{Ga as c,q as p}from"./chunk-ATXODH6C.js";import{b as e}from"./chunk-H5C3QTOO.js";import{v as n}from"./chunk-6EZ7JWBK.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var s,o=class extends m{async run(){let{flags:t}=await this.parse(s),{app:r}=await c({directory:t.path,userProvidedConfigName:t.config}),l=await d(r,t.path);return await p(l,{app:r,stdout:process.stdout,stderr:process.stderr,useTasks:!0,environment:"production"}),n({headline:"Function built successfully."}),{app:r}}};s=o;o.summary="Compile a function to wasm.";o.descriptionWithMarkdown="Compiles the function in your current directory to WebAssembly (Wasm) for testing purposes.";o.description=s.descriptionWithoutMarkdown();o.flags={...e,...a,...u};var k=o;export{k as a};
1
+ import{b as u,c as d}from"./chunk-2MNOWKMI.js";import{a as m}from"./chunk-YB3SGPFF.js";import{a}from"./chunk-7XQDZF73.js";import{Ga as c,q as p}from"./chunk-UZ7U322K.js";import{b as e}from"./chunk-Q6LCSRIW.js";import{v as n}from"./chunk-E24W34C4.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var s,o=class extends m{async run(){let{flags:t}=await this.parse(s),{app:r}=await c({directory:t.path,userProvidedConfigName:t.config}),l=await d(r,t.path);return await p(l,{app:r,stdout:process.stdout,stderr:process.stderr,useTasks:!0,environment:"production"}),n({headline:"Function built successfully."}),{app:r}}};s=o;o.summary="Compile a function to wasm.";o.descriptionWithMarkdown="Compiles the function in your current directory to WebAssembly (Wasm) for testing purposes.";o.description=s.descriptionWithoutMarkdown();o.flags={...e,...a,...u};var k=o;export{k as a};
@@ -1 +1 @@
1
- import{a as c,c as u}from"./chunk-NNOSZ447.js";import{r as C}from"./chunk-T6CC5WUU.js";import{e as h,g as i}from"./chunk-VKWPEFWQ.js";i();i();import{fileURLToPath as L}from"node:url";async function f(e){let{isDevelopment:o}=await import("./local-FRYN3NWL.js"),{ShopifyConfig:n}=await import("./custom-oclif-loader-3AICQCNU.js"),t=await import("./lib-QJDPPAWN.js"),{run:a,flush:p,Errors:d,settings:m}=t.default??t;o()&&(m.debug=!0);try{let r=new n({root:L(e.moduleURL)});await r.load(),e.lazyCommandLoader&&r.setLazyCommandLoader(e.lazyCommandLoader),await a(e.argv,r),await p()}catch(r){let{errorHandler:l}=await import("./error-handler-SW2ALZ5Z.js");return await l(r),d.handle(r)}}var s=h(C());async function y(e=process.versions){let o=e.node,n=Number(o.split(".")[0]);if(n<18){let{renderError:a}=await import("./ui-QOGKADWB.js");a({headline:"Upgrade to a supported Node version now.",body:[`Node ${n} has reached end-of-life and poses security risks. When you upgrade to a`,{link:{url:"https://nodejs.dev/en/about/previous-releases",label:"supported version"}},{char:","},"you'll be able to use Shopify CLI without interruption."]}),process.exit(1)}}function I(e,o=process.argv,n=process.env){o.includes("--verbose")&&(n.DEBUG=n.DEBUG??"*"),e.development&&(n.SHOPIFY_CLI_ENV=n.SHOPIFY_CLI_ENV??"development")}function b(e=process.argv,o=process.env){(e.includes("--no-color")||e.includes("--json")||e.includes("-j")||c(o.NO_COLOR)||c(o.SHOPIFY_FLAG_NO_COLOR)||c(o[u.json])||o.TERM==="dumb")&&(o.FORCE_COLOR="0")}async function _(e,o=f,n=process.argv,t=process.env,a=process.versions){return I(e,n,t),e.runInCreateMode&&await O(e,n),b(n,t),await y(a),o({moduleURL:e.moduleURL,lazyCommandLoader:e.lazyCommandLoader})}async function O(e,o=process.argv){let{findUpAndReadPackageJson:n}=await import("./node-package-manager-LVFBY4LY.js"),{moduleDirectory:t}=await import("./path-MBXP7ZIC.js"),d=(await n(t(e.moduleURL))).content.name.replace("@shopify/create-","");if(o.findIndex(r=>r.includes("init"))===-1){let r=o.findIndex(l=>l.match(new RegExp(`bin(\\/|\\\\)+(create-${d}|dev|run)`)))+1;o.splice(r,0,"init")}}var F={"no-color":s.Flags.boolean({hidden:!1,description:"Disable color output.",env:"SHOPIFY_FLAG_NO_COLOR"}),verbose:s.Flags.boolean({hidden:!1,description:"Increase the verbosity of the output.",env:"SHOPIFY_FLAG_VERBOSE"})},E={json:s.Flags.boolean({char:"j",description:"Output the result as JSON. Automatically disables color output.",hidden:!1,default:!1,env:u.json})},S=(e={})=>{let o=[e.description,"Must be between 1 and 65535."].filter(Boolean).join(" ");return s.Flags.integer({min:1,max:65535,...e,description:o})};async function j(){let{cacheClear:e}=await import("./conf-store-C2LOYIOU.js");e()}export{_ as a,F as b,E as c,S as d,j as e};
1
+ import{a as c,c as u}from"./chunk-NNOSZ447.js";import{r as C}from"./chunk-T6CC5WUU.js";import{e as h,g as i}from"./chunk-VKWPEFWQ.js";i();i();import{fileURLToPath as L}from"node:url";async function f(e){let{isDevelopment:o}=await import("./local-5AKD7T5X.js"),{ShopifyConfig:n}=await import("./custom-oclif-loader-3AICQCNU.js"),t=await import("./lib-QJDPPAWN.js"),{run:a,flush:p,Errors:d,settings:m}=t.default??t;o()&&(m.debug=!0);try{let r=new n({root:L(e.moduleURL)});await r.load(),e.lazyCommandLoader&&r.setLazyCommandLoader(e.lazyCommandLoader),await a(e.argv,r),await p()}catch(r){let{errorHandler:l}=await import("./error-handler-MCUV4RZV.js");return await l(r),d.handle(r)}}var s=h(C());async function y(e=process.versions){let o=e.node,n=Number(o.split(".")[0]);if(n<18){let{renderError:a}=await import("./ui-QIHGXICT.js");a({headline:"Upgrade to a supported Node version now.",body:[`Node ${n} has reached end-of-life and poses security risks. When you upgrade to a`,{link:{url:"https://nodejs.dev/en/about/previous-releases",label:"supported version"}},{char:","},"you'll be able to use Shopify CLI without interruption."]}),process.exit(1)}}function I(e,o=process.argv,n=process.env){o.includes("--verbose")&&(n.DEBUG=n.DEBUG??"*"),e.development&&(n.SHOPIFY_CLI_ENV=n.SHOPIFY_CLI_ENV??"development")}function b(e=process.argv,o=process.env){(e.includes("--no-color")||e.includes("--json")||e.includes("-j")||c(o.NO_COLOR)||c(o.SHOPIFY_FLAG_NO_COLOR)||c(o[u.json])||o.TERM==="dumb")&&(o.FORCE_COLOR="0")}async function _(e,o=f,n=process.argv,t=process.env,a=process.versions){return I(e,n,t),e.runInCreateMode&&await O(e,n),b(n,t),await y(a),o({moduleURL:e.moduleURL,lazyCommandLoader:e.lazyCommandLoader})}async function O(e,o=process.argv){let{findUpAndReadPackageJson:n}=await import("./node-package-manager-FA3Y6DPG.js"),{moduleDirectory:t}=await import("./path-MBXP7ZIC.js"),d=(await n(t(e.moduleURL))).content.name.replace("@shopify/create-","");if(o.findIndex(r=>r.includes("init"))===-1){let r=o.findIndex(l=>l.match(new RegExp(`bin(\\/|\\\\)+(create-${d}|dev|run)`)))+1;o.splice(r,0,"init")}}var F={"no-color":s.Flags.boolean({hidden:!1,description:"Disable color output.",env:"SHOPIFY_FLAG_NO_COLOR"}),verbose:s.Flags.boolean({hidden:!1,description:"Increase the verbosity of the output.",env:"SHOPIFY_FLAG_VERBOSE"})},E={json:s.Flags.boolean({char:"j",description:"Output the result as JSON. Automatically disables color output.",hidden:!1,default:!1,env:u.json})},S=(e={})=>{let o=[e.description,"Must be between 1 and 65535."].filter(Boolean).join(" ");return s.Flags.integer({min:1,max:65535,...e,description:o})};async function j(){let{cacheClear:e}=await import("./conf-store-OC4XCP45.js");e()}export{_ as a,F as b,E as c,S as d,j as e};