@shopify/cli 0.0.0-snapshot-20260722190906 → 0.0.0-snapshot-20260722210655

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 (288) hide show
  1. package/dist/{analytics-CDAYWXD5.js → analytics-JBPJLL57.js} +1 -1
  2. package/dist/analytics-QVTQTZFT.js +1 -0
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/{chunk-GUXXVO66.js → chunk-22YTDD56.js} +1 -1
  5. package/dist/{chunk-AXXDNFZC.js → chunk-2CMSXRZ5.js} +1 -1
  6. package/dist/{chunk-VNMMVZL4.js → chunk-2FNJZPYC.js} +2 -2
  7. package/dist/{chunk-BAG27DQB.js → chunk-2OBG4WT7.js} +1 -1
  8. package/dist/{chunk-X324F4FS.js → chunk-2RLFO4KD.js} +1 -1
  9. package/dist/{chunk-6S4LWAKY.js → chunk-2VVXGQ36.js} +1 -1
  10. package/dist/{chunk-UFBY4IJ2.js → chunk-32KQUYFF.js} +1 -1
  11. package/dist/{chunk-AOZJVY2C.js → chunk-33AVVFWW.js} +1 -1
  12. package/dist/{chunk-J3P2JYNE.js → chunk-34CCAMTT.js} +1 -1
  13. package/dist/{chunk-XLD2SPNN.js → chunk-35Z5TIZM.js} +1 -1
  14. package/dist/{chunk-RZPQK4OF.js → chunk-3GPUBV4D.js} +1 -1
  15. package/dist/{chunk-4IHADX7W.js → chunk-3GQ6AVHU.js} +1 -1
  16. package/dist/{chunk-DBZXDUAL.js → chunk-3I6ZVKZ2.js} +1 -1
  17. package/dist/{chunk-VP3PA6DV.js → chunk-3PFIBTES.js} +3 -3
  18. package/dist/{chunk-2DXH72MI.js → chunk-3R45SEUK.js} +1 -1
  19. package/dist/{chunk-NTLYH6PR.js → chunk-3RUWUOIR.js} +1 -1
  20. package/dist/{chunk-EIEMLLMV.js → chunk-3XBPV64S.js} +1 -1
  21. package/dist/{chunk-S56IA3NZ.js → chunk-4GWHZ4RW.js} +1 -1
  22. package/dist/{chunk-P5GRGEW4.js → chunk-4NSHAMD3.js} +1 -1
  23. package/dist/{chunk-67MWN74X.js → chunk-5EDRU7YU.js} +2 -2
  24. package/dist/{chunk-6YQTYIZ5.js → chunk-5HGRHX2Z.js} +1 -1
  25. package/dist/{chunk-LCE3TAI7.js → chunk-5N6YKJLU.js} +1 -1
  26. package/dist/{chunk-4COZ6ZCQ.js → chunk-5RMFBXP6.js} +1 -1
  27. package/dist/{chunk-MGMUHABT.js → chunk-5VKFEYZK.js} +1 -1
  28. package/dist/{chunk-6T3VKU4R.js → chunk-5Y33JTFD.js} +1 -1
  29. package/dist/{chunk-XJQHJ3OJ.js → chunk-65H3LZJA.js} +1 -1
  30. package/dist/{chunk-PYD6H55X.js → chunk-6CZ7WGE2.js} +1 -1
  31. package/dist/{chunk-OPPBTECX.js → chunk-6NRRHHK5.js} +1 -1
  32. package/dist/{chunk-2PEMBCOR.js → chunk-6SVMZEJO.js} +1 -1
  33. package/dist/{chunk-C7D2P7VE.js → chunk-74DZVIJF.js} +1 -1
  34. package/dist/{chunk-OQPDE63R.js → chunk-A35F74KC.js} +1 -1
  35. package/dist/{chunk-LAOIEVSU.js → chunk-AK4NPOQG.js} +1 -1
  36. package/dist/{chunk-IAZMS3IK.js → chunk-ALKT4HX7.js} +1 -1
  37. package/dist/{chunk-XHFQ6LOF.js → chunk-AMLHR2HO.js} +1 -1
  38. package/dist/{chunk-U4ROOL5O.js → chunk-AROEKWUX.js} +1 -1
  39. package/dist/{chunk-LSZF6IW6.js → chunk-B3XKHB4G.js} +1 -1
  40. package/dist/{chunk-ZG4255HY.js → chunk-BKMZCB6M.js} +1 -1
  41. package/dist/{chunk-BJLBQAYG.js → chunk-BPRY3O4N.js} +1 -1
  42. package/dist/{chunk-DOAKDW2X.js → chunk-BQ2752RO.js} +1 -1
  43. package/dist/{chunk-KKR23IH2.js → chunk-CFXL555E.js} +1 -1
  44. package/dist/{chunk-7ZLFWJYO.js → chunk-CFZVZFVH.js} +1 -1
  45. package/dist/{chunk-VAMY76ON.js → chunk-CNOGRHAB.js} +1 -1
  46. package/dist/{chunk-6SK3JXPL.js → chunk-CT5MMCRM.js} +1 -1
  47. package/dist/{chunk-YQ4OHBET.js → chunk-DC3JYNAG.js} +1 -1
  48. package/dist/{chunk-EDZ3YWOD.js → chunk-E7Z7KYBR.js} +1 -1
  49. package/dist/{chunk-7UMDQ3ZG.js → chunk-EI6ZQXTF.js} +1 -1
  50. package/dist/{chunk-EXRSWJ5H.js → chunk-EIEHPIWJ.js} +1 -1
  51. package/dist/{chunk-SZY56H6W.js → chunk-EL5U7452.js} +1 -1
  52. package/dist/{chunk-BEN4UG4L.js → chunk-FDQNY7RF.js} +1 -1
  53. package/dist/{chunk-MQDJJICB.js → chunk-FFC42T6R.js} +1 -1
  54. package/dist/{chunk-GWNAVCHY.js → chunk-FOQ2RDEI.js} +1 -1
  55. package/dist/{chunk-B6G644TV.js → chunk-FS37ZPWQ.js} +1 -1
  56. package/dist/{chunk-2RJFPJ7A.js → chunk-FS4HIL62.js} +1 -1
  57. package/dist/{chunk-NDBM7LRH.js → chunk-FVQG4KLI.js} +1 -1
  58. package/dist/{chunk-MX4LFIME.js → chunk-FW732EHN.js} +1 -1
  59. package/dist/chunk-G3CPHVML.js +1 -0
  60. package/dist/{chunk-CTEETGYW.js → chunk-GAUJKBLY.js} +1 -1
  61. package/dist/{chunk-FDWA7JDW.js → chunk-GJGKVHUR.js} +1 -1
  62. package/dist/{chunk-TBU3OWTQ.js → chunk-GVHVEYNG.js} +1 -1
  63. package/dist/{chunk-S6U77A5P.js → chunk-GWUDVP3Q.js} +1 -1
  64. package/dist/{chunk-NAJQU2AY.js → chunk-H2Z3SST2.js} +1 -1
  65. package/dist/{chunk-YLK2AI7U.js → chunk-H3QSHKNT.js} +1 -1
  66. package/dist/{chunk-BJCRXR56.js → chunk-HFGB7XAM.js} +1 -1
  67. package/dist/{chunk-XD7NZHSK.js → chunk-HG5QVQ2T.js} +1 -1
  68. package/dist/{chunk-JK63EUM5.js → chunk-HJH672U6.js} +1 -1
  69. package/dist/{chunk-C7RESSLY.js → chunk-HPH7WWMW.js} +1 -1
  70. package/dist/{chunk-FIXLZ6WB.js → chunk-HS7TCC4I.js} +1 -1
  71. package/dist/{chunk-Z6XAKBEX.js → chunk-HXJ7HJFS.js} +1 -1
  72. package/dist/{chunk-U5EOE3DT.js → chunk-I7QJGHS6.js} +1 -1
  73. package/dist/{chunk-AQ6NXOX6.js → chunk-IDMJWVJC.js} +1 -1
  74. package/dist/{chunk-ELC7ATKB.js → chunk-IDRP7BXW.js} +1 -1
  75. package/dist/{chunk-NTE2CLJ6.js → chunk-IKP2EM5F.js} +1 -1
  76. package/dist/{chunk-TDSOYZI3.js → chunk-IP2ZMDG4.js} +1 -1
  77. package/dist/{chunk-X3BIUZFH.js → chunk-IPKYIHDV.js} +1 -1
  78. package/dist/{chunk-FSAECCAG.js → chunk-ISVXQQ4E.js} +1 -1
  79. package/dist/{chunk-HUZJXCY4.js → chunk-IV3S4JU6.js} +1 -1
  80. package/dist/{chunk-HDC7GGTP.js → chunk-IZCDEDIM.js} +1 -1
  81. package/dist/{chunk-GBTY5THR.js → chunk-J2JMKTPR.js} +1 -1
  82. package/dist/{chunk-CBEKGTMO.js → chunk-J5D222UG.js} +1 -1
  83. package/dist/{chunk-RLXN7RR4.js → chunk-JBIXZWT6.js} +1 -1
  84. package/dist/{chunk-PQAZNEQ4.js → chunk-JNAAHGJ6.js} +1 -1
  85. package/dist/{chunk-X3EISCDF.js → chunk-KHOW6SXW.js} +1 -1
  86. package/dist/{chunk-UHI4NMIL.js → chunk-KNLPWHHJ.js} +3 -3
  87. package/dist/{chunk-QCK3CBEG.js → chunk-L6C3DLKN.js} +1 -1
  88. package/dist/{chunk-B2WYFLOD.js → chunk-L6VQZJM4.js} +1 -1
  89. package/dist/{chunk-54NHTRQI.js → chunk-LANGOUPS.js} +1 -1
  90. package/dist/{chunk-PKBGOPEK.js → chunk-LX3NHWCT.js} +1 -1
  91. package/dist/{chunk-XQGRKXWZ.js → chunk-LZO2JTZS.js} +1 -1
  92. package/dist/{chunk-BSIAJUNS.js → chunk-M3FOYFPN.js} +1 -1
  93. package/dist/{chunk-5ZBT5PFX.js → chunk-MH6UDGGS.js} +1 -1
  94. package/dist/{chunk-C4BN2RVQ.js → chunk-MSDNBGRH.js} +1 -1
  95. package/dist/{chunk-SH3WYVVB.js → chunk-MTGARKCQ.js} +1 -1
  96. package/dist/{chunk-AYIXAB2S.js → chunk-MXATGPGZ.js} +1 -1
  97. package/dist/{chunk-O3BC33IK.js → chunk-N2UVYELM.js} +1 -1
  98. package/dist/{chunk-PHWCCRTF.js → chunk-N54QOQ2V.js} +1 -1
  99. package/dist/{chunk-3SANRXLX.js → chunk-NDVET7BL.js} +1 -1
  100. package/dist/{chunk-OJ4M2CJM.js → chunk-NIQWXTKA.js} +1 -1
  101. package/dist/{chunk-4Z3NOOAC.js → chunk-NUCUZBO3.js} +1 -1
  102. package/dist/{chunk-C5IUWPRN.js → chunk-O5FUKS5D.js} +1 -1
  103. package/dist/{chunk-OUPJTPTH.js → chunk-O6BUPYXH.js} +2 -2
  104. package/dist/{chunk-SEME74TB.js → chunk-O7HL63YP.js} +1 -1
  105. package/dist/{chunk-ZLMC33FE.js → chunk-OLQN2OBC.js} +1 -1
  106. package/dist/{chunk-BDOXVQSL.js → chunk-OM3YN7ZK.js} +1 -1
  107. package/dist/{chunk-YU2JTVM2.js → chunk-ONCEFPYP.js} +1 -1
  108. package/dist/{chunk-ZX36Y46Q.js → chunk-OPHCAOPB.js} +1 -1
  109. package/dist/{chunk-REQPTZOU.js → chunk-OQ6WYWG4.js} +3 -3
  110. package/dist/{chunk-SW4MYG6X.js → chunk-OYOTLGGD.js} +1 -1
  111. package/dist/{chunk-N6CEKL2T.js → chunk-P4LA3M5S.js} +1 -1
  112. package/dist/{chunk-AXJRLUTS.js → chunk-P5KLFBCI.js} +1 -1
  113. package/dist/{chunk-PEC3D242.js → chunk-PNCF5LNZ.js} +1 -1
  114. package/dist/{chunk-O5V6OEPI.js → chunk-PNYIQOOE.js} +1 -1
  115. package/dist/{chunk-RM3X5Z4U.js → chunk-POYWH3PD.js} +1 -1
  116. package/dist/{chunk-2ECP5WXO.js → chunk-PPHJ4F2Z.js} +1 -1
  117. package/dist/{chunk-YEFFCLHX.js → chunk-Q37I33P7.js} +1 -1
  118. package/dist/{chunk-JQSXYJQH.js → chunk-Q3DRVTVJ.js} +1 -1
  119. package/dist/{chunk-TIO5BQ5N.js → chunk-QAMPDFZB.js} +1 -1
  120. package/dist/{chunk-RFG3WS2K.js → chunk-R56CBH7G.js} +1 -1
  121. package/dist/{chunk-GZJCF3TC.js → chunk-ROBYXQMW.js} +1 -1
  122. package/dist/{chunk-HVZNEOXS.js → chunk-RUV5AE3N.js} +1 -1
  123. package/dist/chunk-RXO77IC5.js +1 -0
  124. package/dist/{chunk-TFR5G7OX.js → chunk-SACH2YSZ.js} +1 -1
  125. package/dist/{chunk-TA6MIE6F.js → chunk-SH5VEQ7F.js} +1 -1
  126. package/dist/{chunk-CEDQRZEQ.js → chunk-SNK55FY2.js} +1 -1
  127. package/dist/{chunk-67HZVVWI.js → chunk-SP7NSQ6G.js} +1 -1
  128. package/dist/{chunk-WNPRFDZX.js → chunk-SQVJGTTD.js} +2 -2
  129. package/dist/{chunk-BFPZJCA7.js → chunk-SUOXR2CE.js} +1 -1
  130. package/dist/{chunk-EIIBCSJT.js → chunk-SW3DP3GU.js} +1 -1
  131. package/dist/{chunk-EWO2KZV5.js → chunk-SXWAECCX.js} +1 -1
  132. package/dist/{chunk-LKTP7WTV.js → chunk-SY3LXLT2.js} +1 -1
  133. package/dist/{chunk-M3QGQP74.js → chunk-UA2432YR.js} +1 -1
  134. package/dist/{chunk-B7I4QETW.js → chunk-UMMEUYHM.js} +1 -1
  135. package/dist/{chunk-AD74MYJN.js → chunk-UZR7JB5B.js} +1 -1
  136. package/dist/{chunk-IGIYN3V4.js → chunk-V4CPWXJP.js} +1 -1
  137. package/dist/{chunk-K6G2EZGV.js → chunk-VBL7DLY7.js} +1 -1
  138. package/dist/{chunk-DNUTKXN2.js → chunk-VFU5YYTM.js} +1 -1
  139. package/dist/{chunk-FQA2F2XJ.js → chunk-VQ44LFBY.js} +1 -1
  140. package/dist/{chunk-VJIB5EKO.js → chunk-VSPM4VES.js} +1 -1
  141. package/dist/{chunk-B57QEQBY.js → chunk-VURVVLVE.js} +1 -1
  142. package/dist/{chunk-P4QZ7WOH.js → chunk-W2RZY64W.js} +1 -1
  143. package/dist/{chunk-HEP7LOAV.js → chunk-W6BBFBOM.js} +1 -1
  144. package/dist/{chunk-I7BYVLDU.js → chunk-W6KRZTDH.js} +1 -1
  145. package/dist/{chunk-4ZQTYDNB.js → chunk-WFCP2AG5.js} +1 -1
  146. package/dist/{chunk-P427M44L.js → chunk-WKJNCJUV.js} +1 -1
  147. package/dist/chunk-WMKVFUMY.js +1 -0
  148. package/dist/{chunk-F4GFFJEQ.js → chunk-WYT437LJ.js} +1 -1
  149. package/dist/{chunk-HDE4C5VI.js → chunk-X2NVFYY6.js} +1 -1
  150. package/dist/chunk-X2ZCC772.js +1 -0
  151. package/dist/{chunk-UBZ7LRWO.js → chunk-X4JRQETX.js} +1 -1
  152. package/dist/{chunk-XC2X34PK.js → chunk-X5GZF33W.js} +1 -1
  153. package/dist/{chunk-7D6UVALL.js → chunk-XBFXB6S6.js} +1 -1
  154. package/dist/{chunk-ZCMXP6ZW.js → chunk-XEHMXJ5J.js} +1 -1
  155. package/dist/{chunk-CUWFMJYZ.js → chunk-XGJH3HBA.js} +1 -1
  156. package/dist/{chunk-LMLBN3DB.js → chunk-XKMLKEYX.js} +1 -1
  157. package/dist/{chunk-6NJ7C5DF.js → chunk-XYV4QXQT.js} +1 -1
  158. package/dist/{chunk-ITL4KB5G.js → chunk-YKAMTVJM.js} +1 -1
  159. package/dist/{chunk-ZZN4WRWZ.js → chunk-YZQYDTO7.js} +1 -1
  160. package/dist/{chunk-YLSBNV6G.js → chunk-ZDKGQCIZ.js} +1 -1
  161. package/dist/{chunk-GPF56HPM.js → chunk-ZKIIMXKC.js} +1 -1
  162. package/dist/{chunk-RELON3IF.js → chunk-ZKNONN2F.js} +1 -1
  163. package/dist/{chunk-ZHVFR23B.js → chunk-ZZ5M5IMF.js} +1 -1
  164. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  165. package/dist/cli/commands/app/build.js +1 -1
  166. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  167. package/dist/cli/commands/app/bulk/execute.js +1 -1
  168. package/dist/cli/commands/app/bulk/status.js +1 -1
  169. package/dist/cli/commands/app/config/link.js +1 -1
  170. package/dist/cli/commands/app/config/pull.js +1 -1
  171. package/dist/cli/commands/app/config/use.js +1 -1
  172. package/dist/cli/commands/app/config/validate.js +1 -1
  173. package/dist/cli/commands/app/demo/watcher.js +1 -1
  174. package/dist/cli/commands/app/deploy.js +1 -1
  175. package/dist/cli/commands/app/dev/clean.js +1 -1
  176. package/dist/cli/commands/app/dev.js +1 -1
  177. package/dist/cli/commands/app/env/pull.js +1 -1
  178. package/dist/cli/commands/app/env/show.js +1 -1
  179. package/dist/cli/commands/app/execute.js +1 -1
  180. package/dist/cli/commands/app/function/build.js +1 -1
  181. package/dist/cli/commands/app/function/info.js +1 -1
  182. package/dist/cli/commands/app/function/replay.js +1 -1
  183. package/dist/cli/commands/app/function/run.js +1 -1
  184. package/dist/cli/commands/app/function/schema.js +1 -1
  185. package/dist/cli/commands/app/function/typegen.js +1 -1
  186. package/dist/cli/commands/app/generate/extension.js +1 -1
  187. package/dist/cli/commands/app/graphiql.js +1 -1
  188. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  189. package/dist/cli/commands/app/import-extensions.js +1 -1
  190. package/dist/cli/commands/app/info.js +1 -1
  191. package/dist/cli/commands/app/init.js +1 -1
  192. package/dist/cli/commands/app/logs.js +1 -1
  193. package/dist/cli/commands/app/release.js +1 -1
  194. package/dist/cli/commands/app/versions/list.js +1 -1
  195. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  196. package/dist/cli/commands/auth/login.js +1 -1
  197. package/dist/cli/commands/auth/logout.js +1 -1
  198. package/dist/cli/commands/cache/clear.js +1 -1
  199. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  200. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  201. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  202. package/dist/cli/commands/debug/command-flags.js +1 -1
  203. package/dist/cli/commands/doc/fetch.js +1 -1
  204. package/dist/cli/commands/doc/search.js +1 -1
  205. package/dist/cli/commands/docs/generate.js +1 -1
  206. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  207. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  208. package/dist/cli/commands/help.js +1 -1
  209. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  210. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  211. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  212. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  213. package/dist/cli/commands/notifications/generate.js +1 -1
  214. package/dist/cli/commands/notifications/list.js +1 -1
  215. package/dist/cli/commands/organization/list.js +1 -1
  216. package/dist/cli/commands/search.js +1 -1
  217. package/dist/cli/commands/skill/install.js +1 -1
  218. package/dist/cli/commands/theme/check.js +1 -1
  219. package/dist/cli/commands/theme/console.js +1 -1
  220. package/dist/cli/commands/theme/delete.js +1 -1
  221. package/dist/cli/commands/theme/dev.js +1 -1
  222. package/dist/cli/commands/theme/duplicate.js +1 -1
  223. package/dist/cli/commands/theme/info.js +1 -1
  224. package/dist/cli/commands/theme/init.js +1 -1
  225. package/dist/cli/commands/theme/language-server.js +1 -1
  226. package/dist/cli/commands/theme/list.js +1 -1
  227. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  228. package/dist/cli/commands/theme/open.js +1 -1
  229. package/dist/cli/commands/theme/package.js +1 -1
  230. package/dist/cli/commands/theme/preview.js +1 -1
  231. package/dist/cli/commands/theme/profile.js +1 -1
  232. package/dist/cli/commands/theme/publish.js +1 -1
  233. package/dist/cli/commands/theme/pull.js +1 -1
  234. package/dist/cli/commands/theme/push.js +1 -1
  235. package/dist/cli/commands/theme/rename.js +1 -1
  236. package/dist/cli/commands/theme/share.js +1 -1
  237. package/dist/cli/commands/upgrade.js +1 -1
  238. package/dist/cli/commands/validate/components.js +1 -1
  239. package/dist/cli/commands/validate/functions.js +1 -1
  240. package/dist/cli/commands/validate/graphql.js +1 -1
  241. package/dist/cli/commands/validate/theme.js +1 -1
  242. package/dist/cli/commands/version.js +1 -1
  243. package/dist/command-registry.js +1 -1
  244. package/dist/conf-store-OHJSRXSL.js +1 -0
  245. package/dist/{deprecations-K6GECE76.js → deprecations-SA4HEVBI.js} +1 -1
  246. package/dist/{dist-ZTEUCMI5.js → dist-MIUGJGUW.js} +1 -1
  247. package/dist/dist-XVWDWM2Y.js +1 -0
  248. package/dist/{environments-ZDUNX7L4.js → environments-LDSGQHXC.js} +1 -1
  249. package/dist/{error-GGW3G47B.js → error-YY774ESQ.js} +1 -1
  250. package/dist/{error-handler-JTALOJ5N.js → error-handler-QHCOZUC7.js} +1 -1
  251. package/dist/{fs-JBSOQ2AU.js → fs-EIM4AORY.js} +1 -1
  252. package/dist/hooks/app-init.js +1 -1
  253. package/dist/hooks/did-you-mean.js +1 -1
  254. package/dist/hooks/hydrogen-init.js +1 -1
  255. package/dist/hooks/postrun.js +1 -1
  256. package/dist/hooks/prerun.js +1 -1
  257. package/dist/hooks/public-metadata.js +1 -1
  258. package/dist/hooks/sensitive-metadata.js +1 -1
  259. package/dist/hooks/tunnel-provider.js +1 -1
  260. package/dist/hooks/tunnel-start.js +1 -1
  261. package/dist/index.js +1 -1
  262. package/dist/{is-global-L7OWSCP5.js → is-global-USYUXR55.js} +1 -1
  263. package/dist/{local-OOLA5THA.js → local-INRMOHAI.js} +1 -1
  264. package/dist/{local-storage-VXGHOQKX.js → local-storage-7THURD3W.js} +1 -1
  265. package/dist/{metadata-V4D6FTBS.js → metadata-WJ637XA2.js} +1 -1
  266. package/dist/{node-package-manager-EDPK5PL6.js → node-package-manager-4X2YQGFC.js} +1 -1
  267. package/dist/{notifications-system-MBSJKSNZ.js → notifications-system-ZSZWUJIZ.js} +1 -1
  268. package/dist/{output-QVUM5IYS.js → output-CLCX5WU7.js} +1 -1
  269. package/dist/skills-OXV2TD42.js +1 -0
  270. package/dist/{system-B76AUER2.js → system-J4OPHQAQ.js} +1 -1
  271. package/dist/tsconfig.tsbuildinfo +1 -1
  272. package/dist/{ui-ENHCMZJZ.js → ui-ZC5QZT4J.js} +1 -1
  273. package/dist/upgrade-VSILBOCY.js +1 -0
  274. package/dist/{version-VXADDZFR.js → version-EYLYG4JK.js} +1 -1
  275. package/dist/version-FEVNX3F6.js +1 -0
  276. package/dist/{workerd-4O3TCHAO.js → workerd-VC3MCYDV.js} +1 -1
  277. package/oclif.manifest.json +1 -1
  278. package/package.json +7 -9
  279. package/bin/postinstall.js +0 -14
  280. package/dist/analytics-Q4RKFOXN.js +0 -1
  281. package/dist/chunk-24YSAAPP.js +0 -1
  282. package/dist/chunk-2POI27PW.js +0 -1
  283. package/dist/chunk-AGWNS3XW.js +0 -1
  284. package/dist/chunk-EB2SLRLG.js +0 -1
  285. package/dist/conf-store-WHIZYNW7.js +0 -1
  286. package/dist/dist-CNXOMJ4W.js +0 -1
  287. package/dist/upgrade-NCYY4Q7D.js +0 -1
  288. package/dist/version-E6Y3YQZ3.js +0 -1
