shopify 5.0.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/dist/{analytics-VKKJNJ62.js → analytics-RSUIYNLC.js} +1 -1
  2. package/dist/analytics-V2SDYXQJ.js +1 -0
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/{chunk-NK2MGR6A.js → chunk-2AW3KBTP.js} +1 -1
  5. package/dist/{chunk-BCYTZ7LM.js → chunk-2CJQQQW4.js} +1 -1
  6. package/dist/{chunk-EITIW5OX.js → chunk-2M4BKFYF.js} +1 -1
  7. package/dist/chunk-2M535QQJ.js +6 -0
  8. package/dist/{chunk-5TB52UUV.js → chunk-2NZ7GDDR.js} +1 -1
  9. package/dist/{chunk-YVY32DNA.js → chunk-2QQ7EBJD.js} +1 -1
  10. package/dist/chunk-2RFCYZMG.js +47 -0
  11. package/dist/{chunk-S67I4E7M.js → chunk-2S5NPJEJ.js} +1 -1
  12. package/dist/{chunk-YVVU4J5O.js → chunk-2TPLPZA2.js} +1 -1
  13. package/dist/{chunk-C3KEDG33.js → chunk-2YGPWG3I.js} +1 -1
  14. package/dist/{chunk-TTEF7GTX.js → chunk-32O27NE3.js} +1 -1
  15. package/dist/{chunk-24NUJTIH.js → chunk-364BVGRY.js} +1 -1
  16. package/dist/{chunk-BJPDJIS4.js → chunk-36TZ447N.js} +1 -1
  17. package/dist/{chunk-5UWMXOHM.js → chunk-37P5YOP2.js} +1 -1
  18. package/dist/{chunk-4CRBTSVP.js → chunk-3G2PEYPI.js} +1 -1
  19. package/dist/{chunk-EXFBZPZS.js → chunk-3JACWBUC.js} +1 -1
  20. package/dist/{chunk-53BG3NLH.js → chunk-43HKFLOU.js} +1 -1
  21. package/dist/chunk-46JYM3GH.js +1 -0
  22. package/dist/{chunk-XITZIDCL.js → chunk-4EDE3UH7.js} +1 -1
  23. package/dist/{chunk-G6ZMSWEU.js → chunk-4GQEXVDT.js} +1 -1
  24. package/dist/{chunk-SNNZ4U2W.js → chunk-4IUXLUFD.js} +1 -1
  25. package/dist/{chunk-ULD7CIOY.js → chunk-4QZ6OBXL.js} +1 -1
  26. package/dist/{chunk-YKS7MH3F.js → chunk-4SDCXKYR.js} +1 -1
  27. package/dist/{chunk-VB7YQMAM.js → chunk-56GKTWFF.js} +1 -1
  28. package/dist/{chunk-Q66CI37F.js → chunk-5AQ5JT2V.js} +1 -1
  29. package/dist/{chunk-Q2SZCZE7.js → chunk-5AWELO3D.js} +1 -1
  30. package/dist/{chunk-VHUD3CBC.js → chunk-5D4FNAAD.js} +1 -1
  31. package/dist/{chunk-46MSIQ6Z.js → chunk-5TWYJQQO.js} +1 -1
  32. package/dist/{chunk-OGWPS55W.js → chunk-5XOEMYEQ.js} +1 -1
  33. package/dist/{chunk-MR2AUT7Q.js → chunk-5YUDEPEY.js} +1 -1
  34. package/dist/{chunk-CCQNP5YR.js → chunk-5YXYYQBX.js} +1 -1
  35. package/dist/{chunk-P33TONYG.js → chunk-63UKZLPC.js} +1 -1
  36. package/dist/chunk-6JZC6UKY.js +20 -0
  37. package/dist/{chunk-7QUZWCJZ.js → chunk-6Y6A2QGK.js} +1 -1
  38. package/dist/{chunk-M7LPHCP2.js → chunk-75LAVRRL.js} +2 -2
  39. package/dist/{chunk-AJMDF3QC.js → chunk-7AWAOPLA.js} +1 -1
  40. package/dist/{chunk-AXC2MHHO.js → chunk-7NYCJG2U.js} +1 -1
  41. package/dist/{chunk-6DXP7PQ7.js → chunk-7U2MTK6I.js} +1 -1
  42. package/dist/{chunk-JEA3C7ON.js → chunk-7XAEI4XT.js} +1 -1
  43. package/dist/{chunk-TPSA4JN5.js → chunk-A7LBGXWG.js} +1 -1
  44. package/dist/{chunk-2CMEKSI7.js → chunk-ADVLRSSO.js} +1 -1
  45. package/dist/{chunk-3LVCG4JB.js → chunk-AIEVQSI3.js} +1 -1
  46. package/dist/{chunk-M4BVLMPH.js → chunk-AOBE6HN6.js} +1 -1
  47. package/dist/{chunk-PSSYLJG4.js → chunk-AQ34X5B3.js} +1 -1
  48. package/dist/{chunk-43KLFFP7.js → chunk-B2VE7WOX.js} +1 -1
  49. package/dist/{chunk-L7MSPGDS.js → chunk-B4ISKIXN.js} +1 -1
  50. package/dist/{chunk-EMSF57ZB.js → chunk-BB7GAZP6.js} +1 -1
  51. package/dist/chunk-BNTOGZLY.js +1 -0
  52. package/dist/chunk-BU3JQM3W.js +1 -0
  53. package/dist/{chunk-LHKVXJPX.js → chunk-C3LL5CZA.js} +1 -1
  54. package/dist/{chunk-GFVKTWFT.js → chunk-C4EKNOLY.js} +1 -1
  55. package/dist/{chunk-5NEGOQT6.js → chunk-CFUZ6574.js} +1 -1
  56. package/dist/{chunk-NB4BRW3H.js → chunk-CKVVJ4XO.js} +1 -1
  57. package/dist/{chunk-VWH3VPYI.js → chunk-CNPBDSDL.js} +1 -1
  58. package/dist/{chunk-U25W35TX.js → chunk-CWR3IFXD.js} +1 -1
  59. package/dist/{chunk-VW6QS7DO.js → chunk-CX3ANDPI.js} +1 -1
  60. package/dist/{chunk-GB6E3ATN.js → chunk-CXPYOLGM.js} +1 -1
  61. package/dist/{chunk-FWB3GLMW.js → chunk-D4LFWIFE.js} +1 -1
  62. package/dist/{chunk-PZUGDE7N.js → chunk-DM7BTMFP.js} +1 -1
  63. package/dist/{chunk-GRGFA26K.js → chunk-DSKAIC7O.js} +1 -1
  64. package/dist/{chunk-M5TGCSUK.js → chunk-DTRENW4Q.js} +1 -1
  65. package/dist/{chunk-EGCWR5AS.js → chunk-DVW7NDVD.js} +1 -1
  66. package/dist/{chunk-YGYEM6QO.js → chunk-E3CTHNQS.js} +1 -1
  67. package/dist/{chunk-6BNKBCCU.js → chunk-EA5XVQJT.js} +1 -1
  68. package/dist/{chunk-XM7YUXTF.js → chunk-EH22T4FI.js} +2 -2
  69. package/dist/{chunk-XNNKLUTN.js → chunk-ETXBF6Q7.js} +1 -1
  70. package/dist/{chunk-AYL6KBPE.js → chunk-EXTVC33U.js} +1 -1
  71. package/dist/{chunk-J6TW43TG.js → chunk-F3OM2YO6.js} +1 -1
  72. package/dist/{chunk-X7HVAVSZ.js → chunk-FHNJLON5.js} +1 -1
  73. package/dist/{chunk-SFPXYHHL.js → chunk-FK5OFLSJ.js} +1 -1
  74. package/dist/{chunk-NDKSG4CC.js → chunk-FNWXMCSD.js} +1 -1
  75. package/dist/{chunk-KKPOOIE4.js → chunk-FPOZMNT2.js} +1 -1
  76. package/dist/{chunk-HIRTL45Q.js → chunk-FS5PZCZ3.js} +1 -1
  77. package/dist/{chunk-Q5MEFIMV.js → chunk-FTHVOIK7.js} +1 -1
  78. package/dist/chunk-FVRI7ZKE.js +103 -0
  79. package/dist/{chunk-CIK5BF7V.js → chunk-GCKGQFV7.js} +1 -1
  80. package/dist/{chunk-PEVIRAMR.js → chunk-GGJUPL4W.js} +1 -1
  81. package/dist/{chunk-R7EMV77H.js → chunk-GHU6YEXH.js} +1 -1
  82. package/dist/{chunk-WGUOLSMG.js → chunk-GNPIKPHB.js} +1 -1
  83. package/dist/{chunk-3A3DZVEJ.js → chunk-GSGCSBRN.js} +1 -1
  84. package/dist/{chunk-PIAD3F6M.js → chunk-H57KYDEI.js} +1 -1
  85. package/dist/{chunk-GAMC2BNY.js → chunk-HNU6R7RT.js} +1 -1
  86. package/dist/{chunk-UOS2XLGG.js → chunk-HP2ZAAY7.js} +1 -1
  87. package/dist/{chunk-IEQ4UOH3.js → chunk-HPT3UXZ5.js} +1 -1
  88. package/dist/chunk-HT66BOEC.js +8 -0
  89. package/dist/{chunk-4ARCB6DT.js → chunk-HXNGLDMU.js} +1 -1
  90. package/dist/{chunk-BVSKBX7T.js → chunk-IAL6IQYW.js} +1 -1
  91. package/dist/{chunk-4RDFMBRG.js → chunk-IULZYDCI.js} +1 -1
  92. package/dist/{chunk-UIQL5ZF3.js → chunk-IWTOC6DG.js} +1 -1
  93. package/dist/{chunk-2ORRV7GH.js → chunk-IY5EI5V2.js} +1 -1
  94. package/dist/{chunk-ZT5WFUKJ.js → chunk-J3UXIC23.js} +1 -1
  95. package/dist/{chunk-Q2XRITUG.js → chunk-J5DUFSR4.js} +1 -1
  96. package/dist/{chunk-2VSNFOKD.js → chunk-J7BTC45S.js} +1 -1
  97. package/dist/{chunk-SL3VBI62.js → chunk-JMVK2BIB.js} +1 -1
  98. package/dist/{chunk-X2H6I2WW.js → chunk-JUTULEWW.js} +1 -1
  99. package/dist/{chunk-KGRIYAMA.js → chunk-K3YALQBQ.js} +1 -1
  100. package/dist/{chunk-SFQEHDJY.js → chunk-KGASGUDQ.js} +1 -1
  101. package/dist/{chunk-LDU5T3DN.js → chunk-KLYGMYXV.js} +1 -1
  102. package/dist/{chunk-7WPUV7GY.js → chunk-KNQXCU3Y.js} +1 -1
  103. package/dist/{chunk-C7V755IT.js → chunk-KOTZSPZA.js} +1 -1
  104. package/dist/{chunk-DJAZBPYA.js → chunk-KT5QQOES.js} +1 -1
  105. package/dist/{chunk-4SS6DXC7.js → chunk-KVF55INC.js} +1 -1
  106. package/dist/{chunk-MXJAH2GW.js → chunk-L6VONMA2.js} +1 -1
  107. package/dist/{chunk-GXORLBVN.js → chunk-LENSEW2F.js} +1 -1
  108. package/dist/{chunk-7UOA4DI7.js → chunk-LGXNXAQA.js} +1 -1
  109. package/dist/{chunk-ZYQ2XWC5.js → chunk-LR4J4KYJ.js} +1 -1
  110. package/dist/{chunk-QN3774QI.js → chunk-LWMKZJ4M.js} +1 -1
  111. package/dist/{chunk-I4OVLRQR.js → chunk-M2KX3PXA.js} +1 -1
  112. package/dist/{chunk-D7NB7YR6.js → chunk-M73IECPW.js} +1 -1
  113. package/dist/{chunk-4TI7U2PN.js → chunk-M7NLCGCP.js} +1 -1
  114. package/dist/chunk-MHWETFNT.js +1 -0
  115. package/dist/{chunk-CCMDZX35.js → chunk-MMUGP3WP.js} +1 -1
  116. package/dist/{chunk-LMQGNECW.js → chunk-MNWT2SQO.js} +1 -1
  117. package/dist/{chunk-R2BDABJD.js → chunk-MS7DTL4U.js} +1 -1
  118. package/dist/{chunk-OVWUGAEU.js → chunk-MU2X7NGF.js} +1 -1
  119. package/dist/{chunk-GCNA3HXH.js → chunk-MXXMIPUN.js} +1 -1
  120. package/dist/{chunk-POKY4RWR.js → chunk-MZCIRMZJ.js} +1 -1
  121. package/dist/{chunk-PGLWZMJU.js → chunk-MZWPIFAM.js} +1 -1
  122. package/dist/{chunk-H4V55Y3Z.js → chunk-NCPZVARH.js} +83 -83
  123. package/dist/{chunk-3G4HJO72.js → chunk-NJVNGEOU.js} +1 -1
  124. package/dist/{chunk-CEIJKJOF.js → chunk-NMECLRGK.js} +1 -1
  125. package/dist/{chunk-UVRKTMF7.js → chunk-NMLLRFZF.js} +1 -1
  126. package/dist/chunk-NPB753M3.js +1 -0
  127. package/dist/{chunk-ZAA2DXK5.js → chunk-NUCDRKDW.js} +1 -1
  128. package/dist/{chunk-UZROQRLX.js → chunk-OH7BQZQ7.js} +1 -1
  129. package/dist/{chunk-ZQDDRIBA.js → chunk-OLKLHVHA.js} +4 -4
  130. package/dist/{chunk-7MVWDCI3.js → chunk-OPVXPDOQ.js} +1 -1
  131. package/dist/{chunk-IWEKM5Y3.js → chunk-OQUXGAF2.js} +1 -1
  132. package/dist/{chunk-IUTZIN2T.js → chunk-OUMERKRE.js} +1 -1
  133. package/dist/{chunk-5OMJFPQW.js → chunk-OYGIQDME.js} +1 -1
  134. package/dist/{chunk-KSDU4YOB.js → chunk-P5W5RVE6.js} +1 -1
  135. package/dist/{chunk-PYIICTLX.js → chunk-PNZURX3S.js} +1 -1
  136. package/dist/{chunk-UK6576EO.js → chunk-PRKJVU4Y.js} +1 -1
  137. package/dist/{chunk-DFQ4WTET.js → chunk-PVASYKSJ.js} +1 -1
  138. package/dist/{chunk-CW2T7EOQ.js → chunk-PXFPVGWV.js} +1 -1
  139. package/dist/{chunk-7LAKWAKX.js → chunk-Q2ORJEB2.js} +1 -1
  140. package/dist/{chunk-XKRJKUA7.js → chunk-QBE6XVU3.js} +1 -1
  141. package/dist/{chunk-N2RFDHRY.js → chunk-QGWC23HQ.js} +1 -1
  142. package/dist/{chunk-GQNOVEKP.js → chunk-QVVQUJQL.js} +1 -1
  143. package/dist/{chunk-WMAFG2JD.js → chunk-QX3T6G5X.js} +1 -1
  144. package/dist/{chunk-VMMUJN4T.js → chunk-QYFU363G.js} +1 -1
  145. package/dist/{chunk-7NSK77WG.js → chunk-RDXLDCMI.js} +1 -1
  146. package/dist/{chunk-JYMDWR25.js → chunk-REDUS6EW.js} +1 -1
  147. package/dist/{chunk-FNLECT7B.js → chunk-RFZNFTVM.js} +1 -1
  148. package/dist/{chunk-LWCTKI4Z.js → chunk-RIG66DIQ.js} +3 -3
  149. package/dist/{chunk-YTUDXZLN.js → chunk-RNUEPPVN.js} +1 -1
  150. package/dist/{chunk-RFGEM5JC.js → chunk-RWTAPWLJ.js} +1 -1
  151. package/dist/{chunk-WFWISGLS.js → chunk-T5YVYVSW.js} +1 -1
  152. package/dist/{chunk-WJSUIUBW.js → chunk-TTBNFGCW.js} +1 -1
  153. package/dist/{chunk-OQ5CLM2H.js → chunk-UDPYSL3M.js} +1 -1
  154. package/dist/{chunk-KDPQXURV.js → chunk-ULMNNGGX.js} +1 -1
  155. package/dist/{chunk-T2IUXXCT.js → chunk-URCH4ITT.js} +1 -1
  156. package/dist/{chunk-NOH63WC6.js → chunk-UU2R56LN.js} +1 -1
  157. package/dist/{chunk-CVVQQLCF.js → chunk-V2FCZC7U.js} +1 -1
  158. package/dist/{chunk-CZ22VZDA.js → chunk-V654BMS7.js} +108 -108
  159. package/dist/{chunk-7IFE4UQY.js → chunk-V7H7ITCF.js} +1 -1
  160. package/dist/{chunk-MYAIWSOO.js → chunk-VG2AESTZ.js} +1 -1
  161. package/dist/{chunk-XTREQ4A2.js → chunk-VXD26GIG.js} +1 -1
  162. package/dist/{chunk-QKVVJXWS.js → chunk-VXL5FBE7.js} +1 -1
  163. package/dist/{chunk-I6FRVYGE.js → chunk-W7S6SYBM.js} +1 -1
  164. package/dist/{chunk-HCZG7YJ6.js → chunk-WAY723TL.js} +1 -1
  165. package/dist/chunk-WFOU5M4H.js +16 -0
  166. package/dist/{chunk-BWRNXCVN.js → chunk-WGOSE3RL.js} +1 -1
  167. package/dist/{chunk-KJQDS5HI.js → chunk-WQ6W725N.js} +1 -1
  168. package/dist/{chunk-52FDK2LC.js → chunk-WQOPLNDH.js} +1 -1
  169. package/dist/{chunk-4GCI2YCZ.js → chunk-X4A5D3PZ.js} +1 -1
  170. package/dist/{chunk-2DID73ML.js → chunk-X7DCL5LT.js} +1 -1
  171. package/dist/{chunk-RVQV6G5M.js → chunk-XDXHSGDL.js} +1 -1
  172. package/dist/{chunk-OX7UVDSU.js → chunk-XKKKMV46.js} +1 -1
  173. package/dist/{chunk-FDXHQZTO.js → chunk-XRVJJG6W.js} +16 -16
  174. package/dist/chunk-XV6XCOTG.js +319 -0
  175. package/dist/{chunk-M3ACZWMR.js → chunk-XYFYQWKW.js} +1 -1
  176. package/dist/{chunk-UWMZ5CSB.js → chunk-XZLM4HLO.js} +1 -1
  177. package/dist/{chunk-FFHH5LOR.js → chunk-YCUEDZDA.js} +1 -1
  178. package/dist/{chunk-XBQDMGUN.js → chunk-YFRI75U4.js} +1 -1
  179. package/dist/{chunk-XMODGI45.js → chunk-YQ63ZFYT.js} +1 -1
  180. package/dist/{chunk-4GOJQKY5.js → chunk-YXIFSIRX.js} +1 -1
  181. package/dist/{chunk-MDRVCBDO.js → chunk-ZBVHPC6W.js} +1 -1
  182. package/dist/{chunk-IQVRP7CT.js → chunk-ZHHTQRWU.js} +1 -1
  183. package/dist/{chunk-Z5SILNH2.js → chunk-ZTZGDZCE.js} +1 -1
  184. package/dist/{chunk-OQU3HLAE.js → chunk-ZVEBXHEY.js} +1 -1
  185. package/dist/cli/commands/app/build.js +1 -1
  186. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  187. package/dist/cli/commands/app/bulk/execute.js +1 -1
  188. package/dist/cli/commands/app/bulk/status.js +1 -1
  189. package/dist/cli/commands/app/config/link.js +1 -1
  190. package/dist/cli/commands/app/config/pull.js +1 -1
  191. package/dist/cli/commands/app/config/use.js +1 -1
  192. package/dist/cli/commands/app/config/validate.js +1 -1
  193. package/dist/cli/commands/app/demo/watcher.js +1 -1
  194. package/dist/cli/commands/app/deploy.js +1 -1
  195. package/dist/cli/commands/app/dev/clean.js +1 -1
  196. package/dist/cli/commands/app/dev.js +1 -1
  197. package/dist/cli/commands/app/env/pull.js +1 -1
  198. package/dist/cli/commands/app/env/show.js +1 -1
  199. package/dist/cli/commands/app/execute.js +1 -1
  200. package/dist/cli/commands/app/function/build.js +1 -1
  201. package/dist/cli/commands/app/function/info.js +1 -1
  202. package/dist/cli/commands/app/function/replay.js +1 -1
  203. package/dist/cli/commands/app/function/run.js +1 -1
  204. package/dist/cli/commands/app/function/schema.js +1 -1
  205. package/dist/cli/commands/app/function/typegen.js +1 -1
  206. package/dist/cli/commands/app/generate/extension.js +1 -1
  207. package/dist/cli/commands/app/graphiql.js +1 -1
  208. package/dist/cli/commands/app/import/channel-config.js +1 -1
  209. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
  210. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
  211. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  212. package/dist/cli/commands/app/import-extensions.js +1 -1
  213. package/dist/cli/commands/app/info.js +1 -1
  214. package/dist/cli/commands/app/init.js +1 -1
  215. package/dist/cli/commands/app/logs.js +1 -1
  216. package/dist/cli/commands/app/release.js +1 -1
  217. package/dist/cli/commands/app/security/check.js +1 -1
  218. package/dist/cli/commands/app/security/clean.js +1 -1
  219. package/dist/cli/commands/app/security/instructions.js +1 -1
  220. package/dist/cli/commands/app/security/record.js +1 -1
  221. package/dist/cli/commands/app/security/review.js +1 -1
  222. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  223. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  224. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  225. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  226. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  227. package/dist/cli/commands/app/versions/list.js +1 -1
  228. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  229. package/dist/cli/commands/auth/login.js +1 -1
  230. package/dist/cli/commands/auth/logout.js +1 -1
  231. package/dist/cli/commands/cache/clear.js +1 -1
  232. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  233. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  234. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  235. package/dist/cli/commands/debug/command-flags.js +1 -1
  236. package/dist/cli/commands/doc/fetch.js +1 -1
  237. package/dist/cli/commands/doc/search.js +1 -1
  238. package/dist/cli/commands/docs/generate.js +1 -1
  239. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  240. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  241. package/dist/cli/commands/help.js +1 -1
  242. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  243. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  244. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  245. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  246. package/dist/cli/commands/notifications/generate.js +1 -1
  247. package/dist/cli/commands/notifications/list.js +1 -1
  248. package/dist/cli/commands/organization/list.js +1 -1
  249. package/dist/cli/commands/search.js +1 -1
  250. package/dist/cli/commands/send-analytics.js +1 -1
  251. package/dist/cli/commands/theme/check.js +1 -1
  252. package/dist/cli/commands/theme/console.js +1 -1
  253. package/dist/cli/commands/theme/delete.js +1 -1
  254. package/dist/cli/commands/theme/dev.js +1 -1
  255. package/dist/cli/commands/theme/duplicate.js +1 -1
  256. package/dist/cli/commands/theme/info.js +1 -1
  257. package/dist/cli/commands/theme/init.js +1 -1
  258. package/dist/cli/commands/theme/language-server.js +1 -1
  259. package/dist/cli/commands/theme/list.js +1 -1
  260. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  261. package/dist/cli/commands/theme/open.js +1 -1
  262. package/dist/cli/commands/theme/package.js +1 -1
  263. package/dist/cli/commands/theme/preview.js +1 -1
  264. package/dist/cli/commands/theme/profile.js +1 -1
  265. package/dist/cli/commands/theme/publish.js +1 -1
  266. package/dist/cli/commands/theme/pull.js +1 -1
  267. package/dist/cli/commands/theme/push.js +1 -1
  268. package/dist/cli/commands/theme/rename.js +1 -1
  269. package/dist/cli/commands/theme/share.js +1 -1
  270. package/dist/cli/commands/upgrade.js +1 -1
  271. package/dist/cli/commands/version.js +1 -1
  272. package/dist/cli/help.js +1 -1
  273. package/dist/{command-json-schema-2UMKY7MY.js → command-json-schema-6EGXCM4B.js} +1 -1
  274. package/dist/command-registry.js +1 -1
  275. package/dist/{conf-store-RI3TL6I4.js → conf-store-E7ELDWBA.js} +1 -1
  276. package/dist/{custom-oclif-loader-IZCKN67O.js → custom-oclif-loader-FKFZJPHF.js} +1 -1
  277. package/dist/{deprecations-IFVUXXDB.js → deprecations-RNGBHZYB.js} +1 -1
  278. package/dist/dist-VHIZZDYK.js +1 -0
  279. package/dist/dist-WXI5YQYP.js +1 -0
  280. package/dist/{environments-CYMEN7NV.js → environments-WZJ6MRTH.js} +1 -1
  281. package/dist/{error-IL6WQMSW.js → error-IFB626JA.js} +1 -1
  282. package/dist/error-handler-OVJYVIOZ.js +1 -0
  283. package/dist/{fs-AINFLJ2E.js → fs-7UOUHJDO.js} +1 -1
  284. package/dist/hooks/did-you-mean.js +1 -1
  285. package/dist/hooks/hydrogen-init.js +1 -1
  286. package/dist/hooks/postrun.js +1 -1
  287. package/dist/hooks/prerun.js +1 -1
  288. package/dist/hooks/public-metadata.js +1 -1
  289. package/dist/hooks/sensitive-metadata.js +1 -1
  290. package/dist/hooks/tunnel-provider.js +1 -1
  291. package/dist/hooks/tunnel-start.js +1 -1
  292. package/dist/index.js +12 -12
  293. package/dist/{is-global-2VLKV46Q.js → is-global-XW3CVHLK.js} +1 -1
  294. package/dist/{json-error-HZB5YIHV.js → json-error-C2U7ZLCG.js} +1 -1
  295. package/dist/{local-KOZETREJ.js → local-KA3IWOZ6.js} +1 -1
  296. package/dist/{metadata-IBPHZB7N.js → metadata-6JI7HF5B.js} +1 -1
  297. package/dist/{node-package-manager-DXSRNEDC.js → node-package-manager-X3QIEMMX.js} +1 -1
  298. package/dist/{notifications-system-XA3EBOGJ.js → notifications-system-OXGLT2R4.js} +1 -1
  299. package/dist/{os-X73O7BAB.js → os-NORIEVMI.js} +1 -1
  300. package/dist/{output-3OYXK3Z5.js → output-K3JTLRJD.js} +1 -1
  301. package/dist/{system-JWYYT4PM.js → system-LTHR2T7L.js} +1 -1
  302. package/dist/tsconfig.tsbuildinfo +1 -1
  303. package/dist/{ui-PCG5D6RZ.js → ui-MYUBVKCK.js} +1 -1
  304. package/dist/upgrade-MFTWBXL3.js +1 -0
  305. package/dist/version-BNGPPAUU.js +1 -0
  306. package/dist/{version-7DGU2KYH.js → version-RCGFWSB4.js} +1 -1
  307. package/dist/{workerd-MQZ3NKJI.js → workerd-ISSXMKIH.js} +1 -1
  308. package/oclif.manifest.json +6 -3
  309. package/package.json +7 -7
  310. package/dist/analytics-Q6QDIDYT.js +0 -1
  311. package/dist/chunk-3C6VLJ5D.js +0 -319
  312. package/dist/chunk-43R5VGKT.js +0 -1
  313. package/dist/chunk-4C2DAX5T.js +0 -1
  314. package/dist/chunk-7RPFJZLP.js +0 -1
  315. package/dist/chunk-DNMXVMJM.js +0 -47
  316. package/dist/chunk-IUP7POIE.js +0 -6
  317. package/dist/chunk-JDR6UVZA.js +0 -8
  318. package/dist/chunk-JOJV5E2K.js +0 -1
  319. package/dist/chunk-LVLAOBJM.js +0 -103
  320. package/dist/chunk-PMHP57MH.js +0 -20
  321. package/dist/chunk-WDFCOZAY.js +0 -16
  322. package/dist/chunk-ZGV3HNEV.js +0 -1
  323. package/dist/dist-4H2B7BMN.js +0 -1
  324. package/dist/dist-QNWOGQN3.js +0 -1
  325. package/dist/error-handler-74HKA23T.js +0 -1
  326. package/dist/upgrade-7U2TUNC4.js +0 -1
  327. package/dist/version-SXQTRBXB.js +0 -1
