shopify 4.4.0 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/dist/{analytics-SOXP4UBD.js → analytics-DMUNCDGT.js} +1 -1
  2. package/dist/{analytics-DWUYMFHO.js → analytics-GAPN4I6R.js} +1 -1
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/{chunk-2NWWMNU5.js → chunk-235JVI2J.js} +1 -1
  5. package/dist/{chunk-Y3WIZSRU.js → chunk-24RF5KN3.js} +1 -1
  6. package/dist/{chunk-OORCODNK.js → chunk-2IPVQRMI.js} +1 -1
  7. package/dist/{chunk-J5TNYNR5.js → chunk-2MDFREEW.js} +1 -1
  8. package/dist/{chunk-V3RZ3DTW.js → chunk-2MZACB7V.js} +1 -1
  9. package/dist/{chunk-WVHB2HCQ.js → chunk-2ROG5NK3.js} +1 -1
  10. package/dist/{chunk-NY5OGHM5.js → chunk-2VUG6LRN.js} +1 -1
  11. package/dist/{chunk-FZKKKGUJ.js → chunk-32KQKGSY.js} +1 -1
  12. package/dist/{chunk-5W443CKL.js → chunk-3EQY5B4S.js} +1 -1
  13. package/dist/{chunk-RF6NUGCU.js → chunk-3JAC5SI7.js} +1 -1
  14. package/dist/{chunk-LCPD2BYX.js → chunk-3JZKWK2V.js} +1 -1
  15. package/dist/{chunk-APN3VWN4.js → chunk-3NMVMCOM.js} +1 -1
  16. package/dist/{chunk-UYK6CXAU.js → chunk-3OE5HXHO.js} +1 -1
  17. package/dist/{chunk-45MEVWH5.js → chunk-4EYTWWYF.js} +1 -1
  18. package/dist/{chunk-X4DIJTIK.js → chunk-4LML2QWN.js} +1 -1
  19. package/dist/{chunk-4N6YTHFD.js → chunk-4Q54UDO3.js} +1 -1
  20. package/dist/{chunk-7UOPCYMV.js → chunk-4U3NC3UU.js} +1 -1
  21. package/dist/{chunk-J3HXFQ2L.js → chunk-52H2R2FU.js} +1 -1
  22. package/dist/{chunk-5JNEWYD5.js → chunk-57IRHKV3.js} +1 -1
  23. package/dist/{chunk-QPN2M26G.js → chunk-5A7EMVAP.js} +1 -1
  24. package/dist/{chunk-H6WN7GP4.js → chunk-5EVFLUUA.js} +1 -1
  25. package/dist/{chunk-TQUSREKP.js → chunk-5O7PY44R.js} +1 -1
  26. package/dist/{chunk-ZIXWWU2N.js → chunk-63NFEXJR.js} +2 -2
  27. package/dist/{chunk-RYGZCBO4.js → chunk-663TS34D.js} +1 -1
  28. package/dist/{chunk-DQ4HA72R.js → chunk-6I3FNLT3.js} +1 -1
  29. package/dist/{chunk-ZEENHLSC.js → chunk-6LTJMYUD.js} +1 -1
  30. package/dist/{chunk-ZAMDXIVC.js → chunk-6V37CHBZ.js} +1 -1
  31. package/dist/{chunk-UKK5P74A.js → chunk-74IG3ZE3.js} +3 -3
  32. package/dist/{chunk-T5GSCWN5.js → chunk-7BVXGS44.js} +1 -1
  33. package/dist/{chunk-GKRCTMWY.js → chunk-7DYZVU7H.js} +1 -1
  34. package/dist/{chunk-OAI7VSLW.js → chunk-7EOQVQND.js} +1 -1
  35. package/dist/{chunk-FPLUMESQ.js → chunk-7HZG7FBK.js} +1 -1
  36. package/dist/{chunk-VOJWKGCW.js → chunk-7KHYEIA7.js} +1 -1
  37. package/dist/{chunk-PJYNAUQB.js → chunk-7ZIO3X22.js} +1 -1
  38. package/dist/{chunk-I73E3BD5.js → chunk-A2O3MBPH.js} +1 -1
  39. package/dist/{chunk-JAW32T6G.js → chunk-ABCU552E.js} +1 -1
  40. package/dist/{chunk-YGKQCEVG.js → chunk-AP6FNGTA.js} +1 -1
  41. package/dist/{chunk-WKBVT5WG.js → chunk-AUZCENYI.js} +1 -1
  42. package/dist/{chunk-UUC5YKAS.js → chunk-AYKRKE6O.js} +1 -1
  43. package/dist/{chunk-WAGAC3YI.js → chunk-AYSS2ERL.js} +1 -1
  44. package/dist/{chunk-Z4LC3WE5.js → chunk-B367FOQA.js} +1 -1
  45. package/dist/{chunk-U73TPLFE.js → chunk-BBATKR3B.js} +1 -1
  46. package/dist/{chunk-O6KTFMCD.js → chunk-BCEWCYZD.js} +1 -1
  47. package/dist/{chunk-SP2WUATO.js → chunk-BH34ZLZ4.js} +1 -1
  48. package/dist/{chunk-LOQIRLTD.js → chunk-BLI7DUNV.js} +1 -1
  49. package/dist/{chunk-YYL356OX.js → chunk-BNX4MZMV.js} +1 -1
  50. package/dist/{chunk-47MGPVED.js → chunk-BU7R7NFL.js} +1 -1
  51. package/dist/{chunk-5GVXMNC4.js → chunk-BVHBMOIB.js} +1 -1
  52. package/dist/{chunk-DONEJHDG.js → chunk-BXDZX3BS.js} +3 -3
  53. package/dist/{chunk-SKLUHLS2.js → chunk-CVRAATZ5.js} +1 -1
  54. package/dist/{chunk-CD5O2BIT.js → chunk-DBBU6OVN.js} +1 -1
  55. package/dist/{chunk-B7S23DLF.js → chunk-DKVU7LYY.js} +1 -1
  56. package/dist/{chunk-HCN6HXA5.js → chunk-DLZPP33V.js} +1 -1
  57. package/dist/{chunk-733R5OKQ.js → chunk-DQOS54HN.js} +1 -1
  58. package/dist/{chunk-JOZXRV5K.js → chunk-E4GW6OXT.js} +1 -1
  59. package/dist/chunk-E64BQS4D.js +1 -0
  60. package/dist/{chunk-BCD4KTLJ.js → chunk-F447QKVX.js} +1 -1
  61. package/dist/{chunk-HZSAUZBX.js → chunk-FA25RL4G.js} +1 -1
  62. package/dist/{chunk-CZXGQ53M.js → chunk-FJOEHMXM.js} +1 -1
  63. package/dist/{chunk-HA6NISOZ.js → chunk-G6YOP2SJ.js} +1 -1
  64. package/dist/{chunk-WZVQHMGI.js → chunk-GOAKZ2IL.js} +1 -1
  65. package/dist/{chunk-VQW35HIQ.js → chunk-H2JU5BGK.js} +1 -1
  66. package/dist/{chunk-QMXKGSFH.js → chunk-H3V6Y5JO.js} +1 -1
  67. package/dist/{chunk-EKHWL542.js → chunk-HHA322FT.js} +1 -1
  68. package/dist/{chunk-GBZL4TTY.js → chunk-HP3NDE7S.js} +1 -1
  69. package/dist/{chunk-GW3VY3FZ.js → chunk-HX3TALXV.js} +1 -1
  70. package/dist/{chunk-POAICASX.js → chunk-I3Y6XTKN.js} +1 -1
  71. package/dist/{chunk-5QWYIBE6.js → chunk-ICHNVDFU.js} +1 -1
  72. package/dist/{chunk-MZMYBFZQ.js → chunk-ICXHUPP5.js} +1 -1
  73. package/dist/{chunk-CPE7XCC6.js → chunk-IE4SSSXU.js} +1 -1
  74. package/dist/{chunk-QS3FMN67.js → chunk-IFVYCKX5.js} +1 -1
  75. package/dist/{chunk-67KMRBSZ.js → chunk-J2ZES5K5.js} +1 -1
  76. package/dist/{chunk-7EJ4UVYI.js → chunk-J5U2FUIX.js} +1 -1
  77. package/dist/{chunk-DO2SHYFU.js → chunk-JC3PRJJS.js} +1 -1
  78. package/dist/{chunk-D6YDSGR4.js → chunk-JGN7YG5X.js} +1 -1
  79. package/dist/{chunk-HZYRCG4R.js → chunk-JZVNNQWE.js} +1 -1
  80. package/dist/{chunk-DZLA2RJP.js → chunk-K2CIMJJW.js} +1 -1
  81. package/dist/{chunk-IIOIDMG3.js → chunk-K7I5BGFC.js} +1 -1
  82. package/dist/{chunk-DHBYYHBT.js → chunk-KESQOMEW.js} +1 -1
  83. package/dist/{chunk-ATXODH6C.js → chunk-KJQAJUDU.js} +1 -1
  84. package/dist/{chunk-7SVMAJTR.js → chunk-KNEF6NAG.js} +1 -1
  85. package/dist/{chunk-XH6ZP7M5.js → chunk-KUKYAIOR.js} +1 -1
  86. package/dist/{chunk-2MMGFZDP.js → chunk-KZDI2BXR.js} +1 -1
  87. package/dist/{chunk-OQORDQLH.js → chunk-LMPD55L6.js} +1 -1
  88. package/dist/{chunk-ZULTG2D2.js → chunk-LXZM6Z4F.js} +1 -1
  89. package/dist/{chunk-KKUDXLK2.js → chunk-MGPLKG23.js} +1 -1
  90. package/dist/{chunk-2EROVVCL.js → chunk-MSJDZLZT.js} +1 -1
  91. package/dist/{chunk-ZQ5JVD5X.js → chunk-N4LCWB56.js} +1 -1
  92. package/dist/{chunk-WRRUFK4Y.js → chunk-N5U5Q2MG.js} +1 -1
  93. package/dist/{chunk-YQH2JHFA.js → chunk-N5YIZJ4S.js} +1 -1
  94. package/dist/{chunk-BIMOHK2P.js → chunk-N625VE5T.js} +1 -1
  95. package/dist/{chunk-J2WCMQZZ.js → chunk-NJLSZS27.js} +1 -1
  96. package/dist/{chunk-3CYHS4W2.js → chunk-O7OQK2OC.js} +1 -1
  97. package/dist/{chunk-V6ZSIUO3.js → chunk-P375IGKT.js} +1 -1
  98. package/dist/{chunk-3OZ6ZZ4T.js → chunk-P3RGC53U.js} +1 -1
  99. package/dist/{chunk-G2S346IS.js → chunk-P4243GCY.js} +1 -1
  100. package/dist/{chunk-MFLQRQQT.js → chunk-PFEC2NUB.js} +1 -1
  101. package/dist/{chunk-GTUKM3ZW.js → chunk-PH7F4BMG.js} +1 -1
  102. package/dist/{chunk-IX4KP6E3.js → chunk-PK6NOLT5.js} +1 -1
  103. package/dist/chunk-PLHJQQVZ.js +1 -0
  104. package/dist/{chunk-GFCLUGAG.js → chunk-PVD544NN.js} +1 -1
  105. package/dist/chunk-Q3WOWDUU.js +1 -0
  106. package/dist/{chunk-FA4K3JRN.js → chunk-QAM7VCLV.js} +1 -1
  107. package/dist/{chunk-AT2GDXN7.js → chunk-QCBAFI6Z.js} +1 -1
  108. package/dist/{chunk-J7UQBC45.js → chunk-QHWF3S7U.js} +1 -1
  109. package/dist/{chunk-TKG42KLM.js → chunk-QJL3SXYA.js} +1 -1
  110. package/dist/{chunk-C3CVLSLS.js → chunk-QRETBFXI.js} +1 -1
  111. package/dist/{chunk-4TST2MNC.js → chunk-RBOYWA2D.js} +1 -1
  112. package/dist/{chunk-NWDP5IZ2.js → chunk-ROQXPIEZ.js} +1 -1
  113. package/dist/{chunk-5QQN3SKH.js → chunk-RUKK4KXX.js} +1 -1
  114. package/dist/{chunk-Z74QYLNC.js → chunk-RY2ESY3P.js} +1 -1
  115. package/dist/{chunk-QJ7TI6CK.js → chunk-RY5CY3ZW.js} +1 -1
  116. package/dist/{chunk-IG6LPVS4.js → chunk-S442LGHR.js} +1 -1
  117. package/dist/{chunk-H5C3QTOO.js → chunk-S5JJL3BP.js} +1 -1
  118. package/dist/{chunk-ZZFZBFVM.js → chunk-SF53RKMO.js} +1 -1
  119. package/dist/{chunk-PETINPMX.js → chunk-SY2AH7C2.js} +1 -1
  120. package/dist/{chunk-WNWQSHEC.js → chunk-TEXYUUTD.js} +1 -1
  121. package/dist/{chunk-G24L7MB3.js → chunk-TGM7L6RV.js} +1 -1
  122. package/dist/{chunk-PMXCJIBP.js → chunk-TKW3Z7XL.js} +1 -1
  123. package/dist/{chunk-KN3FTJDU.js → chunk-TM534QSE.js} +1 -1
  124. package/dist/{chunk-TJGUNVRI.js → chunk-U44HRKSU.js} +1 -1
  125. package/dist/{chunk-442S5SDM.js → chunk-UEC23KAO.js} +1 -1
  126. package/dist/{chunk-G2I2ZUBV.js → chunk-UFGDNIYX.js} +1 -1
  127. package/dist/{chunk-75LJTY7F.js → chunk-UGGFSV7N.js} +1 -1
  128. package/dist/{chunk-F5QG42MA.js → chunk-UJVYIWUI.js} +1 -1
  129. package/dist/{chunk-DLNBTHKL.js → chunk-UP7H24B3.js} +1 -1
  130. package/dist/{chunk-VFWWZMOQ.js → chunk-UQZ7HZ47.js} +1 -1
  131. package/dist/{chunk-NADNFSKS.js → chunk-UTLRP527.js} +1 -1
  132. package/dist/{chunk-73W5BGAZ.js → chunk-UTPJAU5S.js} +1 -1
  133. package/dist/{chunk-3FBSBMSQ.js → chunk-V66IHWQO.js} +1 -1
  134. package/dist/{chunk-GUO7S4NW.js → chunk-V774I3FW.js} +1 -1
  135. package/dist/{chunk-PUAMSBXS.js → chunk-VKFDDZD3.js} +1 -1
  136. package/dist/{chunk-LOHUNOQ7.js → chunk-VNYKNAT5.js} +1 -1
  137. package/dist/{chunk-KSZ5K6LJ.js → chunk-VUACOGOX.js} +1 -1
  138. package/dist/{chunk-WLO5H255.js → chunk-WFB3FHKV.js} +1 -1
  139. package/dist/{chunk-HZMP62GK.js → chunk-WPITBIL5.js} +1 -1
  140. package/dist/{chunk-SXTDVUT3.js → chunk-WTYH2O47.js} +1 -1
  141. package/dist/{chunk-AY4GIVME.js → chunk-WU6GIY22.js} +1 -1
  142. package/dist/{chunk-6DIHOMCB.js → chunk-XA5JA7DK.js} +1 -1
  143. package/dist/{chunk-YLGSM42I.js → chunk-XSXX75VV.js} +1 -1
  144. package/dist/{chunk-XV3I45NA.js → chunk-XXUWTD7A.js} +1 -1
  145. package/dist/{chunk-6YPEONHB.js → chunk-XZWAX4FI.js} +1 -1
  146. package/dist/{chunk-IPQH2RHD.js → chunk-YF4HKJB5.js} +1 -1
  147. package/dist/{chunk-SWI3LCPE.js → chunk-YJAX22JK.js} +1 -1
  148. package/dist/{chunk-7LATYPLU.js → chunk-YT3NPMWK.js} +1 -1
  149. package/dist/{chunk-6EZ7JWBK.js → chunk-YYLEWVO6.js} +4 -4
  150. package/dist/chunk-Z2Y6G2QF.js +1 -0
  151. package/dist/{chunk-PZYP3MCL.js → chunk-Z66NZ2HC.js} +1 -1
  152. package/dist/{chunk-ZIREP3EZ.js → chunk-ZFOWAMFK.js} +1 -1
  153. package/dist/{chunk-6RL7FUPD.js → chunk-ZKBWEHIY.js} +1 -1
  154. package/dist/{chunk-Y66GQ6V2.js → chunk-ZZ3SMI2A.js} +1 -1
  155. package/dist/{chunk-B7BUEEBR.js → chunk-ZZWSMRKT.js} +1 -1
  156. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  157. package/dist/cli/commands/app/build.js +1 -1
  158. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  159. package/dist/cli/commands/app/bulk/execute.js +1 -1
  160. package/dist/cli/commands/app/bulk/status.js +1 -1
  161. package/dist/cli/commands/app/config/link.js +1 -1
  162. package/dist/cli/commands/app/config/pull.js +1 -1
  163. package/dist/cli/commands/app/config/use.js +1 -1
  164. package/dist/cli/commands/app/config/validate.js +1 -1
  165. package/dist/cli/commands/app/demo/watcher.js +1 -1
  166. package/dist/cli/commands/app/deploy.js +1 -1
  167. package/dist/cli/commands/app/dev/clean.js +1 -1
  168. package/dist/cli/commands/app/dev.js +1 -1
  169. package/dist/cli/commands/app/env/pull.js +1 -1
  170. package/dist/cli/commands/app/env/show.js +1 -1
  171. package/dist/cli/commands/app/execute.js +1 -1
  172. package/dist/cli/commands/app/function/build.js +1 -1
  173. package/dist/cli/commands/app/function/info.js +1 -1
  174. package/dist/cli/commands/app/function/replay.js +1 -1
  175. package/dist/cli/commands/app/function/run.js +1 -1
  176. package/dist/cli/commands/app/function/schema.js +1 -1
  177. package/dist/cli/commands/app/function/typegen.js +1 -1
  178. package/dist/cli/commands/app/generate/extension.js +1 -1
  179. package/dist/cli/commands/app/graphiql.js +1 -1
  180. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  181. package/dist/cli/commands/app/import-extensions.js +1 -1
  182. package/dist/cli/commands/app/info.js +1 -1
  183. package/dist/cli/commands/app/init.js +1 -1
  184. package/dist/cli/commands/app/logs.js +1 -1
  185. package/dist/cli/commands/app/release.js +1 -1
  186. package/dist/cli/commands/app/versions/list.js +1 -1
  187. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  188. package/dist/cli/commands/auth/login.js +1 -1
  189. package/dist/cli/commands/auth/logout.js +1 -1
  190. package/dist/cli/commands/cache/clear.js +1 -1
  191. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  192. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  193. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  194. package/dist/cli/commands/debug/command-flags.js +1 -1
  195. package/dist/cli/commands/doc/fetch.js +1 -1
  196. package/dist/cli/commands/doc/search.js +1 -1
  197. package/dist/cli/commands/docs/generate.js +1 -1
  198. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  199. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  200. package/dist/cli/commands/help.js +1 -1
  201. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  202. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  203. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  204. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  205. package/dist/cli/commands/notifications/generate.js +1 -1
  206. package/dist/cli/commands/notifications/list.js +1 -1
  207. package/dist/cli/commands/organization/list.js +1 -1
  208. package/dist/cli/commands/search.js +1 -1
  209. package/dist/cli/commands/theme/check.js +1 -1
  210. package/dist/cli/commands/theme/console.js +1 -1
  211. package/dist/cli/commands/theme/delete.js +1 -1
  212. package/dist/cli/commands/theme/dev.js +1 -1
  213. package/dist/cli/commands/theme/duplicate.js +1 -1
  214. package/dist/cli/commands/theme/info.js +1 -1
  215. package/dist/cli/commands/theme/init.js +1 -1
  216. package/dist/cli/commands/theme/language-server.js +1 -1
  217. package/dist/cli/commands/theme/list.js +1 -1
  218. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  219. package/dist/cli/commands/theme/open.js +1 -1
  220. package/dist/cli/commands/theme/package.js +1 -1
  221. package/dist/cli/commands/theme/preview.js +1 -1
  222. package/dist/cli/commands/theme/profile.js +1 -1
  223. package/dist/cli/commands/theme/publish.js +1 -1
  224. package/dist/cli/commands/theme/pull.js +1 -1
  225. package/dist/cli/commands/theme/push.js +1 -1
  226. package/dist/cli/commands/theme/rename.js +1 -1
  227. package/dist/cli/commands/theme/share.js +1 -1
  228. package/dist/cli/commands/upgrade.js +1 -1
  229. package/dist/cli/commands/version.js +1 -1
  230. package/dist/command-registry.js +1 -1
  231. package/dist/{conf-store-C2LOYIOU.js → conf-store-V6ILVUUO.js} +1 -1
  232. package/dist/{deprecations-QOHE6JG6.js → deprecations-MOEFN6OW.js} +1 -1
  233. package/dist/dist-2BL5GGMG.js +1 -0
  234. package/dist/{dist-FF6C4ZHS.js → dist-E6QKEULH.js} +1 -1
  235. package/dist/{environments-EGD263DV.js → environments-5KA3OBIZ.js} +1 -1
  236. package/dist/{error-66U2HJ37.js → error-NYYI6HVX.js} +1 -1
  237. package/dist/{error-handler-SW2ALZ5Z.js → error-handler-BOESDKZA.js} +1 -1
  238. package/dist/{fs-JPQRUGZI.js → fs-XE6SBVBF.js} +1 -1
  239. package/dist/hooks/app-init.js +1 -1
  240. package/dist/hooks/did-you-mean.js +1 -1
  241. package/dist/hooks/hydrogen-init.js +1 -1
  242. package/dist/hooks/postrun.js +1 -1
  243. package/dist/hooks/prerun.js +1 -1
  244. package/dist/hooks/public-metadata.js +1 -1
  245. package/dist/hooks/sensitive-metadata.js +1 -1
  246. package/dist/hooks/tunnel-provider.js +1 -1
  247. package/dist/hooks/tunnel-start.js +1 -1
  248. package/dist/index.js +14 -14
  249. package/dist/{is-global-QWTDUPNR.js → is-global-JOHCPSKZ.js} +1 -1
  250. package/dist/{local-FRYN3NWL.js → local-BTQDUX72.js} +1 -1
  251. package/dist/{local-storage-DFH3LT5G.js → local-storage-WUSIVDTQ.js} +1 -1
  252. package/dist/{metadata-KZVLHQII.js → metadata-APVOKTBV.js} +1 -1
  253. package/dist/{node-package-manager-LVFBY4LY.js → node-package-manager-AC34ZJZD.js} +1 -1
  254. package/dist/notifications-system-4ODOESG2.js +1 -0
  255. package/dist/{output-NH4I5Y3C.js → output-EAPQ7OWD.js} +1 -1
  256. package/dist/{system-GNOF6HMI.js → system-D7CH26HU.js} +1 -1
  257. package/dist/tsconfig.tsbuildinfo +1 -1
  258. package/dist/{ui-QOGKADWB.js → ui-AXZBGWIQ.js} +1 -1
  259. package/dist/upgrade-SLPJF6LD.js +1 -0
  260. package/dist/version-3IYH4V5U.js +1 -0
  261. package/dist/{version-FJFTTOZU.js → version-FAU37PQN.js} +1 -1
  262. package/dist/{workerd-U6WWWY73.js → workerd-XXPWKQOM.js} +1 -1
  263. package/oclif.manifest.json +2 -6
  264. package/package.json +7 -7
  265. package/dist/chunk-FU232KQ7.js +0 -1
  266. package/dist/chunk-HM5H7WBE.js +0 -1
  267. package/dist/chunk-MQICT2LR.js +0 -1
  268. package/dist/chunk-UMT7DWR4.js +0 -1
  269. package/dist/dist-Q676YGVI.js +0 -1
  270. package/dist/notifications-system-DP443VTE.js +0 -1
  271. package/dist/upgrade-K4S6JW64.js +0 -1
  272. package/dist/version-ZI4GZX72.js +0 -1