@@ -1 +1 @@
1
- import{ta as a,ua as b,va as c,wa as d,xa as e,ya as f}from"./chunk-REQPTZOU.js";import"./chunk-ZDF5N422.js";import"./chunk-TA6MIE6F.js";import"./chunk-WNPRFDZX.js";import"./chunk-EJDWYASP.js";import"./chunk-MVPRNGNO.js";import"./chunk-GB3YC4TI.js";import"./chunk-MPW2YJWU.js";import"./chunk-AGWNS3XW.js";import"./chunk-PQAZNEQ4.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-M3QGQP74.js";import"./chunk-4ZQTYDNB.js";import"./chunk-P5GRGEW4.js";import"./chunk-AQ6NXOX6.js";import"./chunk-OUPJTPTH.js";import"./chunk-UHI4NMIL.js";import"./chunk-A4SBXDZB.js";import"./chunk-BOAGJ6P5.js";import"./chunk-LD6ZCTZ3.js";import"./chunk-JJZNUFPD.js";import"./chunk-EDZ3YWOD.js";import"./chunk-T7KHS6RF.js";import"./chunk-UKQ7NE5V.js";import"./chunk-773TIA5M.js";import"./chunk-M5GXA5W4.js";import"./chunk-636CTEW7.js";import"./chunk-TR4OWSEX.js";import"./chunk-2KD4LHRT.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{f as compileData,c as recordError,e as recordEvent,d as recordRetry,b as recordTiming,a as reportAnalyticsEvent};
1
+ import{ta as a,ua as b,va as c,wa as d,xa as e,ya as f}from"./chunk-OQ6WYWG4.js";import"./chunk-ZDF5N422.js";import"./chunk-SH5VEQ7F.js";import"./chunk-SQVJGTTD.js";import"./chunk-EJDWYASP.js";import"./chunk-MVPRNGNO.js";import"./chunk-GB3YC4TI.js";import"./chunk-MPW2YJWU.js";import"./chunk-WMKVFUMY.js";import"./chunk-JNAAHGJ6.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-UA2432YR.js";import"./chunk-WFCP2AG5.js";import"./chunk-4NSHAMD3.js";import"./chunk-IDMJWVJC.js";import"./chunk-O6BUPYXH.js";import"./chunk-KNLPWHHJ.js";import"./chunk-A4SBXDZB.js";import"./chunk-BOAGJ6P5.js";import"./chunk-LD6ZCTZ3.js";import"./chunk-JJZNUFPD.js";import"./chunk-E7Z7KYBR.js";import"./chunk-T7KHS6RF.js";import"./chunk-UKQ7NE5V.js";import"./chunk-773TIA5M.js";import"./chunk-M5GXA5W4.js";import"./chunk-636CTEW7.js";import"./chunk-TR4OWSEX.js";import"./chunk-2KD4LHRT.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{f as compileData,c as recordError,e as recordEvent,d as recordRetry,b as recordTiming,a as reportAnalyticsEvent};
@@ -0,0 +1 @@
1
+ import{qa as a,ra as b,sa as c}from"./chunk-OQ6WYWG4.js";import"./chunk-ZDF5N422.js";import"./chunk-SH5VEQ7F.js";import"./chunk-SQVJGTTD.js";import"./chunk-EJDWYASP.js";import"./chunk-MVPRNGNO.js";import"./chunk-GB3YC4TI.js";import"./chunk-MPW2YJWU.js";import"./chunk-WMKVFUMY.js";import"./chunk-JNAAHGJ6.js";import"./chunk-RJ5VF3QY.js";import"./chunk-7UNQOKZW.js";import"./chunk-UA2432YR.js";import"./chunk-WFCP2AG5.js";import"./chunk-4NSHAMD3.js";import"./chunk-IDMJWVJC.js";import"./chunk-O6BUPYXH.js";import"./chunk-KNLPWHHJ.js";import"./chunk-A4SBXDZB.js";import"./chunk-BOAGJ6P5.js";import"./chunk-LD6ZCTZ3.js";import"./chunk-JJZNUFPD.js";import"./chunk-E7Z7KYBR.js";import"./chunk-T7KHS6RF.js";import"./chunk-UKQ7NE5V.js";import"./chunk-773TIA5M.js";import"./chunk-M5GXA5W4.js";import"./chunk-636CTEW7.js";import"./chunk-TR4OWSEX.js";import"./chunk-2KD4LHRT.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-CRALWNNO.js";import"./chunk-VKWPEFWQ.js";export{b as getEnvironmentData,c as getSensitiveEnvironmentData,a as startAnalytics};
package/dist/bootstrap.js CHANGED
@@ -1,3 +1,3 @@
1
- import{a as p}from"./chunk-6QDOCBD4.js";import{a as e}from"./chunk-BJLBQAYG.js";import{a as s}from"./chunk-OPPBTECX.js";import"./chunk-T7KHS6RF.js";import"./chunk-UKQ7NE5V.js";import"./chunk-773TIA5M.js";import"./chunk-M5GXA5W4.js";import"./chunk-TR4OWSEX.js";import"./chunk-2KD4LHRT.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-CRALWNNO.js";import{e as m,g as t}from"./chunk-VKWPEFWQ.js";t();var r=m(p(),1);import n from"fs";(0,r.createGlobalProxyAgent)({environmentVariableNamespace:"SHOPIFY_",forceGlobalAgent:!0,socketConnectionTimeout:6e4});process.on("uncaughtException",async o=>{try{let{FatalError:c}=await import("./error-GGW3G47B.js");if(o instanceof c){let{renderFatalError:i}=await import("./ui-ENHCMZJZ.js");i(o)}else n.writeSync(process.stderr.fd,`${o.stack??o.message??o}
1
+ import{a as p}from"./chunk-6QDOCBD4.js";import{a as e}from"./chunk-BPRY3O4N.js";import{a as s}from"./chunk-6NRRHHK5.js";import"./chunk-T7KHS6RF.js";import"./chunk-UKQ7NE5V.js";import"./chunk-773TIA5M.js";import"./chunk-M5GXA5W4.js";import"./chunk-TR4OWSEX.js";import"./chunk-2KD4LHRT.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-CRALWNNO.js";import{e as m,g as t}from"./chunk-VKWPEFWQ.js";t();var r=m(p(),1);import n from"fs";(0,r.createGlobalProxyAgent)({environmentVariableNamespace:"SHOPIFY_",forceGlobalAgent:!0,socketConnectionTimeout:6e4});process.on("uncaughtException",async o=>{try{let{FatalError:c}=await import("./error-YY774ESQ.js");if(o instanceof c){let{renderFatalError:i}=await import("./ui-ZC5QZT4J.js");i(o)}else n.writeSync(process.stderr.fd,`${o.stack??o.message??o}
2
2
  `)}catch{n.writeSync(process.stderr.fd,`${o.stack??o.message??o}
3
3
  `)}process.exit(1)});var f=["SIGINT","SIGTERM","SIGQUIT"];f.forEach(o=>{process.on(o,()=>{process.exit(1)})});var a=Number(process.env.SHOPIFY_CLI_COLUMNS);isNaN(a)||(process.stdout.columns=a);async function l({development:o}){await e({moduleURL:import.meta.url,development:o,lazyCommandLoader:s})}var S=l;export{S as default};
@@ -1,2 +1,2 @@
1
- import{W as X,ca as z,da as j,ea as v,fa as J,ga as A,ha as W,ia as k,ja as q,ka as N,la as B,ma as L,na as K,oa as R,pa as Q}from"./chunk-54NHTRQI.js";import{f as T,i as G,p as l}from"./chunk-BEN4UG4L.js";import{c as H}from"./chunk-67MWN74X.js";import{v as U,z as x}from"./chunk-WNPRFDZX.js";import{m as C,o as P}from"./chunk-OUPJTPTH.js";import{Hb as $,Ta as V,X as c,_ as b,qa as F,wa as I,ya as D}from"./chunk-UHI4NMIL.js";import{d as E,j as M}from"./chunk-773TIA5M.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();s();function Y(e){switch(e){case d.Offsite:return v;case d.CreditCard:return L;case d.CustomCreditCard:return N;case d.CustomOnsite:return k;case d.Redeemable:return A;case d.CardPresent:return R}}var d;(function(e){e.Offsite="payments_app",e.CreditCard="payments_app_credit_card",e.CustomCreditCard="payments_app_custom_credit_card",e.CustomOnsite="payments_app_custom_onsite",e.Redeemable="payments_app_redeemable",e.CardPresent="payments_app_card_present"})(d||(d={}));function Z(e,t){let i=e.activeVersion?.context??e.draftVersion?.context??Y(e.type);switch(i){case v:return w(e,t,J);case L:return w(e,t,K);case N:return w(e,t,B);case k:return w(e,t,q);case A:return w(e,t,W);case R:return w(e,t,Q);default:throw new Error(`Unsupported extension: ${i}`)}}function w(e,t,i){let n=(e.activeVersion??e.draftVersion)?.config;if(!n)throw new Error("No config found for extension");let r=JSON.parse(n),p=i(r,t);p&&delete p.api_version;let a=e.activeVersion?.context??e.draftVersion?.context??Y(e.type);return{api_version:r.api_version,extensions:[{name:e.title,type:"payments_extension",handle:c(e.title.substring(0,l)),...p,targeting:[{target:`${a}`}]}]}}s();s();var pe=new Map(j.map(e=>[e[1],e[0]])),fe=(e,t)=>{let i=pe.get(e.uiType);if(!i)throw new C(`Field type ${e.uiType} is not supported`);let o={key:e.name,description:e.description??void 0,type:i};return t==="flow_action_definition"&&(o.name=e.label,o.required=e.required),o},ue=(e,t)=>{let n={type:t==="flow_action_definition"?`${e.name.replace("_id","")}_reference`:`${e.uiType}_reference`};return t==="flow_action_definition"&&(n.required=e.required),e.uiType==="marketing-activity-id"&&(n.marketingActivityCreateUrl=e.marketingActivityCreateUrl,n.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),n},ee=(e,t)=>t?t.map(o=>o.uiType==="commerce-object-id"||o.uiType==="marketing-activity-id"||z.includes(o.uiType)?ue(o,e):fe(o,e)):[];function te(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=e.type==="flow_action_definition"?"https://url.com/api/execute":void 0,o;if(e.type==="flow_trigger_discovery_webhook"){let n=JSON.parse(t);o={extensions:[{type:"flow_trigger_lifecycle_callback",name:e.title,handle:c(e.title.substring(0,l)),url:n.url}]}}else{let n=JSON.parse(t),r=ee(e.type,n.fields??[]);o={extensions:[{type:e.type.replace("_definition",""),name:n.title,handle:c(e.title.substring(0,l)),description:n.description,runtime_url:n.url??i,config_page_url:n.custom_configuration_page_url,config_page_preview_url:n.custom_configuration_page_preview_url,validation_url:n.validation_url}],settings:(r?.length??0)>0?{fields:r}:void 0}}return o}s();s();var ie=e=>{let t=e.split("#");if(t.length!==2||t.some(p=>p===""||p===void 0))throw new Error("Invalid context");let i="admin",o=de(t[0]??""),n=me(t[1]??""),r="link";return n==="selection"?[i,`${o}-index`,`${n}-action`,r].join("."):[i,`${o}-${n}`,"action",r].join(".")},me=e=>{switch(e.toLocaleLowerCase()){case"show":return"details";case"index":return"index";case"action":return"selection";case"fulfilled_card":return"fulfilled-card";default:throw new Error(`Invalid context location: ${e}`)}},de=e=>e.toLocaleLowerCase()==="variants"?"product-variant":b(e.toLocaleLowerCase().replace(new RegExp("(s)$"),""));function ne(e,t,i){let o=e.activeVersion?.config??e.draftVersion?.config;if(!o)throw new Error("No config found for extension");let n=e.activeVersion?.context??e.draftVersion?.context;if(!n)throw new Error("No context found for link extension");let r=JSON.parse(o);if(i.embedded)try{let a=new URL(r.url),_=a.pathname.startsWith("/")?a.pathname.substring(1):a.pathname,u=new URL(`app://${_}`);u.search=a.search,u.hash=a.hash,r.url=u.toString()}catch{}return{extensions:[{type:"admin_link",name:r.text,handle:c(e.title.substring(0,l)),targeting:[{url:r.url,target:ie(n)}]}]}}s();var ge={facebook:"social",instagram:"social",google:"search",pinterest:"social",bing:"search",email:"email",snapchat:"social",sms:"sms",verizon_media:"display",ebay:"marketplace",tiktok:"social",flow:"email"},_e={facebook:"facebook.com",instagram:"instagram.com",google:"google.com",pinterest:"pinterest.com",bing:"bing.com",snapchat:"snapchat.com",verizon_media:null,email:null,sms:null,ebay:"ebay.com",tiktok:"tiktok.com",flow:null};function ye(e){let t=new URL(e);return t.pathname+t.search+t.hash}function oe(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"marketing_activity",name:e.title,handle:c(e.title.substring(0,l)),title:i.title,description:i.description,api_path:ye(i.app_api_url),tactic:i.tactic,marketing_channel:ge[i.platform]??"",referring_domain:_e[i.platform]??"",is_automation:i.is_automation,use_external_editor:i.use_external_editor,preview_data:i.preview_data,fields:i.fields.map(({id:n,...r})=>r)}]}}s();function re(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"subscription_link_extension",name:e.title,handle:c(e.title.substring(0,l)),pattern:i.pattern}]}}var O=[{label:"Payments Extensions",value:"payments",extensionTypes:["payments_app","payments_app_credit_card","payments_app_custom_credit_card","payments_app_custom_onsite","payments_app_redeemable","payments_extension"],buildExtensionConfig:Z},{label:"Flow Extensions",value:"flow",extensionTypes:["flow_action_definition","flow_trigger_definition","flow_trigger_discovery_webhook"],buildExtensionConfig:te},{label:"Marketing Activity Extensions",value:"marketing activity",extensionTypes:["marketing_activity_extension"],buildExtensionConfig:oe},{label:"Subscription Link Extensions",value:"subscription link",extensionTypes:["subscription_link","subscription_link_extension"],buildExtensionConfig:re},{label:"Admin Link extensions",value:"link extension",extensionTypes:["app_link","bulk_action"],buildExtensionConfig:ne}];function se(e){return O.filter(t=>t.extensionTypes.some(i=>e.some(o=>o.type.toLowerCase()===i.toLowerCase())))}async function ft(e){if(e.length===1&&e[0])return e[0];let t=e.map(n=>({label:n.label,value:n.value})),i=await x({message:"Extension type to migrate",choices:t}),o=e.find(n=>n.value===i);if(o===void 0)throw new C("Invalid migration choice");return o}s();var vt=O.flatMap(e=>e.extensionTypes),g;(function(e){e.Write="write",e.Skip="skip",e.Cancel="cancel"})(g||(g={}));async function Ee({name:e,app:t}){let i=b(e),o=E(t.directory,G.extensions.directoryName,i);if(await V(o)){let n=[{label:"Overwrite local TOML with remote configuration",value:g.Write},{label:"Keep local TOML",value:g.Skip},{label:"Cancel",value:g.Cancel}],r=await x({message:`Directory "${i}" already exists. What would you like to do?`,choices:n});if(r===g.Cancel)throw new P;return{directory:o,action:r}}return await I(o),await F(E(o,T.lockFile)),{directory:o,action:g.Write}}async function Ce(e){let{app:t,remoteApp:i,extensionTypes:o,extensions:n,buildExtensionConfig:r,all:p}=e,a=n.filter(f=>o.includes(f.type.toLowerCase()));if(a=we(t,a),a.length===0)throw new C("No extensions to migrate");if(!p){let f=a.map(y=>({label:y.title,value:y.uuid}));a.length>1&&f.push({label:"All",value:"All"});let m=await x({message:"Extensions to migrate",choices:f});m!=="All"&&(a=[a.find(y=>y?.uuid===m)])}let _={},u=a.map(async f=>{let{directory:m,action:y}=await Ee({app:t,name:f.title}),ae=c(f.title.substring(0,l));if(_[ae]=f.uuid,y===g.Write){let S=r(f,n,t.configuration),ce=E(m,"shopify.extension.toml");await new H(ce,S).replace(S);let le=E(m,T.lockFile);await D(le)}return{extension:f,directory:E("extensions",M(m))}}),h=await Promise.all(u);xe(h),await X({app:t,appApiKey:i.apiKey,extensionUuids:_,command:"import-extensions"})}function we(e,t){let i=e.dotenv?.variables??{},o=e.allExtensions.map(n=>i[n.idEnvironmentVariableName]);return t.filter(n=>!o.includes(n.uuid))}async function At(e){let t=se(e.extensions);await Promise.all(t.map(async i=>Ce({...e,extensionTypes:i.extensionTypes,buildExtensionConfig:i.buildExtensionConfig,all:!0})))}function xe(e){U({headline:["Imported the following extensions from the dashboard:"],body:e.map(t=>$`• "${t.extension.title}" at: ${t.directory}`.value).join(`
1
+ import{W as X,ca as z,da as j,ea as v,fa as J,ga as A,ha as W,ia as k,ja as q,ka as N,la as B,ma as L,na as K,oa as R,pa as Q}from"./chunk-LANGOUPS.js";import{f as T,i as G,p as l}from"./chunk-FDQNY7RF.js";import{c as H}from"./chunk-5EDRU7YU.js";import{v as U,z as x}from"./chunk-SQVJGTTD.js";import{m as C,o as P}from"./chunk-O6BUPYXH.js";import{Hb as $,Ta as V,X as c,_ as b,qa as F,wa as I,ya as D}from"./chunk-KNLPWHHJ.js";import{d as E,j as M}from"./chunk-773TIA5M.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();s();function Y(e){switch(e){case d.Offsite:return v;case d.CreditCard:return L;case d.CustomCreditCard:return N;case d.CustomOnsite:return k;case d.Redeemable:return A;case d.CardPresent:return R}}var d;(function(e){e.Offsite="payments_app",e.CreditCard="payments_app_credit_card",e.CustomCreditCard="payments_app_custom_credit_card",e.CustomOnsite="payments_app_custom_onsite",e.Redeemable="payments_app_redeemable",e.CardPresent="payments_app_card_present"})(d||(d={}));function Z(e,t){let i=e.activeVersion?.context??e.draftVersion?.context??Y(e.type);switch(i){case v:return w(e,t,J);case L:return w(e,t,K);case N:return w(e,t,B);case k:return w(e,t,q);case A:return w(e,t,W);case R:return w(e,t,Q);default:throw new Error(`Unsupported extension: ${i}`)}}function w(e,t,i){let n=(e.activeVersion??e.draftVersion)?.config;if(!n)throw new Error("No config found for extension");let r=JSON.parse(n),p=i(r,t);p&&delete p.api_version;let a=e.activeVersion?.context??e.draftVersion?.context??Y(e.type);return{api_version:r.api_version,extensions:[{name:e.title,type:"payments_extension",handle:c(e.title.substring(0,l)),...p,targeting:[{target:`${a}`}]}]}}s();s();var pe=new Map(j.map(e=>[e[1],e[0]])),fe=(e,t)=>{let i=pe.get(e.uiType);if(!i)throw new C(`Field type ${e.uiType} is not supported`);let o={key:e.name,description:e.description??void 0,type:i};return t==="flow_action_definition"&&(o.name=e.label,o.required=e.required),o},ue=(e,t)=>{let n={type:t==="flow_action_definition"?`${e.name.replace("_id","")}_reference`:`${e.uiType}_reference`};return t==="flow_action_definition"&&(n.required=e.required),e.uiType==="marketing-activity-id"&&(n.marketingActivityCreateUrl=e.marketingActivityCreateUrl,n.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),n},ee=(e,t)=>t?t.map(o=>o.uiType==="commerce-object-id"||o.uiType==="marketing-activity-id"||z.includes(o.uiType)?ue(o,e):fe(o,e)):[];function te(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=e.type==="flow_action_definition"?"https://url.com/api/execute":void 0,o;if(e.type==="flow_trigger_discovery_webhook"){let n=JSON.parse(t);o={extensions:[{type:"flow_trigger_lifecycle_callback",name:e.title,handle:c(e.title.substring(0,l)),url:n.url}]}}else{let n=JSON.parse(t),r=ee(e.type,n.fields??[]);o={extensions:[{type:e.type.replace("_definition",""),name:n.title,handle:c(e.title.substring(0,l)),description:n.description,runtime_url:n.url??i,config_page_url:n.custom_configuration_page_url,config_page_preview_url:n.custom_configuration_page_preview_url,validation_url:n.validation_url}],settings:(r?.length??0)>0?{fields:r}:void 0}}return o}s();s();var ie=e=>{let t=e.split("#");if(t.length!==2||t.some(p=>p===""||p===void 0))throw new Error("Invalid context");let i="admin",o=de(t[0]??""),n=me(t[1]??""),r="link";return n==="selection"?[i,`${o}-index`,`${n}-action`,r].join("."):[i,`${o}-${n}`,"action",r].join(".")},me=e=>{switch(e.toLocaleLowerCase()){case"show":return"details";case"index":return"index";case"action":return"selection";case"fulfilled_card":return"fulfilled-card";default:throw new Error(`Invalid context location: ${e}`)}},de=e=>e.toLocaleLowerCase()==="variants"?"product-variant":b(e.toLocaleLowerCase().replace(new RegExp("(s)$"),""));function ne(e,t,i){let o=e.activeVersion?.config??e.draftVersion?.config;if(!o)throw new Error("No config found for extension");let n=e.activeVersion?.context??e.draftVersion?.context;if(!n)throw new Error("No context found for link extension");let r=JSON.parse(o);if(i.embedded)try{let a=new URL(r.url),_=a.pathname.startsWith("/")?a.pathname.substring(1):a.pathname,u=new URL(`app://${_}`);u.search=a.search,u.hash=a.hash,r.url=u.toString()}catch{}return{extensions:[{type:"admin_link",name:r.text,handle:c(e.title.substring(0,l)),targeting:[{url:r.url,target:ie(n)}]}]}}s();var ge={facebook:"social",instagram:"social",google:"search",pinterest:"social",bing:"search",email:"email",snapchat:"social",sms:"sms",verizon_media:"display",ebay:"marketplace",tiktok:"social",flow:"email"},_e={facebook:"facebook.com",instagram:"instagram.com",google:"google.com",pinterest:"pinterest.com",bing:"bing.com",snapchat:"snapchat.com",verizon_media:null,email:null,sms:null,ebay:"ebay.com",tiktok:"tiktok.com",flow:null};function ye(e){let t=new URL(e);return t.pathname+t.search+t.hash}function oe(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"marketing_activity",name:e.title,handle:c(e.title.substring(0,l)),title:i.title,description:i.description,api_path:ye(i.app_api_url),tactic:i.tactic,marketing_channel:ge[i.platform]??"",referring_domain:_e[i.platform]??"",is_automation:i.is_automation,use_external_editor:i.use_external_editor,preview_data:i.preview_data,fields:i.fields.map(({id:n,...r})=>r)}]}}s();function re(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"subscription_link_extension",name:e.title,handle:c(e.title.substring(0,l)),pattern:i.pattern}]}}var O=[{label:"Payments Extensions",value:"payments",extensionTypes:["payments_app","payments_app_credit_card","payments_app_custom_credit_card","payments_app_custom_onsite","payments_app_redeemable","payments_extension"],buildExtensionConfig:Z},{label:"Flow Extensions",value:"flow",extensionTypes:["flow_action_definition","flow_trigger_definition","flow_trigger_discovery_webhook"],buildExtensionConfig:te},{label:"Marketing Activity Extensions",value:"marketing activity",extensionTypes:["marketing_activity_extension"],buildExtensionConfig:oe},{label:"Subscription Link Extensions",value:"subscription link",extensionTypes:["subscription_link","subscription_link_extension"],buildExtensionConfig:re},{label:"Admin Link extensions",value:"link extension",extensionTypes:["app_link","bulk_action"],buildExtensionConfig:ne}];function se(e){return O.filter(t=>t.extensionTypes.some(i=>e.some(o=>o.type.toLowerCase()===i.toLowerCase())))}async function ft(e){if(e.length===1&&e[0])return e[0];let t=e.map(n=>({label:n.label,value:n.value})),i=await x({message:"Extension type to migrate",choices:t}),o=e.find(n=>n.value===i);if(o===void 0)throw new C("Invalid migration choice");return o}s();var vt=O.flatMap(e=>e.extensionTypes),g;(function(e){e.Write="write",e.Skip="skip",e.Cancel="cancel"})(g||(g={}));async function Ee({name:e,app:t}){let i=b(e),o=E(t.directory,G.extensions.directoryName,i);if(await V(o)){let n=[{label:"Overwrite local TOML with remote configuration",value:g.Write},{label:"Keep local TOML",value:g.Skip},{label:"Cancel",value:g.Cancel}],r=await x({message:`Directory "${i}" already exists. What would you like to do?`,choices:n});if(r===g.Cancel)throw new P;return{directory:o,action:r}}return await I(o),await F(E(o,T.lockFile)),{directory:o,action:g.Write}}async function Ce(e){let{app:t,remoteApp:i,extensionTypes:o,extensions:n,buildExtensionConfig:r,all:p}=e,a=n.filter(f=>o.includes(f.type.toLowerCase()));if(a=we(t,a),a.length===0)throw new C("No extensions to migrate");if(!p){let f=a.map(y=>({label:y.title,value:y.uuid}));a.length>1&&f.push({label:"All",value:"All"});let m=await x({message:"Extensions to migrate",choices:f});m!=="All"&&(a=[a.find(y=>y?.uuid===m)])}let _={},u=a.map(async f=>{let{directory:m,action:y}=await Ee({app:t,name:f.title}),ae=c(f.title.substring(0,l));if(_[ae]=f.uuid,y===g.Write){let S=r(f,n,t.configuration),ce=E(m,"shopify.extension.toml");await new H(ce,S).replace(S);let le=E(m,T.lockFile);await D(le)}return{extension:f,directory:E("extensions",M(m))}}),h=await Promise.all(u);xe(h),await X({app:t,appApiKey:i.apiKey,extensionUuids:_,command:"import-extensions"})}function we(e,t){let i=e.dotenv?.variables??{},o=e.allExtensions.map(n=>i[n.idEnvironmentVariableName]);return t.filter(n=>!o.includes(n.uuid))}async function At(e){let t=se(e.extensions);await Promise.all(t.map(async i=>Ce({...e,extensionTypes:i.extensionTypes,buildExtensionConfig:i.buildExtensionConfig,all:!0})))}function xe(e){U({headline:["Imported the following extensions from the dashboard:"],body:e.map(t=>$`• "${t.extension.title}" at: ${t.directory}`.value).join(`
2
2
  `)})}s();async function Lt({developerPlatformClient:e,apiKey:t,organizationId:i,extensionTypes:o,onlyDashboardManaged:n=!1}){let r=await e.appExtensionRegistrations({id:t,apiKey:t,organizationId:i}),{dashboardManagedExtensionRegistrations:p,extensionRegistrations:a}=r.app;return(n?p:a.concat(p)).filter(u=>{let h=o.includes(u.type.toLowerCase()),f=u.activeVersion&&u.activeVersion.config,m=u.draftVersion&&u.draftVersion.config;return h&&(f??m)})}export{se as a,ft as b,vt as c,Ce as d,we as e,At as f,Lt as g};
@@ -1 +1 @@
1
- import{a as o}from"./chunk-HDC7GGTP.js";import{b as a}from"./chunk-VP3PA6DV.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var t=class extends a{static{this.description="View the UI kit components that process async tasks"}static{this.hidden=!0}async run(){await o()}};export{t as a};
1
+ import{a as o}from"./chunk-IZCDEDIM.js";import{b as a}from"./chunk-3PFIBTES.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var t=class extends a{static{this.description="View the UI kit components that process async tasks"}static{this.hidden=!0}async run(){await o()}};export{t as a};
@@ -1,4 +1,4 @@
1
- import{b as vi}from"./chunk-XWPPBOGF.js";import{$ as ni,A as Wn,Aa as hi,B as k,Ba as gi,C as U,Ca as yi,D as zn,E as ve,F as Zt,G as qe,H as rt,I as xe,Ia as To,J as Jn,Ja as wi,K as Ne,Ka as mr,L as Pe,La as ze,M as Qn,Ma as at,N as er,Na as Pt,O as he,Oa as pr,P as Do,Pa as lt,Q as Kn,Qa as hr,R as ot,Ra as bi,S as nt,Sa as ki,T as Xn,Ta as Ei,U as tr,Ua as gr,V as Zn,Va as Si,W as ei,Wa as xi,X as ti,Xa as Pi,Y as ri,Z as oi,_ as Ye,a as ue,aa as z,b as Et,ba as it,c as Hn,ca as ii,d as Ie,da as si,e as Se,ea as rr,f as Ge,fa as or,g as Mn,ga as ai,h as Un,ha as ge,i as Bn,ia as li,j as ko,ja as ci,k as et,ka as Co,l as St,la as di,m as je,ma as ui,n as Vn,na as fi,o as Qt,oa as nr,p as Eo,pa as ir,q as xt,qa as sr,r as So,ra as mi,s as Gn,sa as ar,t as qn,ta as lr,u as xo,ua as pi,v as Yn,va as cr,w as Po,wa as dr,x as Kt,xa as We,y as Xt,ya as st,z as tt,za as ur}from"./chunk-6S4LWAKY.js";import{a as hl}from"./chunk-R3WCJACL.js";import{a as _n}from"./chunk-KRZABRYT.js";import{a as Di}from"./chunk-GZJCF3TC.js";import{b as Rn,c as $n,d as Jt,g as An,i as Fn,j as jn,k as Nn}from"./chunk-LAOIEVSU.js";import{a as ml,b as Ln,d as pl}from"./chunk-ZLMC33FE.js";import{a as yr}from"./chunk-FKIVKNOV.js";import{a as fr,b as Io,c as Oo}from"./chunk-ITL4KB5G.js";import{c as On}from"./chunk-F3TMLDLC.js";import{b as O}from"./chunk-VP3PA6DV.js";import{Aa as dl,Ba as Dn,Ca as ul,Da as fl,b as wn,fa as pe,l as vn,m as ae}from"./chunk-REQPTZOU.js";import{B as Pn,l as kn,m as Ee,p as Yt,s as En,u as Sn,x as xn}from"./chunk-TA6MIE6F.js";import{A as Te,D as ee,O as bo,a as qt,u as B,v as N,w as Y,x as Cn,y as Re,z as $e}from"./chunk-WNPRFDZX.js";import{m as E,p as Wt}from"./chunk-OUPJTPTH.js";import{Bb as bn,Ca as yo,Ea as Vt,Fb as we,Ga as gn,Ha as yn,Hb as W,Jb as Ae,Ka as wo,Mb as F,Nb as Tn,Oa as vo,Ob as Fe,Pb as In,Qb as V,Rb as te,Ta as G,U as Ut,Wa as kt,_ as pn,ma as de,na as hn,pa as Bt,qa as go,qb as Gt,ua as K,wa as bt,ya as ke}from"./chunk-UHI4NMIL.js";import{u as H}from"./chunk-A4SBXDZB.js";import{r as zt}from"./chunk-EDZ3YWOD.js";import{d as x,f as T,g as se,i as ho,j as Ze,k as fn,q as mn}from"./chunk-773TIA5M.js";import{a as cl}from"./chunk-CX5CC6P5.js";import{a as be,c as ce,e as Q,g as c}from"./chunk-VKWPEFWQ.js";var Ys=ce((Xw,qs)=>{c();qs.exports=Jc;function Jc(e){var t=e._readableState;return t?t.objectMode||typeof e._duplexState=="number"?e.read():e.read(Qc(t)):null}function Qc(e){if(e.buffer.length){var t=e.bufferIndex||0;if(e.buffer.head)return e.buffer.head.data.length;if(e.buffer.length-t>0&&e.buffer[t])return e.buffer[t].length}return e.length}});var qo=ce((ev,Qs)=>{c();var Yr=Ln(),Ws=Dn(),Kc=On(),Xc=Ys(),zs=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from([0]):new Buffer([0]),Go=function(e,t){e._corked?e.once("uncork",t):t()},Zc=function(e,t){e._autoDestroy&&e.destroy(t)},Js=function(e,t){return function(r){r?Zc(e,r.message==="premature close"?null:r):t&&!e._ended&&e.end()}},ed=function(e,t){if(!e||e._writableState&&e._writableState.finished)return t();if(e._writableState)return e.end(t);e.end(),t()},td=function(e){return new Yr.Readable({objectMode:!0,highWaterMark:16}).wrap(e)},X=function(e,t,r){if(!(this instanceof X))return new X(e,t,r);Yr.Duplex.call(this,r),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!r||r.autoDestroy!==!1,this._forwardDestroy=!r||r.destroy!==!1,this._forwardEnd=!r||r.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),t&&this.setReadable(t)};Kc(X,Yr.Duplex);X.obj=function(e,t,r){return r||(r={}),r.objectMode=!0,r.highWaterMark=16,new X(e,t,r)};X.prototype.cork=function(){++this._corked===1&&this.emit("cork")};X.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")};X.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed){e&&e.destroy&&e.destroy();return}if(e===null||e===!1){this.end();return}var t=this,r=Ws(e,{writable:!0,readable:!1},Js(this,this._forwardEnd)),o=function(){var i=t._ondrain;t._ondrain=null,i&&i()},n=function(){t._writable.removeListener("drain",o),r()};this._unwrite&&process.nextTick(o),this._writable=e,this._writable.on("drain",o),this._unwrite=n,this.uncork()};X.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed){e&&e.destroy&&e.destroy();return}if(e===null||e===!1){this.push(null),this.resume();return}var t=this,r=Ws(e,{writable:!1,readable:!0},Js(this)),o=function(){t._forward()},n=function(){t.push(null)},i=function(){t._readable2.removeListener("readable",o),t._readable2.removeListener("end",n),r()};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:td(e),this._readable2.on("readable",o),this._readable2.on("end",n),this._unread=i,this._forward()};X.prototype._read=function(){this._drained=!0,this._forward()};X.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var e;this._drained&&(e=Xc(this._readable2))!==null;)this.destroyed||(this._drained=this.push(e));this._forwarding=!1}};X.prototype.destroy=function(e){if(!this.destroyed){this.destroyed=!0;var t=this;process.nextTick(function(){t._destroy(e)})}};X.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")};X.prototype._write=function(e,t,r){if(this.destroyed)return r();if(this._corked)return Go(this,this._write.bind(this,e,t,r));if(e===zs)return this._finish(r);if(!this._writable)return r();this._writable.write(e)===!1?this._ondrain=r:r()};X.prototype._finish=function(e){var t=this;this.emit("preend"),Go(this,function(){ed(t._forwardEnd&&t._writable,function(){t._writableState.prefinished===!1&&(t._writableState.prefinished=!0),t.emit("prefinish"),Go(t,e)})})};X.prototype.end=function(e,t,r){return typeof e=="function"?this.end(null,null,e):typeof t=="function"?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this.write(zs),Yr.Writable.prototype.end.call(this,r))};Qs.exports=X});var Xs=ce((rv,Ks)=>{c();Ks.exports=od;var rd=Object.prototype.hasOwnProperty;function od(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var o in r)rd.call(r,o)&&(e[o]=r[o])}return e}});var Wo=ce((nv,Wr)=>{c();var Zs=Ln().Transform,ea=be("util").inherits,ta=Xs();function gt(e){Zs.call(this,e),this._destroyed=!1}ea(gt,Zs);gt.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var t=this;process.nextTick(function(){e&&t.emit("error",e),t.emit("close")})}};function nd(e,t,r){r(null,e)}function Yo(e){return function(t,r,o){return typeof t=="function"&&(o=r,r=t,t={}),typeof r!="function"&&(r=nd),typeof o!="function"&&(o=null),e(t,r,o)}}Wr.exports=Yo(function(e,t,r){var o=new gt(e);return o._transform=t,r&&(o._flush=r),o});Wr.exports.ctor=Yo(function(e,t,r){function o(n){if(!(this instanceof o))return new o(n);this.options=ta(e,n),gt.call(this,this.options)}return ea(o,gt),o.prototype._transform=t,r&&(o.prototype._flush=r),o});Wr.exports.obj=Yo(function(e,t,r){var o=new gt(ta({objectMode:!0,highWaterMark:16},e));return o._transform=t,r&&(o._flush=r),o})});var na=ce((sv,oa)=>{c();var id=qo(),sd=Wo(),ad=hl(),ld=function(e){return!Buffer.isBuffer(e)&&typeof e!="string"},ra=function(e,t){if(typeof e=="number"&&(e={maxBuffer:e}),typeof e=="function")return ra(null,e);e||(e={});var r=typeof e.maxBuffer=="number"?e.maxBuffer:65535,o=e.strict,n=e.newline!==!1,i=[],s=0,a=id.obj(),l=sd.obj({highWaterMark:1},function(m,f,p){if(ld(m))return u(m,null,p);if(Buffer.isBuffer(m)||(m=ad(m)),n){var h=Array.prototype.indexOf.call(m,10);if(h>0&&m[h-1]===13&&h--,h>-1)return i.push(m.slice(0,h)),u(Buffer.concat(i),m.slice(h),p)}if(i.push(m),s+=m.length,s<r)return p();if(o)return p(new Error("No newline found"));u(Buffer.concat(i),null,p)}),d=function(){if(o)return a.destroy(new Error("No newline found"));a.cork(),u(Buffer.concat(i),null,function(m){if(m)return a.destroy(m);a.uncork()})},u=function(m,f,p){a.removeListener("preend",d),t(m,function(h,b){if(h)return p(h);a.setWritable(b),a.setReadable(b),m&&b.write(m),f&&b.write(f),f=i=l=null,p()})};return a.on("preend",d),a.setWritable(l),a};oa.exports=ra});var aa=ce((lv,sa)=>{c();var cd=dl(),dd=Dn(),zo=be("fs"),Ft=function(){},ud=/^v?\.0/.test(process.version),zr=function(e){return typeof e=="function"},fd=function(e){return!ud||!zo?!1:(e instanceof(zo.ReadStream||Ft)||e instanceof(zo.WriteStream||Ft))&&zr(e.close)},md=function(e){return e.setHeader&&zr(e.abort)},pd=function(e,t,r,o){o=cd(o);var n=!1;e.on("close",function(){n=!0}),dd(e,{readable:t,writable:r},function(s){if(s)return o(s);n=!0,o()});var i=!1;return function(s){if(!n&&!i){if(i=!0,fd(e))return e.close(Ft);if(md(e))return e.abort();if(zr(e.destroy))return e.destroy();o(s||new Error("stream was destroyed"))}}},ia=function(e){e()},hd=function(e,t){return e.pipe(t)},gd=function(){var e=Array.prototype.slice.call(arguments),t=zr(e[e.length-1]||Ft)&&e.pop()||Ft;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,o=e.map(function(n,i){var s=i<e.length-1,a=i>0;return pd(n,s,a,function(l){r||(r=l),l&&o.forEach(ia),!s&&(o.forEach(ia),t(r))})});e.reduce(hd)};sa.exports=gd});var da=ce((dv,Jr)=>{c();var yd=aa(),wd=On(),la=qo(),ca=function(e){return e.length?Array.isArray(e[0])?e[0]:Array.prototype.slice.call(e):[]},Jo=function(e){var t=function(){var r=ca(arguments);if(!(this instanceof t))return new t(r);la.call(this,null,null,e),r.length&&this.setPipeline(r)};return wd(t,la),t.prototype.setPipeline=function(){var r=ca(arguments),o=this,n=!1,i=r[0],s=r[r.length-1];s=s.readable?s:null,i=i.writable?i:null;var a=function(){r[0].emit("error",new Error("stream was destroyed"))};if(this.on("close",a),this.on("prefinish",function(){n||o.cork()}),yd(r,function(l){if(o.removeListener("close",a),l)return o.destroy(l.message==="premature close"?null:l);n=!0,o._autoDestroy===!1&&(o._autoDestroy=!0),o.uncork()}),this.destroyed)return a();this.setWritable(i),this.setReadable(s)},t};Jr.exports=Jo({autoDestroy:!1,destroy:!1});Jr.exports.obj=Jo({autoDestroy:!1,destroy:!1,objectMode:!0,highWaterMark:16});Jr.exports.ctor=Jo});var fa=ce((fv,ua)=>{"use strict";c();ua.exports=function(e){return!e||e.length<3?!1:e[0]===31&&e[1]===139&&e[2]===8}});var pa=ce((pv,ma)=>{"use strict";c();ma.exports=function(e){return!e||e.length<2?!1:e[0]===120&&(e[1]===1||e[1]===156||e[1]===218)}});var wa=ce((gv,ya)=>{c();var ha=be("zlib"),vd=na(),bd=Wo(),ga=da(),kd=fa(),Ed=pa(),Sd=function(e){return kd(e)?1:Ed(e)?2:0},Qo=function(e){return e===void 0&&(e=3),vd({newline:!1,maxBuffer:10},function(t,r){if(e<0)return r(new Error("Maximum recursion reached"));switch(Sd(t)){case 1:r(null,ga(ha.createGunzip(),Qo(e-1)));break;case 2:r(null,ga(ha.createInflate(),Qo(e-1)));break;default:r(null,bd())}})};ya.exports=Qo});var Pa=ce((wv,xa)=>{"use strict";c();var ye=be("fs"),Ke=be("path"),xd=ye.lchown?"lchown":"chown",Pd=ye.lchownSync?"lchownSync":"chownSync",ba=ye.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),va=(e,t,r)=>{try{return ye[Pd](e,t,r)}catch(o){if(o.code!=="ENOENT")throw o}},Dd=(e,t,r)=>{try{return ye.chownSync(e,t,r)}catch(o){if(o.code!=="ENOENT")throw o}},Cd=ba?(e,t,r,o)=>n=>{!n||n.code!=="EISDIR"?o(n):ye.chown(e,t,r,o)}:(e,t,r,o)=>o,Ko=ba?(e,t,r)=>{try{return va(e,t,r)}catch(o){if(o.code!=="EISDIR")throw o;Dd(e,t,r)}}:(e,t,r)=>va(e,t,r),Td=process.version,ka=(e,t,r)=>ye.readdir(e,t,r),Id=(e,t)=>ye.readdirSync(e,t);/^v4\./.test(Td)&&(ka=(e,t,r)=>ye.readdir(e,r));var Qr=(e,t,r,o)=>{ye[xd](e,t,r,Cd(e,t,r,n=>{o(n&&n.code!=="ENOENT"?n:null)}))},Ea=(e,t,r,o,n)=>{if(typeof t=="string")return ye.lstat(Ke.resolve(e,t),(i,s)=>{if(i)return n(i.code!=="ENOENT"?i:null);s.name=t,Ea(e,s,r,o,n)});if(t.isDirectory())Xo(Ke.resolve(e,t.name),r,o,i=>{if(i)return n(i);let s=Ke.resolve(e,t.name);Qr(s,r,o,n)});else{let i=Ke.resolve(e,t.name);Qr(i,r,o,n)}},Xo=(e,t,r,o)=>{ka(e,{withFileTypes:!0},(n,i)=>{if(n){if(n.code==="ENOENT")return o();if(n.code!=="ENOTDIR"&&n.code!=="ENOTSUP")return o(n)}if(n||!i.length)return Qr(e,t,r,o);let s=i.length,a=null,l=d=>{if(!a){if(d)return o(a=d);if(--s===0)return Qr(e,t,r,o)}};i.forEach(d=>Ea(e,d,t,r,l))})},Od=(e,t,r,o)=>{if(typeof t=="string")try{let n=ye.lstatSync(Ke.resolve(e,t));n.name=t,t=n}catch(n){if(n.code==="ENOENT")return;throw n}t.isDirectory()&&Sa(Ke.resolve(e,t.name),r,o),Ko(Ke.resolve(e,t.name),r,o)},Sa=(e,t,r)=>{let o;try{o=Id(e,{withFileTypes:!0})}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR"||n.code==="ENOTSUP")return Ko(e,t,r);throw n}return o&&o.length&&o.forEach(n=>Od(e,n,t,r)),Ko(e,t,r)};xa.exports=Xo;Xo.sync=Sa});var Ia=ce((bv,Ta)=>{c();var Kr=be("path"),Da=be("fs"),Ca=parseInt("0777",8);Ta.exports=yt.mkdirp=yt.mkdirP=yt;function yt(e,t,r,o){typeof t=="function"?(r=t,t={}):(!t||typeof t!="object")&&(t={mode:t});var n=t.mode,i=t.fs||Da;n===void 0&&(n=Ca&~process.umask()),o||(o=null);var s=r||function(){};e=Kr.resolve(e),i.mkdir(e,n,function(a){if(!a)return o=o||e,s(null,o);a.code==="ENOENT"?yt(Kr.dirname(e),t,function(l,d){l?s(l,d):yt(e,t,s,d)}):i.stat(e,function(l,d){l||!d.isDirectory()?s(a,o):s(null,o)})})}yt.sync=function e(t,r,o){(!r||typeof r!="object")&&(r={mode:r});var n=r.mode,i=r.fs||Da;n===void 0&&(n=Ca&~process.umask()),o||(o=null),t=Kr.resolve(t);try{i.mkdirSync(t,n),o=o||t}catch(a){switch(a.code){case"ENOENT":o=e(Kr.dirname(t),r,o),e(t,r,o);break;default:var s;try{s=i.statSync(t)}catch{throw a}if(!s.isDirectory())throw a;break}}return o}});var La=ce(tn=>{c();var _d=Pa(),Ra=pl(),$a=ul(),Rd=Ia(),Aa=be("fs"),Z=be("path"),$d=be("os"),jt=$d.platform()==="win32",Nt=function(){},en=function(e){return e},Zo=jt?function(e){return e.replace(/\\/g,"/").replace(/[:?<>|]/g,"_")}:en,Ad=function(e,t,r,o,n,i){var s=n||["."];return function(l){if(!s.length)return l();var d=s.shift(),u=Z.join(r,d);t.call(e,u,function(m,f){if(m)return l(m);if(!f.isDirectory())return l(null,d,f);e.readdir(u,function(p,h){if(p)return l(p);i&&h.sort();for(var b=0;b<h.length;b++)o(Z.join(r,d,h[b]))||s.push(Z.join(d,h[b]));l(null,d,f)})})}},Fa=function(e,t){return function(r){r.name=r.name.split("/").slice(t).join("/");var o=r.linkname;return o&&(r.type==="link"||Z.isAbsolute(o))&&(r.linkname=o.split("/").slice(t).join("/")),e(r)}};tn.pack=function(e,t){e||(e="."),t||(t={});var r=t.fs||Aa,o=t.ignore||t.filter||Nt,n=t.map||Nt,i=t.mapStream||en,s=Ad(r,t.dereference?r.stat:r.lstat,e,o,t.entries,t.sort),a=t.strict!==!1,l=typeof t.umask=="number"?~t.umask:~ja(),d=typeof t.dmode=="number"?t.dmode:0,u=typeof t.fmode=="number"?t.fmode:0,m=t.pack||Ra.pack(),f=t.finish||Nt;t.strip&&(n=Fa(n,t.strip)),t.readable&&(d|=parseInt(555,8),u|=parseInt(444,8)),t.writable&&(d|=parseInt(333,8),u|=parseInt(222,8));var p=function(w,g){r.readlink(Z.join(e,w),function(y,v){if(y)return m.destroy(y);g.linkname=Zo(v),m.entry(g,b)})},h=function(w,g,y){if(w)return m.destroy(w);if(!g)return t.finalize!==!1&&m.finalize(),f(m);if(y.isSocket())return b();var v={name:Zo(g),mode:(y.mode|(y.isDirectory()?d:u))&l,mtime:y.mtime,size:y.size,type:"file",uid:y.uid,gid:y.gid};if(y.isDirectory())return v.size=0,v.type="directory",v=n(v)||v,m.entry(v,b);if(y.isSymbolicLink())return v.size=0,v.type="symlink",v=n(v)||v,p(g,v);if(v=n(v)||v,!y.isFile())return a?m.destroy(new Error("unsupported type for "+g)):b();var S=m.entry(v,b);if(S){var P=i(r.createReadStream(Z.join(e,g),{start:0,end:v.size>0?v.size-1:v.size}),v);P.on("error",function(C){S.destroy(C)}),$a(P,S)}},b=function(w){if(w)return m.destroy(w);s(h)};return b(),m};var Fd=function(e){return e.length?e[e.length-1]:null},jd=function(){return process.getuid?process.getuid():-1},ja=function(){return process.umask?process.umask():0};tn.extract=function(e,t){e||(e="."),t||(t={});var r=t.fs||Aa,o=t.ignore||t.filter||Nt,n=t.map||Nt,i=t.mapStream||en,s=t.chown!==!1&&!jt&&jd()===0,a=t.extract||Ra.extract(),l=[],d=new Date,u=typeof t.umask=="number"?~t.umask:~ja(),m=typeof t.dmode=="number"?t.dmode:0,f=typeof t.fmode=="number"?t.fmode:0,p=t.strict!==!1;t.strip&&(n=Fa(n,t.strip)),t.readable&&(m|=parseInt(555,8),f|=parseInt(444,8)),t.writable&&(m|=parseInt(333,8),f|=parseInt(222,8));var h=function(g,y){for(var v;(v=Fd(l))&&g.slice(0,v[0].length)!==v[0];)l.pop();if(!v)return y();r.utimes(v[0],d,v[1],y)},b=function(g,y,v){if(t.utimes===!1)return v();if(y.type==="directory")return r.utimes(g,d,y.mtime,v);if(y.type==="symlink")return h(g,v);r.utimes(g,d,y.mtime,function(S){if(S)return v(S);h(g,v)})},w=function(g,y,v){var S=y.type==="symlink",P=S?r.lchmod:r.chmod,C=S?r.lchown:r.chown;if(!P)return v();var D=(y.mode|(y.type==="directory"?m:f))&u;C&&s?C.call(r,g,y.uid,y.gid,R):R(null);function R($){if($)return v($);if(!P)return v();P.call(r,g,D,v)}};return a.on("entry",function(g,y,v){g=n(g)||g,g.name=Zo(g.name);var S=Z.join(e,Z.join("/",g.name));if(o(S,g))return y.resume(),v();var P=function(I){if(I)return v(I);b(S,g,function(_){if(_)return v(_);if(jt)return v();w(S,g,v)})},C=function(){if(jt)return v();r.unlink(S,function(){var I=Z.resolve(Z.dirname(S),g.linkname);if(!_a(I,e))return v(new Error(S+" is not a valid symlink"));r.symlink(g.linkname,S,P)})},D=function(){if(jt)return v();r.unlink(S,function(){var I=Z.join(e,Z.join("/",g.linkname));r.realpath(I,function(_,L){if(_||!_a(L,e))return v(new Error(S+" is not a valid hardlink"));r.link(L,S,function(j){if(j&&j.code==="EPERM"&&t.hardlinkAsFilesFallback)return y=r.createReadStream(I),R();P(j)})})})},R=function(){var I=r.createWriteStream(S),_=i(y,g);I.on("error",function(L){_.destroy(L)}),$a(_,I,function(L){if(L)return v(L);I.on("close",P)})};if(g.type==="directory")return l.push([S,g.mtime]),Oa(S,{fs:r,own:s,uid:g.uid,gid:g.gid},P);var $=Z.dirname(S);Na(r,$,Z.join(e,"."),function(I,_){if(I)return v(I);if(!_)return v(new Error($+" is not a valid path"));Oa($,{fs:r,own:s,uid:g.uid,gid:g.gid},function(L){if(L)return v(L);switch(g.type){case"file":return R();case"link":return D();case"symlink":return C()}if(p)return v(new Error("unsupported type for "+S+" ("+g.type+")"));y.resume(),v()})})}),t.finish&&a.on("finish",t.finish),a};function Na(e,t,r,o){if(t===r)return o(null,!0);e.lstat(t,function(n,i){if(n&&n.code!=="ENOENT")return o(n);if(n||i.isDirectory())return Na(e,Z.join(t,".."),r,o);o(null,!1)})}function Oa(e,t,r){Rd(e,{fs:t.fs},function(o,n){!o&&n&&t.own?_d(n,t.uid,t.gid,r):r(o)})}function _a(e,t){return t=Z.resolve(t),t===e||e.startsWith(t+Z.sep)}});c();c();var xr=Q(ue(),1);c();c();var wr=[{name:"npm",lockfile:"package-lock.json",alternativeLockfiles:["npm-shrinkwrap.json"],installCommand:"npm ci"},{name:"yarn",lockfile:"yarn.lock",installCommand:"yarn install --frozen-lockfile"},{name:"pnpm",lockfile:"pnpm-lock.yaml",installCommand:"pnpm install --frozen-lockfile"},{name:"bun",lockfile:"bun.lockb",alternativeLockfiles:["bun.lock"],installCommand:"bun install --frozen-lockfile"}];function gl(e){let t="No lockfile found",r="If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying. To avoid versioning issues, generate a new lockfile and commit it to your repository.",o=[["Generate a lockfile. Run",{command:"npm|yarn|pnpm install"}],"Commit the new file to your repository"];if(e)throw new E(t,r,o);Y({headline:t,body:r,nextSteps:o})}function yl(e,t){let r=e.map(({packageManager:s,foundLockfile:a})=>`${a} (created by ${s.name})`),o="Multiple lockfiles found",n=[`Your project contains more than one lockfile. This can cause version conflicts when installing and deploying your app. The following lockfiles were detected:
1
+ import{b as vi}from"./chunk-XWPPBOGF.js";import{$ as ni,A as Wn,Aa as hi,B as k,Ba as gi,C as U,Ca as yi,D as zn,E as ve,F as Zt,G as qe,H as rt,I as xe,Ia as To,J as Jn,Ja as wi,K as Ne,Ka as mr,L as Pe,La as ze,M as Qn,Ma as at,N as er,Na as Pt,O as he,Oa as pr,P as Do,Pa as lt,Q as Kn,Qa as hr,R as ot,Ra as bi,S as nt,Sa as ki,T as Xn,Ta as Ei,U as tr,Ua as gr,V as Zn,Va as Si,W as ei,Wa as xi,X as ti,Xa as Pi,Y as ri,Z as oi,_ as Ye,a as ue,aa as z,b as Et,ba as it,c as Hn,ca as ii,d as Ie,da as si,e as Se,ea as rr,f as Ge,fa as or,g as Mn,ga as ai,h as Un,ha as ge,i as Bn,ia as li,j as ko,ja as ci,k as et,ka as Co,l as St,la as di,m as je,ma as ui,n as Vn,na as fi,o as Qt,oa as nr,p as Eo,pa as ir,q as xt,qa as sr,r as So,ra as mi,s as Gn,sa as ar,t as qn,ta as lr,u as xo,ua as pi,v as Yn,va as cr,w as Po,wa as dr,x as Kt,xa as We,y as Xt,ya as st,z as tt,za as ur}from"./chunk-2VVXGQ36.js";import{a as hl}from"./chunk-R3WCJACL.js";import{a as _n}from"./chunk-KRZABRYT.js";import{a as Di}from"./chunk-ROBYXQMW.js";import{b as Rn,c as $n,d as Jt,g as An,i as Fn,j as jn,k as Nn}from"./chunk-AK4NPOQG.js";import{a as ml,b as Ln,d as pl}from"./chunk-OLQN2OBC.js";import{a as yr}from"./chunk-FKIVKNOV.js";import{a as fr,b as Io,c as Oo}from"./chunk-YKAMTVJM.js";import{c as On}from"./chunk-F3TMLDLC.js";import{b as O}from"./chunk-3PFIBTES.js";import{Aa as dl,Ba as Dn,Ca as ul,Da as fl,b as wn,fa as pe,l as vn,m as ae}from"./chunk-OQ6WYWG4.js";import{B as Pn,l as kn,m as Ee,p as Yt,s as En,u as Sn,x as xn}from"./chunk-SH5VEQ7F.js";import{A as Te,D as ee,O as bo,a as qt,u as B,v as N,w as Y,x as Cn,y as Re,z as $e}from"./chunk-SQVJGTTD.js";import{m as E,p as Wt}from"./chunk-O6BUPYXH.js";import{Bb as bn,Ca as yo,Ea as Vt,Fb as we,Ga as gn,Ha as yn,Hb as W,Jb as Ae,Ka as wo,Mb as F,Nb as Tn,Oa as vo,Ob as Fe,Pb as In,Qb as V,Rb as te,Ta as G,U as Ut,Wa as kt,_ as pn,ma as de,na as hn,pa as Bt,qa as go,qb as Gt,ua as K,wa as bt,ya as ke}from"./chunk-KNLPWHHJ.js";import{u as H}from"./chunk-A4SBXDZB.js";import{r as zt}from"./chunk-E7Z7KYBR.js";import{d as x,f as T,g as se,i as ho,j as Ze,k as fn,q as mn}from"./chunk-773TIA5M.js";import{a as cl}from"./chunk-CX5CC6P5.js";import{a as be,c as ce,e as Q,g as c}from"./chunk-VKWPEFWQ.js";var Ys=ce((Xw,qs)=>{c();qs.exports=Jc;function Jc(e){var t=e._readableState;return t?t.objectMode||typeof e._duplexState=="number"?e.read():e.read(Qc(t)):null}function Qc(e){if(e.buffer.length){var t=e.bufferIndex||0;if(e.buffer.head)return e.buffer.head.data.length;if(e.buffer.length-t>0&&e.buffer[t])return e.buffer[t].length}return e.length}});var qo=ce((ev,Qs)=>{c();var Yr=Ln(),Ws=Dn(),Kc=On(),Xc=Ys(),zs=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from([0]):new Buffer([0]),Go=function(e,t){e._corked?e.once("uncork",t):t()},Zc=function(e,t){e._autoDestroy&&e.destroy(t)},Js=function(e,t){return function(r){r?Zc(e,r.message==="premature close"?null:r):t&&!e._ended&&e.end()}},ed=function(e,t){if(!e||e._writableState&&e._writableState.finished)return t();if(e._writableState)return e.end(t);e.end(),t()},td=function(e){return new Yr.Readable({objectMode:!0,highWaterMark:16}).wrap(e)},X=function(e,t,r){if(!(this instanceof X))return new X(e,t,r);Yr.Duplex.call(this,r),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!r||r.autoDestroy!==!1,this._forwardDestroy=!r||r.destroy!==!1,this._forwardEnd=!r||r.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),t&&this.setReadable(t)};Kc(X,Yr.Duplex);X.obj=function(e,t,r){return r||(r={}),r.objectMode=!0,r.highWaterMark=16,new X(e,t,r)};X.prototype.cork=function(){++this._corked===1&&this.emit("cork")};X.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")};X.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed){e&&e.destroy&&e.destroy();return}if(e===null||e===!1){this.end();return}var t=this,r=Ws(e,{writable:!0,readable:!1},Js(this,this._forwardEnd)),o=function(){var i=t._ondrain;t._ondrain=null,i&&i()},n=function(){t._writable.removeListener("drain",o),r()};this._unwrite&&process.nextTick(o),this._writable=e,this._writable.on("drain",o),this._unwrite=n,this.uncork()};X.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed){e&&e.destroy&&e.destroy();return}if(e===null||e===!1){this.push(null),this.resume();return}var t=this,r=Ws(e,{writable:!1,readable:!0},Js(this)),o=function(){t._forward()},n=function(){t.push(null)},i=function(){t._readable2.removeListener("readable",o),t._readable2.removeListener("end",n),r()};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:td(e),this._readable2.on("readable",o),this._readable2.on("end",n),this._unread=i,this._forward()};X.prototype._read=function(){this._drained=!0,this._forward()};X.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var e;this._drained&&(e=Xc(this._readable2))!==null;)this.destroyed||(this._drained=this.push(e));this._forwarding=!1}};X.prototype.destroy=function(e){if(!this.destroyed){this.destroyed=!0;var t=this;process.nextTick(function(){t._destroy(e)})}};X.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")};X.prototype._write=function(e,t,r){if(this.destroyed)return r();if(this._corked)return Go(this,this._write.bind(this,e,t,r));if(e===zs)return this._finish(r);if(!this._writable)return r();this._writable.write(e)===!1?this._ondrain=r:r()};X.prototype._finish=function(e){var t=this;this.emit("preend"),Go(this,function(){ed(t._forwardEnd&&t._writable,function(){t._writableState.prefinished===!1&&(t._writableState.prefinished=!0),t.emit("prefinish"),Go(t,e)})})};X.prototype.end=function(e,t,r){return typeof e=="function"?this.end(null,null,e):typeof t=="function"?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this.write(zs),Yr.Writable.prototype.end.call(this,r))};Qs.exports=X});var Xs=ce((rv,Ks)=>{c();Ks.exports=od;var rd=Object.prototype.hasOwnProperty;function od(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var o in r)rd.call(r,o)&&(e[o]=r[o])}return e}});var Wo=ce((nv,Wr)=>{c();var Zs=Ln().Transform,ea=be("util").inherits,ta=Xs();function gt(e){Zs.call(this,e),this._destroyed=!1}ea(gt,Zs);gt.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var t=this;process.nextTick(function(){e&&t.emit("error",e),t.emit("close")})}};function nd(e,t,r){r(null,e)}function Yo(e){return function(t,r,o){return typeof t=="function"&&(o=r,r=t,t={}),typeof r!="function"&&(r=nd),typeof o!="function"&&(o=null),e(t,r,o)}}Wr.exports=Yo(function(e,t,r){var o=new gt(e);return o._transform=t,r&&(o._flush=r),o});Wr.exports.ctor=Yo(function(e,t,r){function o(n){if(!(this instanceof o))return new o(n);this.options=ta(e,n),gt.call(this,this.options)}return ea(o,gt),o.prototype._transform=t,r&&(o.prototype._flush=r),o});Wr.exports.obj=Yo(function(e,t,r){var o=new gt(ta({objectMode:!0,highWaterMark:16},e));return o._transform=t,r&&(o._flush=r),o})});var na=ce((sv,oa)=>{c();var id=qo(),sd=Wo(),ad=hl(),ld=function(e){return!Buffer.isBuffer(e)&&typeof e!="string"},ra=function(e,t){if(typeof e=="number"&&(e={maxBuffer:e}),typeof e=="function")return ra(null,e);e||(e={});var r=typeof e.maxBuffer=="number"?e.maxBuffer:65535,o=e.strict,n=e.newline!==!1,i=[],s=0,a=id.obj(),l=sd.obj({highWaterMark:1},function(m,f,p){if(ld(m))return u(m,null,p);if(Buffer.isBuffer(m)||(m=ad(m)),n){var h=Array.prototype.indexOf.call(m,10);if(h>0&&m[h-1]===13&&h--,h>-1)return i.push(m.slice(0,h)),u(Buffer.concat(i),m.slice(h),p)}if(i.push(m),s+=m.length,s<r)return p();if(o)return p(new Error("No newline found"));u(Buffer.concat(i),null,p)}),d=function(){if(o)return a.destroy(new Error("No newline found"));a.cork(),u(Buffer.concat(i),null,function(m){if(m)return a.destroy(m);a.uncork()})},u=function(m,f,p){a.removeListener("preend",d),t(m,function(h,b){if(h)return p(h);a.setWritable(b),a.setReadable(b),m&&b.write(m),f&&b.write(f),f=i=l=null,p()})};return a.on("preend",d),a.setWritable(l),a};oa.exports=ra});var aa=ce((lv,sa)=>{c();var cd=dl(),dd=Dn(),zo=be("fs"),Ft=function(){},ud=/^v?\.0/.test(process.version),zr=function(e){return typeof e=="function"},fd=function(e){return!ud||!zo?!1:(e instanceof(zo.ReadStream||Ft)||e instanceof(zo.WriteStream||Ft))&&zr(e.close)},md=function(e){return e.setHeader&&zr(e.abort)},pd=function(e,t,r,o){o=cd(o);var n=!1;e.on("close",function(){n=!0}),dd(e,{readable:t,writable:r},function(s){if(s)return o(s);n=!0,o()});var i=!1;return function(s){if(!n&&!i){if(i=!0,fd(e))return e.close(Ft);if(md(e))return e.abort();if(zr(e.destroy))return e.destroy();o(s||new Error("stream was destroyed"))}}},ia=function(e){e()},hd=function(e,t){return e.pipe(t)},gd=function(){var e=Array.prototype.slice.call(arguments),t=zr(e[e.length-1]||Ft)&&e.pop()||Ft;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,o=e.map(function(n,i){var s=i<e.length-1,a=i>0;return pd(n,s,a,function(l){r||(r=l),l&&o.forEach(ia),!s&&(o.forEach(ia),t(r))})});e.reduce(hd)};sa.exports=gd});var da=ce((dv,Jr)=>{c();var yd=aa(),wd=On(),la=qo(),ca=function(e){return e.length?Array.isArray(e[0])?e[0]:Array.prototype.slice.call(e):[]},Jo=function(e){var t=function(){var r=ca(arguments);if(!(this instanceof t))return new t(r);la.call(this,null,null,e),r.length&&this.setPipeline(r)};return wd(t,la),t.prototype.setPipeline=function(){var r=ca(arguments),o=this,n=!1,i=r[0],s=r[r.length-1];s=s.readable?s:null,i=i.writable?i:null;var a=function(){r[0].emit("error",new Error("stream was destroyed"))};if(this.on("close",a),this.on("prefinish",function(){n||o.cork()}),yd(r,function(l){if(o.removeListener("close",a),l)return o.destroy(l.message==="premature close"?null:l);n=!0,o._autoDestroy===!1&&(o._autoDestroy=!0),o.uncork()}),this.destroyed)return a();this.setWritable(i),this.setReadable(s)},t};Jr.exports=Jo({autoDestroy:!1,destroy:!1});Jr.exports.obj=Jo({autoDestroy:!1,destroy:!1,objectMode:!0,highWaterMark:16});Jr.exports.ctor=Jo});var fa=ce((fv,ua)=>{"use strict";c();ua.exports=function(e){return!e||e.length<3?!1:e[0]===31&&e[1]===139&&e[2]===8}});var pa=ce((pv,ma)=>{"use strict";c();ma.exports=function(e){return!e||e.length<2?!1:e[0]===120&&(e[1]===1||e[1]===156||e[1]===218)}});var wa=ce((gv,ya)=>{c();var ha=be("zlib"),vd=na(),bd=Wo(),ga=da(),kd=fa(),Ed=pa(),Sd=function(e){return kd(e)?1:Ed(e)?2:0},Qo=function(e){return e===void 0&&(e=3),vd({newline:!1,maxBuffer:10},function(t,r){if(e<0)return r(new Error("Maximum recursion reached"));switch(Sd(t)){case 1:r(null,ga(ha.createGunzip(),Qo(e-1)));break;case 2:r(null,ga(ha.createInflate(),Qo(e-1)));break;default:r(null,bd())}})};ya.exports=Qo});var Pa=ce((wv,xa)=>{"use strict";c();var ye=be("fs"),Ke=be("path"),xd=ye.lchown?"lchown":"chown",Pd=ye.lchownSync?"lchownSync":"chownSync",ba=ye.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),va=(e,t,r)=>{try{return ye[Pd](e,t,r)}catch(o){if(o.code!=="ENOENT")throw o}},Dd=(e,t,r)=>{try{return ye.chownSync(e,t,r)}catch(o){if(o.code!=="ENOENT")throw o}},Cd=ba?(e,t,r,o)=>n=>{!n||n.code!=="EISDIR"?o(n):ye.chown(e,t,r,o)}:(e,t,r,o)=>o,Ko=ba?(e,t,r)=>{try{return va(e,t,r)}catch(o){if(o.code!=="EISDIR")throw o;Dd(e,t,r)}}:(e,t,r)=>va(e,t,r),Td=process.version,ka=(e,t,r)=>ye.readdir(e,t,r),Id=(e,t)=>ye.readdirSync(e,t);/^v4\./.test(Td)&&(ka=(e,t,r)=>ye.readdir(e,r));var Qr=(e,t,r,o)=>{ye[xd](e,t,r,Cd(e,t,r,n=>{o(n&&n.code!=="ENOENT"?n:null)}))},Ea=(e,t,r,o,n)=>{if(typeof t=="string")return ye.lstat(Ke.resolve(e,t),(i,s)=>{if(i)return n(i.code!=="ENOENT"?i:null);s.name=t,Ea(e,s,r,o,n)});if(t.isDirectory())Xo(Ke.resolve(e,t.name),r,o,i=>{if(i)return n(i);let s=Ke.resolve(e,t.name);Qr(s,r,o,n)});else{let i=Ke.resolve(e,t.name);Qr(i,r,o,n)}},Xo=(e,t,r,o)=>{ka(e,{withFileTypes:!0},(n,i)=>{if(n){if(n.code==="ENOENT")return o();if(n.code!=="ENOTDIR"&&n.code!=="ENOTSUP")return o(n)}if(n||!i.length)return Qr(e,t,r,o);let s=i.length,a=null,l=d=>{if(!a){if(d)return o(a=d);if(--s===0)return Qr(e,t,r,o)}};i.forEach(d=>Ea(e,d,t,r,l))})},Od=(e,t,r,o)=>{if(typeof t=="string")try{let n=ye.lstatSync(Ke.resolve(e,t));n.name=t,t=n}catch(n){if(n.code==="ENOENT")return;throw n}t.isDirectory()&&Sa(Ke.resolve(e,t.name),r,o),Ko(Ke.resolve(e,t.name),r,o)},Sa=(e,t,r)=>{let o;try{o=Id(e,{withFileTypes:!0})}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR"||n.code==="ENOTSUP")return Ko(e,t,r);throw n}return o&&o.length&&o.forEach(n=>Od(e,n,t,r)),Ko(e,t,r)};xa.exports=Xo;Xo.sync=Sa});var Ia=ce((bv,Ta)=>{c();var Kr=be("path"),Da=be("fs"),Ca=parseInt("0777",8);Ta.exports=yt.mkdirp=yt.mkdirP=yt;function yt(e,t,r,o){typeof t=="function"?(r=t,t={}):(!t||typeof t!="object")&&(t={mode:t});var n=t.mode,i=t.fs||Da;n===void 0&&(n=Ca&~process.umask()),o||(o=null);var s=r||function(){};e=Kr.resolve(e),i.mkdir(e,n,function(a){if(!a)return o=o||e,s(null,o);a.code==="ENOENT"?yt(Kr.dirname(e),t,function(l,d){l?s(l,d):yt(e,t,s,d)}):i.stat(e,function(l,d){l||!d.isDirectory()?s(a,o):s(null,o)})})}yt.sync=function e(t,r,o){(!r||typeof r!="object")&&(r={mode:r});var n=r.mode,i=r.fs||Da;n===void 0&&(n=Ca&~process.umask()),o||(o=null),t=Kr.resolve(t);try{i.mkdirSync(t,n),o=o||t}catch(a){switch(a.code){case"ENOENT":o=e(Kr.dirname(t),r,o),e(t,r,o);break;default:var s;try{s=i.statSync(t)}catch{throw a}if(!s.isDirectory())throw a;break}}return o}});var La=ce(tn=>{c();var _d=Pa(),Ra=pl(),$a=ul(),Rd=Ia(),Aa=be("fs"),Z=be("path"),$d=be("os"),jt=$d.platform()==="win32",Nt=function(){},en=function(e){return e},Zo=jt?function(e){return e.replace(/\\/g,"/").replace(/[:?<>|]/g,"_")}:en,Ad=function(e,t,r,o,n,i){var s=n||["."];return function(l){if(!s.length)return l();var d=s.shift(),u=Z.join(r,d);t.call(e,u,function(m,f){if(m)return l(m);if(!f.isDirectory())return l(null,d,f);e.readdir(u,function(p,h){if(p)return l(p);i&&h.sort();for(var b=0;b<h.length;b++)o(Z.join(r,d,h[b]))||s.push(Z.join(d,h[b]));l(null,d,f)})})}},Fa=function(e,t){return function(r){r.name=r.name.split("/").slice(t).join("/");var o=r.linkname;return o&&(r.type==="link"||Z.isAbsolute(o))&&(r.linkname=o.split("/").slice(t).join("/")),e(r)}};tn.pack=function(e,t){e||(e="."),t||(t={});var r=t.fs||Aa,o=t.ignore||t.filter||Nt,n=t.map||Nt,i=t.mapStream||en,s=Ad(r,t.dereference?r.stat:r.lstat,e,o,t.entries,t.sort),a=t.strict!==!1,l=typeof t.umask=="number"?~t.umask:~ja(),d=typeof t.dmode=="number"?t.dmode:0,u=typeof t.fmode=="number"?t.fmode:0,m=t.pack||Ra.pack(),f=t.finish||Nt;t.strip&&(n=Fa(n,t.strip)),t.readable&&(d|=parseInt(555,8),u|=parseInt(444,8)),t.writable&&(d|=parseInt(333,8),u|=parseInt(222,8));var p=function(w,g){r.readlink(Z.join(e,w),function(y,v){if(y)return m.destroy(y);g.linkname=Zo(v),m.entry(g,b)})},h=function(w,g,y){if(w)return m.destroy(w);if(!g)return t.finalize!==!1&&m.finalize(),f(m);if(y.isSocket())return b();var v={name:Zo(g),mode:(y.mode|(y.isDirectory()?d:u))&l,mtime:y.mtime,size:y.size,type:"file",uid:y.uid,gid:y.gid};if(y.isDirectory())return v.size=0,v.type="directory",v=n(v)||v,m.entry(v,b);if(y.isSymbolicLink())return v.size=0,v.type="symlink",v=n(v)||v,p(g,v);if(v=n(v)||v,!y.isFile())return a?m.destroy(new Error("unsupported type for "+g)):b();var S=m.entry(v,b);if(S){var P=i(r.createReadStream(Z.join(e,g),{start:0,end:v.size>0?v.size-1:v.size}),v);P.on("error",function(C){S.destroy(C)}),$a(P,S)}},b=function(w){if(w)return m.destroy(w);s(h)};return b(),m};var Fd=function(e){return e.length?e[e.length-1]:null},jd=function(){return process.getuid?process.getuid():-1},ja=function(){return process.umask?process.umask():0};tn.extract=function(e,t){e||(e="."),t||(t={});var r=t.fs||Aa,o=t.ignore||t.filter||Nt,n=t.map||Nt,i=t.mapStream||en,s=t.chown!==!1&&!jt&&jd()===0,a=t.extract||Ra.extract(),l=[],d=new Date,u=typeof t.umask=="number"?~t.umask:~ja(),m=typeof t.dmode=="number"?t.dmode:0,f=typeof t.fmode=="number"?t.fmode:0,p=t.strict!==!1;t.strip&&(n=Fa(n,t.strip)),t.readable&&(m|=parseInt(555,8),f|=parseInt(444,8)),t.writable&&(m|=parseInt(333,8),f|=parseInt(222,8));var h=function(g,y){for(var v;(v=Fd(l))&&g.slice(0,v[0].length)!==v[0];)l.pop();if(!v)return y();r.utimes(v[0],d,v[1],y)},b=function(g,y,v){if(t.utimes===!1)return v();if(y.type==="directory")return r.utimes(g,d,y.mtime,v);if(y.type==="symlink")return h(g,v);r.utimes(g,d,y.mtime,function(S){if(S)return v(S);h(g,v)})},w=function(g,y,v){var S=y.type==="symlink",P=S?r.lchmod:r.chmod,C=S?r.lchown:r.chown;if(!P)return v();var D=(y.mode|(y.type==="directory"?m:f))&u;C&&s?C.call(r,g,y.uid,y.gid,R):R(null);function R($){if($)return v($);if(!P)return v();P.call(r,g,D,v)}};return a.on("entry",function(g,y,v){g=n(g)||g,g.name=Zo(g.name);var S=Z.join(e,Z.join("/",g.name));if(o(S,g))return y.resume(),v();var P=function(I){if(I)return v(I);b(S,g,function(_){if(_)return v(_);if(jt)return v();w(S,g,v)})},C=function(){if(jt)return v();r.unlink(S,function(){var I=Z.resolve(Z.dirname(S),g.linkname);if(!_a(I,e))return v(new Error(S+" is not a valid symlink"));r.symlink(g.linkname,S,P)})},D=function(){if(jt)return v();r.unlink(S,function(){var I=Z.join(e,Z.join("/",g.linkname));r.realpath(I,function(_,L){if(_||!_a(L,e))return v(new Error(S+" is not a valid hardlink"));r.link(L,S,function(j){if(j&&j.code==="EPERM"&&t.hardlinkAsFilesFallback)return y=r.createReadStream(I),R();P(j)})})})},R=function(){var I=r.createWriteStream(S),_=i(y,g);I.on("error",function(L){_.destroy(L)}),$a(_,I,function(L){if(L)return v(L);I.on("close",P)})};if(g.type==="directory")return l.push([S,g.mtime]),Oa(S,{fs:r,own:s,uid:g.uid,gid:g.gid},P);var $=Z.dirname(S);Na(r,$,Z.join(e,"."),function(I,_){if(I)return v(I);if(!_)return v(new Error($+" is not a valid path"));Oa($,{fs:r,own:s,uid:g.uid,gid:g.gid},function(L){if(L)return v(L);switch(g.type){case"file":return R();case"link":return D();case"symlink":return C()}if(p)return v(new Error("unsupported type for "+S+" ("+g.type+")"));y.resume(),v()})})}),t.finish&&a.on("finish",t.finish),a};function Na(e,t,r,o){if(t===r)return o(null,!0);e.lstat(t,function(n,i){if(n&&n.code!=="ENOENT")return o(n);if(n||i.isDirectory())return Na(e,Z.join(t,".."),r,o);o(null,!1)})}function Oa(e,t,r){Rd(e,{fs:t.fs},function(o,n){!o&&n&&t.own?_d(n,t.uid,t.gid,r):r(o)})}function _a(e,t){return t=Z.resolve(t),t===e||e.startsWith(t+Z.sep)}});c();c();var xr=Q(ue(),1);c();c();var wr=[{name:"npm",lockfile:"package-lock.json",alternativeLockfiles:["npm-shrinkwrap.json"],installCommand:"npm ci"},{name:"yarn",lockfile:"yarn.lock",installCommand:"yarn install --frozen-lockfile"},{name:"pnpm",lockfile:"pnpm-lock.yaml",installCommand:"pnpm install --frozen-lockfile"},{name:"bun",lockfile:"bun.lockb",alternativeLockfiles:["bun.lock"],installCommand:"bun install --frozen-lockfile"}];function gl(e){let t="No lockfile found",r="If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying. To avoid versioning issues, generate a new lockfile and commit it to your repository.",o=[["Generate a lockfile. Run",{command:"npm|yarn|pnpm install"}],"Commit the new file to your repository"];if(e)throw new E(t,r,o);Y({headline:t,body:r,nextSteps:o})}function yl(e,t){let r=e.map(({packageManager:s,foundLockfile:a})=>`${a} (created by ${s.name})`),o="Multiple lockfiles found",n=[`Your project contains more than one lockfile. This can cause version conflicts when installing and deploying your app. The following lockfiles were detected:
2
2
  `,{list:{items:r}}],i=["Delete any unneeded lockfiles","Commit the change to your repository"];if(t)throw new E(o,n,i);Y({headline:o,body:n,nextSteps:i})}function wl(e){let t="Lockfile ignored by Git",r="Your project\u2019s lockfile isn\u2019t being tracked by Git. If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying.",o=[`In your project\u2019s .gitignore file, delete any references to ${e}`,"Commit the change to your repository"];Y({headline:t,body:r,nextSteps:o})}async function Ci(e,t=!1){if(Ie&&!process.env.SHOPIFY_UNIT_TEST)return;let r=[];for(let i of wr){let s=[i.lockfile,...i.alternativeLockfiles||[]];for(let a of s)if(await G(T(e,a))){r.push({packageManager:i,foundLockfile:a});break}}if(r.length===0)return gl(t);if(r.length>1)return yl(r,t);let o=r[0].foundLockfile;(await Rn(e,[o]).catch(()=>[])).length>0&&wl(o)}c();var vl=["^cdn/","^_t/"];function vr(e){let t=new Set;return Object.values(e.routes).filter(r=>vl.some(o=>new RegExp(o).test(r.path??""))).forEach(r=>{r.path&&t.add(r.path)}),[...t]}var bl=["","cart","products/:productHandle","collections","collections/:collectionHandle","sitemap.xml","robots.txt","pages/:pageHandle","policies/:policyHandle","search","account","account/login","account/orders/:orderId","account/authorize"];function br(e,t=bl){let r=Object.values(e.routes),o=new Set(t);for(let n of t)for(let i of r)if(!n&&!i.path)o.delete(n);else if(n&&i.path){let s={path:i.path,parentId:i.parentId};for(;s.parentId&&s.parentId!=="root";){let d=r.find(u=>u.id===s.parentId);if(!d)break;s.path=d.path==null?s.path:`${d.path}/${s.path}`,s.parentId=d.parentId}let a=":?[^\\/\\?]+\\?",l=`^(${a}\\/)?`+n.replaceAll(".","\\.").replace(/\//g,`\\/(${a}\\/)?`).replace(/:[^/)?]+/g,"(:[^\\/]+|\\*)")+`(\\/${a})?$`;new RegExp(l).test(s.path)&&o.delete(n)}return[...o]}var Le=100;function Ti(e){e.length?Y({headline:"Standard Shopify routes missing",body:`Your Hydrogen project is missing ${e.length} standard Shopify route${e.length>1?"s":""}.
3
3
  Including these routes improves compatibility with Shopify\u2019s platform:
4
4
 
@@ -249,7 +249,7 @@ Skip the flag or provide the name of a template or example in the Hydrogen repos
249
249
  }
250
250
  }