@@ -1,4 +1,4 @@
1
- import{v as xy}from"./chunk-DJAZBPYA.js";import{A as Iy,B as Ny,C as zy,D as hi,E as Oy,F as zn,G as Ay,H as Ly,I as ja,J as qy,K as $a,L as Wy,M as ls,N as r0,O as Hy,P as Ba,Q as cs,R as ds,S as On,T as Uy,U as ln,V as Va,W as Ga,X as $,Y as i0,Z as o0,b as Y,d as La,da as qu,e as ky,f as Nn,g as Te,h as qa,i as Cy,j as Ty,k as _y,l as Ey,m as Ry,n as as,o as Dy,p as Wa,q as J,r as Ha,s as Fy,t as Ua,u as Jt,v as Py,w as G,x as dt,y as Dr,z as My}from"./chunk-M5TGCSUK.js";import{b as Sy}from"./chunk-Q2SZCZE7.js";import{a as Vt,b as ee,c as w,d as wy,e as Gt,f as Kt,g as h}from"./chunk-VKWPEFWQ.js";var Ui=w(ht=>{"use strict";h();Object.defineProperty(ht,"__esModule",{value:!0});ht.stringArray=ht.array=ht.func=ht.error=ht.number=ht.string=ht.boolean=void 0;function s0(n){return n===!0||n===!1}ht.boolean=s0;function jy(n){return typeof n=="string"||n instanceof String}ht.string=jy;function a0(n){return typeof n=="number"||n instanceof Number}ht.number=a0;function l0(n){return n instanceof Error}ht.error=l0;function c0(n){return typeof n=="function"}ht.func=c0;function $y(n){return Array.isArray(n)}ht.array=$y;function d0(n){return $y(n)&&n.every(e=>jy(e))}ht.stringArray=d0});var cp=w(B=>{"use strict";h();Object.defineProperty(B,"__esModule",{value:!0});B.Message=B.NotificationType9=B.NotificationType8=B.NotificationType7=B.NotificationType6=B.NotificationType5=B.NotificationType4=B.NotificationType3=B.NotificationType2=B.NotificationType1=B.NotificationType0=B.NotificationType=B.RequestType9=B.RequestType8=B.RequestType7=B.RequestType6=B.RequestType5=B.RequestType4=B.RequestType3=B.RequestType2=B.RequestType1=B.RequestType=B.RequestType0=B.AbstractMessageSignature=B.ParameterStructures=B.ResponseError=B.ErrorCodes=void 0;var ui=Ui(),By;(function(n){n.ParseError=-32700,n.InvalidRequest=-32600,n.MethodNotFound=-32601,n.InvalidParams=-32602,n.InternalError=-32603,n.jsonrpcReservedErrorRangeStart=-32099,n.serverErrorStart=-32099,n.MessageWriteError=-32099,n.MessageReadError=-32098,n.PendingResponseRejected=-32097,n.ConnectionInactive=-32096,n.ServerNotInitialized=-32002,n.UnknownErrorCode=-32001,n.jsonrpcReservedErrorRangeEnd=-32e3,n.serverErrorEnd=-32e3})(By=B.ErrorCodes||(B.ErrorCodes={}));var Wu=class n extends Error{constructor(e,t,r){super(t),this.code=ui.number(e)?e:By.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,n.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};B.ResponseError=Wu;var Rt=class n{constructor(e){this.kind=e}static is(e){return e===n.auto||e===n.byName||e===n.byPosition}toString(){return this.kind}};B.ParameterStructures=Rt;Rt.auto=new Rt("auto");Rt.byPosition=new Rt("byPosition");Rt.byName=new Rt("byName");var _e=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return Rt.auto}};B.AbstractMessageSignature=_e;var Hu=class extends _e{constructor(e){super(e,0)}};B.RequestType0=Hu;var Uu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.RequestType=Uu;var ju=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.RequestType1=ju;var $u=class extends _e{constructor(e){super(e,2)}};B.RequestType2=$u;var Bu=class extends _e{constructor(e){super(e,3)}};B.RequestType3=Bu;var Vu=class extends _e{constructor(e){super(e,4)}};B.RequestType4=Vu;var Gu=class extends _e{constructor(e){super(e,5)}};B.RequestType5=Gu;var Ku=class extends _e{constructor(e){super(e,6)}};B.RequestType6=Ku;var Ju=class extends _e{constructor(e){super(e,7)}};B.RequestType7=Ju;var Xu=class extends _e{constructor(e){super(e,8)}};B.RequestType8=Xu;var Yu=class extends _e{constructor(e){super(e,9)}};B.RequestType9=Yu;var Qu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.NotificationType=Qu;var Zu=class extends _e{constructor(e){super(e,0)}};B.NotificationType0=Zu;var ep=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.NotificationType1=ep;var tp=class extends _e{constructor(e){super(e,2)}};B.NotificationType2=tp;var np=class extends _e{constructor(e){super(e,3)}};B.NotificationType3=np;var rp=class extends _e{constructor(e){super(e,4)}};B.NotificationType4=rp;var ip=class extends _e{constructor(e){super(e,5)}};B.NotificationType5=ip;var op=class extends _e{constructor(e){super(e,6)}};B.NotificationType6=op;var sp=class extends _e{constructor(e){super(e,7)}};B.NotificationType7=sp;var ap=class extends _e{constructor(e){super(e,8)}};B.NotificationType8=ap;var lp=class extends _e{constructor(e){super(e,9)}};B.NotificationType9=lp;var h0;(function(n){function e(i){let o=i;return o&&ui.string(o.method)&&(ui.string(o.id)||ui.number(o.id))}n.isRequest=e;function t(i){let o=i;return o&&ui.string(o.method)&&i.id===void 0}n.isNotification=t;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(ui.string(o.id)||ui.number(o.id)||o.id===null)}n.isResponse=r})(h0=B.Message||(B.Message={}))});var hp=w(tr=>{"use strict";h();var Vy;Object.defineProperty(tr,"__esModule",{value:!0});tr.LRUCache=tr.LinkedMap=tr.Touch=void 0;var gt;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(gt=tr.Touch||(tr.Touch={}));var Ka=class{constructor(){this[Vy]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=gt.None){let r=this._map.get(e);if(r)return t!==gt.None&&this.touch(r,t),r.value}set(e,t,r=gt.None){let i=this._map.get(e);if(i)i.value=t,r!==gt.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case gt.None:this.addItemLast(i);break;case gt.First:this.addItemFirst(i);break;case gt.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[(Vy=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==gt.First&&t!==gt.Last)){if(t===gt.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===gt.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}};tr.LinkedMap=Ka;var dp=class extends Ka{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=gt.AsNew){return super.get(e,t)}peek(e){return super.get(e,gt.None)}set(e,t){return super.set(e,t,gt.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};tr.LRUCache=dp});var Gy=w(hs=>{"use strict";h();Object.defineProperty(hs,"__esModule",{value:!0});hs.Disposable=void 0;var u0;(function(n){function e(t){return{dispose:t}}n.create=e})(u0=hs.Disposable||(hs.Disposable={}))});var Fr=w(mp=>{"use strict";h();Object.defineProperty(mp,"__esModule",{value:!0});var up;function pp(){if(up===void 0)throw new Error("No runtime abstraction layer installed");return up}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");up=t}n.install=e})(pp||(pp={}));mp.default=pp});var ji=w(pi=>{"use strict";h();Object.defineProperty(pi,"__esModule",{value:!0});pi.Emitter=pi.Event=void 0;var p0=Fr(),m0;(function(n){let e={dispose(){}};n.None=function(){return e}})(m0=pi.Event||(pi.Event={}));var fp=class{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e)if(this._contexts[i]===t){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let t=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{t.push(r[o].apply(i[o],e))}catch(a){(0,p0.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Ja=class n{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new fp),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=n._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};pi.Emitter=Ja;Ja._noop=function(){}});var Ya=w(mi=>{"use strict";h();Object.defineProperty(mi,"__esModule",{value:!0});mi.CancellationTokenSource=mi.CancellationToken=void 0;var f0=Fr(),g0=Ui(),gp=ji(),bp;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:gp.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:gp.Event.None});function e(t){let r=t;return r&&(r===n.None||r===n.Cancelled||g0.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(bp=mi.CancellationToken||(mi.CancellationToken={}));var b0=Object.freeze(function(n,e){let t=(0,f0.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}}),Xa=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?b0:(this._emitter||(this._emitter=new gp.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},vp=class{get token(){return this._token||(this._token=new Xa),this._token}cancel(){this._token?this._token.cancel():this._token=bp.Cancelled}dispose(){this._token?this._token instanceof Xa&&this._token.dispose():this._token=bp.None}};mi.CancellationTokenSource=vp});var Ky=w($i=>{"use strict";h();Object.defineProperty($i,"__esModule",{value:!0});$i.SharedArrayReceiverStrategy=$i.SharedArraySenderStrategy=void 0;var v0=Ya(),us;(function(n){n.Continue=0,n.Cancelled=1})(us||(us={}));var yp=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=us.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,us.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};$i.SharedArraySenderStrategy=yp;var wp=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===us.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Sp=class{constructor(e){this.token=new wp(e)}cancel(){}dispose(){}},xp=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new v0.CancellationTokenSource:new Sp(t)}};$i.SharedArrayReceiverStrategy=xp});var Cp=w(Qa=>{"use strict";h();Object.defineProperty(Qa,"__esModule",{value:!0});Qa.Semaphore=void 0;var y0=Fr(),kp=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,y0.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};Qa.Semaphore=kp});var Jy=w(nr=>{"use strict";h();Object.defineProperty(nr,"__esModule",{value:!0});nr.ReadableStreamMessageReader=nr.AbstractMessageReader=nr.MessageReader=void 0;var _p=Fr(),Bi=Ui(),Tp=ji(),w0=Cp(),S0;(function(n){function e(t){let r=t;return r&&Bi.func(r.listen)&&Bi.func(r.dispose)&&Bi.func(r.onError)&&Bi.func(r.onClose)&&Bi.func(r.onPartialMessage)}n.is=e})(S0=nr.MessageReader||(nr.MessageReader={}));var Za=class{constructor(){this.errorEmitter=new Tp.Emitter,this.closeEmitter=new Tp.Emitter,this.partialMessageEmitter=new Tp.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Bi.string(e.message)?e.message:"unknown"}`)}};nr.AbstractMessageReader=Za;var Ep;(function(n){function e(t){let r,i,o,s=new Map,a,l=new Map;if(t===void 0||typeof t=="string")r=t??"utf-8";else{if(r=t.charset??"utf-8",t.contentDecoder!==void 0&&(o=t.contentDecoder,s.set(o.name,o)),t.contentDecoders!==void 0)for(let c of t.contentDecoders)s.set(c.name,c);if(t.contentTypeDecoder!==void 0&&(a=t.contentTypeDecoder,l.set(a.name,a)),t.contentTypeDecoders!==void 0)for(let c of t.contentTypeDecoders)l.set(c.name,c)}return a===void 0&&(a=(0,_p.default)().applicationJson.decoder,l.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:l}}n.fromOptions=e})(Ep||(Ep={}));var Rp=class extends Za{constructor(e,t){super(),this.readable=e,this.options=Ep.fromOptions(t),this.buffer=(0,_p.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new w0.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error("Header must provide a Content-Length property."));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error("Content-Length value must be a number."));return}this.nextMessageLength=o}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,_p.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};nr.ReadableStreamMessageReader=Rp});var Zy=w(rr=>{"use strict";h();Object.defineProperty(rr,"__esModule",{value:!0});rr.WriteableStreamMessageWriter=rr.AbstractMessageWriter=rr.MessageWriter=void 0;var Xy=Fr(),ps=Ui(),x0=Cp(),Yy=ji(),k0="Content-Length: ",Qy=`\r
1
+ import{v as xy}from"./chunk-KT5QQOES.js";import{A as Iy,B as Ny,C as zy,D as hi,E as Oy,F as zn,G as Ay,H as Ly,I as ja,J as qy,K as $a,L as Wy,M as ls,N as r0,O as Hy,P as Ba,Q as cs,R as ds,S as On,T as Uy,U as ln,V as Va,W as Ga,X as $,Y as i0,Z as o0,b as Y,d as La,da as qu,e as ky,f as Nn,g as Te,h as qa,i as Cy,j as Ty,k as _y,l as Ey,m as Ry,n as as,o as Dy,p as Wa,q as J,r as Ha,s as Fy,t as Ua,u as Jt,v as Py,w as G,x as dt,y as Dr,z as My}from"./chunk-DTRENW4Q.js";import{b as Sy}from"./chunk-5AWELO3D.js";import{a as Vt,b as ee,c as w,d as wy,e as Gt,f as Kt,g as h}from"./chunk-VKWPEFWQ.js";var Ui=w(ht=>{"use strict";h();Object.defineProperty(ht,"__esModule",{value:!0});ht.stringArray=ht.array=ht.func=ht.error=ht.number=ht.string=ht.boolean=void 0;function s0(n){return n===!0||n===!1}ht.boolean=s0;function jy(n){return typeof n=="string"||n instanceof String}ht.string=jy;function a0(n){return typeof n=="number"||n instanceof Number}ht.number=a0;function l0(n){return n instanceof Error}ht.error=l0;function c0(n){return typeof n=="function"}ht.func=c0;function $y(n){return Array.isArray(n)}ht.array=$y;function d0(n){return $y(n)&&n.every(e=>jy(e))}ht.stringArray=d0});var cp=w(B=>{"use strict";h();Object.defineProperty(B,"__esModule",{value:!0});B.Message=B.NotificationType9=B.NotificationType8=B.NotificationType7=B.NotificationType6=B.NotificationType5=B.NotificationType4=B.NotificationType3=B.NotificationType2=B.NotificationType1=B.NotificationType0=B.NotificationType=B.RequestType9=B.RequestType8=B.RequestType7=B.RequestType6=B.RequestType5=B.RequestType4=B.RequestType3=B.RequestType2=B.RequestType1=B.RequestType=B.RequestType0=B.AbstractMessageSignature=B.ParameterStructures=B.ResponseError=B.ErrorCodes=void 0;var ui=Ui(),By;(function(n){n.ParseError=-32700,n.InvalidRequest=-32600,n.MethodNotFound=-32601,n.InvalidParams=-32602,n.InternalError=-32603,n.jsonrpcReservedErrorRangeStart=-32099,n.serverErrorStart=-32099,n.MessageWriteError=-32099,n.MessageReadError=-32098,n.PendingResponseRejected=-32097,n.ConnectionInactive=-32096,n.ServerNotInitialized=-32002,n.UnknownErrorCode=-32001,n.jsonrpcReservedErrorRangeEnd=-32e3,n.serverErrorEnd=-32e3})(By=B.ErrorCodes||(B.ErrorCodes={}));var Wu=class n extends Error{constructor(e,t,r){super(t),this.code=ui.number(e)?e:By.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,n.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};B.ResponseError=Wu;var Rt=class n{constructor(e){this.kind=e}static is(e){return e===n.auto||e===n.byName||e===n.byPosition}toString(){return this.kind}};B.ParameterStructures=Rt;Rt.auto=new Rt("auto");Rt.byPosition=new Rt("byPosition");Rt.byName=new Rt("byName");var _e=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return Rt.auto}};B.AbstractMessageSignature=_e;var Hu=class extends _e{constructor(e){super(e,0)}};B.RequestType0=Hu;var Uu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.RequestType=Uu;var ju=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.RequestType1=ju;var $u=class extends _e{constructor(e){super(e,2)}};B.RequestType2=$u;var Bu=class extends _e{constructor(e){super(e,3)}};B.RequestType3=Bu;var Vu=class extends _e{constructor(e){super(e,4)}};B.RequestType4=Vu;var Gu=class extends _e{constructor(e){super(e,5)}};B.RequestType5=Gu;var Ku=class extends _e{constructor(e){super(e,6)}};B.RequestType6=Ku;var Ju=class extends _e{constructor(e){super(e,7)}};B.RequestType7=Ju;var Xu=class extends _e{constructor(e){super(e,8)}};B.RequestType8=Xu;var Yu=class extends _e{constructor(e){super(e,9)}};B.RequestType9=Yu;var Qu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.NotificationType=Qu;var Zu=class extends _e{constructor(e){super(e,0)}};B.NotificationType0=Zu;var ep=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};B.NotificationType1=ep;var tp=class extends _e{constructor(e){super(e,2)}};B.NotificationType2=tp;var np=class extends _e{constructor(e){super(e,3)}};B.NotificationType3=np;var rp=class extends _e{constructor(e){super(e,4)}};B.NotificationType4=rp;var ip=class extends _e{constructor(e){super(e,5)}};B.NotificationType5=ip;var op=class extends _e{constructor(e){super(e,6)}};B.NotificationType6=op;var sp=class extends _e{constructor(e){super(e,7)}};B.NotificationType7=sp;var ap=class extends _e{constructor(e){super(e,8)}};B.NotificationType8=ap;var lp=class extends _e{constructor(e){super(e,9)}};B.NotificationType9=lp;var h0;(function(n){function e(i){let o=i;return o&&ui.string(o.method)&&(ui.string(o.id)||ui.number(o.id))}n.isRequest=e;function t(i){let o=i;return o&&ui.string(o.method)&&i.id===void 0}n.isNotification=t;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(ui.string(o.id)||ui.number(o.id)||o.id===null)}n.isResponse=r})(h0=B.Message||(B.Message={}))});var hp=w(tr=>{"use strict";h();var Vy;Object.defineProperty(tr,"__esModule",{value:!0});tr.LRUCache=tr.LinkedMap=tr.Touch=void 0;var gt;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(gt=tr.Touch||(tr.Touch={}));var Ka=class{constructor(){this[Vy]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=gt.None){let r=this._map.get(e);if(r)return t!==gt.None&&this.touch(r,t),r.value}set(e,t,r=gt.None){let i=this._map.get(e);if(i)i.value=t,r!==gt.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case gt.None:this.addItemLast(i);break;case gt.First:this.addItemFirst(i);break;case gt.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[(Vy=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==gt.First&&t!==gt.Last)){if(t===gt.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===gt.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}};tr.LinkedMap=Ka;var dp=class extends Ka{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=gt.AsNew){return super.get(e,t)}peek(e){return super.get(e,gt.None)}set(e,t){return super.set(e,t,gt.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};tr.LRUCache=dp});var Gy=w(hs=>{"use strict";h();Object.defineProperty(hs,"__esModule",{value:!0});hs.Disposable=void 0;var u0;(function(n){function e(t){return{dispose:t}}n.create=e})(u0=hs.Disposable||(hs.Disposable={}))});var Fr=w(mp=>{"use strict";h();Object.defineProperty(mp,"__esModule",{value:!0});var up;function pp(){if(up===void 0)throw new Error("No runtime abstraction layer installed");return up}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");up=t}n.install=e})(pp||(pp={}));mp.default=pp});var ji=w(pi=>{"use strict";h();Object.defineProperty(pi,"__esModule",{value:!0});pi.Emitter=pi.Event=void 0;var p0=Fr(),m0;(function(n){let e={dispose(){}};n.None=function(){return e}})(m0=pi.Event||(pi.Event={}));var fp=class{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e)if(this._contexts[i]===t){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let t=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{t.push(r[o].apply(i[o],e))}catch(a){(0,p0.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Ja=class n{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new fp),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=n._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};pi.Emitter=Ja;Ja._noop=function(){}});var Ya=w(mi=>{"use strict";h();Object.defineProperty(mi,"__esModule",{value:!0});mi.CancellationTokenSource=mi.CancellationToken=void 0;var f0=Fr(),g0=Ui(),gp=ji(),bp;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:gp.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:gp.Event.None});function e(t){let r=t;return r&&(r===n.None||r===n.Cancelled||g0.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(bp=mi.CancellationToken||(mi.CancellationToken={}));var b0=Object.freeze(function(n,e){let t=(0,f0.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}}),Xa=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?b0:(this._emitter||(this._emitter=new gp.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},vp=class{get token(){return this._token||(this._token=new Xa),this._token}cancel(){this._token?this._token.cancel():this._token=bp.Cancelled}dispose(){this._token?this._token instanceof Xa&&this._token.dispose():this._token=bp.None}};mi.CancellationTokenSource=vp});var Ky=w($i=>{"use strict";h();Object.defineProperty($i,"__esModule",{value:!0});$i.SharedArrayReceiverStrategy=$i.SharedArraySenderStrategy=void 0;var v0=Ya(),us;(function(n){n.Continue=0,n.Cancelled=1})(us||(us={}));var yp=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=us.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,us.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};$i.SharedArraySenderStrategy=yp;var wp=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===us.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Sp=class{constructor(e){this.token=new wp(e)}cancel(){}dispose(){}},xp=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new v0.CancellationTokenSource:new Sp(t)}};$i.SharedArrayReceiverStrategy=xp});var Cp=w(Qa=>{"use strict";h();Object.defineProperty(Qa,"__esModule",{value:!0});Qa.Semaphore=void 0;var y0=Fr(),kp=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,y0.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};Qa.Semaphore=kp});var Jy=w(nr=>{"use strict";h();Object.defineProperty(nr,"__esModule",{value:!0});nr.ReadableStreamMessageReader=nr.AbstractMessageReader=nr.MessageReader=void 0;var _p=Fr(),Bi=Ui(),Tp=ji(),w0=Cp(),S0;(function(n){function e(t){let r=t;return r&&Bi.func(r.listen)&&Bi.func(r.dispose)&&Bi.func(r.onError)&&Bi.func(r.onClose)&&Bi.func(r.onPartialMessage)}n.is=e})(S0=nr.MessageReader||(nr.MessageReader={}));var Za=class{constructor(){this.errorEmitter=new Tp.Emitter,this.closeEmitter=new Tp.Emitter,this.partialMessageEmitter=new Tp.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Bi.string(e.message)?e.message:"unknown"}`)}};nr.AbstractMessageReader=Za;var Ep;(function(n){function e(t){let r,i,o,s=new Map,a,l=new Map;if(t===void 0||typeof t=="string")r=t??"utf-8";else{if(r=t.charset??"utf-8",t.contentDecoder!==void 0&&(o=t.contentDecoder,s.set(o.name,o)),t.contentDecoders!==void 0)for(let c of t.contentDecoders)s.set(c.name,c);if(t.contentTypeDecoder!==void 0&&(a=t.contentTypeDecoder,l.set(a.name,a)),t.contentTypeDecoders!==void 0)for(let c of t.contentTypeDecoders)l.set(c.name,c)}return a===void 0&&(a=(0,_p.default)().applicationJson.decoder,l.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:l}}n.fromOptions=e})(Ep||(Ep={}));var Rp=class extends Za{constructor(e,t){super(),this.readable=e,this.options=Ep.fromOptions(t),this.buffer=(0,_p.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new w0.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error("Header must provide a Content-Length property."));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error("Content-Length value must be a number."));return}this.nextMessageLength=o}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,_p.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};nr.ReadableStreamMessageReader=Rp});var Zy=w(rr=>{"use strict";h();Object.defineProperty(rr,"__esModule",{value:!0});rr.WriteableStreamMessageWriter=rr.AbstractMessageWriter=rr.MessageWriter=void 0;var Xy=Fr(),ps=Ui(),x0=Cp(),Yy=ji(),k0="Content-Length: ",Qy=`\r
2
2
  `,C0;(function(n){function e(t){let r=t;return r&&ps.func(r.dispose)&&ps.func(r.onClose)&&ps.func(r.onError)&&ps.func(r.write)}n.is=e})(C0=rr.MessageWriter||(rr.MessageWriter={}));var el=class{constructor(){this.errorEmitter=new Yy.Emitter,this.closeEmitter=new Yy.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${ps.string(e.message)?e.message:"unknown"}`)}};rr.AbstractMessageWriter=el;var Dp;(function(n){function e(t){return t===void 0||typeof t=="string"?{charset:t??"utf-8",contentTypeEncoder:(0,Xy.default)().applicationJson.encoder}:{charset:t.charset??"utf-8",contentEncoder:t.contentEncoder,contentTypeEncoder:t.contentTypeEncoder??(0,Xy.default)().applicationJson.encoder}}n.fromOptions=e})(Dp||(Dp={}));var Fp=class extends el{constructor(e,t){super(),this.writable=e,this.options=Dp.fromOptions(t),this.errorCount=0,this.writeSemaphore=new x0.Semaphore(1),this.writable.onError(r=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(k0,r.byteLength.toString(),Qy),i.push(Qy),this.doWrite(e,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};rr.WriteableStreamMessageWriter=Fp});var ew=w(tl=>{"use strict";h();Object.defineProperty(tl,"__esModule",{value:!0});tl.AbstractMessageBuffer=void 0;var T0=13,_0=10,E0=`\r
3
3
  `,Pp=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let t=0,r=0,i=0,o=0;e:for(;r<this._chunks.length;){let c=this._chunks[r];for(i=0;i<c.length;){switch(c[i]){case T0:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case _0:switch(t){case 1:t=2;break;case 3:t=4,i++;break e;default:t=0}break;default:t=0}i++}o+=c.byteLength,r++}if(t!==4)return;let s=this._read(o+i),a=new Map,l=this.toString(s,"ascii").split(E0);if(l.length<2)return a;for(let c=0;c<l.length-2;c++){let d=l[c],p=d.indexOf(":");if(p===-1)throw new Error("Message header must separate key and value using :");let m=d.substr(0,p),g=d.substr(p+1).trim();a.set(e?m.toLowerCase():m,g)}return a}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(o)}if(this._chunks[0].byteLength>e){let o=this._chunks[0],s=this.asNative(o,e);return this._chunks[0]=o.slice(e),this._totalLength-=e,s}let t=this.allocNative(e),r=0,i=0;for(;e>0;){let o=this._chunks[i];if(o.byteLength>e){let s=o.slice(0,e);t.set(s,r),r+=e,this._chunks[i]=o.slice(e),this._totalLength-=e,e-=e}else t.set(o,r),r+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,e-=o.byteLength}return t}};tl.AbstractMessageBuffer=Pp});var aw=w(j=>{"use strict";h();Object.defineProperty(j,"__esModule",{value:!0});j.createMessageConnection=j.ConnectionOptions=j.MessageStrategy=j.CancellationStrategy=j.CancellationSenderStrategy=j.CancellationReceiverStrategy=j.RequestCancellationReceiverStrategy=j.IdCancellationReceiverStrategy=j.ConnectionStrategy=j.ConnectionError=j.ConnectionErrors=j.LogTraceNotification=j.SetTraceNotification=j.TraceFormat=j.TraceValues=j.Trace=j.NullLogger=j.ProgressType=j.ProgressToken=void 0;var tw=Fr(),Me=Ui(),X=cp(),nw=hp(),ms=ji(),Mp=Ya(),gs;(function(n){n.type=new X.NotificationType("$/cancelRequest")})(gs||(gs={}));var rw;(function(n){function e(t){return typeof t=="string"||typeof t=="number"}n.is=e})(rw=j.ProgressToken||(j.ProgressToken={}));var fs;(function(n){n.type=new X.NotificationType("$/progress")})(fs||(fs={}));var Ip=class{constructor(){}};j.ProgressType=Ip;var Np;(function(n){function e(t){return Me.func(t)}n.is=e})(Np||(Np={}));j.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var ge;(function(n){n[n.Off=0]="Off",n[n.Messages=1]="Messages",n[n.Compact=2]="Compact",n[n.Verbose=3]="Verbose"})(ge=j.Trace||(j.Trace={}));var R0;(function(n){n.Off="off",n.Messages="messages",n.Compact="compact",n.Verbose="verbose"})(R0=j.TraceValues||(j.TraceValues={}));(function(n){function e(r){if(!Me.string(r))return n.Off;switch(r=r.toLowerCase(),r){case"off":return n.Off;case"messages":return n.Messages;case"compact":return n.Compact;case"verbose":return n.Verbose;default:return n.Off}}n.fromString=e;function t(r){switch(r){case n.Off:return"off";case n.Messages:return"messages";case n.Compact:return"compact";case n.Verbose:return"verbose";default:return"off"}}n.toString=t})(ge=j.Trace||(j.Trace={}));var cn;(function(n){n.Text="text",n.JSON="json"})(cn=j.TraceFormat||(j.TraceFormat={}));(function(n){function e(t){return Me.string(t)?(t=t.toLowerCase(),t==="json"?n.JSON:n.Text):n.Text}n.fromString=e})(cn=j.TraceFormat||(j.TraceFormat={}));var iw;(function(n){n.type=new X.NotificationType("$/setTrace")})(iw=j.SetTraceNotification||(j.SetTraceNotification={}));var zp;(function(n){n.type=new X.NotificationType("$/logTrace")})(zp=j.LogTraceNotification||(j.LogTraceNotification={}));var nl;(function(n){n[n.Closed=1]="Closed",n[n.Disposed=2]="Disposed",n[n.AlreadyListening=3]="AlreadyListening"})(nl=j.ConnectionErrors||(j.ConnectionErrors={}));var Vi=class n extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,n.prototype)}};j.ConnectionError=Vi;var ow;(function(n){function e(t){let r=t;return r&&Me.func(r.cancelUndispatched)}n.is=e})(ow=j.ConnectionStrategy||(j.ConnectionStrategy={}));var Lp;(function(n){function e(t){let r=t;return r&&(r.kind===void 0||r.kind==="id")&&Me.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Me.func(r.dispose))}n.is=e})(Lp=j.IdCancellationReceiverStrategy||(j.IdCancellationReceiverStrategy={}));var sw;(function(n){function e(t){let r=t;return r&&r.kind==="request"&&Me.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Me.func(r.dispose))}n.is=e})(sw=j.RequestCancellationReceiverStrategy||(j.RequestCancellationReceiverStrategy={}));var Op;(function(n){n.Message=Object.freeze({createCancellationTokenSource(t){return new Mp.CancellationTokenSource}});function e(t){return Lp.is(t)||sw.is(t)}n.is=e})(Op=j.CancellationReceiverStrategy||(j.CancellationReceiverStrategy={}));var Ap;(function(n){n.Message=Object.freeze({sendCancellation(t,r){return t.sendNotification(gs.type,{id:r})},cleanup(t){}});function e(t){let r=t;return r&&Me.func(r.sendCancellation)&&Me.func(r.cleanup)}n.is=e})(Ap=j.CancellationSenderStrategy||(j.CancellationSenderStrategy={}));var qp;(function(n){n.Message=Object.freeze({receiver:Op.Message,sender:Ap.Message});function e(t){let r=t;return r&&Op.is(r.receiver)&&Ap.is(r.sender)}n.is=e})(qp=j.CancellationStrategy||(j.CancellationStrategy={}));var Wp;(function(n){function e(t){let r=t;return r&&Me.func(r.handleMessage)}n.is=e})(Wp=j.MessageStrategy||(j.MessageStrategy={}));var D0;(function(n){function e(t){let r=t;return r&&(qp.is(r.cancellationStrategy)||ow.is(r.connectionStrategy)||Wp.is(r.messageStrategy))}n.is=e})(D0=j.ConnectionOptions||(j.ConnectionOptions={}));var dn;(function(n){n[n.New=1]="New",n[n.Listening=2]="Listening",n[n.Closed=3]="Closed",n[n.Disposed=4]="Disposed"})(dn||(dn={}));function F0(n,e,t,r){let i=t!==void 0?t:j.NullLogger,o=0,s=0,a=0,l="2.0",c,d=new Map,p,m=new Map,g=new Map,S,F=new nw.LinkedMap,P=new Map,I=new Set,x=new Map,y=ge.Off,R=cn.Text,O,W=dn.New,ke=new ms.Emitter,Fe=new ms.Emitter,jt=new ms.Emitter,Mt=new ms.Emitter,Tt=new ms.Emitter,_t=r&&r.cancellationStrategy?r.cancellationStrategy:qp.Message;function Pn(v){if(v===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+v.toString()}function ci(v){return v===null?"res-unknown-"+(++a).toString():"res-"+v.toString()}function $t(){return"not-"+(++s).toString()}function It(v,D){X.Message.isRequest(D)?v.set(Pn(D.id),D):X.Message.isResponse(D)?v.set(ci(D.id),D):v.set($t(),D)}function Er(v){}function Bt(){return W===dn.Listening}function Mn(){return W===dn.Closed}function Ye(){return W===dn.Disposed}function Rr(){(W===dn.New||W===dn.Listening)&&(W=dn.Closed,Fe.fire(void 0))}function is(v){ke.fire([v,void 0,void 0])}function Ai(v){ke.fire(v)}n.onClose(Rr),n.onError(is),e.onClose(Rr),e.onError(Ai);function Li(){S||F.size===0||(S=(0,tw.default)().timer.setImmediate(()=>{S=void 0,Nu()}))}function qi(v){X.Message.isRequest(v)?zu(v):X.Message.isNotification(v)?Au(v):X.Message.isResponse(v)?Ou(v):Aa(v)}function Nu(){if(F.size===0)return;let v=F.shift();try{let D=r?.messageStrategy;Wp.is(D)?D.handleMessage(v,qi):qi(v)}finally{Li()}}let di=v=>{try{if(X.Message.isNotification(v)&&v.method===gs.type.method){let D=v.params.id,z=Pn(D),U=F.get(z);if(X.Message.isRequest(U)){let be=r?.connectionStrategy,ze=be&&be.cancelUndispatched?be.cancelUndispatched(U,Er):void 0;if(ze&&(ze.error!==void 0||ze.result!==void 0)){F.delete(z),x.delete(D),ze.id=U.id,K(ze,v.method,Date.now()),e.write(ze).catch(()=>i.error("Sending response for canceled message failed."));return}}let Ce=x.get(D);if(Ce!==void 0){Ce.cancel(),Et(v);return}else I.add(D)}It(F,v)}finally{Li()}};function zu(v){if(Ye())return;function D(ce,Pe,fe){let Ve={jsonrpc:l,id:v.id};ce instanceof X.ResponseError?Ve.error=ce.toJson():Ve.result=ce===void 0?null:ce,K(Ve,Pe,fe),e.write(Ve).catch(()=>i.error("Sending response failed."))}function z(ce,Pe,fe){let Ve={jsonrpc:l,id:v.id,error:ce.toJson()};K(Ve,Pe,fe),e.write(Ve).catch(()=>i.error("Sending response failed."))}function U(ce,Pe,fe){ce===void 0&&(ce=null);let Ve={jsonrpc:l,id:v.id,result:ce};K(Ve,Pe,fe),e.write(Ve).catch(()=>i.error("Sending response failed."))}De(v);let Ce=d.get(v.method),be,ze;Ce&&(be=Ce.type,ze=Ce.handler);let Ae=Date.now();if(ze||c){let ce=v.id??String(Date.now()),Pe=Lp.is(_t.receiver)?_t.receiver.createCancellationTokenSource(ce):_t.receiver.createCancellationTokenSource(v);v.id!==null&&I.has(v.id)&&Pe.cancel(),v.id!==null&&x.set(ce,Pe);try{let fe;if(ze)if(v.params===void 0){if(be!==void 0&&be.numberOfParams!==0){z(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${v.method} defines ${be.numberOfParams} params but received none.`),v.method,Ae);return}fe=ze(Pe.token)}else if(Array.isArray(v.params)){if(be!==void 0&&be.parameterStructures===X.ParameterStructures.byName){z(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by name but received parameters by position`),v.method,Ae);return}fe=ze(...v.params,Pe.token)}else{if(be!==void 0&&be.parameterStructures===X.ParameterStructures.byPosition){z(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by position but received parameters by name`),v.method,Ae);return}fe=ze(v.params,Pe.token)}else c&&(fe=c(v.method,v.params,Pe.token));let Ve=fe;fe?Ve.then?Ve.then(ft=>{x.delete(ce),D(ft,v.method,Ae)},ft=>{x.delete(ce),ft instanceof X.ResponseError?z(ft,v.method,Ae):ft&&Me.string(ft.message)?z(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${v.method} failed with message: ${ft.message}`),v.method,Ae):z(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${v.method} failed unexpectedly without providing any details.`),v.method,Ae)}):(x.delete(ce),D(fe,v.method,Ae)):(x.delete(ce),U(fe,v.method,Ae))}catch(fe){x.delete(ce),fe instanceof X.ResponseError?D(fe,v.method,Ae):fe&&Me.string(fe.message)?z(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${v.method} failed with message: ${fe.message}`),v.method,Ae):z(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${v.method} failed unexpectedly without providing any details.`),v.method,Ae)}}else z(new X.ResponseError(X.ErrorCodes.MethodNotFound,`Unhandled method ${v.method}`),v.method,Ae)}function Ou(v){if(!Ye())if(v.id===null)v.error?i.error(`Received response message without id: Error is:
4
4
  ${JSON.stringify(v.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let D=v.id,z=P.get(D);if(Z_(v,z),z!==void 0){P.delete(D);try{if(v.error){let U=v.error;z.reject(new X.ResponseError(U.code,U.message,U.data))}else if(v.result!==void 0)z.resolve(v.result);else throw new Error("Should never happen.")}catch(U){U.message?i.error(`Response handler '${z.method}' failed with message: ${U.message}`):i.error(`Response handler '${z.method}' failed unexpectedly.`)}}}}function Au(v){if(Ye())return;let D,z;if(v.method===gs.type.method){let U=v.params.id;I.delete(U),Et(v);return}else{let U=m.get(v.method);U&&(z=U.handler,D=U.type)}if(z||p)try{if(Et(v),z)if(v.params===void 0)D!==void 0&&D.numberOfParams!==0&&D.parameterStructures!==X.ParameterStructures.byName&&i.error(`Notification ${v.method} defines ${D.numberOfParams} params but received none.`),z();else if(Array.isArray(v.params)){let U=v.params;v.method===fs.type.method&&U.length===2&&rw.is(U[0])?z({token:U[0],value:U[1]}):(D!==void 0&&(D.parameterStructures===X.ParameterStructures.byName&&i.error(`Notification ${v.method} defines parameters by name but received parameters by position`),D.numberOfParams!==v.params.length&&i.error(`Notification ${v.method} defines ${D.numberOfParams} params but received ${U.length} arguments`)),z(...U))}else D!==void 0&&D.parameterStructures===X.ParameterStructures.byPosition&&i.error(`Notification ${v.method} defines parameters by position but received parameters by name`),z(v.params);else p&&p(v.method,v.params)}catch(U){U.message?i.error(`Notification handler '${v.method}' failed with message: ${U.message}`):i.error(`Notification handler '${v.method}' failed unexpectedly.`)}else jt.fire(v)}function Aa(v){if(!v){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
@@ -1 +1 @@
1
- import{o as p}from"./chunk-335BUVBP.js";import{a as i}from"./chunk-BN7ZXAZJ.js";import{Bb as v,Cb as h,Gb as C,gb as c,hb as f,ub as g,yb as a}from"./chunk-LWCTKI4Z.js";import{e as u,f as d,g as e,h as m,j as r}from"./chunk-FZCGRIOM.js";import{g as E}from"./chunk-3A3DZVEJ.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();function b(o){let n=JSON.stringify(e.parse(o));E()&&g("info",n),C("info",c,n)}function R(o,n){if(r()!==void 0)return n();let s=p(process.env,o)?"json":"text";return m({outputMode:s,sink:s==="json"?O:(l,S)=>{S?.alreadyRendered||x(l)}},n)}var T=i({name:"CommandEvent",schema:e,definitions:{CommandDiagnosticEvent:u,CommandProgressEvent:d}});function x(o){if(o.type==="progress"){a(o.message??o.operation);return}switch(o.level){case"debug":v(o.message);break;case"info":a(o.message);break;case"warning":h(o.message);break;case"error":f(o.message,"error");break}}function O(o){b(o)}export{R as a,T as b,O as c};
1
+ import{o as p}from"./chunk-335BUVBP.js";import{a as i}from"./chunk-BN7ZXAZJ.js";import{Bb as v,Cb as h,Gb as C,gb as c,hb as f,ub as g,yb as a}from"./chunk-RIG66DIQ.js";import{e as u,f as d,g as e,h as m,j as r}from"./chunk-FZCGRIOM.js";import{g as E}from"./chunk-GSGCSBRN.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();function b(o){let n=JSON.stringify(e.parse(o));E()&&g("info",n),C("info",c,n)}function R(o,n){if(r()!==void 0)return n();let s=p(process.env,o)?"json":"text";return m({outputMode:s,sink:s==="json"?O:(l,S)=>{S?.alreadyRendered||x(l)}},n)}var T=i({name:"CommandEvent",schema:e,definitions:{CommandDiagnosticEvent:u,CommandProgressEvent:d}});function x(o){if(o.type==="progress"){a(o.message??o.operation);return}switch(o.level){case"debug":v(o.message);break;case"info":a(o.message);break;case"warning":h(o.message);break;case"error":f(o.message,"error");break}}function O(o){b(o)}export{R as a,T as b,O as c};
@@ -1 +1 @@
1
- import{g as b}from"./chunk-3A3DZVEJ.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();import{performance as u}from"node:perf_hooks";function w(){return b()?"bubble":"mute-and-report"}function h(g={}){let i={sensitive:{},public:{...g}},p=t=>{Object.assign(i.public,t)},M=t=>{Object.assign(i.sensitive,t)},l=async(t,e,n)=>{let r=n==="auto"?w():n,s=async()=>{let c=await e();t(c)};if(r==="bubble")await s();else try{await s()}catch(c){let{sendErrorToBugsnag:o}=await import("./error-handler-74HKA23T.js");await o(c,"unexpected_error")}},a=[];return{getAllPublicMetadata:()=>({...i.public}),getAllSensitiveMetadata:()=>({...i.sensitive}),addPublicMetadata:async(t,e="auto")=>l(p,t,e),addSensitiveMetadata:async(t,e="auto")=>l(M,t,e),runWithTimer:t=>async e=>{a.push(0);let n=u.now();try{return await e()}finally{let r=u.now();r=Math.max(n,r);let s=Math.max(r-n,0),c=a.pop(),o=Math.max(s-c,0);a.length>0&&(a[a.length-1]=(a[a.length-1]??0)+s),u.measure(`${t}#measurable`,{start:n,duration:o}),u.measure(`${t}#wall`,{start:n,end:r});let d=i.public[t]||0;d+=o,i.public[t]=d}}}}var y=h({cmd_all_timing_network_ms:0,cmd_all_timing_prompts_ms:0}),{getAllPublicMetadata:S,getAllSensitiveMetadata:f,addPublicMetadata:x,addSensitiveMetadata:A,runWithTimer:P}=y;export{h as a,S as b,f as c,x as d,A as e,P as f};
1
+ import{g as b}from"./chunk-GSGCSBRN.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();import{performance as u}from"node:perf_hooks";function w(){return b()?"bubble":"mute-and-report"}function h(g={}){let i={sensitive:{},public:{...g}},p=t=>{Object.assign(i.public,t)},M=t=>{Object.assign(i.sensitive,t)},l=async(t,e,n)=>{let r=n==="auto"?w():n,s=async()=>{let c=await e();t(c)};if(r==="bubble")await s();else try{await s()}catch(c){let{sendErrorToBugsnag:o}=await import("./error-handler-OVJYVIOZ.js");await o(c,"unexpected_error")}},a=[];return{getAllPublicMetadata:()=>({...i.public}),getAllSensitiveMetadata:()=>({...i.sensitive}),addPublicMetadata:async(t,e="auto")=>l(p,t,e),addSensitiveMetadata:async(t,e="auto")=>l(M,t,e),runWithTimer:t=>async e=>{a.push(0);let n=u.now();try{return await e()}finally{let r=u.now();r=Math.max(n,r);let s=Math.max(r-n,0),c=a.pop(),o=Math.max(s-c,0);a.length>0&&(a[a.length-1]=(a[a.length-1]??0)+s),u.measure(`${t}#measurable`,{start:n,duration:o}),u.measure(`${t}#wall`,{start:n,end:r});let d=i.public[t]||0;d+=o,i.public[t]=d}}}}var y=h({cmd_all_timing_network_ms:0,cmd_all_timing_prompts_ms:0}),{getAllPublicMetadata:S,getAllSensitiveMetadata:f,addPublicMetadata:x,addSensitiveMetadata:A,runWithTimer:P}=y;export{h as a,S as b,f as c,x as d,A as e,P as f};
@@ -1 +1 @@
1
- import{a as N}from"./chunk-EITIW5OX.js";import{a as J,b as L}from"./chunk-YY6TFARF.js";import{a as V}from"./chunk-P33TONYG.js";import{a as O,b as F,d,e as x,f as C,g as a,h as R}from"./chunk-QFWWCZOI.js";import{f as j,g as E,p as w,v as D}from"./chunk-DJAZBPYA.js";import{ua as h,xa as g}from"./chunk-H4V55Y3Z.js";import{b as S,c as b}from"./chunk-Q2SZCZE7.js";import{z as u}from"./chunk-CZ22VZDA.js";import{c as _}from"./chunk-DFQ4WTET.js";import{h as I}from"./chunk-2VSNFOKD.js";import{wb as c}from"./chunk-LWCTKI4Z.js";import{b as o}from"./chunk-FZCGRIOM.js";import{b as U}from"./chunk-YTUUU33R.js";import{e as P,g as i}from"./chunk-VKWPEFWQ.js";i();i();function G(t,e){return{theme:{id:t.id,name:t.name,role:t.role,shop:e.storeFqdn,preview_url:J(t,e),editor_url:L(t,e)}}}function $(t){let{platform:e,arch:n}=_(),r=j(),m=r?E():void 0,s=Number(m)||null;return{result:{store:r??"Not configured",development_theme_id:s,cli_version:t.cliVersion,os:`${e}-${n}`,shell:process.env.SHELL??"unknown",node_version:process.version},developmentTheme:m}}async function y(t,e){let n;if(e.development)n=await new N(t).findOrCreate();else{let r={filter:{theme:e.theme}};n=await V(t,r)}return n?G(n,t):void 0}i();i();var Y=o.object({id:o.number(),name:o.string(),role:o.string(),shop:o.string(),preview_url:o.string(),editor_url:o.string()}),q=o.object({theme:Y}),z=o.object({store:o.string(),development_theme_id:o.number().nullable(),cli_version:o.string(),os:o.string(),shell:o.string(),node_version:o.string()}),K=o.union([q,z]),A=o.object({storeDomain:F,developmentThemeId:O.nullable(),cliVersion:o.string(),os:o.string(),shell:o.string().nullable(),nodeVersion:o.string()}).strict(),l=x({name:"ThemeInfoResult",schema:o.union([o.object({theme:d}).strict(),A]),definitions:{Theme:d,ThemeEnvironmentInfo:A},project(t){let e=K.parse(t);return"theme"in e?{theme:{...R(e.theme),storeDomain:a(e.theme.shop),previewUrl:e.theme.preview_url,editorUrl:e.theme.editor_url}}:{storeDomain:a(e.store),developmentThemeId:e.development_theme_id===null?null:C(e.development_theme_id),cliVersion:e.cli_version,os:e.os,shell:e.shell==="unknown"?null:e.shell,nodeVersion:e.node_version}}});function p(t,e,n={}){if(e==="json"){c(l.encode(t));return}"theme"in t?u(W(t,n)):u({customSections:B(t,n)})}function W(t,e){let n=Object.entries(t.theme).map(([r,m])=>{if(r==="editor_url"||r==="preview_url"){let s=String(m),H=r==="editor_url"?"Open in Theme Editor":"Preview Theme";return[f(r),{link:{url:s,label:H}}]}return r==="id"?[f(r),`#${m}`]:[f(r),`${m}`]});return{customSections:[...e.environment?[{title:"Theme information",body:[{subdued:`Environment name: ${e.environment}`}]}]:[],{title:"Theme Details",body:{tabularData:n,firstColumnSubdued:!0}}]}}function B(t,e){let n=Object.hasOwn(e,"developmentTheme")?e.developmentTheme:t.development_theme_id;return g(`theme-command:info:dev-theme-loaded:${n}`),[M("Theme Configuration",[["Store",t.store],["Development Theme ID",n?`#${n}`:{subdued:"Not set"}]]),M("Tooling and System",[["Shopify CLI",t.cli_version],["OS",t.os],["Shell",t.shell],["Node version",t.node_version]])]}function M(t,e){return{title:t,body:{tabularData:e,firstColumnSubdued:!0}}}function f(t){return t.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}var v=P(U(),1);var T=class extends D{static get jsonOutputSchema(){return l}static descriptionWithMarkdown="Displays information about your theme environment, including your current store. Can also retrieve information about a specific theme.";static description=this.descriptionForHelp();static flags={...S,...b,...w,development:v.Flags.boolean({char:"d",description:"Retrieve info from your development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),theme:v.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"})};static multiEnvironmentsFlags=["store","password"];async command(e,n,r=!1){if(h("theme-command:info"),e.theme||e.development){let m=await y(n,e);if(!m)throw new I("Theme not found!");if(e.json&&r)return h("theme-command:info"),m;p(m,e.json?"json":"text",e)}else{let{result:m,developmentTheme:s}=$({cliVersion:this.config.version});if(e.json&&r)return h("theme-command:info"),m;p(m,e.json?"json":"text",{developmentTheme:s})}h("theme-command:info")}renderEnvironmentResults(e){c(l.encode({environments:e}))}};export{T as a};
1
+ import{a as N}from"./chunk-2M4BKFYF.js";import{a as J,b as L}from"./chunk-YY6TFARF.js";import{a as V}from"./chunk-63UKZLPC.js";import{a as O,b as F,d,e as x,f as C,g as a,h as R}from"./chunk-QFWWCZOI.js";import{f as j,g as E,p as w,v as D}from"./chunk-KT5QQOES.js";import{ua as h,xa as g}from"./chunk-NCPZVARH.js";import{b as S,c as b}from"./chunk-5AWELO3D.js";import{z as u}from"./chunk-V654BMS7.js";import{c as _}from"./chunk-PVASYKSJ.js";import{h as I}from"./chunk-J7BTC45S.js";import{wb as c}from"./chunk-RIG66DIQ.js";import{b as o}from"./chunk-FZCGRIOM.js";import{b as U}from"./chunk-YTUUU33R.js";import{e as P,g as i}from"./chunk-VKWPEFWQ.js";i();i();function G(t,e){return{theme:{id:t.id,name:t.name,role:t.role,shop:e.storeFqdn,preview_url:J(t,e),editor_url:L(t,e)}}}function $(t){let{platform:e,arch:n}=_(),r=j(),m=r?E():void 0,s=Number(m)||null;return{result:{store:r??"Not configured",development_theme_id:s,cli_version:t.cliVersion,os:`${e}-${n}`,shell:process.env.SHELL??"unknown",node_version:process.version},developmentTheme:m}}async function y(t,e){let n;if(e.development)n=await new N(t).findOrCreate();else{let r={filter:{theme:e.theme}};n=await V(t,r)}return n?G(n,t):void 0}i();i();var Y=o.object({id:o.number(),name:o.string(),role:o.string(),shop:o.string(),preview_url:o.string(),editor_url:o.string()}),q=o.object({theme:Y}),z=o.object({store:o.string(),development_theme_id:o.number().nullable(),cli_version:o.string(),os:o.string(),shell:o.string(),node_version:o.string()}),K=o.union([q,z]),A=o.object({storeDomain:F,developmentThemeId:O.nullable(),cliVersion:o.string(),os:o.string(),shell:o.string().nullable(),nodeVersion:o.string()}).strict(),l=x({name:"ThemeInfoResult",schema:o.union([o.object({theme:d}).strict(),A]),definitions:{Theme:d,ThemeEnvironmentInfo:A},project(t){let e=K.parse(t);return"theme"in e?{theme:{...R(e.theme),storeDomain:a(e.theme.shop),previewUrl:e.theme.preview_url,editorUrl:e.theme.editor_url}}:{storeDomain:a(e.store),developmentThemeId:e.development_theme_id===null?null:C(e.development_theme_id),cliVersion:e.cli_version,os:e.os,shell:e.shell==="unknown"?null:e.shell,nodeVersion:e.node_version}}});function p(t,e,n={}){if(e==="json"){c(l.encode(t));return}"theme"in t?u(W(t,n)):u({customSections:B(t,n)})}function W(t,e){let n=Object.entries(t.theme).map(([r,m])=>{if(r==="editor_url"||r==="preview_url"){let s=String(m),H=r==="editor_url"?"Open in Theme Editor":"Preview Theme";return[f(r),{link:{url:s,label:H}}]}return r==="id"?[f(r),`#${m}`]:[f(r),`${m}`]});return{customSections:[...e.environment?[{title:"Theme information",body:[{subdued:`Environment name: ${e.environment}`}]}]:[],{title:"Theme Details",body:{tabularData:n,firstColumnSubdued:!0}}]}}function B(t,e){let n=Object.hasOwn(e,"developmentTheme")?e.developmentTheme:t.development_theme_id;return g(`theme-command:info:dev-theme-loaded:${n}`),[M("Theme Configuration",[["Store",t.store],["Development Theme ID",n?`#${n}`:{subdued:"Not set"}]]),M("Tooling and System",[["Shopify CLI",t.cli_version],["OS",t.os],["Shell",t.shell],["Node version",t.node_version]])]}function M(t,e){return{title:t,body:{tabularData:e,firstColumnSubdued:!0}}}function f(t){return t.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}var v=P(U(),1);var T=class extends D{static get jsonOutputSchema(){return l}static descriptionWithMarkdown="Displays information about your theme environment, including your current store. Can also retrieve information about a specific theme.";static description=this.descriptionForHelp();static flags={...S,...b,...w,development:v.Flags.boolean({char:"d",description:"Retrieve info from your development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),theme:v.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"})};static multiEnvironmentsFlags=["store","password"];async command(e,n,r=!1){if(h("theme-command:info"),e.theme||e.development){let m=await y(n,e);if(!m)throw new I("Theme not found!");if(e.json&&r)return h("theme-command:info"),m;p(m,e.json?"json":"text",e)}else{let{result:m,developmentTheme:s}=$({cliVersion:this.config.version});if(e.json&&r)return h("theme-command:info"),m;p(m,e.json?"json":"text",{developmentTheme:s})}h("theme-command:info")}renderEnvironmentResults(e){c(l.encode({environments:e}))}};export{T as a};
@@ -1,4 +1,4 @@
1
- import{a as I,b as M}from"./chunk-ACA2BGAD.js";import{a as A}from"./chunk-FWB3GLMW.js";import{ba as u}from"./chunk-3C6VLJ5D.js";import{e as p}from"./chunk-H4V55Y3Z.js";import{b as O,c as y,f as E}from"./chunk-Q2SZCZE7.js";import{a as c}from"./chunk-BN7ZXAZJ.js";import{b as t}from"./chunk-FZCGRIOM.js";import{b as w}from"./chunk-YTUUU33R.js";import{e as H,g as n}from"./chunk-VKWPEFWQ.js";n();n();var k=["HONOR_BILLING_PRICE","PLAN_PRICE"],W=["OPT_OUT","WHEN_REQUIRED"],D=["UNSCHEDULED","SCHEDULED","MIGRATED"];var r=H(w(),1);var m={...O,...A,...y},K={watch:r.Flags.boolean({description:"Display the current operation state while polling, then output the final outcome when every operation reaches a terminal status.",env:"SHOPIFY_FLAG_WATCH",default:!1})},B={watch:r.Flags.boolean({description:"Display the current operation state while polling, then output the final state when every operation reaches a terminal status.",env:"SHOPIFY_FLAG_WATCH",default:!1})},et={...m,status:r.Flags.option({description:"Filter subscriptions by migration status.",env:"SHOPIFY_FLAG_STATUS",options:[...D]})()},it={...m,input:r.Flags.string({char:"i",description:"Path to the migration CSV. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),force:E(r.Flags.boolean({char:"f",description:"Skip confirmation.",env:"SHOPIFY_FLAG_FORCE",default:!1})),...K},q={...m,id:r.Flags.string({description:"The app subscription migration operation ID. Can be specified multiple times.",env:"SHOPIFY_FLAG_ID",required:!0,multiple:!0})},nt={...q,...B};n();var l=t.string().regex(/^gid:\/\/shopify\/AppSubscriptionMigrationOperation\/[^/]+$/).describe("The Shopify AppSubscriptionMigrationOperation GID."),F=t.string().regex(/^gid:\/\/shopify\/Shop\/\d+$/).describe("The Shopify Shop GID."),o=t.object({gid:l,status:t.string().min(1).describe("Upstream status: RUNNING, COMPLETED, FAILED, or CANCELED."),total:t.number().int().nonnegative(),results:t.array(t.object({shopGid:F,code:t.string().min(1).describe("The upstream per-shop migration result code.")}).strict())}).strict(),g=t.object({message:t.string(),fieldPath:t.array(t.string()).nullable()}).strict(),C=t.discriminatedUnion("status",[t.object({status:t.literal("success"),operationGid:l,operation:o}).strict(),t.object({status:t.literal("failed"),operationGid:l,operation:o.nullable(),error:t.union([I.extend({details:t.object({userErrors:t.array(g)}).strict()}),M])}).strict()]),pt=c({name:"MigrationCancellationResult",schema:t.object({status:t.enum(["success","partial"]),operations:t.array(C)}).strict(),definitions:{MigrationCancellationOutcome:C,MigrationOperation:o,MigrationUserError:g}}),b=t.string().datetime().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$/),Y=t.string().date(),N=t.object({amount:t.string().regex(/^-?\d+(?:\.\d+)?$/),currencyCode:t.string().regex(/^[A-Z]{3}$/)}).strict(),R=t.object({kind:t.string().describe("Known values: NONE, OPT_OUT, WHEN_REQUIRED."),optOutDeadline:b.nullable(),sentAt:b.nullable()}).strict(),P=t.object({shopGid:F,status:t.string().describe("Known values: UNSCHEDULED, SCHEDULED, MIGRATED."),manualSubscriptionName:t.string().nullable(),manualSubscriptionPrice:N.nullable(),manualSubscriptionInterval:t.string().describe("Known values: EVERY_30_DAYS, ANNUAL."),targetPlanHandle:t.string().nullable(),notification:R.nullable(),priceBehavior:t.string().nullable().describe("Known values: HONOR_BILLING_PRICE, PLAN_PRICE."),effectiveDate:t.union([Y,b]).nullable().describe("The upstream calendar date or whole-second UTC instant; date-only values retain their format."),lastFailureReason:t.string().nullable().describe("Known values: SUPERSEDED, SCHEDULING_FAILED.")}).strict().describe("All subscription projection fields are present; unavailable values are null."),ut=c({name:"MigrationListResult",schema:t.object({subscriptions:t.array(P).describe("The complete list across every fetched page.")}).strict(),definitions:{MigratableSubscription:P,MigratableSubscriptionPrice:N,MigratableSubscriptionNotification:R}}),T=t.object({batchIndex:t.number().int().nonnegative(),batchPayloadDigest:t.string().min(1),operation:o}).strict(),v=t.discriminatedUnion("type",[t.object({type:t.literal("submission"),batchIndex:t.number().int().nonnegative(),userErrors:t.array(g)}).strict(),t.object({type:t.literal("operations"),operationGids:t.array(l)}).strict()]);function x(){return{clientId:t.string().min(1).describe("The app client ID, not a Shopify GID."),action:t.enum(["schedule","unschedule"]),inputDigest:t.string().min(1),total:t.number().int().nonnegative(),operations:t.array(T)}}var lt=c({name:"MigrationSubmissionResult",schema:t.discriminatedUnion("status",[t.object({status:t.literal("success"),changed:t.boolean(),...x()}).strict(),t.object({status:t.literal("partial"),changed:t.boolean(),...x(),failure:v}).strict(),t.object({status:t.literal("cancelled"),changed:t.literal(!1),action:t.enum(["schedule","unschedule"]),reason:t.string()}).strict()]),definitions:{SubmittedMigrationOperation:T,MigrationOperation:o,MigrationSubmissionFailure:v,MigrationUserError:g}}),gt=c({name:"MigrationStatusResult",schema:t.object({operations:t.array(o)}).strict(),definitions:{MigrationOperation:o}});n();function J(e){return{gid:e.id,status:e.status,total:e.total,results:e.results.edges.map(({node:i})=>({shopGid:i.shopId,code:i.code}))}}function Q(e){return e.map(({message:i,field:a})=>({message:i,fieldPath:a}))}function bt(e){return{shopGid:e.shopId,status:e.status,manualSubscriptionName:e.manualSubscriptionName,manualSubscriptionPrice:e.manualSubscriptionPrice===null?null:{amount:e.manualSubscriptionPrice.amount,currencyCode:e.manualSubscriptionPrice.currencyCode},manualSubscriptionInterval:e.manualSubscriptionInterval,targetPlanHandle:e.targetPlanHandle,notification:e.notification===null?null:{kind:e.notification.kind,optOutDeadline:S(e.notification.optOutDeadline),sentAt:S(e.notification.sentAt)},priceBehavior:e.priceBehavior,effectiveDate:e.effectiveDate===null||/^\d{4}-\d{2}-\d{2}$/.test(e.effectiveDate)?e.effectiveDate:S(e.effectiveDate),lastFailureReason:e.lastFailureReason}}function S(e){return e===null?null:new Date(e).toISOString().replace(/\.\d{3}Z$/,"Z")}function St(e){if(e.status==="cancelled")return e;let i={changed:e.submission.operations.length>0,clientId:e.submission.clientId,action:e.submission.action,inputDigest:e.submission.inputDigest,total:e.submission.total,operations:e.submission.operations.map(({batchIndex:a,batchPayloadDigest:s,operation:f})=>({batchIndex:a,batchPayloadDigest:s,operation:J(f)}))};return e.status==="success"?{status:"success",...i}:{status:"partial",...i,failure:e.failure.type==="submission"?{type:e.failure.type,batchIndex:e.failure.batchIndex,userErrors:Q(e.failure.userErrors)}:{type:e.failure.type,operationGids:e.failure.operationIds}}}n();n();var _=p`
1
+ import{a as I,b as M}from"./chunk-ACA2BGAD.js";import{a as A}from"./chunk-D4LFWIFE.js";import{ba as u}from"./chunk-XV6XCOTG.js";import{e as p}from"./chunk-NCPZVARH.js";import{b as O,c as y,f as E}from"./chunk-5AWELO3D.js";import{a as c}from"./chunk-BN7ZXAZJ.js";import{b as t}from"./chunk-FZCGRIOM.js";import{b as w}from"./chunk-YTUUU33R.js";import{e as H,g as n}from"./chunk-VKWPEFWQ.js";n();n();var k=["HONOR_BILLING_PRICE","PLAN_PRICE"],W=["OPT_OUT","WHEN_REQUIRED"],D=["UNSCHEDULED","SCHEDULED","MIGRATED"];var r=H(w(),1);var m={...O,...A,...y},K={watch:r.Flags.boolean({description:"Display the current operation state while polling, then output the final outcome when every operation reaches a terminal status.",env:"SHOPIFY_FLAG_WATCH",default:!1})},B={watch:r.Flags.boolean({description:"Display the current operation state while polling, then output the final state when every operation reaches a terminal status.",env:"SHOPIFY_FLAG_WATCH",default:!1})},et={...m,status:r.Flags.option({description:"Filter subscriptions by migration status.",env:"SHOPIFY_FLAG_STATUS",options:[...D]})()},it={...m,input:r.Flags.string({char:"i",description:"Path to the migration CSV. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),force:E(r.Flags.boolean({char:"f",description:"Skip confirmation.",env:"SHOPIFY_FLAG_FORCE",default:!1})),...K},q={...m,id:r.Flags.string({description:"The app subscription migration operation ID. Can be specified multiple times.",env:"SHOPIFY_FLAG_ID",required:!0,multiple:!0})},nt={...q,...B};n();var l=t.string().regex(/^gid:\/\/shopify\/AppSubscriptionMigrationOperation\/[^/]+$/).describe("The Shopify AppSubscriptionMigrationOperation GID."),F=t.string().regex(/^gid:\/\/shopify\/Shop\/\d+$/).describe("The Shopify Shop GID."),o=t.object({gid:l,status:t.string().min(1).describe("Upstream status: RUNNING, COMPLETED, FAILED, or CANCELED."),total:t.number().int().nonnegative(),results:t.array(t.object({shopGid:F,code:t.string().min(1).describe("The upstream per-shop migration result code.")}).strict())}).strict(),g=t.object({message:t.string(),fieldPath:t.array(t.string()).nullable()}).strict(),C=t.discriminatedUnion("status",[t.object({status:t.literal("success"),operationGid:l,operation:o}).strict(),t.object({status:t.literal("failed"),operationGid:l,operation:o.nullable(),error:t.union([I.extend({details:t.object({userErrors:t.array(g)}).strict()}),M])}).strict()]),pt=c({name:"MigrationCancellationResult",schema:t.object({status:t.enum(["success","partial"]),operations:t.array(C)}).strict(),definitions:{MigrationCancellationOutcome:C,MigrationOperation:o,MigrationUserError:g}}),b=t.string().datetime().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$/),Y=t.string().date(),N=t.object({amount:t.string().regex(/^-?\d+(?:\.\d+)?$/),currencyCode:t.string().regex(/^[A-Z]{3}$/)}).strict(),R=t.object({kind:t.string().describe("Known values: NONE, OPT_OUT, WHEN_REQUIRED."),optOutDeadline:b.nullable(),sentAt:b.nullable()}).strict(),P=t.object({shopGid:F,status:t.string().describe("Known values: UNSCHEDULED, SCHEDULED, MIGRATED."),manualSubscriptionName:t.string().nullable(),manualSubscriptionPrice:N.nullable(),manualSubscriptionInterval:t.string().describe("Known values: EVERY_30_DAYS, ANNUAL."),targetPlanHandle:t.string().nullable(),notification:R.nullable(),priceBehavior:t.string().nullable().describe("Known values: HONOR_BILLING_PRICE, PLAN_PRICE."),effectiveDate:t.union([Y,b]).nullable().describe("The upstream calendar date or whole-second UTC instant; date-only values retain their format."),lastFailureReason:t.string().nullable().describe("Known values: SUPERSEDED, SCHEDULING_FAILED.")}).strict().describe("All subscription projection fields are present; unavailable values are null."),ut=c({name:"MigrationListResult",schema:t.object({subscriptions:t.array(P).describe("The complete list across every fetched page.")}).strict(),definitions:{MigratableSubscription:P,MigratableSubscriptionPrice:N,MigratableSubscriptionNotification:R}}),T=t.object({batchIndex:t.number().int().nonnegative(),batchPayloadDigest:t.string().min(1),operation:o}).strict(),v=t.discriminatedUnion("type",[t.object({type:t.literal("submission"),batchIndex:t.number().int().nonnegative(),userErrors:t.array(g)}).strict(),t.object({type:t.literal("operations"),operationGids:t.array(l)}).strict()]);function x(){return{clientId:t.string().min(1).describe("The app client ID, not a Shopify GID."),action:t.enum(["schedule","unschedule"]),inputDigest:t.string().min(1),total:t.number().int().nonnegative(),operations:t.array(T)}}var lt=c({name:"MigrationSubmissionResult",schema:t.discriminatedUnion("status",[t.object({status:t.literal("success"),changed:t.boolean(),...x()}).strict(),t.object({status:t.literal("partial"),changed:t.boolean(),...x(),failure:v}).strict(),t.object({status:t.literal("cancelled"),changed:t.literal(!1),action:t.enum(["schedule","unschedule"]),reason:t.string()}).strict()]),definitions:{SubmittedMigrationOperation:T,MigrationOperation:o,MigrationSubmissionFailure:v,MigrationUserError:g}}),gt=c({name:"MigrationStatusResult",schema:t.object({operations:t.array(o)}).strict(),definitions:{MigrationOperation:o}});n();function J(e){return{gid:e.id,status:e.status,total:e.total,results:e.results.edges.map(({node:i})=>({shopGid:i.shopId,code:i.code}))}}function Q(e){return e.map(({message:i,field:a})=>({message:i,fieldPath:a}))}function bt(e){return{shopGid:e.shopId,status:e.status,manualSubscriptionName:e.manualSubscriptionName,manualSubscriptionPrice:e.manualSubscriptionPrice===null?null:{amount:e.manualSubscriptionPrice.amount,currencyCode:e.manualSubscriptionPrice.currencyCode},manualSubscriptionInterval:e.manualSubscriptionInterval,targetPlanHandle:e.targetPlanHandle,notification:e.notification===null?null:{kind:e.notification.kind,optOutDeadline:S(e.notification.optOutDeadline),sentAt:S(e.notification.sentAt)},priceBehavior:e.priceBehavior,effectiveDate:e.effectiveDate===null||/^\d{4}-\d{2}-\d{2}$/.test(e.effectiveDate)?e.effectiveDate:S(e.effectiveDate),lastFailureReason:e.lastFailureReason}}function S(e){return e===null?null:new Date(e).toISOString().replace(/\.\d{3}Z$/,"Z")}function St(e){if(e.status==="cancelled")return e;let i={changed:e.submission.operations.length>0,clientId:e.submission.clientId,action:e.submission.action,inputDigest:e.submission.inputDigest,total:e.submission.total,operations:e.submission.operations.map(({batchIndex:a,batchPayloadDigest:s,operation:f})=>({batchIndex:a,batchPayloadDigest:s,operation:J(f)}))};return e.status==="success"?{status:"success",...i}:{status:"partial",...i,failure:e.failure.type==="submission"?{type:e.failure.type,batchIndex:e.failure.batchIndex,userErrors:Q(e.failure.userErrors)}:{type:e.failure.type,operationGids:e.failure.operationIds}}}n();n();var _=p`
2
2
  query MigratableAppSubscriptions(
3
3
  $apiKey: String!
4
4
  $first: Int!
@@ -1,2 +1,2 @@
1
- import{a as N,b as $,c as g}from"./chunk-Q2XRITUG.js";import{j as D}from"./chunk-H4V55Y3Z.js";import{a as b,b as A}from"./chunk-GRGFA26K.js";import{T as p,U as k,a as T}from"./chunk-CZ22VZDA.js";import{k as P}from"./chunk-2VSNFOKD.js";import{Bb as u,Ha as I,Ka as O,N as y,Oa as F,Ta as h,wa as _,ya as U}from"./chunk-LWCTKI4Z.js";import{g as w}from"./chunk-3A3DZVEJ.js";import{c as m,h as l,i as x}from"./chunk-IWTNUJGY.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();f();import{fileURLToPath as q}from"url";import Y from"util";import{pipeline as j}from"stream";import{execFileSync as z}from"child_process";var H="2026.10.3",B=`https://github.com/cloudflare/cloudflared/releases/download/${H}/`,W={arm64:"cloudflared-linux-arm64",arm:"cloudflared-linux-arm",x64:"cloudflared-linux-amd64",ia32:"cloudflared-linux-386"},G={arm64:"cloudflared-darwin-arm64.tgz",x64:"cloudflared-darwin-amd64.tgz"},V={x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-amd64.exe"},v={linux:W,darwin:G,win32:V};function X(r=process.platform,t=process.arch){if(!Object.keys(v).includes(r))throw new Error(`Unsupported system platform: ${r}`);let n=v[r][t];if(n===void 0)throw new Error(`Unsupported system arch: ${t}`);return B+n}function Z(r=process.env,t=process.platform){return r.SHOPIFY_CLI_CLOUDFLARED_PATH?r.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(q(import.meta.url)),"..","bin",t==="win32"?"cloudflared.exe":"cloudflared")}async function C(r=process.env,t=process.platform,e=process.arch){if(r.SHOPIFY_CLI_IGNORE_CLOUDFLARED){u("Skipping cloudflared installation because SHOPIFY_CLI_IGNORE_CLOUDFLARED is set");return}let n=X(t,e),o=Z(r,t);if(h(o))try{let i=z(o,["--version"],{encoding:"utf8"}).split(" "),a=i.length>2?i[2]:"0.0.0";if(!J(H,a)){u("cloudflared already installed, skipping");return}}catch{u("version check failed, reinstalling")}if(t==="linux")await K(n,o);else if(t==="darwin")await tt(n,o);else if(t==="win32")await Q(n,o);else throw new Error(`Unsupported platform: ${t}`)}function J(r,t){let[e,n,o]=r.split(".").map(Number),[i,a,c]=t.split(".").map(Number);return e!==i?(e??0)>(i??0):n!==a?(n??0)>(a??0):(o??0)>(c??0)}async function K(r,t){await R(r,t),await F(t,"755")}async function Q(r,t){await R(r,t)}async function tt(r,t){await R(r,`${t}.tgz`);let e=x(`${t}.tgz`);await p("tar",["-xzf",e],{cwd:l(t)}),I(`${t}.tgz`),await U(`${l(t)}/cloudflared`,t)}async function R(r,t){h(l(t))||_(l(t));let e=Y.promisify(j),n=await D(r,{redirect:"follow"},"slow-request");if(!n.ok||!n.body)throw new Error(`Couldn't download file ${r} (${n.status} ${n.statusText})`);let o=O(t);return await e(n.body,o),t}import{Writable as rt}from"stream";import{fileURLToPath as et}from"url";var $t=$({provider:g,action:st}),nt=w()?.2:40,ot=5;async function st(r){try{let t=new E(r);return await t.startTunnel(),b(t)}catch(t){let e=new N("unknown",t.message);return A(e)}}var E=class{port;provider=g;currentStatus={status:"not-started"};abortController=void 0;constructor(t){this.port=t}async startTunnel(){try{await C(),this.tunnel()}catch(t){this.currentStatus={status:"error",message:t.message,tryMessage:d()}}}getTunnelStatus(){return this.currentStatus}stopTunnel(){this.abortController?.abort()}tunnel(t=0){this.abortController=new T;let e=!1;if(t>=ot){e=!0,this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: max retries reached.",tryMessage:d()};return}let n=["tunnel","--url",`http://localhost:${this.port}`,"--no-autoupdate"],o=[],i=!1,a;this.currentStatus={status:"starting"},setTimeout(()=>{if(!e){e=!0;let s=y(o).slice(-5).join(`
1
+ import{a as N,b as $,c as g}from"./chunk-J5DUFSR4.js";import{j as D}from"./chunk-NCPZVARH.js";import{a as b,b as A}from"./chunk-DSKAIC7O.js";import{T as p,U as k,a as T}from"./chunk-V654BMS7.js";import{k as P}from"./chunk-J7BTC45S.js";import{Bb as u,Ha as I,Ka as O,N as y,Oa as F,Ta as h,wa as _,ya as U}from"./chunk-RIG66DIQ.js";import{g as w}from"./chunk-GSGCSBRN.js";import{c as m,h as l,i as x}from"./chunk-IWTNUJGY.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();f();import{fileURLToPath as q}from"url";import Y from"util";import{pipeline as j}from"stream";import{execFileSync as z}from"child_process";var H="2026.10.3",B=`https://github.com/cloudflare/cloudflared/releases/download/${H}/`,W={arm64:"cloudflared-linux-arm64",arm:"cloudflared-linux-arm",x64:"cloudflared-linux-amd64",ia32:"cloudflared-linux-386"},G={arm64:"cloudflared-darwin-arm64.tgz",x64:"cloudflared-darwin-amd64.tgz"},V={x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-amd64.exe"},v={linux:W,darwin:G,win32:V};function X(r=process.platform,t=process.arch){if(!Object.keys(v).includes(r))throw new Error(`Unsupported system platform: ${r}`);let n=v[r][t];if(n===void 0)throw new Error(`Unsupported system arch: ${t}`);return B+n}function Z(r=process.env,t=process.platform){return r.SHOPIFY_CLI_CLOUDFLARED_PATH?r.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(q(import.meta.url)),"..","bin",t==="win32"?"cloudflared.exe":"cloudflared")}async function C(r=process.env,t=process.platform,e=process.arch){if(r.SHOPIFY_CLI_IGNORE_CLOUDFLARED){u("Skipping cloudflared installation because SHOPIFY_CLI_IGNORE_CLOUDFLARED is set");return}let n=X(t,e),o=Z(r,t);if(h(o))try{let i=z(o,["--version"],{encoding:"utf8"}).split(" "),a=i.length>2?i[2]:"0.0.0";if(!J(H,a)){u("cloudflared already installed, skipping");return}}catch{u("version check failed, reinstalling")}if(t==="linux")await K(n,o);else if(t==="darwin")await tt(n,o);else if(t==="win32")await Q(n,o);else throw new Error(`Unsupported platform: ${t}`)}function J(r,t){let[e,n,o]=r.split(".").map(Number),[i,a,c]=t.split(".").map(Number);return e!==i?(e??0)>(i??0):n!==a?(n??0)>(a??0):(o??0)>(c??0)}async function K(r,t){await R(r,t),await F(t,"755")}async function Q(r,t){await R(r,t)}async function tt(r,t){await R(r,`${t}.tgz`);let e=x(`${t}.tgz`);await p("tar",["-xzf",e],{cwd:l(t)}),I(`${t}.tgz`),await U(`${l(t)}/cloudflared`,t)}async function R(r,t){h(l(t))||_(l(t));let e=Y.promisify(j),n=await D(r,{redirect:"follow"},"slow-request");if(!n.ok||!n.body)throw new Error(`Couldn't download file ${r} (${n.status} ${n.statusText})`);let o=O(t);return await e(n.body,o),t}import{Writable as rt}from"stream";import{fileURLToPath as et}from"url";var $t=$({provider:g,action:st}),nt=w()?.2:40,ot=5;async function st(r){try{let t=new E(r);return await t.startTunnel(),b(t)}catch(t){let e=new N("unknown",t.message);return A(e)}}var E=class{port;provider=g;currentStatus={status:"not-started"};abortController=void 0;constructor(t){this.port=t}async startTunnel(){try{await C(),this.tunnel()}catch(t){this.currentStatus={status:"error",message:t.message,tryMessage:d()}}}getTunnelStatus(){return this.currentStatus}stopTunnel(){this.abortController?.abort()}tunnel(t=0){this.abortController=new T;let e=!1;if(t>=ot){e=!0,this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: max retries reached.",tryMessage:d()};return}let n=["tunnel","--url",`http://localhost:${this.port}`,"--no-autoupdate"],o=[],i=!1,a;this.currentStatus={status:"starting"},setTimeout(()=>{if(!e){e=!0;let s=y(o).slice(-5).join(`
2
2
  `);s===""?this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: unknown error.",tryMessage:d()}:this.currentStatus={status:"error",message:s,tryMessage:d()},this.abortController?.abort()}},nt*1e3);let c=this,L=new rt({write(s,ft,M){if(u(s.toString()),e)return;a??=it(s),ut(s)&&(i=!0),i&&(a?(e=!0,c.currentStatus={status:"connected",url:a}):c.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: URL not found."});let S=at(s);S&&o.push(S),M()}});p(ct(),n,{stdout:L,stderr:L,signal:this.abortController.signal,externalErrorHandler:async s=>{if(e)throw new P(`Could not start Cloudflare tunnel: process crashed after stablishing a connection: ${s.message}`,d());u(`Cloudflare tunnel crashed: ${s.message}, restarting...`),w()||await k(1),this.tunnel(t+1)}})}};function d(){return["You can run the command again, or try networking with Shopify via",{command:"--use-localhost"},"or",{command:"--tunnel-url <custom tunnel>"},".",{link:{label:"See documentation for details.",url:"https://shopify.dev/docs/apps/build/cli-for-apps/networking-options"}}]}function it(r){let t=new RegExp(`(https:\\/\\/[^\\s]+\\.${dt()})`),e=r.toString().match(t)??void 0;return e&&e[1]}function at(r){if([/failed to request quick Tunnel/,/failed to unmarshal quick Tunnel/,/failed to parse quick Tunnel ID/,/failed to provision routing/,/ERR Couldn't start tunnel/,/ERR Failed to serve quic connection/,/ERR Failed to create new quic connection error/].some(n=>n.test(r.toString())))return`Could not start Cloudflare tunnel: ${lt(r.toString())}`}function lt(r){let t=/^[0-9TZ:-]+ (ERR )?/g,e=/connIndex.*/g;return r.replace(t,"").replace(e,"")}function ut(r){let t=r.toString().match(/(INF Registered tunnel connection|INF Connection)/)??void 0;return t&&t[0]}function ct(){return process.env.SHOPIFY_CLI_CLOUDFLARED_PATH?process.env.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(et(import.meta.url)),"..","bin",process.platform==="win32"?"cloudflared.exe":"cloudflared")}function dt(){return process.env.SHOPIFY_CLI_CLOUDFLARED_DOMAIN??"trycloudflare.com"}export{$t as a};
@@ -1 +1 @@
1
- import{k as S,m as O,p as R}from"./chunk-DNMXVMJM.js";import{a as x}from"./chunk-P33TONYG.js";import{e as J}from"./chunk-QFWWCZOI.js";import{p as E,v as j}from"./chunk-DJAZBPYA.js";import{k as l,ua as u}from"./chunk-H4V55Y3Z.js";import{b as g,c as f}from"./chunk-Q2SZCZE7.js";import{A as b,B as I,O as _}from"./chunk-CZ22VZDA.js";import{h as s}from"./chunk-2VSNFOKD.js";import{Ta as y,la as P,wb as w}from"./chunk-LWCTKI4Z.js";import{b as p}from"./chunk-FZCGRIOM.js";import{b as N}from"./chunk-YTUUU33R.js";import{e as H,g as n}from"./chunk-VKWPEFWQ.js";n();n();n();async function $({session:r,overridesContent:e,themeId:t}){u("theme-preview:create");let d=`${O(r)}/theme_preview.json?preview_theme_id=${t}`,i=await S(r,{headers:{"Content-Type":"application/json"}}),o=await l(d,{method:"POST",body:e,headers:i});if(!o.ok)throw new s(`Theme preview request failed with status ${o.status}: ${o.statusText}`);let m=await U(o);return u("theme-preview:create"),m}async function A({session:r,overridesContent:e,themeId:t,previewIdentifier:a}){u("theme-preview:update");let i=`${O(r)}/theme_preview.json?preview_theme_id=${t}&preview_identifier=${encodeURIComponent(a)}`,o=await S(r,{headers:{"Content-Type":"application/json"}}),m=await l(i,{method:"POST",body:e,headers:o});if(!m.ok)throw new s(`Theme preview request failed with status ${m.status}: ${m.statusText}`);let v=await U(m);return u("theme-preview:update"),v}async function U(r){let e=await r.json();if(e.error)throw new s(`Theme preview failed: ${e.error}`);if(!e.url||!e.preview_identifier)throw new s("Theme preview returned an unexpected response");return{url:e.url,preview_identifier:e.preview_identifier}}async function L(r){if(!y(r.overrideJson))throw new s(`Override file not found: ${r.overrideJson}`);let e=await P(r.overrideJson),t;try{t=JSON.parse(e)}catch(i){let o=i instanceof Error?i.message:String(i);throw new s(`Failed to parse override file: ${r.overrideJson}`,o)}let a=await R(r.themeId,r.adminSession,r.password),d=JSON.stringify(t);return r.previewIdentifier?A({session:a,overridesContent:d,themeId:r.themeId,previewIdentifier:r.previewIdentifier}):$({session:a,overridesContent:d,themeId:r.themeId})}n();n();var C=p.object({id:p.string().min(1).describe("The opaque Storefront preview identifier, not a theme ID or Shopify GID."),url:p.string().url()}).strict(),h=J({name:"ThemePreviewResult",schema:p.object({status:p.literal("success"),preview:C}).strict(),definitions:{ThemePreview:C},project:r=>{let e=r;return{status:"success",preview:{id:e.preview_identifier,url:e.url}}}});function D(r,e,t){if(e==="json"){w(h.encode(r));return}b({body:[{list:{title:t?"Preview updated":"Preview is ready",items:[{link:{url:r.url}},`Preview ID: ${r.preview_identifier}`]}}]})}function T(r){let e="Failed to open theme preview.",t=r.stack??r.message;I({headline:e,body:t})}var c=H(N(),1);var F=class extends j{static get jsonOutputSchema(){return h}static summary="Applies JSON overrides to a theme and returns a preview URL.";static descriptionWithMarkdown="Applies a JSON overrides file to a theme and creates or updates a preview. This lets you quickly preview changes.\n\n The command returns a preview URL and a preview identifier. You can reuse the preview identifier with `--preview-id` to update an existing preview instead of creating a new one.";static description=this.descriptionForHelp();static flags={...g,...f,...E,theme:c.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),overrides:c.Flags.string({description:"Path to a JSON overrides file.",env:"SHOPIFY_FLAG_OVERRIDES"}),"preview-id":c.Flags.string({description:"An existing preview identifier to update instead of creating a new preview.",env:"SHOPIFY_FLAG_PREVIEW_ID"}),open:c.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),json:c.Flags.boolean({...f.json,description:"Output the preview URL and identifier as JSON.",env:"SHOPIFY_FLAG_JSON",default:!1})};static multiEnvironmentsFlags=["store","password","theme","overrides"];async command(e,t,a=!1){let d=await x(t,{filter:{theme:e.theme}}),i=await L({adminSession:t,overrideJson:e.overrides,themeId:d.id.toString(),previewIdentifier:e["preview-id"],password:e.password}),o=e.json?"json":"text";return e.open&&await _(i.url).catch(v=>T(v))===!1&&T(new Error(`Could not open the browser. Open this URL manually: ${i.url}`)),(!a||!e.json)&&D(i,o,!!e["preview-id"]),i}renderEnvironmentResults(e){w(h.encode({environments:e}))}validateCommandFlags(e){if(!e.theme||!e.overrides)throw new s("Specify both --theme and --overrides, either as flags or in an environment.")}requiredFlagsForSingleEnvironment(e){return super.requiredFlagsForSingleEnvironment(e).filter(t=>t!=="store")}};export{F as a};
1
+ import{l as S,n as O,q as R}from"./chunk-2RFCYZMG.js";import{a as x}from"./chunk-63UKZLPC.js";import{e as J}from"./chunk-QFWWCZOI.js";import{p as E,v as j}from"./chunk-KT5QQOES.js";import{k as l,ua as u}from"./chunk-NCPZVARH.js";import{b as g,c as f}from"./chunk-5AWELO3D.js";import{A as b,B as I,O as _}from"./chunk-V654BMS7.js";import{h as s}from"./chunk-J7BTC45S.js";import{Ta as y,la as P,wb as w}from"./chunk-RIG66DIQ.js";import{b as p}from"./chunk-FZCGRIOM.js";import{b as N}from"./chunk-YTUUU33R.js";import{e as H,g as n}from"./chunk-VKWPEFWQ.js";n();n();n();async function $({session:r,overridesContent:e,themeId:t}){u("theme-preview:create");let d=`${O(r)}/theme_preview.json?preview_theme_id=${t}`,i=await S(r,{headers:{"Content-Type":"application/json"}}),o=await l(d,{method:"POST",body:e,headers:i});if(!o.ok)throw new s(`Theme preview request failed with status ${o.status}: ${o.statusText}`);let m=await U(o);return u("theme-preview:create"),m}async function A({session:r,overridesContent:e,themeId:t,previewIdentifier:a}){u("theme-preview:update");let i=`${O(r)}/theme_preview.json?preview_theme_id=${t}&preview_identifier=${encodeURIComponent(a)}`,o=await S(r,{headers:{"Content-Type":"application/json"}}),m=await l(i,{method:"POST",body:e,headers:o});if(!m.ok)throw new s(`Theme preview request failed with status ${m.status}: ${m.statusText}`);let v=await U(m);return u("theme-preview:update"),v}async function U(r){let e=await r.json();if(e.error)throw new s(`Theme preview failed: ${e.error}`);if(!e.url||!e.preview_identifier)throw new s("Theme preview returned an unexpected response");return{url:e.url,preview_identifier:e.preview_identifier}}async function L(r){if(!y(r.overrideJson))throw new s(`Override file not found: ${r.overrideJson}`);let e=await P(r.overrideJson),t;try{t=JSON.parse(e)}catch(i){let o=i instanceof Error?i.message:String(i);throw new s(`Failed to parse override file: ${r.overrideJson}`,o)}let a=await R(r.themeId,r.adminSession,r.password),d=JSON.stringify(t);return r.previewIdentifier?A({session:a,overridesContent:d,themeId:r.themeId,previewIdentifier:r.previewIdentifier}):$({session:a,overridesContent:d,themeId:r.themeId})}n();n();var C=p.object({id:p.string().min(1).describe("The opaque Storefront preview identifier, not a theme ID or Shopify GID."),url:p.string().url()}).strict(),h=J({name:"ThemePreviewResult",schema:p.object({status:p.literal("success"),preview:C}).strict(),definitions:{ThemePreview:C},project:r=>{let e=r;return{status:"success",preview:{id:e.preview_identifier,url:e.url}}}});function D(r,e,t){if(e==="json"){w(h.encode(r));return}b({body:[{list:{title:t?"Preview updated":"Preview is ready",items:[{link:{url:r.url}},`Preview ID: ${r.preview_identifier}`]}}]})}function T(r){let e="Failed to open theme preview.",t=r.stack??r.message;I({headline:e,body:t})}var c=H(N(),1);var F=class extends j{static get jsonOutputSchema(){return h}static summary="Applies JSON overrides to a theme and returns a preview URL.";static descriptionWithMarkdown="Applies a JSON overrides file to a theme and creates or updates a preview. This lets you quickly preview changes.\n\n The command returns a preview URL and a preview identifier. You can reuse the preview identifier with `--preview-id` to update an existing preview instead of creating a new one.";static description=this.descriptionForHelp();static flags={...g,...f,...E,theme:c.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),overrides:c.Flags.string({description:"Path to a JSON overrides file.",env:"SHOPIFY_FLAG_OVERRIDES"}),"preview-id":c.Flags.string({description:"An existing preview identifier to update instead of creating a new preview.",env:"SHOPIFY_FLAG_PREVIEW_ID"}),open:c.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),json:c.Flags.boolean({...f.json,description:"Output the preview URL and identifier as JSON.",env:"SHOPIFY_FLAG_JSON",default:!1})};static multiEnvironmentsFlags=["store","password","theme","overrides"];async command(e,t,a=!1){let d=await x(t,{filter:{theme:e.theme}}),i=await L({adminSession:t,overrideJson:e.overrides,themeId:d.id.toString(),previewIdentifier:e["preview-id"],password:e.password}),o=e.json?"json":"text";return e.open&&await _(i.url).catch(v=>T(v))===!1&&T(new Error(`Could not open the browser. Open this URL manually: ${i.url}`)),(!a||!e.json)&&D(i,o,!!e["preview-id"]),i}renderEnvironmentResults(e){w(h.encode({environments:e}))}validateCommandFlags(e){if(!e.theme||!e.overrides)throw new s("Specify both --theme and --overrides, either as flags or in an environment.")}requiredFlagsForSingleEnvironment(e){return super.requiredFlagsForSingleEnvironment(e).filter(t=>t!=="store")}};export{F as a};
@@ -1,4 +1,4 @@
1
- import{a as m}from"./chunk-ZGV3HNEV.js";import{a as c}from"./chunk-FWB3GLMW.js";import{Ea as p,Ga as d,Ia as l,Ma as g}from"./chunk-3C6VLJ5D.js";import{b as a,c as f,f as s}from"./chunk-Q2SZCZE7.js";import{h as r}from"./chunk-2VSNFOKD.js";import{b as I}from"./chunk-YTUUU33R.js";import{e as v,g as n}from"./chunk-VKWPEFWQ.js";n();var i=v(I(),1);var t=class h extends m{static summary="Fetch your app configuration from the Developer Dashboard.";static descriptionWithMarkdown=`Pulls app configuration from the Developer Dashboard and creates or overwrites a configuration file. You can create a new app with this command to start with a default configuration file.
1
+ import{a as m}from"./chunk-NPB753M3.js";import{a as c}from"./chunk-D4LFWIFE.js";import{Ea as p,Ga as d,Ia as l,Ma as g}from"./chunk-XV6XCOTG.js";import{b as a,c as f,f as s}from"./chunk-5AWELO3D.js";import{h as r}from"./chunk-J7BTC45S.js";import{b as I}from"./chunk-YTUUU33R.js";import{e as v,g as n}from"./chunk-VKWPEFWQ.js";n();var i=v(I(),1);var t=class h extends m{static summary="Fetch your app configuration from the Developer Dashboard.";static descriptionWithMarkdown=`Pulls app configuration from the Developer Dashboard and creates or overwrites a configuration file. You can create a new app with this command to start with a default configuration file.
2
2
 
3
3
  For more information on the format of the created TOML configuration file, refer to the [App configuration](https://shopify.dev/docs/apps/tools/cli/configuration) page.
4
4
  `;static get jsonOutputSchema(){return p}static description=this.descriptionForHelp();static flags={...a,...f,...c,config:i.Flags.string({hidden:!1,char:"c",description:"The name of the local app configuration to read and overwrite. Use --file-name instead when specifying --client-id.",env:"SHOPIFY_FLAG_APP_CONFIG"}),"organization-id":i.Flags.string({hidden:!0,env:"SHOPIFY_FLAG_ORGANIZATION_ID",exclusive:["client-id"]}),"client-id":s(i.Flags.string({hidden:!1,description:"The Client ID of the remote app to link. Use --file-name to specify the destination configuration file.",env:"SHOPIFY_FLAG_CLIENT_ID"})),"file-name":i.Flags.string({hidden:!1,description:"The name of the app configuration file to create or overwrite. Requires --force to overwrite an existing file.",env:"SHOPIFY_FLAG_APP_CONFIG_FILE_NAME",exclusive:["config"]}),force:i.Flags.boolean({hidden:!1,description:"Overwrite an existing configuration file without prompting.",env:"SHOPIFY_FLAG_FORCE",dependsOn:["file-name"]})};async run(){let{flags:e}=await this.parse(h);if(e.config!==void 0&&e["client-id"]!==void 0)throw new r("The --config and --client-id flags can't be used together.","Use --file-name instead of --config to choose the configuration file to create or overwrite.");let u={directory:e.path,apiKey:e["client-id"],organizationId:e["organization-id"],configName:e.config,fileName:e["file-name"],force:e.force??!1},o=await l(u),{app:F}=await g({directory:e.path,clientId:void 0,forceRelink:!1,userProvidedConfigName:o.configFileName});return d(o.result,o.packageManager,e.json?"json":"text"),{app:F}}};export{t as a};
@@ -0,0 +1,103 @@
1
+ import{a as z,b as bt}from"./chunk-JLGA3B7P.js";import{a as Tt,b as Rt,f as Ae,g as le,h as N,j as de,k as Pt,m as vt,p as $t}from"./chunk-2RFCYZMG.js";import{a as J,l as St,m as Ft}from"./chunk-2NZ7GDDR.js";import{s as ce,t as B}from"./chunk-KT5QQOES.js";import{a as W,b as M,e as dt,g as ut,i as pt,j as mt,k as ft,n as ht,p as gt,q as yt,r as ae,s as I,u as Et,w as wt}from"./chunk-Q7BOSHWX.js";import{da as xt}from"./chunk-DTRENW4Q.js";import{va as j,xa as D}from"./chunk-NCPZVARH.js";import{B as L,C as re,D as ct,U as lt,z as at}from"./chunk-V654BMS7.js";import{c as it}from"./chunk-335BUVBP.js";import{h as k}from"./chunk-J7BTC45S.js";import{Bb as v,Cb as U,O as nt,Sa as b,Va as O,Z as Le,ab as Ce,la as _,na as qe,qb as C,sb as oe,ta as je,va as rt,xa as ot,yb as ie}from"./chunk-RIG66DIQ.js";import{c as x,e as et,f as A,h as tt,i as st,j as H,n as _e}from"./chunk-IWTNUJGY.js";import{e as Ke,g as m}from"./chunk-VKWPEFWQ.js";m();m();m();var fs=".shopifyignore",It=/templates\/\*(\.(json|liquid))?$/,kt=new Set;function ue(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[o=[],i=[]]=He(s),[a=[],u=[]]=He(n),[p=[],c=[]]=He(r),l=e.filter(G(o,".shopifyignore"));return l=l.filter(G(a,"--ignore")),l=l.filter(G(p,"--only",!0)),i.length>0&&(l=l.concat(e.filter(G(i,".shopifyignore",!0)))),u.length>0&&(l=l.concat(e.filter(G(u,"--ignore",!0)))),c.length>0&&(l=l.filter(G(c,"--only"))),nt(l,w=>w.key)}function G(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(i=>hs(n,i)||Es(i)&&ys(n,ws(i)));return(s?!r:r)?(v(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function _t(e){let t=x(e,fs);return await b(t)?(await _(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function He(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function hs(e,t){let s={matchBase:!0,noglobstar:!0};return Ce(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!kt.has(t)&&(kt.add(t),L({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),gs(t)?Ce(e,t.replace(It,"templates/**/*$1"),s):!1)}function gs(e){return It.test(e)}function ys(e,t){return t.test(e)}function Es(e){return e.startsWith("/")&&e.endsWith("/")}function ws(e){return new RegExp(e.slice(1,-1))}m();import Lt from"fs/promises";var pe=class{notifyPath;isValidUrl;constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&U("Notification skipped: notifyPath is an empty string")}async notify(t){if(this.notifyPath!=="")try{v(`Notifying filechange listener at ${this.notifyPath}...`),this.isValidUrl?await this.notifyUrl(t):await this.notifyFile(t)}catch(s){j(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),U(n)}}async notifyUrl(t){let s=await fetch(this.notifyPath,{method:"POST",body:JSON.stringify({files:[t]}),headers:{"Content-Type":"application/json"}});if(!s.ok)throw new Error(s.statusText)}async notifyFile(t){await Lt.writeFile(this.notifyPath,t),await Lt.utimes(this.notifyPath,new Date,new Date)}validateUrl(t){try{let s=new URL(t);return s.protocol==="http:"||s.protocol==="https:"}catch{return!1}}};m();m();m();import xs from"node:events";var qt=["assets/**/*.*","locales/**/*.json","blocks/**/*.liquid","snippets/**/*.liquid"];function jt(e){let t=new Map,s=new Set,n=new xs,r=(c,l)=>{n.emit(c,l)},o=async c=>{let l=await fe(e,c),f=me(c,l),w=typeof l=="string"?l:"",h=Buffer.isBuffer(l)?l.toString("base64"):"";return t.set(c,J({key:c,checksum:f,value:w,attachment:h})),l},i=O(qt,{cwd:e,deep:3,ignore:B}).then(c=>Promise.all(c.map(o))),a=(c,l)=>{let f=A(e,l),w=o(f).then(()=>{let h=t.get(f);return s.add(h.key),h.value??h.attachment??""});lt(5).then(()=>{s.delete(f)}).catch(()=>{}),r(c,{fileKey:f,onContent:h=>{w.then(y=>{y&&h(y)}).catch(()=>{})},onSync:h=>{}})},u=c=>{let l=A(e,c);s.delete(l),t.delete(l),r("unlink",{fileKey:l,onSync:f=>f()})},p=new Set(qt.map(c=>x(e,c.split("/").shift()??"")));return{root:e,files:t,unsyncedFileKeys:s,ready:async()=>i.then(()=>{}),delete:async c=>{t.delete(c)},write:async c=>{t.set(c.key,c)},read:o,addEventListener:(c,l)=>{n.on(c,l)},startWatcher:async()=>{let{default:c}=await import("./chokidar-5RWEYTNQ.js");c.watch([...p],{ignored:B,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}).on("add",a.bind(null,"add")).on("change",a.bind(null,"change")).on("unlink",u.bind(null))}}}m();m();var Ts="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function Ct(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function At(e){return(0,String.raw)`<!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>${e.title}</title>
5
+ <link rel="stylesheet" href="${Ts}" />
6
+ </head>
7
+ <body>
8
+ <div style="display: flex; justify-content: center; padding-top: 2rem;">
9
+ <div style="width: 80%;">
10
+ <div class="Polaris-Banner Polaris-Banner--withinPage" tabindex="0" role="alert" aria-live="polite">
11
+ <div class="Polaris-Box" style="--pc-box-width:100%">
12
+ <div
13
+ class="Polaris-BlockStack"
14
+ style="--pc-block-stack-align:space-between;--pc-block-stack-order:column"
15
+ >
16
+ <div
17
+ class="Polaris-Box"
18
+ style="--pc-box-color: var(--p-color-text-critical-on-bg-fill); --pc-box-background: var(--p-color-bg-fill-critical); --pc-box-padding-block-start-xs: var(--p-space-300); --pc-box-padding-block-end-xs: var(--p-space-300); --pc-box-padding-inline-start-xs: var(--p-space-300); --pc-box-padding-inline-end-xs: var(--p-space-300); --pc-box-border-start-start-radius: var(--p-border-radius-300); --pc-box-border-start-end-radius: var(--p-border-radius-300);"
19
+ >
20
+ <div
21
+ class="Polaris-InlineStack"
22
+ style="--pc-inline-stack-align:space-between;--pc-inline-stack-block-align:center;--pc-inline-stack-wrap:nowrap;--pc-inline-stack-gap-xs:var(--p-space-200);--pc-inline-stack-flex-direction-xs:row"
23
+ >
24
+ <div
25
+ class="Polaris-InlineStack"
26
+ style="--pc-inline-stack-wrap:nowrap;--pc-inline-stack-gap-xs:var(--p-space-100);--pc-inline-stack-flex-direction-xs:row"
27
+ >
28
+ <span class="Polaris-Banner--textCriticalOnBgFill">
29
+ <span class="Polaris-Icon">
30
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
31
+ <path d="M10 6a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5a.75.75 0 0 1 .75-.75Z" />
32
+ <path d="M11 13a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" />
33
+ <path
34
+ fill-rule="evenodd"
35
+ d="M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Zm-1.5 0a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z"
36
+ />
37
+ </svg>
38
+ </span>
39
+ </span>
40
+ <h2 class="Polaris-Text--root Polaris-Text--headingSm Polaris-Text--break">
41
+ ${e.header}
42
+ </h2>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ <div
47
+ class="Polaris-Box"
48
+ style="--pc-box-padding-block-start-xs:var(--p-space-300);--pc-box-padding-block-end-xs:var(--p-space-300);--pc-box-padding-block-end-md:var(--p-space-400);--pc-box-padding-inline-start-xs:var(--p-space-300);--pc-box-padding-inline-start-md:var(--p-space-400);--pc-box-padding-inline-end-xs:var(--p-space-300);--pc-box-padding-inline-end-md:var(--p-space-400)"
49
+ >
50
+ <div
51
+ class="Polaris-BlockStack"
52
+ style="--pc-block-stack-order:column;--pc-block-stack-gap-xs:var(--p-space-300)"
53
+ >
54
+ ${e.errors.map(s=>`
55
+ <div>
56
+ <span class="Polaris-Text--root Polaris-Text--headingSm">${Ct(s.message)}</span>
57
+ <ul class="Polaris-List">
58
+ <li class="Polaris-List__Item">${Ct(s.code)}</li>
59
+ </ul>
60
+ </div>`).join("")}
61
+ </div>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </body>
69
+ </html>`}m();m();var Rs=/<head(\s[^>]*)?>/i,Ne="https://cdn.shopify.com/storefront",Ss=`${Ne}/standard-events.js`,Fs=`${Ne}/standard-events.dev.js`,Ht=`${Ne}/standard-events-inspector.js`,Ot="shopify-cli-standard-events-inspector",Ps=new RegExp(`<script\\b[^>]*(?:\\bid=["']${Oe(Ot)}["']|\\bsrc=["']${Oe(Ht)}["'])[^>]*>`,"i"),vs=new RegExp(Oe(Ss),"g");function he(e){return Ps.test(e)?e:e.replace(Rs,t=>`${t}<script id="${Ot}" src="${Ht}" defer></script>`)}function Nt(e){return e.replace(vs,Fs)}function Oe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}m();var Dt=80;function K(e,t,s){if(!$s(e)||s.type==="theme-extension")return;let n=e.path.length>Dt?`${e.path.substring(0,Dt)}...`:e.path,o=t.headers.get("server-timing")?.match(/cfRequestDuration;dur=([\d.]+)/)?.[1],i=o?`${Math.round(Number(o))}ms`:"",a=bs(t.status),u=e.method.padStart(6);ie(oe`• ${ce.format(new Date)} Request ${C.raw("\xBB")} ${u} ${a(String(t.status))} ${n} ${C.gray(i)}`)}function $s(e){let t=[V,Y,"/checkouts","/payments"],s=[".js",".css",".json",".map"];if(t.some(o=>e.path.startsWith(o)))return!1;let[n]=e.path.split("?"),r=H(n);return!s.includes(r)}function bs(e){return e<300?C.green:e<400?C.yellow:C.errorText}var Y="/cdn/",V="/ext/cdn/",De="/api/collect",ks=/^\/cart\//,Is=/^\/cart(\/|\.js|\.json|$)/,ge=/^\/checkouts\/(?!internal\/)/,Wt=/^\/account(\/login\/multipass(\/[^/]+)?|\/logout)?\/?$/,_s=new RegExp(`^${Y}`),Ls=new RegExp(`^${V}`),qs=/^\/api\/(unstable|\d{4}-\d{2})\/graphql\.json/,js=["/.well-known","/shopify/monorail","/mini-profiler-resources","/web-pixels-manager","/web-pixels@","/wpm","/services/",De,"/cdn-cgi/challenge-platform"],Mt="_shopify_essential",Cs=new RegExp(`${Mt}=([^;]*)(;|$)`);function Bt(e,t){return I(async s=>{if(js.some(n=>s.path.startsWith(n)))return null;if(As(s)){let n=s.path.split("?")[0]??"";return We(s,t).then(async r=>{if(K(s,r,t),r.ok){let o=n.split("/").at(-1)??"";if(t.localThemeFileSystem.files.has(`assets/${o}.liquid`)){let i=ee(await r.text(),t);return new Response(i,r)}}return r}).catch(async r=>{let{status:o,statusText:i,...a}=N(r,`Failed to proxy request to ${n}`);return o>=500&&!n.endsWith(".js.map")&&L(a),new Response(r.message,{status:o,statusText:i})})}})}function As(e){if(e.method!=="GET"||e.path.match(ks)||e.path.match(ge)||e.path.match(Wt)||e.path.match(_s)||e.path.match(Ls))return!0;let[t]=e.path.split("?"),s=H(t),n=e.headers.get("accept")??"*/*";return s===".html"||n.includes("text/html")?!1:!!s||n!=="*/*"}function Hs(e){let[t]=e.split("?");return!(Is.test(t)||ge.test(t)||Wt.test(t))}function ye(e){return e.session.storeFqdn.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function Os(e){return qs.test(e.path)}function ee(e,t){let s=e,n=`(data-shs-beacon-endpoint=["'])https://${ye(t)}${De}`,r=new RegExp(n,"g");s=s.replace(r,`$1${De}`);let o=new RegExp(`(https?:)?//${ye(t)}${Y}`,"g");s=s.replace(o,Y);let i=/(?:https?:)?\/\/cdn\.shopify\.com\/(.*?\/(assets\/[^?#"'`>\s]+))/g,a=c=>c.startsWith("assets/"),u=new Set([...t.localThemeFileSystem.files.keys()].filter(a)),p=new Set([...t.localThemeExtensionFileSystem.files.keys()].filter(a));return s=s.replace(i,(c,l,f)=>{let w=f&&u.has(f),h=f&&p.has(f)&&l.startsWith("extensions/");return z(f).startsWith("image/")?c:h?`${V}${l}`:w?`${Y}${l}`:c}),t.options.standardEventsDevBundle&&(s=Nt(s)),s}function Ns(e,t){let s=`http://${t.options.host}:${t.options.port}`,n=new RegExp(`data-base-url=["']((?:https?:)?//${ye(t)})[^"']*?["']`,"g");return e.replace(n,(r,o)=>r.replace(o,s))}function Ds(e,t){let s=new RegExp(`Domain=${ye(t)};\\s*`,"gi");return e.map(n=>n.replace(s,""))}async function te(e,t,s,n){let r=zt(e,t,n);if(r.status>=300&&r.status<400)return r;t.headers.get("content-type")?.includes("application/json")||r.headers.set("content-type","text/html; charset=utf-8");let a=await r.text();return a=ee(a,e),a=Ns(a,e),e.options.standardEventsInspector&&(a=he(a)),s&&(a=s(a)??a),new Response(a,r)}var Jt=["connection","keep-alive","proxy-authenticate","proxy-authorization","te","trailer","transfer-encoding","upgrade","expect","content-security-policy","host"];function zt(e,t,s){let n=new Response(t.body,t);n.headers.delete("content-length"),n.headers.delete("content-encoding");for(let a of Jt)n.headers.delete(a);n.headers.delete("access-control-allow-origin"),n.headers.delete("access-control-allow-credentials"),n.headers.delete("access-control-allow-methods"),n.headers.delete("access-control-allow-headers"),n.headers.delete("access-control-expose-headers"),n.headers.delete("access-control-max-age");let r=n.headers.get("Link");r&&n.headers.set("Link",ee(r,e));let o=n.headers.get("Location");o&&n.headers.set("Location",Us(e,o,s));let i=n.headers.getSetCookie();if(i?.length){n.headers.set("Set-Cookie",Ds(i,e).join(","));let a=i.join(",").match(Cs)?.[1];a&&(e.session.sessionCookies[Mt]=a)}return n}function Us(e,t,s){if(!s?.keepExternalRedirects){let i=new URL(t,"https://shopify.dev");return ge.test(i.pathname)?t:Ut(i)}let n=`https://${e.session.storeFqdn}`,r=new URL(t,n),o=r.host===new URL(n).host;return o&&!ge.test(r.pathname)?Ut(r):!o&&t.startsWith("//")?r.href:t}function Ut(e){return e.searchParams.delete("_fd"),e.searchParams.delete("pb"),e.href.replace(e.origin,"")}function Ue(e){let t=dt(e);for(let n of Jt)delete t[n];delete t["upgrade-insecure-requests"];let s=ut(e);return s&&(t["X-Forwarded-For"]=s),t}function We(e,t){let s=e.path.replace(new RegExp(V,"g"),"/"),n=e.path.startsWith(V)?"cdn.shopify.com":t.session.storeFqdn,r=new URL(s,`https://${n}`);if(r.hostname!==n)return Promise.reject(new Error(`Request failed: Hostname mismatch. Expected host: ${n}. Resulting URL hostname: ${r.hostname}`));let o=pt(e),i=Ue(e);return Os(e)||(/\/assets\/[^/]+\.(css|js)$/.test(r.pathname)&&/\?\d+$/.test(r.search)&&(r.search=`?v=${Date.now()}`),r.searchParams.set("_fd","0"),r.searchParams.set("pb","0"),i=Rt({...i,...Tt(),...n===t.session.storeFqdn?t.session.crawlerSignatureHeaders:{},referer:r.origin,Cookie:vt(t.session,{headers:i}),...t.type==="theme"&&Hs(e.path)?{Authorization:`Bearer ${t.session.storefrontToken}`}:{}})),fetch(r,{method:e.method,body:o,duplex:o?"half":void 0,redirect:"manual",headers:i}).then(a=>zt(t,a)).catch(a=>{throw le(j(a),r)})}var Me=0,Ws=5;function Yt(e,t){return I(s=>{let[n="/",r=""]=s.path.split("?");return Bs(s)&&(t.lastRequestedPath=s.path),t.options.errorOverlay!=="silent"&&t.localThemeFileSystem.uploadErrors.size>0?Gt(t,{status:500,statusText:"Internal Server Error"},{title:"Failed to Upload Theme Files",header:"Upload Errors",errors:Array.from(t.localThemeFileSystem.uploadErrors.entries()).map(([i,a])=>({message:i,code:a.join(`
70
+ `)}))}):de(t.session,{method:s.method,path:n,query:[...new URLSearchParams(r)],themeId:String(e.id),sectionId:"",headers:Ue(s),replaceExtensionTemplates:we(t),replaceTemplates:Be(t,n,mt(s,"localization")?.toLowerCase())}).then(async i=>{if(i.status>=400&&i.status<500&&!Ms(s)){let a=await Js(s,t,i);if(a)return K(s,a,t),a}return K(s,i,t),te(t,i,a=>(zs(i,a,String(e.id)),Me=0,Je(a,t)),{keepExternalRedirects:Pt({method:s.method,path:n})})}).catch(async i=>{if(i instanceof Ee&&(v(`Theme ID mismatch: expected ${i.getExpectedThemeId()} but got ${i.getActualThemeId()}; refreshing session...`),D("theme-service:error-page:theme-id-mismatch"),t.session.refresh)){Me++,Me>Ws&&(ct(new k(i.getMessage())),process.exit(1)),await t.session.refresh();let w=new URLSearchParams(r),h=new URLSearchParams([...w].filter(([ke])=>!ke.startsWith("__sfr"))),y=n+(h.toString()?`?${h}`:"");return new Response(null,{status:302,headers:{Location:y}})}let{status:a,statusText:u,cause:p,...c}=N(i,"Failed to render storefront"),[l,...f]=c.headline.split(`
71
+ `);return re(c),Gt(t,{status:a,statusText:u},{title:l,header:l,errors:[{message:[...f,p.message].join("<br>"),code:p.stack?.replace(`${p.message}
72
+ `,"")??""}]})})})}function Gt(e,t,s){let n=Je(At(s),e);return e.options.standardEventsInspector&&(n=he(n)),D("theme-service:error-page:rendered"),new Response(n,{...t,headers:t.headers??{"Content-Type":"text/html; charset=utf-8"}})}function Ms(e){let t=new URLSearchParams(e.path.split("?")[1]);return["section_id","sections","app_block_id"].some(s=>t.has(s))}function Bs(e){return e.headers.get("sec-fetch-mode")==="navigate"}async function Js(e,t,s){v(`Render failed for ${e.path} with ${s.status} (x-request-id: ${s.headers.get("x-request-id")}), trying proxy...`);let n=await We(e,t).catch(r=>new Response(null,N(r)));if(n.status<400)return v(`Proxy status: ${n.status}. Returning proxy response.`),t.options.standardEventsInspector&&(n.headers.get("content-type")??"").includes("text/html")?te(t,n):n;v(`Proxy status: ${n.status}. Returning render error.`)}function zs(e,t,s){let n=t.match(/Shopify\.theme\s*=\s*{[^}]+?"id":\s*"?(\d+)"?(}|,)/)?.[1];if(n&&n!==s)throw new Ee(s,n,e)}var Ee=class extends Error{response;expectedThemeId;actualThemeId;constructor(t,s,n){super([`Theme ID mismatch: expected ${t} but got ${s}.`,`Request ID: ${n.headers.get("x-request-id")}`,`URL: ${n.url}`,"This is likely related to an issue in upstream Shopify APIs.","Please try again in a few minutes and report this issue:","https://community.shopify.dev/c/shopify-cli-libraries/14"].join(`
73
+ `)),this.response=n,this.expectedThemeId=t,this.actualThemeId=s}getMessage(){return this.message}getResponse(){return this.response}getExpectedThemeId(){return this.expectedThemeId}getActualThemeId(){return this.actualThemeId}};m();m();function xe(e,t){let s=new RegExp(`{%-?\\s*${t}\\s*-?%}`),n=new RegExp(`{%-?\\s*end${t}\\s*-?%}`),r=s.exec(e);if(!r)return;let o=r.index+r[0].length;n.lastIndex=o;let i=n.exec(e);if(!i)return;let a=i.index;return e.slice(o,a)}m();function Te(e){let{pathname:t,search:s,searchParams:n}=new URL(e.path,"http://e.c");return{pathname:t,search:s,searchParams:n}}var Gs={stylesheet:new Map,javascript:new Map};function Vt(e,t){return I(async s=>{if(s.method!=="GET")return;if(Zs(s,t))return Qs(s,t);let{file:n,fileKey:r,isUnsynced:o}=Xs(s,t);if(!r)return;let i=z(r);if(i.startsWith("image/")&&s.path.includes("&")&&!o)return;if(ht(s,"X-Local-Asset","true"),!n){o&&M(s,W({statusCode:404,statusMessage:"Not found"}));return}let a=n.value?Buffer.from(ee(n.value,t)):Buffer.from(n.attachment??"","base64");return ae(s,{getContents:()=>a,getMeta:()=>({type:i,size:a.length,mtime:n.stats?.mtime})})})}var Ys=/^(?:\/cdn\/(?!extensions\/).*?)?\/assets\/([^?]+)/,Vs=/^(?:\/(?:ext\/)?cdn\/extensions\/.*?)?\/assets\/([^?]+)/;function Xs(e,t){let s=(n,r)=>{let o=e.path.match(n)?.[1];if(o){let i=x("assets",o),a=r.files.get(i),u=r.unsyncedFileKeys.has(i);if(a||u)return{file:a,isUnsynced:u,fileKey:i}}};return s(Ys,t.localThemeFileSystem)??s(Vs,t.localThemeExtensionFileSystem)??{isUnsynced:!1,fileKey:void 0,file:void 0}}function Zs(e,t){return t.type==="theme"&&e.path.includes("/compiled_assets")}function Qs(e,t){switch(Te(e).pathname.split("/").at(-1)){case"styles.css":return Ks(t,e);case"block-scripts.js":return ze(t,e,"block");case"snippet-scripts.js":return ze(t,e,"snippet");case"scripts.js":return ze(t,e,"section");case void 0:break;default:break}}function Ks(e,t){let s=Re(e,"section"),n=Re(e,"block"),r=Re(e,"snippet"),o=[`/*** GENERATED LOCALLY ***/
74
+ `];for(let[,a]of[...s,...n,...r]){let u=Xt(a,"stylesheet");u&&o.push(u)}let i=o.join(`
75
+ `);return ae(t,{getContents:()=>i,getMeta:()=>({type:"text/css",size:Buffer.byteLength(i),mtime:new Date})})}function ze(e,t,s){let n=Re(e,s),r=`${s}s`,o=[`
76
+ /*** GENERATED LOCALLY ***/
77
+
78
+ (function () {
79
+ var __${r}__ = {};
80
+
81
+ (function () {
82
+ var element = document.getElementById("${r}-script");
83
+ var attribute = element ? element.getAttribute("data-${r}") : "";
84
+ var ${r} = attribute.split(",").filter(Boolean);
85
+
86
+ for (var i = 0; i < ${r}.length; i++) {
87
+ __${r}__[${r}[i]] = true;
88
+ }
89
+ })();`];for(let[a,u]of n){let p=a.split("/").pop()?.replace(".liquid",""),c=Xt(u,"javascript")??"";p&&c&&o.push(`
90
+ (function () {
91
+ if (!__${r}__["${p}"] && !Shopify.designMode) return;
92
+ try {
93
+ ${c}
94
+ } catch (e) {
95
+ console.error(e);
96
+ }
97
+ })();`)}o.push("})();");let i=o.join(`
98
+ `);return ae(t,{getContents:()=>i,getMeta:()=>({type:"text/javascript",size:Buffer.byteLength(i),mtime:new Date})})}function Re(e,t){return[...e.localThemeFileSystem.files.entries()].filter(([s])=>s.endsWith(".liquid")&&s.startsWith(`${t}s/`)).sort(([s],[n])=>s.localeCompare(n))}function Xt(e,t){let s=Gs[t],n=s.get(e.key);if(n?.checksum===e.checksum)return n.content;if(s.delete(e.key),!e.value)return;let r=[`/* ${e.key} */`],o=xe(e.value??"",t)?.trimEnd();if(o&&r.push(o),r.length>1){let i=r.join(`
99
+ `);return s.set(e.key,{checksum:e.checksum,content:i}),i}}m();import*as Zt from"node:os";function en(e,t){let s=new Set,n=`:${t}`,r=e.toLowerCase().trim();if(s.add(`${r}${n}`),["localhost","127.0.0.1","::1","0.0.0.0"].includes(r)&&(s.add(`localhost${n}`),s.add(`127.0.0.1${n}`),s.add(`[::1]${n}`)),r==="0.0.0.0"||r==="::")for(let i of Object.values(Zt.networkInterfaces()))for(let a of i??[]){let u=a.address.toLowerCase().split("%")[0],c=a.family==="IPv6"?`[${u}]`:u;s.add(`${c}${n}`)}return s}function tn(e){if(e)return e.toLowerCase().replace(/\.(?=:\d|$)/,"")}function Qt(e,t){let s=en(e,t);return I(n=>{let r=n.node.req.headers.host,o=tn(r);if(!o||!s.has(o))return M(n,W({statusCode:400,statusMessage:"Bad Request",message:"Invalid Host header"}))})}m();function Kt(){return es()}function Gr(){return es()}function es(){return{root:"",files:new Map,unsyncedFileKeys:new Set,uploadErrors:new Map,ready:()=>Promise.resolve(),delete:async e=>{},read:async e=>"",write:async e=>{},stat:async e=>({mtime:new Date,size:1}),addEventListener:()=>{},startWatcher:async()=>{}}}import{createServer as sn}from"node:http";async function io(e,t){let s=await rn(e,t);return await on(e,s),nn(e,s)}function nn(e,t){let s=Et();s.use(Qt(t.options.host,t.options.port)),s.use(ts(e,t)),s.use(Vt(e,t)),s.use(Bt(e,t)),s.use(Yt(e,t));let n=sn(wt(s));return{dispatch:s.handler.bind(s),start:async()=>new Promise(r=>n.listen({port:t.options.port,host:t.options.host},()=>r({close:async()=>{await Promise.all([new Promise(o=>{n.closeAllConnections(),n.close(o)})])}})))}}async function rn(e,t){let{adminSession:s,storefrontPassword:n,themeExtensionPort:r,themeExtensionDirectory:o,crawlerSignatureHeaders:i}=t,a="127.0.0.1",u=r??9293,p=Kt(),c=jt(o);return await c.ready(),{session:await $t(e.id.toString(),s,void 0,n,i),localThemeFileSystem:p,localThemeExtensionFileSystem:c,directory:o,type:"theme-extension",lastRequestedPath:"",options:{themeEditorSync:!1,noDelete:!1,ignore:[],only:[],host:a,port:u,liveReload:"hot-reload",standardEventsDevBundle:!1,standardEventsInspector:!1,open:!1,errorOverlay:"default"}}}async function on(e,t){let s=t.localThemeExtensionFileSystem,n=({fileKey:r,onContent:o,onSync:i})=>{o(()=>{Se(e,t,i,{type:"update",key:r,payload:{isThemeExtension:!0}})})};return s.addEventListener("add",n),s.addEventListener("change",n),s.ready().then(async()=>s.startWatcher())}function we(e){let t={},s=e.localThemeExtensionFileSystem;for(let n of s.unsyncedFileKeys){let r=s.files.get(n),o=r?.value??r?.attachment;o&&(t[n]=o)}return t}var ve=Ke(xt(),1);import an from"node:events";var Ge=new Map,se=new Map;function ss(e,t){let s=(0,ve.parseJSON)(t,null,!0);if(!s)return;let n=s?.sections;n&&!e.startsWith("locales/")?se.set(e,Object.entries(n||{}).map(([r,{type:o}])=>[o,r])):se.delete(e)}function Ye(e){return!e.startsWith("assets/")&&[".liquid",".json"].includes(H(e))}function Be(e,t,s){let n={},r=/^templates\/.+\.json$/,o=t?`${x("templates",t.replace(/^\//,"").replace(/\.html$/,"")||"index")}.json`:"",i=!!t&&e.localThemeFileSystem.files.has(o),a=/^locales\/.+\.json$/,u=!!s&&(e.localThemeFileSystem.files.has(`locales/${s}.json`)||e.localThemeFileSystem.files.has(`locales/${s}.default.json`));for(let p of e.localThemeFileSystem.unsyncedFileKeys)if(Ye(p)){if(i&&r.test(p)){if(p!==o)continue}else if(a.test(p)){if(u){if(!p.startsWith(`locales/${s}.`))continue}else if(!p.includes(".default."))continue}n[p]=e.localThemeFileSystem.files.get(p)?.value??""}return n}function So(e,t){let s=({fileKey:r,onContent:o,onSync:i})=>{let a=H(r);o(u=>{!pn(r)&&Ye(r)&&a===".json"&&ss(r,u),Se(e,t,i,{type:"update",key:r,payload:dn(r,t)})})},n=({fileKey:r,onSync:o})=>{se.delete(r),Se(e,t,o,{type:"delete",key:r})};return t.localThemeFileSystem.addEventListener("add",s),t.localThemeFileSystem.addEventListener("change",s),t.localThemeFileSystem.addEventListener("unlink",n),t.localThemeFileSystem.ready().then(async()=>{let r=[...t.localThemeFileSystem.files];return Promise.allSettled(r.map(async([o,i])=>{if(o.endsWith(".json")){let a=i.value??await t.localThemeFileSystem.read(o);a&&typeof a=="string"&&ss(o,a)}else o.endsWith(".liquid")&&is(i)}))})}var cn="1",rs=new an;function Pe(e){rs.emit("hot-reload",{...e,version:cn})}function ts(e,t){return I(s=>{let n=s.headers.get("accept")==="text/event-stream",r=Te(s).searchParams;if(n){let o=yt(s);return rs.on("hot-reload",i=>{o.push(JSON.stringify(i)).catch(a=>{L({headline:"Failed to send HotReload event.",body:a.stack})})}),Pe({type:"open",pid:String(process.pid),themeId:String(e.id)}),o.send().then(()=>o.flush())}if(r.has("hr-log")){let o=(0,ve.parseJSON)(r.get("hr-log")??"",null);return o&&(o.headline=`[HotReload] ${o.headline}`,o.type==="error"?re(o):o.type==="warn"?L(o):o.type==="info"?at(o):L({headline:`Unknown HotReload log type: ${o.type}`})),null}if(s.path===os)return _($e()).then(o=>ft(s,o,"application/javascript")).catch(o=>M(s,W({cause:o})));if(r.has("section_id")||r.has("app_block_id")){let o=r.get("section_key")??"",i=r.get("section_id")??"",a=r.get("app_block_id")??"",u=s.path.split("?")[0]??"",p=new URLSearchParams(r);if(p.delete("section_key"),p.delete("section_id"),p.delete("app_block_id"),p.delete("_fd"),p.delete("pb"),i===""&&a==="")return;let c={};if(i){let l=t.localThemeFileSystem.unsyncedFileKeys;if(l.has(o)){let f=t.localThemeFileSystem.files.get(o)?.value;if(!f)return"";c[o]=f}for(let f of l)if(f.endsWith(".json")){for(let[w,h]of se.get(f)??[])if(i.endsWith(`__${h}`)){let y=t.localThemeFileSystem.files.get(f)?.value;y&&(c[f]=y);continue}}}return de(t.session,{method:s.method,path:u??"/",query:[...p.entries()],themeId:String(e.id),sectionId:i,appBlockId:a,replaceTemplates:c,headers:gt(s),replaceExtensionTemplates:we(t)}).then(async l=>{if(!l.ok)throw D("theme-service:hot-reload:section:render-failed"),le(l);return te(t,l)}).catch(async l=>{let{status:f,statusText:w,...h}=N(j(l),"Failed to render section on Hot Reload");return D("theme-service:hot-reload:section:render-error"),a||L(h),new Response(null,{status:f,statusText:w})})}})}var ne=(e,t)=>Pe({themeId:String(e),type:"full",key:t});function Se(e,t,s,n){let r=()=>ne(e.id,n.key);if(t.options.liveReload==="off")return;if(t.options.liveReload==="full-page"){s(r);return}let o=String(e.id);Pe({sync:"local",themeId:o,...n}),s(()=>Pe({sync:"remote",themeId:o,...n}),r)}function ln(e,t){let s=new Set;if(e.endsWith(".json")){let n=t.localThemeFileSystem.files.get(e)?.value;if(n){let r=(0,ve.parseJSON)(n,null,!0)?.sections;for(let o of Object.keys(r??{}))s.add(o)}}else{let n=e.match(/^sections\/(.+)\.liquid$/)?.[1];if(n)for(let[r,o]of se)for(let[i,a]of o)i===n&&s.add(a)}return[...s]}function dn(e,t){let[s]=e.split("/"),n=t.localThemeFileSystem.files.get(e);return{sectionNames:s==="sections"?ln(e,t):[],replaceTemplates:Ye(e)?Be(t):{},updatedFileParts:n&&is(n)}}var Fe="hot-reload-client",un="/cdn/shopifycloud/theme-hot-reload/theme-hot-reload.js",ns=new RegExp(`<script id="${Fe}"[^>]*>[^<]*</script>`),os="/@shopify/theme-hot-reload";function Je(e,t){return t.options.liveReload==="off"?e.replace(ns,""):process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD?e.replace(ns,"").replace(/<\/head>/,`<script id="${Fe}" src="${os}" defer></script></head>`):e.includes(`<script id="${Fe}"`)?e:e.replace(/<\/head>/,`<script id="${Fe}" src="${un}" defer></script></head>`)}function pn(e){return e.startsWith("assets/")}function is(e){if(!(["sections/","snippets/","blocks/"].some(c=>e.key.startsWith(c))&&e.key.endsWith(".liquid")))return;let n={stylesheetTag:!1,javascriptTag:!1,schemaTag:!1,liquid:!1},r={checksum:e.checksum,liquid:"",stylesheetTag:"",javascriptTag:"",schemaTag:""},o=Ge.get(e.key);if(o?.checksum===e.checksum||(Ge.delete(e.key),!e.value))return n;let i=["stylesheet","javascript","schema"],a=c=>c?.replace(/\s+/g," ").trim(),u=e.value,p=(c,l)=>{u=u.replace(l,"");let f=a(l),w=`${c}Tag`;n[w]=!o||f!==o[w],r[w]=f};for(let c of i){let l=xe(e.value??"",c);l&&p(c,l)}return u=a(u.replace(/<!--[\s\S]*?-->/g,"").replace(/{%\s*comment\s*%}[\s\S]*?{%\s*endcomment\s*%}/g,"").replace(/{%\s*doc\s*%}[\s\S]*?{%\s*enddoc\s*%}/g,"")),r.liquid=u,n.liquid=!o||u!==o.liquid,Ge.set(e.key,r),n}m();m();import{lstat as mn}from"node:fs/promises";async function Ve(e){try{return await mn(e),!0}catch(t){if(t instanceof Error&&"code"in t&&(t.code==="ENOENT"||t.code==="ENOTDIR"))return!1;throw t}}async function as(e,t){return e===t||await Ve(e)?e:as(tt(e),t)}function X(e){if(!e||e==="."||e===".."||/[\\/]/.test(e)||/^[a-z]:/i.test(e))throw new k(`Unsafe listing name: ${e}`)}async function P(e,t){let s=t.replace(/\\/g,"/");if(!t||/^[\\/]/.test(t)||/^[a-z]:/i.test(t)||s.split("/").includes(".."))throw new k(`Unsafe theme file key: ${t}`);let n=et(e),r=x(n,s);if(A(n,r)===""||!_e(n,r,{native:!0}))throw new k(`Unsafe theme file key: ${t}`);let o=await as(r,n);try{let i=await qe(n),a=await qe(o);if(!_e(i,a,{native:!0}))throw new k(`Unsafe theme file key: ${t}`)}catch{throw new k(`Unsafe theme file key: ${t}`)}return r}var cs=Ke(xt(),1);function fn(e){return(e.startsWith("templates/")||e.startsWith("sections/"))&&e.endsWith(".json")}async function ls(e,t,s){if(X(t),fn(s)){await P(e,s);let n=await P(e,x("listings",t,s));if(await b(n))return n}}async function ds(e,t){X(t);let s=await P(e,"config/settings_data.json"),n=await _(s,{encoding:"utf8"}),r=(0,cs.parseJSON)(n,null,!0);return r?(r.current=Le(t),JSON.stringify(r,null,2)):n}async function Ho(e,t){X(t);let s=x(e,"listings"),n=x(s,t);if(await Ve(e)&&(await P(e,"listings"),await P(e,x("listings",t))),await b(n))return;let o=[];await b(s)&&(o=await O("*",{cwd:s,onlyDirectories:!0,deep:1}));let i=o.length>0?`Available presets: ${o.map(a=>`"${Le(a)}"`).join(", ")}`:'No presets found under "listings/"';throw new k(`Listing preset "${t}" was not found. ${i}.`,`Add the preset to config/settings_data.json and its corresponding "listings/${t}" folder, or remove the --listing flag to use the default theme settings.`)}import hn from"node:events";import{fileURLToPath as gn}from"node:url";var yn=250,us=["AGENTS.md","DESIGN.md","assets/**/*.*","config/**/*.json","config/styles.css","layout/**/*.liquid","locales/**/*.json","sections/**/*.{liquid,json}","blocks/**/*.liquid","snippets/**/*.liquid","templates/**/*.{liquid,json}","templates/customers/**/*.{liquid,json}"],$={documentationFilesRegex:/^(AGENTS|DESIGN)\.md$/,layoutLiquidRegex:/^layout\/.+\.liquid$/,sectionLiquidRegex:/^sections\/.+\.liquid$/,blockLiquidRegex:/^blocks\/.+\.liquid$/,configSchemaRegex:/^config\/settings_schema\.json$/,configDataRegex:/^config\/settings_data\.json$/,configStylesheetRegex:/^config\/styles\.css$/,sectionJsonRegex:/^sections\/.+\.json$/,templateJsonRegex:/^templates\/.+\.json$/,jsonRegex:/^(?!config\/).*\.json$/,contextualizedJsonRegex:/\.context\.[^.]+\.json$/i,staticAssetRegex:/^assets\/(?!.*\.liquid$)/};function ni(e,t){t?.listing!==void 0&&X(t.listing);let s=new Map,n=new Map,r=new Set,o={ignoreFromFile:[],ignore:t?.filters?.ignore??[],only:t?.filters?.only??[]},i=new hn,a=(d,E)=>{i.emit(d,E)},u=t?.notify?new pe(t.notify):void 0,p=async d=>{let E=t?.listing?await wn(e,d,t.listing):await fe(e,d),g=me(d,E);return s.set(d,J({key:d,checksum:g,value:typeof E=="string"?E:"",attachment:Buffer.isBuffer(E)?E.toString("base64"):""})),E},c=O(us,{cwd:e,deep:3,ignore:B}).then(async d=>{o.ignoreFromFile.push(...await _t(e));let E=ue(d.map(g=>({key:g})),o);await Promise.all(E.map(({key:g})=>p(g)))}),l=d=>A(e,d),f=d=>ue([{key:d}],o).length===0;function w(d,E,g,T){if(process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&T===$e()){ne(E,T);return}let S=l(T);if(t?.listing&&S.startsWith(`listings/${t.listing}/`)){let R=S.replace(`listings/${t.listing}/`,"");if(R.startsWith("templates/")||R.startsWith("sections/"))S=R;else return}h(S).then(()=>{switch(d){case"add":case"change":return y(d,E,g,S);case"unlink":return ke(E,g,S,n)}}).catch(R=>{U(`Error handling file event for ${S}: ${R}`)})}function h(d){return u?.notify(d)??Promise.resolve()}let y=(d,E,g,T)=>{if(f(T))return;let S=s.get(T)?.checksum,R=p(T).then(async()=>{let F=s.get(T);if(F)return F.checksum!==S&&r.add(T),{value:F.value||void 0,attachment:F.attachment}}),q=R.then(F=>{if(F)return En(r,n,T,E,g)(F)}).catch(Ae(T,"upload"));a(d,{fileKey:T,onContent:F=>{R.then(Z=>{r.has(T)&&F(Z?.value??Z?.attachment??"")}).catch(()=>{})},onSync:(F,Z)=>{q.then(Q=>{Q?F():Z?.()}).catch(()=>{})}})},ke=(d,E,g,T)=>{if(f(g))return;T.delete(g),s.delete(g),r.add(g);let S=t?.noDelete?Promise.resolve():St(Number(d),[g],E).then(async R=>{if(!R[0]?.success)throw new Error(`Failed to delete file "${g}" from remote theme.`);return r.delete(g),ps("delete",g),!0}).catch(R=>(Ae(g,"delete")(R),!1));a("unlink",{fileKey:g,onSync:R=>{S.then(q=>{q&&R()}).catch(()=>{})}})},Ie=new Set(us.map(d=>x(e,d.split("/").shift()??"")));return t?.listing&&Ie.add(x(e,"listings",t.listing)),process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&Ie.add($e()),{root:e,files:s,unsyncedFileKeys:r,uploadErrors:n,ready:()=>c,delete:async d=>{await P(e,d),s.delete(d),await xn(e,d)},write:async d=>{await P(e,d.key);let E=(d.key.startsWith("templates/")||d.key.startsWith("sections/"))&&d.key.endsWith(".json");if(t?.listing&&E){let g=x("listings",t.listing,d.key),T=await P(e,g),S=await b(T);s.set(d.key,J({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),S?await Xe(e,{...d,key:g}):await Xe(e,d);return}s.set(d.key,J({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),await Xe(e,d)},read:p,applyIgnoreFilters:d=>ue(d,o),addEventListener:(d,E)=>{i.on(d,E)},startWatcher:async(d,E)=>{let{default:g}=await import("./chokidar-5RWEYTNQ.js"),T=g.watch([...Ie],{ignored:B,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}),S=new Map,R=(q,F)=>{let Q=`${l(F)}:${q}`,Qe=S.get(Q);Qe&&clearTimeout(Qe);let ms=setTimeout(()=>{S.delete(Q),w(q,d,E,F)},yn);S.set(Q,ms)};T.on("add",R.bind(null,"add")).on("change",R.bind(null,"change")).on("unlink",R.bind(null,"unlink")).on("error",q=>{U(`File watcher error: ${q}`),j("theme-service:file-watcher:error")})}}}function En(e,t,s,n,r){return async o=>{if(!e.has(s))return!1;let[i]=await Ft(Number(n),[{key:s,...o}],r);if(!i?.success){let a=i?.errors?.asset??["Response was not successful."];throw t.set(s,a),ne(n,s),new Error(a.join(`
100
+ `))}return t.delete(s)&&ne(n,s),e.delete(s),ps("update",s),!0}}async function Xe(e,{key:t,attachment:s,value:n}){let r=await P(e,t);if(await Tn(r),s){let o=Buffer.from(s,"base64");await je(r,o,{encoding:"base64"})}else await je(r,n??"")}async function fe(e,t){let s=be(t)?{encoding:"utf8"}:{},n=await P(e,t);if(!await b(n)){v(`File ${n} can't be read because it doesn't exist...`);return}return _(n,s)}async function wn(e,t,s){if(t==="config/settings_data.json")return ds(e,s);let n=await ls(e,s,t);if(n){let r=be(t)?{encoding:"utf8"}:{};return _(n,r)}return fe(e,t)}async function xn(e,t){let s=await P(e,t);if(!await b(s)){v(`File ${s} can't be removed because it doesn't exist...`);return}await ot(s)}function ri(e){let t=[],s=[],n=[],r=[],o=[],i=[],a=[],u=[],p=[],c=[],l=[],f=[],w=[];return e.forEach(h=>{let y=h.key;$.documentationFilesRegex.test(y)?w.push(h):y.endsWith(".liquid")?$.sectionLiquidRegex.test(y)?t.push(h):$.blockLiquidRegex.test(y)?l.push(h):$.layoutLiquidRegex.test(y)?f.push(h):s.push(h):$.configSchemaRegex.test(y)?a.push(h):$.configDataRegex.test(y)?u.push(h):$.configStylesheetRegex.test(y)?p.push(h):$.jsonRegex.test(y)?$.contextualizedJsonRegex.test(y)?i.push(h):$.sectionJsonRegex.test(y)?n.push(h):$.templateJsonRegex.test(y)?r.push(h):o.push(h):$.staticAssetRegex.test(y)&&c.push(h)}),{sectionLiquidFiles:t,otherLiquidFiles:s,sectionJsonFiles:n,templateJsonFiles:r,contextualizedJsonFiles:i,otherJsonFiles:o,configSchemaFile:a,configDataFile:u,configStylesheetFiles:p,staticAssetFiles:c,blockLiquidFiles:l,layoutFiles:f,documentationFiles:w}}function be(e){return bt({liquid:"application/liquid",sass:"text/x-sass",scss:"text/x-scss"}),["application/javascript","application/json","application/liquid","text/css","text/x-sass","text/x-scss","image/svg+xml","text/markdown"].includes(z(e))}async function oi(e){let t=new Set(await O("*",{cwd:e,deep:1,onlyDirectories:!0}));return["config","layout","templates"].every(n=>t.has(n))}async function Tn(e){let t=Rn(e);await b(t)||await rt(t)}function Rn(e){let t=st(e),s=e.lastIndexOf(t);return e.substring(0,s)}function ps(e,t){ie(oe`• ${ce.format(new Date)} Synced ${C.raw("\xBB")} ${e} ${t}`)}function $e(){let e=process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD;return!e||e==="true"?x(gn(import.meta.url.split("/cli/")[0]??""),"theme-hot-reload/dist/theme-hot-reload.js"):e}function me(e,t){return t?Buffer.isBuffer(t)?Ze(t):vn(e)?Sn(t):Fn(e,t):""}function Sn(e){let t=e;return t=t.replace(/\r\n/g,`
101
+ `),t=t.replace(/\/\*[\s\S]*?\*\//,""),t=Pn(t),Ze(t)}function Fn(e,t){let s=t;return be(e)&&(s=s.replace(/\r\n/g,`
102
+ `)),Ze(s)}function Pn(e){let t=!1,s=!1,n="";for(let r of e)r==='"'&&!s&&(t=!t),!(!t&&(r===" "||r===`
103
+ `))&&(n+=r,s=r==="\\"&&!s);return n}function Ze(e){let t=Buffer.isBuffer(e)?e:Buffer.from(e);return it(t)}function di(e){let t=new Set(e.filter(({key:s})=>s.startsWith("assets/")&&s.endsWith(".liquid")).map(({key:s})=>s));return e.filter(({key:s})=>s.startsWith("assets/")?!t.has(`${s}.liquid`):!0)}function vn(e){return e.endsWith("/settings_data.json")}export{di as a,Bt as b,Yt as c,Vt as d,Qt as e,Gr as f,io as g,So as h,ts as i,ne as j,ls as k,Ho as l,ni as m,ri as n,oi as o};
@@ -1 +1 @@
1
- import{a as v}from"./chunk-7RPFJZLP.js";import{a as A}from"./chunk-YVY32DNA.js";import{a as k}from"./chunk-FWB3GLMW.js";import{Na as j,g as I}from"./chunk-3C6VLJ5D.js";import{b as x,c as S}from"./chunk-Q2SZCZE7.js";import{A as h,T as g,y as f}from"./chunk-CZ22VZDA.js";import{a as u}from"./chunk-BN7ZXAZJ.js";import{d as m}from"./chunk-X7HVAVSZ.js";import{h as b,j as y}from"./chunk-2VSNFOKD.js";import{wb as w}from"./chunk-LWCTKI4Z.js";import{b as r}from"./chunk-FZCGRIOM.js";import{b as P}from"./chunk-YTUUU33R.js";import{e as N,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();async function c(e,{web:t,stdout:i,stderr:n,signal:o,env:s={}}){let d=t.configuration.commands[e];if(!d)return;let[F,...T]=d.split(" ");await g(F,T,{cwd:t.directory,stdout:i,stderr:n,signal:o,env:s}),i.write("Web successfully built.")}async function B(e){!e.skipDependenciesInstallation&&!e.project.usesWorkspaces&&await A(e.project);let t={};return e.apiKey&&(t.SHOPIFY_API_KEY=e.apiKey),await I(e.app),await f({processes:[...e.app.webs.map(i=>({prefix:["web",...i.configuration.roles].join("-"),action:async(n,o,s)=>{await c("build",{web:i,stdout:n,stderr:o,signal:s,env:t})}})),...e.app.allExtensions.map(i=>({prefix:i.localIdentifier,action:async(n,o,s)=>{await i.build({stdout:n,stderr:o,signal:s,app:e.app,environment:"production"})}}))],showTimestamps:!1}),{status:"success",appName:e.app.name}}var O=B;a();var p=u({name:"AppBuildResult",schema:r.object({status:r.literal("success")}).strict()});a();function _(e,t){t?w(p.encode({status:e.status})):h({headline:[{userInput:e.appName},"built!"]})}var E=N(P(),1);var l=class e extends v{static summary="Build the app, including extensions.";static descriptionWithMarkdown="This command executes the build script specified in the element's TOML file. You can specify a custom script in the file. To learn about configuration files in Shopify apps, refer to [App configuration](https://shopify.dev/docs/apps/tools/cli/configuration).\n\n If you're building a [theme app extension](https://shopify.dev/docs/apps/online-store/theme-app-extensions), then running the `build` command runs [Theme Check](https://shopify.dev/docs/themes/tools/theme-check) against your extension to ensure that it's valid.";static get jsonOutputSchema(){return p}static description=this.descriptionForHelp();static flags={...x,...k,...S,"skip-dependencies-installation":E.Flags.boolean({hidden:!1,description:"Skips the installation of dependencies. Deprecated, use workspaces instead.",env:"SHOPIFY_FLAG_SKIP_DEPENDENCIES_INSTALLATION",default:!1})};async run(){let{flags:t}=await this.parse(e),i=t["client-id"];await m(()=>({cmd_app_dependency_installation_skipped:t["skip-dependencies-installation"]}));let{app:n,project:o}=await j({directory:t.path,userProvidedConfigName:t.config});try{let s=await O({app:n,project:o,skipDependenciesInstallation:t["skip-dependencies-installation"],apiKey:i});_(s,t.json)}catch(s){throw t.json&&s instanceof y?new b("The app build did not complete. See the build diagnostics for details."):s}return{app:n}}};export{l as a};
1
+ import{a as v}from"./chunk-BU3JQM3W.js";import{a as A}from"./chunk-2QQ7EBJD.js";import{a as k}from"./chunk-D4LFWIFE.js";import{Na as j,g as I}from"./chunk-XV6XCOTG.js";import{b as x,c as S}from"./chunk-5AWELO3D.js";import{A as h,T as g,y as f}from"./chunk-V654BMS7.js";import{a as u}from"./chunk-BN7ZXAZJ.js";import{d as m}from"./chunk-FHNJLON5.js";import{h as b,j as y}from"./chunk-J7BTC45S.js";import{wb as w}from"./chunk-RIG66DIQ.js";import{b as r}from"./chunk-FZCGRIOM.js";import{b as P}from"./chunk-YTUUU33R.js";import{e as N,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();async function c(e,{web:t,stdout:i,stderr:n,signal:o,env:s={}}){let d=t.configuration.commands[e];if(!d)return;let[F,...T]=d.split(" ");await g(F,T,{cwd:t.directory,stdout:i,stderr:n,signal:o,env:s}),i.write("Web successfully built.")}async function B(e){!e.skipDependenciesInstallation&&!e.project.usesWorkspaces&&await A(e.project);let t={};return e.apiKey&&(t.SHOPIFY_API_KEY=e.apiKey),await I(e.app),await f({processes:[...e.app.webs.map(i=>({prefix:["web",...i.configuration.roles].join("-"),action:async(n,o,s)=>{await c("build",{web:i,stdout:n,stderr:o,signal:s,env:t})}})),...e.app.allExtensions.map(i=>({prefix:i.localIdentifier,action:async(n,o,s)=>{await i.build({stdout:n,stderr:o,signal:s,app:e.app,environment:"production"})}}))],showTimestamps:!1}),{status:"success",appName:e.app.name}}var O=B;a();var p=u({name:"AppBuildResult",schema:r.object({status:r.literal("success")}).strict()});a();function _(e,t){t?w(p.encode({status:e.status})):h({headline:[{userInput:e.appName},"built!"]})}var E=N(P(),1);var l=class e extends v{static summary="Build the app, including extensions.";static descriptionWithMarkdown="This command executes the build script specified in the element's TOML file. You can specify a custom script in the file. To learn about configuration files in Shopify apps, refer to [App configuration](https://shopify.dev/docs/apps/tools/cli/configuration).\n\n If you're building a [theme app extension](https://shopify.dev/docs/apps/online-store/theme-app-extensions), then running the `build` command runs [Theme Check](https://shopify.dev/docs/themes/tools/theme-check) against your extension to ensure that it's valid.";static get jsonOutputSchema(){return p}static description=this.descriptionForHelp();static flags={...x,...k,...S,"skip-dependencies-installation":E.Flags.boolean({hidden:!1,description:"Skips the installation of dependencies. Deprecated, use workspaces instead.",env:"SHOPIFY_FLAG_SKIP_DEPENDENCIES_INSTALLATION",default:!1})};async run(){let{flags:t}=await this.parse(e),i=t["client-id"];await m(()=>({cmd_app_dependency_installation_skipped:t["skip-dependencies-installation"]}));let{app:n,project:o}=await j({directory:t.path,userProvidedConfigName:t.config});try{let s=await O({app:n,project:o,skipDependenciesInstallation:t["skip-dependencies-installation"],apiKey:i});_(s,t.json)}catch(s){throw t.json&&s instanceof y?new b("The app build did not complete. See the build diagnostics for details."):s}return{app:n}}};export{l as a};
@@ -1,4 +1,4 @@
1
- import{a as L}from"./chunk-XBQDMGUN.js";import{N as H}from"./chunk-3C6VLJ5D.js";import{s as W}from"./chunk-WDFCOZAY.js";import{a as X}from"./chunk-VJEKDBGZ.js";import{a as D,d as T,x as k}from"./chunk-CZ22VZDA.js";import{h as S}from"./chunk-2VSNFOKD.js";import{Ba as I,Bb as p,Sa as A,Ta as y,ab as w,ma as O,va as g}from"./chunk-LWCTKI4Z.js";import{g as N}from"./chunk-3A3DZVEJ.js";import{c as x,d as m,f as v,h as P}from"./chunk-IWTNUJGY.js";import{e as J,g as u}from"./chunk-VKWPEFWQ.js";u();function _(){return process.hrtime()}function U(r){let t=process.hrtime(r);return(t[0]*1e3+t[1]/1e6).toFixed(2)}u();u();var $=J(X(),1),q=200,K=6e4,M=200,Y=500,Q=["**/node_modules/**","**/.git/**","**/.shopify/**","**/.DS_Store","**/*.swp","**/*.swo","**/*~"],b=class{currentEvents=[];extensionPaths=[];app;options;onChangeCallback;watcher;debouncedEmit;ignored={};extensionWatchedFiles=new Map;constructor(t,e,s=q){this.app=t,this.options=e,this.debouncedEmit=k(this.emitEvents.bind(this),s,{leading:!0,trailing:!0}),this.updateApp(t)}onChange(t){this.onChangeCallback=t}async start(){let e=[...this.app.configuration.extension_directories??["extensions"]].map(a=>x(this.app.directory,a));await Promise.all(e.map(async a=>{try{await g(a.replace(/\/\*+$/,""))}catch{}}));let s=[this.app.configPath,...e],i=this.getAllWatchedFiles();s.push(...i),this.close();let{default:n}=await import("./chokidar-5RWEYTNQ.js"),o=new Map;this.watcher=n.watch(s,{ignored:[...Q,a=>{let d=m(a);return this.app.realExtensions.some(c=>{if(!c.isFunctionExtension)return!1;let h=m(x(c.directory,P(c.outputRelativePath)));return d===h||d.startsWith(`${h}/`)})||Z(d,o)}],persistent:!0,ignoreInitial:!0}),this.watcher.on("all",this.handleFileEvent),this.addAbortListener(),p(`File watcher started with ${s.length} paths`,this.options.stdout)}updateApp(t){this.app=t,this.extensionPaths=this.app.nonConfigExtensions.map(e=>m(e.directory)).filter(e=>e!==this.app.directory),this.extensionPaths.forEach(e=>{this.ignored[e]??=this.createIgnoreInstance(e)})}addAbortListener(){this.options.signal.removeEventListener("abort",this.close),this.options.signal.addEventListener("abort",this.close)}getAllWatchedFiles(){this.extensionWatchedFiles.clear();let t=this.app.realExtensions.map(s=>({extension:s,watchedFiles:s.watchedFiles()})),e=new Set;for(let{extension:s,watchedFiles:i}of t)for(let n of i){let o=m(n);e.add(o);let a=this.extensionWatchedFiles.get(o)??new Set;a.add(s.handle),this.extensionWatchedFiles.set(o,a)}return Array.from(e)}emitEvents=()=>{let t=this.currentEvents;this.currentEvents=[];let e=`\u{1F509} ${t.length} EVENTS EMITTED in files: ${t.map(s=>s.path).join(`
1
+ import{a as L}from"./chunk-YFRI75U4.js";import{N as H}from"./chunk-XV6XCOTG.js";import{t as W}from"./chunk-WFOU5M4H.js";import{a as X}from"./chunk-VJEKDBGZ.js";import{a as D,d as T,x as k}from"./chunk-V654BMS7.js";import{h as S}from"./chunk-J7BTC45S.js";import{Ba as I,Bb as p,Sa as A,Ta as y,ab as w,ma as O,va as g}from"./chunk-RIG66DIQ.js";import{g as N}from"./chunk-GSGCSBRN.js";import{c as x,d as m,f as v,h as P}from"./chunk-IWTNUJGY.js";import{e as J,g as u}from"./chunk-VKWPEFWQ.js";u();function _(){return process.hrtime()}function U(r){let t=process.hrtime(r);return(t[0]*1e3+t[1]/1e6).toFixed(2)}u();u();var $=J(X(),1),q=200,K=6e4,M=200,Y=500,Q=["**/node_modules/**","**/.git/**","**/.shopify/**","**/.DS_Store","**/*.swp","**/*.swo","**/*~"],b=class{currentEvents=[];extensionPaths=[];app;options;onChangeCallback;watcher;debouncedEmit;ignored={};extensionWatchedFiles=new Map;constructor(t,e,s=q){this.app=t,this.options=e,this.debouncedEmit=k(this.emitEvents.bind(this),s,{leading:!0,trailing:!0}),this.updateApp(t)}onChange(t){this.onChangeCallback=t}async start(){let e=[...this.app.configuration.extension_directories??["extensions"]].map(a=>x(this.app.directory,a));await Promise.all(e.map(async a=>{try{await g(a.replace(/\/\*+$/,""))}catch{}}));let s=[this.app.configPath,...e],i=this.getAllWatchedFiles();s.push(...i),this.close();let{default:n}=await import("./chokidar-5RWEYTNQ.js"),o=new Map;this.watcher=n.watch(s,{ignored:[...Q,a=>{let d=m(a);return this.app.realExtensions.some(c=>{if(!c.isFunctionExtension)return!1;let h=m(x(c.directory,P(c.outputRelativePath)));return d===h||d.startsWith(`${h}/`)})||Z(d,o)}],persistent:!0,ignoreInitial:!0}),this.watcher.on("all",this.handleFileEvent),this.addAbortListener(),p(`File watcher started with ${s.length} paths`,this.options.stdout)}updateApp(t){this.app=t,this.extensionPaths=this.app.nonConfigExtensions.map(e=>m(e.directory)).filter(e=>e!==this.app.directory),this.extensionPaths.forEach(e=>{this.ignored[e]??=this.createIgnoreInstance(e)})}addAbortListener(){this.options.signal.removeEventListener("abort",this.close),this.options.signal.addEventListener("abort",this.close)}getAllWatchedFiles(){this.extensionWatchedFiles.clear();let t=this.app.realExtensions.map(s=>({extension:s,watchedFiles:s.watchedFiles()})),e=new Set;for(let{extension:s,watchedFiles:i}of t)for(let n of i){let o=m(n);e.add(o);let a=this.extensionWatchedFiles.get(o)??new Set;a.add(s.handle),this.extensionWatchedFiles.set(o,a)}return Array.from(e)}emitEvents=()=>{let t=this.currentEvents;this.currentEvents=[];let e=`\u{1F509} ${t.length} EVENTS EMITTED in files: ${t.map(s=>s.path).join(`
2
2
  `)}`;p(e,this.options.stdout),this.onChangeCallback?.(t)};pushEvent(t){this.shouldIgnoreEvent(t)||(t.type==="extension_folder_created"&&(this.ignored[t.path]=this.createIgnoreInstance(t.path)),!this.currentEvents.some(e=>e.path===t.path&&e.type===t.type&&e.extensionHandle===t.extensionHandle)&&this.currentEvents.push(t))}shouldIgnoreEvent(t){if(t.type==="extension_folder_deleted"||t.type==="extension_folder_created"||t.extensionHandle&&this.extensionWatchedFiles.get(m(t.path))?.has(t.extensionHandle))return!1;let s=(t.extensionHandle?this.app.realExtensions.find(n=>n.handle===t.extensionHandle):void 0)?.watchedFiles(),i=this.ignored[t.extensionPath];if(s)return!s.some(o=>w(t.path,o));if(i){let n=v(t.extensionPath,t.path);return i.ignores(n)}return!1}handleFileEvent=(t,e)=>{let s=_(),i=m(e),n=e===this.app.configPath,o=e.endsWith(".extension.toml");if(p(`\u{1F300}: ${t} ${e.replace(this.app.directory,"")}
3
3
  `),n)this.handleEventForExtension(t,e,this.app.directory,s,!1);else{let a=this.extensionWatchedFiles.get(i),d=a===void 0||a.size===0;if(d&&t==="add"&&!o){let l=this.discoverFileOwners(i);l.size>0&&(this.extensionWatchedFiles.set(i,l),a=l,d=!1)}if(d&&!o&&!n){p(`\u{1F300}: File ${e} is not watched by any extension`,this.options.stdout);return}for(let l of a??[]){let c=this.app.realExtensions.find(E=>E.handle===l),h=c?m(c.directory):this.app.directory;this.handleEventForExtension(t,e,h,s,!1,l)}d&&this.handleEventForExtension(t,e,this.app.directory,s,!0)}this.debouncedEmit()};discoverFileOwners(t){let e=new Set;for(let s of this.app.realExtensions){let i=m(s.directory);i!==this.app.directory&&t.startsWith(`${i}/`)&&this.pathMatchesWatchPatterns(t,s)&&e.add(s.handle)}return e}pathMatchesWatchPatterns(t,e){let{paths:s,ignore:i}=e.watchPatterns(),n=v(m(e.directory),t);return i.some(o=>w(n,o))?!1:s.some(o=>w(n,o))}handleEventForExtension(t,e,s,i,n,o){let a=e.endsWith(".extension.toml"),d=e===this.app.configPath;switch(t){case"change":if(n)break;a||d?this.pushEvent({type:"extensions_config_updated",path:e,extensionPath:s,extensionHandle:o,startTime:i}):this.pushEvent({type:"file_updated",path:e,extensionPath:s,extensionHandle:o,startTime:i});break;case"add":if(!a){this.pushEvent({type:"file_created",path:e,extensionPath:s,extensionHandle:o,startTime:i});break}let l=0,c=P(e),h=setInterval(()=>{y(x(c,W.lockFile))?(p(`Waiting for extension to complete creation: ${e}
4
4
  `),l+=M):(clearInterval(h),this.extensionPaths.push(c),this.pushEvent({type:"extension_folder_created",path:c,extensionPath:s,startTime:i}),this.debouncedEmit()),l>=K&&(clearInterval(h),this.options.stderr.write(`Error loading new extension at path: ${e}.
@@ -1,4 +1,4 @@
1
- import{Bb as ms,Da as cs,Oa as hs,Pa as us,Sa as fs,Va as ds,ab as ps,la as wt,oa as be,qb as kt,sb as gs,ta as ls,va as bt}from"./chunk-LWCTKI4Z.js";import{c as we,f as yt,h as as}from"./chunk-IWTNUJGY.js";import{a as X,c as gi,e as mi,g as ye}from"./chunk-VKWPEFWQ.js";var ui=gi(l=>{"use strict";ye();Object.defineProperty(l,"__esModule",{value:!0});var yi=X("stream"),W=X("path"),G=X("fs"),Es=X("crypto"),O=class{constructor(e,s,i,r,n){this.kind=e,this.input=s,this.begin=i,this.end=r,this.file=n}getText(){return this.input.slice(this.begin,this.end)}getPosition(){let[e,s]=[1,1];for(let i=0;i<this.begin;i++)this.input[i]===`
1
+ import{Bb as ms,Da as cs,Oa as hs,Pa as us,Sa as fs,Va as ds,ab as ps,la as wt,oa as be,qb as kt,sb as gs,ta as ls,va as bt}from"./chunk-RIG66DIQ.js";import{c as we,f as yt,h as as}from"./chunk-IWTNUJGY.js";import{a as X,c as gi,e as mi,g as ye}from"./chunk-VKWPEFWQ.js";var ui=gi(l=>{"use strict";ye();Object.defineProperty(l,"__esModule",{value:!0});var yi=X("stream"),W=X("path"),G=X("fs"),Es=X("crypto"),O=class{constructor(e,s,i,r,n){this.kind=e,this.input=s,this.begin=i,this.end=r,this.file=n}getText(){return this.input.slice(this.begin,this.end)}getPosition(){let[e,s]=[1,1];for(let i=0;i<this.begin;i++)this.input[i]===`
2
2
  `?(e++,s=1):s++;return[e,s]}size(){return this.end-this.begin}},D=class{liquidMethodMissing(e,s){}},wi=Object.prototype.toString,ys=String.prototype.toLowerCase,Qt=Object.hasOwnProperty;function d(t){return typeof t=="string"}function x(t){return typeof t=="function"}function bi(t){return t&&x(t.then)}function _e(t){return t&&x(t.next)&&x(t.throw)&&x(t.return)}function Kt(t){return function(...e){return new Promise((s,i)=>{t(...e,(r,n)=>{r?i(r):s(n)})})}}function h(t){return t=m(t),d(t)?t:k(t)?"":S(t)?t.map(e=>h(e)).join(""):String(t)}function ge(t){return t=m(t),S(t)?t:d(t)&&t.length>0?[t]:Ti(t)?Array.from(t):dt(t)?Object.keys(t).map(e=>[e,t[e]]):[]}function L(t){return t=m(t),k(t)?[]:S(t)?t:[t]}function m(t){return t instanceof D&&x(t.valueOf)?t.valueOf():t}function xt(t){return+m(t)||0}function ft(t){return typeof t=="number"}function Vs(t){return t&&x(t.toLiquid)?Vs(t.toLiquid()):t}function k(t){return t==null}function ki(t){return t===void 0}function S(t){return wi.call(t)==="[object Array]"}function Ps(t){return t&&ft(t.length)}function Ti(t){return dt(t)&&Symbol.iterator in t}function ws(t,e){t=t||{};for(let s in t)if(Qt.call(t,s)&&e(t[s],s,t)===!1)break;return t}function xi(t){return t[t.length-1]}function dt(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function Cs(t,e,s=1){let i=[];for(let r=t;r<e;r+=s)i.push(r);return i}function oe(t,e,s=" "){return $s(t,e,s,(i,r)=>r+i)}function Si(t,e,s=" "){return $s(t,e,s,(i,r)=>i+r)}function $s(t,e,s,i){t=String(t);let r=e-t.length;return r<=0?t:i(t,s.repeat(r))}function js(t){return t}function _i(t){return[...t].some(s=>s>="a"&&s<="z")?t.toUpperCase():t.toLowerCase()}function Li(t,e){return t.length>e?t.slice(0,e-3)+"...":t}function Fi(t,e){return k(t)&&k(e)?0:k(t)?1:k(e)||t<e?-1:t>e?1:0}function Oi(t,e){return k(t)&&k(e)?0:k(t)?1:k(e)||(t=ys.call(t),e=ys.call(e),t<e)?-1:t>e?1:0}function pt(t){return function(...e){return t.call(this,...e.map(m))}}function V(t){return function(...e){return t.call(this,...e.map(xt))}}function*ke(t){let e=new Set;for(let s of t){let i=JSON.stringify(s);e.has(i)||(e.add(i),yield s)}}var bs="__liquidClass__",E=class extends Error{constructor(e,s){super(typeof e=="string"?e:e.message),this.context="",typeof e!="string"&&Object.defineProperty(this,"originalError",{value:e,enumerable:!1}),Object.defineProperty(this,"token",{value:s,enumerable:!1}),Object.defineProperty(this,bs,{value:"LiquidError",enumerable:!1})}update(){Object.defineProperty(this,"context",{value:vi(this.token),enumerable:!1}),this.message=zi(this.message,this.token),this.stack=this.message+`
3
3
  `+this.context+`
4
4
  `+this.stack,this.originalError&&(this.stack+=`
@@ -1 +1 @@
1
- import{i as l,na as d,sa as z,ta as y}from"./chunk-WDFCOZAY.js";import{b as n}from"./chunk-ZQDDRIBA.js";import{b as g,c as f,d as h}from"./chunk-Q2SZCZE7.js";import{H as c}from"./chunk-CZ22VZDA.js";import{a as u}from"./chunk-BN7ZXAZJ.js";import{wb as p}from"./chunk-LWCTKI4Z.js";import{b as o}from"./chunk-FZCGRIOM.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();var L=o.object({id:o.string(),gid:o.string(),name:o.string(),status:o.enum(l),shopCount:o.number().nullable(),url:o.string()}).strict(),r=u({name:"OrganizationListResult",schema:o.object({organizations:o.array(L)}).strict(),definitions:{OrganizationListEntry:L}});function e(s,t){if(t==="json"){p(r.encode(s));return}c({rows:s.organizations.map(a=>({id:a.id,name:a.name})),columns:{id:{header:"ID"},name:{header:"NAME"}}})}i();async function O(){return{organizations:(await y()).map(t=>({id:t.id,gid:d(t.id),name:t.businessName,status:t.status,shopCount:t.shopCount,url:t.url}))}}var m=class s extends n{static baseFlags={...n.baseFlags,...h};static summary="List Shopify organizations you have access to.";static descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs.";static description=this.descriptionForHelp();static flags={...g,...f};static get jsonOutputSchema(){return r}async run(){let{flags:t}=await this.parse(s);try{let a=await O();e(a,t.json?"json":"text")}catch(a){if(t.json&&a instanceof z){e({organizations:[]},"json");return}throw a}}};export{m as a};
1
+ import{j as l,oa as d,ta as z,ua as y}from"./chunk-WFOU5M4H.js";import{b as n}from"./chunk-OLKLHVHA.js";import{b as g,c as f,d as h}from"./chunk-5AWELO3D.js";import{H as c}from"./chunk-V654BMS7.js";import{a as u}from"./chunk-BN7ZXAZJ.js";import{wb as p}from"./chunk-RIG66DIQ.js";import{b as o}from"./chunk-FZCGRIOM.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();var L=o.object({id:o.string(),gid:o.string(),name:o.string(),status:o.enum(l),shopCount:o.number().nullable(),url:o.string()}).strict(),r=u({name:"OrganizationListResult",schema:o.object({organizations:o.array(L)}).strict(),definitions:{OrganizationListEntry:L}});function e(s,t){if(t==="json"){p(r.encode(s));return}c({rows:s.organizations.map(a=>({id:a.id,name:a.name})),columns:{id:{header:"ID"},name:{header:"NAME"}}})}i();async function O(){return{organizations:(await y()).map(t=>({id:t.id,gid:d(t.id),name:t.businessName,status:t.status,shopCount:t.shopCount,url:t.url}))}}var m=class s extends n{static baseFlags={...n.baseFlags,...h};static summary="List Shopify organizations you have access to.";static descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs.";static description=this.descriptionForHelp();static flags={...g,...f};static get jsonOutputSchema(){return r}async run(){let{flags:t}=await this.parse(s);try{let a=await O();e(a,t.json?"json":"text")}catch(a){if(t.json&&a instanceof z){e({organizations:[]},"json");return}throw a}}};export{m as a};
@@ -1 +1 @@
1
- import{b as u}from"./chunk-43R5VGKT.js";import{b as r,c as I,e as p}from"./chunk-ZDQO6CNY.js";import{a as o}from"./chunk-JD5P5RAJ.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();function i(t){return!(t===void 0||t.trim()==="")}function s(t,e){switch(t){case"bitbucket":return{branch:e.BITBUCKET_BRANCH,build:e.BITBUCKET_BUILD_NUMBER,commitSha:e.BITBUCKET_COMMIT,run:e.BITBUCKET_BUILD_NUMBER,url:`https://bitbucket.org/${e.BITBUCKET_WORKSPACE}/${e.BITBUCKET_REPO_SLUG}/pipelines/results/${e.BITBUCKET_BUILD_NUMBER}`};case"circleci":return{actor:e.CIRCLE_USERNAME,branch:e.CIRCLE_BRANCH,build:e.CIRCLE_BUILD_NUM,commitSha:e.CIRCLE_SHA1,run:e.CIRCLE_WORKFLOW_ID,url:e.CIRCLE_BUILD_URL};case"github":return{actor:e.GITHUB_ACTOR,attempt:e.GITHUB_RUN_ATTEMPT,branch:e.GITHUB_REF_NAME,build:e.GITHUB_RUN_ID,commitSha:e.GITHUB_SHA,run:e.GITHUB_RUN_ID,runNumber:e.GITHUB_RUN_NUMBER,url:`${e.GITHUB_SERVER_URL}/${e.GITHUB_REPOSITORY}/actions/runs/${e.GITHUB_RUN_ID}`};case"gitlab":return{actor:e.GITLAB_USER_LOGIN,branch:e.CI_COMMIT_REF_NAME,build:e.CI_PIPELINE_ID,commitSha:e.CI_COMMIT_SHA,commitMessage:e.CI_COMMIT_MESSAGE,run:e.CI_RUNNER_ID,url:e.CI_PIPELINE_URL};case"buildkite":return{branch:e.BUILDKITE_BRANCH,build:e.BUILDKITE_BUILD_NUMBER,commitSha:e.BUILDKITE_COMMIT,commitMessage:e.BUILDKITE_MESSAGE,run:e.BUILDKITE_BUILD_NUMBER,url:e.BUILDKITE_BUILD_URL};default:return{}}}import{randomUUID as m}from"crypto";import{homedir as f,networkInterfaces as U}from"os";async function _(t){let{fileExists:e}=await import("./fs-AINFLJ2E.js");return e(t)}async function T(t,e){let{exec:a}=await import("./system-JWYYT4PM.js");await a(t,e)}function N(){return!!(!u()&&process.stdout.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}function A(){return f()}var d,l;function y(){l=void 0}function B(t=process.env){return t[r.env]==="development"}function g(t=process.env){return t===process.env?d??=o(t[r.verbose])||process.argv.includes("--verbose"):o(t[r.verbose])||process.argv.includes("--verbose")}async function S(t=process.env){return Object.prototype.hasOwnProperty.call(t,r.runAsUser)?!o(t[r.runAsUser]):await _(p.executables.dev)}function K(t=process.env){return t===process.env?l??=o(t[r.unitTest]):o(t[r.unitTest])}function G(t=process.env){return o(t[r.noAnalytics])||o(t[r.optOutInstrumentation])||B(t)}function O(t=process.env){return o(t[r.alwaysLogAnalytics])}function H(t=process.env){return o(t[r.alwaysLogMetrics])}function w(t=process.env){return o(t[r.doctor])}function P(t=process.env){return t[r.gitpod]}function k(t=process.env){return t[r.codespaceName]}function z(t=process.env){return t[r.codespacePortForwardingDomain]}function F(t=process.env){return E(t).platform!=="localhost"}function $(t=process.env){return t[r.themeToken]}function E(t=process.env){return i(t[r.codespaces])?{platform:"codespaces",editor:!0}:i(t[r.gitpod])?{platform:"gitpod",editor:!0}:i(t[r.cloudShell])?{platform:"cloudShell",editor:!0}:{platform:"localhost",editor:!1}}async function V(){try{return await T("git",["--version"]),!0}catch{return!1}}function W(t=process.env){if(o(t.CI)){let e="unknown";return i(t.BITBUCKET_BUILD_NUMBER)?e="bitbucket":o(t.CIRCLECI)?e="circleci":i(t.GITHUB_ACTION)?e="github":o(t.GITLAB_CI)?e="gitlab":i(t.BUILDKITE)&&(e="buildkite"),{isCI:!0,name:e,metadata:s(e,t)}}else if(o(t.TF_BUILD))return{isCI:!0,name:"azure",metadata:s("azure",t)};return{isCI:!1}}async function j(){let t="00:00:00:00:00:00",e=Object.values(U()).flat().filter(n=>!!(n&&n.mac!==t));return(e.find(n=>!n.internal)??e[0])?.mac??m()}function Y(t=process.env){let e=t[r.themeKitAccessDomain];return i(e)?e:I}function q(t=process.env){let e=t[r.otelURL];return i(e)?e:"https://otlp-http-production-cli.shopifysvc.com"}export{N as a,A as b,y as c,B as d,g as e,S as f,K as g,G as h,O as i,H as j,w as k,P as l,k as m,z as n,F as o,$ as p,E as q,V as r,W as s,j as t,Y as u,q as v};
1
+ import{b as u}from"./chunk-46JYM3GH.js";import{b as r,c as I,e as p}from"./chunk-ZDQO6CNY.js";import{a as o}from"./chunk-JD5P5RAJ.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();function i(t){return!(t===void 0||t.trim()==="")}function s(t,e){switch(t){case"bitbucket":return{branch:e.BITBUCKET_BRANCH,build:e.BITBUCKET_BUILD_NUMBER,commitSha:e.BITBUCKET_COMMIT,run:e.BITBUCKET_BUILD_NUMBER,url:`https://bitbucket.org/${e.BITBUCKET_WORKSPACE}/${e.BITBUCKET_REPO_SLUG}/pipelines/results/${e.BITBUCKET_BUILD_NUMBER}`};case"circleci":return{actor:e.CIRCLE_USERNAME,branch:e.CIRCLE_BRANCH,build:e.CIRCLE_BUILD_NUM,commitSha:e.CIRCLE_SHA1,run:e.CIRCLE_WORKFLOW_ID,url:e.CIRCLE_BUILD_URL};case"github":return{actor:e.GITHUB_ACTOR,attempt:e.GITHUB_RUN_ATTEMPT,branch:e.GITHUB_REF_NAME,build:e.GITHUB_RUN_ID,commitSha:e.GITHUB_SHA,run:e.GITHUB_RUN_ID,runNumber:e.GITHUB_RUN_NUMBER,url:`${e.GITHUB_SERVER_URL}/${e.GITHUB_REPOSITORY}/actions/runs/${e.GITHUB_RUN_ID}`};case"gitlab":return{actor:e.GITLAB_USER_LOGIN,branch:e.CI_COMMIT_REF_NAME,build:e.CI_PIPELINE_ID,commitSha:e.CI_COMMIT_SHA,commitMessage:e.CI_COMMIT_MESSAGE,run:e.CI_RUNNER_ID,url:e.CI_PIPELINE_URL};case"buildkite":return{branch:e.BUILDKITE_BRANCH,build:e.BUILDKITE_BUILD_NUMBER,commitSha:e.BUILDKITE_COMMIT,commitMessage:e.BUILDKITE_MESSAGE,run:e.BUILDKITE_BUILD_NUMBER,url:e.BUILDKITE_BUILD_URL};default:return{}}}import{randomUUID as m}from"crypto";import{homedir as f,networkInterfaces as U}from"os";async function _(t){let{fileExists:e}=await import("./fs-7UOUHJDO.js");return e(t)}async function T(t,e){let{exec:a}=await import("./system-LTHR2T7L.js");await a(t,e)}function N(){return!!(!u()&&process.stdout.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}function A(){return f()}var d,l;function y(){l=void 0}function B(t=process.env){return t[r.env]==="development"}function g(t=process.env){return t===process.env?d??=o(t[r.verbose])||process.argv.includes("--verbose"):o(t[r.verbose])||process.argv.includes("--verbose")}async function S(t=process.env){return Object.prototype.hasOwnProperty.call(t,r.runAsUser)?!o(t[r.runAsUser]):await _(p.executables.dev)}function K(t=process.env){return t===process.env?l??=o(t[r.unitTest]):o(t[r.unitTest])}function G(t=process.env){return o(t[r.noAnalytics])||o(t[r.optOutInstrumentation])||B(t)}function O(t=process.env){return o(t[r.alwaysLogAnalytics])}function H(t=process.env){return o(t[r.alwaysLogMetrics])}function w(t=process.env){return o(t[r.doctor])}function P(t=process.env){return t[r.gitpod]}function k(t=process.env){return t[r.codespaceName]}function z(t=process.env){return t[r.codespacePortForwardingDomain]}function F(t=process.env){return E(t).platform!=="localhost"}function $(t=process.env){return t[r.themeToken]}function E(t=process.env){return i(t[r.codespaces])?{platform:"codespaces",editor:!0}:i(t[r.gitpod])?{platform:"gitpod",editor:!0}:i(t[r.cloudShell])?{platform:"cloudShell",editor:!0}:{platform:"localhost",editor:!1}}async function V(){try{return await T("git",["--version"]),!0}catch{return!1}}function W(t=process.env){if(o(t.CI)){let e="unknown";return i(t.BITBUCKET_BUILD_NUMBER)?e="bitbucket":o(t.CIRCLECI)?e="circleci":i(t.GITHUB_ACTION)?e="github":o(t.GITLAB_CI)?e="gitlab":i(t.BUILDKITE)&&(e="buildkite"),{isCI:!0,name:e,metadata:s(e,t)}}else if(o(t.TF_BUILD))return{isCI:!0,name:"azure",metadata:s("azure",t)};return{isCI:!1}}async function j(){let t="00:00:00:00:00:00",e=Object.values(U()).flat().filter(n=>!!(n&&n.mac!==t));return(e.find(n=>!n.internal)??e[0])?.mac??m()}function Y(t=process.env){let e=t[r.themeKitAccessDomain];return i(e)?e:I}function q(t=process.env){let e=t[r.otelURL];return i(e)?e:"https://otlp-http-production-cli.shopifysvc.com"}export{N as a,A as b,y as c,B as d,g as e,S as f,K as g,G as h,O as i,H as j,w as k,P as l,k as m,z as n,F as o,$ as p,E as q,V as r,W as s,j as t,Y as u,q as v};