@@ -1,4 +1,4 @@
1
- import{ha as a,i}from"./chunk-ATXODH6C.js";import{Fb as e,Hb as r}from"./chunk-DONEJHDG.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();async function f(n,t,o){return c(n,t,o,"text")}async function c(n,t,o,S){return await a(t,o.source),S==="json"?r`${e.json({SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:i(n.configuration)})}`:r`
1
+ import{ha as a,i}from"./chunk-KJQAJUDU.js";import{Fb as e,Hb as r}from"./chunk-BXDZX3BS.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();async function f(n,t,o){return c(n,t,o,"text")}async function c(n,t,o,S){return await a(t,o.source),S==="json"?r`${e.json({SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:i(n.configuration)})}`:r`
2
2
  ${e.green("SHOPIFY_API_KEY")}=${t.apiKey}
3
3
  ${e.green("SHOPIFY_API_SECRET")}=${t.apiSecretKeys[0]?.secret??""}
4
4
  ${e.green("SCOPES")}=${i(n.configuration)}
@@ -1 +1 @@
1
- import{a as c,b as d,c as f}from"./chunk-7UOPCYMV.js";import{a as p}from"./chunk-HM5H7WBE.js";import{a as r}from"./chunk-ZAMDXIVC.js";import{Fa as s}from"./chunk-ATXODH6C.js";import{b as n}from"./chunk-H5C3QTOO.js";import{r as y}from"./chunk-T6CC5WUU.js";import{e as g,g as i}from"./chunk-VKWPEFWQ.js";i();var m=g(y(),1);var a,t=class extends p{async run(){let{flags:e}=await this.parse(a),{app:o,developerPlatformClient:u,organization:h}=await s({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),l=await f(o,e.path);return await c({app:o,extension:l,stdout:e.stdout,developerPlatformClient:u,orgId:h.id}),{app:o}}};a=t;t.summary="Fetch the latest GraphQL schema for a function.";t.descriptionWithMarkdown="Generates the latest [GraphQL schema](https://shopify.dev/docs/apps/functions/input-output#graphql-schema) for a function in your app. Run this command from the function directory.\n\n This command uses the API type and version of your function, as defined in your extension TOML file, to generate the latest GraphQL schema. The schema is written to the `schema.graphql` file.";t.description=a.descriptionWithoutMarkdown();t.flags={...n,...r,...d,stdout:m.Flags.boolean({description:"Output the schema to stdout instead of writing to a file.",required:!1,default:!1,env:"SHOPIFY_FLAG_STDOUT"})};var T=t;export{T as a};
1
+ import{a as c,b as d,c as f}from"./chunk-4U3NC3UU.js";import{a as p}from"./chunk-PLHJQQVZ.js";import{a as r}from"./chunk-6V37CHBZ.js";import{Fa as s}from"./chunk-KJQAJUDU.js";import{b as n}from"./chunk-S5JJL3BP.js";import{r as y}from"./chunk-T6CC5WUU.js";import{e as g,g as i}from"./chunk-VKWPEFWQ.js";i();var m=g(y(),1);var a,t=class extends p{async run(){let{flags:e}=await this.parse(a),{app:o,developerPlatformClient:u,organization:h}=await s({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),l=await f(o,e.path);return await c({app:o,extension:l,stdout:e.stdout,developerPlatformClient:u,orgId:h.id}),{app:o}}};a=t;t.summary="Fetch the latest GraphQL schema for a function.";t.descriptionWithMarkdown="Generates the latest [GraphQL schema](https://shopify.dev/docs/apps/functions/input-output#graphql-schema) for a function in your app. Run this command from the function directory.\n\n This command uses the API type and version of your function, as defined in your extension TOML file, to generate the latest GraphQL schema. The schema is written to the `schema.graphql` file.";t.description=a.descriptionWithoutMarkdown();t.flags={...n,...r,...d,stdout:m.Flags.boolean({description:"Output the schema to stdout instead of writing to a file.",required:!1,default:!1,env:"SHOPIFY_FLAG_STDOUT"})};var T=t;export{T as a};
@@ -1,4 +1,4 @@
1
- import{a as f}from"./chunk-VOJWKGCW.js";import{a as c}from"./chunk-QMXKGSFH.js";import{f as l,o as p}from"./chunk-PJYNAUQB.js";import{p as s,v as d}from"./chunk-D6YDSGR4.js";import{b as h}from"./chunk-H5C3QTOO.js";import{v as i}from"./chunk-6EZ7JWBK.js";import{r as F}from"./chunk-T6CC5WUU.js";import{e as w,g as n}from"./chunk-VKWPEFWQ.js";n();n();async function v(t,r){let o=t.name??await l("New name for the theme"),a=await f(r,{header:"Select a theme to rename",filter:{theme:t.theme,development:t.development,live:t.live}});await p(a.id,{name:o},r),i({body:[...t.environment?[{subdued:`Environment: ${t.environment}
1
+ import{a as f}from"./chunk-7KHYEIA7.js";import{a as c}from"./chunk-H3V6Y5JO.js";import{f as l,o as p}from"./chunk-7ZIO3X22.js";import{p as s,v as d}from"./chunk-JGN7YG5X.js";import{b as h}from"./chunk-S5JJL3BP.js";import{v as i}from"./chunk-YYLEWVO6.js";import{r as F}from"./chunk-T6CC5WUU.js";import{e as w,g as n}from"./chunk-VKWPEFWQ.js";n();n();async function v(t,r){let o=t.name??await l("New name for the theme"),a=await f(r,{header:"Select a theme to rename",filter:{theme:t.theme,development:t.development,live:t.live}});await p(a.id,{name:o},r),i({body:[...t.environment?[{subdued:`Environment: ${t.environment}
2
2
 
3
3
  `}]:[],"The theme",...c(a),"was renamed to",`'${o}'`]})}var m=w(F(),1);var u,e=class extends d{async command(r,o){await v(r,o)}};u=e;e.summary="Renames an existing theme.";e.descriptionWithMarkdown=`Renames a theme in your store.
4
4
 
@@ -1,4 +1,4 @@
1
- import{b as C}from"./chunk-47MGPVED.js";import{b as f}from"./chunk-UKK5P74A.js";import{A as S,u as i,y as x}from"./chunk-6EZ7JWBK.js";import{d as v}from"./chunk-WKBVT5WG.js";import{Pb as I}from"./chunk-DONEJHDG.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();a();a();var m={on:"Autocorrect on. The system will automatically run commands even when you mistype them.",off:"Autocorrect off. You'll need to confirm corrections for mistyped commands."};a();function p(o=W()){return!!o.get("autocorrectEnabled")}function y(o,n=W()){n.set("autocorrectEnabled",o)}function W(){return b??(b=new C({projectName:"did-you-mean"})),b}var b;var A,s=class extends f{async run(){y(!0),i({body:m.on})}};A=s;s.summary="Enable autocorrect. Off by default.";s.descriptionWithMarkdown=`Enable autocorrect. Off by default.
1
+ import{b as C}from"./chunk-BU7R7NFL.js";import{b as f}from"./chunk-74IG3ZE3.js";import{A as S,u as i,y as x}from"./chunk-YYLEWVO6.js";import{d as v}from"./chunk-AUZCENYI.js";import{Pb as I}from"./chunk-BXDZX3BS.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();a();a();var m={on:"Autocorrect on. The system will automatically run commands even when you mistype them.",off:"Autocorrect off. You'll need to confirm corrections for mistyped commands."};a();function p(o=W()){return!!o.get("autocorrectEnabled")}function y(o,n=W()){n.set("autocorrectEnabled",o)}function W(){return b??(b=new C({projectName:"did-you-mean"})),b}var b;var A,s=class extends f{async run(){y(!0),i({body:m.on})}};A=s;s.summary="Enable autocorrect. Off by default.";s.descriptionWithMarkdown=`Enable autocorrect. Off by default.
2
2
 
3
3
  When autocorrection is enabled, Shopify CLI automatically runs a corrected version of your command if a correction is available.
4
4
 
@@ -1 +1 @@
1
- import{n as a}from"./chunk-5W443CKL.js";import{d as o}from"./chunk-WKBVT5WG.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();var n={LOCALHOST:"localhost",HTTP:"http",PUBSUB:"google-pub-sub",EVENTBRIDGE:"event-bridge"},p={LOCALHOST:new RegExp("^http:","i"),HTTP:new RegExp("^https:","i"),PUBSUB:new RegExp("^pubsub:"),EVENTBRIDGE:new RegExp("^arn:aws:events:")};function c(t,e){let r=h(t);return r===n.LOCALHOST&&e===n.HTTP?!0:r===e}function f(t){return p.LOCALHOST.test(t)?new URL(t.toLowerCase()).hostname==="localhost":!1}function E(t,e){if(!c(t,e))throw new o(`Can't deliver your webhook payload to this address using '${e}'`,"Use a valid URL for address",l(e));let r=e;return f(t)&&(r=n.LOCALHOST),[t.trim(),r]}function l(t){return t===n.HTTP?["For remote HTTP testing, use a URL that starts with https://","For local HTTP testing, use http://localhost:{port}/{url-path}"]:t===n.PUBSUB?["For Google Pub/Sub, use pubsub://{project-id}:{topic-id}"]:t===n.EVENTBRIDGE?["For Amazon EventBridge, use an Amazon Resource Name (ARN) starting with arn:aws:events:"]:[]}function g(t,e){if(e.includes(t))return t;throw new o(`Api Version '${t}' does not exist`,`Allowed values: ${e.join(", ")}`,["Try again with a valid api-version value"])}function L(t,e,r){if(r.length===0)throw new o(`No topics found for '${e}'`);let i=T(t.trim(),r);if(i===void 0)throw new o(`Topic '${t}' does not exist for ApiVersion '${e}'`,`Allowed values: ${r.join(", ")}`,["Try again with a valid api-version - topic pair"]);return i}function T(t,e){return e.includes(t)?t:e.find(r=>r.toUpperCase().replace("/","_")===t)}function h(t){if(t){if(t.startsWith("pubsub:"))return n.PUBSUB;if(t.startsWith("arn:aws:events:"))return n.EVENTBRIDGE;if(f(t))return n.LOCALHOST;if(p.HTTP.test(t))return n.HTTP}}u();async function H(t,e,r){let i={method:"POST",body:e,headers:{"Content-Type":"application/json",...JSON.parse(r)}},s=await a(t,i);return s.status>=200&&s.status<300}export{H as a,n as b,c,E as d,g as e,L as f,h as g};
1
+ import{n as a}from"./chunk-3EQY5B4S.js";import{d as o}from"./chunk-AUZCENYI.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();var n={LOCALHOST:"localhost",HTTP:"http",PUBSUB:"google-pub-sub",EVENTBRIDGE:"event-bridge"},p={LOCALHOST:new RegExp("^http:","i"),HTTP:new RegExp("^https:","i"),PUBSUB:new RegExp("^pubsub:"),EVENTBRIDGE:new RegExp("^arn:aws:events:")};function c(t,e){let r=h(t);return r===n.LOCALHOST&&e===n.HTTP?!0:r===e}function f(t){return p.LOCALHOST.test(t)?new URL(t.toLowerCase()).hostname==="localhost":!1}function E(t,e){if(!c(t,e))throw new o(`Can't deliver your webhook payload to this address using '${e}'`,"Use a valid URL for address",l(e));let r=e;return f(t)&&(r=n.LOCALHOST),[t.trim(),r]}function l(t){return t===n.HTTP?["For remote HTTP testing, use a URL that starts with https://","For local HTTP testing, use http://localhost:{port}/{url-path}"]:t===n.PUBSUB?["For Google Pub/Sub, use pubsub://{project-id}:{topic-id}"]:t===n.EVENTBRIDGE?["For Amazon EventBridge, use an Amazon Resource Name (ARN) starting with arn:aws:events:"]:[]}function g(t,e){if(e.includes(t))return t;throw new o(`Api Version '${t}' does not exist`,`Allowed values: ${e.join(", ")}`,["Try again with a valid api-version value"])}function L(t,e,r){if(r.length===0)throw new o(`No topics found for '${e}'`);let i=T(t.trim(),r);if(i===void 0)throw new o(`Topic '${t}' does not exist for ApiVersion '${e}'`,`Allowed values: ${r.join(", ")}`,["Try again with a valid api-version - topic pair"]);return i}function T(t,e){return e.includes(t)?t:e.find(r=>r.toUpperCase().replace("/","_")===t)}function h(t){if(t){if(t.startsWith("pubsub:"))return n.PUBSUB;if(t.startsWith("arn:aws:events:"))return n.EVENTBRIDGE;if(f(t))return n.LOCALHOST;if(p.HTTP.test(t))return n.HTTP}}u();async function H(t,e,r){let i={method:"POST",body:e,headers:{"Content-Type":"application/json",...JSON.parse(r)}},s=await a(t,i);return s.status>=200&&s.status<300}export{H as a,n as b,c,E as d,g as e,L as f,h as g};
@@ -1 +1 @@
1
- import{M as l,N as I,P}from"./chunk-ATXODH6C.js";import{Z as M,ea as N}from"./chunk-442S5SDM.js";import{a as w}from"./chunk-J5TNYNR5.js";import{z as g}from"./chunk-5W443CKL.js";import{a as D}from"./chunk-5C7HDTHJ.js";import{D as _,P as h,u as b}from"./chunk-6EZ7JWBK.js";import{b as m,d as p,g as y}from"./chunk-WKBVT5WG.js";import{Nb as F}from"./chunk-DONEJHDG.js";import{j as E}from"./chunk-KKUDXLK2.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();d();async function u(t,e,r){let i=r.clientName===M.AppManagement,s;r.supportsStoreSearch&&(s=async a=>r.devStoresForOrg(e.id,a));let o=await l({onSearchForStoresByName:s,...t,showDomainOnPrompt:i});if(!o){if(b({body:await r.getCreateDevStoreLink(e)}),await h(5),!await P(e))throw new m;let f=await k(e.id,r);o=await u({stores:f,hasMorePages:!1},e,r)}let n=await c(o,e.id,r,"prompt-first");for(;!n;){if(o=await l({stores:[o],hasMorePages:!1,showDomainOnPrompt:i}),!o)throw new m;n=await c(o,e.id,r,"prompt-first")}return o}async function k(t,e){let s=[];return await _([{title:"Fetching organization data",task:async()=>{for(let n=0;n<10;n++){let{stores:a}=await e.devStoresForOrg(t);if(a.length>0){s=a;return}await h(3)}}}]),s}async function c(t,e,r,i){if(t.transferDisabled||E())return!0;if(!t.transferDisabled&&!t.convertableToPartnerTest)throw new p(`The store you specified (${t.shopDomain}) is not a dev store`,"Run dev --reset and select an eligible dev store.");switch(i){case"prompt-first":return await I()?(await x(t,e,r),!0):!1;case"never":throw new p("The store you specified is not transfer-disabled","Try running 'dev --reset' and selecting a different store, or choosing to convert this one.")}}async function x(t,e,r){let i={input:{organizationID:parseInt(e,10),shopId:t.shopId}},s=await r.convertToTransferDisabledStore(i);if(!s.convertDevToTestStore.convertedToTestStore){let o=s.convertDevToTestStore.userErrors.map(n=>n.message).join(", ");throw new y(`Error converting store ${t.shopDomain} to a transfer-disabled store: ${o}`,"This store might not be compatible with draft apps, please try a different store")}F(`Converted ${t.shopDomain} to a transfer-disabled store`)}async function X({appContextResult:t,storeFqdn:e,forceReselectStore:r,storeTypes:i=["APP_DEVELOPMENT"]}){let{app:s,organization:o,developerPlatformClient:n}=t,a,f=s.configuration.build?.dev_store_url,S=s.hiddenConfig.dev_store_url,T=f??S,v=e??(r?void 0:T),O=i.length===1&&i[0]==="APP_DEVELOPMENT";if(v)a=await N(o,v,n,i),O&&await c(a,o.id,n,"never");else{let A=await n.devStoresForOrg(o.id);a=await u(A,o,n)}return a.shopDomain=g(a.shopDomain),await C(a,r),(a.shopDomain!==T||!S)&&await s.updateHiddenConfig({dev_store_url:a.shopDomain}),await n.ensureUserAccessToStore(o.id,a),a}async function C(t,e){await w.addPublicMetadata(()=>({cmd_app_reset_used:e,store_fqdn_hash:D(t.shopDomain),store_domain:t.shopDomain})),await w.addSensitiveMetadata(()=>({store_fqdn:t.shopDomain}))}export{X as a};
1
+ import{M as l,N as I,P}from"./chunk-KJQAJUDU.js";import{Z as M,ea as N}from"./chunk-UEC23KAO.js";import{a as w}from"./chunk-2MDFREEW.js";import{z as g}from"./chunk-3EQY5B4S.js";import{a as D}from"./chunk-5C7HDTHJ.js";import{D as _,P as h,u as b}from"./chunk-YYLEWVO6.js";import{b as m,d as p,g as y}from"./chunk-AUZCENYI.js";import{Nb as F}from"./chunk-BXDZX3BS.js";import{j as E}from"./chunk-MGPLKG23.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();d();async function u(t,e,r){let i=r.clientName===M.AppManagement,s;r.supportsStoreSearch&&(s=async a=>r.devStoresForOrg(e.id,a));let o=await l({onSearchForStoresByName:s,...t,showDomainOnPrompt:i});if(!o){if(b({body:await r.getCreateDevStoreLink(e)}),await h(5),!await P(e))throw new m;let f=await k(e.id,r);o=await u({stores:f,hasMorePages:!1},e,r)}let n=await c(o,e.id,r,"prompt-first");for(;!n;){if(o=await l({stores:[o],hasMorePages:!1,showDomainOnPrompt:i}),!o)throw new m;n=await c(o,e.id,r,"prompt-first")}return o}async function k(t,e){let s=[];return await _([{title:"Fetching organization data",task:async()=>{for(let n=0;n<10;n++){let{stores:a}=await e.devStoresForOrg(t);if(a.length>0){s=a;return}await h(3)}}}]),s}async function c(t,e,r,i){if(t.transferDisabled||E())return!0;if(!t.transferDisabled&&!t.convertableToPartnerTest)throw new p(`The store you specified (${t.shopDomain}) is not a dev store`,"Run dev --reset and select an eligible dev store.");switch(i){case"prompt-first":return await I()?(await x(t,e,r),!0):!1;case"never":throw new p("The store you specified is not transfer-disabled","Try running 'dev --reset' and selecting a different store, or choosing to convert this one.")}}async function x(t,e,r){let i={input:{organizationID:parseInt(e,10),shopId:t.shopId}},s=await r.convertToTransferDisabledStore(i);if(!s.convertDevToTestStore.convertedToTestStore){let o=s.convertDevToTestStore.userErrors.map(n=>n.message).join(", ");throw new y(`Error converting store ${t.shopDomain} to a transfer-disabled store: ${o}`,"This store might not be compatible with draft apps, please try a different store")}F(`Converted ${t.shopDomain} to a transfer-disabled store`)}async function X({appContextResult:t,storeFqdn:e,forceReselectStore:r,storeTypes:i=["APP_DEVELOPMENT"]}){let{app:s,organization:o,developerPlatformClient:n}=t,a,f=s.configuration.build?.dev_store_url,S=s.hiddenConfig.dev_store_url,T=f??S,v=e??(r?void 0:T),O=i.length===1&&i[0]==="APP_DEVELOPMENT";if(v)a=await N(o,v,n,i),O&&await c(a,o.id,n,"never");else{let A=await n.devStoresForOrg(o.id);a=await u(A,o,n)}return a.shopDomain=g(a.shopDomain),await C(a,r),(a.shopDomain!==T||!S)&&await s.updateHiddenConfig({dev_store_url:a.shopDomain}),await n.ensureUserAccessToStore(o.id,a),a}async function C(t,e){await w.addPublicMetadata(()=>({cmd_app_reset_used:e,store_fqdn_hash:D(t.shopDomain),store_domain:t.shopDomain})),await w.addSensitiveMetadata(()=>({store_fqdn:t.shopDomain}))}export{X as a};
@@ -0,0 +1 @@
1
+ import{f as o}from"./chunk-UEC23KAO.js";import{b as r}from"./chunk-74IG3ZE3.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();var e=class extends r{environmentsFilename(){return o.appEnvironments}};export{e as a};
@@ -1 +1 @@
1
- import{a as s}from"./chunk-CZXGQ53M.js";import{g as r,h,i as n}from"./chunk-D6YDSGR4.js";import{d as m}from"./chunk-WKBVT5WG.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var c=t=>`Development theme #${t} could not be found. Please create a new development theme.`,i="No development theme ID has been set. Please create a development theme first.",p=class extends s{constructor(e){super(e),this.context="Development",this.themeId=r()}async find(){let e=await this.fetch();if(!e)throw new m(this.themeId?c(this.themeId):i);return e}setTheme(e){h(e)}removeTheme(){n()}};export{p as a};
1
+ import{a as s}from"./chunk-FJOEHMXM.js";import{g as r,h,i as n}from"./chunk-JGN7YG5X.js";import{d as m}from"./chunk-AUZCENYI.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var c=t=>`Development theme #${t} could not be found. Please create a new development theme.`,i="No development theme ID has been set. Please create a development theme first.",p=class extends s{constructor(e){super(e),this.context="Development",this.themeId=r()}async find(){let e=await this.fetch();if(!e)throw new m(this.themeId?c(this.themeId):i);return e}setTheme(e){h(e)}removeTheme(){n()}};export{p as a};
@@ -1,4 +1,4 @@
1
- import{a as O}from"./chunk-J3HXFQ2L.js";import{a as I}from"./chunk-CZXGQ53M.js";import{c as _,i as P,n as k}from"./chunk-6YPEONHB.js";import{b as S,m as b}from"./chunk-PJYNAUQB.js";import{j as g,k as T,l as L,p as R,v as q}from"./chunk-D6YDSGR4.js";import{xa as x}from"./chunk-5W443CKL.js";import{a as v}from"./chunk-FU232KQ7.js";import{b as E}from"./chunk-H5C3QTOO.js";import{d as u}from"./chunk-WKBVT5WG.js";import{Fb as d,Hb as m,Mb as o,Pb as c}from"./chunk-DONEJHDG.js";import{r as G}from"./chunk-T6CC5WUU.js";import{e as V,g as r}from"./chunk-VKWPEFWQ.js";r();r();r();var f=class extends I{constructor(t){super(t),this.context="REPL",this.themeId=g()}async create(t,n){let s=await super.create(t,n);return await this.uploadThemeAssets(s),s}async findOrCreate(){let t=await this.fetch();if(!t){let n=`Liquid Console (${v})`;t=await this.create(S,n)}return t}setTheme(t){T(t)}removeTheme(){L()}async uploadThemeAssets(t){let n=[{key:"config/settings_data.json",value:"{}"},{key:"config/settings_schema.json",value:"[]"},{key:"snippets/eval.liquid",value:""},{key:"layout/password.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"layout/theme.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"sections/announcement-bar.liquid",value:""},{key:"templates/index.json",value:JSON.stringify({sections:{announcement:{type:"announcement-bar",settings:{}}},order:["announcement"]})}];await b(t.id,n,this.adminSession)}};r();r();async function A(e){return await H(e)??await $(e)??await Y(e)??await z(e)??void 0}async function H(e){c(`Evaluating snippet - ${e.snippet}`);let t=`{ "type": "display", "value": {{ ${e.snippet} | json }} }`,n=await h({...e,snippet:t}),s=await n.text();return C(n.status,s)?Q(s):void 0}async function $(e){c(`Evaluating context - ${e.snippet}`);let t=`{ "type": "context", "value": "{% ${e.snippet.replace(/"/g,'\\"')} %}" }`,n=await h({...e,snippet:t}),s=await n.text();C(n.status,s)&&e.replSession.push(JSON.parse(t))}async function Y(e){if(c(`Evaluating assignment context - ${e.snippet}`),oe(e.snippet))return e.snippet=`assign ${e.snippet}`,o(m`${d.gray(`> ${e.snippet}`)}`),$(e)}async function z(e){c(`Evaluating syntax error - ${e.snippet}`);let t="";if(X(e.snippet)||(t=await(await h({...e,snippet:`{{ ${e.snippet} }}`})).text()),y(t)||(t=await(await h({...e,snippet:`{% ${e.snippet} %}`})).text()),y(t)){let n=t.replace(/ \(snippets\/eval line \d+\)/,"");B(e.snippet,n)}}function B(e,t){if(t.includes("Unknown tag")){o(m`${d.errorText(`Unknown object, property, tag, or filter: '${e}'`)}`);return}let n=j(t);n&&o(m`${d.errorText(n)}`)}async function h(e){let t=K(e);e.url.startsWith("/")||(e.url=`/${e.url}`);let n=await P(e.themeSession,{method:"GET",path:e.url,query:[],themeId:e.themeId,sectionId:"announcement-bar",headers:{},replaceTemplates:{"sections/announcement-bar.liquid":"{% render 'eval' %}","snippets/eval.liquid":`
1
+ import{a as O}from"./chunk-52H2R2FU.js";import{a as I}from"./chunk-FJOEHMXM.js";import{c as _,i as P,n as k}from"./chunk-XZWAX4FI.js";import{b as S,m as b}from"./chunk-7ZIO3X22.js";import{j as g,k as T,l as L,p as R,v as q}from"./chunk-JGN7YG5X.js";import{xa as x}from"./chunk-3EQY5B4S.js";import{a as v}from"./chunk-Q3WOWDUU.js";import{b as E}from"./chunk-S5JJL3BP.js";import{d as u}from"./chunk-AUZCENYI.js";import{Fb as d,Hb as m,Mb as o,Pb as c}from"./chunk-BXDZX3BS.js";import{r as G}from"./chunk-T6CC5WUU.js";import{e as V,g as r}from"./chunk-VKWPEFWQ.js";r();r();r();var f=class extends I{constructor(t){super(t),this.context="REPL",this.themeId=g()}async create(t,n){let s=await super.create(t,n);return await this.uploadThemeAssets(s),s}async findOrCreate(){let t=await this.fetch();if(!t){let n=`Liquid Console (${v})`;t=await this.create(S,n)}return t}setTheme(t){T(t)}removeTheme(){L()}async uploadThemeAssets(t){let n=[{key:"config/settings_data.json",value:"{}"},{key:"config/settings_schema.json",value:"[]"},{key:"snippets/eval.liquid",value:""},{key:"layout/password.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"layout/theme.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"sections/announcement-bar.liquid",value:""},{key:"templates/index.json",value:JSON.stringify({sections:{announcement:{type:"announcement-bar",settings:{}}},order:["announcement"]})}];await b(t.id,n,this.adminSession)}};r();r();async function A(e){return await H(e)??await $(e)??await Y(e)??await z(e)??void 0}async function H(e){c(`Evaluating snippet - ${e.snippet}`);let t=`{ "type": "display", "value": {{ ${e.snippet} | json }} }`,n=await h({...e,snippet:t}),s=await n.text();return C(n.status,s)?Q(s):void 0}async function $(e){c(`Evaluating context - ${e.snippet}`);let t=`{ "type": "context", "value": "{% ${e.snippet.replace(/"/g,'\\"')} %}" }`,n=await h({...e,snippet:t}),s=await n.text();C(n.status,s)&&e.replSession.push(JSON.parse(t))}async function Y(e){if(c(`Evaluating assignment context - ${e.snippet}`),oe(e.snippet))return e.snippet=`assign ${e.snippet}`,o(m`${d.gray(`> ${e.snippet}`)}`),$(e)}async function z(e){c(`Evaluating syntax error - ${e.snippet}`);let t="";if(X(e.snippet)||(t=await(await h({...e,snippet:`{{ ${e.snippet} }}`})).text()),y(t)||(t=await(await h({...e,snippet:`{% ${e.snippet} %}`})).text()),y(t)){let n=t.replace(/ \(snippets\/eval line \d+\)/,"");B(e.snippet,n)}}function B(e,t){if(t.includes("Unknown tag")){o(m`${d.errorText(`Unknown object, property, tag, or filter: '${e}'`)}`);return}let n=j(t);n&&o(m`${d.errorText(n)}`)}async function h(e){let t=K(e);e.url.startsWith("/")||(e.url=`/${e.url}`);let n=await P(e.themeSession,{method:"GET",path:e.url,query:[],themeId:e.themeId,sectionId:"announcement-bar",headers:{},replaceTemplates:{"sections/announcement-bar.liquid":"{% render 'eval' %}","snippets/eval.liquid":`
2
2
  ${t}
3
3
  `}});return Z(n)&&ne(),ee(n)&&se(),te(n)&&re(),n}function K(e){return`[${[...e.replSession.map(n=>JSON.stringify(n)),e.snippet].join(",").replace(/\\"/g,'"')}]`}function Q(e){let t=j(e);if(t)return JSON.parse(t)?.find(s=>s.type==="display")?.value}function j(e){let t=e.split(`
4
4
  `).slice(1,-1);if(t.length!==0)return t.join("")}function y(e){return e.includes("Liquid syntax error")}function X(e){return/^\s*assign\s*((?:\(?[\w\-.[\]]\)?)+)\s*=\s*(.*)\s*/m.test(e)}function Z(e){return e.status===401||e.status===403}function ee(e){return e.status===430||e.status===429}function te(e){return e.headers.get("server-timing")?.includes('pageType;desc="404"')??!1}function ne(){throw new u("Session expired. Please initiate a new one.")}function se(){throw new u("Evaluations limit reached. Try again later.")}function re(){throw new u("Page not found. Please provide a valid --url value!")}function oe(e){return/^\s*((?:\(?[\w\-.[\]]\)?)+)\s*=\s*(.*)\s*/m.test(e)}function C(e,t){return e===200&&!y(t)}r();function F(e){if(N(e)){o("Object can't be printed, but you can access its fields. Read more at https://shopify.dev/docs/api/liquid.");return}if(e==null){M("null");return}let t=JSON.stringify(e,null,2);M(t)}function N(e){if(Array.isArray(e))return e.length>0?N(e[0]):!1;if(e&&typeof e=="object"){let n=e.error;return typeof n=="string"&&n.includes("json not allowed for this object")}return!1}function M(e){return o(m`${d.cyan(e)}`)}import{createInterface as ie}from"readline";var ae=`Liquid Console doesn't support Liquid delimiters such as '{{ ... }}' or '{% ... %}'.
@@ -1 +1 @@
1
- import{b as a,g as c,i as p,j as f}from"./chunk-PJYNAUQB.js";import{g as h}from"./chunk-WKBVT5WG.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();function d(n){let e=/[^\p{Letter}\p{Number}\p{Mark}-]/gu;return n.replace(e,"-")}import{randomBytes as l}from"crypto";import{hostname as g}from"os";var T=50;function m(n){let e=g().split(".")[0],r=l(3).toString("hex"),t=`${n} ()`,s=T-t.length-r.length-1,o=d(`${r}-${e.substring(0,s)}`);return`${n} (${o})`}var u=class{constructor(e){this.adminSession=e}async findOrCreate(e,r){let t=await this.fetch(e,r);return t?this.setTheme(t.id.toString()):t=await this.create(r,e),t}async fetch(e,r){if(!this.themeId&&!e)return;let t=e&&r===a?await p(e,this.adminSession):await c(parseInt(this.themeId,10),this.adminSession);return t||this.removeTheme(),t}generateThemeName(e){return m(e)}async create(e,r){let t=r??m(this.context),s=e??a,o=await f({name:t,role:s},this.adminSession);if(!o)throw new h(`Could not create theme with name "${t}" and role "${s}"`);return this.setTheme(o.id.toString()),o}};export{u as a};
1
+ import{b as a,g as c,i as p,j as f}from"./chunk-7ZIO3X22.js";import{g as h}from"./chunk-AUZCENYI.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();function d(n){let e=/[^\p{Letter}\p{Number}\p{Mark}-]/gu;return n.replace(e,"-")}import{randomBytes as l}from"crypto";import{hostname as g}from"os";var T=50;function m(n){let e=g().split(".")[0],r=l(3).toString("hex"),t=`${n} ()`,s=T-t.length-r.length-1,o=d(`${r}-${e.substring(0,s)}`);return`${n} (${o})`}var u=class{constructor(e){this.adminSession=e}async findOrCreate(e,r){let t=await this.fetch(e,r);return t?this.setTheme(t.id.toString()):t=await this.create(r,e),t}async fetch(e,r){if(!this.themeId&&!e)return;let t=e&&r===a?await p(e,this.adminSession):await c(parseInt(this.themeId,10),this.adminSession);return t||this.removeTheme(),t}generateThemeName(e){return m(e)}async create(e,r){let t=r??m(this.context),s=e??a,o=await f({name:t,role:s},this.adminSession);if(!o)throw new h(`Could not create theme with name "${t}" and role "${s}"`);return this.setTheme(o.id.toString()),o}};export{u as a};
@@ -1 +1 @@
1
- import{b as u,c as h,f}from"./chunk-ATXODH6C.js";import{O as c}from"./chunk-6EZ7JWBK.js";import{d as e}from"./chunk-773TIA5M.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function s(n){if(n.features.includes("function")&&n.isJavaScript){let r=await f(n);return u(r.functionRunner)}return u()}function d(n){return n.configuration.build?.path?e(n.directory,n.configuration.build.path):n.outputPath}async function g(n){let r=n.functionExtension,i=await s(r);await h(i);let t=[];n.inputPath&&t.push("--input",n.inputPath),n.export&&t.push("--export",n.export),n.json&&t.push("--json"),n.schemaPath&&n.queryPath&&(t.push("--schema-path",n.schemaPath),t.push("--query-path",n.queryPath));let o=d(r);return c(i.path,["-f",o,...t],{cwd:n.functionExtension.directory,stdin:n.stdin,stdout:n.stdout??"inherit",stderr:n.stderr??"inherit",input:n.input})}export{g as a};
1
+ import{b as u,c as h,f}from"./chunk-KJQAJUDU.js";import{O as c}from"./chunk-YYLEWVO6.js";import{d as e}from"./chunk-773TIA5M.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function s(n){if(n.features.includes("function")&&n.isJavaScript){let r=await f(n);return u(r.functionRunner)}return u()}function d(n){return n.configuration.build?.path?e(n.directory,n.configuration.build.path):n.outputPath}async function g(n){let r=n.functionExtension,i=await s(r);await h(i);let t=[];n.inputPath&&t.push("--input",n.inputPath),n.export&&t.push("--export",n.export),n.json&&t.push("--json"),n.schemaPath&&n.queryPath&&(t.push("--schema-path",n.schemaPath),t.push("--query-path",n.queryPath));let o=d(r);return c(i.path,["-f",o,...t],{cwd:n.functionExtension.directory,stdin:n.stdin,stdout:n.stdout??"inherit",stderr:n.stderr??"inherit",input:n.input})}export{g as a};
@@ -1 +1 @@
1
- import{a as i}from"./chunk-FU232KQ7.js";import{b as e}from"./chunk-UKK5P74A.js";import{Lb as t}from"./chunk-DONEJHDG.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();o();async function s(){t(i)}var r=class extends e{static{this.description="Shopify CLI version currently installed."}async run(){await s()}};export{r as a};
1
+ import{a as i}from"./chunk-Q3WOWDUU.js";import{b as e}from"./chunk-74IG3ZE3.js";import{Lb as t}from"./chunk-BXDZX3BS.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();o();async function s(){t(i)}var r=class extends e{static{this.description="Shopify CLI version currently installed."}async run(){await s()}};export{r as a};
@@ -1,4 +1,4 @@
1
- import{a as V}from"./chunk-YQH2JHFA.js";import{a as N}from"./chunk-BCD4KTLJ.js";import{a as F}from"./chunk-VOJWKGCW.js";import{k as q,l as H,n as I}from"./chunk-2NWWMNU5.js";import{a as Y}from"./chunk-OQORDQLH.js";import{a as y,c as U}from"./chunk-QMXKGSFH.js";import{b as L}from"./chunk-YGKQCEVG.js";import{a as p,b as w}from"./chunk-STJ3LWFL.js";import{b as g,c as x,d as M,f as _,j as R,n as j,p as D}from"./chunk-PJYNAUQB.js";import{r as k}from"./chunk-D6YDSGR4.js";import{aa as B}from"./chunk-T5GSCWN5.js";import{O as b,ua as a,va as O}from"./chunk-5W443CKL.js";import{A as P,v as f,w as d,x as C}from"./chunk-6EZ7JWBK.js";import{d as S}from"./chunk-WKBVT5WG.js";import{Lb as $}from"./chunk-DONEJHDG.js";import{f as T,q as l}from"./chunk-773TIA5M.js";import{e as z,g as v}from"./chunk-VKWPEFWQ.js";v();var A=z(B(),1);async function Te(e,t,r,o){let n=e.environment?.[0],s=t??await b(k({store:e.store}),e.password);if(e.strict){let m=e.json?"json":"text",{offenses:c}=await L(e.path??l(),m);if(c.length>0&&c.filter(J=>J.severity===A.Severity.ERROR).length>0)throw O(new S(n?`[${n}] Theme check failed. Please fix the errors before pushing.`:"Theme check failed. Please fix the errors before pushing."))}a("theme-service:push:setup"),Y({verbose:e.verbose,noColor:e.noColor});let i=e.force??!1,h=e.path?T(e.path):l();if(!await I(h)&&!await U(i,void 0,n,r))return;e.listing&&await q(h,e.listing);let u=await Z(s,e,r);u&&(a("theme-service:push:setup"),await W(u,s,{allowLive:e.allowLive??!1,environment:n,force:i,ignore:e.ignore??[],json:e.json??!1,multiEnvironment:r,nodelete:e.nodelete??!1,only:e.only??[],path:h,publish:e.publish??!1,listing:e.listing},o))}async function W(e,t,r,o){a("theme-service:push:file-system");let n=await j(e.id,t),s=H(r.path,{filters:r,listing:r.listing});a("theme-service:push:file-system");let{uploadResults:i,renderThemeSyncProgress:h}=V(e,t,n,s,r,o);await h(),r.publish&&await D(e.id,t),await G(i,e,t,r)}function E(e){for(let[t,r]of e.entries())if(!r.success)return!0;return!1}async function G(e,t,r,o){o.json?K(t,r,e,o.environment):o.publish?Q(r,e,o.environment):X(t,r,e,o.environment)}function K(e,t,r,o){let n={environment:o,theme:{id:e.id,name:e.name,role:e.role,shop:t.storeFqdn,editor_url:w(e,t),preview_url:p(e,t)}};if(E(r)){let i=`${o?`[${o}] `:""}The theme '${e.name}' was pushed with errors`;n.theme.warning=i;let h={};for(let[u,m]of r.entries())!m.success&&m.errors?.asset&&(h[u]=m.errors.asset);Object.keys(h).length>0&&(n.theme.errors=h)}$(JSON.stringify(n))}function Q(e,t,r){let o=r?[{subdued:`Environment: ${r}
1
+ import{a as V}from"./chunk-N5YIZJ4S.js";import{a as N}from"./chunk-F447QKVX.js";import{a as F}from"./chunk-7KHYEIA7.js";import{k as q,l as H,n as I}from"./chunk-235JVI2J.js";import{a as Y}from"./chunk-LMPD55L6.js";import{a as y,c as U}from"./chunk-H3V6Y5JO.js";import{b as L}from"./chunk-AP6FNGTA.js";import{a as p,b as w}from"./chunk-STJ3LWFL.js";import{b as g,c as x,d as M,f as _,j as R,n as j,p as D}from"./chunk-7ZIO3X22.js";import{r as k}from"./chunk-JGN7YG5X.js";import{aa as B}from"./chunk-7BVXGS44.js";import{O as b,ua as a,va as O}from"./chunk-3EQY5B4S.js";import{A as P,v as f,w as d,x as C}from"./chunk-YYLEWVO6.js";import{d as S}from"./chunk-AUZCENYI.js";import{Lb as $}from"./chunk-BXDZX3BS.js";import{f as T,q as l}from"./chunk-773TIA5M.js";import{e as z,g as v}from"./chunk-VKWPEFWQ.js";v();var A=z(B(),1);async function Te(e,t,r,o){let n=e.environment?.[0],s=t??await b(k({store:e.store}),e.password);if(e.strict){let m=e.json?"json":"text",{offenses:c}=await L(e.path??l(),m);if(c.length>0&&c.filter(J=>J.severity===A.Severity.ERROR).length>0)throw O(new S(n?`[${n}] Theme check failed. Please fix the errors before pushing.`:"Theme check failed. Please fix the errors before pushing."))}a("theme-service:push:setup"),Y({verbose:e.verbose,noColor:e.noColor});let i=e.force??!1,h=e.path?T(e.path):l();if(!await I(h)&&!await U(i,void 0,n,r))return;e.listing&&await q(h,e.listing);let u=await Z(s,e,r);u&&(a("theme-service:push:setup"),await W(u,s,{allowLive:e.allowLive??!1,environment:n,force:i,ignore:e.ignore??[],json:e.json??!1,multiEnvironment:r,nodelete:e.nodelete??!1,only:e.only??[],path:h,publish:e.publish??!1,listing:e.listing},o))}async function W(e,t,r,o){a("theme-service:push:file-system");let n=await j(e.id,t),s=H(r.path,{filters:r,listing:r.listing});a("theme-service:push:file-system");let{uploadResults:i,renderThemeSyncProgress:h}=V(e,t,n,s,r,o);await h(),r.publish&&await D(e.id,t),await G(i,e,t,r)}function E(e){for(let[t,r]of e.entries())if(!r.success)return!0;return!1}async function G(e,t,r,o){o.json?K(t,r,e,o.environment):o.publish?Q(r,e,o.environment):X(t,r,e,o.environment)}function K(e,t,r,o){let n={environment:o,theme:{id:e.id,name:e.name,role:e.role,shop:t.storeFqdn,editor_url:w(e,t),preview_url:p(e,t)}};if(E(r)){let i=`${o?`[${o}] `:""}The theme '${e.name}' was pushed with errors`;n.theme.warning=i;let h={};for(let[u,m]of r.entries())!m.success&&m.errors?.asset&&(h[u]=m.errors.asset);Object.keys(h).length>0&&(n.theme.errors=h)}$(JSON.stringify(n))}function Q(e,t,r){let o=r?[{subdued:`Environment: ${r}
2
2
 
3
3
  `}]:[];E(t)?d({body:[...o,`Your theme was published with errors and is now live at https://${e.storeFqdn}`]}):f({body:[...o,`Your theme is now live at https://${e.storeFqdn}`]})}function X(e,t,r,o){let n=o?[{subdued:`Environment: ${o}
4
4
 
@@ -1 +1 @@
1
- import{c as d}from"./chunk-PJYNAUQB.js";import{xa as i}from"./chunk-5W443CKL.js";import{A as s,D as a,w as m,x as u}from"./chunk-6EZ7JWBK.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();function f(e){return[`'${e.name}'`,{subdued:`(#${e.id})`}]}function y(e){return{list:{items:e.map(f)}}}async function T(e,r="It doesn't seem like you're running this command in a theme directory.",o,n){if(e)return!0;if(n)return u({headline:o?`Environment: ${o}`:"",body:r}),!1;if(m({body:r}),!process.stdout.isTTY)return!0;let t=await s({message:"Do you want to proceed?"});return i(`theme-service:confirm-directory:${t}`),t}async function v(e,r,o){if(e.role!==d||!process.stdout.isTTY||o)return!0;let n=`You're about to ${r} on your live theme "${e.name}". This will make changes visible to customers. Are you sure you want to proceed?`,t=await s({message:n,confirmationMessage:"Yes, proceed with live theme",cancellationMessage:"No, cancel"});return i(`theme-service:confirm-live-theme:${t}`),t}async function E(e,r,o=!1){e.length>0&&await a(e,{renderOptions:{stdout:r??process.stderr},noProgressBar:o})}export{f as a,y as b,T as c,v as d,E as e};
1
+ import{c as d}from"./chunk-7ZIO3X22.js";import{xa as i}from"./chunk-3EQY5B4S.js";import{A as s,D as a,w as m,x as u}from"./chunk-YYLEWVO6.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();function f(e){return[`'${e.name}'`,{subdued:`(#${e.id})`}]}function y(e){return{list:{items:e.map(f)}}}async function T(e,r="It doesn't seem like you're running this command in a theme directory.",o,n){if(e)return!0;if(n)return u({headline:o?`Environment: ${o}`:"",body:r}),!1;if(m({body:r}),!process.stdout.isTTY)return!0;let t=await s({message:"Do you want to proceed?"});return i(`theme-service:confirm-directory:${t}`),t}async function v(e,r,o){if(e.role!==d||!process.stdout.isTTY||o)return!0;let n=`You're about to ${r} on your live theme "${e.name}". This will make changes visible to customers. Are you sure you want to proceed?`,t=await s({message:n,confirmationMessage:"Yes, proceed with live theme",cancellationMessage:"No, cancel"});return i(`theme-service:confirm-live-theme:${t}`),t}async function E(e,r,o=!1){e.length>0&&await a(e,{renderOptions:{stdout:r??process.stderr},noProgressBar:o})}export{f as a,y as b,T as c,v as d,E as e};
@@ -1,4 +1,4 @@
1
- import{a as Nc,e as Mc,f as jc}from"./chunk-MZMYBFZQ.js";import{a as Lc}from"./chunk-XH6ZP7M5.js";import{c as Bc,i as Rc,o as ly}from"./chunk-VDN6MEYI.js";import{N as Ec,P as bc,Q as Dc,fa as Cc,ma as Oc,p as wc,z as un}from"./chunk-5W443CKL.js";import{B as kc,D as Tc,l as Ac,m as _c,p as Fc,x as ho}from"./chunk-GW3VY3FZ.js";import{b as hn}from"./chunk-UKK5P74A.js";import{A as rt,D as Pc,F as Sr,d as cy,r as Be,u as mt,v as Cr,w as Xe,y as cn,z as tt}from"./chunk-6EZ7JWBK.js";import{d as I,g as ln}from"./chunk-WKBVT5WG.js";import{$ as hc,$a as pc,Ca as oo,Ea as an,Fb as gt,Gb as Ic,Hb as Ar,Mb as it,Pb as me,Ta as U,U as uc,Wa as dc,X as cc,Z as lc,ma as X,pa as br,qb as mc,sb as gc,ua as V,wa as sn,ya as on,yb as Sc}from"./chunk-DONEJHDG.js";import{u as W}from"./chunk-A4SBXDZB.js";import{b as K0}from"./chunk-NJOO5XJV.js";import{a as Q0,b as fc}from"./chunk-ZG7BVVT2.js";import{d as M,f as J,g as kt,i as le,j as Tt,k as nn,n as ac}from"./chunk-773TIA5M.js";import{a as yc,c as vc,d as ao,e as Dr,f as ty,g as uo,h as ry,i as iy,j as xc,k as co,m as oy,n as lo,o as ay,q as uy}from"./chunk-T6CC5WUU.js";import{b as ey,c as et}from"./chunk-UQWFDL3F.js";import{b as Z0}from"./chunk-I5A6BPCP.js";import{a as sy}from"./chunk-ET2CGROE.js";import{c as ny}from"./chunk-TOLPNBZK.js";import{a as F,c as E,e as rn,g as y}from"./chunk-VKWPEFWQ.js";var Ot=E(fo=>{"use strict";y();Object.defineProperty(fo,"__esModule",{value:!0});var dy=e=>{process.stdout.write(e)},py=e=>{process.stderr.write(e)};fo.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 Hc=F("node:fs"),po=F("node:fs/promises"),my=async e=>{let t;try{t=await(0,po.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,po.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 zc(e){let t=await(0,po.readFile)(e,"utf8");return JSON.parse(t)}Ce.readJson=zc;function yy(e,t=!0){let r=(0,Hc.readFileSync)(e,"utf8");return t?JSON.parse(r):r}Ce.readJsonSync=yy;async function vy(e){try{return await zc(e)}catch{}}Ce.safeReadJson=vy;function xy(e){return(0,Hc.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 mo(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=mo(e[0],t[0]);return r!==0?r:mo(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Cy(e,t){return e.sort((r,i)=>mo(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 Wc=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=F("node:url"),Jc=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,Jc.dirExists)(e):e}});ge.file=Vt({async parse(e,t,r){return r.exists?(0,Jc.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 Gc=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(yo=>{"use strict";y();Object.defineProperty(yo,"__esModule",{value:!0});var $y=F("node:fs"),qy=F("node:path"),go=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:Gc().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"}}}}};yo.default=go});var Pt=E(fn=>{"use strict";y();Object.defineProperty(fn,"__esModule",{value:!0});fn.settings=void 0;global.oclif||(global.oclif={});fn.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 Xc(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var Vc=Number.parseInt(process.env.OCLIF_COLUMNS,10)||Uy.settings.columns;_r.stdtermwidth=Vc||Xc(process.stdout);_r.errtermwidth=Vc||Xc(process.stderr)});var wo=E(dn=>{"use strict";y();Object.defineProperty(dn,"__esModule",{value:!0});dn.Logger=void 0;var Yc=F("node:fs/promises"),Hy=F("node:path"),zy=Dr(),Jy=()=>new Date().toISOString(),vo,Wy=e=>new Promise(t=>{vo&&vo.unref(),vo=setTimeout(()=>t(null),e)});function Gy(e){return e.endsWith(`
1
+ import{a as Nc,e as Mc,f as jc}from"./chunk-ICXHUPP5.js";import{a as Lc}from"./chunk-KUKYAIOR.js";import{c as Bc,i as Rc,o as ly}from"./chunk-VDN6MEYI.js";import{N as Ec,P as bc,Q as Dc,fa as Cc,ma as Oc,p as wc,z as un}from"./chunk-3EQY5B4S.js";import{B as kc,D as Tc,l as Ac,m as _c,p as Fc,x as ho}from"./chunk-HX3TALXV.js";import{b as hn}from"./chunk-74IG3ZE3.js";import{A as rt,D as Pc,F as Sr,d as cy,r as Be,u as mt,v as Cr,w as Xe,y as cn,z as tt}from"./chunk-YYLEWVO6.js";import{d as I,g as ln}from"./chunk-AUZCENYI.js";import{$ as hc,$a as pc,Ca as oo,Ea as an,Fb as gt,Gb as Ic,Hb as Ar,Mb as it,Pb as me,Ta as U,U as uc,Wa as dc,X as cc,Z as lc,ma as X,pa as br,qb as mc,sb as gc,ua as V,wa as sn,ya as on,yb as Sc}from"./chunk-BXDZX3BS.js";import{u as W}from"./chunk-A4SBXDZB.js";import{b as K0}from"./chunk-NJOO5XJV.js";import{a as Q0,b as fc}from"./chunk-ZG7BVVT2.js";import{d as M,f as J,g as kt,i as le,j as Tt,k as nn,n as ac}from"./chunk-773TIA5M.js";import{a as yc,c as vc,d as ao,e as Dr,f as ty,g as uo,h as ry,i as iy,j as xc,k as co,m as oy,n as lo,o as ay,q as uy}from"./chunk-T6CC5WUU.js";import{b as ey,c as et}from"./chunk-UQWFDL3F.js";import{b as Z0}from"./chunk-I5A6BPCP.js";import{a as sy}from"./chunk-ET2CGROE.js";import{c as ny}from"./chunk-TOLPNBZK.js";import{a as F,c as E,e as rn,g as y}from"./chunk-VKWPEFWQ.js";var Ot=E(fo=>{"use strict";y();Object.defineProperty(fo,"__esModule",{value:!0});var dy=e=>{process.stdout.write(e)},py=e=>{process.stderr.write(e)};fo.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 Hc=F("node:fs"),po=F("node:fs/promises"),my=async e=>{let t;try{t=await(0,po.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,po.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 zc(e){let t=await(0,po.readFile)(e,"utf8");return JSON.parse(t)}Ce.readJson=zc;function yy(e,t=!0){let r=(0,Hc.readFileSync)(e,"utf8");return t?JSON.parse(r):r}Ce.readJsonSync=yy;async function vy(e){try{return await zc(e)}catch{}}Ce.safeReadJson=vy;function xy(e){return(0,Hc.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 mo(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=mo(e[0],t[0]);return r!==0?r:mo(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Cy(e,t){return e.sort((r,i)=>mo(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 Wc=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=F("node:url"),Jc=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,Jc.dirExists)(e):e}});ge.file=Vt({async parse(e,t,r){return r.exists?(0,Jc.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 Gc=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(yo=>{"use strict";y();Object.defineProperty(yo,"__esModule",{value:!0});var $y=F("node:fs"),qy=F("node:path"),go=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:Gc().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"}}}}};yo.default=go});var Pt=E(fn=>{"use strict";y();Object.defineProperty(fn,"__esModule",{value:!0});fn.settings=void 0;global.oclif||(global.oclif={});fn.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 Xc(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var Vc=Number.parseInt(process.env.OCLIF_COLUMNS,10)||Uy.settings.columns;_r.stdtermwidth=Vc||Xc(process.stdout);_r.errtermwidth=Vc||Xc(process.stderr)});var wo=E(dn=>{"use strict";y();Object.defineProperty(dn,"__esModule",{value:!0});dn.Logger=void 0;var Yc=F("node:fs/promises"),Hy=F("node:path"),zy=Dr(),Jy=()=>new Date().toISOString(),vo,Wy=e=>new Promise(t=>{vo&&vo.unref(),vo=setTimeout(()=>t(null),e)});function Gy(e){return e.endsWith(`
2
2
  `)?e.replace(/\n$/,""):e}var xo=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,Yc.mkdir)((0,Hy.dirname)(this.file),{recursive:!0}),await(0,Yc.appendFile)(this.file,r.join(`
3
3
  `)+`
4
4
  `)}),await this.flushing}log(t){t=zy(Gy(t));let r=t.split(`
@@ -1,2 +1,2 @@
1
- import{w as h}from"./chunk-6RL7FUPD.js";import{a as d}from"./chunk-HM5H7WBE.js";import{a as f}from"./chunk-ZAMDXIVC.js";import{Fa as l}from"./chunk-ATXODH6C.js";import{b as m}from"./chunk-H5C3QTOO.js";import{Lb as c,Xb as u}from"./chunk-DONEJHDG.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();function g(p){let e=h(p),o=new Map;e.forEach(s=>{let r=s.split(".");if(r.length>=2){let i=r[0];o.has(i)||o.set(i,[]),o.set(i,[...o.get(i),s])}});for(let[s,r]of o)c(u(s,r.join(`
1
+ import{w as h}from"./chunk-ZKBWEHIY.js";import{a as d}from"./chunk-PLHJQQVZ.js";import{a as f}from"./chunk-6V37CHBZ.js";import{Fa as l}from"./chunk-KJQAJUDU.js";import{b as m}from"./chunk-S5JJL3BP.js";import{Lb as c,Xb as u}from"./chunk-BXDZX3BS.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();function g(p){let e=h(p),o=new Map;e.forEach(s=>{let r=s.split(".");if(r.length>=2){let i=r[0];o.has(i)||o.set(i,[]),o.set(i,[...o.get(i),s])}});for(let[s,r]of o)c(u(s,r.join(`
2
2
  `)))}var a,t=class extends d{async run(){let{flags:e}=await this.parse(a),{app:o}=await l({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config});return o.errors.isEmpty()?g(o):process.exit(2),{app:o}}};a=t;t.summary="Print out a list of sources that may be used with the logs command.";t.descriptionWithMarkdown="The output source names can be used with the `--source` argument of `shopify app logs` to filter log output. Currently only function extensions are supported as sources.";t.description=a.descriptionWithoutMarkdown();t.flags={...m,...f};var N=t;export{N as a};
@@ -1,4 +1,4 @@
1
- import{j as W,l as B}from"./chunk-KN3FTJDU.js";import{O as v,a as O}from"./chunk-6EZ7JWBK.js";import{f as h}from"./chunk-WRRUFK4Y.js";import{d as u,g as T}from"./chunk-WKBVT5WG.js";import{$a as S,Bb as L,Fb as o,Hb as s,Pb as d,Ta as w,Ua as i,Wa as D,ma as x,ua as b}from"./chunk-DONEJHDG.js";import{d as c,i as k}from"./chunk-773TIA5M.js";import{a as I}from"./chunk-CX5CC6P5.js";import{e as R,g}from"./chunk-VKWPEFWQ.js";g();g();function M(e,n){try{return JSON.parse(e)}catch(a){let r=a instanceof Error?a.message:String(a),t=n?` from ${n}`:"";throw new u(`Failed to parse JSON${t}.
1
+ import{j as W,l as B}from"./chunk-TM534QSE.js";import{O as v,a as O}from"./chunk-YYLEWVO6.js";import{f as h}from"./chunk-N5U5Q2MG.js";import{d as u,g as T}from"./chunk-AUZCENYI.js";import{$a as S,Bb as L,Fb as o,Hb as s,Pb as d,Ta as w,Ua as i,Wa as D,ma as x,ua as b}from"./chunk-BXDZX3BS.js";import{d as c,i as k}from"./chunk-773TIA5M.js";import{a as I}from"./chunk-CX5CC6P5.js";import{e as R,g}from"./chunk-VKWPEFWQ.js";g();g();function M(e,n){try{return JSON.parse(e)}catch(a){let r=a instanceof Error?a.message:String(a),t=n?` from ${n}`:"";throw new u(`Failed to parse JSON${t}.
2
2
  ${r}`)}}var l=R(I()),N="yarn.lock",j="package-lock.json",J="pnpm-lock.yaml",$="bun.lockb",C="bun.lock",V="pnpm-workspace.yaml",ke=[N,J,j,$,C],we={yarn:[N],npm:[j],pnpm:[J],bun:[$,C],homebrew:[],unknown:[]},E=["yarn","npm","pnpm","bun","homebrew","unknown"],_=class extends u{constructor(){super("Unknown package manager")}},y=class extends u{constructor(n){super(s`The directory ${o.path(n)} doesn't have a package.json.`)}},P=class extends T{constructor(n){super(s`Couldn't find a a package.json traversing directories from ${o.path(n)}`)}};function A(e=process.env){return e.npm_config_user_agent?.includes("yarn")?"yarn":e.npm_config_user_agent?.includes("pnpm")?"pnpm":e.npm_config_user_agent?.includes("bun")?"bun":e.npm_config_user_agent?.includes("npm")?"npm":"unknown"}function U(e){return i(c(e,$))||i(c(e,C))}function G(e){switch(e){case"yarn":case"npm":case"pnpm":case"bun":return e;case"homebrew":case"unknown":return"npm"}}function K(e,n,...a){switch(e){case"npm":return{command:"npm",args:["exec","--",n,...a]};case"pnpm":return{command:"pnpm",args:["exec",n,...a]};case"yarn":return{command:"yarn",args:["run",n,...a]};case"bun":return{command:"bun",args:["x",n,...a]}}}async function F(e){let n=e;for(d(s`Looking for a lockfile in ${o.path(n)}...`);;){if(i(c(n,N)))return"yarn";if(i(c(n,J))||i(c(n,V)))return"pnpm";if(U(n))return"bun";if(i(c(n,j)))return"npm";let r=k(n);if(r===n)break;n=r}let a=A();return a!=="unknown"?a:"npm"}async function he(e,n,...a){let r=G(await F(e));return K(r,n,...a)}async function ye(e){let n=await D(c(e.directory,"**/package.json"),{ignore:[c(e.directory,"node_modules/**/package.json")],cwd:e.directory,onlyFiles:!0,deep:e.deep}),a=new O;try{await Promise.all(n.map(async r=>{let t=k(r);await z({directory:t,packageManager:e.packageManager,stdout:void 0,stderr:void 0,signal:a.signal,args:[]})}))}catch(r){throw a.abort(),r}}async function z(e){let n={cwd:e.directory,stdin:void 0,stdout:e.stdout,stderr:e.stderr,signal:e.signal},a=["install"];e.args&&(a=a.concat(e.args)),await h("cmd_all_timing_network_ms")(async()=>{await v(e.packageManager,a,n)})}async function xe(e){return(await f(e)).name}async function be(e){return(await f(e)).version}async function H(e){let n=await f(e),a=n.dependencies??{},r=n.devDependencies??{};return{...a,...r}}async function ve(e){let n=c(e,"package.json"),a=await f(n),r=c(e,V);return!!a.workspaces||w(r)}async function Me(e,n,{cacheExpiryInHours:a=0}={}){let r=async()=>(d(s`Checking if there's a version of ${e} newer than ${n}`),ne(e)),t=`npm-package-${e}`,p;try{p=await W(t,r,a*3600*1e3)}catch{return}if(p&&new l.SemVer(n).compare(p)<0)return p}function _e(e,n){let a=`npm-package-${e}`,r=B(a)?.value;if(r&&new l.SemVer(n).compare(r)<0)return r}function Pe(e,n){return(0,l.satisfies)(e,n)}async function f(e){if(!await w(e))throw new y(k(e));return M(await x(e),e)}async function Y(e,n){d(s`Adding the following dependencies if needed:
3
3
  ${o.json(e)}
4
4
  With options:
@@ -1,4 +1,4 @@
1
- import{C as s,u as e,v as o,w as n,x as i,y as t}from"./chunk-6EZ7JWBK.js";import{d,g as l}from"./chunk-WKBVT5WG.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();async function u(){e({headline:"CLI update available.",body:["Run",{command:"npm run shopify upgrade"},{char:"."}]}),e({headline:["To connect this project to your shopify store cd into:",{filePath:"/my-store/hydrogen.config.js"},{char:"."}],body:["You can also try the following steps:",{list:{items:[["Run",{command:"shopify project connect"}],["Run",{command:"hydrogen start"}]]}}]}),e({headline:"About your app.",customSections:[{body:{tabularData:[["Configuration file",{filePath:"shopify.app.scalable-transaction-app.toml"}],["App name",{userInput:"scalable-transaction-app"}],["Access scopes","read_products,write_products"]],firstColumnSubdued:!0}}]}),e({headline:[{userInput:"my-app"},"initialized and ready to build."],nextSteps:[["Run",{command:"cd verification-app"}],["To preview your project, run",{command:"npm app dev"}],["To add extensions, run",{command:"npm generate extension"}]],reference:[["Run",{command:"npm shopify help"}],{link:{label:"Dev docs",url:"https://shopify.dev"}}],customSections:[{title:"Custom section",body:{list:{items:[{link:{label:"Item 1",url:"https://shopify.com"}},"Item 2",{link:{url:"https://community.shopify.com/"}}]}}},{title:"Custom section 2",body:{list:{items:["Item 1","Item 2","Item 3"]}}}]}),o({headline:"CLI updated.",body:"You are now running version 3.47."}),o({headline:"Deployment successful.",body:"Your extensions have been uploaded to your Shopify Partners Dashboard.",nextSteps:[{link:{label:"See your deployment and set it live",url:"https://partners.shopify.com/1797046/apps/4523695/deployments"}}]}),n({headline:"You have reached your limit of checkout extensions for this app.",body:"You can free up space for a new one by deleting an existing one."}),n({headline:"Required access scope update.",body:"The deadline for re-selecting your app scopes is May 1, 2022.",reference:[{link:{label:"Dev docs",url:"https://shopify.dev/app/scopes"}}]});let a=new l("Something went wrong.");a.stack=`
1
+ import{C as s,u as e,v as o,w as n,x as i,y as t}from"./chunk-YYLEWVO6.js";import{d,g as l}from"./chunk-AUZCENYI.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();async function u(){e({headline:"CLI update available.",body:["Run",{command:"npm run shopify upgrade"},{char:"."}]}),e({headline:["To connect this project to your shopify store cd into:",{filePath:"/my-store/hydrogen.config.js"},{char:"."}],body:["You can also try the following steps:",{list:{items:[["Run",{command:"shopify project connect"}],["Run",{command:"hydrogen start"}]]}}]}),e({headline:"About your app.",customSections:[{body:{tabularData:[["Configuration file",{filePath:"shopify.app.scalable-transaction-app.toml"}],["App name",{userInput:"scalable-transaction-app"}],["Access scopes","read_products,write_products"]],firstColumnSubdued:!0}}]}),e({headline:[{userInput:"my-app"},"initialized and ready to build."],nextSteps:[["Run",{command:"cd verification-app"}],["To preview your project, run",{command:"npm app dev"}],["To add extensions, run",{command:"npm generate extension"}]],reference:[["Run",{command:"npm shopify help"}],{link:{label:"Dev docs",url:"https://shopify.dev"}}],customSections:[{title:"Custom section",body:{list:{items:[{link:{label:"Item 1",url:"https://shopify.com"}},"Item 2",{link:{url:"https://community.shopify.com/"}}]}}},{title:"Custom section 2",body:{list:{items:["Item 1","Item 2","Item 3"]}}}]}),o({headline:"CLI updated.",body:"You are now running version 3.47."}),o({headline:"Deployment successful.",body:"Your extensions have been uploaded to your Shopify Partners Dashboard.",nextSteps:[{link:{label:"See your deployment and set it live",url:"https://partners.shopify.com/1797046/apps/4523695/deployments"}}]}),n({headline:"You have reached your limit of checkout extensions for this app.",body:"You can free up space for a new one by deleting an existing one."}),n({headline:"Required access scope update.",body:"The deadline for re-selecting your app scopes is May 1, 2022.",reference:[{link:{label:"Dev docs",url:"https://shopify.dev/app/scopes"}}]});let a=new l("Something went wrong.");a.stack=`
2
2
  Error: Unexpected error
3
3
  at Module._compile (internal/modules/cjs/loader.js:1137:30)
4
4
  at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
@@ -1,2 +1,2 @@
1
- import{A as x,a as ne,b as ie,c as L,d as ae,e as le,g as P,i as v,j as ce,k as ue,m as pe,n as me,o as fe,r as de,s as ge,t as Ee,u as he,v as U,w as ye,x as Te,y as we,z as A}from"./chunk-6RL7FUPD.js";import{a as oe}from"./chunk-JOZXRV5K.js";import{a as se}from"./chunk-HM5H7WBE.js";import{a as z}from"./chunk-ZAMDXIVC.js";import{F as X,Fa as re,_ as ee,ba as te,m as W}from"./chunk-ATXODH6C.js";import{ea as Z}from"./chunk-442S5SDM.js";import{z as G}from"./chunk-5W443CKL.js";import{b as Y,c as K}from"./chunk-H5C3QTOO.js";import{i as H,u as Q}from"./chunk-6EZ7JWBK.js";import{d as _}from"./chunk-WKBVT5WG.js";import{Lb as M,Mb as S,da as $,eb as F,fb as f,gb as o}from"./chunk-DONEJHDG.js";import{j as V}from"./chunk-773TIA5M.js";import{r as _e}from"./chunk-T6CC5WUU.js";import{e as N,g as E}from"./chunk-VKWPEFWQ.js";E();E();E();E();E();E();var C=N(F(),1);function be(t){let s=(0,C.useRef)(t);(0,C.useEffect)(()=>{s.current=t},[t]),(0,C.useEffect)(()=>{let n;function i(){s.current().then(({retryIntervalMs:a})=>{a&&(n=setTimeout(i,a))}).catch(()=>{})}return n=setTimeout(i,0),()=>n&&clearTimeout(n)},[])}E();var B=async({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:i,organizationId:l})=>{let a=await i.appLogs({jwtToken:t,cursor:s},l),{errors:p,status:u}=a;if(u!==200){if(u===401||u===429||u>=500)return{errors:p.map(T=>({status:u,message:T}))};throw new _(`${p.join(", ")} while fetching app logs`)}let{cursor:r,app_logs:c}=a,d=Ce(c,n);return{cursor:r,appLogs:d}};function Ce(t,s){let n=t;return(s.status!==void 0||s.sources!==void 0)&&(n=n.filter(i=>{let l=s.status===void 0?!0:i.status===s.status,a=s.sources===void 0?!0:s.sources.includes(`${i.source_namespace}.${i.source}`);return l&&a})),n}var b=N(F(),1);async function Fe({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:l,setErrors:a,setAppLogOutputs:p,resubscribeCallback:u,developerPlatformClient:r}){let c=t,d=P,T=s,R=await B({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:l}),m="not_attempted",w=R;if(w.errors){let h=await U({response:w,onThrottle:g=>{a(["Request throttled while polling app logs.",`Retrying in ${g/1e3}s`])},onUnknownError:g=>{a(["Error while polling app logs",`Retrying in ${g/1e3}s`])},onResubscribe:()=>u()});m=h.resubscribeResult,h.nextJwtToken&&(c=h.nextJwtToken),d=h.retryIntervalMs}else{a(g=>g.length?[]:g);let{appLogs:h}=R;if(T=R.cursor,h)for(let g of h){let y,k,q,j=i.get(g.shop_id.toString());if(j===void 0)continue;switch(g.log_type){case ue:y=de(g.payload),k=`export "${y.export}" executed in ${(y.fuelConsumed/ce).toFixed(4)}M instructions`;break;case pe:y=ge(g.payload),k="network access response retrieved from cache";break;case me:y=Ee(g.payload),k="network access request executing in background";break;case fe:y=he(g.payload),q=y.connectTimeMs&&y.writeReadTimeMs?y.connectTimeMs+y.writeReadTimeMs:null,k=`network access request executed${q?` in ${q} ms`:""}`;break;default:continue}let ke={status:g.status==="success"?"Success":"Failure",source:g.source,storeName:j,description:k,logTimestamp:$(g.log_timestamp)};y&&p(Ne=>[...Ne,{appLog:y,prefix:ke}])}}return{nextJwtToken:c,retryIntervalMs:d,cursor:T??s,resubscribeResult:m}}function Re({initialJwt:t,filters:s,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a}){let[p,u]=(0,b.useState)([]),[r,c]=(0,b.useState)([]),d=(0,b.useRef)(t),T=(0,b.useRef)(0),R=(0,b.useRef)(""),m=(0,b.useRef)(0),w=(0,b.useCallback)(async()=>{let h=await Fe({jwtToken:d.current,cursor:R.current,filters:s,storeNameById:i,setErrors:u,setAppLogOutputs:c,resubscribeCallback:n,developerPlatformClient:l,organizationId:a});if(h.resubscribeResult==="failed"){if(m.current+=1,m.current>=v)return u(["App log streaming session has expired. Please restart your dev session."]),{retryIntervalMs:0}}else h.resubscribeResult==="succeeded"&&(m.current=0);return d.current=h.nextJwtToken,R.current=h.cursor,T.current=h.retryIntervalMs,{retryIntervalMs:T.current}},[]);return be(w),{appLogOutputs:r,errors:p}}var e=N(F(),1);var Me=t=>{switch(t){case L.NoCachedResponse:return"No cached response available";case L.CacheAboutToExpire:return"Cache is about to expire";case L.Unknown:return"Unknown reason"}},xe=({pollOptions:{jwtToken:t,filters:s},resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a})=>{let{appLogOutputs:p,errors:u}=Re({filters:s,initialJwt:t,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a});return e.default.createElement(e.default.Fragment,null,p.map(({appLog:r,prefix:c},d)=>e.default.createElement(f,{flexDirection:"column",key:d},e.default.createElement(f,{flexDirection:"row",gap:1},e.default.createElement(o,null,e.default.createElement(o,{color:"green"},c.logTimestamp," "),e.default.createElement(o,{color:"blueBright"},`${c.storeName.split(".")[0]}`," "),e.default.createElement(o,{color:"blueBright"},c.source," "),e.default.createElement(o,{color:c.status==="Success"?"green":"red"},c.status," "),e.default.createElement(o,null,c.description))),e.default.createElement(f,{flexDirection:"column",marginLeft:4},r instanceof ne&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,r.logs),r.inputQueryVariablesMetafieldKey&&r.inputQueryVariablesMetafieldNamespace?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input Query Variables:"),e.default.createElement(f,{flexDirection:"row",marginLeft:1,marginTop:1},e.default.createElement(o,{dimColor:!0},"Namespace:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldNamespace)),e.default.createElement(f,{flexDirection:"row",marginLeft:1},e.default.createElement(o,{dimColor:!0},"Key:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldKey)),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.inputQueryVariablesMetafieldValue)??e.default.createElement(o,{color:"red"},"Metafield is not set")))):null,r.input?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input ",e.default.createElement(o,{dimColor:!0},"(",r.inputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.input)))):null,r.output?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Output ",e.default.createElement(o,{dimColor:!0},"(",r.outputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.output)))):null),r instanceof ie&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Cache write time: ",new Date(r.cacheEntryEpochMs).toISOString()),e.default.createElement(o,null,"Cache TTL: ",r.cacheTtlMs/1e3," s"),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))),r instanceof ae&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Reason: ",Me(r.reason)),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest))),r instanceof le&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Attempt: ",r.attempt),r.connectTimeMs?e.default.createElement(o,null,"Connect time: ",r.connectTimeMs," ms"):null,r.writeReadTimeMs?e.default.createElement(o,null,"Write read time: ",r.writeReadTimeMs," ms"):null,e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),r.httpResponse?e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))):null,r.error?e.default.createElement(o,null,"Error: ",r.error):null)))),u.length>0&&e.default.createElement(f,{flexDirection:"column"},u.map((r,c)=>e.default.createElement(f,{key:c},e.default.createElement(o,{color:"red"},r)))))};var Ie=N(F(),1);async function Se({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l}){let a=async()=>A(n,s,l);return H(Ie.default.createElement(xe,{pollOptions:t,resubscribeCallback:a,storeNameById:i,developerPlatformClient:n,organizationId:l}))}E();async function D({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:a=0}){let p=await B({pollOptions:t,developerPlatformClient:n,organizationId:l}),u=P,r=t.jwtToken,c=a,d=p;if(d.errors){let m=await U({response:d,onThrottle:w=>{S(JSON.stringify({message:"Request throttled while polling app logs.",retry_in_ms:w}))},onUnknownError:w=>{S(JSON.stringify({message:"Error while polling app logs.",retry_in_ms:w}))},onResubscribe:()=>A(n,s,l)});if(m.resubscribeResult==="failed"){if(c+=1,c>=v){S(JSON.stringify({message:"App log streaming session has expired. Please restart your dev session."}));return}}else m.resubscribeResult==="succeeded"&&(c=0);m.nextJwtToken&&(r=m.nextJwtToken),u=m.retryIntervalMs}else c=0;let{cursor:T,appLogs:R}=p;R&&R.forEach(m=>{let w=i.get(m.shop_id?.toString());w!==void 0&&M(Te({appLog:m,appLogPayload:we(m.payload,m.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{D({options:{variables:s,developerPlatformClient:n},pollOptions:{jwtToken:r||t.jwtToken,cursor:T??t.cursor,filters:t.filters},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:c}).catch(m=>{throw m})},u)}async function Ae(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,l=await Le(t),a=ye(s);if(a.length===0)throw new _("This app has no log sources. Learn more about app logs at https://shopify.dev/docs/api/shopify-cli/app/app-logs");if(t.sources){let d=t.sources.filter(T=>!a.includes(T));if(d.length)throw new _(`Invalid sources: ${d.join(", ")}. Valid sources are: ${a.join(", ")}`)}let p={shopIds:l.storeIds.map(Number),apiKey:n.apiKey},u=await A(i,p,t.organization.id),r={status:t.status,sources:t.sources},c={jwtToken:u,filters:r};t.format==="json"?(M(JSON.stringify({subscribedToStores:t.storeFqdns})),S(JSON.stringify({message:"Waiting for app logs..."})),await D({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id})):(S(`Waiting for app logs...
1
+ import{A as x,a as ne,b as ie,c as L,d as ae,e as le,g as P,i as v,j as ce,k as ue,m as pe,n as me,o as fe,r as de,s as ge,t as Ee,u as he,v as U,w as ye,x as Te,y as we,z as A}from"./chunk-ZKBWEHIY.js";import{a as oe}from"./chunk-E4GW6OXT.js";import{a as se}from"./chunk-PLHJQQVZ.js";import{a as z}from"./chunk-6V37CHBZ.js";import{F as X,Fa as re,_ as ee,ba as te,m as W}from"./chunk-KJQAJUDU.js";import{ea as Z}from"./chunk-UEC23KAO.js";import{z as G}from"./chunk-3EQY5B4S.js";import{b as Y,c as K}from"./chunk-S5JJL3BP.js";import{i as H,u as Q}from"./chunk-YYLEWVO6.js";import{d as _}from"./chunk-AUZCENYI.js";import{Lb as M,Mb as S,da as $,eb as F,fb as f,gb as o}from"./chunk-BXDZX3BS.js";import{j as V}from"./chunk-773TIA5M.js";import{r as _e}from"./chunk-T6CC5WUU.js";import{e as N,g as E}from"./chunk-VKWPEFWQ.js";E();E();E();E();E();E();var C=N(F(),1);function be(t){let s=(0,C.useRef)(t);(0,C.useEffect)(()=>{s.current=t},[t]),(0,C.useEffect)(()=>{let n;function i(){s.current().then(({retryIntervalMs:a})=>{a&&(n=setTimeout(i,a))}).catch(()=>{})}return n=setTimeout(i,0),()=>n&&clearTimeout(n)},[])}E();var B=async({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:i,organizationId:l})=>{let a=await i.appLogs({jwtToken:t,cursor:s},l),{errors:p,status:u}=a;if(u!==200){if(u===401||u===429||u>=500)return{errors:p.map(T=>({status:u,message:T}))};throw new _(`${p.join(", ")} while fetching app logs`)}let{cursor:r,app_logs:c}=a,d=Ce(c,n);return{cursor:r,appLogs:d}};function Ce(t,s){let n=t;return(s.status!==void 0||s.sources!==void 0)&&(n=n.filter(i=>{let l=s.status===void 0?!0:i.status===s.status,a=s.sources===void 0?!0:s.sources.includes(`${i.source_namespace}.${i.source}`);return l&&a})),n}var b=N(F(),1);async function Fe({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:l,setErrors:a,setAppLogOutputs:p,resubscribeCallback:u,developerPlatformClient:r}){let c=t,d=P,T=s,R=await B({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:l}),m="not_attempted",w=R;if(w.errors){let h=await U({response:w,onThrottle:g=>{a(["Request throttled while polling app logs.",`Retrying in ${g/1e3}s`])},onUnknownError:g=>{a(["Error while polling app logs",`Retrying in ${g/1e3}s`])},onResubscribe:()=>u()});m=h.resubscribeResult,h.nextJwtToken&&(c=h.nextJwtToken),d=h.retryIntervalMs}else{a(g=>g.length?[]:g);let{appLogs:h}=R;if(T=R.cursor,h)for(let g of h){let y,k,q,j=i.get(g.shop_id.toString());if(j===void 0)continue;switch(g.log_type){case ue:y=de(g.payload),k=`export "${y.export}" executed in ${(y.fuelConsumed/ce).toFixed(4)}M instructions`;break;case pe:y=ge(g.payload),k="network access response retrieved from cache";break;case me:y=Ee(g.payload),k="network access request executing in background";break;case fe:y=he(g.payload),q=y.connectTimeMs&&y.writeReadTimeMs?y.connectTimeMs+y.writeReadTimeMs:null,k=`network access request executed${q?` in ${q} ms`:""}`;break;default:continue}let ke={status:g.status==="success"?"Success":"Failure",source:g.source,storeName:j,description:k,logTimestamp:$(g.log_timestamp)};y&&p(Ne=>[...Ne,{appLog:y,prefix:ke}])}}return{nextJwtToken:c,retryIntervalMs:d,cursor:T??s,resubscribeResult:m}}function Re({initialJwt:t,filters:s,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a}){let[p,u]=(0,b.useState)([]),[r,c]=(0,b.useState)([]),d=(0,b.useRef)(t),T=(0,b.useRef)(0),R=(0,b.useRef)(""),m=(0,b.useRef)(0),w=(0,b.useCallback)(async()=>{let h=await Fe({jwtToken:d.current,cursor:R.current,filters:s,storeNameById:i,setErrors:u,setAppLogOutputs:c,resubscribeCallback:n,developerPlatformClient:l,organizationId:a});if(h.resubscribeResult==="failed"){if(m.current+=1,m.current>=v)return u(["App log streaming session has expired. Please restart your dev session."]),{retryIntervalMs:0}}else h.resubscribeResult==="succeeded"&&(m.current=0);return d.current=h.nextJwtToken,R.current=h.cursor,T.current=h.retryIntervalMs,{retryIntervalMs:T.current}},[]);return be(w),{appLogOutputs:r,errors:p}}var e=N(F(),1);var Me=t=>{switch(t){case L.NoCachedResponse:return"No cached response available";case L.CacheAboutToExpire:return"Cache is about to expire";case L.Unknown:return"Unknown reason"}},xe=({pollOptions:{jwtToken:t,filters:s},resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a})=>{let{appLogOutputs:p,errors:u}=Re({filters:s,initialJwt:t,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a});return e.default.createElement(e.default.Fragment,null,p.map(({appLog:r,prefix:c},d)=>e.default.createElement(f,{flexDirection:"column",key:d},e.default.createElement(f,{flexDirection:"row",gap:1},e.default.createElement(o,null,e.default.createElement(o,{color:"green"},c.logTimestamp," "),e.default.createElement(o,{color:"blueBright"},`${c.storeName.split(".")[0]}`," "),e.default.createElement(o,{color:"blueBright"},c.source," "),e.default.createElement(o,{color:c.status==="Success"?"green":"red"},c.status," "),e.default.createElement(o,null,c.description))),e.default.createElement(f,{flexDirection:"column",marginLeft:4},r instanceof ne&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,r.logs),r.inputQueryVariablesMetafieldKey&&r.inputQueryVariablesMetafieldNamespace?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input Query Variables:"),e.default.createElement(f,{flexDirection:"row",marginLeft:1,marginTop:1},e.default.createElement(o,{dimColor:!0},"Namespace:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldNamespace)),e.default.createElement(f,{flexDirection:"row",marginLeft:1},e.default.createElement(o,{dimColor:!0},"Key:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldKey)),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.inputQueryVariablesMetafieldValue)??e.default.createElement(o,{color:"red"},"Metafield is not set")))):null,r.input?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input ",e.default.createElement(o,{dimColor:!0},"(",r.inputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.input)))):null,r.output?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Output ",e.default.createElement(o,{dimColor:!0},"(",r.outputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.output)))):null),r instanceof ie&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Cache write time: ",new Date(r.cacheEntryEpochMs).toISOString()),e.default.createElement(o,null,"Cache TTL: ",r.cacheTtlMs/1e3," s"),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))),r instanceof ae&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Reason: ",Me(r.reason)),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest))),r instanceof le&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Attempt: ",r.attempt),r.connectTimeMs?e.default.createElement(o,null,"Connect time: ",r.connectTimeMs," ms"):null,r.writeReadTimeMs?e.default.createElement(o,null,"Write read time: ",r.writeReadTimeMs," ms"):null,e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),r.httpResponse?e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))):null,r.error?e.default.createElement(o,null,"Error: ",r.error):null)))),u.length>0&&e.default.createElement(f,{flexDirection:"column"},u.map((r,c)=>e.default.createElement(f,{key:c},e.default.createElement(o,{color:"red"},r)))))};var Ie=N(F(),1);async function Se({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l}){let a=async()=>A(n,s,l);return H(Ie.default.createElement(xe,{pollOptions:t,resubscribeCallback:a,storeNameById:i,developerPlatformClient:n,organizationId:l}))}E();async function D({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:a=0}){let p=await B({pollOptions:t,developerPlatformClient:n,organizationId:l}),u=P,r=t.jwtToken,c=a,d=p;if(d.errors){let m=await U({response:d,onThrottle:w=>{S(JSON.stringify({message:"Request throttled while polling app logs.",retry_in_ms:w}))},onUnknownError:w=>{S(JSON.stringify({message:"Error while polling app logs.",retry_in_ms:w}))},onResubscribe:()=>A(n,s,l)});if(m.resubscribeResult==="failed"){if(c+=1,c>=v){S(JSON.stringify({message:"App log streaming session has expired. Please restart your dev session."}));return}}else m.resubscribeResult==="succeeded"&&(c=0);m.nextJwtToken&&(r=m.nextJwtToken),u=m.retryIntervalMs}else c=0;let{cursor:T,appLogs:R}=p;R&&R.forEach(m=>{let w=i.get(m.shop_id?.toString());w!==void 0&&M(Te({appLog:m,appLogPayload:we(m.payload,m.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{D({options:{variables:s,developerPlatformClient:n},pollOptions:{jwtToken:r||t.jwtToken,cursor:T??t.cursor,filters:t.filters},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:c}).catch(m=>{throw m})},u)}async function Ae(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,l=await Le(t),a=ye(s);if(a.length===0)throw new _("This app has no log sources. Learn more about app logs at https://shopify.dev/docs/api/shopify-cli/app/app-logs");if(t.sources){let d=t.sources.filter(T=>!a.includes(T));if(d.length)throw new _(`Invalid sources: ${d.join(", ")}. Valid sources are: ${a.join(", ")}`)}let p={shopIds:l.storeIds.map(Number),apiKey:n.apiKey},u=await A(i,p,t.organization.id),r={status:t.status,sources:t.sources},c={jwtToken:u,filters:r};t.format==="json"?(M(JSON.stringify({subscribedToStores:t.storeFqdns})),S(JSON.stringify({message:"Waiting for app logs..."})),await D({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id})):(S(`Waiting for app logs...
2
2
  `),await Se({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id}))}async function Le(t){let{app:s,remoteApp:n,developerPlatformClient:i,primaryStore:l,organization:a}=t,p=V(s.configPath);t.format==="text"&&Pe(n.title,l.shopDomain,t.storeFqdns,p,a.businessName);let u=new Map;return u.set(l.shopId,l.shopDomain),t.storeFqdns&&t.storeFqdns.length>1&&await Promise.all(t.storeFqdns?.slice(1).map(async c=>{let d=await Z(a,c,i);u.set(d.shopId,c)})),{storeIds:Array.from(u.keys()),storeNameById:u}}function Pe(t,s,n,i,l){let a=[];n&&n.length>0?n.forEach(u=>a.push(u)):a.push(s);let p=i?W(i):void 0;Q({headline:i?`Using ${p} for default values:`:"Using these settings:",body:ee({appName:t,org:l,devStores:a,messages:[te]})})}var O=N(_e(),1);var J,I=class extends se{async run(){let{flags:s}=await this.parse(J);await X(s.path);let n=await re({directory:s.path,clientId:s["client-id"],forceRelink:s.reset,userProvidedConfigName:s.config}),i=await oe({appContextResult:n,storeFqdn:s.store?.[0],forceReselectStore:s.reset}),l={...n,primaryStore:i,storeFqdns:s.store,sources:s.source,status:s.status,format:s.json?"json":"text"};return await Ae(l),{app:n.app}}};J=I;I.summary="Stream detailed logs for your Shopify app.";I.descriptionWithMarkdown="\n Opens a real-time stream of detailed app logs from the selected app and store.\n Use the `--source` argument to limit output to a particular log source, such as a specific Shopify Function handle. Use the `shopify app logs sources` command to view a list of sources.\n Use the `--status` argument to filter on status, either `success` or `failure`.\n ```\n shopify app logs --status=success --source=extension.discount-function\n ```\n ";I.description=J.descriptionWithoutMarkdown();I.flags={...Y,...z,...K,store:O.Flags.string({char:"s",description:"Store URL. Must be an existing development or Shopify Plus sandbox store.",env:"SHOPIFY_FLAG_STORE",multiple:!0,parse:async t=>G(t)}),source:O.Flags.string({description:"Filters output to the specified log source.",env:"SHOPIFY_FLAG_SOURCE",multiple:!0}),status:O.Flags.string({description:"Filters output to the specified status (success or failure).",options:["success","failure"],env:"SHOPIFY_FLAG_STATUS"})};var _t=I;export{_t as a};
@@ -1,3 +1,3 @@
1
- import{a as R}from"./chunk-VJEKDBGZ.js";import{e as l}from"./chunk-6EZ7JWBK.js";import{f as I}from"./chunk-WRRUFK4Y.js";import{d as n}from"./chunk-WKBVT5WG.js";import{Ea as b,Fb as a,Hb as s,Pb as f,Ta as G,Wa as C}from"./chunk-DONEJHDG.js";import{a as k,r as w}from"./chunk-KKUDXLK2.js";import{q as g}from"./chunk-773TIA5M.js";import{e as D,g as $}from"./chunk-VKWPEFWQ.js";$();var A=D(R());async function r(t,e){try{return(await l("git",t,{cwd:e})).stdout}catch(o){if(o instanceof Error){let i=new n(o.message);throw i.stack=o.stack,"exitCode"in o&&Object.assign(i,{exitCode:o.exitCode}),i}throw o}}async function K(t,e="main"){f(s`Initializing git repository at ${a.path(t)}...`),await h(),await r(["init"],t),await r(["checkout","-b",e],t)}async function Q(t,e){try{return(await r(["check-ignore",...e],t)).split(`
1
+ import{a as R}from"./chunk-VJEKDBGZ.js";import{e as l}from"./chunk-YYLEWVO6.js";import{f as I}from"./chunk-N5U5Q2MG.js";import{d as n}from"./chunk-AUZCENYI.js";import{Ea as b,Fb as a,Hb as s,Pb as f,Ta as G,Wa as C}from"./chunk-BXDZX3BS.js";import{a as k,r as w}from"./chunk-MGPLKG23.js";import{q as g}from"./chunk-773TIA5M.js";import{e as D,g as $}from"./chunk-VKWPEFWQ.js";$();var A=D(R());async function r(t,e){try{return(await l("git",t,{cwd:e})).stdout}catch(o){if(o instanceof Error){let i=new n(o.message);throw i.stack=o.stack,"exitCode"in o&&Object.assign(i,{exitCode:o.exitCode}),i}throw o}}async function K(t,e="main"){f(s`Initializing git repository at ${a.path(t)}...`),await h(),await r(["init"],t),await r(["checkout","-b",e],t)}async function Q(t,e){try{return(await r(["check-ignore",...e],t)).split(`
2
2
  `).filter(Boolean)}catch(o){if(o instanceof n&&"exitCode"in o&&o.exitCode===1)return[];throw o}}async function V(t){return I("cmd_all_timing_network_ms")(async()=>{let{repoUrl:e,destination:o,shallow:i,latestTag:m}=t;if(f(s`Git-cloning repository ${e} into ${a.path(o)}...`),await h(),await G(o)){if(!await b(o))throw new n(s`Can't clone to ${a.path(o)}`,"The path exists but isn't a directory.");if((await C(["*",".*"],{cwd:o,deep:1,onlyFiles:!1})).length>0)throw new n(s`Directory ${a.path(o)} already exists and is not empty`,s`Choose a different name or remove the existing directory first.`)}let[v,d]=e.split("#");if(d&&m)throw new n("Error cloning the repository. Git can't clone the latest release with a 'branch'.");if(i&&m)throw new n("Error cloning the repository. Git can't clone the latest release with the 'shallow' property.");let u=["clone","--recurse-submodules"];d&&u.push("--branch",d),i&&u.push("--depth","1"),k()||u.push("-c","core.askpass=true"),u.push(v,o);try{if(await l("git",u),m){let c=await S(o,e);await r(["checkout",c],o)}}catch(c){if(c instanceof n)throw c;if(c instanceof Error){let x=new n(c.message);throw x.stack=c.stack,x}throw c}})}async function S(t,e){let o=await F(t);if(!o)throw new n(`Couldn't obtain the most recent tag of the repository ${e}`);return o}async function X(t){let o=await r(["log","-1","--format=%H%x00%ai%x00%s%x00%D%x00%b%x00%an%x00%ae"],t);if(!o.trim())throw new n("Must have at least one commit to run command",s`Run ${a.genericShellCommand("git commit -m 'Initial commit'")} to create your first commit.`);let i=o.split("\0");return{hash:i[0],date:i[1],message:i[2],refs:i[3],body:i[4],author_name:i[5],author_email:i[6]}}async function Y(t){await r(["add","--all"],t)}async function Z(t,e){let o=["commit","-m",t];return e?.author&&o.push("--author",e.author),await r(o,e?.directory),(await r(["rev-parse","HEAD"],e?.directory)).trim()}async function h(){if(!await w())throw new n("Git is necessary in the environment to continue",s`Install ${a.link("git","https://git-scm.com/book/en/v2/Getting-Started-Installing-Git")}`)}var p=class extends n{};async function N(t){if(await h(),!await E(t))throw new p(`${a.path(t??g())} is not a Git directory`)}async function tt(t){return await w()?E(t):!1}async function E(t){try{return await l("git",["rev-parse","--git-dir"],{cwd:t}),!0}catch(e){if(e instanceof Error&&"exitCode"in e&&e.exitCode===128)return!1;throw e}}var y=class extends n{};async function et(t){if(!await T(t))throw new y(`${a.path(t??g())} is not a clean Git directory`)}async function T(t){return(await r(["status","--porcelain"],t)).trim()===""}async function F(t){try{return(await r(["describe","--tags","--abbrev=0"],t)).trim()||void 0}catch(e){if(e instanceof n&&"exitCode"in e&&e.exitCode===128)return;throw e}}async function ot(t,e="origin"){if(f(s`Removing git remote ${e} from ${a.path(t)}...`),await h(),!(await r(["remote"],t)).split(`
3
3
  `).filter(Boolean).includes(e)){f(s`Remote ${e} does not exist, no action needed`);return}await r(["remote","remove",e],t)}export{K as a,Q as b,V as c,X as d,Y as e,Z as f,N as g,tt as h,y as i,et as j,T as k,ot as l};
@@ -1,4 +1,4 @@
1
- import{c as gI,e as nA,f as mI,h as oA,l as y7,n as Bu,s as $5,u as iA,v as lA,w as cA}from"./chunk-Q7BOSHWX.js";import{a as fI}from"./chunk-ZEENHLSC.js";import{a as aA}from"./chunk-ATXODH6C.js";import{c as tA,e as rA}from"./chunk-G24L7MB3.js";import{A as vI,S as pCe,g as mCe,n as R4,z as tf}from"./chunk-5W443CKL.js";import{a as jF}from"./chunk-FU232KQ7.js";import{g as $F}from"./chunk-6EZ7JWBK.js";import{d as eA}from"./chunk-WKBVT5WG.js";import{Pb as b7,eb as b}from"./chunk-DONEJHDG.js";import{a as j5,c as m,e as ps,g as o}from"./chunk-VKWPEFWQ.js";var uA=m(Vi=>{"use strict";o();var bCe=b();function sA(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function e1(){}var Gi={d:{f:e1,r:function(){throw Error(sA(522))},D:e1,C:e1,L:e1,m:e1,X:e1,S:e1,M:e1},p:0,findDOMNode:null},yCe=Symbol.for("react.portal");function ICe(e,t,r){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:yCe,key:a==null?null:""+a,children:e,containerInfo:t,implementation:r}}var rf=bCe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function k4(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Vi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Gi;Vi.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(sA(299));return ICe(e,t,null,r)};Vi.flushSync=function(e){var t=rf.T,r=Gi.p;try{if(rf.T=null,Gi.p=2,e)return e()}finally{rf.T=t,Gi.p=r,Gi.d.f()}};Vi.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Gi.d.C(e,t))};Vi.prefetchDNS=function(e){typeof e=="string"&&Gi.d.D(e)};Vi.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,a=k4(r,t.crossOrigin),n=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?Gi.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:n,fetchPriority:i}):r==="script"&&Gi.d.X(e,{crossOrigin:a,integrity:n,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Vi.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=k4(t.as,t.crossOrigin);Gi.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Gi.d.M(e)};Vi.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,a=k4(r,t.crossOrigin);Gi.d.L(e,r,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Vi.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=k4(t.as,t.crossOrigin);Gi.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Gi.d.m(e)};Vi.requestFormReset=function(e){Gi.d.r(e)};Vi.unstable_batchedUpdates=function(e,t){return e(t)};Vi.useFormState=function(e,t,r){return rf.H.useFormState(e,t,r)};Vi.useFormStatus=function(){return rf.H.useHostTransitionStatus()};Vi.version="19.2.4"});var dA=m(Yi=>{"use strict";o();process.env.NODE_ENV!=="production"&&(function(){function e(){}function t(y){return""+y}function r(y,S,E){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{t(w);var M=!1}catch{M=!0}return M&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object"),t(w)),{$$typeof:f,key:w==null?null:""+w,children:y,containerInfo:S,implementation:E}}function a(y,S){if(y==="font")return"";if(typeof S=="string")return S==="use-credentials"?S:""}function n(y){return y===null?"`null`":y===void 0?"`undefined`":y===""?"an empty string":'something with type "'+typeof y+'"'}function i(y){return y===null?"`null`":y===void 0?"`undefined`":y===""?"an empty string":typeof y=="string"?JSON.stringify(y):typeof y=="number"?"`"+y+"`":'something with type "'+typeof y+'"'}function u(){var y=I.H;return y===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1
+ import{c as gI,e as nA,f as mI,h as oA,l as y7,n as Bu,s as $5,u as iA,v as lA,w as cA}from"./chunk-Q7BOSHWX.js";import{a as fI}from"./chunk-6LTJMYUD.js";import{a as aA}from"./chunk-KJQAJUDU.js";import{c as tA,e as rA}from"./chunk-TGM7L6RV.js";import{A as vI,S as pCe,g as mCe,n as R4,z as tf}from"./chunk-3EQY5B4S.js";import{a as jF}from"./chunk-Q3WOWDUU.js";import{g as $F}from"./chunk-YYLEWVO6.js";import{d as eA}from"./chunk-AUZCENYI.js";import{Pb as b7,eb as b}from"./chunk-BXDZX3BS.js";import{a as j5,c as m,e as ps,g as o}from"./chunk-VKWPEFWQ.js";var uA=m(Vi=>{"use strict";o();var bCe=b();function sA(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function e1(){}var Gi={d:{f:e1,r:function(){throw Error(sA(522))},D:e1,C:e1,L:e1,m:e1,X:e1,S:e1,M:e1},p:0,findDOMNode:null},yCe=Symbol.for("react.portal");function ICe(e,t,r){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:yCe,key:a==null?null:""+a,children:e,containerInfo:t,implementation:r}}var rf=bCe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function k4(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Vi.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Gi;Vi.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(sA(299));return ICe(e,t,null,r)};Vi.flushSync=function(e){var t=rf.T,r=Gi.p;try{if(rf.T=null,Gi.p=2,e)return e()}finally{rf.T=t,Gi.p=r,Gi.d.f()}};Vi.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Gi.d.C(e,t))};Vi.prefetchDNS=function(e){typeof e=="string"&&Gi.d.D(e)};Vi.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,a=k4(r,t.crossOrigin),n=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?Gi.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:n,fetchPriority:i}):r==="script"&&Gi.d.X(e,{crossOrigin:a,integrity:n,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Vi.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=k4(t.as,t.crossOrigin);Gi.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Gi.d.M(e)};Vi.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,a=k4(r,t.crossOrigin);Gi.d.L(e,r,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Vi.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=k4(t.as,t.crossOrigin);Gi.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Gi.d.m(e)};Vi.requestFormReset=function(e){Gi.d.r(e)};Vi.unstable_batchedUpdates=function(e,t){return e(t)};Vi.useFormState=function(e,t,r){return rf.H.useFormState(e,t,r)};Vi.useFormStatus=function(){return rf.H.useHostTransitionStatus()};Vi.version="19.2.4"});var dA=m(Yi=>{"use strict";o();process.env.NODE_ENV!=="production"&&(function(){function e(){}function t(y){return""+y}function r(y,S,E){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{t(w);var M=!1}catch{M=!0}return M&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object"),t(w)),{$$typeof:f,key:w==null?null:""+w,children:y,containerInfo:S,implementation:E}}function a(y,S){if(y==="font")return"";if(typeof S=="string")return S==="use-credentials"?S:""}function n(y){return y===null?"`null`":y===void 0?"`undefined`":y===""?"an empty string":'something with type "'+typeof y+'"'}function i(y){return y===null?"`null`":y===void 0?"`undefined`":y===""?"an empty string":typeof y=="string"?JSON.stringify(y):typeof y=="number"?"`"+y+"`":'something with type "'+typeof y+'"'}function u(){var y=I.H;return y===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
2
2
  1. You might have mismatching versions of React and the renderer (such as React DOM)
3
3
  2. You might be breaking the Rules of Hooks
4
4
  3. You might have more than one copy of React in the same app
@@ -1 +1 @@
1
- import{a as i}from"./chunk-5QQN3SKH.js";import{b as e}from"./chunk-UKK5P74A.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-RUKK4KXX.js";import{b as e}from"./chunk-74IG3ZE3.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{h as l}from"./chunk-PJYNAUQB.js";import{O as c}from"./chunk-5W443CKL.js";import{d as u}from"./chunk-WKBVT5WG.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var s=["live","unpublished","development"];async function A(e,r){let t=await c(e,r);return p(t)}async function p(e){let r=e.storeFqdn,t=(await l(e)).filter(d);if(t.length===0)throw new u(`There are no themes in the ${r} store`);return t.sort(w)}function d(e){return s.includes(e.role)}function w(e,r){return s.indexOf(e.role)-s.indexOf(r.role)}i();function E(e,r,t){return y(e,r,t)??T(e,r,t)}function y(e,r,t){let o=t.role;if(!o)return;let n=`No themes on the store ${e} match the role "${o}"`;return m(r,h=>h.role===o).orThrow(n)}function T(e,r,t){return t.themeIdentifiers.flatMap(n=>{let h=`No themes on the store ${e} match the ID or name "${n}"`;return m(r,f=>`${f.id}`===n||f.name.toLowerCase()===n.toLowerCase()?!0:L(f.name.toLowerCase(),n.toLowerCase())).orThrow(h)})}function m(e,r){let t=e.filter(r);return t.length>0?{orThrow:o=>t}:{orThrow:o=>{throw new u(o)}}}var a=class{constructor(r){this.queryProps=r}get role(){for(let r of s)if(this.queryProps[r])return r}get themeIdentifiers(){return[this.queryProps.theme,this.queryProps.themes].flat().filter(t=>!!t)}any(){return Object.values(this.queryProps).some(r=>r?.length!==void 0?r.length>0:!!r)}};function L(e,r){let t=r.replace(/(^\*)|(\*$)/g,"");return r.startsWith("*")&&r.endsWith("*")?e.includes(t):r.startsWith("*")?e.endsWith(t):r.endsWith("*")?e.startsWith(t):!1}export{s as a,A as b,p as c,E as d,a as e};
1
+ import{h as l}from"./chunk-7ZIO3X22.js";import{O as c}from"./chunk-3EQY5B4S.js";import{d as u}from"./chunk-AUZCENYI.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var s=["live","unpublished","development"];async function A(e,r){let t=await c(e,r);return p(t)}async function p(e){let r=e.storeFqdn,t=(await l(e)).filter(d);if(t.length===0)throw new u(`There are no themes in the ${r} store`);return t.sort(w)}function d(e){return s.includes(e.role)}function w(e,r){return s.indexOf(e.role)-s.indexOf(r.role)}i();function E(e,r,t){return y(e,r,t)??T(e,r,t)}function y(e,r,t){let o=t.role;if(!o)return;let n=`No themes on the store ${e} match the role "${o}"`;return m(r,h=>h.role===o).orThrow(n)}function T(e,r,t){return t.themeIdentifiers.flatMap(n=>{let h=`No themes on the store ${e} match the ID or name "${n}"`;return m(r,f=>`${f.id}`===n||f.name.toLowerCase()===n.toLowerCase()?!0:L(f.name.toLowerCase(),n.toLowerCase())).orThrow(h)})}function m(e,r){let t=e.filter(r);return t.length>0?{orThrow:o=>t}:{orThrow:o=>{throw new u(o)}}}var a=class{constructor(r){this.queryProps=r}get role(){for(let r of s)if(this.queryProps[r])return r}get themeIdentifiers(){return[this.queryProps.theme,this.queryProps.themes].flat().filter(t=>!!t)}any(){return Object.values(this.queryProps).some(r=>r?.length!==void 0?r.length>0:!!r)}};function L(e,r){let t=r.replace(/(^\*)|(\*$)/g,"");return r.startsWith("*")&&r.endsWith("*")?e.includes(t):r.startsWith("*")?e.endsWith(t):r.endsWith("*")?e.startsWith(t):!1}export{s as a,A as b,p as c,E as d,a as e};
@@ -1,4 +1,4 @@
1
- import{c as w}from"./chunk-5GVXMNC4.js";import{c as F,e as x}from"./chunk-YYL356OX.js";import{B as h,m as S,t as L,u as P,v as f,z as N}from"./chunk-GW3VY3FZ.js";import{o as $,q as m}from"./chunk-KN3FTJDU.js";import{a as c}from"./chunk-FU232KQ7.js";import{O as V,S as y,v as R}from"./chunk-6EZ7JWBK.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-DONEJHDG.js";import{c as _}from"./chunk-KKUDXLK2.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-BVHBMOIB.js";import{c as F,e as x}from"./chunk-BNX4MZMV.js";import{B as h,m as S,t as L,u as P,v as f,z as N}from"./chunk-HX3TALXV.js";import{o as $,q as m}from"./chunk-TM534QSE.js";import{a as c}from"./chunk-Q3WOWDUU.js";import{O as V,S as y,v as R}from"./chunk-YYLEWVO6.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-BXDZX3BS.js";import{c as _}from"./chunk-MGPLKG23.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 E}from"./chunk-BCD4KTLJ.js";import{a as _}from"./chunk-VOJWKGCW.js";import{a as I,b as w}from"./chunk-STJ3LWFL.js";import{f as a,g as u,p as S,v as b}from"./chunk-D6YDSGR4.js";import{ua as f,xa as p}from"./chunk-5W443CKL.js";import{b as T,c as g}from"./chunk-H5C3QTOO.js";import{g as s,u as c}from"./chunk-6EZ7JWBK.js";import{d as v}from"./chunk-WKBVT5WG.js";import{Lb as l}from"./chunk-DONEJHDG.js";import{r as x}from"./chunk-T6CC5WUU.js";import{e as L,g as m}from"./chunk-VKWPEFWQ.js";m();m();function A(o,e){return{theme:{id:o.id,name:o.name,role:o.role,shop:e.storeFqdn,preview_url:I(o,e),editor_url:w(o,e)}}}function D(o){let{platform:e,arch:n}=s(),t=a(),r=null;return t&&(r=Number(u())||null),{store:t??"Not configured",development_theme_id:r,cli_version:o.cliVersion,os:`${e}-${n}`,shell:process.env.SHELL??"unknown",node_version:process.version}}async function O(o,e){let n;if(e.development)n=await new E(o).findOrCreate();else{let t={filter:{theme:e.theme}};n=await _(o,t)}return n?A(n,o):void 0}async function y(o){return[M(),await j(o)]}function M(){let o=a()??"Not configured",e=u();return p(`theme-command:info:dev-theme-loaded:${e}`),N("Theme Configuration",[["Store",o],["Development Theme ID",e?`#${e}`:{subdued:"Not set"}]])}async function j(o){let{platform:e,arch:n}=s();return N("Tooling and System",[["Shopify CLI",o.cliVersion],["OS",`${e}-${n}`],["Shell",process.env.SHELL??"unknown"],["Node version",process.version]])}function N(o,e){return{title:o,body:{tabularData:e,firstColumnSubdued:!0}}}async function F(o,e){let n=Object.entries(o.theme).map(([t,r])=>{if(t==="editor_url"||t==="preview_url"){let C=String(r),$=t==="editor_url"?"Open in Theme Editor":"Preview Theme";return[d(t),{link:{url:C,label:$}}]}else return t==="id"?[d(t),`#${r}`]:[d(t),`${r}`]});return{customSections:[...e.environment?[{title:"Theme information",body:[{subdued:`Environment name: ${e.environment}`}]}]:[],{title:"Theme Details",body:{tabularData:n,firstColumnSubdued:!0}}]}}function d(o){return o.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}var h=L(x(),1);var i=class extends b{async command(e,n){if(f("theme-command:info"),e.theme||e.development){let t=await O(n,e);if(!t)throw new v("Theme not found!");if(e.json)return l(JSON.stringify(t,null,2));let r=await F(t,e);c(r)}else{if(e.json)return l(JSON.stringify(D({cliVersion:this.config.version}),null,2));let t=await y({cliVersion:this.config.version});c({customSections:t})}f("theme-command:info")}};i.description="Displays information about your theme environment, including your current store. Can also retrieve information about a specific theme.";i.flags={...T,...g,...S,development:h.Flags.boolean({char:"d",description:"Retrieve info from your development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),theme:h.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"})};i.multiEnvironmentsFlags=["store","password"];var k=i;export{k as a};
1
+ import{a as E}from"./chunk-F447QKVX.js";import{a as _}from"./chunk-7KHYEIA7.js";import{a as I,b as w}from"./chunk-STJ3LWFL.js";import{f as a,g as u,p as S,v as b}from"./chunk-JGN7YG5X.js";import{ua as f,xa as p}from"./chunk-3EQY5B4S.js";import{b as T,c as g}from"./chunk-S5JJL3BP.js";import{g as s,u as c}from"./chunk-YYLEWVO6.js";import{d as v}from"./chunk-AUZCENYI.js";import{Lb as l}from"./chunk-BXDZX3BS.js";import{r as x}from"./chunk-T6CC5WUU.js";import{e as L,g as m}from"./chunk-VKWPEFWQ.js";m();m();function A(o,e){return{theme:{id:o.id,name:o.name,role:o.role,shop:e.storeFqdn,preview_url:I(o,e),editor_url:w(o,e)}}}function D(o){let{platform:e,arch:n}=s(),t=a(),r=null;return t&&(r=Number(u())||null),{store:t??"Not configured",development_theme_id:r,cli_version:o.cliVersion,os:`${e}-${n}`,shell:process.env.SHELL??"unknown",node_version:process.version}}async function O(o,e){let n;if(e.development)n=await new E(o).findOrCreate();else{let t={filter:{theme:e.theme}};n=await _(o,t)}return n?A(n,o):void 0}async function y(o){return[M(),await j(o)]}function M(){let o=a()??"Not configured",e=u();return p(`theme-command:info:dev-theme-loaded:${e}`),N("Theme Configuration",[["Store",o],["Development Theme ID",e?`#${e}`:{subdued:"Not set"}]])}async function j(o){let{platform:e,arch:n}=s();return N("Tooling and System",[["Shopify CLI",o.cliVersion],["OS",`${e}-${n}`],["Shell",process.env.SHELL??"unknown"],["Node version",process.version]])}function N(o,e){return{title:o,body:{tabularData:e,firstColumnSubdued:!0}}}async function F(o,e){let n=Object.entries(o.theme).map(([t,r])=>{if(t==="editor_url"||t==="preview_url"){let C=String(r),$=t==="editor_url"?"Open in Theme Editor":"Preview Theme";return[d(t),{link:{url:C,label:$}}]}else return t==="id"?[d(t),`#${r}`]:[d(t),`${r}`]});return{customSections:[...e.environment?[{title:"Theme information",body:[{subdued:`Environment name: ${e.environment}`}]}]:[],{title:"Theme Details",body:{tabularData:n,firstColumnSubdued:!0}}]}}function d(o){return o.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}var h=L(x(),1);var i=class extends b{async command(e,n){if(f("theme-command:info"),e.theme||e.development){let t=await O(n,e);if(!t)throw new v("Theme not found!");if(e.json)return l(JSON.stringify(t,null,2));let r=await F(t,e);c(r)}else{if(e.json)return l(JSON.stringify(D({cliVersion:this.config.version}),null,2));let t=await y({cliVersion:this.config.version});c({customSections:t})}f("theme-command:info")}};i.description="Displays information about your theme environment, including your current store. Can also retrieve information about a specific theme.";i.flags={...T,...g,...S,development:h.Flags.boolean({char:"d",description:"Retrieve info from your development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),theme:h.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"})};i.multiEnvironmentsFlags=["store","password"];var k=i;export{k as a};
@@ -1,3 +1,3 @@
1
- import{a as ce}from"./chunk-GFCLUGAG.js";import{G as L,O as $,va as te,xa as N,ya as re,z as y}from"./chunk-5W443CKL.js";import{b as x}from"./chunk-47MGPVED.js";import{a as me,b as ue}from"./chunk-UKK5P74A.js";import{a as ee}from"./chunk-5C7HDTHJ.js";import{A as ie,a as Z,t as se,w as U,x as I}from"./chunk-6EZ7JWBK.js";import{d as oe,e as ne}from"./chunk-WRRUFK4Y.js";import{d as F,g as ae}from"./chunk-WKBVT5WG.js";import{Fa as X,Fb as R,Hb as h,Pb as A,Ua as _}from"./chunk-DONEJHDG.js";import{d as Q,f as k,i as V,q as P}from"./chunk-773TIA5M.js";import{r as xe}from"./chunk-T6CC5WUU.js";import{e as ve,g as f}from"./chunk-VKWPEFWQ.js";f();var T=ve(xe(),1);var q={path:T.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>{let e=k(t);return _(e)?X(e)?e:(I({headline:"The path must be a directory, not a file.",body:[`The provided path is not a directory: ${e}`,`Did you mean: ${V(e)}`]}),process.exit(1)):(I({headline:"A path was explicitly provided but doesn't exist.",body:[`Please check the path and try again: ${e}`]}),process.exit(1))},default:async()=>P(),noCacheDefault:!0}),password:T.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:T.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async t=>y(t)}),environment:T.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},de="Wrap the value in double quotes if you're using wildcards.",Ne=t=>({only:T.Flags.string({char:"o",multiple:!0,description:`${t.charAt(0).toUpperCase()+t.slice(1)} only the specified files (Multiple flags allowed). ${de}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:T.Flags.string({char:"x",multiple:!0,description:`Skip ${t}ing the specified files (Multiple flags allowed). ${de}`,env:"SHOPIFY_FLAG_IGNORE"})});f();f();import{AsyncLocalStorage as Te}from"node:async_hooks";var pe=new Te,O,j,D,M;function l(){return O??(O=new x({projectName:"shopify-cli-theme-conf"})),O}function B(){return j??(j=new x({projectName:"shopify-cli-development-theme-config"})),j}function G(){return D??(D=new x({projectName:"shopify-cli-repl-theme-config"})),D}function H(){return M??(M=new x({projectName:"shopify-cli-theme-store-password"})),M}function z(t=l()){return pe.getStore()?.store??t.get("themeStore")}function fe(t,e=l()){e.set("themeStore",t)}function Me(t=l()){return A(h`Getting development theme...`),B().get(v(t))}function Be(t,e=l()){A(h`Setting development theme...`),B().set(v(e),t)}function Ge(t=l()){A(h`Removing development theme...`),B().delete(v(t))}function He(t=l()){return A(h`Getting REPL theme...`),G().get(v(t))}function ze(t,e=l()){A(h`Setting REPL theme to ${t}...`),G().set(v(e),t)}function Ye(t=l()){A(h`Removing REPL theme...`),G().delete(v(t))}function Je(t=l()){let e=v(t);return A(h`Getting storefront password for shop ${e}...`),H().get(e)}function We(t,e=l()){let o=v(e);A(h`Setting storefront password for shop ${o}...`),H().set(o,t)}function Ke(t=l()){let e=v(t);A(h`Removing storefront password for ${e}...`),H().delete(e)}function v(t=l()){let e=z(t);if(!e)throw new ae("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function he(t,e){return pe.run({store:t},e)}function le(t){let e=t.store??z();if(!e)throw te(new F("A store is required",`Specify the store passing ${h`${R.genericShellCommand(`--${q.store.name}=example.myshopify.com`)}`.value} or set the ${h`${R.genericShellCommand(q.store.env)}`.value} environment variable.`));return fe(e),e}f();f();var Se="shopify.theme.toml",st=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),it=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json","**/{blocks,layout,snippets}/**/*.liquid.tmp.*","**/{config,locales}/**/*.json.tmp.*","**/{sections,templates}/**/*.{liquid,json}.tmp.*"],at=50;f();f();var Y="7e9cb568cfd431c538f36d1ad3f2b4f6";var Ie="shopify-cli-store",St=240*1e3,J;function C(){return J??(J=new x({projectName:Ie})),J}function E(t){return`${Y}::${_e(t)}`}function _e(t){return t.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function d(t){return typeof t=="string"}function Fe(t){if(!t||typeof t!="object")return;let e=t;if(typeof e.id=="number")return{id:e.id,...d(e.email)?{email:e.email}:{},...d(e.firstName)?{firstName:e.firstName}:{},...d(e.lastName)?{lastName:e.lastName}:{},...typeof e.accountOwner=="boolean"?{accountOwner:e.accountOwner}:{}}}function Ee(t){if(!t||typeof t!="object")return;let e=t;if(!(!d(e.shopId)||!d(e.name)||!d(e.createdAt)))return{shopId:e.shopId,name:e.name,createdAt:e.createdAt,...d(e.placeholderAccountUuid)?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...d(e.country)?{country:e.country}:{},...d(e.accessUrl)?{accessUrl:e.accessUrl}:{}}}function be(t){if(!t||typeof t!="object")return;let e=t;if(!d(e.store)||!d(e.clientId)||!d(e.userId)||!d(e.accessToken)||!Array.isArray(e.scopes)||!e.scopes.every(d)||!d(e.acquiredAt))return;let o=Fe(e.associatedUser),r=e.kind==="preview"?"preview":"standard",n=r==="preview"?Ee(e.preview):void 0;if(!(r==="preview"&&!n))return{store:e.store,clientId:e.clientId,userId:e.userId,accessToken:e.accessToken,scopes:e.scopes,acquiredAt:e.acquiredAt,...d(e.refreshToken)?{refreshToken:e.refreshToken}:{},...d(e.expiresAt)?{expiresAt:e.expiresAt}:{},...d(e.refreshTokenExpiresAt)?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...o?{associatedUser:o}:{},...r==="preview"?{kind:r}:{},...n?{preview:n}:{}}}function ge(t,e,o){if(!e||typeof e!="object")return;let{sessionsByUserId:r,currentUserId:n}=e;if(!(r!==void 0||n!==void 0))return;let i=E(t);if(!r||typeof r!="object"||Array.isArray(r)||typeof n!="string"){o.delete(i);return}let a=Object.fromEntries(Object.entries(r).flatMap(([m,c])=>{let p=be(c);return p?[[m,p]]:[]}));if(Object.keys(a).length!==Object.keys(r).length)if(a[n])o.set(i,{currentUserId:n,sessionsByUserId:a});else{o.delete(i);return}return{currentUserId:n,sessionsByUserId:a}}function W(t,e){return ge(t,e.get(E(t)),e)}function ke(t){return t.config?.store??{}}function ye(t=C()){let e=[],o=`${Y}::`;for(let[r,n]of Object.entries(ke(t))){if(!r.startsWith(o))continue;let s=ge(r.slice(o.length),n,t),i=s?.sessionsByUserId[s.currentUserId];i&&e.push(i)}return e}function we(t,e=C()){let o=y(t),r=W(o,e);if(!r)return;let n=r.sessionsByUserId[r.currentUserId];if(!n){e.delete(E(o));return}return n}function gt(t,e=C()){let o=E(t.store),r=W(t.store,e),n={currentUserId:t.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[t.userId]:t}};e.set(o,n)}function yt(t,e,o){let r=y(t),n=typeof e=="string"?e:void 0,s=(typeof e=="string"?o:e)??C(),i=E(r);if(!n){s.delete(i);return}let a=W(r,s);if(!a)return;let{[n]:m,...c}=a.sessionsByUserId,p=Object.keys(c);if(p.length===0){s.delete(i);return}s.set(i,{currentUserId:a.currentUserId===n?p[0]:a.currentUserId,sessionsByUserId:c})}var K=class extends ue{environmentsFilename(){return Se}async command(e,o,r=!1,n,s){}async run(e){let o=this.constructor,r=o.multiEnvironmentsFlags,{args:n,flags:s}=await this.parse(o),i="password"in o.flags,a=(Array.isArray(s.environment)?s.environment:[s.environment]).filter(Boolean),m=r!==null&&r.some(u=>Array.isArray(u)?u.includes("store"):u==="store");if(a.length<=1){if(a[0]&&!s.store&&m)throw new F("Please provide a valid environment.");let u=i?await this.createSession(s):void 0,w=this.constructor.name.toLowerCase();if(N(`theme-command:${w}:single-env:authenticated`),s.path&&!_(s.path))throw new F(`Path does not exist: ${s.path}`);try{await this.command(s,u,!1,n)}finally{await this.logAnalyticsData(u)}return}if(r===null){U({body:"This command does not support multiple environments."});return}let{flags:c}=await this.parse(me(o),this.argv);if("path"in c){this.errorOnGlobalPath();return}let p=await this.loadEnvironments(a,s,c),S=await this.validateEnvironments(p,r,i);"force"in o.flags&&!s.force&&!await this.showConfirmation(this.constructor.name,r,S)||await this.runConcurrent(S.valid)}storeAuthScopes(){return[]}async loadEnvironments(e,o,r){let n=new Map;for(let s of e){let i=await ce(s,"shopify.theme.toml",{from:o.path,silent:!0});i?.store&&typeof i.store=="string"&&(i.store=y(i.store)),i?.path&&typeof i.path=="string"&&(i.path=k(i.path)),n.set(s,{flags:{...o,...i,...r,environment:[s]},validationFlags:{...i,...r}})}return n}async validateEnvironments(e,o,r){let n=[],s=[],i=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:m})=>m)):new Map,a=Array.from(e.entries()).map(([m,{flags:c,validationFlags:p}])=>({environmentName:m,flags:c,validationFlags:p,storeAuthSession:this.storeAuthSessionFromCache(p,i)}));for(let{environmentName:m,flags:c,validationFlags:p,storeAuthSession:S}of a){let g=this.validConfig(p,o,m,S);if(g!==!0){let u=g.join(", ");s.push({environment:m,reason:`Missing flags: ${u}`});continue}n.push({environment:m,flags:c,requiresAuth:r,storeAuthSession:S})}return{valid:n,invalid:s}}async showConfirmation(e,o,r){let i={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},a=[...r.valid.map(({environment:m,flags:c})=>{let p=o.map(S=>{let g=Array.isArray(S)?S.find(u=>c[u]):S;if(g==="password")return"password";if(g==="path"&&typeof c.path=="string"){let u=c.path.split(/[/\\]/);if(u.length===1)return`path: ${c.path}`;let w=u[0]===""?`/${u[1]}`:u[0],b=u.at(-1);return`path: ${w}/.../${b}`}return g&&`${g}: ${c[g]}`}).join(", ");return[m,{subdued:p||"No flags required"}]}),...r.invalid.map(({environment:m,reason:c})=>[m,{error:`Skipping | ${c}`}])];return i.infoTable={Environment:a},r.invalid.length>0&&(i.confirmationMessage="Proceed anyway (will skip invalid environments)"),ie(i)}async runConcurrent(e){let o=new Z,r=e.map(i=>i.flags.store),n=new Set(r),s=r.length===n.size?[e]:this.createSequentialGroups(e);for(let i of s)await se({processes:i.map(({environment:a,flags:m,requiresAuth:c,storeAuthSession:p})=>({prefix:a,action:async(S,g,u)=>{try{let w=m.store;await he(w,async()=>{let b=c?await this.createSession(m,p):void 0,Ae=this.constructor.name.toLowerCase();N(`theme-command:${Ae}:multi-env:authenticated`);try{await this.command(m,b,!0,{},{stdout:S,stderr:g})}finally{await this.logAnalyticsData(b)}})}catch(w){w instanceof Error&&(w.message=`Environment ${a} failed:
1
+ import{a as ce}from"./chunk-PVD544NN.js";import{G as L,O as $,va as te,xa as N,ya as re,z as y}from"./chunk-3EQY5B4S.js";import{b as x}from"./chunk-BU7R7NFL.js";import{a as me,b as ue}from"./chunk-74IG3ZE3.js";import{a as ee}from"./chunk-5C7HDTHJ.js";import{A as ie,a as Z,t as se,w as U,x as I}from"./chunk-YYLEWVO6.js";import{d as oe,e as ne}from"./chunk-N5U5Q2MG.js";import{d as F,g as ae}from"./chunk-AUZCENYI.js";import{Fa as X,Fb as R,Hb as h,Pb as A,Ua as _}from"./chunk-BXDZX3BS.js";import{d as Q,f as k,i as V,q as P}from"./chunk-773TIA5M.js";import{r as xe}from"./chunk-T6CC5WUU.js";import{e as ve,g as f}from"./chunk-VKWPEFWQ.js";f();var T=ve(xe(),1);var q={path:T.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>{let e=k(t);return _(e)?X(e)?e:(I({headline:"The path must be a directory, not a file.",body:[`The provided path is not a directory: ${e}`,`Did you mean: ${V(e)}`]}),process.exit(1)):(I({headline:"A path was explicitly provided but doesn't exist.",body:[`Please check the path and try again: ${e}`]}),process.exit(1))},default:async()=>P(),noCacheDefault:!0}),password:T.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:T.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async t=>y(t)}),environment:T.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},de="Wrap the value in double quotes if you're using wildcards.",Ne=t=>({only:T.Flags.string({char:"o",multiple:!0,description:`${t.charAt(0).toUpperCase()+t.slice(1)} only the specified files (Multiple flags allowed). ${de}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:T.Flags.string({char:"x",multiple:!0,description:`Skip ${t}ing the specified files (Multiple flags allowed). ${de}`,env:"SHOPIFY_FLAG_IGNORE"})});f();f();import{AsyncLocalStorage as Te}from"node:async_hooks";var pe=new Te,O,j,D,M;function l(){return O??(O=new x({projectName:"shopify-cli-theme-conf"})),O}function B(){return j??(j=new x({projectName:"shopify-cli-development-theme-config"})),j}function G(){return D??(D=new x({projectName:"shopify-cli-repl-theme-config"})),D}function H(){return M??(M=new x({projectName:"shopify-cli-theme-store-password"})),M}function z(t=l()){return pe.getStore()?.store??t.get("themeStore")}function fe(t,e=l()){e.set("themeStore",t)}function Me(t=l()){return A(h`Getting development theme...`),B().get(v(t))}function Be(t,e=l()){A(h`Setting development theme...`),B().set(v(e),t)}function Ge(t=l()){A(h`Removing development theme...`),B().delete(v(t))}function He(t=l()){return A(h`Getting REPL theme...`),G().get(v(t))}function ze(t,e=l()){A(h`Setting REPL theme to ${t}...`),G().set(v(e),t)}function Ye(t=l()){A(h`Removing REPL theme...`),G().delete(v(t))}function Je(t=l()){let e=v(t);return A(h`Getting storefront password for shop ${e}...`),H().get(e)}function We(t,e=l()){let o=v(e);A(h`Setting storefront password for shop ${o}...`),H().set(o,t)}function Ke(t=l()){let e=v(t);A(h`Removing storefront password for ${e}...`),H().delete(e)}function v(t=l()){let e=z(t);if(!e)throw new ae("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function he(t,e){return pe.run({store:t},e)}function le(t){let e=t.store??z();if(!e)throw te(new F("A store is required",`Specify the store passing ${h`${R.genericShellCommand(`--${q.store.name}=example.myshopify.com`)}`.value} or set the ${h`${R.genericShellCommand(q.store.env)}`.value} environment variable.`));return fe(e),e}f();f();var Se="shopify.theme.toml",st=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),it=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json","**/{blocks,layout,snippets}/**/*.liquid.tmp.*","**/{config,locales}/**/*.json.tmp.*","**/{sections,templates}/**/*.{liquid,json}.tmp.*"],at=50;f();f();var Y="7e9cb568cfd431c538f36d1ad3f2b4f6";var Ie="shopify-cli-store",St=240*1e3,J;function C(){return J??(J=new x({projectName:Ie})),J}function E(t){return`${Y}::${_e(t)}`}function _e(t){return t.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function d(t){return typeof t=="string"}function Fe(t){if(!t||typeof t!="object")return;let e=t;if(typeof e.id=="number")return{id:e.id,...d(e.email)?{email:e.email}:{},...d(e.firstName)?{firstName:e.firstName}:{},...d(e.lastName)?{lastName:e.lastName}:{},...typeof e.accountOwner=="boolean"?{accountOwner:e.accountOwner}:{}}}function Ee(t){if(!t||typeof t!="object")return;let e=t;if(!(!d(e.shopId)||!d(e.name)||!d(e.createdAt)))return{shopId:e.shopId,name:e.name,createdAt:e.createdAt,...d(e.placeholderAccountUuid)?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...d(e.country)?{country:e.country}:{},...d(e.accessUrl)?{accessUrl:e.accessUrl}:{}}}function be(t){if(!t||typeof t!="object")return;let e=t;if(!d(e.store)||!d(e.clientId)||!d(e.userId)||!d(e.accessToken)||!Array.isArray(e.scopes)||!e.scopes.every(d)||!d(e.acquiredAt))return;let o=Fe(e.associatedUser),r=e.kind==="preview"?"preview":"standard",n=r==="preview"?Ee(e.preview):void 0;if(!(r==="preview"&&!n))return{store:e.store,clientId:e.clientId,userId:e.userId,accessToken:e.accessToken,scopes:e.scopes,acquiredAt:e.acquiredAt,...d(e.refreshToken)?{refreshToken:e.refreshToken}:{},...d(e.expiresAt)?{expiresAt:e.expiresAt}:{},...d(e.refreshTokenExpiresAt)?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...o?{associatedUser:o}:{},...r==="preview"?{kind:r}:{},...n?{preview:n}:{}}}function ge(t,e,o){if(!e||typeof e!="object")return;let{sessionsByUserId:r,currentUserId:n}=e;if(!(r!==void 0||n!==void 0))return;let i=E(t);if(!r||typeof r!="object"||Array.isArray(r)||typeof n!="string"){o.delete(i);return}let a=Object.fromEntries(Object.entries(r).flatMap(([m,c])=>{let p=be(c);return p?[[m,p]]:[]}));if(Object.keys(a).length!==Object.keys(r).length)if(a[n])o.set(i,{currentUserId:n,sessionsByUserId:a});else{o.delete(i);return}return{currentUserId:n,sessionsByUserId:a}}function W(t,e){return ge(t,e.get(E(t)),e)}function ke(t){return t.config?.store??{}}function ye(t=C()){let e=[],o=`${Y}::`;for(let[r,n]of Object.entries(ke(t))){if(!r.startsWith(o))continue;let s=ge(r.slice(o.length),n,t),i=s?.sessionsByUserId[s.currentUserId];i&&e.push(i)}return e}function we(t,e=C()){let o=y(t),r=W(o,e);if(!r)return;let n=r.sessionsByUserId[r.currentUserId];if(!n){e.delete(E(o));return}return n}function gt(t,e=C()){let o=E(t.store),r=W(t.store,e),n={currentUserId:t.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[t.userId]:t}};e.set(o,n)}function yt(t,e,o){let r=y(t),n=typeof e=="string"?e:void 0,s=(typeof e=="string"?o:e)??C(),i=E(r);if(!n){s.delete(i);return}let a=W(r,s);if(!a)return;let{[n]:m,...c}=a.sessionsByUserId,p=Object.keys(c);if(p.length===0){s.delete(i);return}s.set(i,{currentUserId:a.currentUserId===n?p[0]:a.currentUserId,sessionsByUserId:c})}var K=class extends ue{environmentsFilename(){return Se}async command(e,o,r=!1,n,s){}async run(e){let o=this.constructor,r=o.multiEnvironmentsFlags,{args:n,flags:s}=await this.parse(o),i="password"in o.flags,a=(Array.isArray(s.environment)?s.environment:[s.environment]).filter(Boolean),m=r!==null&&r.some(u=>Array.isArray(u)?u.includes("store"):u==="store");if(a.length<=1){if(a[0]&&!s.store&&m)throw new F("Please provide a valid environment.");let u=i?await this.createSession(s):void 0,w=this.constructor.name.toLowerCase();if(N(`theme-command:${w}:single-env:authenticated`),s.path&&!_(s.path))throw new F(`Path does not exist: ${s.path}`);try{await this.command(s,u,!1,n)}finally{await this.logAnalyticsData(u)}return}if(r===null){U({body:"This command does not support multiple environments."});return}let{flags:c}=await this.parse(me(o),this.argv);if("path"in c){this.errorOnGlobalPath();return}let p=await this.loadEnvironments(a,s,c),S=await this.validateEnvironments(p,r,i);"force"in o.flags&&!s.force&&!await this.showConfirmation(this.constructor.name,r,S)||await this.runConcurrent(S.valid)}storeAuthScopes(){return[]}async loadEnvironments(e,o,r){let n=new Map;for(let s of e){let i=await ce(s,"shopify.theme.toml",{from:o.path,silent:!0});i?.store&&typeof i.store=="string"&&(i.store=y(i.store)),i?.path&&typeof i.path=="string"&&(i.path=k(i.path)),n.set(s,{flags:{...o,...i,...r,environment:[s]},validationFlags:{...i,...r}})}return n}async validateEnvironments(e,o,r){let n=[],s=[],i=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:m})=>m)):new Map,a=Array.from(e.entries()).map(([m,{flags:c,validationFlags:p}])=>({environmentName:m,flags:c,validationFlags:p,storeAuthSession:this.storeAuthSessionFromCache(p,i)}));for(let{environmentName:m,flags:c,validationFlags:p,storeAuthSession:S}of a){let g=this.validConfig(p,o,m,S);if(g!==!0){let u=g.join(", ");s.push({environment:m,reason:`Missing flags: ${u}`});continue}n.push({environment:m,flags:c,requiresAuth:r,storeAuthSession:S})}return{valid:n,invalid:s}}async showConfirmation(e,o,r){let i={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},a=[...r.valid.map(({environment:m,flags:c})=>{let p=o.map(S=>{let g=Array.isArray(S)?S.find(u=>c[u]):S;if(g==="password")return"password";if(g==="path"&&typeof c.path=="string"){let u=c.path.split(/[/\\]/);if(u.length===1)return`path: ${c.path}`;let w=u[0]===""?`/${u[1]}`:u[0],b=u.at(-1);return`path: ${w}/.../${b}`}return g&&`${g}: ${c[g]}`}).join(", ");return[m,{subdued:p||"No flags required"}]}),...r.invalid.map(({environment:m,reason:c})=>[m,{error:`Skipping | ${c}`}])];return i.infoTable={Environment:a},r.invalid.length>0&&(i.confirmationMessage="Proceed anyway (will skip invalid environments)"),ie(i)}async runConcurrent(e){let o=new Z,r=e.map(i=>i.flags.store),n=new Set(r),s=r.length===n.size?[e]:this.createSequentialGroups(e);for(let i of s)await se({processes:i.map(({environment:a,flags:m,requiresAuth:c,storeAuthSession:p})=>({prefix:a,action:async(S,g,u)=>{try{let w=m.store;await he(w,async()=>{let b=c?await this.createSession(m,p):void 0,Ae=this.constructor.name.toLowerCase();N(`theme-command:${Ae}:multi-env:authenticated`);try{await this.command(m,b,!0,{},{stdout:S,stderr:g})}finally{await this.logAnalyticsData(b)}})}catch(w){w instanceof Error&&(w.message=`Environment ${a} failed:
2
2
 
3
3
  ${w.message}`,I({body:[w.message]}))}}})),abortSignal:o.signal,showTimestamps:!0,renderOptions:{stdout:process.stderr}})}createSequentialGroups(e){let o=[];return e.forEach(r=>{let n=o.find(s=>!s.some(i=>i.flags.store===r.flags.store));n?n.push(r):o.push([r])}),o}async createSession(e,o){let r=le({store:e.store}),n=e.password;return n?await $(r,n):o??await this.storeAuthSessionForTheme({store:r})??await $(r,n)}async storeAuthSessionForTheme(e){let o=typeof e.store=="string"?e.store:void 0,r=e.password;if(!o||r)return;let n=y(o),s=we(n);if(s)return this.adminSessionFromStoreAuthSession(s,n)}storeAuthSessionsForTheme(e){let o=new Set(e.filter(({store:r,password:n})=>typeof r=="string"&&!n).map(({store:r})=>y(r)));return o.size===0?new Map:new Map(ye().map(r=>{let n=y(r.store);if(!o.has(n))return;let s=this.adminSessionFromStoreAuthSession(r,n);return s?[n,s]:void 0}).filter(r=>r!==void 0))}storeAuthSessionFromCache(e,o){let r=typeof e.store=="string"?e.store:void 0,n=e.password;if(!(!r||n))return o.get(y(r))}adminSessionFromStoreAuthSession(e,o){if(this.hasRequiredStoreAuthScopes(e.scopes))return L(e.userId),{token:e.accessToken,storeFqdn:o}}expandImpliedStoreAuthScopes(e){let o=new Set(e);for(let r of e){let n=r.match(/^(unauthenticated_)?write_(.*)$/);n&&o.add(`${n[1]??""}read_${n[2]}`)}return o}hasRequiredStoreAuthScopes(e){if(e.length===0)return!0;let o=this.expandImpliedStoreAuthScopes(e);return this.storeAuthScopes().every(r=>o.has(r))}validConfig(e,o,r,n){let s=o.filter(i=>Array.isArray(i)?!i.some(a=>this.hasRequiredFlag(e,a,n)):!this.hasRequiredFlag(e,i,n)).map(i=>Array.isArray(i)?i.join(" or "):i);return s.length>0?(U({body:[`Missing required flags in environment configuration${r?` for ${r}`:""}:`,{list:{items:s}}]}),s):!0}hasRequiredFlag(e,o,r){return o==="password"&&r?!0:!!e[o]}errorOnGlobalPath(){let e=Q(P(),"shopify.theme.toml"),o=_(e);I({body:["Can't use `--path` flag with multiple environments.",...o?["Configure each environment's theme path in your shopify.theme.toml file instead."]:["Run this command from the directory containing shopify.theme.toml.","No shopify.theme.toml found in current directory."]]})}async logAnalyticsData(e){if(!e)return;let o=re();await oe(()=>({store_fqdn_hash:ee(e.storeFqdn),store_domain:e.storeFqdn,cmd_theme_timings:JSON.stringify(o.timings),cmd_theme_errors:JSON.stringify(o.errors),cmd_theme_retries:JSON.stringify(o.retries),cmd_theme_events:JSON.stringify(o.events)})),await ne(()=>({store_fqdn:e.storeFqdn}))}};export{Y as a,ye as b,we as c,gt as d,yt as e,z as f,Me as g,Be as h,Ge as i,He as j,ze as k,Ye as l,Je as m,We as n,Ke as o,q as p,Ne as q,le as r,st as s,it as t,at as u,K as v};
@@ -1,4 +1,4 @@
1
- import{b as i}from"./chunk-H5C3QTOO.js";import{b as o}from"./chunk-UKK5P74A.js";import{J as t}from"./chunk-6EZ7JWBK.js";import{r as p}from"./chunk-T6CC5WUU.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-S5JJL3BP.js";import{b as o}from"./chunk-74IG3ZE3.js";import{J as t}from"./chunk-YYLEWVO6.js";import{r as p}from"./chunk-T6CC5WUU.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,4 +1,4 @@
1
- import{c as oe,e as ie,f as R,g as se}from"./chunk-V6ZSIUO3.js";import{a as X,c as ee,d as ne,e as te}from"./chunk-73W5BGAZ.js";import{a as Q}from"./chunk-HM5H7WBE.js";import{a as K}from"./chunk-ZAMDXIVC.js";import{$ as P,Fa as Z,H as T,K as q,T as I,da as J,g as W}from"./chunk-ATXODH6C.js";import{a as H}from"./chunk-J5TNYNR5.js";import{b as G}from"./chunk-H5C3QTOO.js";import{A as M,D as j,I as S,t as U,u as Y,v as A}from"./chunk-6EZ7JWBK.js";import{d as V}from"./chunk-WRRUFK4Y.js";import{d as h,f as z}from"./chunk-WKBVT5WG.js";import{Ca as B,Gb as C,L as $,Mb as k,Rb as D,wa as _}from"./chunk-DONEJHDG.js";import{d as E,i as N}from"./chunk-773TIA5M.js";import{r as fe}from"./chunk-T6CC5WUU.js";import{e as me,g}from"./chunk-VKWPEFWQ.js";g();g();g();async function ae(e){let n,t;e.bundlePath&&(n=await te(e.developerPlatformClient,{id:e.apiKey,apiKey:e.apiKey,organizationId:e.organizationId}),await ne(n,e.bundlePath));let o={appManifest:e.appManifest,appId:e.appId,apiKey:e.apiKey,name:e.name,organizationId:e.organizationId,skipPublish:!e.release,message:e.message,versionTag:e.version,commitReference:e.commitReference};n&&(o.bundleUrl=n),e.appModules.length>0&&(o.appModules=e.appModules);let i=await e.developerPlatformClient.deploy(o);if(!i.appDeploy.appVersion){let a=ge(i.appDeploy.userErrors??[],e.extensionIds,e.appModules,{version:e.version});throw new h({bold:"Version couldn't be created."},null,[],a)}return i.appDeploy.userErrors?.length>0&&(t=i.appDeploy.userErrors.map(a=>a.message).join(", ")),{validationErrors:i.appDeploy.appVersion.appModuleVersions.filter(a=>a.validationErrors.length>0).map(a=>({uuid:a.registrationUuid,errors:a.validationErrors})),versionTag:i.appDeploy.appVersion.versionTag,location:i.appDeploy.appVersion.location,message:i.appDeploy.appVersion.message,deployError:t}}var x=`
1
+ import{c as oe,e as ie,f as R,g as se}from"./chunk-P375IGKT.js";import{a as X,c as ee,d as ne,e as te}from"./chunk-UTPJAU5S.js";import{a as Q}from"./chunk-PLHJQQVZ.js";import{a as K}from"./chunk-6V37CHBZ.js";import{$ as P,Fa as Z,H as T,K as q,T as I,da as J,g as W}from"./chunk-KJQAJUDU.js";import{a as H}from"./chunk-2MDFREEW.js";import{b as G}from"./chunk-S5JJL3BP.js";import{A as M,D as j,I as S,t as U,u as Y,v as A}from"./chunk-YYLEWVO6.js";import{d as V}from"./chunk-N5U5Q2MG.js";import{d as h,f as z}from"./chunk-AUZCENYI.js";import{Ca as B,Gb as C,L as $,Mb as k,Rb as D,wa as _}from"./chunk-BXDZX3BS.js";import{d as E,i as N}from"./chunk-773TIA5M.js";import{r as fe}from"./chunk-T6CC5WUU.js";import{e as me,g}from"./chunk-VKWPEFWQ.js";g();g();g();async function ae(e){let n,t;e.bundlePath&&(n=await te(e.developerPlatformClient,{id:e.apiKey,apiKey:e.apiKey,organizationId:e.organizationId}),await ne(n,e.bundlePath));let o={appManifest:e.appManifest,appId:e.appId,apiKey:e.apiKey,name:e.name,organizationId:e.organizationId,skipPublish:!e.release,message:e.message,versionTag:e.version,commitReference:e.commitReference};n&&(o.bundleUrl=n),e.appModules.length>0&&(o.appModules=e.appModules);let i=await e.developerPlatformClient.deploy(o);if(!i.appDeploy.appVersion){let a=ge(i.appDeploy.userErrors??[],e.extensionIds,e.appModules,{version:e.version});throw new h({bold:"Version couldn't be created."},null,[],a)}return i.appDeploy.userErrors?.length>0&&(t=i.appDeploy.userErrors.map(a=>a.message).join(", ")),{validationErrors:i.appDeploy.appVersion.appModuleVersions.filter(a=>a.validationErrors.length>0).map(a=>({uuid:a.registrationUuid,errors:a.validationErrors})),versionTag:i.appDeploy.appVersion.versionTag,location:i.appDeploy.appVersion.location,message:i.appDeploy.appVersion.message,deployError:t}}var x=`
2
2
  Validation errors`,F=`
3
3
  `;function ge(e,n,t,o={}){let i=p=>p.details?.some(b=>b.extension_id)??!1,s=(p,b)=>{let v=p.details?.find(O=>typeof O.extension_id<"u")?.extension_id??"";return Object.values(b).includes(v.toString())},a=p=>{let b=p.on?p.on[0]:void 0;return t.some(v=>v.uid===b?.user_identifier)},[r,d]=I(e,p=>a(p)),[m,c]=I(d,p=>i(p)),[f,l]=I(m,p=>s(p,n));return[...he(c,{version:o.version}),...ye(f,n),...be(l),...we(r,t)]}function he(e,n={}){return e.length>0?e.filter(t=>t.field&&t.field.includes("version_tag")&&t.message==="has already been taken").length>0&&n.version?[{body:["An app version with the name",{userInput:n.version},"already exists. Deploy again with a different version name."]}]:e.length===1?[{body:e[0]?.message??""}]:[{body:{list:{items:e.map(t=>t.message)}}}]:[]}function ye(e,n){return e.reduce((t,o)=>{let i=(o.field??["unknown"]).join(".").replace("extension_points","extensions.targeting"),s=i==="base"?o.message:`${i}: ${o.message}`,a=o.details.find(l=>typeof l.extension_title<"u")?.extension_title,r=o.details.find(l=>typeof l.specification_identifier<"u")?.specification_identifier,d=o.details.find(l=>typeof l.extension_id<"u")?.extension_id?.toString(),c=Object.keys(n).find(l=>n[l]===d)??a;r==="webhook_subscription"&&(c="Webhook Subscription");let f=t.find(l=>l.title===c);if(f){let l=f.body,u=o.category==="invalid"?l.find(p=>p.list.title===x):l.find(p=>p.list.title===F);u?u.list.items.includes(s)||u.list.items.push(s):l.push({list:{title:o.category==="invalid"?x:F,items:[s]}})}else t.push({title:c,body:[{list:{title:o.category==="invalid"?x:F,items:[s]}}]});return t.forEach(l=>{l.body.sort((u,p)=>u.list.title===x?1:p.list.title===x?-1:0)}),t},[])}function we(e,n){return e.reduce((t,o)=>{let s=(o.on?o.on[0]:void 0)?.user_identifier,a=n.find(l=>l.uid===s),r=s?`Extension with uid: ${s}`:"Unknown Extension",d=a?.handle??r,c=`${(o.field??["unknown"]).join(".")}: ${o.message}`,f=t.find(l=>l.title===d);if(f){let u=f.body.find(p=>p.list.title===x);u&&(u.list.items.includes(c)||u.list.items.push(c))}else t.push({title:d,body:[{list:{title:x,items:[c]}}]});return t},[])}function be(e){return e.reduce((n,t)=>{let o=t.details.find(s=>typeof s.extension_title<"u")?.extension_title,i=n.find(s=>s.title===o);return i?i.errorCount+=1:n.push({title:o,errorCount:1}),n},[]).map(n=>({title:n.title,body:`
4
4
  ${n.errorCount} error${n.errorCount>1?"s":""} found in your extensions. Fix these issues and try deploying again.`}))}g();async function re(e){let n=E(e.app.directory,".shopify","deploy-bundle");await B(n,{force:!0}),await _(n),await X(e.appManifest,n),e.skipBuild||await W(e.app);let t=e.app.allExtensions.map(i=>({prefix:i.localIdentifier,action:async(s,a,r)=>{let d=e.isDevDashboardApp?void 0:e.identifiers?.extensions[i.localIdentifier];await i.buildForBundle({stderr:a,stdout:s,signal:r,app:e.app,environment:"production",skipBuild:e.skipBuild},n,d)}}));if(await U({processes:t,showTimestamps:!1}),e.app.allExtensions.some(i=>i.hasDeploySteps))return await ee(n,e.bundlePath),e.bundlePath}async function ve(e){let{app:n,remoteApp:t,developerPlatformClient:o,force:i,extensions:s}=e;if(i||!S())return n;let a=[`App includes legacy extensions that will be deprecated soon:
@@ -1,4 +1,4 @@
1
- import{b as S,c as A,d as R}from"./chunk-7UOPCYMV.js";import{a as N}from"./chunk-MQICT2LR.js";import{a as P}from"./chunk-ZAMDXIVC.js";import{Ga as T,b as y,c as x}from"./chunk-ATXODH6C.js";import{b,c as g}from"./chunk-H5C3QTOO.js";import{u as h}from"./chunk-6EZ7JWBK.js";import{Fb as l,Hb as m,Lb as d}from"./chunk-DONEJHDG.js";import{d as f}from"./chunk-773TIA5M.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();function C(n,t){let o={};return n.targeting?.forEach(e=>{e.target&&(o[e.target]={...e.input_query&&{inputQueryPath:`${t}/${e.input_query}`},...e.export&&{export:e.export}})}),o}function I(n,t,o,e,i,r){return JSON.stringify({handle:t.handle,name:n.name,apiVersion:t.api_version,targeting:o,schemaPath:r,wasmPath:i,functionRunnerPath:e},null,2)}function j(n,t){return{title:`CONFIGURATION
1
+ import{b as S,c as A,d as R}from"./chunk-4U3NC3UU.js";import{a as N}from"./chunk-Z2Y6G2QF.js";import{a as P}from"./chunk-6V37CHBZ.js";import{Ga as T,b as y,c as x}from"./chunk-KJQAJUDU.js";import{b,c as g}from"./chunk-S5JJL3BP.js";import{u as h}from"./chunk-YYLEWVO6.js";import{Fb as l,Hb as m,Lb as d}from"./chunk-BXDZX3BS.js";import{d as f}from"./chunk-773TIA5M.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();function C(n,t){let o={};return n.targeting?.forEach(e=>{e.target&&(o[e.target]={...e.input_query&&{inputQueryPath:`${t}/${e.input_query}`},...e.export&&{export:e.export}})}),o}function I(n,t,o,e,i,r){return JSON.stringify({handle:t.handle,name:n.name,apiVersion:t.api_version,targeting:o,schemaPath:r,wasmPath:i,functionRunnerPath:e},null,2)}function j(n,t){return{title:`CONFIGURATION
2
2
  `,body:{tabularData:[["Handle",n.handle??"N/A"],["Name",t??"N/A"],["API Version",n.api_version??"N/A"]],firstColumnSubdued:!0}}}function O(n){if(Object.keys(n).length===0)return null;let t=[];return Object.entries(n).forEach(([o,e])=>{t.push([m`${l.cyan(o)}`.value,""]),e.inputQueryPath&&t.push([{subdued:" Input Query Path"},{filePath:e.inputQueryPath}]),e.export&&t.push([{subdued:" Export"},e.export])}),{title:`
3
3
  TARGETING
4
4
  `,body:{tabularData:t}}}function v(n,t){return{title:`
@@ -1,4 +1,4 @@
1
- import{b as h}from"./chunk-UKK5P74A.js";import{Ca as g,ua as u,wa as c}from"./chunk-DONEJHDG.js";import{d as f,q as p}from"./chunk-773TIA5M.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var d=f(p(),"/docs-shopify.dev/commands"),m=class extends h{static{this.description="Generate CLI commands documentation"}static{this.hidden=!0}async run(){let a=this.config.commands;await g(d),await c(d);let o=a.sort((e,i)=>e.id.length-i.id.length).filter(e=>!b(e)).map(e=>{let i=k(e);return N(e,i)});await Promise.all(o)}},C=["commands","help","plugins"];function b(t){return t.hidden?(C.push(t.id),!0):t.pluginType==="user"?!0:C.some(a=>t.id.startsWith(`${a}:`))}function k(t){let a=t.id.replace(/[:]/g," "),s=t.id.replace(/[:]/g,"-"),o=t.id.replace(/[:-]/g,"");return{commandName:a,fileName:s,interfaceName:o}}async function N(t,{commandName:a,fileName:s,interfaceName:o}){let e=Object.keys(t.flags).map(r=>{let n=t.flags[r];if(!n||n.hidden)return;let $=n.description??"",w=n.char?`-${n.char}, `:"",y=n.type==="option"?"string":"''",v=n.type==="option"?" <value>":"",x=n.required?"":"?",D=n.env!==void 0?` @environment ${n.env}`:"";return` /**
1
+ import{b as h}from"./chunk-74IG3ZE3.js";import{Ca as g,ua as u,wa as c}from"./chunk-BXDZX3BS.js";import{d as f,q as p}from"./chunk-773TIA5M.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var d=f(p(),"/docs-shopify.dev/commands"),m=class extends h{static{this.description="Generate CLI commands documentation"}static{this.hidden=!0}async run(){let a=this.config.commands;await g(d),await c(d);let o=a.sort((e,i)=>e.id.length-i.id.length).filter(e=>!b(e)).map(e=>{let i=k(e);return N(e,i)});await Promise.all(o)}},C=["commands","help","plugins"];function b(t){return t.hidden?(C.push(t.id),!0):t.pluginType==="user"?!0:C.some(a=>t.id.startsWith(`${a}:`))}function k(t){let a=t.id.replace(/[:]/g," "),s=t.id.replace(/[:]/g,"-"),o=t.id.replace(/[:-]/g,"");return{commandName:a,fileName:s,interfaceName:o}}async function N(t,{commandName:a,fileName:s,interfaceName:o}){let e=Object.keys(t.flags).map(r=>{let n=t.flags[r];if(!n||n.hidden)return;let $=n.description??"",w=n.char?`-${n.char}, `:"",y=n.type==="option"?"string":"''",v=n.type==="option"?" <value>":"",x=n.required?"":"?",D=n.env!==void 0?` @environment ${n.env}`:"";return` /**
2
2
  * ${$}
3
3
  *${D}
4
4
  */