251
251
  }
252
- `;async function za(e){let{hydrogenStorefronts:t}=await ot(qd,e);return t.map(r=>({...r,parsedId:nt(r.id)}))}var Zr=class e extends O{static descriptionWithMarkdown="Lists all remote Hydrogen storefronts available to link to your local development environment.";static description="Returns a list of Hydrogen storefronts available on a given shop.";static flags={...k.path};async run(){let{flags:t}=await this.parse(e);await Yd(t)}};async function Yd({path:e=process.cwd()}){let{session:t}=await ge(e),r=await za(t);r.length>0?(te(),F(Jd({storefronts:r,shop:t.storeFqdn}).toString()),r.forEach(({currentProductionDeployment:o,id:n,productionUrl:i,title:s})=>{te(),F(W`${H.whiteBright(s)} ${H.dim(`(id: ${nt(n)})`)}`.value),i&&F(W` ${H.whiteBright(i)}`.value),o&&F(W` ${H.dim(zd(o))}`.value)})):B({headline:"Hydrogen storefronts",body:"There are no Hydrogen storefronts on your Shop.",nextSteps:[`Ensure you are logged in to the correct shop (currently: ${t.storeFqdn})`,`Create a new Hydrogen storefront: Run \`${await z(e)} link\` or visit ${bs(t)}`]})}var Wd=new Intl.DateTimeFormat("default",{year:"numeric",month:"numeric",day:"numeric"});function zd(e){let t="";if(!e)return t;if(t+=Wd.format(new Date(e.createdAt)),e.commitMessage){let r=e.commitMessage.split(/\n/)[0];t+=`, ${r}`}return t}var Jd=({storefronts:e,shop:t})=>Ut(e,r=>`Showing ${r.length} Hydrogen storefronts for the store ${t}`,r=>`Showing 1 Hydrogen storefront for the store ${t}`);c();var eo=class e extends O{static descriptionWithMarkdown="Logs in to the specified shop and saves the shop domain to the project.";static description="Login to your Shopify account.";static flags={...k.path,...k.shop};async run(){let{flags:t}=await this.parse(e);await Qd(t)}};async function Qd({path:e=process.cwd(),shop:t}){te(),ii(!0);let{config:r}=await ge(e,t??!0);li(r)}c();var to=class e extends O{static descriptionWithMarkdown="Log out from the current shop.";static description="Logout of your local session.";static flags={...k.path};async run(){let{flags:t}=await this.parse(e);await Kd(t)}};async function Kd({path:e=process.cwd()}){te(),await ai(e),N({body:"You are logged out from Shopify."})}c();var rn=Q(ue(),1);c();async function Ja(e){let{startWorkerdServer:t}=await import("./workerd-4O3TCHAO.js");return t(e)}var ro=class e extends O{static descriptionWithMarkdown="Runs a server in your local development environment that serves your Hydrogen app's production build. Requires running the [build](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-build) command first.";static description="Runs a Hydrogen storefront in an Oxygen worker for production.";static flags={...k.path,...k.port,...k.env,...k.envBranch,...k.envFile,...k.inspectorPort,...k.debug,...k.verbose,build:rn.Flags.boolean({description:"Builds the app before starting the preview server."}),watch:rn.Flags.boolean({description:"Watches for changes and rebuilds the project.",dependsOn:["build"]}),...ve(k.entry,{entry:{dependsOn:["build"]}}),...ve(k.codegen,{codegen:{dependsOn:["build"]}})};async run(){let{flags:t}=await this.parse(e),r=t.path?T(t.path):process.cwd(),{close:o}=await Xd({...U(t),directory:r});He(async()=>{await o()})}};async function Xd({port:e,directory:t,env:r,envBranch:o,inspectorPort:n,debug:i,verbose:s,build:a=!1,watch:l=!1,codegen:d=!1,codegenConfigPath:u,entry:m,envFile:f}){process.env.NODE_ENV||(process.env.NODE_ENV=l?"development":"production"),s&&rr(),or()||it();let{root:p,buildPath:h,buildPathWorkerFile:b,buildPathClient:w}=xe(t),g=await rt(p);if(g)throw new E(Pe);let y,v=Tt(),P=a?await Je({...{directory:p,entry:m,disableRouteWarning:!1,lockfileCheck:!1,sourcemap:!0,bundleStats:!1,useCodegen:d,codegenConfigPath:u},watch:l,async onServerBuildFinish(){v.state==="pending"?v.resolve():F("\u{1F3D7}\uFE0F Project rebuilt. Reloading server..."),await y?.reload()}}):v.resolve();g||(b=(await he(p).catch(()=>null))?.serverOutFile??x(h,"server","index.js"));let{shop:C,storefront:D}=await tr(p),R=!!C&&!!D?.id,{allVariables:$,logInjectedVariables:I}=await hr({root:p,fetchRemote:R,envBranch:o,envHandle:r,envFile:f});e||(e=await pt(tt));let _=await pt(e+100);return await v.promise,I(),y=await Ja({root:p,appPort:e,assetsPort:_,env:$,buildPathClient:w,buildPathWorkerFile:b,inspectorPort:n,debug:i,watch:l}),y.showBanner({mode:"preview",headlinePrefix:l?"Watching for changes. ":""}),{async close(){await Promise.allSettled([y.close(),P?.close()])}}}c();var oo=class e extends O{static description="Scaffold routes and core functionality.";static flags={...k.path,...k.force,...k.markets,...k.shortcut,...ve(k.installDeps,{"install-deps":{default:!0}})};async run(){let{flags:t}=await this.parse(e),r=t.path?T(t.path):process.cwd();await Zd({...U(t),directory:r})}};async function Zd(e){let t=new qt,{rootDirectory:r,appDirectory:o}=await Ne(e.directory),n=Ze(r),i=z(),s=Promise.resolve(),a=[{title:"Setting up project",task:async()=>{await s}}],l=e.markets?e.markets:await Xt({abortSignal:t.signal,extraChoices:{none:"Set up later"}}),d=l==="none"?void 0:l,{setupRoutes:u}=nr(t),m,f=await Mn(".."),[p,h]=await Promise.all([G(x(r,"tsconfig.json")),kt("*.d.ts",{cwd:f})]);s=s.then(()=>Promise.all([...h.map(y=>Bt(x(f,y),T(r,y))),ir({rootDirectory:r,appDirectory:o,typescript:p})])).then(async()=>{m=await u(r,p?"ts":"js",{i18nStrategy:d,overwriteFileDeps:!0})}),d&&(s=s.then(()=>Kt(d,{rootDirectory:r})));let b=await Promise.resolve(i),{createShortcut:w,showShortcutBanner:g}=await sr(t,b,e.shortcut);!d&&!w||(w&&(s=s.then(async()=>{await w()&&(b=Ye)}),g()),await ee(a),await st({location:n,name:n,directory:r},{cliCommand:b,depsInstalled:!0,packageManager:"npm",i18n:d,routes:m}))}c();var Qa=Q(ue(),1);var no=class e extends O{static descriptionWithMarkdown="Adds support for certain CSS strategies to your project.";static description="Setup CSS strategies for your project.";static flags={...k.path,...k.force,...ve(k.installDeps,{"install-deps":{default:!0}})};static args={strategy:Qa.Args.string({name:"strategy",description:`The CSS strategy to setup. One of ${ko.join()}`,options:ko})};async run(){let{flags:t,args:r}=await this.parse(e),o=t.path?T(t.path):process.cwd();await eu({...U(t),strategy:r.strategy,directory:o})}};async function eu({strategy:e,directory:t,force:r=!1,installDeps:o=!0}){let n=await he(t).catch(()=>null);if(!n)throw new E("No Vite config found. This command is only supported in Vite projects.");let{remixConfig:i}=n,s=e||await qn();if(s==="css-modules"||s==="postcss"){N({headline:`Vite works out of the box with ${xt[s]}.`,body:`See the Vite documentation for more information:
252
+ `;async function za(e){let{hydrogenStorefronts:t}=await ot(qd,e);return t.map(r=>({...r,parsedId:nt(r.id)}))}var Zr=class e extends O{static descriptionWithMarkdown="Lists all remote Hydrogen storefronts available to link to your local development environment.";static description="Returns a list of Hydrogen storefronts available on a given shop.";static flags={...k.path};async run(){let{flags:t}=await this.parse(e);await Yd(t)}};async function Yd({path:e=process.cwd()}){let{session:t}=await ge(e),r=await za(t);r.length>0?(te(),F(Jd({storefronts:r,shop:t.storeFqdn}).toString()),r.forEach(({currentProductionDeployment:o,id:n,productionUrl:i,title:s})=>{te(),F(W`${H.whiteBright(s)} ${H.dim(`(id: ${nt(n)})`)}`.value),i&&F(W` ${H.whiteBright(i)}`.value),o&&F(W` ${H.dim(zd(o))}`.value)})):B({headline:"Hydrogen storefronts",body:"There are no Hydrogen storefronts on your Shop.",nextSteps:[`Ensure you are logged in to the correct shop (currently: ${t.storeFqdn})`,`Create a new Hydrogen storefront: Run \`${await z(e)} link\` or visit ${bs(t)}`]})}var Wd=new Intl.DateTimeFormat("default",{year:"numeric",month:"numeric",day:"numeric"});function zd(e){let t="";if(!e)return t;if(t+=Wd.format(new Date(e.createdAt)),e.commitMessage){let r=e.commitMessage.split(/\n/)[0];t+=`, ${r}`}return t}var Jd=({storefronts:e,shop:t})=>Ut(e,r=>`Showing ${r.length} Hydrogen storefronts for the store ${t}`,r=>`Showing 1 Hydrogen storefront for the store ${t}`);c();var eo=class e extends O{static descriptionWithMarkdown="Logs in to the specified shop and saves the shop domain to the project.";static description="Login to your Shopify account.";static flags={...k.path,...k.shop};async run(){let{flags:t}=await this.parse(e);await Qd(t)}};async function Qd({path:e=process.cwd(),shop:t}){te(),ii(!0);let{config:r}=await ge(e,t??!0);li(r)}c();var to=class e extends O{static descriptionWithMarkdown="Log out from the current shop.";static description="Logout of your local session.";static flags={...k.path};async run(){let{flags:t}=await this.parse(e);await Kd(t)}};async function Kd({path:e=process.cwd()}){te(),await ai(e),N({body:"You are logged out from Shopify."})}c();var rn=Q(ue(),1);c();async function Ja(e){let{startWorkerdServer:t}=await import("./workerd-VC3MCYDV.js");return t(e)}var ro=class e extends O{static descriptionWithMarkdown="Runs a server in your local development environment that serves your Hydrogen app's production build. Requires running the [build](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-build) command first.";static description="Runs a Hydrogen storefront in an Oxygen worker for production.";static flags={...k.path,...k.port,...k.env,...k.envBranch,...k.envFile,...k.inspectorPort,...k.debug,...k.verbose,build:rn.Flags.boolean({description:"Builds the app before starting the preview server."}),watch:rn.Flags.boolean({description:"Watches for changes and rebuilds the project.",dependsOn:["build"]}),...ve(k.entry,{entry:{dependsOn:["build"]}}),...ve(k.codegen,{codegen:{dependsOn:["build"]}})};async run(){let{flags:t}=await this.parse(e),r=t.path?T(t.path):process.cwd(),{close:o}=await Xd({...U(t),directory:r});He(async()=>{await o()})}};async function Xd({port:e,directory:t,env:r,envBranch:o,inspectorPort:n,debug:i,verbose:s,build:a=!1,watch:l=!1,codegen:d=!1,codegenConfigPath:u,entry:m,envFile:f}){process.env.NODE_ENV||(process.env.NODE_ENV=l?"development":"production"),s&&rr(),or()||it();let{root:p,buildPath:h,buildPathWorkerFile:b,buildPathClient:w}=xe(t),g=await rt(p);if(g)throw new E(Pe);let y,v=Tt(),P=a?await Je({...{directory:p,entry:m,disableRouteWarning:!1,lockfileCheck:!1,sourcemap:!0,bundleStats:!1,useCodegen:d,codegenConfigPath:u},watch:l,async onServerBuildFinish(){v.state==="pending"?v.resolve():F("\u{1F3D7}\uFE0F Project rebuilt. Reloading server..."),await y?.reload()}}):v.resolve();g||(b=(await he(p).catch(()=>null))?.serverOutFile??x(h,"server","index.js"));let{shop:C,storefront:D}=await tr(p),R=!!C&&!!D?.id,{allVariables:$,logInjectedVariables:I}=await hr({root:p,fetchRemote:R,envBranch:o,envHandle:r,envFile:f});e||(e=await pt(tt));let _=await pt(e+100);return await v.promise,I(),y=await Ja({root:p,appPort:e,assetsPort:_,env:$,buildPathClient:w,buildPathWorkerFile:b,inspectorPort:n,debug:i,watch:l}),y.showBanner({mode:"preview",headlinePrefix:l?"Watching for changes. ":""}),{async close(){await Promise.allSettled([y.close(),P?.close()])}}}c();var oo=class e extends O{static description="Scaffold routes and core functionality.";static flags={...k.path,...k.force,...k.markets,...k.shortcut,...ve(k.installDeps,{"install-deps":{default:!0}})};async run(){let{flags:t}=await this.parse(e),r=t.path?T(t.path):process.cwd();await Zd({...U(t),directory:r})}};async function Zd(e){let t=new qt,{rootDirectory:r,appDirectory:o}=await Ne(e.directory),n=Ze(r),i=z(),s=Promise.resolve(),a=[{title:"Setting up project",task:async()=>{await s}}],l=e.markets?e.markets:await Xt({abortSignal:t.signal,extraChoices:{none:"Set up later"}}),d=l==="none"?void 0:l,{setupRoutes:u}=nr(t),m,f=await Mn(".."),[p,h]=await Promise.all([G(x(r,"tsconfig.json")),kt("*.d.ts",{cwd:f})]);s=s.then(()=>Promise.all([...h.map(y=>Bt(x(f,y),T(r,y))),ir({rootDirectory:r,appDirectory:o,typescript:p})])).then(async()=>{m=await u(r,p?"ts":"js",{i18nStrategy:d,overwriteFileDeps:!0})}),d&&(s=s.then(()=>Kt(d,{rootDirectory:r})));let b=await Promise.resolve(i),{createShortcut:w,showShortcutBanner:g}=await sr(t,b,e.shortcut);!d&&!w||(w&&(s=s.then(async()=>{await w()&&(b=Ye)}),g()),await ee(a),await st({location:n,name:n,directory:r},{cliCommand:b,depsInstalled:!0,packageManager:"npm",i18n:d,routes:m}))}c();var Qa=Q(ue(),1);var no=class e extends O{static descriptionWithMarkdown="Adds support for certain CSS strategies to your project.";static description="Setup CSS strategies for your project.";static flags={...k.path,...k.force,...ve(k.installDeps,{"install-deps":{default:!0}})};static args={strategy:Qa.Args.string({name:"strategy",description:`The CSS strategy to setup. One of ${ko.join()}`,options:ko})};async run(){let{flags:t,args:r}=await this.parse(e),o=t.path?T(t.path):process.cwd();await eu({...U(t),strategy:r.strategy,directory:o})}};async function eu({strategy:e,directory:t,force:r=!1,installDeps:o=!0}){let n=await he(t).catch(()=>null);if(!n)throw new E("No Vite config found. This command is only supported in Vite projects.");let{remixConfig:i}=n,s=e||await qn();if(s==="css-modules"||s==="postcss"){N({headline:`Vite works out of the box with ${xt[s]}.`,body:`See the Vite documentation for more information:
253
253
  ${So[s]}`});return}let a=await Gn(s,i,r);if(!a)return;let{workPromise:l,generatedAssets:d,needsInstallDeps:u}=a,m=[{title:"Updating files",task:async()=>{await l}}],f=!1;if(o&&u){let p=Ee(i.rootDirectory);m.push({title:"Installing new dependencies",task:async()=>{let h=await p;f=h==="npm"||h==="unknown",await Yt({directory:i.rootDirectory,packageManager:h,args:[]})}})}await ee(m),N({headline:`${xt[s]} setup complete.`,body:(d.length>0?`You can now modify CSS configuration in the following files:
254
254
  `+d.map(p=>` - ${p}`).join(`
255
255
  `)+`
@@ -1,4 +1,4 @@
1
- import{a as X,b as H,c as K}from"./chunk-7D6UVALL.js";import{a as M,c as P,e as h,f as T,h as q,i as V,m as U,p as _,q as F,r as j,s as z,u as Q}from"./chunk-Z6XAKBEX.js";import{a as W}from"./chunk-EB2SLRLG.js";import{a as G,b as J}from"./chunk-AOZJVY2C.js";import{b as L}from"./chunk-BJLBQAYG.js";import{E as R,a as D,u as v,v as d,w as E,x as A}from"./chunk-WNPRFDZX.js";import{m as f,p as x}from"./chunk-OUPJTPTH.js";import{Fb as r,Hb as s,Lb as N,Ta as $,ma as S,ua as I}from"./chunk-UHI4NMIL.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();m();async function oe(t,e){if(t)return t.join(`
1
+ import{a as X,b as H,c as K}from"./chunk-XBFXB6S6.js";import{a as M,c as P,e as h,f as T,h as q,i as V,m as U,p as _,q as F,r as j,s as z,u as Q}from"./chunk-HXJ7HJFS.js";import{a as W}from"./chunk-X2ZCC772.js";import{a as G,b as J}from"./chunk-33AVVFWW.js";import{b as L}from"./chunk-BPRY3O4N.js";import{E as R,a as D,u as v,v as d,w as E,x as A}from"./chunk-SQVJGTTD.js";import{m as f,p as x}from"./chunk-O6BUPYXH.js";import{Fb as r,Hb as s,Lb as N,Ta as $,ma as S,ua as I}from"./chunk-KNLPWHHJ.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();m();async function oe(t,e){if(t)return t.join(`
2
2
  `);if(e){if(!await $(e))throw new f(s`Variable file not found at ${r.path(e)}. Please check the path and try again.`);return S(e,{encoding:"utf8"})}else return}async function Z(t){let{organization:e,remoteApp:i,store:n,query:a,variables:p,variableFile:k,outputFile:B,watch:ee=!1,version:te}=t,{adminSession:c,version:w}=await R({title:s`Authenticating`,task:async()=>{let o=await X(i,n.shopDomain),u=await T({adminSession:o,userSpecifiedVersion:te,minimumDefaultVersion:M});return{adminSession:o,version:u}},renderOptions:{stdout:process.stderr}}),C=await oe(p,k);ae(a,C),K(a,n),v({headline:"Starting bulk operation.",body:[{list:{items:H({organization:e,remoteApp:i,storeFqdn:n.shopDomain,version:w})}}]});let y=h(a)?await V({adminSession:c,query:a,variablesJsonl:C,version:w}):await q({adminSession:c,query:a,version:w});if(y?.userErrors?.length){A({headline:"Error creating bulk operation.",body:{list:{items:y.userErrors.map(o=>o.field?`${o.field.join(".")}: ${o.message}`:o.message)}}});return}let g=y?.bulkOperation;if(g)if(ee){let o=new D,u=await F(c,g.id,o.signal,()=>o.abort());o.signal.aborted?v({headline:`Bulk operation ${u.id} is still running in the background.`,body:b(u.id)}):await Y(u,B)}else{let o=await _(c,g.id);["FAILED","CANCELED","EXPIRED"].includes(o.status)?await Y(o,B):d({headline:"Bulk operation is running.",body:b(o.id),customSections:[{body:[{list:{items:[s`ID: ${r.cyan(o.id)}`.value]}}]}]})}else throw E({headline:"Bulk operation not created successfully.",body:"This is an unexpected error. Please try again later."}),new x("Bulk operation response returned null with no error message.")}async function Y(t,e){let i=U(t).value,a=[{body:[{list:{items:[s`ID: ${r.cyan(t.id)}`.value,s`Status: ${r.yellow(t.status)}`.value,s`Created at: ${r.gray(String(t.createdAt))}`.value,...t.completedAt?[s`Completed at: ${r.gray(String(t.completedAt))}`.value]:[]]}}]}];switch(t.status){case"CREATED":d({headline:"Bulk operation started.",body:b(t.id),customSections:a});break;case"RUNNING":d({headline:"Bulk operation is running.",body:b(t.id),customSections:a});break;case"COMPLETED":if(t.url){let p=await j(t.url),k=z(p);e?await I(e,p):N(p),k?E({headline:"Bulk operation completed with errors.",body:e?`Results written to ${e}. Check file for error details.`:"Check results for error details.",customSections:a}):d({headline:i,body:e?[`Results written to ${e}`]:void 0,customSections:a})}else d({headline:i,customSections:a});break;case"CANCELED":case"CANCELING":case"EXPIRED":case"FAILED":A({headline:i,customSections:a});break}}function ae(t,e){if(h(t)&&!e)throw new f(s`Bulk mutations require variables. Provide a JSONL file with ${r.yellow("--variable-file")} or individual JSON objects with ${r.yellow("--variables")}.`);if(!h(t)&&e)throw new f(s`The ${r.yellow("--variables")} and ${r.yellow("--variable-file")} flags can only be used with mutations, not queries.`)}function b(t){return[`Monitor its progress with:
3
3
  `,{command:`shopify app bulk status --id=${P(t)}`}]}var O,l=class extends W{async run(){let{flags:e}=await this.parse(O),{query:i,appContextResult:n,store:a}=await Q(e);return await Z({organization:n.organization,remoteApp:n.remoteApp,store:a,query:i,variables:e.variables,variableFile:e["variable-file"],watch:e.watch??!1,outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:n.app}}};O=l;l.summary="Execute bulk operations.";l.descriptionWithMarkdown=`Executes an Admin API GraphQL query or mutation on the specified store, as a bulk operation. Mutations are only allowed on dev stores.
4
4
 
@@ -1 +1 @@
1
- import{X as f,aa as g,ba as p}from"./chunk-BEN4UG4L.js";import{b as u,c,d}from"./chunk-BJLBQAYG.js";import{b as l}from"./chunk-VP3PA6DV.js";import{C as m}from"./chunk-WNPRFDZX.js";import{Lb as s}from"./chunk-UHI4NMIL.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();async function h(t){let i;try{i=await p()}catch(o){if(t.json&&o instanceof g){s(JSON.stringify({organizations:[]},null,2));return}throw o}if(t.json){let o={organizations:i.map(r=>({id:r.id,gid:f(r.id),name:r.businessName}))};s(JSON.stringify(o,null,2));return}y(i)}function y(t){let i=t.map(o=>({id:o.id,name:o.businessName}));m({rows:i,columns:{id:{header:"ID"},name:{header:"NAME"}}})}var e,a=class extends l{async run(){let{flags:i}=await this.parse(e);await h({json:i.json})}};e=a;a.baseFlags=d;a.summary="List Shopify organizations you have access to.";a.descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs.";a.description=e.descriptionWithoutMarkdown();a.flags={...u,...c};var x=a;export{x as a};
1
+ import{X as f,aa as g,ba as p}from"./chunk-FDQNY7RF.js";import{b as u,c,d}from"./chunk-BPRY3O4N.js";import{b as l}from"./chunk-3PFIBTES.js";import{C as m}from"./chunk-SQVJGTTD.js";import{Lb as s}from"./chunk-KNLPWHHJ.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();async function h(t){let i;try{i=await p()}catch(o){if(t.json&&o instanceof g){s(JSON.stringify({organizations:[]},null,2));return}throw o}if(t.json){let o={organizations:i.map(r=>({id:r.id,gid:f(r.id),name:r.businessName}))};s(JSON.stringify(o,null,2));return}y(i)}function y(t){let i=t.map(o=>({id:o.id,name:o.businessName}));m({rows:i,columns:{id:{header:"ID"},name:{header:"NAME"}}})}var e,a=class extends l{async run(){let{flags:i}=await this.parse(e);await h({json:i.json})}};e=a;a.baseFlags=d;a.summary="List Shopify organizations you have access to.";a.descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs.";a.description=e.descriptionWithoutMarkdown();a.flags={...u,...c};var x=a;export{x as a};
@@ -1,4 +1,4 @@
1
- import{b as ly}from"./chunk-R3WCJACL.js";import{a as Mc,e as jc,f as Bc}from"./chunk-LAOIEVSU.js";import{a as $c}from"./chunk-ITL4KB5G.js";import{c as Rc,i as Lc,o as cy}from"./chunk-2S3FHQFS.js";import{b as fn}from"./chunk-VP3PA6DV.js";import{N as bc,P as Dc,Q as Cc,fa as Sc,ma as Pc,o as Ec,y as cn}from"./chunk-REQPTZOU.js";import{B as Tc,D as Oc,l as _c,m as Fc,p as kc,x as po}from"./chunk-TA6MIE6F.js";import{A as rt,D as Ic,F as Sr,d as uy,r as Be,u as mt,v as Cr,w as Xe,y as ln,z as tt}from"./chunk-WNPRFDZX.js";import{m as I,p as hn}from"./chunk-OUPJTPTH.js";import{$a as mc,Ca as uo,Ea as un,Fb as gt,Gb as Nc,Hb as Ar,Mb as it,Pb as me,T as cc,Ta as U,W as lc,Wa as pc,Y as hc,_ as fc,ia as Q0,ma as X,pa as br,qb as gc,sb as yc,ua as V,wa as on,ya as an,yb as Ac}from"./chunk-UHI4NMIL.js";import{u as W}from"./chunk-A4SBXDZB.js";import{a as Z0,b as dc}from"./chunk-LD6ZCTZ3.js";import{d as N,f as J,g as kt,i as le,j as Tt,k as sn,n as uc}from"./chunk-773TIA5M.js";import{a as vc,c as xc,d as co,e as Dr,f as ry,g as lo,h as iy,i as ny,j as wc,k as ho,m as sy,n as fo,p as oy,u as ay}from"./chunk-TR4OWSEX.js";import{a as ty,b as et}from"./chunk-2KD4LHRT.js";import{b as ey}from"./chunk-I5A6BPCP.js";import{a as _,c as E,e as nn,g as y}from"./chunk-VKWPEFWQ.js";var Ot=E(mo=>{"use strict";y();Object.defineProperty(mo,"__esModule",{value:!0});var dy=e=>{process.stdout.write(e)},py=e=>{process.stderr.write(e)};mo.default={stderr:py,stdout:dy}});var yt=E(Ce=>{"use strict";y();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.existsSync=Ce.safeReadJson=Ce.readJsonSync=Ce.readJson=Ce.fileExists=Ce.dirExists=void 0;var zc=_("node:fs"),go=_("node:fs/promises"),my=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No directory found at ${e}`)}if(!t.isDirectory())throw new Error(`${e} exists but is not a directory`);return e};Ce.dirExists=my;var gy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No file found at ${e}`)}if(!t.isFile())throw new Error(`${e} exists but is not a file`);return e};Ce.fileExists=gy;async function Jc(e){let t=await(0,go.readFile)(e,"utf8");return JSON.parse(t)}Ce.readJson=Jc;function yy(e,t=!0){let r=(0,zc.readFileSync)(e,"utf8");return t?JSON.parse(r):r}Ce.readJsonSync=yy;async function vy(e){try{return await Jc(e)}catch{}}Ce.safeReadJson=vy;function xy(e){return(0,zc.existsSync)(e)}Ce.existsSync=xy});var oe=E(q=>{"use strict";y();Object.defineProperty(q,"__esModule",{value:!0});q.mergeNestedObjects=q.mapValues=q.uniq=q.isNotFalsy=q.isTruthy=q.capitalize=q.sumBy=q.maxBy=q.isProd=q.castArray=q.sortBy=q.last=q.uniqBy=q.compact=q.pickBy=void 0;function wy(e,t){return Object.entries(e).reduce((r,[i,n])=>(t(n)&&(r[i]=n),r),{})}q.pickBy=wy;function Ey(e){return e.filter(t=>!!t)}q.compact=Ey;function by(e,t){return e.filter((r,i)=>{let n=t(r);return!e.some((o,s)=>s>i&&t(o)===n)})}q.uniqBy=by;function Dy(e){if(e)return e.at(-1)}q.last=Dy;function yo(e,t){if(e=e===void 0?0:e,t=t===void 0?0:t,Array.isArray(e)&&Array.isArray(t)){if(e.length===0&&t.length===0)return 0;let r=yo(e[0],t[0]);return r!==0?r:yo(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Cy(e,t){return e.sort((r,i)=>yo(t(r),t(i)))}q.sortBy=Cy;function Sy(e){return e===void 0?[]:Array.isArray(e)?e:[e]}q.castArray=Sy;function Ay(){return!["development","test"].includes(process.env.NODE_ENV??"")}q.isProd=Ay;function _y(e,t){if(e.length!==0)return e.reduce((r,i)=>{let n=t(i),o=t(r);return n>o?i:r})}q.maxBy=_y;function Fy(e,t){return e.reduce((r,i)=>r+t(i),0)}q.sumBy=Fy;function ky(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}q.capitalize=ky;function Ty(e){return["1","true","y","yes"].includes(e.toLowerCase())}q.isTruthy=Ty;function Oy(e){return!["0","false","n","no"].includes(e.toLowerCase())}q.isNotFalsy=Oy;function Py(e){return[...new Set(e)].sort()}q.uniq=Py;function Iy(e,t){return Object.entries(e).reduce((r,[i,n])=>(r[i]=t(n,i),r),{})}q.mapValues=Iy;function Ny(e,t){return t.split(".").reduce((r,i)=>r?.[i],e)}function My(e,t){return Object.fromEntries(e.flatMap(r=>Object.entries(Ny(r,t)??{})).reverse())}q.mergeNestedObjects=My});var Gc=E(ge=>{"use strict";y();Object.defineProperty(ge,"__esModule",{value:!0});ge.string=ge.url=ge.file=ge.directory=ge.integer=ge.boolean=ge.custom=void 0;var jy=_("node:url"),Wc=yt(),By=oe();function Vt(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],type:"option"})}ge.custom=Vt;ge.boolean=Vt({parse:async e=>!!e&&(0,By.isNotFalsy)(e)});ge.integer=Vt({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Error(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Error(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Error(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});ge.directory=Vt({async parse(e,t,r){return r.exists?(0,Wc.dirExists)(e):e}});ge.file=Vt({async parse(e,t,r){return r.exists?(0,Wc.fileExists)(e):e}});ge.url=Vt({async parse(e){try{return new jy.URL(e)}catch{throw new Error(`Expected a valid url but received: ${e}`)}}});var Ry=Vt({});ge.string=Ry});var Xc=E((nT,Ly)=>{Ly.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"3.26.5",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"@types/cli-progress":"^3.11.5","ansi-escapes":"^4.3.2","ansi-styles":"^4.3.0",cardinal:"^2.1.1",chalk:"^4.1.2","clean-stack":"^3.0.1","cli-progress":"^3.12.0",color:"^4.2.3",debug:"^4.3.4",ejs:"^3.1.10","get-package-type":"^0.1.0",globby:"^11.1.0",hyperlinker:"^1.0.0","indent-string":"^4.0.0","is-wsl":"^2.2.0","js-yaml":"^3.14.1",minimatch:"^9.0.4","natural-orderby":"^2.0.3","object-treeify":"^1.1.33","password-prompt":"^1.1.3","slice-ansi":"^4.0.0","string-width":"^4.2.3","strip-ansi":"^6.0.1","supports-color":"^8.1.1","supports-hyperlinks":"^2.2.0","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^17.8.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^4","@oclif/prettier-config":"^0.2.1","@oclif/test":"^3.2.11","@types/ansi-styles":"^3.2.1","@types/benchmark":"^2.1.5","@types/chai":"^4.3.11","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/color":"^3.0.6","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/js-yaml":"^3.12.7","@types/mocha":"^10.0.6","@types/node":"^18","@types/node-notifier":"^8.0.5","@types/pnpapi":"^0.0.5","@types/slice-ansi":"^4.0.0","@types/strip-ansi":"^5.2.1","@types/supports-color":"^8.1.1","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.4.1","chai-as-promised":"^7.1.1",commitlint:"^17.8.1","cross-env":"^7.0.3",eslint:"^8.57.0","eslint-config-oclif":"^5.1.3","eslint-config-oclif-typescript":"^3.1.6","eslint-config-prettier":"^9.1.0","fancy-test":"^3.0.14",globby:"^11.1.0",husky:"^8","lint-staged":"^14.0.1",madge:"^6.1.0",mocha:"^10.4.0",nyc:"^15.1.0",prettier:"^3.2.5",shx:"^0.3.4",sinon:"^16.1.3","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib","/flush.js","/flush.d.ts","/handle.js"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",main:"./lib/index.js",repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",commitlint:"commitlint",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint . --ext .ts",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky install",pretest:"yarn build && tsc -p test --noEmit --skipLibCheck","test:circular-deps":"madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts"'},types:"lib/index.d.ts"}});var Ve=E(xo=>{"use strict";y();Object.defineProperty(xo,"__esModule",{value:!0});var $y=_("node:fs"),qy=_("node:path"),vo=class e extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return e.instance||(e.instance=new e),e.instance}get(t){return super.get(t)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:Xc().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,$y.readFileSync)((0,qy.join)(__dirname,"..","package.json"),"utf8"))}}catch{return{name:"@oclif/core",version:"unknown"}}}}};xo.default=vo});var Pt=E(dn=>{"use strict";y();Object.defineProperty(dn,"__esModule",{value:!0});dn.settings=void 0;global.oclif||(global.oclif={});dn.settings=global.oclif});var Yt=E(_r=>{"use strict";y();Object.defineProperty(_r,"__esModule",{value:!0});_r.errtermwidth=_r.stdtermwidth=void 0;var Uy=Pt();function Vc(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var Yc=Number.parseInt(process.env.OCLIF_COLUMNS,10)||Uy.settings.columns;_r.stdtermwidth=Yc||Vc(process.stdout);_r.errtermwidth=Yc||Vc(process.stderr)});var bo=E(pn=>{"use strict";y();Object.defineProperty(pn,"__esModule",{value:!0});pn.Logger=void 0;var Kc=_("node:fs/promises"),Hy=_("node:path"),zy=Dr(),Jy=()=>new Date().toISOString(),wo,Wy=e=>new Promise(t=>{wo&&wo.unref(),wo=setTimeout(()=>t(null),e)});function Gy(e){return e.endsWith(`
1
+ import{b as ly}from"./chunk-R3WCJACL.js";import{a as Mc,e as jc,f as Bc}from"./chunk-AK4NPOQG.js";import{a as $c}from"./chunk-YKAMTVJM.js";import{c as Rc,i as Lc,o as cy}from"./chunk-2S3FHQFS.js";import{b as fn}from"./chunk-3PFIBTES.js";import{N as bc,P as Dc,Q as Cc,fa as Sc,ma as Pc,o as Ec,y as cn}from"./chunk-OQ6WYWG4.js";import{B as Tc,D as Oc,l as _c,m as Fc,p as kc,x as po}from"./chunk-SH5VEQ7F.js";import{A as rt,D as Ic,F as Sr,d as uy,r as Be,u as mt,v as Cr,w as Xe,y as ln,z as tt}from"./chunk-SQVJGTTD.js";import{m as I,p as hn}from"./chunk-O6BUPYXH.js";import{$a as mc,Ca as uo,Ea as un,Fb as gt,Gb as Nc,Hb as Ar,Mb as it,Pb as me,T as cc,Ta as U,W as lc,Wa as pc,Y as hc,_ as fc,ia as Q0,ma as X,pa as br,qb as gc,sb as yc,ua as V,wa as on,ya as an,yb as Ac}from"./chunk-KNLPWHHJ.js";import{u as W}from"./chunk-A4SBXDZB.js";import{a as Z0,b as dc}from"./chunk-LD6ZCTZ3.js";import{d as N,f as J,g as kt,i as le,j as Tt,k as sn,n as uc}from"./chunk-773TIA5M.js";import{a as vc,c as xc,d as co,e as Dr,f as ry,g as lo,h as iy,i as ny,j as wc,k as ho,m as sy,n as fo,p as oy,u as ay}from"./chunk-TR4OWSEX.js";import{a as ty,b as et}from"./chunk-2KD4LHRT.js";import{b as ey}from"./chunk-I5A6BPCP.js";import{a as _,c as E,e as nn,g as y}from"./chunk-VKWPEFWQ.js";var Ot=E(mo=>{"use strict";y();Object.defineProperty(mo,"__esModule",{value:!0});var dy=e=>{process.stdout.write(e)},py=e=>{process.stderr.write(e)};mo.default={stderr:py,stdout:dy}});var yt=E(Ce=>{"use strict";y();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.existsSync=Ce.safeReadJson=Ce.readJsonSync=Ce.readJson=Ce.fileExists=Ce.dirExists=void 0;var zc=_("node:fs"),go=_("node:fs/promises"),my=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No directory found at ${e}`)}if(!t.isDirectory())throw new Error(`${e} exists but is not a directory`);return e};Ce.dirExists=my;var gy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No file found at ${e}`)}if(!t.isFile())throw new Error(`${e} exists but is not a file`);return e};Ce.fileExists=gy;async function Jc(e){let t=await(0,go.readFile)(e,"utf8");return JSON.parse(t)}Ce.readJson=Jc;function yy(e,t=!0){let r=(0,zc.readFileSync)(e,"utf8");return t?JSON.parse(r):r}Ce.readJsonSync=yy;async function vy(e){try{return await Jc(e)}catch{}}Ce.safeReadJson=vy;function xy(e){return(0,zc.existsSync)(e)}Ce.existsSync=xy});var oe=E(q=>{"use strict";y();Object.defineProperty(q,"__esModule",{value:!0});q.mergeNestedObjects=q.mapValues=q.uniq=q.isNotFalsy=q.isTruthy=q.capitalize=q.sumBy=q.maxBy=q.isProd=q.castArray=q.sortBy=q.last=q.uniqBy=q.compact=q.pickBy=void 0;function wy(e,t){return Object.entries(e).reduce((r,[i,n])=>(t(n)&&(r[i]=n),r),{})}q.pickBy=wy;function Ey(e){return e.filter(t=>!!t)}q.compact=Ey;function by(e,t){return e.filter((r,i)=>{let n=t(r);return!e.some((o,s)=>s>i&&t(o)===n)})}q.uniqBy=by;function Dy(e){if(e)return e.at(-1)}q.last=Dy;function yo(e,t){if(e=e===void 0?0:e,t=t===void 0?0:t,Array.isArray(e)&&Array.isArray(t)){if(e.length===0&&t.length===0)return 0;let r=yo(e[0],t[0]);return r!==0?r:yo(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Cy(e,t){return e.sort((r,i)=>yo(t(r),t(i)))}q.sortBy=Cy;function Sy(e){return e===void 0?[]:Array.isArray(e)?e:[e]}q.castArray=Sy;function Ay(){return!["development","test"].includes(process.env.NODE_ENV??"")}q.isProd=Ay;function _y(e,t){if(e.length!==0)return e.reduce((r,i)=>{let n=t(i),o=t(r);return n>o?i:r})}q.maxBy=_y;function Fy(e,t){return e.reduce((r,i)=>r+t(i),0)}q.sumBy=Fy;function ky(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}q.capitalize=ky;function Ty(e){return["1","true","y","yes"].includes(e.toLowerCase())}q.isTruthy=Ty;function Oy(e){return!["0","false","n","no"].includes(e.toLowerCase())}q.isNotFalsy=Oy;function Py(e){return[...new Set(e)].sort()}q.uniq=Py;function Iy(e,t){return Object.entries(e).reduce((r,[i,n])=>(r[i]=t(n,i),r),{})}q.mapValues=Iy;function Ny(e,t){return t.split(".").reduce((r,i)=>r?.[i],e)}function My(e,t){return Object.fromEntries(e.flatMap(r=>Object.entries(Ny(r,t)??{})).reverse())}q.mergeNestedObjects=My});var Gc=E(ge=>{"use strict";y();Object.defineProperty(ge,"__esModule",{value:!0});ge.string=ge.url=ge.file=ge.directory=ge.integer=ge.boolean=ge.custom=void 0;var jy=_("node:url"),Wc=yt(),By=oe();function Vt(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],type:"option"})}ge.custom=Vt;ge.boolean=Vt({parse:async e=>!!e&&(0,By.isNotFalsy)(e)});ge.integer=Vt({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Error(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Error(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Error(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});ge.directory=Vt({async parse(e,t,r){return r.exists?(0,Wc.dirExists)(e):e}});ge.file=Vt({async parse(e,t,r){return r.exists?(0,Wc.fileExists)(e):e}});ge.url=Vt({async parse(e){try{return new jy.URL(e)}catch{throw new Error(`Expected a valid url but received: ${e}`)}}});var Ry=Vt({});ge.string=Ry});var Xc=E((nT,Ly)=>{Ly.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"3.26.5",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"@types/cli-progress":"^3.11.5","ansi-escapes":"^4.3.2","ansi-styles":"^4.3.0",cardinal:"^2.1.1",chalk:"^4.1.2","clean-stack":"^3.0.1","cli-progress":"^3.12.0",color:"^4.2.3",debug:"^4.3.4",ejs:"^3.1.10","get-package-type":"^0.1.0",globby:"^11.1.0",hyperlinker:"^1.0.0","indent-string":"^4.0.0","is-wsl":"^2.2.0","js-yaml":"^3.14.1",minimatch:"^9.0.4","natural-orderby":"^2.0.3","object-treeify":"^1.1.33","password-prompt":"^1.1.3","slice-ansi":"^4.0.0","string-width":"^4.2.3","strip-ansi":"^6.0.1","supports-color":"^8.1.1","supports-hyperlinks":"^2.2.0","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^17.8.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^4","@oclif/prettier-config":"^0.2.1","@oclif/test":"^3.2.11","@types/ansi-styles":"^3.2.1","@types/benchmark":"^2.1.5","@types/chai":"^4.3.11","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/color":"^3.0.6","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/js-yaml":"^3.12.7","@types/mocha":"^10.0.6","@types/node":"^18","@types/node-notifier":"^8.0.5","@types/pnpapi":"^0.0.5","@types/slice-ansi":"^4.0.0","@types/strip-ansi":"^5.2.1","@types/supports-color":"^8.1.1","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.4.1","chai-as-promised":"^7.1.1",commitlint:"^17.8.1","cross-env":"^7.0.3",eslint:"^8.57.0","eslint-config-oclif":"^5.1.3","eslint-config-oclif-typescript":"^3.1.6","eslint-config-prettier":"^9.1.0","fancy-test":"^3.0.14",globby:"^11.1.0",husky:"^8","lint-staged":"^14.0.1",madge:"^6.1.0",mocha:"^10.4.0",nyc:"^15.1.0",prettier:"^3.2.5",shx:"^0.3.4",sinon:"^16.1.3","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib","/flush.js","/flush.d.ts","/handle.js"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",main:"./lib/index.js",repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",commitlint:"commitlint",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint . --ext .ts",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky install",pretest:"yarn build && tsc -p test --noEmit --skipLibCheck","test:circular-deps":"madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts"'},types:"lib/index.d.ts"}});var Ve=E(xo=>{"use strict";y();Object.defineProperty(xo,"__esModule",{value:!0});var $y=_("node:fs"),qy=_("node:path"),vo=class e extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return e.instance||(e.instance=new e),e.instance}get(t){return super.get(t)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:Xc().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,$y.readFileSync)((0,qy.join)(__dirname,"..","package.json"),"utf8"))}}catch{return{name:"@oclif/core",version:"unknown"}}}}};xo.default=vo});var Pt=E(dn=>{"use strict";y();Object.defineProperty(dn,"__esModule",{value:!0});dn.settings=void 0;global.oclif||(global.oclif={});dn.settings=global.oclif});var Yt=E(_r=>{"use strict";y();Object.defineProperty(_r,"__esModule",{value:!0});_r.errtermwidth=_r.stdtermwidth=void 0;var Uy=Pt();function Vc(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var Yc=Number.parseInt(process.env.OCLIF_COLUMNS,10)||Uy.settings.columns;_r.stdtermwidth=Yc||Vc(process.stdout);_r.errtermwidth=Yc||Vc(process.stderr)});var bo=E(pn=>{"use strict";y();Object.defineProperty(pn,"__esModule",{value:!0});pn.Logger=void 0;var Kc=_("node:fs/promises"),Hy=_("node:path"),zy=Dr(),Jy=()=>new Date().toISOString(),wo,Wy=e=>new Promise(t=>{wo&&wo.unref(),wo=setTimeout(()=>t(null),e)});function Gy(e){return e.endsWith(`
2
2
  `)?e.replace(/\n$/,""):e}var Eo=class{file;buffer=[];flushing=Promise.resolve();constructor(t){this.file=t}async flush(t=0){await Wy(t),this.flushing=this.flushing.then(async()=>{if(this.buffer.length===0)return;let r=this.buffer;this.buffer=[],await(0,Kc.mkdir)((0,Hy.dirname)(this.file),{recursive:!0}),await(0,Kc.appendFile)(this.file,r.join(`
3
3
  `)+`
4
4
  `)}),await this.flushing}log(t){t=zy(Gy(t));let r=t.split(`
@@ -1,4 +1,4 @@
1
- import{a as D}from"./chunk-7UMDQ3ZG.js";import{b as ne,c as re}from"./chunk-DOAKDW2X.js";import{c as ee,d as te}from"./chunk-PEC3D242.js";import{A as T}from"./chunk-4Z3NOOAC.js";import{a as Z}from"./chunk-EB2SLRLG.js";import{a as Q}from"./chunk-AOZJVY2C.js";import{wa as X}from"./chunk-54NHTRQI.js";import{b as Y,c as V}from"./chunk-BJLBQAYG.js";import{B as q,a as S,i as K,j as U,k as b,p as C}from"./chunk-WNPRFDZX.js";import{a as J}from"./chunk-4ZQTYDNB.js";import{m as M}from"./chunk-OUPJTPTH.js";import{eb as O,fb as l,gb as s,ib as j,jb as G,kb as H,ma as N}from"./chunk-UHI4NMIL.js";import{f as z}from"./chunk-EDZ3YWOD.js";import{d as I}from"./chunk-773TIA5M.js";import{a as ye}from"./chunk-M5GXA5W4.js";import{e as R,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();c();c();var y=R(O(),1);import{Writable as oe}from"stream";function ie({selectedRun:e,abortController:t,app:o,extension:r,appWatcher:i}){let a={type:"functionRun",input:e.payload.input,output:e.payload.output,logs:e.payload.logs,name:e.source,size:0,memory_usage:0,instructions:e.payload.fuelConsumed},[u,f]=(0,y.useState)([]),[p,m]=(0,y.useState)([a,a]),[w,d]=(0,y.useState)(void 0),{input:E,export:$}=e.payload,[fe,L]=(0,y.useState)(`Watching for changes to ${e.source}...`);return(0,y.useEffect)(()=>{let A=new S;t.signal.addEventListener("abort",()=>{A.abort()});let B=async()=>{let F=await we(r,JSON.stringify(E),$);m(h=>[F,h[0]]),L(`Watching for changes to ${e.source}...`),f(h=>[...h,F])},de=async()=>{L("Replaying log with local function..."),await B()},ge=async()=>{i.onEvent(async h=>{let x=h.extensionEvents.find(v=>v.extension.handle===r.handle);if(!(!x||x.type!==ee.Updated)){if(x.buildResult?.status==="error"){d(`Error while reloading and building extension: ${x.buildResult?.error}`);return}d(void 0),L("Re-running with latest changes..."),await B()}});let F=new oe({write(h,x,v){f(he=>[...he,{type:"systemMessage",message:h.toString()}]),v()}});await i.start({stdout:F,stderr:F,signal:A.signal},!1)};return de().then(()=>{ge()}),()=>{A.abort()}},[E,$,o,r]),C(t.signal,async()=>{setTimeout(()=>{z()||J(process.pid,"SIGINT",!1,()=>{process.exit(0)})},2e3)}),{logs:u,statusMessage:fe,recentFunctionRuns:p,error:w}}async function we(e,t,o){let r="",i=new oe({write(u,f,p){r+=u,p()}});return await D({functionExtension:e,input:t,export:o,stdout:i,json:!0}),{...JSON.parse(r),type:"functionRun"}}var n=R(O(),1);var ae=({selectedRun:e,abortController:t,app:o,extension:r})=>{let{isAborted:i}=C(t.signal),{isRawModeSupported:a}=G(),u=new te(o),{logs:f,statusMessage:p,recentFunctionRuns:m,error:w}=ie({selectedRun:e,abortController:t,app:o,extension:r,appWatcher:u});return H((d,E)=>{U(d,E,()=>t.abort()),d==="q"&&t.abort()},{isActive:!!a}),n.default.createElement(n.default.Fragment,null,n.default.createElement(j,{items:f},(d,E)=>n.default.createElement(l,{key:`replayOutputScrollerLog${E}`,flexDirection:"column"},n.default.createElement(Se,{log:d}))),i?null:n.default.createElement(l,{marginY:1,paddingTop:1,flexDirection:"column",flexGrow:1,borderStyle:"single",borderBottom:!1,borderLeft:!1,borderRight:!1,borderTop:!0},a?n.default.createElement(l,{flexDirection:"column"},n.default.createElement(l,{flexDirection:"row"},n.default.createElement(s,null,b.pointerSmall," ",p)),n.default.createElement(Re,{recentFunctionRuns:m}),n.default.createElement(s,null,b.pointerSmall," Press ",n.default.createElement(s,{bold:!0},"q")," ",b.lineVertical," quit")):null,w?n.default.createElement(s,{color:"red"},w):null))};function k({title:e,backgroundColor:t}){let o=Math.max(Math.round((28-e.length)/2),0),r=" ".repeat(o);return n.default.createElement(s,{backgroundColor:t,color:"black"},`
1
+ import{a as D}from"./chunk-EI6ZQXTF.js";import{b as ne,c as re}from"./chunk-BQ2752RO.js";import{c as ee,d as te}from"./chunk-PNCF5LNZ.js";import{A as T}from"./chunk-NUCUZBO3.js";import{a as Z}from"./chunk-X2ZCC772.js";import{a as Q}from"./chunk-33AVVFWW.js";import{wa as X}from"./chunk-LANGOUPS.js";import{b as Y,c as V}from"./chunk-BPRY3O4N.js";import{B as q,a as S,i as K,j as U,k as b,p as C}from"./chunk-SQVJGTTD.js";import{a as J}from"./chunk-WFCP2AG5.js";import{m as M}from"./chunk-O6BUPYXH.js";import{eb as O,fb as l,gb as s,ib as j,jb as G,kb as H,ma as N}from"./chunk-KNLPWHHJ.js";import{f as z}from"./chunk-E7Z7KYBR.js";import{d as I}from"./chunk-773TIA5M.js";import{a as ye}from"./chunk-M5GXA5W4.js";import{e as R,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();c();c();var y=R(O(),1);import{Writable as oe}from"stream";function ie({selectedRun:e,abortController:t,app:o,extension:r,appWatcher:i}){let a={type:"functionRun",input:e.payload.input,output:e.payload.output,logs:e.payload.logs,name:e.source,size:0,memory_usage:0,instructions:e.payload.fuelConsumed},[u,f]=(0,y.useState)([]),[p,m]=(0,y.useState)([a,a]),[w,d]=(0,y.useState)(void 0),{input:E,export:$}=e.payload,[fe,L]=(0,y.useState)(`Watching for changes to ${e.source}...`);return(0,y.useEffect)(()=>{let A=new S;t.signal.addEventListener("abort",()=>{A.abort()});let B=async()=>{let F=await we(r,JSON.stringify(E),$);m(h=>[F,h[0]]),L(`Watching for changes to ${e.source}...`),f(h=>[...h,F])},de=async()=>{L("Replaying log with local function..."),await B()},ge=async()=>{i.onEvent(async h=>{let x=h.extensionEvents.find(v=>v.extension.handle===r.handle);if(!(!x||x.type!==ee.Updated)){if(x.buildResult?.status==="error"){d(`Error while reloading and building extension: ${x.buildResult?.error}`);return}d(void 0),L("Re-running with latest changes..."),await B()}});let F=new oe({write(h,x,v){f(he=>[...he,{type:"systemMessage",message:h.toString()}]),v()}});await i.start({stdout:F,stderr:F,signal:A.signal},!1)};return de().then(()=>{ge()}),()=>{A.abort()}},[E,$,o,r]),C(t.signal,async()=>{setTimeout(()=>{z()||J(process.pid,"SIGINT",!1,()=>{process.exit(0)})},2e3)}),{logs:u,statusMessage:fe,recentFunctionRuns:p,error:w}}async function we(e,t,o){let r="",i=new oe({write(u,f,p){r+=u,p()}});return await D({functionExtension:e,input:t,export:o,stdout:i,json:!0}),{...JSON.parse(r),type:"functionRun"}}var n=R(O(),1);var ae=({selectedRun:e,abortController:t,app:o,extension:r})=>{let{isAborted:i}=C(t.signal),{isRawModeSupported:a}=G(),u=new te(o),{logs:f,statusMessage:p,recentFunctionRuns:m,error:w}=ie({selectedRun:e,abortController:t,app:o,extension:r,appWatcher:u});return H((d,E)=>{U(d,E,()=>t.abort()),d==="q"&&t.abort()},{isActive:!!a}),n.default.createElement(n.default.Fragment,null,n.default.createElement(j,{items:f},(d,E)=>n.default.createElement(l,{key:`replayOutputScrollerLog${E}`,flexDirection:"column"},n.default.createElement(Se,{log:d}))),i?null:n.default.createElement(l,{marginY:1,paddingTop:1,flexDirection:"column",flexGrow:1,borderStyle:"single",borderBottom:!1,borderLeft:!1,borderRight:!1,borderTop:!0},a?n.default.createElement(l,{flexDirection:"column"},n.default.createElement(l,{flexDirection:"row"},n.default.createElement(s,null,b.pointerSmall," ",p)),n.default.createElement(Re,{recentFunctionRuns:m}),n.default.createElement(s,null,b.pointerSmall," Press ",n.default.createElement(s,{bold:!0},"q")," ",b.lineVertical," quit")):null,w?n.default.createElement(s,{color:"red"},w):null))};function k({title:e,backgroundColor:t}){let o=Math.max(Math.round((28-e.length)/2),0),r=" ".repeat(o);return n.default.createElement(s,{backgroundColor:t,color:"black"},`
2
2
 
3
3
  `,r,e,r,`
4
4
  `)}function Ee({input:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(k,{title:"Input",backgroundColor:"yellow"}),n.default.createElement(s,null,T(e)))}function Fe({logs:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(k,{title:"Logs",backgroundColor:"blueBright"}),n.default.createElement(s,null,e))}function xe({output:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(k,{title:"Output",backgroundColor:"greenBright"}),n.default.createElement(s,null,T(e)))}function be({functionRun:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(k,{title:"Benchmark Results",backgroundColor:"green"}),n.default.createElement(s,null,"Name: ",e.name),n.default.createElement(s,null,"Linear Memory Usage: ",e.memory_usage,"KB"),n.default.createElement(s,null,"Instructions: ",e.instructions/1e3,"K"),n.default.createElement(s,null,"Size: ",e.size,"KB"))}function Re({recentFunctionRuns:e}){let t=e[0].instructions-e[1].instructions;return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(s,null,b.pointerSmall," Instruction count change: ",t>0?"+":"",t))}function Se({log:e}){switch(e.type){case"functionRun":return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(Ee,{input:e.input}),n.default.createElement(Fe,{logs:e.logs}),n.default.createElement(xe,{output:e.output}),n.default.createElement(be,{functionRun:e}),n.default.createElement(s,null,"\xA0"));case"systemMessage":return n.default.createElement(s,null,e.message);default:return null}}var se=R(O(),1);async function ce({selectedRun:e,abortController:t,app:o,extension:r}){return K(se.default.createElement(ae,{selectedRun:e,abortController:t,app:o,extension:r}),{exitOnCtrlC:!1})}c();async function le(e){if(e.length===0)return;let t=i=>({label:`${i.logTimestamp} (${i.status}) - ${i.identifier}`,value:i}),o=e.map(t);return await q({message:"Which function run would you like to replay locally?",choices:o})}import{existsSync as Ce,readdirSync as De}from"fs";var _=100;async function ue(e){let{watch:t,extension:o,app:r}=e,i=new S;try{let a=r.getLogsDir(),u=e.log?await ke(a,o.handle,e.log):await Ae(a,o.handle),{input:f,export:p}=u.payload;t?await ce({selectedRun:u,abortController:i,app:r,extension:o}):await D({functionExtension:o,json:e.json,input:JSON.stringify(f),export:p})}catch(a){throw i.abort(),a}}async function ke(e,t,o){let r=await Le(e,t,o);if(r===void 0)throw new M(`No log found for '${o}'.
@@ -1 +1 @@
1
- import{y as r}from"./chunk-REQPTZOU.js";import{f as t,q as n}from"./chunk-773TIA5M.js";import{a as o}from"./chunk-M5GXA5W4.js";import{e as s,g as a}from"./chunk-VKWPEFWQ.js";a();var e=s(o(),1);var c={path:e.Flags.string({description:"The path to your app directory.",parse:async i=>t(i),default:async()=>n(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"}),config:e.Flags.string({hidden:!1,char:"c",description:"The name of the app configuration.",env:"SHOPIFY_FLAG_APP_CONFIG"}),"client-id":e.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]}),reset:e.Flags.boolean({hidden:!1,description:"Reset all your settings.",env:"SHOPIFY_FLAG_RESET",default:!1,exclusive:["config"]})},p={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation to run as a bulk operation.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your mutation, in JSON format. Can be specified multiple times.",env:"SHOPIFY_FLAG_VARIABLES",multiple:!0,exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSONL format (one JSON object per line). Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),watch:e.Flags.boolean({description:"Wait for bulk operation results before exiting. Defaults to false.",env:"SHOPIFY_FLAG_WATCH"}),"output-file":e.Flags.string({description:"The file path where results should be written if --watch is specified. If not specified, results will be written to STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE",dependsOn:["watch"]}),version:e.Flags.string({description:"The API version to use for the bulk operation. If not specified, uses the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})},h={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation, as a string.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES",exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The myshopify.com domain of the store to execute against. The app must be installed on the store. If not specified, you will be prompted to select a store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),version:e.Flags.string({description:"The API version to use for the query or mutation. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"}),"output-file":e.Flags.string({description:"The file name where results should be written, instead of STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE"})};export{c as a,p as b,h as c};
1
+ import{y as r}from"./chunk-OQ6WYWG4.js";import{f as t,q as n}from"./chunk-773TIA5M.js";import{a as o}from"./chunk-M5GXA5W4.js";import{e as s,g as a}from"./chunk-VKWPEFWQ.js";a();var e=s(o(),1);var c={path:e.Flags.string({description:"The path to your app directory.",parse:async i=>t(i),default:async()=>n(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"}),config:e.Flags.string({hidden:!1,char:"c",description:"The name of the app configuration.",env:"SHOPIFY_FLAG_APP_CONFIG"}),"client-id":e.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]}),reset:e.Flags.boolean({hidden:!1,description:"Reset all your settings.",env:"SHOPIFY_FLAG_RESET",default:!1,exclusive:["config"]})},p={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation to run as a bulk operation.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your mutation, in JSON format. Can be specified multiple times.",env:"SHOPIFY_FLAG_VARIABLES",multiple:!0,exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSONL format (one JSON object per line). Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),watch:e.Flags.boolean({description:"Wait for bulk operation results before exiting. Defaults to false.",env:"SHOPIFY_FLAG_WATCH"}),"output-file":e.Flags.string({description:"The file path where results should be written if --watch is specified. If not specified, results will be written to STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE",dependsOn:["watch"]}),version:e.Flags.string({description:"The API version to use for the bulk operation. If not specified, uses the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})},h={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation, as a string.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES",exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The myshopify.com domain of the store to execute against. The app must be installed on the store. If not specified, you will be prompted to select a store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),version:e.Flags.string({description:"The API version to use for the query or mutation. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"}),"output-file":e.Flags.string({description:"The file name where results should be written, instead of STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE"})};export{c as a,p as b,h as c};
@@ -1 +1 @@
1
- import{f as o}from"./chunk-BJLBQAYG.js";import{b as s}from"./chunk-VP3PA6DV.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends s{static{this.description="Clear the CLI cache, used to store some API responses and handle notifications status"}static{this.hidden=!0}async run(){await o()}};export{t as a};
1
+ import{f as o}from"./chunk-BPRY3O4N.js";import{b as s}from"./chunk-3PFIBTES.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends s{static{this.description="Clear the CLI cache, used to store some API responses and handle notifications status"}static{this.hidden=!0}async run(){await o()}};export{t as a};
@@ -1,4 +1,4 @@
1
- import{a as p}from"./chunk-EB2SLRLG.js";import{a as r}from"./chunk-AOZJVY2C.js";import{ta as f,wa as s}from"./chunk-54NHTRQI.js";import{b as n}from"./chunk-BJLBQAYG.js";import{a as g}from"./chunk-M5GXA5W4.js";import{e as m,g as a}from"./chunk-VKWPEFWQ.js";a();var o=m(g(),1);var t,e=class extends p{async run(){let{flags:i}=await this.parse(t),c={directory:i.path,apiKey:i["client-id"],organizationId:i["organization-id"],configName:i.config,fileName:i["file-name"],force:i.force??!1},d=await f(c),{app:l}=await s({directory:i.path,clientId:void 0,forceRelink:!1,userProvidedConfigName:d.configFileName});return{app:l}}};t=e;e.summary="Fetch your app configuration from the Developer Dashboard.";e.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 p}from"./chunk-X2ZCC772.js";import{a as r}from"./chunk-33AVVFWW.js";import{ta as f,wa as s}from"./chunk-LANGOUPS.js";import{b as n}from"./chunk-BPRY3O4N.js";import{a as g}from"./chunk-M5GXA5W4.js";import{e as m,g as a}from"./chunk-VKWPEFWQ.js";a();var o=m(g(),1);var t,e=class extends p{async run(){let{flags:i}=await this.parse(t),c={directory:i.path,apiKey:i["client-id"],organizationId:i["organization-id"],configName:i.config,fileName:i["file-name"],force:i.force??!1},d=await f(c),{app:l}=await s({directory:i.path,clientId:void 0,forceRelink:!1,userProvidedConfigName:d.configFileName});return{app:l}}};t=e;e.summary="Fetch your app configuration from the Developer Dashboard.";e.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
  `;e.description=t.descriptionWithoutMarkdown();e.flags={...n,...r,"organization-id":o.Flags.string({hidden:!0,env:"SHOPIFY_FLAG_ORGANIZATION_ID",exclusive:["client-id"]}),"file-name":o.Flags.string({hidden:!1,description:"The name of the app configuration file to create or overwrite.",env:"SHOPIFY_FLAG_APP_CONFIG_FILE_NAME",exclusive:["config"]}),force:o.Flags.boolean({hidden:!1,description:"Overwrite an existing configuration file without prompting.",env:"SHOPIFY_FLAG_FORCE",dependsOn:["file-name"]})};var A=e;export{A as a};
@@ -1,4 +1,4 @@
1
- import{b as i}from"./chunk-BJLBQAYG.js";import{b as o}from"./chunk-VP3PA6DV.js";import{J as t}from"./chunk-WNPRFDZX.js";import{a as p}from"./chunk-M5GXA5W4.js";import{e as h,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function c(r){let e=new URLSearchParams;e.append("search",r??""),await t(`https://shopify.dev?${e.toString()}`)}var n=h(p(),1),s=class r extends o{static{this.description="Search shopify.dev for the most relevant content matching a query. Best for discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`."}static{this.usage="search [query]"}static{this.examples=[`# open the search modal on Shopify.dev
1
+ import{b as i}from"./chunk-BPRY3O4N.js";import{b as o}from"./chunk-3PFIBTES.js";import{J as t}from"./chunk-SQVJGTTD.js";import{a as p}from"./chunk-M5GXA5W4.js";import{e as h,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function c(r){let e=new URLSearchParams;e.append("search",r??""),await t(`https://shopify.dev?${e.toString()}`)}var n=h(p(),1),s=class r extends o{static{this.description="Search shopify.dev for the most relevant content matching a query. Best for discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`."}static{this.usage="search [query]"}static{this.examples=[`# open the search modal on Shopify.dev
2
2
  shopify search
3
3
 
4
4
  # search for a term on Shopify.dev
@@ -1 +1 @@
1
- import{n as A}from"./chunk-TBU3OWTQ.js";import{a as P}from"./chunk-XJQHJ3OJ.js";import{c as C}from"./chunk-SW4MYG6X.js";import{s as T}from"./chunk-FQA2F2XJ.js";import{r as w}from"./chunk-MGMUHABT.js";import{a as D}from"./chunk-HEP7LOAV.js";import{O as u}from"./chunk-REQPTZOU.js";import{v as h,x as y}from"./chunk-WNPRFDZX.js";import{Pb as O,va as p}from"./chunk-UHI4NMIL.js";import{d,q as m}from"./chunk-773TIA5M.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();async function q(e){P({verbose:e.verbose,noColor:e.noColor});let t=w({store:e.store}),o=await u(t,e.password);await R(o,{path:e.path??m(),force:e.force??!1,silent:e.silent??!1})}var E={article:"ARTICLE",blog:"BLOG",collection:"COLLECTION",company:"COMPANY",company_location:"COMPANY_LOCATION",location:"LOCATION",market:"MARKET",order:"ORDER",page:"PAGE",product:"PRODUCT",variant:"PRODUCTVARIANT",shop:"SHOP"};async function R(e,t){let{force:o,path:i,silent:n}=t;if(!await A(i)&&(process.env.SHOPIFY_LANGUAGE_SERVER==="1"||!await C(o)))return;let f=[],r=[];for(let[a,s]of Object.entries(E))f.push(T(s,e).catch(c=>(r.push(s),[])).then(c=>({[a]:c})));let b=(await Promise.all(f)).reduce((a,s)=>({...a,...s}));if(r.length===Object.values(E).length){n||y({body:"Failed to fetch metafield definitions.",nextSteps:["Check your network connection and try again.","Ensure you have the permission to fetch metafield definitions."],reference:[{link:{label:"Metafield Definition API",url:"https://shopify.dev/docs/api/admin-graphql/latest/queries/metafieldDefinition"}}]});return}await S(i,b),r.length>0&&O(`Failed to fetch metafield definitions for the following owner types: ${r.join(", ")}`),n||h({body:"Metafield definitions have been successfully downloaded."})}async function S(e,t){let o=await D(e),i=d(o,"metafields.json"),n=JSON.stringify(t,null,2);p(i,n)}export{q as a};
1
+ import{n as A}from"./chunk-GVHVEYNG.js";import{a as P}from"./chunk-65H3LZJA.js";import{c as C}from"./chunk-OYOTLGGD.js";import{s as T}from"./chunk-VQ44LFBY.js";import{r as w}from"./chunk-5VKFEYZK.js";import{a as D}from"./chunk-W6BBFBOM.js";import{O as u}from"./chunk-OQ6WYWG4.js";import{v as h,x as y}from"./chunk-SQVJGTTD.js";import{Pb as O,va as p}from"./chunk-KNLPWHHJ.js";import{d,q as m}from"./chunk-773TIA5M.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();async function q(e){P({verbose:e.verbose,noColor:e.noColor});let t=w({store:e.store}),o=await u(t,e.password);await R(o,{path:e.path??m(),force:e.force??!1,silent:e.silent??!1})}var E={article:"ARTICLE",blog:"BLOG",collection:"COLLECTION",company:"COMPANY",company_location:"COMPANY_LOCATION",location:"LOCATION",market:"MARKET",order:"ORDER",page:"PAGE",product:"PRODUCT",variant:"PRODUCTVARIANT",shop:"SHOP"};async function R(e,t){let{force:o,path:i,silent:n}=t;if(!await A(i)&&(process.env.SHOPIFY_LANGUAGE_SERVER==="1"||!await C(o)))return;let f=[],r=[];for(let[a,s]of Object.entries(E))f.push(T(s,e).catch(c=>(r.push(s),[])).then(c=>({[a]:c})));let b=(await Promise.all(f)).reduce((a,s)=>({...a,...s}));if(r.length===Object.values(E).length){n||y({body:"Failed to fetch metafield definitions.",nextSteps:["Check your network connection and try again.","Ensure you have the permission to fetch metafield definitions."],reference:[{link:{label:"Metafield Definition API",url:"https://shopify.dev/docs/api/admin-graphql/latest/queries/metafieldDefinition"}}]});return}await S(i,b),r.length>0&&O(`Failed to fetch metafield definitions for the following owner types: ${r.join(", ")}`),n||h({body:"Metafield definitions have been successfully downloaded."})}async function S(e,t){let o=await D(e),i=d(o,"metafields.json"),n=JSON.stringify(t,null,2);p(i,n)}export{q as a};
@@ -1 +1 @@
1
- import{a as d}from"./chunk-PHWCCRTF.js";import{a as m}from"./chunk-EB2SLRLG.js";import{a as p}from"./chunk-AOZJVY2C.js";import{wa as s}from"./chunk-54NHTRQI.js";import{b as n}from"./chunk-BJLBQAYG.js";import{Lb as r}from"./chunk-UHI4NMIL.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var o,t=class extends m{async run(){let{flags:a}=await this.parse(o),{app:e,remoteApp:l,organization:c}=await s({directory:a.path,clientId:a["client-id"],forceRelink:a.reset,userProvidedConfigName:a.config});return r(await d(e,l,c)),{app:e}}};o=t;t.summary="Display app and extensions environment variables.";t.descriptionWithMarkdown="Displays environment variables that can be used to deploy apps and app extensions.";t.description=o.descriptionWithoutMarkdown();t.flags={...n,...p};var w=t;export{w as a};
1
+ import{a as d}from"./chunk-N54QOQ2V.js";import{a as m}from"./chunk-X2ZCC772.js";import{a as p}from"./chunk-33AVVFWW.js";import{wa as s}from"./chunk-LANGOUPS.js";import{b as n}from"./chunk-BPRY3O4N.js";import{Lb as r}from"./chunk-KNLPWHHJ.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var o,t=class extends m{async run(){let{flags:a}=await this.parse(o),{app:e,remoteApp:l,organization:c}=await s({directory:a.path,clientId:a["client-id"],forceRelink:a.reset,userProvidedConfigName:a.config});return r(await d(e,l,c)),{app:e}}};o=t;t.summary="Display app and extensions environment variables.";t.descriptionWithMarkdown="Displays environment variables that can be used to deploy apps and app extensions.";t.description=o.descriptionWithoutMarkdown();t.flags={...n,...p};var w=t;export{w as a};
@@ -1,4 +1,4 @@
1
- import{b as C}from"./chunk-WW7TENNA.js";import{G as T,a as F}from"./chunk-REQPTZOU.js";import{R as O}from"./chunk-WNPRFDZX.js";import{d as _}from"./chunk-P5GRGEW4.js";import{m as d}from"./chunk-OUPJTPTH.js";import{$ as E,Fb as h,Hb as g,Lb as $}from"./chunk-UHI4NMIL.js";import{c as P}from"./chunk-EDZ3YWOD.js";import{a as b}from"./chunk-UKQ7NE5V.js";import{a as I}from"./chunk-M5GXA5W4.js";import{e as A,g as w}from"./chunk-VKWPEFWQ.js";w();var u=A(I()),p=class extends u.Command{static descriptionWithoutMarkdown(){return(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)')}static analyticsNameOverride(){}static analyticsStopCommand(){}async catch(n){n.skipOclifErrorHandling=!0;let{errorHandler:r}=await import("./error-handler-JTALOJ5N.js");return await r(n,this.config),u.Errors.handle(n)}async init(){if(this.exitWithTimestampWhenEnvVariablePresent(),C(this.id??""),!P()){let{registerCleanBugsnagErrorsFromWithinPlugins:r}=await import("./error-handler-JTALOJ5N.js");await r(this.config)}await M(this.config),this.showNpmFlagWarning();let{showNotificationsIfNeeded:n}=await import("./notifications-system-MBSJKSNZ.js");return await n(),super.init()}showNpmFlagWarning(){let n=this.constructor;Object.keys(n.flags||{}).map(t=>`npm_config_${E(t).replace(/^no_/,"")}`).some(t=>process.env[t]!==void 0)&&import("./ui-ENHCMZJZ.js").then(({renderWarning:t})=>{t({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})})}exitWithTimestampWhenEnvVariablePresent(){b(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&($(`
1
+ import{b as C}from"./chunk-WW7TENNA.js";import{G as T,a as F}from"./chunk-OQ6WYWG4.js";import{R as O}from"./chunk-SQVJGTTD.js";import{d as _}from"./chunk-4NSHAMD3.js";import{m as d}from"./chunk-O6BUPYXH.js";import{$ as E,Fb as h,Hb as g,Lb as $}from"./chunk-KNLPWHHJ.js";import{c as P}from"./chunk-E7Z7KYBR.js";import{a as b}from"./chunk-UKQ7NE5V.js";import{a as I}from"./chunk-M5GXA5W4.js";import{e as A,g as w}from"./chunk-VKWPEFWQ.js";w();var u=A(I()),p=class extends u.Command{static descriptionWithoutMarkdown(){return(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)')}static analyticsNameOverride(){}static analyticsStopCommand(){}async catch(n){n.skipOclifErrorHandling=!0;let{errorHandler:r}=await import("./error-handler-QHCOZUC7.js");return await r(n,this.config),u.Errors.handle(n)}async init(){if(this.exitWithTimestampWhenEnvVariablePresent(),C(this.id??""),!P()){let{registerCleanBugsnagErrorsFromWithinPlugins:r}=await import("./error-handler-QHCOZUC7.js");await r(this.config)}await M(this.config),this.showNpmFlagWarning();let{showNotificationsIfNeeded:n}=await import("./notifications-system-ZSZWUJIZ.js");return await n(),super.init()}showNpmFlagWarning(){let n=this.constructor;Object.keys(n.flags||{}).map(t=>`npm_config_${E(t).replace(/^no_/,"")}`).some(t=>process.env[t]!==void 0)&&import("./ui-ZC5QZT4J.js").then(({renderWarning:t})=>{t({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})})}exitWithTimestampWhenEnvVariablePresent(){b(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&($(`
2
2
  SHOPIFY_CLI_TIMESTAMP_START
3
3
  { "timestamp": ${Date.now()} }
4
4
  SHOPIFY_CLI_TIMESTAMP_END
@@ -6,6 +6,6 @@ import{b as C}from"./chunk-WW7TENNA.js";import{G as T,a as F}from"./chunk-REQPTZ
6
6
 
7
7
  ${h.cyan(e)}
8
8
 
9
- This flag is required in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the option in the command, or run the command in an interactive environment such as your local terminal.")})}async resultWithEnvironment(n,r,e){let t=n.flags,i=this.environmentsFilename();if(!i)return n;let{environmentFilePath:o}=await import("./environments-ZDUNX7L4.js"),s=await o(i,{from:t.path}),m=[];t.environment&&(m=Array.isArray(t.environment)?t.environment:[t.environment]);let c=m.length>0;if(!s&&!c||c&&m.length>1)return n;let{environment:l,isDefaultEnvironment:f}=await this.loadEnvironmentForCommand(t.path,i,m[0]);if(!l||f&&!S(r?.flags,"environment"))return n;let v=await super.parse(W(r),e),y=await super.parse(r,[...e??this.argv,...x(l,r,v),...f?["--environment","default"]:[]]);return N(v.flags,y.flags,f?"default":m[0],l),y}async loadEnvironmentForCommand(n,r,e){let{loadEnvironment:t}=await import("./environments-ZDUNX7L4.js");return e?{environment:await t(e,r,{from:n}),isDefaultEnvironment:!1}:{environment:await t("default",r,{from:n,silent:!0}),isDefaultEnvironment:!0}}};p.baseFlags={};async function j(a){await _(()=>({cmd_all_verbose:a.verbose,cmd_all_path_override:a.path!==void 0,cmd_all_path_override_hash:a.path===void 0?void 0:F(a.path)}))}function N(a,n,r,e){let t={};for(let[o,s]of Object.entries(n)){let m=Object.prototype.hasOwnProperty.call(a,o),c=Object.prototype.hasOwnProperty.call(e,o);if(!m&&c){let l=o==="password"?`********${s.substr(-4)}`:s;t[o]=l}}if(Object.keys(t).length===0)return;let i=Object.entries(t).map(([o,s])=>`${o}: ${s}`);import("./ui-ENHCMZJZ.js").then(({renderInfo:o})=>{o({headline:["Using applicable flags from",{userInput:r},"environment:"],body:[{list:{items:i}}]})})}function W(a){return a?.flags?{...a,flags:Object.fromEntries(Object.entries(a.flags).map(([n,r])=>{let e={...r};return delete e.default,[n,e]}))}:a}function x(a,n,r){let e=[];for(let[t,i]of Object.entries(a)){let o=S(n?.flags,t),s=r.flags&&Object.prototype.hasOwnProperty.call(r.flags,t);if(o&&!s)if(typeof i=="boolean")if(i)e.push(`--${t}`);else throw new d(g`Environments can only specify true for boolean flags. Attempted to set ${h.yellow(t)} to false.`);else Array.isArray(i)?i.forEach(m=>e.push(`--${t}`,`${m}`)):e.push(`--${t}`,`${i}`)}return e}function S(a,n){return!!a&&Object.prototype.hasOwnProperty.call(a,n)}async function M(a){let n=Array.from(a.plugins.values()),r=["@shopify/app","@shopify/plugin-cloudflare"],e=n.filter(i=>r.includes(i.name));if(e.length>0){let i=e.map(s=>` - shopify plugins remove ${s.name}`).join(`
10
- `),{renderWarning:o}=await import("./ui-ENHCMZJZ.js");o({headline:`Unsupported plugins detected: ${e.map(s=>s.name).join(", ")}`,body:["They are already included in the CLI and installing them as custom plugins can cause conflicts.",`You can fix it by running:
9
+ This flag is required in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the option in the command, or run the command in an interactive environment such as your local terminal.")})}async resultWithEnvironment(n,r,e){let t=n.flags,i=this.environmentsFilename();if(!i)return n;let{environmentFilePath:o}=await import("./environments-LDSGQHXC.js"),s=await o(i,{from:t.path}),m=[];t.environment&&(m=Array.isArray(t.environment)?t.environment:[t.environment]);let c=m.length>0;if(!s&&!c||c&&m.length>1)return n;let{environment:l,isDefaultEnvironment:f}=await this.loadEnvironmentForCommand(t.path,i,m[0]);if(!l||f&&!S(r?.flags,"environment"))return n;let v=await super.parse(W(r),e),y=await super.parse(r,[...e??this.argv,...x(l,r,v),...f?["--environment","default"]:[]]);return N(v.flags,y.flags,f?"default":m[0],l),y}async loadEnvironmentForCommand(n,r,e){let{loadEnvironment:t}=await import("./environments-LDSGQHXC.js");return e?{environment:await t(e,r,{from:n}),isDefaultEnvironment:!1}:{environment:await t("default",r,{from:n,silent:!0}),isDefaultEnvironment:!0}}};p.baseFlags={};async function j(a){await _(()=>({cmd_all_verbose:a.verbose,cmd_all_path_override:a.path!==void 0,cmd_all_path_override_hash:a.path===void 0?void 0:F(a.path)}))}function N(a,n,r,e){let t={};for(let[o,s]of Object.entries(n)){let m=Object.prototype.hasOwnProperty.call(a,o),c=Object.prototype.hasOwnProperty.call(e,o);if(!m&&c){let l=o==="password"?`********${s.substr(-4)}`:s;t[o]=l}}if(Object.keys(t).length===0)return;let i=Object.entries(t).map(([o,s])=>`${o}: ${s}`);import("./ui-ZC5QZT4J.js").then(({renderInfo:o})=>{o({headline:["Using applicable flags from",{userInput:r},"environment:"],body:[{list:{items:i}}]})})}function W(a){return a?.flags?{...a,flags:Object.fromEntries(Object.entries(a.flags).map(([n,r])=>{let e={...r};return delete e.default,[n,e]}))}:a}function x(a,n,r){let e=[];for(let[t,i]of Object.entries(a)){let o=S(n?.flags,t),s=r.flags&&Object.prototype.hasOwnProperty.call(r.flags,t);if(o&&!s)if(typeof i=="boolean")if(i)e.push(`--${t}`);else throw new d(g`Environments can only specify true for boolean flags. Attempted to set ${h.yellow(t)} to false.`);else Array.isArray(i)?i.forEach(m=>e.push(`--${t}`,`${m}`)):e.push(`--${t}`,`${i}`)}return e}function S(a,n){return!!a&&Object.prototype.hasOwnProperty.call(a,n)}async function M(a){let n=Array.from(a.plugins.values()),r=["@shopify/app","@shopify/plugin-cloudflare"],e=n.filter(i=>r.includes(i.name));if(e.length>0){let i=e.map(s=>` - shopify plugins remove ${s.name}`).join(`
10
+ `),{renderWarning:o}=await import("./ui-ZC5QZT4J.js");o({headline:`Unsupported plugins detected: ${e.map(s=>s.name).join(", ")}`,body:["They are already included in the CLI and installing them as custom plugins can cause conflicts.",`You can fix it by running:
11
11
  ${i}`]})}let t=n.filter(i=>!r.includes(i.name));a.plugins=new Map(t.map(i=>[i.name,i]))}var z=p;export{W as a,z as b};
@@ -1,4 +1,4 @@
1
- import{c as w}from"./chunk-LKTP7WTV.js";import{c as F,e as x}from"./chunk-SEME74TB.js";import{B as h,m as S,t as L,u as P,v as f,z as N}from"./chunk-TA6MIE6F.js";import{O as V,S as y,v as R}from"./chunk-WNPRFDZX.js";import{o as $,q as m}from"./chunk-AGWNS3XW.js";import{a as c}from"./chunk-M3QGQP74.js";import{Bb as U,Cb as D,Fb as u,Hb as p,Mb as d,Pb as l,Qb as E,yb as A}from"./chunk-UHI4NMIL.js";import{c as _}from"./chunk-EDZ3YWOD.js";import{p as C,q as b,r as I}from"./chunk-773TIA5M.js";import{g as v}from"./chunk-VKWPEFWQ.js";v();function M(){let e=U();if(!(!e||e==="unknown"))return e==="homebrew"?"brew upgrade shopify-cli":e==="yarn"?`${e} global add @shopify/cli@latest`:`${e} ${e==="pnpm"?"add":"install"} -g @shopify/cli@latest`}async function re(e={}){let n=I()??b(),o=D(n),t=A();if(_()){d("Skipping upgrade in development mode.");return}if(!(e.autoupgrade&&!t))if(t){let a=M();if(!a)throw new Error("Could not determine the package manager");let[r,...i]=a.split(" ");if(!r)throw new Error("Could not determine the command to run");let s=f("@shopify/cli",c),T=s?`\u2728 New version of Shopify CLI available! (${c} \u2192 ${s})`:"\u2728 New version of Shopify CLI available!";d(p`${T}
1
+ import{c as w}from"./chunk-SY3LXLT2.js";import{c as F,e as x}from"./chunk-O7HL63YP.js";import{B as h,m as S,t as L,u as P,v as f,z as N}from"./chunk-SH5VEQ7F.js";import{O as V,S as y,v as R}from"./chunk-SQVJGTTD.js";import{o as $,q as m}from"./chunk-WMKVFUMY.js";import{a as c}from"./chunk-UA2432YR.js";import{Bb as U,Cb as D,Fb as u,Hb as p,Mb as d,Pb as l,Qb as E,yb as A}from"./chunk-KNLPWHHJ.js";import{c as _}from"./chunk-E7Z7KYBR.js";import{p as C,q as b,r as I}from"./chunk-773TIA5M.js";import{g as v}from"./chunk-VKWPEFWQ.js";v();function M(){let e=U();if(!(!e||e==="unknown"))return e==="homebrew"?"brew upgrade shopify-cli":e==="yarn"?`${e} global add @shopify/cli@latest`:`${e} ${e==="pnpm"?"add":"install"} -g @shopify/cli@latest`}async function re(e={}){let n=I()??b(),o=D(n),t=A();if(_()){d("Skipping upgrade in development mode.");return}if(!(e.autoupgrade&&!t))if(t){let a=M();if(!a)throw new Error("Could not determine the package manager");let[r,...i]=a.split(" ");if(!r)throw new Error("Could not determine the command to run");let s=f("@shopify/cli",c),T=s?`\u2728 New version of Shopify CLI available! (${c} \u2192 ${s})`:"\u2728 New version of Shopify CLI available!";d(p`${T}
2
2
  Now upgrading by running: ${u.genericShellCommand(a)}...`),await V(r,i,{stdio:"inherit"}),R({headline:"Shopify CLI upgraded.",body:s?`You're now on version ${s}.`:"You're now on the latest version."})}else if(o)await Y(o,c);else throw new Error("Could not determine the local project directory")}function ie(){let e=c,n=f("@shopify/cli",e);if(!n){l("Auto-upgrade: No newer version available.");return}if(process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1")return l("Auto-upgrade: Forcing auto-upgrade because of SHOPIFY_CLI_FORCE_AUTO_UPGRADE."),n;if(!m()){l("Auto-upgrade: Skipping because auto-upgrade is not enabled.");return}if(y()){l("Auto-upgrade: Skipping auto-upgrade in CI.");return}if(w(e)){l("Auto-upgrade: Skipping auto-upgrade for pre-release version.");return}return n}async function se(){try{let{notifications:e}=await F();return x(e,"",["autoupgrade"]).some(o=>o.type==="error")}catch{return!1}}async function ce(){if(y()||w(c)||m())return;let e=f("@shopify/cli",c);e&&await $("warn-on-available-upgrade",{days:1},async()=>{E(G(e))})}function G(e,n=!1){let o=M(),t=o?p`💡 Version ${e} available! Run ${u.genericShellCommand(o)}`.value:p`💡 Version ${e} available!`.value;if(n){let a=`https://github.com/Shopify/cli/releases/tag/${e}`,r=p`⚠️ This is a major version — review breaking changes before upgrading:\n ${u.link(a,a)}`.value;return`${t}
3
3
 
4
4
  ${r}`}return t}async function Y(e,n){let o=(await h(e)).content,t=o.dependencies??{},a=o.devDependencies??{},i={...t,...a}[await k()];if(!i){l("Auto-upgrade: CLI dependency not found in project dependencies, skipping local upgrade.");return}i.slice(0,1).match(/[\^~]/)&&(i=n);let s=await P(await k(),i);s?q(i,s):W(i),await J("prod",t,e),await J("dev",a,e)}async function J(e,n,o){let t=[await k(),...await j()].filter(r=>!!n[r]).map(r=>({name:r,version:"latest"})),a=await L(o);t.length>0&&await N(t,{packageManager:await S(o),type:e,directory:o,stdout:process.stdout,stderr:process.stderr,addToRootDirectory:a})}async function k(){return(await O()).name}async function j(){return(await O())?.oclif?.plugins??[]}var g;async function O(){if(!g){let e=await h(C(import.meta.url));g=g??e.content}return g}function W(e){d(p`You're on the latest version, ${u.yellow(e)}, no need to upgrade!`)}function q(e,n){d(p`Upgrading CLI from ${u.yellow(e)} to ${u.yellow(n)}...`)}export{M as a,re as b,ie as c,se as d,ce as e,G as f};
@@ -1 +1 @@
1
- import{a as i}from"./chunk-2RJFPJ7A.js";import{b as e}from"./chunk-VP3PA6DV.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class extends e{static{this.description="View the UI kit components prompts"}static{this.hidden=!0}async run(){await i()}};export{t as a};
1
+ import{a as i}from"./chunk-FS4HIL62.js";import{b as e}from"./chunk-3PFIBTES.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class extends e{static{this.description="View the UI kit components prompts"}static{this.hidden=!0}async run(){await i()}};export{t as a};
@@ -1 +1 @@
1
- import{d as l}from"./chunk-FIXLZ6WB.js";import{c as t}from"./chunk-STJ3LWFL.js";import{f as i,m,n as w,o as d,r as f}from"./chunk-MGMUHABT.js";import{F as n}from"./chunk-WNPRFDZX.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function y(o,r,P){i()||f({store:r});let e=o??m()??await p(["Enter your",{link:{label:"store password",url:t(r)}}]),s=!1;for(;!await l(e,r,P);)s||(d(),s=!0),e=await p(["Incorrect",{link:{label:"store password",url:t(r)}},{char:"."},"Please try again"]);return w(e),e}async function p(o){return n({message:o,password:!0})}export{y as a};
1
+ import{d as l}from"./chunk-HS7TCC4I.js";import{c as t}from"./chunk-STJ3LWFL.js";import{f as i,m,n as w,o as d,r as f}from"./chunk-5VKFEYZK.js";import{F as n}from"./chunk-SQVJGTTD.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function y(o,r,P){i()||f({store:r});let e=o??m()??await p(["Enter your",{link:{label:"store password",url:t(r)}}]),s=!1;for(;!await l(e,r,P);)s||(d(),s=!0),e=await p(["Incorrect",{link:{label:"store password",url:t(r)}},{char:"."},"Please try again"]);return w(e),e}async function p(o){return n({message:o,password:!0})}export{y as a};
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk-N6CEKL2T.js";import{d as N}from"./chunk-OUPJTPTH.js";import{e as y,g as h}from"./chunk-VKWPEFWQ.js";h();var u=y(N(),1);function m(e,t,r){return e.items.find(n=>r?n.type==="field"&&n.typeName===t&&n.fieldName===r:n.type==="type"&&n.typeName===t)?.offlineScopes??[]}function E(e,t,r){return e.items.find(n=>n.type==="field"&&n.typeName===t&&n.fieldName===r)?.returnType}async function D(e,t,r="admin"){let a=new Set,n=new Map(e.definitions.filter(i=>i.kind===u.Kind.FRAGMENT_DEFINITION).map(i=>[i.name.value,i]));for(let i of e.definitions)if(i.kind===u.Kind.OPERATION_DEFINITION){let o=i;if(o.selectionSet){let s=v(o.operation,r);m(t,s).forEach(c=>a.add(c)),x(o.selectionSet,s,t,a,n)}}return Array.from(a)}function L(e,t,r,a){let n=e.name.value;if(m(r,t,n).forEach(s=>a.add(s)),!e.selectionSet)return{nextSelectionSet:null,nextTypeName:null};let o=E(r,t,n);return o&&m(r,o).forEach(p=>a.add(p)),{nextSelectionSet:e.selectionSet,nextTypeName:o??null}}function T(e,t,r,a,n){let i=e.name.value;if(r.has(i))return{nextSelectionSet:null,nextTypeName:null};r.add(i);let o=t.get(i);if(!o?.selectionSet)return{nextSelectionSet:null,nextTypeName:null};let s=o.typeCondition.name.value;return m(a,s).forEach(c=>n.add(c)),{nextSelectionSet:o.selectionSet,nextTypeName:s}}function F(e,t,r,a){if(!e.selectionSet)return{nextSelectionSet:null,nextTypeName:null};let n=e.typeCondition?.name.value??t;return m(r,n).forEach(o=>a.add(o)),{nextSelectionSet:e.selectionSet,nextTypeName:n}}function x(e,t,r,a,n,i=new Set){for(let o of e.selections){let s;if(o.kind===u.Kind.FIELD)s=L(o,t,r,a);else if(o.kind===u.Kind.FRAGMENT_SPREAD)s=T(o,n,i,r,a);else if(o.kind===u.Kind.INLINE_FRAGMENT)s=F(o,t,r,a);else continue;s.nextSelectionSet&&s.nextTypeName&&x(s.nextSelectionSet,s.nextTypeName,r,a,n,i)}}function v(e,t="admin"){return t==="admin"?e==="mutation"?"Mutation":"QueryRoot":e==="mutation"?"Mutation":"Query"}function C(e){return!e||e.length===0?"":`
1
+ import{a as f}from"./chunk-P4LA3M5S.js";import{d as N}from"./chunk-O6BUPYXH.js";import{e as y,g as h}from"./chunk-VKWPEFWQ.js";h();var u=y(N(),1);function m(e,t,r){return e.items.find(n=>r?n.type==="field"&&n.typeName===t&&n.fieldName===r:n.type==="type"&&n.typeName===t)?.offlineScopes??[]}function E(e,t,r){return e.items.find(n=>n.type==="field"&&n.typeName===t&&n.fieldName===r)?.returnType}async function D(e,t,r="admin"){let a=new Set,n=new Map(e.definitions.filter(i=>i.kind===u.Kind.FRAGMENT_DEFINITION).map(i=>[i.name.value,i]));for(let i of e.definitions)if(i.kind===u.Kind.OPERATION_DEFINITION){let o=i;if(o.selectionSet){let s=v(o.operation,r);m(t,s).forEach(c=>a.add(c)),x(o.selectionSet,s,t,a,n)}}return Array.from(a)}function L(e,t,r,a){let n=e.name.value;if(m(r,t,n).forEach(s=>a.add(s)),!e.selectionSet)return{nextSelectionSet:null,nextTypeName:null};let o=E(r,t,n);return o&&m(r,o).forEach(p=>a.add(p)),{nextSelectionSet:e.selectionSet,nextTypeName:o??null}}function T(e,t,r,a,n){let i=e.name.value;if(r.has(i))return{nextSelectionSet:null,nextTypeName:null};r.add(i);let o=t.get(i);if(!o?.selectionSet)return{nextSelectionSet:null,nextTypeName:null};let s=o.typeCondition.name.value;return m(a,s).forEach(c=>n.add(c)),{nextSelectionSet:o.selectionSet,nextTypeName:s}}function F(e,t,r,a){if(!e.selectionSet)return{nextSelectionSet:null,nextTypeName:null};let n=e.typeCondition?.name.value??t;return m(r,n).forEach(o=>a.add(o)),{nextSelectionSet:e.selectionSet,nextTypeName:n}}function x(e,t,r,a,n,i=new Set){for(let o of e.selections){let s;if(o.kind===u.Kind.FIELD)s=L(o,t,r,a);else if(o.kind===u.Kind.FRAGMENT_SPREAD)s=T(o,n,i,r,a);else if(o.kind===u.Kind.INLINE_FRAGMENT)s=F(o,t,r,a);else continue;s.nextSelectionSet&&s.nextTypeName&&x(s.nextSelectionSet,s.nextTypeName,r,a,n,i)}}function v(e,t="admin"){return t==="admin"?e==="mutation"?"Mutation":"QueryRoot":e==="mutation"?"Mutation":"Query"}function C(e){return!e||e.length===0?"":`
2
2
  Required scopes: ${e.join(", ")}`}h();var l=y(N(),1);async function q(e,t,r){let a=e.trim();if(!a)return{validation:{result:f.FAILED,resultDetail:"No GraphQL operation found in the provided code."},scopes:[]};let{apiVersion:n,schemaSource:i}=r,o=r.failOnDeprecated??!0;if(n.name){let c=(i.readVersionCatalog()[t]??[]).map(d=>d.name);if(c.length>0&&!c.includes(n.name))throw new Error(`Unsupported version "${n.name}" for API "${t}". Available versions: ${c.join(", ")}.`)}let{graphQLSchema:s,offlineScopes:p}=await R(n,i);return G({graphqlCode:a,schema:s,api:t,offlineScopeData:p,failOnDeprecated:o})}async function R(e,t){let r;try{r=await t.readSchemaContent(e)}catch(i){throw(i instanceof Error?i.message:String(i)).includes("Schema file not found")?new Error(`Unable to load schema for API "${e.api}" version "${e.name}" - the schema file doesn't exist`):i}let a=JSON.parse(r),n=a.data;if(e.api.startsWith("functions_")&&n.__schema?.types){let i=new Set;for(let o of n.__schema.types)o.kind==="INPUT_OBJECT"&&o.inputFields&&o.inputFields.length===0&&i.add(o.name);if(i.size>0)for(let o of n.__schema.types)i.has(o.name)&&(o.inputFields=[{name:"_placeholder",description:"Placeholder field to satisfy GraphQL spec requirement for non-empty input objects",type:{kind:"SCALAR",name:"String",ofType:null},defaultValue:null,isDeprecated:!1,deprecationReason:null}])}return{graphQLSchema:(0,l.buildClientSchema)(n),offlineScopes:a.offline_scopes??{items:[]}}}function I(e){try{return{success:!0,document:(0,l.parse)(e)}}catch(t){return{success:!1,error:t instanceof Error?t.message:String(t)}}}function Q(e){let[t]=e.definitions;return t&&t.kind==="OperationDefinition"?t.operation:"operation"}async function G(e){let{graphqlCode:t,schema:r,api:a,offlineScopeData:n,failOnDeprecated:i}=e,o=t.trim(),s=I(o);if(!s.success)return{validation:{result:f.FAILED,resultDetail:`GraphQL syntax error: ${s.error}`},scopes:[]};let p=(0,l.validate)(r,s.document).map(S=>S.message);if(p.length>0)return{validation:{result:f.FAILED,resultDetail:`GraphQL validation errors: ${p.join("; ")}`},scopes:[]};let c=(0,l.validate)(r,s.document,[l.NoDeprecatedCustomRule]),d=[];try{d=await D(s.document,n,a)}catch{}let g=Q(s.document);if(c.length>0){let S=c.map(O=>O.message).join("; ");return i?{validation:{result:f.FAILED,resultDetail:`Deprecated fields used: ${S}`},scopes:d}:{validation:{result:f.INFORM,resultDetail:`Successfully validated GraphQL ${g} against schema. Note: ${S}`},scopes:d}}return{validation:{result:f.SUCCESS,resultDetail:`Successfully validated GraphQL ${g} against schema.`},scopes:d}}export{C as a,q as b};
@@ -1 +1 @@
1
- import{f as b}from"./chunk-EDZ3YWOD.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-JTALOJ5N.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{f as b}from"./chunk-E7Z7KYBR.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-QHCOZUC7.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};