shopify 5.1.0 → 5.2.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 (367) hide show
  1. package/dist/analytics-23GM6KJU.js +1 -0
  2. package/dist/analytics-743FYOAE.js +1 -0
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/{chunk-HSTZV6H7.js → chunk-2EQRXSF6.js} +1 -1
  5. package/dist/{chunk-AY3AAV77.js → chunk-2IXP3IPE.js} +1 -1
  6. package/dist/{chunk-OTMYJWIP.js → chunk-2KACAQJS.js} +1 -1
  7. package/dist/{chunk-24Q6X53V.js → chunk-2OCSYLKZ.js} +1 -1
  8. package/dist/{chunk-QCLE5REL.js → chunk-2PILNMHJ.js} +1 -1
  9. package/dist/{chunk-WPDJVUTY.js → chunk-36S6MFJQ.js} +1 -1
  10. package/dist/{chunk-YNZLLZU2.js → chunk-3DB4EC62.js} +1 -1
  11. package/dist/{chunk-FQLXQ7WN.js → chunk-3GL3IT4K.js} +1 -1
  12. package/dist/{chunk-JALDNBTU.js → chunk-3JRB7Q3T.js} +1 -1
  13. package/dist/{chunk-7A77JCED.js → chunk-3OYMK5X6.js} +1 -1
  14. package/dist/{chunk-ORMXPSJM.js → chunk-422BGHXN.js} +1 -1
  15. package/dist/{chunk-ZMU4EYXT.js → chunk-43C32FUQ.js} +1 -1
  16. package/dist/{chunk-ELR6AZT4.js → chunk-4AN7ECPE.js} +1 -1
  17. package/dist/chunk-4AWVU2OV.js +1 -0
  18. package/dist/chunk-4KBOLN7Q.js +8 -0
  19. package/dist/{chunk-YYWSHRO2.js → chunk-4LJERO23.js} +3 -3
  20. package/dist/{chunk-4FWPOGPQ.js → chunk-4M5WHOZW.js} +1 -1
  21. package/dist/{chunk-OWQEFORZ.js → chunk-4RO35FFQ.js} +1 -1
  22. package/dist/{chunk-6I7DT7QR.js → chunk-4ZS5354G.js} +1 -1
  23. package/dist/{chunk-ZXZWMXXK.js → chunk-55AWBPKU.js} +1 -1
  24. package/dist/{chunk-7PHDEILV.js → chunk-5BUYR23E.js} +1 -1
  25. package/dist/{chunk-AHYI27QL.js → chunk-5EDA7PVE.js} +3 -3
  26. package/dist/{chunk-5C6CXU74.js → chunk-5P6OELKZ.js} +1 -1
  27. package/dist/{chunk-SPJM7RTD.js → chunk-5PVXLQNX.js} +1 -1
  28. package/dist/{chunk-FU7PYW7H.js → chunk-5S2P4MHJ.js} +1 -1
  29. package/dist/{chunk-SBN3ILXO.js → chunk-5TJJVSCI.js} +1 -1
  30. package/dist/{chunk-VE3IIC7H.js → chunk-5TOK5OJS.js} +1 -1
  31. package/dist/{chunk-LGDWE3H3.js → chunk-5ZG2SWU2.js} +1 -1
  32. package/dist/{chunk-DDZYIC76.js → chunk-62F4ZMSC.js} +1 -1
  33. package/dist/{chunk-4NFX7YCT.js → chunk-652NT7OW.js} +1 -1
  34. package/dist/{chunk-5534MHZW.js → chunk-6B5KM3A4.js} +1 -1
  35. package/dist/{chunk-CRQQCT7F.js → chunk-6LCESSY3.js} +1 -1
  36. package/dist/chunk-6QHDMCAA.js +1 -0
  37. package/dist/{chunk-2KUM2RU4.js → chunk-7A4ZE5IS.js} +2 -2
  38. package/dist/{chunk-R6US7F33.js → chunk-7AQZKPJU.js} +1 -1
  39. package/dist/{chunk-HMPRWNGG.js → chunk-7FBOMPO5.js} +2 -2
  40. package/dist/{chunk-DGIIUQH3.js → chunk-7UK565VJ.js} +1 -1
  41. package/dist/{chunk-DOLVBTCB.js → chunk-A5BSUUNQ.js} +1 -1
  42. package/dist/{chunk-SCDGLREP.js → chunk-ADGE7MKB.js} +1 -1
  43. package/dist/{chunk-65NCQJYR.js → chunk-AEWRZ7AE.js} +1 -1
  44. package/dist/chunk-ALDJTWCO.js +1 -0
  45. package/dist/chunk-ARL5WBDK.js +1 -0
  46. package/dist/chunk-AXFEIJC7.js +1 -0
  47. package/dist/{chunk-JNSVKDBY.js → chunk-AYGL6F3P.js} +1 -1
  48. package/dist/{chunk-F6IQWX2F.js → chunk-AYTTE7X5.js} +1 -1
  49. package/dist/{chunk-JIYCZXK5.js → chunk-BDIZUTKC.js} +1 -1
  50. package/dist/{chunk-Z5WFRYVQ.js → chunk-BQKF4SRH.js} +1 -1
  51. package/dist/{chunk-7ART2IKU.js → chunk-C2AOCLEZ.js} +1 -1
  52. package/dist/{chunk-NYMKGE3J.js → chunk-C2SGJ5IG.js} +1 -1
  53. package/dist/{chunk-LPPEAMI6.js → chunk-C3S3UMV3.js} +1 -1
  54. package/dist/{chunk-S3RROJGG.js → chunk-C5DKLOW4.js} +1 -1
  55. package/dist/{chunk-DC7ITY6T.js → chunk-CA3GVT4D.js} +1 -1
  56. package/dist/{chunk-KFR7HWCG.js → chunk-CCLU5ZRK.js} +1 -1
  57. package/dist/{chunk-3FZ4LE6A.js → chunk-CE6XQDAG.js} +2 -2
  58. package/dist/{chunk-RKNVTEO3.js → chunk-CEJ5WS4I.js} +1 -1
  59. package/dist/chunk-CIBBQO2L.js +6 -0
  60. package/dist/{chunk-L2PUDV7Y.js → chunk-CKJXJ6HD.js} +1 -1
  61. package/dist/{chunk-KHZF73BL.js → chunk-COGKVNQB.js} +1 -1
  62. package/dist/{chunk-OY5M52EF.js → chunk-CQPZOXWO.js} +1 -1
  63. package/dist/{chunk-AVJJGQOP.js → chunk-CZYQIWNL.js} +1 -1
  64. package/dist/{chunk-VA2S7W7H.js → chunk-DA5RQFXA.js} +1 -1
  65. package/dist/{chunk-NUBJ2HK7.js → chunk-DESZFFOK.js} +1 -1
  66. package/dist/{chunk-WLYXBQ2M.js → chunk-DKR7562G.js} +1 -1
  67. package/dist/{chunk-KM4LE7K4.js → chunk-DNNTAMC5.js} +1 -1
  68. package/dist/{chunk-V4FC72R6.js → chunk-DUPQUQ2Z.js} +1 -1
  69. package/dist/{chunk-FHKK3QU7.js → chunk-DUTIWCJ2.js} +1 -1
  70. package/dist/chunk-E6JEBSHZ.js +20 -0
  71. package/dist/{chunk-VQSRU5XL.js → chunk-E6KNAPIY.js} +1 -1
  72. package/dist/{chunk-MTT6EAQO.js → chunk-E7XCCLQH.js} +1 -1
  73. package/dist/chunk-EE72PCKT.js +1 -0
  74. package/dist/{chunk-AGTUAQHX.js → chunk-EEYXBKR7.js} +1 -1
  75. package/dist/{chunk-H2KGP2FM.js → chunk-EGLA3WLZ.js} +1 -1
  76. package/dist/{chunk-JMSAHCBU.js → chunk-FDFE3SSG.js} +1 -1
  77. package/dist/{chunk-TSPJAMYB.js → chunk-FI5TQHUA.js} +1 -1
  78. package/dist/{chunk-QKPAB245.js → chunk-FIKZQ4RA.js} +1 -1
  79. package/dist/chunk-FJOVMEPN.js +3 -0
  80. package/dist/{chunk-5PSQFQL6.js → chunk-FLARCZ5F.js} +1 -1
  81. package/dist/{chunk-WE5KY6T6.js → chunk-FOMMPAWZ.js} +1 -1
  82. package/dist/chunk-G3DXNSA2.js +1 -0
  83. package/dist/{chunk-HYCNYUHW.js → chunk-G7JO3W2R.js} +1 -1
  84. package/dist/{chunk-C2HJEGTS.js → chunk-GABIWYY3.js} +1 -1
  85. package/dist/{chunk-OXZR2MB4.js → chunk-GFSEU7PF.js} +1 -1
  86. package/dist/{chunk-AMVWKHNY.js → chunk-GFVUWVEM.js} +1 -1
  87. package/dist/{chunk-D7IMC2G4.js → chunk-GHNSXX7R.js} +1 -1
  88. package/dist/{chunk-7N7KRZOM.js → chunk-GQ3LY7BY.js} +1 -1
  89. package/dist/{chunk-PJZZZNWR.js → chunk-H45S4MGC.js} +1 -1
  90. package/dist/{chunk-OJOF6IYG.js → chunk-HEB4YYM6.js} +4 -4
  91. package/dist/{chunk-I3WRA2LH.js → chunk-HI5FTI3M.js} +1 -1
  92. package/dist/{chunk-WFPVT2IY.js → chunk-HJ24NEP5.js} +1 -1
  93. package/dist/{chunk-LFBFPK22.js → chunk-HQFXVVTB.js} +1 -1
  94. package/dist/{chunk-27JT4NA4.js → chunk-HR6R7JXN.js} +1 -1
  95. package/dist/{chunk-JVY6CCLE.js → chunk-HRHJA5ZP.js} +1 -1
  96. package/dist/{chunk-5HOZDOJ7.js → chunk-HT5JQJMB.js} +1 -1
  97. package/dist/chunk-HT7273V7.js +1 -0
  98. package/dist/{chunk-ONZULPQH.js → chunk-HUB4HDWN.js} +75 -75
  99. package/dist/{chunk-HGZ2HRPO.js → chunk-IATNIWOC.js} +1 -1
  100. package/dist/{chunk-T6C4WC3Z.js → chunk-IHVWDKDV.js} +1 -1
  101. package/dist/{chunk-DMOLPSXF.js → chunk-IKXUYCK7.js} +1 -1
  102. package/dist/{chunk-HP4QYSBQ.js → chunk-IVQN2RUP.js} +1 -1
  103. package/dist/{chunk-FYQE5E6U.js → chunk-J324ZPO6.js} +1 -1
  104. package/dist/{chunk-3MZ7ELHS.js → chunk-JJQ3DJG5.js} +1 -1
  105. package/dist/{chunk-RLOEI6VE.js → chunk-JLAN6JXJ.js} +1 -1
  106. package/dist/{chunk-XRNBCV2B.js → chunk-K2GCCCCV.js} +1 -1
  107. package/dist/{chunk-ASKBYEO7.js → chunk-K4KKSBUW.js} +1 -1
  108. package/dist/{chunk-JC37YZ4I.js → chunk-K5UVCBIP.js} +1 -1
  109. package/dist/{chunk-3C72S6LO.js → chunk-KN2JIDNO.js} +1 -1
  110. package/dist/{chunk-WBJFTCEJ.js → chunk-KORVOCNN.js} +1 -1
  111. package/dist/{chunk-MGWCXTGD.js → chunk-KRQCQ57O.js} +1 -1
  112. package/dist/{chunk-3GD5ESWN.js → chunk-KT2AMFVW.js} +1 -1
  113. package/dist/{chunk-VRIFLMA3.js → chunk-L23Q53FM.js} +1 -1
  114. package/dist/{chunk-OXPEBT4I.js → chunk-L3DTONOI.js} +1 -1
  115. package/dist/{chunk-CEQGOCKX.js → chunk-LRETOC6P.js} +1 -1
  116. package/dist/{chunk-F5QKMDP3.js → chunk-LXFWK3O2.js} +1 -1
  117. package/dist/{chunk-KCAWHJGF.js → chunk-LZ2TN7EZ.js} +1 -1
  118. package/dist/{chunk-EDWIWZWM.js → chunk-MBAPM5HA.js} +1 -1
  119. package/dist/{chunk-IRLYC626.js → chunk-MGZK5EQW.js} +1 -1
  120. package/dist/{chunk-GSFWBFFH.js → chunk-MKUXSM33.js} +1 -1
  121. package/dist/chunk-MQ55QUOJ.js +276 -0
  122. package/dist/{chunk-A2NSORBM.js → chunk-NAQJMRPT.js} +1 -1
  123. package/dist/{chunk-Z5QEXS6F.js → chunk-NMXRDF4T.js} +1 -1
  124. package/dist/{chunk-SODCXZ5U.js → chunk-NOWM3CCG.js} +1 -1
  125. package/dist/{chunk-TXP6KFWO.js → chunk-NVDFXEQ5.js} +1 -1
  126. package/dist/{chunk-TP7CTMMT.js → chunk-OCILF2DD.js} +1 -1
  127. package/dist/{chunk-XWLNCBAG.js → chunk-OGBMFGYC.js} +1 -1
  128. package/dist/{chunk-ZMOW2YZ4.js → chunk-OIQ5NQ5I.js} +3 -3
  129. package/dist/{chunk-YTL45RXR.js → chunk-OKRKVVTK.js} +1 -1
  130. package/dist/{chunk-JQU2BJDH.js → chunk-ONNUEQGR.js} +1 -1
  131. package/dist/chunk-OSASE35V.js +6 -0
  132. package/dist/{chunk-6IMTMS2S.js → chunk-OTMTS5L4.js} +1 -1
  133. package/dist/{chunk-MKFRKNHF.js → chunk-OWPAHXDF.js} +1 -1
  134. package/dist/{chunk-YVPB7OT6.js → chunk-P7HZGJRU.js} +1 -1
  135. package/dist/{chunk-5T3ZT6CC.js → chunk-PIU3GVJ4.js} +1 -1
  136. package/dist/{chunk-DVD7I2TX.js → chunk-PSNCWS3Q.js} +1 -1
  137. package/dist/{chunk-XEZPN5TR.js → chunk-PSREELSQ.js} +4 -4
  138. package/dist/{chunk-SURFUFAZ.js → chunk-Q2CKRCPM.js} +1 -1
  139. package/dist/{chunk-WWCYEZUU.js → chunk-QA2D7DT2.js} +1 -1
  140. package/dist/{chunk-G3EWGBXR.js → chunk-QDMTJKQ3.js} +1 -1
  141. package/dist/{chunk-NY5N4ANL.js → chunk-QIJ7D2JS.js} +1 -1
  142. package/dist/{chunk-7DBKSSDK.js → chunk-QLN6IOOY.js} +1 -1
  143. package/dist/{chunk-A54TADAZ.js → chunk-QU3USVKT.js} +1 -1
  144. package/dist/chunk-R2E6TMBE.js +22 -0
  145. package/dist/chunk-R5COVIJM.js +1 -0
  146. package/dist/{chunk-S4KNPCW3.js → chunk-RFJ2LI64.js} +1 -1
  147. package/dist/chunk-RNF6T6IO.js +5 -0
  148. package/dist/{chunk-DVFVO6ZE.js → chunk-RSNFNZ6F.js} +1 -1
  149. package/dist/{chunk-7BPT5V24.js → chunk-RZ3UGOV4.js} +2 -2
  150. package/dist/{chunk-GGCP2TIK.js → chunk-S23ZG2RG.js} +1 -1
  151. package/dist/{chunk-3PS52ZT4.js → chunk-SAK42CAY.js} +1 -1
  152. package/dist/{chunk-G3RNO2TC.js → chunk-SBX7CMHM.js} +1 -1
  153. package/dist/{chunk-TUSS6PXB.js → chunk-SGQTRKYZ.js} +1 -1
  154. package/dist/{chunk-SQL67BKI.js → chunk-SNPJVVVE.js} +1 -1
  155. package/dist/{chunk-QUPZOBTB.js → chunk-SNRGS3YU.js} +1 -1
  156. package/dist/{chunk-FKKJQGYX.js → chunk-SUTSCIXU.js} +1 -1
  157. package/dist/{chunk-SHOMIS6Q.js → chunk-SWFCT5B7.js} +1 -1
  158. package/dist/{chunk-WZBZ7FWP.js → chunk-SZ64GAVG.js} +1 -1
  159. package/dist/{chunk-DTKGI43P.js → chunk-TDHIOONG.js} +1 -1
  160. package/dist/{chunk-7NRHZG5Y.js → chunk-TLN4BKXJ.js} +1 -1
  161. package/dist/{chunk-XLMKHTJ5.js → chunk-TXMZPF2U.js} +1 -1
  162. package/dist/{chunk-6BYHL3DS.js → chunk-TZOB52QK.js} +1 -1
  163. package/dist/{chunk-HVUMVDUG.js → chunk-U5BKU3OL.js} +1 -1
  164. package/dist/chunk-UK3BDOHR.js +7 -0
  165. package/dist/{chunk-YKDRUAY3.js → chunk-UORSJB4A.js} +90 -90
  166. package/dist/{chunk-Z6ZRS256.js → chunk-UY44O4IZ.js} +1 -1
  167. package/dist/{chunk-JG4FAT2T.js → chunk-V3H6SYK3.js} +1 -1
  168. package/dist/{chunk-AE3IQG7S.js → chunk-VBPMVVLV.js} +1 -1
  169. package/dist/{chunk-SVQDMZJO.js → chunk-VGBCG3I5.js} +1 -1
  170. package/dist/{chunk-MYMBHVC4.js → chunk-VHRUPKWH.js} +1 -1
  171. package/dist/{chunk-CZNUBAAG.js → chunk-VVHJ2AUF.js} +1 -1
  172. package/dist/{chunk-T4ZOTYOY.js → chunk-WB5GRBHW.js} +1 -1
  173. package/dist/{chunk-YNFQBYSL.js → chunk-WBKQSSWW.js} +1 -1
  174. package/dist/{chunk-MU7IVBGI.js → chunk-WDXDT7XY.js} +2 -2
  175. package/dist/{chunk-FAVPTYIR.js → chunk-WHOD5I7N.js} +1 -1
  176. package/dist/{chunk-7CT3NIXI.js → chunk-WL3M63DG.js} +1 -1
  177. package/dist/{chunk-25MYHE4W.js → chunk-WLJDMI7E.js} +1 -1
  178. package/dist/{chunk-VJG7VXFU.js → chunk-WZ3QWPK5.js} +2 -2
  179. package/dist/{chunk-BPKQA2EO.js → chunk-X5V7AGVU.js} +1 -1
  180. package/dist/{chunk-UFY4L5KQ.js → chunk-X76AYO36.js} +1 -1
  181. package/dist/{chunk-WBPP6PO7.js → chunk-XB7H2RYV.js} +1 -1
  182. package/dist/chunk-XHHAVKKV.js +1 -0
  183. package/dist/{chunk-4TCXPHKN.js → chunk-XKNDU62O.js} +1 -1
  184. package/dist/{chunk-7KID5BIR.js → chunk-XVJRGOJA.js} +1 -1
  185. package/dist/{chunk-CDSDQTNB.js → chunk-Y3ZAQZPH.js} +1 -1
  186. package/dist/{chunk-Q2LQJYRK.js → chunk-YGN65N6W.js} +1 -1
  187. package/dist/{chunk-UC4TOM36.js → chunk-YTC367JI.js} +1 -1
  188. package/dist/{chunk-TTAT62N3.js → chunk-Z2FGYMJ6.js} +1 -1
  189. package/dist/chunk-Z3QZNLT5.js +1 -0
  190. package/dist/{chunk-TSVEV2UD.js → chunk-ZC3EDADH.js} +1 -1
  191. package/dist/{chunk-O7HZ3EIP.js → chunk-ZLITAXPT.js} +1 -1
  192. package/dist/{chunk-WWVDZ3GC.js → chunk-ZNEQZV5K.js} +1 -1
  193. package/dist/{chunk-OVJVFB5E.js → chunk-ZOU6SOXW.js} +1 -1
  194. package/dist/{chunk-KFO2JNF5.js → chunk-ZQNGYJKJ.js} +1 -1
  195. package/dist/{chunk-MZDBH4XV.js → chunk-ZRM7ESSS.js} +1 -1
  196. package/dist/{chunk-ORYEDUKM.js → chunk-ZX33FUW3.js} +1 -1
  197. package/dist/cli/commands/app/build.js +1 -1
  198. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  199. package/dist/cli/commands/app/bulk/execute.js +1 -1
  200. package/dist/cli/commands/app/bulk/status.js +1 -1
  201. package/dist/cli/commands/app/config/link.js +1 -1
  202. package/dist/cli/commands/app/config/pull.js +1 -1
  203. package/dist/cli/commands/app/config/use.js +1 -1
  204. package/dist/cli/commands/app/config/validate.js +1 -1
  205. package/dist/cli/commands/app/demo/watcher.js +1 -1
  206. package/dist/cli/commands/app/deploy.js +1 -1
  207. package/dist/cli/commands/app/dev/clean.js +1 -1
  208. package/dist/cli/commands/app/dev.js +1 -1
  209. package/dist/cli/commands/app/env/pull.js +1 -1
  210. package/dist/cli/commands/app/env/show.js +1 -1
  211. package/dist/cli/commands/app/execute.js +1 -1
  212. package/dist/cli/commands/app/function/build.js +1 -1
  213. package/dist/cli/commands/app/function/info.js +1 -1
  214. package/dist/cli/commands/app/function/replay.js +1 -1
  215. package/dist/cli/commands/app/function/run.js +1 -1
  216. package/dist/cli/commands/app/function/schema.js +1 -1
  217. package/dist/cli/commands/app/function/typegen.js +1 -1
  218. package/dist/cli/commands/app/generate/extension.js +1 -1
  219. package/dist/cli/commands/app/graphiql.js +1 -1
  220. package/dist/cli/commands/app/import/channel-config.js +1 -1
  221. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
  222. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
  223. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  224. package/dist/cli/commands/app/import-extensions.js +1 -1
  225. package/dist/cli/commands/app/info.js +1 -1
  226. package/dist/cli/commands/app/init.js +1 -1
  227. package/dist/cli/commands/app/logs.js +1 -1
  228. package/dist/cli/commands/app/release.js +1 -1
  229. package/dist/cli/commands/app/security/check.js +1 -1
  230. package/dist/cli/commands/app/security/clean.js +1 -1
  231. package/dist/cli/commands/app/security/instructions.js +1 -1
  232. package/dist/cli/commands/app/security/record.js +1 -1
  233. package/dist/cli/commands/app/security/review.js +1 -1
  234. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  235. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  236. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  237. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  238. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  239. package/dist/cli/commands/app/versions/list.js +1 -1
  240. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  241. package/dist/cli/commands/auth/login.js +1 -1
  242. package/dist/cli/commands/auth/logout.js +1 -1
  243. package/dist/cli/commands/cache/clear.js +1 -1
  244. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  245. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  246. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  247. package/dist/cli/commands/debug/command-flags.js +1 -1
  248. package/dist/cli/commands/doc/fetch.js +1 -1
  249. package/dist/cli/commands/doc/search.js +1 -1
  250. package/dist/cli/commands/docs/generate.js +1 -1
  251. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  252. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  253. package/dist/cli/commands/help.js +1 -1
  254. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  255. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  256. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  257. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  258. package/dist/cli/commands/notifications/generate.js +1 -1
  259. package/dist/cli/commands/notifications/list.js +1 -1
  260. package/dist/cli/commands/organization/list.js +1 -1
  261. package/dist/cli/commands/search.js +1 -1
  262. package/dist/cli/commands/send-analytics.js +1 -1
  263. package/dist/cli/commands/theme/check.js +1 -1
  264. package/dist/cli/commands/theme/console.js +1 -1
  265. package/dist/cli/commands/theme/delete.js +1 -1
  266. package/dist/cli/commands/theme/dev.js +1 -1
  267. package/dist/cli/commands/theme/duplicate.js +1 -1
  268. package/dist/cli/commands/theme/info.js +1 -1
  269. package/dist/cli/commands/theme/init.js +1 -1
  270. package/dist/cli/commands/theme/language-server.js +1 -1
  271. package/dist/cli/commands/theme/list.js +1 -1
  272. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  273. package/dist/cli/commands/theme/open.js +1 -1
  274. package/dist/cli/commands/theme/package.js +1 -1
  275. package/dist/cli/commands/theme/preview.js +1 -1
  276. package/dist/cli/commands/theme/profile.js +1 -1
  277. package/dist/cli/commands/theme/publish.js +1 -1
  278. package/dist/cli/commands/theme/pull.js +1 -1
  279. package/dist/cli/commands/theme/push.js +1 -1
  280. package/dist/cli/commands/theme/rename.js +1 -1
  281. package/dist/cli/commands/theme/share.js +1 -1
  282. package/dist/cli/commands/upgrade.js +1 -1
  283. package/dist/cli/commands/version.js +1 -1
  284. package/dist/cli/help.js +1 -1
  285. package/dist/{cli-version-check-V25AVSZ6.js → cli-version-check-BW2CUMX4.js} +1 -1
  286. package/dist/{command-json-schema-C5UZXP2W.js → command-json-schema-LGR44Q2G.js} +1 -1
  287. package/dist/command-registry.js +1 -1
  288. package/dist/{conf-store-OCGEEV4U.js → conf-store-TODPQ2LC.js} +1 -1
  289. package/dist/configs/all.yml +9 -0
  290. package/dist/configs/recommended.yml +9 -0
  291. package/dist/{custom-oclif-loader-ZVUKMRGH.js → custom-oclif-loader-BPE2TH4B.js} +1 -1
  292. package/dist/data/objects.json +204 -11
  293. package/dist/data/section.json +14 -0
  294. package/dist/data/setting.json +9 -5
  295. package/dist/data/shopify_system_translations.json +84 -21
  296. package/dist/{deprecations-A5AXXKIK.js → deprecations-5CSI24TV.js} +1 -1
  297. package/dist/dist-LPKYTX3M.js +1 -0
  298. package/dist/dist-WT6MPTKJ.js +1 -0
  299. package/dist/{environments-Y5JEI3U3.js → environments-3HTT5CVC.js} +1 -1
  300. package/dist/error-PFOKPWFX.js +1 -0
  301. package/dist/error-handler-23FASAEU.js +1 -0
  302. package/dist/{fs-UOOLPOHJ.js → fs-RA25PWSJ.js} +1 -1
  303. package/dist/hooks/did-you-mean.js +1 -1
  304. package/dist/hooks/hydrogen-init.js +1 -1
  305. package/dist/hooks/plugin-plugins.js +1 -1
  306. package/dist/hooks/postrun.js +1 -1
  307. package/dist/hooks/prerun.js +1 -1
  308. package/dist/hooks/public-metadata.js +1 -1
  309. package/dist/hooks/sensitive-metadata.js +1 -1
  310. package/dist/hooks/tunnel-provider.js +1 -1
  311. package/dist/hooks/tunnel-start.js +1 -1
  312. package/dist/http-EVDTYINS.js +1 -0
  313. package/dist/index.js +12 -12
  314. package/dist/{is-global-CI77T7NE.js → is-global-3DNAMKUU.js} +1 -1
  315. package/dist/{json-error-6PBUR4LQ.js → json-error-HGCRNJRF.js} +1 -1
  316. package/dist/{lib-4JVADMNT.js → lib-4ZA53LTZ.js} +1 -1
  317. package/dist/{lib-L4STV5B2.js → lib-F3MES3XF.js} +1 -1
  318. package/dist/{lib-LEEN55OD.js → lib-XPJABU24.js} +1 -1
  319. package/dist/{local-5NIWPWDS.js → local-LNGPIGLG.js} +1 -1
  320. package/dist/{metadata-IXPNNPNJ.js → metadata-VHLSUKCW.js} +1 -1
  321. package/dist/{node-package-manager-ALFEGGD6.js → node-package-manager-SSFNUVWB.js} +1 -1
  322. package/dist/notifications-system-3NQRYYKW.js +1 -0
  323. package/dist/{os-6TNQTEUN.js → os-KIKVJONE.js} +1 -1
  324. package/dist/{output-LEOB5LAM.js → output-DUJTSURG.js} +1 -1
  325. package/dist/{prettier-VLTY4MIE.js → prettier-NOE3TJJ5.js} +1 -1
  326. package/dist/{system-J4CTESP5.js → system-CGOZSROX.js} +1 -1
  327. package/dist/tsconfig.tsbuildinfo +1 -1
  328. package/dist/{ui-YDUI56E3.js → ui-YMBFS3NG.js} +1 -1
  329. package/dist/upgrade-73RRPDSC.js +1 -0
  330. package/dist/version-AMUEEBIG.js +1 -0
  331. package/dist/{version-2YL4YEQ2.js → version-S4MGCKDO.js} +1 -1
  332. package/dist/{workerd-5UPTEWNI.js → workerd-DRWNY3S4.js} +1 -1
  333. package/oclif.manifest.json +23 -62
  334. package/package.json +7 -7
  335. package/dist/analytics-QFDTQYPM.js +0 -1
  336. package/dist/analytics-XADBBHOH.js +0 -1
  337. package/dist/chunk-2BYW3BYX.js +0 -1
  338. package/dist/chunk-2PD7TNFS.js +0 -275
  339. package/dist/chunk-3Z75BVGJ.js +0 -1
  340. package/dist/chunk-4WBWZIN5.js +0 -6
  341. package/dist/chunk-62NW4EPI.js +0 -17
  342. package/dist/chunk-ALINJ6J2.js +0 -1
  343. package/dist/chunk-BFAOTQGH.js +0 -1
  344. package/dist/chunk-CIGWIKOW.js +0 -1
  345. package/dist/chunk-DXEMSLI6.js +0 -1
  346. package/dist/chunk-H4K3F7PP.js +0 -5
  347. package/dist/chunk-JGLLABZR.js +0 -8
  348. package/dist/chunk-JIY6XWSC.js +0 -1
  349. package/dist/chunk-LXIWMYM4.js +0 -1
  350. package/dist/chunk-MGX7UG44.js +0 -1
  351. package/dist/chunk-QGQWVA7N.js +0 -1
  352. package/dist/chunk-RSZAAN37.js +0 -1
  353. package/dist/chunk-SN3PMWUF.js +0 -6
  354. package/dist/chunk-TD6JBHUS.js +0 -1
  355. package/dist/chunk-TIM4CIXZ.js +0 -22
  356. package/dist/chunk-WNVOEE6T.js +0 -7
  357. package/dist/chunk-YOYPYB4H.js +0 -1
  358. package/dist/cli/commands/app/logs-next.js +0 -1
  359. package/dist/dist-NORLLIHQ.js +0 -1
  360. package/dist/dist-XBM4XZS4.js +0 -1
  361. package/dist/error-GI4DXVDU.js +0 -1
  362. package/dist/error-handler-BS2ZENQV.js +0 -1
  363. package/dist/http-2OXOS2AW.js +0 -1
  364. package/dist/notifications-system-FQW3GKH2.js +0 -1
  365. package/dist/upgrade-LBCZORG2.js +0 -1
  366. package/dist/version-X2CPQVWQ.js +0 -1
  367. /package/dist/{chunk-2S3FHQFS.js → chunk-HVECVOIO.js} +0 -0
@@ -1,7 +1,7 @@
1
- import{a as Oo,b as vo,c as Br,d as Yr}from"./chunk-T7KHS6RF.js";import{d as yo}from"./chunk-S4KNPCW3.js";import{a as N,c as f,g as i}from"./chunk-VKWPEFWQ.js";var Wr=f(ie=>{"use strict";i();Object.defineProperty(ie,"__esModule",{value:!0});ie.boolean=void 0;var Ro=function(r){switch(Object.prototype.toString.call(r)){case"[object String]":return["true","t","yes","y","on","1"].includes(r.trim().toLowerCase());case"[object Number]":return r.valueOf()===1;case"[object Boolean]":return r.valueOf();default:return!1}};ie.boolean=Ro});var Kr=f(ae=>{"use strict";i();Object.defineProperty(ae,"__esModule",{value:!0});ae.isBooleanable=void 0;var _o=function(r){switch(Object.prototype.toString.call(r)){case"[object String]":return["true","t","yes","y","on","1","false","f","no","n","off","0"].includes(r.trim().toLowerCase());case"[object Number]":return[0,1].includes(r.valueOf());case"[object Boolean]":return!0;default:return!1}};ae.isBooleanable=_o});var ue=f(D=>{"use strict";i();Object.defineProperty(D,"__esModule",{value:!0});D.isBooleanable=D.boolean=void 0;var wo=Wr();Object.defineProperty(D,"boolean",{enumerable:!0,get:function(){return wo.boolean}});var Po=Kr();Object.defineProperty(D,"isBooleanable",{enumerable:!0,get:function(){return Po.isBooleanable}})});var le=f((Uc,Jr)=>{i();Jr.exports=Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"});var Ye=f((Xc,Qr)=>{"use strict";i();var Zr=Object.prototype.toString;Qr.exports=function(e){var t=Zr.call(e),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Zr.call(e.callee)==="[object Function]"),n}});var ut=f((Hc,at)=>{"use strict";i();var it;Object.keys||(H=Object.prototype.hasOwnProperty,ze=Object.prototype.toString,et=Ye(),We=Object.prototype.propertyIsEnumerable,rt=!We.call({toString:null},"toString"),tt=We.call(function(){},"prototype"),V=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],ce=function(r){var e=r.constructor;return e&&e.prototype===r},nt={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},st=(function(){if(typeof window>"u")return!1;for(var r in window)try{if(!nt["$"+r]&&H.call(window,r)&&window[r]!==null&&typeof window[r]=="object")try{ce(window[r])}catch{return!0}}catch{return!0}return!1})(),ot=function(r){if(typeof window>"u"||!st)return ce(r);try{return ce(r)}catch{return!1}},it=function(e){var t=e!==null&&typeof e=="object",n=ze.call(e)==="[object Function]",s=et(e),o=t&&ze.call(e)==="[object String]",a=[];if(!t&&!n&&!s)throw new TypeError("Object.keys called on a non-object");var c=tt&&n;if(o&&e.length>0&&!H.call(e,0))for(var l=0;l<e.length;++l)a.push(String(l));if(s&&e.length>0)for(var E=0;E<e.length;++E)a.push(String(E));else for(var u in e)!(c&&u==="prototype")&&H.call(e,u)&&a.push(String(u));if(rt)for(var p=ot(e),m=0;m<V.length;++m)!(p&&V[m]==="constructor")&&H.call(e,V[m])&&a.push(V[m]);return a});var H,ze,et,We,rt,tt,V,ce,nt,st,ot;at.exports=it});var pt=f((Bc,ft)=>{"use strict";i();var $o=Array.prototype.slice,Ao=Ye(),lt=Object.keys,fe=lt?function(e){return lt(e)}:ut(),ct=Object.keys;fe.shim=function(){if(Object.keys){var e=(function(){var t=Object.keys(arguments);return t&&t.length===arguments.length})(1,2);e||(Object.keys=function(n){return Ao(n)?ct($o.call(n)):ct(n)})}else Object.keys=fe;return Object.keys||fe};ft.exports=fe});var Et=f((zc,gt)=>{"use strict";i();var dt=Yr(),No=Oo(),j=vo(),ht=Br();gt.exports=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new j("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new j("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new j("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new j("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new j("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new j("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,c=arguments.length>6?arguments[6]:!1,l=!!ht&&ht(e,t);if(dt)dt(e,t,{configurable:a===null&&l?l.configurable:!a,enumerable:s===null&&l?l.enumerable:!s,value:n,writable:o===null&&l?l.writable:!o});else if(c||!s&&!o&&!a)e[t]=n;else throw new No("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var Ot=f((Kc,yt)=>{"use strict";i();var Ke=Yr(),mt=function(){return!!Ke};mt.hasArrayLengthDefineBug=function(){if(!Ke)return null;try{return Ke([],"length",{value:1}).length!==1}catch{return!0}};yt.exports=mt});var Je=f((Zc,_t)=>{"use strict";i();var To=pt(),Lo=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",So=Object.prototype.toString,Io=Array.prototype.concat,vt=Et(),qo=function(r){return typeof r=="function"&&So.call(r)==="[object Function]"},bt=Ot()(),xo=function(r,e,t,n){if(e in r){if(n===!0){if(r[e]===t)return}else if(!qo(n)||!n())return}bt?vt(r,e,t,!0):vt(r,e,t)},Rt=function(r,e){var t=arguments.length>2?arguments[2]:{},n=To(e);Lo&&(n=Io.call(n,Object.getOwnPropertySymbols(e)));for(var s=0;s<n.length;s+=1)xo(r,n[s],e[n[s]],t[n[s]])};Rt.supportsDescriptors=!!bt;_t.exports=Rt});var Ze=f((ef,wt)=>{"use strict";i();wt.exports=global});var Qe=f((tf,Pt)=>{"use strict";i();var Co=Ze();Pt.exports=function(){return typeof global!="object"||!global||global.Math!==Math||global.Array!==Array?Co:global}});var At=f((sf,$t)=>{"use strict";i();var Do=Je(),jo=Br(),Go=Qe();$t.exports=function(){var e=Go();if(Do.supportsDescriptors){var t=jo(e,"globalThis");(!t||t.configurable&&(t.enumerable||!t.writable||globalThis!==e))&&Object.defineProperty(e,"globalThis",{configurable:!0,enumerable:!1,value:e,writable:!0})}else(typeof globalThis!="object"||globalThis!==e)&&(e.globalThis=e);return e}});var er=f((af,Lt)=>{"use strict";i();var Mo=Je(),Uo=Ze(),Nt=Qe(),ko=At(),Xo=Nt(),Tt=function(){return Xo};Mo(Tt,{getPolyfill:Nt,implementation:Uo,shim:ko});Lt.exports=Tt});var qt=f((rr,It)=>{i();rr=It.exports=Fo;rr.getSerialize=St;function Fo(r,e,t,n){return JSON.stringify(r,St(e,n),t)}function St(r,e){var t=[],n=[];return e==null&&(e=function(s,o){return t[0]===o?"[Circular ~]":"[Circular ~."+n.slice(0,t.indexOf(o)).join(".")+"]"}),function(s,o){if(t.length>0){var a=t.indexOf(this);~a?t.splice(a+1):t.push(this),~a?n.splice(a,1/0,s):n.push(s),~t.indexOf(o)&&(o=e.call(this,s,o))}else t.push(o);return r==null?o:r.call(this,s,o)}}});var xt=f(pe=>{i();(function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(a){return n(o(a),arguments)}function t(a,c){return e.apply(null,[a].concat(c||[]))}function n(a,c){var l=1,E=a.length,u,p="",m,g,O,S,I,C,oe,q;for(m=0;m<E;m++)if(typeof a[m]=="string")p+=a[m];else if(typeof a[m]=="object"){if(O=a[m],O.keys)for(u=c[l],g=0;g<O.keys.length;g++){if(u==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',O.keys[g],O.keys[g-1]));u=u[O.keys[g]]}else O.param_no?u=c[O.param_no]:u=c[l++];if(r.not_type.test(O.type)&&r.not_primitive.test(O.type)&&u instanceof Function&&(u=u()),r.numeric_arg.test(O.type)&&typeof u!="number"&&isNaN(u))throw new TypeError(e("[sprintf] expecting number but found %T",u));switch(r.number.test(O.type)&&(oe=u>=0),O.type){case"b":u=parseInt(u,10).toString(2);break;case"c":u=String.fromCharCode(parseInt(u,10));break;case"d":case"i":u=parseInt(u,10);break;case"j":u=JSON.stringify(u,null,O.width?parseInt(O.width):0);break;case"e":u=O.precision?parseFloat(u).toExponential(O.precision):parseFloat(u).toExponential();break;case"f":u=O.precision?parseFloat(u).toFixed(O.precision):parseFloat(u);break;case"g":u=O.precision?String(Number(u.toPrecision(O.precision))):parseFloat(u);break;case"o":u=(parseInt(u,10)>>>0).toString(8);break;case"s":u=String(u),u=O.precision?u.substring(0,O.precision):u;break;case"t":u=String(!!u),u=O.precision?u.substring(0,O.precision):u;break;case"T":u=Object.prototype.toString.call(u).slice(8,-1).toLowerCase(),u=O.precision?u.substring(0,O.precision):u;break;case"u":u=parseInt(u,10)>>>0;break;case"v":u=u.valueOf(),u=O.precision?u.substring(0,O.precision):u;break;case"x":u=(parseInt(u,10)>>>0).toString(16);break;case"X":u=(parseInt(u,10)>>>0).toString(16).toUpperCase();break}r.json.test(O.type)?p+=u:(r.number.test(O.type)&&(!oe||O.sign)?(q=oe?"+":"-",u=u.toString().replace(r.sign,"")):q="",I=O.pad_char?O.pad_char==="0"?"0":O.pad_char.charAt(1):" ",C=O.width-(q+u).length,S=O.width&&C>0?I.repeat(C):"",p+=O.align?q+u+S:I==="0"?q+S+u:S+q+u)}return p}var s=Object.create(null);function o(a){if(s[a])return s[a];for(var c=a,l,E=[],u=0;c;){if((l=r.text.exec(c))!==null)E.push(l[0]);else if((l=r.modulo.exec(c))!==null)E.push("%");else if((l=r.placeholder.exec(c))!==null){if(l[2]){u|=1;var p=[],m=l[2],g=[];if((g=r.key.exec(m))!==null)for(p.push(g[1]);(m=m.substring(g[0].length))!=="";)if((g=r.key_access.exec(m))!==null)p.push(g[1]);else if((g=r.index_access.exec(m))!==null)p.push(g[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");l[2]=p}else u|=2;if(u===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");E.push({placeholder:l[0],param_no:l[1],keys:l[2],sign:l[3],pad_char:l[4],align:l[5],width:l[6],precision:l[7],type:l[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");c=c.substring(l[0].length)}return s[a]=E}typeof pe<"u"&&(pe.sprintf=e,pe.vsprintf=t),typeof window<"u"&&(window.sprintf=e,window.vsprintf=t,typeof define=="function"&&define.amd&&define(function(){return{sprintf:e,vsprintf:t}}))})()});var tr=f(de=>{"use strict";i();Object.defineProperty(de,"__esModule",{value:!0});de.logLevels=void 0;var Ho={debug:20,error:50,fatal:60,info:30,trace:10,warn:40};de.logLevels=Ho});var jt=f(ge=>{"use strict";i();Object.defineProperty(ge,"__esModule",{value:!0});ge.default=void 0;var Vo=ir(le()),Bo=ir(er()),Yo=ir(qt()),nr=xt(),Ct=tr();function ir(r){return r&&r.__esModule?r:{default:r}}function sr(){return sr=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},sr.apply(this,arguments)}function Dt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),t.push.apply(t,n)}return t}function w(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Dt(Object(t),!0).forEach(function(n){zo(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Dt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function zo(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var Wo=(0,Bo.default)(),B;Vo.default&&(B=N("domain"));var Ko=()=>{if(!B)return{};let r=[],e=process.domain;if(!e||!e.parentDomain)return{};for(;e&&e.parentDomain;)e=e.parentDomain,e.roarr&&e.roarr.context&&r.push(e.roarr.context);let t={};for(let n of r)t=w(w({},t),n);return t},he=()=>{if(!B)return{};let r=process.domain;if(r&&r.roarr&&r.roarr.context)return r.roarr.context;if(!r||!r.parentDomain)return{};for(;r&&r.parentDomain;)if(r=r.parentDomain,r.roarr&&r.roarr.context)return r.roarr.context;return{}},or=(r,e)=>{let t=(n,s,o,a,c,l,E,u,p,m)=>{let g=Date.now(),O=Wo.ROARR.sequence++,S,I;if(typeof n=="string"){S=w(w({},he()),e||{});let C=sr({},{a:n,b:s,c:o,d:a,e:c,f:l,g:E,h:u,i:p,k:m});I=Object.keys(C).map(Be=>C[Be]).reduce((Be,mo)=>Be+=typeof mo>"u"?0:1,0)===1?(0,nr.sprintf)("%s",n):(0,nr.sprintf)(n,s,o,a,c,l,E,u,p,m)}else{if(typeof s!="string")throw new TypeError("Message must be a string.");S=JSON.parse((0,Yo.default)(w(w(w({},he()),e||{}),n))),I=(0,nr.sprintf)(s,o,a,c,l,E,u,p,m)}r({context:S,message:I,sequence:O,time:g,version:"1.0.0"})};t.child=n=>typeof n=="function"?or(s=>{if(typeof n!="function")throw new TypeError("Unexpected state.");r(n(s))},e):or(r,w(w(w({},he()),e),n)),t.getContext=()=>w(w({},he()),e||{}),t.adopt=async(n,s)=>{if(!B)return n();let o=B.create();return o.run(()=>(o.roarr={context:w(w({},Ko()),s)},n()))};for(let n of Object.keys(Ct.logLevels))t[n]=(s,o,a,c,l,E,u,p,m,g)=>t.child({logLevel:Ct.logLevels[n]})(s,o,a,c,l,E,u,p,m,g);return t},Jo=or;ge.default=Jo});var Ut=f(Ee=>{"use strict";i();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.default=void 0;var Gt=tr(),Mt=(r,e)=>{let t=(n,s,o,a,c,l,E,u,p,m)=>{};t.adopt=async n=>n(),t.child=n=>Mt(r,e),t.getContext=()=>({});for(let n of Object.keys(Gt.logLevels))t[n]=(s,o,a,c,l,E,u,p,m,g)=>t.child({logLevel:Gt.logLevels[n]})(s,o,a,c,l,E,u,p,m,g);return t},Zo=Mt;Ee.default=Zo});var Xt=f((yf,kt)=>{i();kt.exports=function(e,t){for(var n=e.split("."),s=t.split("."),o=0;o<3;o++){var a=Number(n[o]),c=Number(s[o]);if(a>c)return 1;if(c>a)return-1;if(!isNaN(a)&&isNaN(c))return 1;if(isNaN(a)&&!isNaN(c))return-1}return 0}});var Ft=f((vf,Qo)=>{Qo.exports={author:{email:"gajus@gajus.com",name:"Gajus Kuizinas",url:"http://gajus.com"},ava:{babel:{compileAsTests:["test/helpers/**/*"]},files:["test/roarr/**/*"],require:["@babel/register"]},dependencies:{boolean:"^3.0.1","detect-node":"^2.0.4",globalthis:"^1.0.1","json-stringify-safe":"^5.0.1","semver-compare":"^1.0.0","sprintf-js":"^1.1.2"},description:"JSON logger for Node.js and browser.",devDependencies:{"@ava/babel":"^1.0.1","@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/node":"^7.10.5","@babel/plugin-transform-flow-strip-types":"^7.10.4","@babel/preset-env":"^7.11.5","@babel/register":"^7.11.5",ava:"^3.12.1","babel-plugin-istanbul":"^6.0.0","babel-plugin-transform-export-default-name":"^2.0.4",coveralls:"^3.1.0","domain-parent":"^1.0.0",eslint:"^7.9.0","eslint-config-canonical":"^24.1.1","flow-bin":"^0.133.0","flow-copy-source":"^2.0.9",gitdown:"^3.1.3",husky:"^4.3.0",nyc:"^15.1.0","semantic-release":"^17.1.1"},engines:{node:">=8.0"},husky:{hooks:{"pre-commit":"npm run lint && npm run test && npm run build","pre-push":"gitdown ./.README/README.md --output-file ./README.md --check"}},keywords:["log","logger","json"],main:"./dist/log.js",name:"roarr",nyc:{include:["src/**/*.js"],instrument:!1,reporter:["text-lcov"],require:["@babel/register"],sourceMap:!1},license:"BSD-3-Clause",repository:{type:"git",url:"git@github.com:gajus/roarr.git"},scripts:{build:"rm -fr ./dist && NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps && flow-copy-source src dist","create-readme":"gitdown ./.README/README.md --output-file ./README.md",dev:"NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps --watch",lint:"eslint ./src ./test && flow",test:"NODE_ENV=test ava --serial --verbose"},version:"2.15.4"}});var Ht=f(me=>{"use strict";i();Object.defineProperty(me,"__esModule",{value:!0});me.default=void 0;var ei=r=>({write:e=>{r.write(e+`
1
+ import{a as Oo,b as vo,c as Br,d as Yr}from"./chunk-T7KHS6RF.js";import{d as yo}from"./chunk-RFJ2LI64.js";import{a as N,c as f,g as i}from"./chunk-VKWPEFWQ.js";var Wr=f(ie=>{"use strict";i();Object.defineProperty(ie,"__esModule",{value:!0});ie.boolean=void 0;var Ro=function(r){switch(Object.prototype.toString.call(r)){case"[object String]":return["true","t","yes","y","on","1"].includes(r.trim().toLowerCase());case"[object Number]":return r.valueOf()===1;case"[object Boolean]":return r.valueOf();default:return!1}};ie.boolean=Ro});var Kr=f(ae=>{"use strict";i();Object.defineProperty(ae,"__esModule",{value:!0});ae.isBooleanable=void 0;var _o=function(r){switch(Object.prototype.toString.call(r)){case"[object String]":return["true","t","yes","y","on","1","false","f","no","n","off","0"].includes(r.trim().toLowerCase());case"[object Number]":return[0,1].includes(r.valueOf());case"[object Boolean]":return!0;default:return!1}};ae.isBooleanable=_o});var ue=f(D=>{"use strict";i();Object.defineProperty(D,"__esModule",{value:!0});D.isBooleanable=D.boolean=void 0;var wo=Wr();Object.defineProperty(D,"boolean",{enumerable:!0,get:function(){return wo.boolean}});var Po=Kr();Object.defineProperty(D,"isBooleanable",{enumerable:!0,get:function(){return Po.isBooleanable}})});var le=f((Uc,Jr)=>{i();Jr.exports=Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"});var Ye=f((Xc,Qr)=>{"use strict";i();var Zr=Object.prototype.toString;Qr.exports=function(e){var t=Zr.call(e),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Zr.call(e.callee)==="[object Function]"),n}});var ut=f((Hc,at)=>{"use strict";i();var it;Object.keys||(H=Object.prototype.hasOwnProperty,ze=Object.prototype.toString,et=Ye(),We=Object.prototype.propertyIsEnumerable,rt=!We.call({toString:null},"toString"),tt=We.call(function(){},"prototype"),V=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],ce=function(r){var e=r.constructor;return e&&e.prototype===r},nt={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},st=(function(){if(typeof window>"u")return!1;for(var r in window)try{if(!nt["$"+r]&&H.call(window,r)&&window[r]!==null&&typeof window[r]=="object")try{ce(window[r])}catch{return!0}}catch{return!0}return!1})(),ot=function(r){if(typeof window>"u"||!st)return ce(r);try{return ce(r)}catch{return!1}},it=function(e){var t=e!==null&&typeof e=="object",n=ze.call(e)==="[object Function]",s=et(e),o=t&&ze.call(e)==="[object String]",a=[];if(!t&&!n&&!s)throw new TypeError("Object.keys called on a non-object");var c=tt&&n;if(o&&e.length>0&&!H.call(e,0))for(var l=0;l<e.length;++l)a.push(String(l));if(s&&e.length>0)for(var E=0;E<e.length;++E)a.push(String(E));else for(var u in e)!(c&&u==="prototype")&&H.call(e,u)&&a.push(String(u));if(rt)for(var p=ot(e),m=0;m<V.length;++m)!(p&&V[m]==="constructor")&&H.call(e,V[m])&&a.push(V[m]);return a});var H,ze,et,We,rt,tt,V,ce,nt,st,ot;at.exports=it});var pt=f((Bc,ft)=>{"use strict";i();var $o=Array.prototype.slice,Ao=Ye(),lt=Object.keys,fe=lt?function(e){return lt(e)}:ut(),ct=Object.keys;fe.shim=function(){if(Object.keys){var e=(function(){var t=Object.keys(arguments);return t&&t.length===arguments.length})(1,2);e||(Object.keys=function(n){return Ao(n)?ct($o.call(n)):ct(n)})}else Object.keys=fe;return Object.keys||fe};ft.exports=fe});var Et=f((zc,gt)=>{"use strict";i();var dt=Yr(),No=Oo(),j=vo(),ht=Br();gt.exports=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new j("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new j("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new j("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new j("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new j("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new j("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,c=arguments.length>6?arguments[6]:!1,l=!!ht&&ht(e,t);if(dt)dt(e,t,{configurable:a===null&&l?l.configurable:!a,enumerable:s===null&&l?l.enumerable:!s,value:n,writable:o===null&&l?l.writable:!o});else if(c||!s&&!o&&!a)e[t]=n;else throw new No("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var Ot=f((Kc,yt)=>{"use strict";i();var Ke=Yr(),mt=function(){return!!Ke};mt.hasArrayLengthDefineBug=function(){if(!Ke)return null;try{return Ke([],"length",{value:1}).length!==1}catch{return!0}};yt.exports=mt});var Je=f((Zc,_t)=>{"use strict";i();var To=pt(),Lo=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",So=Object.prototype.toString,Io=Array.prototype.concat,vt=Et(),qo=function(r){return typeof r=="function"&&So.call(r)==="[object Function]"},bt=Ot()(),xo=function(r,e,t,n){if(e in r){if(n===!0){if(r[e]===t)return}else if(!qo(n)||!n())return}bt?vt(r,e,t,!0):vt(r,e,t)},Rt=function(r,e){var t=arguments.length>2?arguments[2]:{},n=To(e);Lo&&(n=Io.call(n,Object.getOwnPropertySymbols(e)));for(var s=0;s<n.length;s+=1)xo(r,n[s],e[n[s]],t[n[s]])};Rt.supportsDescriptors=!!bt;_t.exports=Rt});var Ze=f((ef,wt)=>{"use strict";i();wt.exports=global});var Qe=f((tf,Pt)=>{"use strict";i();var Co=Ze();Pt.exports=function(){return typeof global!="object"||!global||global.Math!==Math||global.Array!==Array?Co:global}});var At=f((sf,$t)=>{"use strict";i();var Do=Je(),jo=Br(),Go=Qe();$t.exports=function(){var e=Go();if(Do.supportsDescriptors){var t=jo(e,"globalThis");(!t||t.configurable&&(t.enumerable||!t.writable||globalThis!==e))&&Object.defineProperty(e,"globalThis",{configurable:!0,enumerable:!1,value:e,writable:!0})}else(typeof globalThis!="object"||globalThis!==e)&&(e.globalThis=e);return e}});var er=f((af,Lt)=>{"use strict";i();var Mo=Je(),Uo=Ze(),Nt=Qe(),ko=At(),Xo=Nt(),Tt=function(){return Xo};Mo(Tt,{getPolyfill:Nt,implementation:Uo,shim:ko});Lt.exports=Tt});var qt=f((rr,It)=>{i();rr=It.exports=Fo;rr.getSerialize=St;function Fo(r,e,t,n){return JSON.stringify(r,St(e,n),t)}function St(r,e){var t=[],n=[];return e==null&&(e=function(s,o){return t[0]===o?"[Circular ~]":"[Circular ~."+n.slice(0,t.indexOf(o)).join(".")+"]"}),function(s,o){if(t.length>0){var a=t.indexOf(this);~a?t.splice(a+1):t.push(this),~a?n.splice(a,1/0,s):n.push(s),~t.indexOf(o)&&(o=e.call(this,s,o))}else t.push(o);return r==null?o:r.call(this,s,o)}}});var xt=f(pe=>{i();(function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(a){return n(o(a),arguments)}function t(a,c){return e.apply(null,[a].concat(c||[]))}function n(a,c){var l=1,E=a.length,u,p="",m,g,O,S,I,C,oe,q;for(m=0;m<E;m++)if(typeof a[m]=="string")p+=a[m];else if(typeof a[m]=="object"){if(O=a[m],O.keys)for(u=c[l],g=0;g<O.keys.length;g++){if(u==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',O.keys[g],O.keys[g-1]));u=u[O.keys[g]]}else O.param_no?u=c[O.param_no]:u=c[l++];if(r.not_type.test(O.type)&&r.not_primitive.test(O.type)&&u instanceof Function&&(u=u()),r.numeric_arg.test(O.type)&&typeof u!="number"&&isNaN(u))throw new TypeError(e("[sprintf] expecting number but found %T",u));switch(r.number.test(O.type)&&(oe=u>=0),O.type){case"b":u=parseInt(u,10).toString(2);break;case"c":u=String.fromCharCode(parseInt(u,10));break;case"d":case"i":u=parseInt(u,10);break;case"j":u=JSON.stringify(u,null,O.width?parseInt(O.width):0);break;case"e":u=O.precision?parseFloat(u).toExponential(O.precision):parseFloat(u).toExponential();break;case"f":u=O.precision?parseFloat(u).toFixed(O.precision):parseFloat(u);break;case"g":u=O.precision?String(Number(u.toPrecision(O.precision))):parseFloat(u);break;case"o":u=(parseInt(u,10)>>>0).toString(8);break;case"s":u=String(u),u=O.precision?u.substring(0,O.precision):u;break;case"t":u=String(!!u),u=O.precision?u.substring(0,O.precision):u;break;case"T":u=Object.prototype.toString.call(u).slice(8,-1).toLowerCase(),u=O.precision?u.substring(0,O.precision):u;break;case"u":u=parseInt(u,10)>>>0;break;case"v":u=u.valueOf(),u=O.precision?u.substring(0,O.precision):u;break;case"x":u=(parseInt(u,10)>>>0).toString(16);break;case"X":u=(parseInt(u,10)>>>0).toString(16).toUpperCase();break}r.json.test(O.type)?p+=u:(r.number.test(O.type)&&(!oe||O.sign)?(q=oe?"+":"-",u=u.toString().replace(r.sign,"")):q="",I=O.pad_char?O.pad_char==="0"?"0":O.pad_char.charAt(1):" ",C=O.width-(q+u).length,S=O.width&&C>0?I.repeat(C):"",p+=O.align?q+u+S:I==="0"?q+S+u:S+q+u)}return p}var s=Object.create(null);function o(a){if(s[a])return s[a];for(var c=a,l,E=[],u=0;c;){if((l=r.text.exec(c))!==null)E.push(l[0]);else if((l=r.modulo.exec(c))!==null)E.push("%");else if((l=r.placeholder.exec(c))!==null){if(l[2]){u|=1;var p=[],m=l[2],g=[];if((g=r.key.exec(m))!==null)for(p.push(g[1]);(m=m.substring(g[0].length))!=="";)if((g=r.key_access.exec(m))!==null)p.push(g[1]);else if((g=r.index_access.exec(m))!==null)p.push(g[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");l[2]=p}else u|=2;if(u===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");E.push({placeholder:l[0],param_no:l[1],keys:l[2],sign:l[3],pad_char:l[4],align:l[5],width:l[6],precision:l[7],type:l[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");c=c.substring(l[0].length)}return s[a]=E}typeof pe<"u"&&(pe.sprintf=e,pe.vsprintf=t),typeof window<"u"&&(window.sprintf=e,window.vsprintf=t,typeof define=="function"&&define.amd&&define(function(){return{sprintf:e,vsprintf:t}}))})()});var tr=f(de=>{"use strict";i();Object.defineProperty(de,"__esModule",{value:!0});de.logLevels=void 0;var Ho={debug:20,error:50,fatal:60,info:30,trace:10,warn:40};de.logLevels=Ho});var jt=f(ge=>{"use strict";i();Object.defineProperty(ge,"__esModule",{value:!0});ge.default=void 0;var Vo=ir(le()),Bo=ir(er()),Yo=ir(qt()),nr=xt(),Ct=tr();function ir(r){return r&&r.__esModule?r:{default:r}}function sr(){return sr=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},sr.apply(this,arguments)}function Dt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),t.push.apply(t,n)}return t}function w(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Dt(Object(t),!0).forEach(function(n){zo(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Dt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function zo(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var Wo=(0,Bo.default)(),B;Vo.default&&(B=N("domain"));var Ko=()=>{if(!B)return{};let r=[],e=process.domain;if(!e||!e.parentDomain)return{};for(;e&&e.parentDomain;)e=e.parentDomain,e.roarr&&e.roarr.context&&r.push(e.roarr.context);let t={};for(let n of r)t=w(w({},t),n);return t},he=()=>{if(!B)return{};let r=process.domain;if(r&&r.roarr&&r.roarr.context)return r.roarr.context;if(!r||!r.parentDomain)return{};for(;r&&r.parentDomain;)if(r=r.parentDomain,r.roarr&&r.roarr.context)return r.roarr.context;return{}},or=(r,e)=>{let t=(n,s,o,a,c,l,E,u,p,m)=>{let g=Date.now(),O=Wo.ROARR.sequence++,S,I;if(typeof n=="string"){S=w(w({},he()),e||{});let C=sr({},{a:n,b:s,c:o,d:a,e:c,f:l,g:E,h:u,i:p,k:m});I=Object.keys(C).map(Be=>C[Be]).reduce((Be,mo)=>Be+=typeof mo>"u"?0:1,0)===1?(0,nr.sprintf)("%s",n):(0,nr.sprintf)(n,s,o,a,c,l,E,u,p,m)}else{if(typeof s!="string")throw new TypeError("Message must be a string.");S=JSON.parse((0,Yo.default)(w(w(w({},he()),e||{}),n))),I=(0,nr.sprintf)(s,o,a,c,l,E,u,p,m)}r({context:S,message:I,sequence:O,time:g,version:"1.0.0"})};t.child=n=>typeof n=="function"?or(s=>{if(typeof n!="function")throw new TypeError("Unexpected state.");r(n(s))},e):or(r,w(w(w({},he()),e),n)),t.getContext=()=>w(w({},he()),e||{}),t.adopt=async(n,s)=>{if(!B)return n();let o=B.create();return o.run(()=>(o.roarr={context:w(w({},Ko()),s)},n()))};for(let n of Object.keys(Ct.logLevels))t[n]=(s,o,a,c,l,E,u,p,m,g)=>t.child({logLevel:Ct.logLevels[n]})(s,o,a,c,l,E,u,p,m,g);return t},Jo=or;ge.default=Jo});var Ut=f(Ee=>{"use strict";i();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.default=void 0;var Gt=tr(),Mt=(r,e)=>{let t=(n,s,o,a,c,l,E,u,p,m)=>{};t.adopt=async n=>n(),t.child=n=>Mt(r,e),t.getContext=()=>({});for(let n of Object.keys(Gt.logLevels))t[n]=(s,o,a,c,l,E,u,p,m,g)=>t.child({logLevel:Gt.logLevels[n]})(s,o,a,c,l,E,u,p,m,g);return t},Zo=Mt;Ee.default=Zo});var Xt=f((yf,kt)=>{i();kt.exports=function(e,t){for(var n=e.split("."),s=t.split("."),o=0;o<3;o++){var a=Number(n[o]),c=Number(s[o]);if(a>c)return 1;if(c>a)return-1;if(!isNaN(a)&&isNaN(c))return 1;if(isNaN(a)&&!isNaN(c))return-1}return 0}});var Ft=f((vf,Qo)=>{Qo.exports={author:{email:"gajus@gajus.com",name:"Gajus Kuizinas",url:"http://gajus.com"},ava:{babel:{compileAsTests:["test/helpers/**/*"]},files:["test/roarr/**/*"],require:["@babel/register"]},dependencies:{boolean:"^3.0.1","detect-node":"^2.0.4",globalthis:"^1.0.1","json-stringify-safe":"^5.0.1","semver-compare":"^1.0.0","sprintf-js":"^1.1.2"},description:"JSON logger for Node.js and browser.",devDependencies:{"@ava/babel":"^1.0.1","@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/node":"^7.10.5","@babel/plugin-transform-flow-strip-types":"^7.10.4","@babel/preset-env":"^7.11.5","@babel/register":"^7.11.5",ava:"^3.12.1","babel-plugin-istanbul":"^6.0.0","babel-plugin-transform-export-default-name":"^2.0.4",coveralls:"^3.1.0","domain-parent":"^1.0.0",eslint:"^7.9.0","eslint-config-canonical":"^24.1.1","flow-bin":"^0.133.0","flow-copy-source":"^2.0.9",gitdown:"^3.1.3",husky:"^4.3.0",nyc:"^15.1.0","semantic-release":"^17.1.1"},engines:{node:">=8.0"},husky:{hooks:{"pre-commit":"npm run lint && npm run test && npm run build","pre-push":"gitdown ./.README/README.md --output-file ./README.md --check"}},keywords:["log","logger","json"],main:"./dist/log.js",name:"roarr",nyc:{include:["src/**/*.js"],instrument:!1,reporter:["text-lcov"],require:["@babel/register"],sourceMap:!1},license:"BSD-3-Clause",repository:{type:"git",url:"git@github.com:gajus/roarr.git"},scripts:{build:"rm -fr ./dist && NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps && flow-copy-source src dist","create-readme":"gitdown ./.README/README.md --output-file ./README.md",dev:"NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps --watch",lint:"eslint ./src ./test && flow",test:"NODE_ENV=test ava --serial --verbose"},version:"2.15.4"}});var Ht=f(me=>{"use strict";i();Object.defineProperty(me,"__esModule",{value:!0});me.default=void 0;var ei=r=>({write:e=>{r.write(e+`
2
2
  `)}}),ri=()=>{let e=(process.env.ROARR_STREAM||"STDOUT").toUpperCase().toUpperCase()==="STDOUT"?process.stdout:process.stderr;return ei(e)},ti=ri;me.default=ti});var Bt=f(Oe=>{"use strict";i();Object.defineProperty(Oe,"__esModule",{value:!0});Oe.default=void 0;var ni=lr(le()),ar=lr(Xt()),ur=Ft(),si=lr(Ht());function lr(r){return r&&r.__esModule?r:{default:r}}function Vt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),t.push.apply(t,n)}return t}function ye(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Vt(Object(t),!0).forEach(function(n){oi(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Vt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function oi(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var ii=r=>{let e=(r.versions||[]).concat();e.sort(ar.default);let t=!e.length||(0,ar.default)(ur.version,e[e.length-1])===1;e.includes(ur.version)||e.push(ur.version),e.sort(ar.default);let n=ye(ye({sequence:0},r),{},{versions:e});return ni.default&&(t||!n.write)&&(n=ye(ye({},n),(0,si.default)())),n},ai=ii;Oe.default=ai});var Yt=f(Y=>{"use strict";i();Object.defineProperty(Y,"__esModule",{value:!0});Object.defineProperty(Y,"createLogger",{enumerable:!0,get:function(){return ui.default}});Object.defineProperty(Y,"createMockLogger",{enumerable:!0,get:function(){return li.default}});Object.defineProperty(Y,"createRoarrInititialGlobalState",{enumerable:!0,get:function(){return ci.default}});var ui=cr(jt()),li=cr(Ut()),ci=cr(Bt());function cr(r){return r&&r.__esModule?r:{default:r}}});var Jt=f(G=>{"use strict";i();Object.defineProperty(G,"__esModule",{value:!0});G.default=G.ROARR=void 0;var fi=ue(),pi=Wt(le()),di=Wt(er()),pr=Yt();function Wt(r){return r&&r.__esModule?r:{default:r}}var zt=(0,di.default)(),fr=zt.ROARR=(0,pr.createRoarrInititialGlobalState)(zt.ROARR||{});G.ROARR=fr;var Kt=pr.createLogger;pi.default&&((0,fi.boolean)(process.env.ROARR_LOG||"")||(Kt=pr.createMockLogger));var hi=Kt(r=>{if(fr.write){let e=JSON.stringify(r);fr.write(e)}});G.default=hi});var z=f(ve=>{"use strict";i();Object.defineProperty(ve,"__esModule",{value:!0});ve.default=void 0;var gi=Ei(Jt());function Ei(r){return r&&r.__esModule?r:{default:r}}var mi=gi.default.child({package:"global-agent"}),yi=mi;ve.default=yi});var W=f((Sf,Zt)=>{i();var Oi="2.0.0",vi=Number.MAX_SAFE_INTEGER||9007199254740991,bi=16,Ri=250,_i=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Zt.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:bi,MAX_SAFE_BUILD_LENGTH:Ri,MAX_SAFE_INTEGER:vi,RELEASE_TYPES:_i,SEMVER_SPEC_VERSION:Oi,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var K=f((qf,Qt)=>{i();var wi=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};Qt.exports=wi});var M=f((L,en)=>{i();var{MAX_SAFE_COMPONENT_LENGTH:dr,MAX_SAFE_BUILD_LENGTH:Pi,MAX_LENGTH:$i}=W(),Ai=K();L=en.exports={};var Ni=L.re=[],Ti=L.safeRe=[],d=L.src=[],h=L.t={},Li=0,hr="[a-zA-Z0-9-]",Si=[["\\s",1],["\\d",$i],[hr,Pi]],Ii=r=>{for(let[e,t]of Si)r=r.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return r},y=(r,e,t)=>{let n=Ii(e),s=Li++;Ai(r,s,e),h[r]=s,d[s]=e,Ni[s]=new RegExp(e,t?"g":void 0),Ti[s]=new RegExp(n,t?"g":void 0)};y("NUMERICIDENTIFIER","0|[1-9]\\d*");y("NUMERICIDENTIFIERLOOSE","\\d+");y("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${hr}*`);y("MAINVERSION",`(${d[h.NUMERICIDENTIFIER]})\\.(${d[h.NUMERICIDENTIFIER]})\\.(${d[h.NUMERICIDENTIFIER]})`);y("MAINVERSIONLOOSE",`(${d[h.NUMERICIDENTIFIERLOOSE]})\\.(${d[h.NUMERICIDENTIFIERLOOSE]})\\.(${d[h.NUMERICIDENTIFIERLOOSE]})`);y("PRERELEASEIDENTIFIER",`(?:${d[h.NUMERICIDENTIFIER]}|${d[h.NONNUMERICIDENTIFIER]})`);y("PRERELEASEIDENTIFIERLOOSE",`(?:${d[h.NUMERICIDENTIFIERLOOSE]}|${d[h.NONNUMERICIDENTIFIER]})`);y("PRERELEASE",`(?:-(${d[h.PRERELEASEIDENTIFIER]}(?:\\.${d[h.PRERELEASEIDENTIFIER]})*))`);y("PRERELEASELOOSE",`(?:-?(${d[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${d[h.PRERELEASEIDENTIFIERLOOSE]})*))`);y("BUILDIDENTIFIER",`${hr}+`);y("BUILD",`(?:\\+(${d[h.BUILDIDENTIFIER]}(?:\\.${d[h.BUILDIDENTIFIER]})*))`);y("FULLPLAIN",`v?${d[h.MAINVERSION]}${d[h.PRERELEASE]}?${d[h.BUILD]}?`);y("FULL",`^${d[h.FULLPLAIN]}$`);y("LOOSEPLAIN",`[v=\\s]*${d[h.MAINVERSIONLOOSE]}${d[h.PRERELEASELOOSE]}?${d[h.BUILD]}?`);y("LOOSE",`^${d[h.LOOSEPLAIN]}$`);y("GTLT","((?:<|>)?=?)");y("XRANGEIDENTIFIERLOOSE",`${d[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);y("XRANGEIDENTIFIER",`${d[h.NUMERICIDENTIFIER]}|x|X|\\*`);y("XRANGEPLAIN",`[v=\\s]*(${d[h.XRANGEIDENTIFIER]})(?:\\.(${d[h.XRANGEIDENTIFIER]})(?:\\.(${d[h.XRANGEIDENTIFIER]})(?:${d[h.PRERELEASE]})?${d[h.BUILD]}?)?)?`);y("XRANGEPLAINLOOSE",`[v=\\s]*(${d[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[h.XRANGEIDENTIFIERLOOSE]})(?:${d[h.PRERELEASELOOSE]})?${d[h.BUILD]}?)?)?`);y("XRANGE",`^${d[h.GTLT]}\\s*${d[h.XRANGEPLAIN]}$`);y("XRANGELOOSE",`^${d[h.GTLT]}\\s*${d[h.XRANGEPLAINLOOSE]}$`);y("COERCEPLAIN",`(^|[^\\d])(\\d{1,${dr}})(?:\\.(\\d{1,${dr}}))?(?:\\.(\\d{1,${dr}}))?`);y("COERCE",`${d[h.COERCEPLAIN]}(?:$|[^\\d])`);y("COERCEFULL",d[h.COERCEPLAIN]+`(?:${d[h.PRERELEASE]})?(?:${d[h.BUILD]})?(?:$|[^\\d])`);y("COERCERTL",d[h.COERCE],!0);y("COERCERTLFULL",d[h.COERCEFULL],!0);y("LONETILDE","(?:~>?)");y("TILDETRIM",`(\\s*)${d[h.LONETILDE]}\\s+`,!0);L.tildeTrimReplace="$1~";y("TILDE",`^${d[h.LONETILDE]}${d[h.XRANGEPLAIN]}$`);y("TILDELOOSE",`^${d[h.LONETILDE]}${d[h.XRANGEPLAINLOOSE]}$`);y("LONECARET","(?:\\^)");y("CARETTRIM",`(\\s*)${d[h.LONECARET]}\\s+`,!0);L.caretTrimReplace="$1^";y("CARET",`^${d[h.LONECARET]}${d[h.XRANGEPLAIN]}$`);y("CARETLOOSE",`^${d[h.LONECARET]}${d[h.XRANGEPLAINLOOSE]}$`);y("COMPARATORLOOSE",`^${d[h.GTLT]}\\s*(${d[h.LOOSEPLAIN]})$|^$`);y("COMPARATOR",`^${d[h.GTLT]}\\s*(${d[h.FULLPLAIN]})$|^$`);y("COMPARATORTRIM",`(\\s*)${d[h.GTLT]}\\s*(${d[h.LOOSEPLAIN]}|${d[h.XRANGEPLAIN]})`,!0);L.comparatorTrimReplace="$1$2$3";y("HYPHENRANGE",`^\\s*(${d[h.XRANGEPLAIN]})\\s+-\\s+(${d[h.XRANGEPLAIN]})\\s*$`);y("HYPHENRANGELOOSE",`^\\s*(${d[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${d[h.XRANGEPLAINLOOSE]})\\s*$`);y("STAR","(<|>)?=?\\s*\\*");y("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");y("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var be=f((Df,rn)=>{i();var qi=Object.freeze({loose:!0}),xi=Object.freeze({}),Ci=r=>r?typeof r!="object"?qi:r:xi;rn.exports=Ci});var gr=f((Gf,sn)=>{i();var tn=/^[0-9]+$/,nn=(r,e)=>{let t=tn.test(r),n=tn.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},Di=(r,e)=>nn(e,r);sn.exports={compareIdentifiers:nn,rcompareIdentifiers:Di}});var b=f((Uf,ln)=>{i();var Re=K(),{MAX_LENGTH:on,MAX_SAFE_INTEGER:_e}=W(),{safeRe:an,t:un}=M(),ji=be(),{compareIdentifiers:U}=gr(),Er=class r{constructor(e,t){if(t=ji(t),e instanceof r){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>on)throw new TypeError(`version is longer than ${on} characters`);Re("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?an[un.LOOSE]:an[un.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>_e||this.major<0)throw new TypeError("Invalid major version");if(this.minor>_e||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>_e||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let o=+s;if(o>=0&&o<_e)return o}return s}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Re("SemVer.compare",this.version,this.options,e),!(e instanceof r)){if(typeof e=="string"&&e===this.version)return 0;e=new r(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof r||(e=new r(e,this.options)),U(this.major,e.major)||U(this.minor,e.minor)||U(this.patch,e.patch)}comparePre(e){if(e instanceof r||(e=new r(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let n=this.prerelease[t],s=e.prerelease[t];if(Re("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return U(n,s)}while(++t)}compareBuild(e){e instanceof r||(e=new r(e,this.options));let t=0;do{let n=this.build[t],s=e.build[t];if(Re("build compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return U(n,s)}while(++t)}inc(e,t,n){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let s=Number(n)?1:0;if(!t&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[s];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(t===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(t){let o=[t,s];n===!1&&(o=[t]),U(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};ln.exports=Er});var x=f((Xf,fn)=>{i();var cn=b(),Gi=(r,e,t=!1)=>{if(r instanceof cn)return r;try{return new cn(r,e)}catch(n){if(!t)return null;throw n}};fn.exports=Gi});var dn=f((Hf,pn)=>{i();var Mi=x(),Ui=(r,e)=>{let t=Mi(r,e);return t?t.version:null};pn.exports=Ui});var gn=f((Bf,hn)=>{i();var ki=x(),Xi=(r,e)=>{let t=ki(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};hn.exports=Xi});var yn=f((zf,mn)=>{i();var En=b(),Fi=(r,e,t,n,s)=>{typeof t=="string"&&(s=n,n=t,t=void 0);try{return new En(r instanceof En?r.version:r,t).inc(e,n,s).version}catch{return null}};mn.exports=Fi});var bn=f((Kf,vn)=>{i();var On=x(),Hi=(r,e)=>{let t=On(r,null,!0),n=On(e,null,!0),s=t.compare(n);if(s===0)return null;let o=s>0,a=o?t:n,c=o?n:t,l=!!a.prerelease.length;if(!!c.prerelease.length&&!l)return!c.patch&&!c.minor?"major":a.patch?"patch":a.minor?"minor":"major";let u=l?"pre":"";return t.major!==n.major?u+"major":t.minor!==n.minor?u+"minor":t.patch!==n.patch?u+"patch":"prerelease"};vn.exports=Hi});var _n=f((Zf,Rn)=>{i();var Vi=b(),Bi=(r,e)=>new Vi(r,e).major;Rn.exports=Bi});var Pn=f((ep,wn)=>{i();var Yi=b(),zi=(r,e)=>new Yi(r,e).minor;wn.exports=zi});var An=f((tp,$n)=>{i();var Wi=b(),Ki=(r,e)=>new Wi(r,e).patch;$n.exports=Ki});var Tn=f((sp,Nn)=>{i();var Ji=x(),Zi=(r,e)=>{let t=Ji(r,e);return t&&t.prerelease.length?t.prerelease:null};Nn.exports=Zi});var $=f((ip,Sn)=>{i();var Ln=b(),Qi=(r,e,t)=>new Ln(r,t).compare(new Ln(e,t));Sn.exports=Qi});var qn=f((up,In)=>{i();var ea=$(),ra=(r,e,t)=>ea(e,r,t);In.exports=ra});var Cn=f((cp,xn)=>{i();var ta=$(),na=(r,e)=>ta(r,e,!0);xn.exports=na});var we=f((pp,jn)=>{i();var Dn=b(),sa=(r,e,t)=>{let n=new Dn(r,t),s=new Dn(e,t);return n.compare(s)||n.compareBuild(s)};jn.exports=sa});var Mn=f((hp,Gn)=>{i();var oa=we(),ia=(r,e)=>r.sort((t,n)=>oa(t,n,e));Gn.exports=ia});var kn=f((Ep,Un)=>{i();var aa=we(),ua=(r,e)=>r.sort((t,n)=>aa(n,t,e));Un.exports=ua});var J=f((yp,Xn)=>{i();var la=$(),ca=(r,e,t)=>la(r,e,t)>0;Xn.exports=ca});var Pe=f((vp,Fn)=>{i();var fa=$(),pa=(r,e,t)=>fa(r,e,t)<0;Fn.exports=pa});var mr=f((Rp,Hn)=>{i();var da=$(),ha=(r,e,t)=>da(r,e,t)===0;Hn.exports=ha});var yr=f((wp,Vn)=>{i();var ga=$(),Ea=(r,e,t)=>ga(r,e,t)!==0;Vn.exports=Ea});var $e=f(($p,Bn)=>{i();var ma=$(),ya=(r,e,t)=>ma(r,e,t)>=0;Bn.exports=ya});var Ae=f((Np,Yn)=>{i();var Oa=$(),va=(r,e,t)=>Oa(r,e,t)<=0;Yn.exports=va});var Or=f((Lp,zn)=>{i();var ba=mr(),Ra=yr(),_a=J(),wa=$e(),Pa=Pe(),$a=Ae(),Aa=(r,e,t,n)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return ba(r,t,n);case"!=":return Ra(r,t,n);case">":return _a(r,t,n);case">=":return wa(r,t,n);case"<":return Pa(r,t,n);case"<=":return $a(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};zn.exports=Aa});var Kn=f((Ip,Wn)=>{i();var Na=b(),Ta=x(),{safeRe:Ne,t:Te}=M(),La=(r,e)=>{if(r instanceof Na)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(e.includePrerelease?Ne[Te.COERCEFULL]:Ne[Te.COERCE]);else{let l=e.includePrerelease?Ne[Te.COERCERTLFULL]:Ne[Te.COERCERTL],E;for(;(E=l.exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||E.index+E[0].length!==t.index+t[0].length)&&(t=E),l.lastIndex=E.index+E[1].length+E[2].length;l.lastIndex=-1}if(t===null)return null;let n=t[2],s=t[3]||"0",o=t[4]||"0",a=e.includePrerelease&&t[5]?`-${t[5]}`:"",c=e.includePrerelease&&t[6]?`+${t[6]}`:"";return Ta(`${n}.${s}.${o}${a}${c}`,e)};Wn.exports=La});var Zn=f((xp,Jn)=>{i();var vr=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let s=this.map.keys().next().value;this.delete(s)}this.map.set(e,t)}return this}};Jn.exports=vr});var A=f((Dp,ts)=>{i();var Sa=/\s+/g,br=class r{constructor(e,t){if(t=qa(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof Rr)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(Sa," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!es(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&Ua(s[0])){this.set=[s];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let n=0;n<t.length;n++)n>0&&(this.formatted+=" "),this.formatted+=t[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&Ga)|(this.options.loose&&Ma))+":"+e,s=Qn.get(n);if(s)return s;let o=this.options.loose,a=o?P[R.HYPHENRANGELOOSE]:P[R.HYPHENRANGE];e=e.replace(a,Ka(this.options.includePrerelease)),v("hyphen replace",e),e=e.replace(P[R.COMPARATORTRIM],Ca),v("comparator trim",e),e=e.replace(P[R.TILDETRIM],Da),v("tilde trim",e),e=e.replace(P[R.CARETTRIM],ja),v("caret trim",e);let c=e.split(" ").map(p=>ka(p,this.options)).join(" ").split(/\s+/).map(p=>Wa(p,this.options));o&&(c=c.filter(p=>(v("loose invalid filter",p,this.options),!!p.match(P[R.COMPARATORLOOSE])))),v("range list",c);let l=new Map,E=c.map(p=>new Rr(p,this.options));for(let p of E){if(es(p))return[p];l.set(p.value,p)}l.size>1&&l.has("")&&l.delete("");let u=[...l.values()];return Qn.set(n,u),u}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some(n=>rs(n,t)&&e.set.some(s=>rs(s,t)&&n.every(o=>s.every(a=>o.intersects(a,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new xa(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(Ja(this.set[t],e,this.options))return!0;return!1}};ts.exports=br;var Ia=Zn(),Qn=new Ia,qa=be(),Rr=Z(),v=K(),xa=b(),{safeRe:P,t:R,comparatorTrimReplace:Ca,tildeTrimReplace:Da,caretTrimReplace:ja}=M(),{FLAG_INCLUDE_PRERELEASE:Ga,FLAG_LOOSE:Ma}=W(),es=r=>r.value==="<0.0.0-0",Ua=r=>r.value==="",rs=(r,e)=>{let t=!0,n=r.slice(),s=n.pop();for(;t&&n.length;)t=n.every(o=>s.intersects(o,e)),s=n.pop();return t},ka=(r,e)=>(v("comp",r,e),r=Ha(r,e),v("caret",r),r=Xa(r,e),v("tildes",r),r=Ba(r,e),v("xrange",r),r=za(r,e),v("stars",r),r),_=r=>!r||r.toLowerCase()==="x"||r==="*",Xa=(r,e)=>r.trim().split(/\s+/).map(t=>Fa(t,e)).join(" "),Fa=(r,e)=>{let t=e.loose?P[R.TILDELOOSE]:P[R.TILDE];return r.replace(t,(n,s,o,a,c)=>{v("tilde",r,n,s,o,a,c);let l;return _(s)?l="":_(o)?l=`>=${s}.0.0 <${+s+1}.0.0-0`:_(a)?l=`>=${s}.${o}.0 <${s}.${+o+1}.0-0`:c?(v("replaceTilde pr",c),l=`>=${s}.${o}.${a}-${c} <${s}.${+o+1}.0-0`):l=`>=${s}.${o}.${a} <${s}.${+o+1}.0-0`,v("tilde return",l),l})},Ha=(r,e)=>r.trim().split(/\s+/).map(t=>Va(t,e)).join(" "),Va=(r,e)=>{v("caret",r,e);let t=e.loose?P[R.CARETLOOSE]:P[R.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(s,o,a,c,l)=>{v("caret",r,s,o,a,c,l);let E;return _(o)?E="":_(a)?E=`>=${o}.0.0${n} <${+o+1}.0.0-0`:_(c)?o==="0"?E=`>=${o}.${a}.0${n} <${o}.${+a+1}.0-0`:E=`>=${o}.${a}.0${n} <${+o+1}.0.0-0`:l?(v("replaceCaret pr",l),o==="0"?a==="0"?E=`>=${o}.${a}.${c}-${l} <${o}.${a}.${+c+1}-0`:E=`>=${o}.${a}.${c}-${l} <${o}.${+a+1}.0-0`:E=`>=${o}.${a}.${c}-${l} <${+o+1}.0.0-0`):(v("no pr"),o==="0"?a==="0"?E=`>=${o}.${a}.${c}${n} <${o}.${a}.${+c+1}-0`:E=`>=${o}.${a}.${c}${n} <${o}.${+a+1}.0-0`:E=`>=${o}.${a}.${c} <${+o+1}.0.0-0`),v("caret return",E),E})},Ba=(r,e)=>(v("replaceXRanges",r,e),r.split(/\s+/).map(t=>Ya(t,e)).join(" ")),Ya=(r,e)=>{r=r.trim();let t=e.loose?P[R.XRANGELOOSE]:P[R.XRANGE];return r.replace(t,(n,s,o,a,c,l)=>{v("xRange",r,n,s,o,a,c,l);let E=_(o),u=E||_(a),p=u||_(c),m=p;return s==="="&&m&&(s=""),l=e.includePrerelease?"-0":"",E?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&m?(u&&(a=0),c=0,s===">"?(s=">=",u?(o=+o+1,a=0,c=0):(a=+a+1,c=0)):s==="<="&&(s="<",u?o=+o+1:a=+a+1),s==="<"&&(l="-0"),n=`${s+o}.${a}.${c}${l}`):u?n=`>=${o}.0.0${l} <${+o+1}.0.0-0`:p&&(n=`>=${o}.${a}.0${l} <${o}.${+a+1}.0-0`),v("xRange return",n),n})},za=(r,e)=>(v("replaceStars",r,e),r.trim().replace(P[R.STAR],"")),Wa=(r,e)=>(v("replaceGTE0",r,e),r.trim().replace(P[e.includePrerelease?R.GTE0PRE:R.GTE0],"")),Ka=r=>(e,t,n,s,o,a,c,l,E,u,p,m)=>(_(n)?t="":_(s)?t=`>=${n}.0.0${r?"-0":""}`:_(o)?t=`>=${n}.${s}.0${r?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,_(E)?l="":_(u)?l=`<${+E+1}.0.0-0`:_(p)?l=`<${E}.${+u+1}.0-0`:m?l=`<=${E}.${u}.${p}-${m}`:r?l=`<${E}.${u}.${+p+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),Ja=(r,e,t)=>{for(let n=0;n<r.length;n++)if(!r[n].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let n=0;n<r.length;n++)if(v(r[n].semver),r[n].semver!==Rr.ANY&&r[n].semver.prerelease.length>0){let s=r[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}});var Z=f((Gp,us)=>{i();var Q=Symbol("SemVer ANY"),Pr=class r{static get ANY(){return Q}constructor(e,t){if(t=ns(t),e instanceof r){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),wr("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Q?this.value="":this.value=this.operator+this.semver.version,wr("comp",this)}parse(e){let t=this.options.loose?ss[os.COMPARATORLOOSE]:ss[os.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new is(n[2],this.options.loose):this.semver=Q}toString(){return this.value}test(e){if(wr("Comparator.test",e,this.options.loose),this.semver===Q||e===Q)return!0;if(typeof e=="string")try{e=new is(e,this.options)}catch{return!1}return _r(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new as(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new as(this.value,t).test(e.semver):(t=ns(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||_r(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||_r(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};us.exports=Pr;var ns=be(),{safeRe:ss,t:os}=M(),_r=Or(),wr=K(),is=b(),as=A()});var ee=f((Up,ls)=>{i();var Za=A(),Qa=(r,e,t)=>{try{e=new Za(e,t)}catch{return!1}return e.test(r)};ls.exports=Qa});var fs=f((Xp,cs)=>{i();var eu=A(),ru=(r,e)=>new eu(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));cs.exports=ru});var ds=f((Hp,ps)=>{i();var tu=b(),nu=A(),su=(r,e,t)=>{let n=null,s=null,o=null;try{o=new nu(e,t)}catch{return null}return r.forEach(a=>{o.test(a)&&(!n||s.compare(a)===-1)&&(n=a,s=new tu(n,t))}),n};ps.exports=su});var gs=f((Bp,hs)=>{i();var ou=b(),iu=A(),au=(r,e,t)=>{let n=null,s=null,o=null;try{o=new iu(e,t)}catch{return null}return r.forEach(a=>{o.test(a)&&(!n||s.compare(a)===1)&&(n=a,s=new ou(n,t))}),n};hs.exports=au});var ys=f((zp,ms)=>{i();var $r=b(),uu=A(),Es=J(),lu=(r,e)=>{r=new uu(r,e);let t=new $r("0.0.0");if(r.test(t)||(t=new $r("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n<r.set.length;++n){let s=r.set[n],o=null;s.forEach(a=>{let c=new $r(a.semver.version);switch(a.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!o||Es(c,o))&&(o=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),o&&(!t||Es(t,o))&&(t=o)}return t&&r.test(t)?t:null};ms.exports=lu});var vs=f((Kp,Os)=>{i();var cu=A(),fu=(r,e)=>{try{return new cu(r,e).range||"*"}catch{return null}};Os.exports=fu});var Le=f((Zp,ws)=>{i();var pu=b(),_s=Z(),{ANY:du}=_s,hu=A(),gu=ee(),bs=J(),Rs=Pe(),Eu=Ae(),mu=$e(),yu=(r,e,t,n)=>{r=new pu(r,n),e=new hu(e,n);let s,o,a,c,l;switch(t){case">":s=bs,o=Eu,a=Rs,c=">",l=">=";break;case"<":s=Rs,o=mu,a=bs,c="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(gu(r,e,n))return!1;for(let E=0;E<e.set.length;++E){let u=e.set[E],p=null,m=null;if(u.forEach(g=>{g.semver===du&&(g=new _s(">=0.0.0")),p=p||g,m=m||g,s(g.semver,p.semver,n)?p=g:a(g.semver,m.semver,n)&&(m=g)}),p.operator===c||p.operator===l||(!m.operator||m.operator===c)&&o(r,m.semver))return!1;if(m.operator===l&&a(r,m.semver))return!1}return!0};ws.exports=yu});var $s=f((ed,Ps)=>{i();var Ou=Le(),vu=(r,e,t)=>Ou(r,e,">",t);Ps.exports=vu});var Ns=f((td,As)=>{i();var bu=Le(),Ru=(r,e,t)=>bu(r,e,"<",t);As.exports=Ru});var Ss=f((sd,Ls)=>{i();var Ts=A(),_u=(r,e,t)=>(r=new Ts(r,t),e=new Ts(e,t),r.intersects(e,t));Ls.exports=_u});var qs=f((id,Is)=>{i();var wu=ee(),Pu=$();Is.exports=(r,e,t)=>{let n=[],s=null,o=null,a=r.sort((u,p)=>Pu(u,p,t));for(let u of a)wu(u,e,t)?(o=u,s||(s=u)):(o&&n.push([s,o]),o=null,s=null);s&&n.push([s,null]);let c=[];for(let[u,p]of n)u===p?c.push(u):!p&&u===a[0]?c.push("*"):p?u===a[0]?c.push(`<=${p}`):c.push(`${u} - ${p}`):c.push(`>=${u}`);let l=c.join(" || "),E=typeof e.raw=="string"?e.raw:String(e);return l.length<E.length?l:e}});var Ms=f((ud,Gs)=>{i();var xs=A(),Nr=Z(),{ANY:Ar}=Nr,re=ee(),Tr=$(),$u=(r,e,t={})=>{if(r===e)return!0;r=new xs(r,t),e=new xs(e,t);let n=!1;e:for(let s of r.set){for(let o of e.set){let a=Nu(s,o,t);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},Au=[new Nr(">=0.0.0-0")],Cs=[new Nr(">=0.0.0")],Nu=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===Ar){if(e.length===1&&e[0].semver===Ar)return!0;t.includePrerelease?r=Au:r=Cs}if(e.length===1&&e[0].semver===Ar){if(t.includePrerelease)return!0;e=Cs}let n=new Set,s,o;for(let g of r)g.operator===">"||g.operator===">="?s=Ds(s,g,t):g.operator==="<"||g.operator==="<="?o=js(o,g,t):n.add(g.semver);if(n.size>1)return null;let a;if(s&&o){if(a=Tr(s.semver,o.semver,t),a>0)return null;if(a===0&&(s.operator!==">="||o.operator!=="<="))return null}for(let g of n){if(s&&!re(g,String(s),t)||o&&!re(g,String(o),t))return null;for(let O of e)if(!re(g,String(O),t))return!1;return!0}let c,l,E,u,p=o&&!t.includePrerelease&&o.semver.prerelease.length?o.semver:!1,m=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1;p&&p.prerelease.length===1&&o.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let g of e){if(u=u||g.operator===">"||g.operator===">=",E=E||g.operator==="<"||g.operator==="<=",s){if(m&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===m.major&&g.semver.minor===m.minor&&g.semver.patch===m.patch&&(m=!1),g.operator===">"||g.operator===">="){if(c=Ds(s,g,t),c===g&&c!==s)return!1}else if(s.operator===">="&&!re(s.semver,String(g),t))return!1}if(o){if(p&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===p.major&&g.semver.minor===p.minor&&g.semver.patch===p.patch&&(p=!1),g.operator==="<"||g.operator==="<="){if(l=js(o,g,t),l===g&&l!==o)return!1}else if(o.operator==="<="&&!re(o.semver,String(g),t))return!1}if(!g.operator&&(o||s)&&a!==0)return!1}return!(s&&E&&!o&&a!==0||o&&u&&!s&&a!==0||m||p)},Ds=(r,e,t)=>{if(!r)return e;let n=Tr(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},js=(r,e,t)=>{if(!r)return e;let n=Tr(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};Gs.exports=$u});var Fs=f((cd,Xs)=>{i();var Lr=M(),Us=W(),Tu=b(),ks=gr(),Lu=x(),Su=dn(),Iu=gn(),qu=yn(),xu=bn(),Cu=_n(),Du=Pn(),ju=An(),Gu=Tn(),Mu=$(),Uu=qn(),ku=Cn(),Xu=we(),Fu=Mn(),Hu=kn(),Vu=J(),Bu=Pe(),Yu=mr(),zu=yr(),Wu=$e(),Ku=Ae(),Ju=Or(),Zu=Kn(),Qu=Z(),el=A(),rl=ee(),tl=fs(),nl=ds(),sl=gs(),ol=ys(),il=vs(),al=Le(),ul=$s(),ll=Ns(),cl=Ss(),fl=qs(),pl=Ms();Xs.exports={parse:Lu,valid:Su,clean:Iu,inc:qu,diff:xu,major:Cu,minor:Du,patch:ju,prerelease:Gu,compare:Mu,rcompare:Uu,compareLoose:ku,compareBuild:Xu,sort:Fu,rsort:Hu,gt:Vu,lt:Bu,eq:Yu,neq:zu,gte:Wu,lte:Ku,cmp:Ju,coerce:Zu,Comparator:Qu,Range:el,satisfies:rl,toComparators:tl,maxSatisfying:nl,minSatisfying:sl,minVersion:ol,validRange:il,outside:al,gtr:ul,ltr:ll,intersects:cl,simplifyRange:fl,subset:pl,SemVer:Tu,re:Lr.re,src:Lr.src,tokens:Lr.t,SEMVER_SPEC_VERSION:Us.SEMVER_SPEC_VERSION,RELEASE_TYPES:Us.RELEASE_TYPES,compareIdentifiers:ks.compareIdentifiers,rcompareIdentifiers:ks.rcompareIdentifiers}});var Vs=f((pd,Hs)=>{"use strict";i();var Sr=class r extends Error{constructor(e){super(r._prepareSuperMessage(e)),Object.defineProperty(this,"name",{value:"NonError",configurable:!0,writable:!0}),Error.captureStackTrace&&Error.captureStackTrace(this,r)}static _prepareSuperMessage(e){try{return JSON.stringify(e)}catch{return String(e)}}},dl=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0}],Ir=({from:r,seen:e,to_:t,forceEnumerable:n})=>{let s=t||(Array.isArray(r)?[]:{});e.push(r);for(let[o,a]of Object.entries(r))if(typeof a!="function"){if(!a||typeof a!="object"){s[o]=a;continue}if(!e.includes(r[o])){s[o]=Ir({from:r[o],seen:e.slice(),forceEnumerable:n});continue}s[o]="[Circular]"}for(let{property:o,enumerable:a}of dl)typeof r[o]=="string"&&Object.defineProperty(s,o,{value:r[o],enumerable:n?!0:a,configurable:!0,writable:!0});return s},hl=r=>typeof r=="object"&&r!==null?Ir({from:r,seen:[],forceEnumerable:!0}):typeof r=="function"?`[Function: ${r.name||"anonymous"}]`:r,gl=r=>{if(r instanceof Error)return r;if(typeof r=="object"&&r!==null&&!Array.isArray(r)){let e=new Error;return Ir({from:r,seen:[],to_:e}),e}return new Sr(r)};Hs.exports={serializeError:hl,deserializeError:gl}});var Ie=f(Se=>{"use strict";i();Object.defineProperty(Se,"__esModule",{value:!0});Se.default=void 0;var Bs=Vs(),El=ue(),ml=yl(z());function yl(r){return r&&r.__esModule?r:{default:r}}var T=ml.default.child({namespace:"Agent"}),Ol=0,qr=class{constructor(e,t,n,s,o){this.fallbackAgent=s,this.isProxyConfigured=e,this.mustUrlUseProxy=t,this.getUrlProxy=n,this.socketConnectionTimeout=o}addRequest(e,t){let n;if(e.path.startsWith("http://")||e.path.startsWith("https://")?n=e.path:n=this.protocol+"//"+(t.hostname||t.host)+(t.port===80||t.port===443?"":":"+t.port)+e.path,!this.isProxyConfigured()){T.trace({destination:n},"not proxying request; GLOBAL_AGENT.HTTP_PROXY is not configured"),this.fallbackAgent.addRequest(e,t);return}if(!this.mustUrlUseProxy(n)){T.trace({destination:n},"not proxying request; url matches GLOBAL_AGENT.NO_PROXY"),this.fallbackAgent.addRequest(e,t);return}let s=Ol++,o=this.getUrlProxy(n);this.protocol==="http:"&&(e.path=n,o.authorization&&e.setHeader("proxy-authorization","Basic "+Buffer.from(o.authorization).toString("base64"))),T.trace({destination:n,proxy:"http://"+o.hostname+":"+o.port,requestId:s},"proxying request"),e.on("error",c=>{T.error({error:(0,Bs.serializeError)(c)},"request error")}),e.once("response",c=>{T.trace({headers:c.headers,requestId:s,statusCode:c.statusCode},"proxying response")}),e.shouldKeepAlive=!1;let a={host:t.hostname||t.host,port:t.port||80,proxy:o,tls:{}};this.protocol==="https:"&&(a.tls={ca:t.ca,cert:t.cert,ciphers:t.ciphers,clientCertEngine:t.clientCertEngine,crl:t.crl,dhparam:t.dhparam,ecdhCurve:t.ecdhCurve,honorCipherOrder:t.honorCipherOrder,key:t.key,passphrase:t.passphrase,pfx:t.pfx,rejectUnauthorized:t.rejectUnauthorized,secureOptions:t.secureOptions,secureProtocol:t.secureProtocol,servername:t.servername||a.host,sessionIdContext:t.sessionIdContext},typeof process.env.NODE_TLS_REJECT_UNAUTHORIZED=="string"&&(0,El.boolean)(process.env.NODE_TLS_REJECT_UNAUTHORIZED)===!1&&(a.tls.rejectUnauthorized=!1)),this.createConnection(a,(c,l)=>{T.trace({target:a},"connecting"),l&&(l.setTimeout(this.socketConnectionTimeout,()=>{l.destroy()}),l.once("connect",()=>{T.trace({target:a},"connected"),l.setTimeout(0)}),l.once("secureConnect",()=>{T.trace({target:a},"connected (secure)"),l.setTimeout(0)})),c?e.emit("error",c):(T.debug("created socket"),l.on("error",E=>{T.error({error:(0,Bs.serializeError)(E)},"socket error")}),e.onSocket(l))})}},vl=qr;Se.default=vl});var zs=f(qe=>{"use strict";i();Object.defineProperty(qe,"__esModule",{value:!0});qe.default=void 0;var bl=Ys(N("net")),Rl=Ys(Ie());function Ys(r){return r&&r.__esModule?r:{default:r}}var xr=class extends Rl.default{constructor(...e){super(...e),this.protocol="http:",this.defaultPort=80}createConnection(e,t){let n=bl.default.connect(e.proxy.port,e.proxy.hostname);t(null,n)}},_l=xr;qe.default=_l});var Ws=f(xe=>{"use strict";i();Object.defineProperty(xe,"__esModule",{value:!0});xe.default=void 0;var wl=Dr(N("net")),Pl=Dr(N("tls")),$l=Dr(Ie());function Dr(r){return r&&r.__esModule?r:{default:r}}var Cr=class extends $l.default{constructor(...e){super(...e),this.protocol="https:",this.defaultPort=443}createConnection(e,t){let n=wl.default.connect(e.proxy.port,e.proxy.hostname);n.on("error",o=>{t(o)}),n.once("data",()=>{let o=Pl.default.connect({...e.tls,socket:n});t(null,o)});let s="";s+="CONNECT "+e.host+":"+e.port+` HTTP/1.1\r
3
3
  `,s+="Host: "+e.host+":"+e.port+`\r
4
4
  `,e.proxy.authorization&&(s+="Proxy-Authorization: Basic "+Buffer.from(e.proxy.authorization).toString("base64")+`\r
5
5
  `),s+=`\r
6
6
  `,n.write(s)}},Al=Cr;xe.default=Al});var Ks=f(te=>{"use strict";i();Object.defineProperty(te,"__esModule",{value:!0});Object.defineProperty(te,"Agent",{enumerable:!0,get:function(){return Nl.default}});Object.defineProperty(te,"HttpProxyAgent",{enumerable:!0,get:function(){return Tl.default}});Object.defineProperty(te,"HttpsProxyAgent",{enumerable:!0,get:function(){return Ll.default}});var Nl=jr(Ie()),Tl=jr(zs()),Ll=jr(Ws());function jr(r){return r&&r.__esModule?r:{default:r}}});var Qs=f((Ce,Zs)=>{"use strict";i();Object.defineProperty(Ce,"__esModule",{value:!0});function Sl(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Js(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function Il(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function ql(r){function e(){r.apply(this,arguments)}return e.prototype=Object.create(r.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r,e}var xl=(function(r){Il(e,r);function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";Sl(this,e);var n=Js(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return Object.defineProperty(n,"message",{configurable:!0,enumerable:!1,value:t,writable:!0}),Object.defineProperty(n,"name",{configurable:!0,enumerable:!1,value:n.constructor.name,writable:!0}),Error.hasOwnProperty("captureStackTrace")?(Error.captureStackTrace(n,n.constructor),Js(n)):(Object.defineProperty(n,"stack",{configurable:!0,enumerable:!1,value:new Error(t).stack,writable:!0}),n)}return e})(ql(Error));Ce.default=xl;Zs.exports=Ce.default});var je=f(De=>{"use strict";i();Object.defineProperty(De,"__esModule",{value:!0});De.UnexpectedStateError=void 0;var Cl=Dl(Qs());function Dl(r){return r&&r.__esModule?r:{default:r}}var Gr=class extends Cl.default{constructor(e,t="UNEXPECTED_STATE_ERROR"){super(e),this.code=t}};De.UnexpectedStateError=Gr});var ro=f(Ge=>{"use strict";i();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.default=void 0;var jl=eo(N("http")),Gl=eo(N("https"));function eo(r){return r&&r.__esModule?r:{default:r}}var Ml=(r,e,t)=>(...n)=>{let s,o,a;return typeof n[0]=="string"||n[0]instanceof URL?(s=n[0],typeof n[1]=="function"?(o={},a=n[1]):(o={...n[1]},a=n[2])):(o={...n[0]},a=n[1]),t?o.agent=e:(o.agent||(o.agent=e),(o.agent===jl.default.globalAgent||o.agent===Gl.default.globalAgent)&&(o.agent=e)),s?r(s,o,a):r(o,a)},Ul=Ml;Ge.default=Ul});var no=f((Ad,Ur)=>{"use strict";i();var kl=yo(),Mr=new Map;function to(r,e){e={caseSensitive:!1,...e};let t=r+JSON.stringify(e);if(Mr.has(t))return Mr.get(t);let n=r[0]==="!";n&&(r=r.slice(1)),r=kl(r).replace(/\\\*/g,"[\\s\\S]*");let s=new RegExp(`^${r}$`,e.caseSensitive?"":"i");return s.negated=n,Mr.set(t,s),s}Ur.exports=(r,e,t)=>{if(!(Array.isArray(r)&&Array.isArray(e)))throw new TypeError(`Expected two arrays, got ${typeof r} ${typeof e}`);if(e.length===0)return r;let n=e[0][0]==="!";e=e.map(o=>to(o,t));let s=[];for(let o of r){let a=n;for(let c of e)c.test(o)&&(a=!c.negated);a&&s.push(o)}return s};Ur.exports.isMatch=(r,e,t)=>{let n=Array.isArray(r)?r:[r],s=Array.isArray(e)?e:[e];return n.some(o=>s.every(a=>{let c=to(a,t),l=c.test(o);return c.negated?!l:l}))}});var oo=f(Me=>{"use strict";i();Object.defineProperty(Me,"__esModule",{value:!0});Me.default=void 0;var Xl=N("url"),Fl=Hl(no()),so=je();function Hl(r){return r&&r.__esModule?r:{default:r}}var Vl=(r,e)=>{let t=(0,Xl.parse)(r),n=e.split(/[\s,]+/);for(let s of n){let o=s.replace(/^(?<leadingDot>\.)/,"*").match(/^(?<hostname>.+?)(?::(?<port>\d+))?$/);if(!o||!o.groups)throw new so.UnexpectedStateError("Invalid NO_PROXY pattern.");if(!o.groups.hostname)throw new so.UnexpectedStateError("NO_PROXY entry pattern must include hostname. Use * to match any hostname.");if(Fl.default.isMatch(t.hostname,o.groups.hostname)&&(!o.groups||!o.groups.port||t.port&&t.port===o.groups.port))return!0}return!1},Bl=Vl;Me.default=Bl});var io=f(Ue=>{"use strict";i();Object.defineProperty(Ue,"__esModule",{value:!0});Ue.default=void 0;var Yl=N("url"),kr=je(),zl=r=>{let e=(0,Yl.parse)(r);if(e.query!==null)throw new kr.UnexpectedStateError("Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL must not have query.");if(e.hash!==null)throw new kr.UnexpectedStateError("Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL must not have hash.");if(e.protocol!=="http:")throw new kr.UnexpectedStateError('Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL protocol must be "http:".');let t=80;return e.port&&(t=Number.parseInt(e.port,10)),{authorization:e.auth||null,hostname:e.hostname,port:t}},Wl=zl;Ue.default=Wl});var ao=f(ne=>{"use strict";i();Object.defineProperty(ne,"__esModule",{value:!0});Object.defineProperty(ne,"bindHttpMethod",{enumerable:!0,get:function(){return Kl.default}});Object.defineProperty(ne,"isUrlMatchingNoProxy",{enumerable:!0,get:function(){return Jl.default}});Object.defineProperty(ne,"parseProxyUrl",{enumerable:!0,get:function(){return Zl.default}});var Kl=Xr(ro()),Jl=Xr(oo()),Zl=Xr(io());function Xr(r){return r&&r.__esModule?r:{default:r}}});var Fr=f(ke=>{"use strict";i();Object.defineProperty(ke,"__esModule",{value:!0});ke.default=void 0;var Ql=ec(z());function ec(r){return r&&r.__esModule?r:{default:r}}var rc=Ql.default.child({namespace:"createProxyController"}),tc=["HTTP_PROXY","HTTPS_PROXY","NO_PROXY"],nc=()=>new Proxy({HTTP_PROXY:null,HTTPS_PROXY:null,NO_PROXY:null},{set:(r,e,t)=>{if(!tc.includes(e))throw new Error('Cannot set an unmapped property "'+e+'".');return r[e]=t,rc.info({change:{name:e,value:t},newConfiguration:r},"configuration changed"),!0}}),sc=nc;ke.default=sc});var po=f(Xe=>{"use strict";i();Object.defineProperty(Xe,"__esModule",{value:!0});Xe.default=void 0;var X=se(N("http")),F=se(N("https")),oc=ue(),uo=se(Fs()),ic=se(z()),lo=Ks(),ac=je(),k=ao(),uc=se(Fr());function se(r){return r&&r.__esModule?r:{default:r}}var lc=X.default.get,cc=X.default.request,fc=F.default.get,pc=F.default.request,co=ic.default.child({namespace:"createGlobalProxyAgent"}),fo={environmentVariableNamespace:void 0,forceGlobalAgent:void 0,socketConnectionTimeout:6e4},dc=r=>{let e=Object.keys(r),t={};for(let n of e){let s=r[n];s!==void 0&&(t[n]=s)}return t},hc=r=>{let e=process.env;return{...{environmentVariableNamespace:typeof e.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE=="string"?e.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE:"GLOBAL_AGENT_",forceGlobalAgent:typeof e.GLOBAL_AGENT_FORCE_GLOBAL_AGENT=="string"?(0,oc.boolean)(e.GLOBAL_AGENT_FORCE_GLOBAL_AGENT):!0,socketConnectionTimeout:typeof e.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT=="string"?Number.parseInt(e.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT,10):fo.socketConnectionTimeout},...dc(r)}},gc=(r=fo)=>{let e=hc(r),t=(0,uc.default)();t.HTTP_PROXY=process.env[e.environmentVariableNamespace+"HTTP_PROXY"]||null,t.HTTPS_PROXY=process.env[e.environmentVariableNamespace+"HTTPS_PROXY"]||null,t.NO_PROXY=process.env[e.environmentVariableNamespace+"NO_PROXY"]||null,co.info({configuration:e,state:t},"global agent has been initialized");let n=p=>m=>p()?t.NO_PROXY?!(0,k.isUrlMatchingNoProxy)(m,t.NO_PROXY):!0:!1,s=p=>()=>{let m=p();if(!m)throw new ac.UnexpectedStateError("HTTP(S) proxy must be configured.");return(0,k.parseProxyUrl)(m)},o=()=>t.HTTP_PROXY,a=class extends lo.HttpProxyAgent{constructor(){super(()=>o(),n(o),s(o),X.default.globalAgent,e.socketConnectionTimeout)}},c=new a,l=()=>t.HTTPS_PROXY||t.HTTP_PROXY,E=class extends lo.HttpsProxyAgent{constructor(){super(()=>l(),n(l),s(l),F.default.globalAgent,e.socketConnectionTimeout)}},u=new E;return uo.default.gte(process.version,"v11.7.0")&&(X.default.globalAgent=c,F.default.globalAgent=u),uo.default.gte(process.version,"v10.0.0")?(X.default.get=(0,k.bindHttpMethod)(lc,c,e.forceGlobalAgent),X.default.request=(0,k.bindHttpMethod)(cc,c,e.forceGlobalAgent),F.default.get=(0,k.bindHttpMethod)(fc,u,e.forceGlobalAgent),F.default.request=(0,k.bindHttpMethod)(pc,u,e.forceGlobalAgent)):co.warn("attempt to initialize global-agent in unsupported Node.js version was ignored"),t},Ec=gc;Xe.default=Ec});var Hr=f(Fe=>{"use strict";i();Object.defineProperty(Fe,"__esModule",{value:!0});Object.defineProperty(Fe,"createGlobalProxyAgent",{enumerable:!0,get:function(){return mc.default}});Object.defineProperty(Fe,"createProxyController",{enumerable:!0,get:function(){return yc.default}});var mc=ho(po()),yc=ho(Fr());function ho(r){return r&&r.__esModule?r:{default:r}}});var go=f(He=>{"use strict";i();Object.defineProperty(He,"__esModule",{value:!0});He.default=void 0;var Oc=bc(z()),vc=Hr();function bc(r){return r&&r.__esModule?r:{default:r}}var Rc=Oc.default.child({namespace:"bootstrap"}),_c=r=>global.GLOBAL_AGENT?(Rc.warn("found global.GLOBAL_AGENT; second attempt to bootstrap global-agent was ignored"),!1):(global.GLOBAL_AGENT=(0,vc.createGlobalProxyAgent)(r),!0),wc=_c;He.default=wc});var Eo=f(Vr=>{"use strict";i();Object.defineProperty(Vr,"__esModule",{value:!0});Object.defineProperty(Vr,"bootstrap",{enumerable:!0,get:function(){return Pc.default}});var Pc=$c(go());function $c(r){return r&&r.__esModule?r:{default:r}}});var Tc=f(Ve=>{"use strict";i();Object.defineProperty(Ve,"__esModule",{value:!0});Object.defineProperty(Ve,"bootstrap",{enumerable:!0,get:function(){return Ac.bootstrap}});Object.defineProperty(Ve,"createGlobalProxyAgent",{enumerable:!0,get:function(){return Nc.createGlobalProxyAgent}});var Ac=Eo(),Nc=Hr()});i();import bo from"fs";function zr(r){let e=r instanceof Error?r.stack??r.message:String(r);bo.writeSync(process.stderr.fd,`${e}
7
- `)}async function Sc(r){try{let{jsonOutputEnabled:e}=await import("./environment-5P7JJ3GI.js");if(e()){let{handler:n}=await import("./error-GI4DXVDU.js");await n(r);return}let{FatalError:t}=await import("./error-GI4DXVDU.js");if(r instanceof t){let{renderFatalError:n}=await import("./ui-YDUI56E3.js");n(r)}else zr(r)}catch{zr(r)}}export{Sc as a,Tc as b};
7
+ `)}async function Sc(r){try{let{jsonOutputEnabled:e}=await import("./environment-5P7JJ3GI.js");if(e()){let{handler:n}=await import("./error-PFOKPWFX.js");await n(r);return}let{FatalError:t}=await import("./error-PFOKPWFX.js");if(r instanceof t){let{renderFatalError:n}=await import("./ui-YMBFS3NG.js");n(r)}else zr(r)}catch{zr(r)}}export{Sc as a,Tc as b};
@@ -1 +1 @@
1
- import{b}from"./chunk-XEZPN5TR.js";import{b as E}from"./chunk-DMOLPSXF.js";import{P as F,Q as N}from"./chunk-2KUM2RU4.js";import{Bb as k,S as C,Sa as w,la as O}from"./chunk-ZMOW2YZ4.js";import{i as n}from"./chunk-B4OMIONW.js";import{k as R}from"./chunk-DOLVBTCB.js";import{b as U}from"./chunk-AE3IQG7S.js";import{c as u,e as P,f as x,g,m as T,p as y}from"./chunk-IWTNUJGY.js";import{e as H,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();d();var m=class{static description="Doctor test suite";context;assertions=[];registeredTests=[];async runSuite(t){this.context=t,this.registeredTests=[];let e=[];this.tests();for(let o of this.registeredTests){this.assertions=[];let s=Date.now();try{await o.fn(),e.push({name:o.name,status:this.hasFailures()?"failed":"passed",duration:Date.now()-s,assertions:[...this.assertions]})}catch(r){e.push({name:o.name,status:"failed",duration:Date.now()-s,assertions:[...this.assertions],error:r instanceof Error?r:new Error(String(r))})}}return e}test(t,e){this.registeredTests.push({name:t,fn:e})}tests(){}async run(t,e){let o=e?.cwd??this.context.workingDirectory,s=await F(t,{cwd:o,env:e?.env});return{command:t,exitCode:s.exitCode,stdout:s.stdout,stderr:s.stderr,output:String(s.stdout)+String(s.stderr),success:s.exitCode===0}}async runInteractive(t,e){let o=e?.cwd??this.context.workingDirectory,s=0;try{await N(t,{cwd:o,env:e?.env,stdin:"inherit"})}catch{s=1}return{command:t,exitCode:s,stdout:"",stderr:"",output:"",success:s===0}}assertSuccess(t,e){this.assertions.push({description:e??`Command succeeded: ${t.command}`,passed:t.success,expected:"exit code 0",actual:`exit code ${t.exitCode}`})}assertError(t,e,o){let s=!t.success;if(e){let h=(typeof e=="string"?new RegExp(e):e).test(t.output),c;s?h?c="matched":c=`output: ${t.output.slice(0,200)}`:c="command succeeded",this.assertions.push({description:o??`Command failed with expected error: ${e}`,passed:s&&h,expected:`failure with error matching ${e}`,actual:c})}else this.assertions.push({description:o??`Command failed: ${t.command}`,passed:s,expected:"non-zero exit code",actual:`exit code ${t.exitCode}`})}async assertFile(t,e,o){let s=g(t)?t:u(this.context.workingDirectory,t),r=x(this.context.workingDirectory,s);if(!await w(s)){this.assertions.push({description:o??`File exists: ${r}`,passed:!1,expected:"file exists",actual:"file not found"});return}if(e){let c=await O(s),D=(typeof e=="string"?new RegExp(e):e).test(c);this.assertions.push({description:o??`File ${r} matches ${e}`,passed:D,expected:`content matching ${e}`,actual:D?"matched":`content: ${c.slice(0,200)}...`})}else this.assertions.push({description:o??`File exists: ${r}`,passed:!0,expected:"file exists",actual:"file exists"})}async assertNoFile(t,e){let o=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,o),r=await w(o);this.assertions.push({description:e??`File does not exist: ${s}`,passed:!r,expected:"file does not exist",actual:r?"file exists":"file does not exist"})}async assertDirectory(t,e){let o=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,o),r=await w(o);this.assertions.push({description:e??`Directory exists: ${s}`,passed:r,expected:"directory exists",actual:r?"directory exists":"directory not found"})}assertOutput(t,e,o){let r=(typeof e=="string"?new RegExp(e):e).test(t.output);this.assertions.push({description:o??`Output matches ${e}`,passed:r,expected:`output matching ${e}`,actual:r?"matched":`output: ${t.output.slice(0,200)}`})}assertJson(t,e,o){try{let s=JSON.parse(t.stdout);if(e){let r=e(s);this.assertions.push({description:o??"Output is valid JSON matching validator",passed:r,expected:"valid JSON matching validator",actual:r?"matched":"validator returned false"})}else this.assertions.push({description:o??"Output is valid JSON",passed:!0,expected:"valid JSON",actual:"valid JSON"});return s}catch{this.assertions.push({description:o??"Output is valid JSON",passed:!1,expected:"valid JSON",actual:`invalid JSON: ${t.stdout.slice(0,100)}`});return}}assert(t,e){this.assertions.push({description:e,passed:t,expected:"true",actual:String(t)})}assertEqual(t,e,o){this.assertions.push({description:o,passed:t===e,expected:String(e),actual:String(t)})}hasFailures(){return this.assertions.some(t=>!t.passed)}};var p=class extends m{static description="Tests the theme init command creates a valid theme structure";themeName="";themePath="";tests(){this.test("init creates theme directory",async()=>{this.themeName=`doctor-theme-${C("creative")}`,this.themePath=u(this.context.workingDirectory,this.themeName);let t=await this.runInteractive(`shopify theme init ${this.themeName} --path ${this.context.workingDirectory}`);this.assertSuccess(t),this.context.themeName=this.themeName,this.context.themePath=this.themePath}),this.test("essential theme files exist",async()=>{let t=["layout/theme.liquid","config/settings_schema.json","templates/index.json"];await Promise.all(t.map(e=>this.assertFile(u(this.themePath,e))))}),this.test("theme directories exist",async()=>{let t=["sections","snippets","assets","locales"];await Promise.all(t.map(e=>this.assertDirectory(u(this.themePath,e))))}),this.test("layout/theme.liquid has valid content",async()=>{await this.assertFile(u(this.themePath,"layout/theme.liquid"),/<!doctype html>|<html|{{ content_for_header }}/i,"layout/theme.liquid contains expected Liquid markup")})}};d();var l=class extends m{static description="Tests pushing a theme to the store creates an unpublished theme";static requiresStore=!0;tests(){this.test("push creates unpublished theme",async()=>{if(!this.context.themePath){this.assert(!1,"Theme init did not complete successfully; themePath is missing in context");return}let t=this.context.themeName??"doctor-theme",e=`shopify theme push --unpublished --json --path ${this.context.themePath} -t ${t}`;this.context.environment&&(e+=` -e ${this.context.environment}`),this.context.store&&(e+=` -s ${this.context.store}`),this.context.password&&(e+=` --password ${this.context.password}`);let o=await this.run(e);this.assertSuccess(o);let s=this.assertJson(o,r=>typeof r.theme?.id=="number");s?.theme&&(this.assert(typeof s.theme.id=="number","Theme was created with a valid ID"),this.assertEqual(s.theme.role,"unpublished","Theme role is unpublished"),this.assert(s.theme.editor_url.includes("/admin/themes/"),"Editor URL is provided"),this.assert(s.theme.preview_url.includes("preview_theme_id="),"Preview URL is provided"),this.context.themeId=String(s.theme.id),this.context.data.editorUrl=s.theme.editor_url,this.context.data.previewUrl=s.theme.preview_url)})}};d();function _(i){return{workingDirectory:i.path??y(),environment:i.environment,store:i.store,password:i.password,data:{}}}d();var a=i=>k(i),v;function J(i){v=i}function G(i){if(!v)return i;let t=/\/[^\s,)]+/g;return i.replace(t,e=>T(e,v))}function A(i,t){a(""),a(n.bold(n.cyan(`Suite: ${i}`))),a(n.dim(t))}function j(i){a(n.bold(n.blue(`Running: ${i}`)))}function q(i){let t=`(${(i.duration/1e3).toFixed(2)}s)`;if(i.status==="passed"){a(n.bold(n.green(`PASSED: ${i.name} ${n.dim(t)}`)));for(let e of I(i.assertions))a(e)}else if(i.status==="failed"){a(n.red(`FAILED: ${i.name} ${n.dim(t)}`));for(let e of I(i.assertions))a(e);i.error&&a(n.red(` Error: ${G(i.error.message)}`))}else a(n.yellow(`SKIPPED: ${i.name}`))}function S(i){let t=i.filter(h=>h.status==="passed").length,e=i.filter(h=>h.status==="failed").length,o=i.filter(h=>h.status==="skipped").length,s=i.length,r=i.reduce((h,c)=>h+c.duration,0);a(""),a(n.bold("\u2500".repeat(40))),e>0?a(n.red(n.bold(`Doctor Complete: ${e}/${s} tests failed`))):a(n.green(n.bold(`Doctor Complete: ${t}/${s} tests passed`))),a(` Passed: ${n.green(String(t))}`),a(` Failed: ${n.red(String(e))}`),o>0&&a(` Skipped: ${n.yellow(String(o))}`),a(` Total time: ${n.dim(`${(r/1e3).toFixed(2)}s`)}`)}function I(i){return i.map(t=>{if(t.passed)return n.green(` [OK] ${t.description}`);{let e=` (expected: ${t.expected}, actual: ${t.actual})`;return n.red(` [FAIL] ${t.description}${e}`)}})}var Y=[p,l];async function L(i){let t=[],e=_(i);J(e.workingDirectory);for(let o of Y){let s=new o,r=o.description??"Test suite";A(o.name,r);let h=await s.runSuite(e);for(let c of h)if(j(c.name),q(c),t.push(c),c.status==="failed")return S(t),t}return S(t),t}var f=H(U(),1);var $=class i extends b{static description="Run all theme command doctor-release tests";static hidden=!0;static flags={...E,path:f.Flags.string({char:"p",description:"The path to run tests in. Defaults to current directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>P(t),default:async()=>y()}),environment:f.Flags.string({char:"e",description:"The environment to use from shopify.theme.toml (required for store-connected tests).",env:"SHOPIFY_FLAG_ENVIRONMENT",required:!0}),store:f.Flags.string({char:"s",description:"Store URL (overrides environment).",env:"SHOPIFY_FLAG_STORE"}),password:f.Flags.string({description:"Password from Theme Access app (overrides environment).",env:"SHOPIFY_FLAG_PASSWORD"})};async run(){if(!R())return;let{flags:t}=await this.parse(i);(await L({path:t.path,environment:t.environment,store:t.store,password:t.password})).some(s=>s.status==="failed")&&(process.exitCode=1)}};export{$ as a};
1
+ import{b}from"./chunk-PSREELSQ.js";import{b as E}from"./chunk-IKXUYCK7.js";import{P as F,Q as N}from"./chunk-7A4ZE5IS.js";import{Bb as k,S as C,Sa as w,la as O}from"./chunk-OIQ5NQ5I.js";import{i as n}from"./chunk-B4OMIONW.js";import{k as R}from"./chunk-A5BSUUNQ.js";import{b as U}from"./chunk-VBPMVVLV.js";import{c as u,e as P,f as x,g,m as T,p as y}from"./chunk-IWTNUJGY.js";import{e as H,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();d();var m=class{static description="Doctor test suite";context;assertions=[];registeredTests=[];async runSuite(t){this.context=t,this.registeredTests=[];let e=[];this.tests();for(let o of this.registeredTests){this.assertions=[];let s=Date.now();try{await o.fn(),e.push({name:o.name,status:this.hasFailures()?"failed":"passed",duration:Date.now()-s,assertions:[...this.assertions]})}catch(r){e.push({name:o.name,status:"failed",duration:Date.now()-s,assertions:[...this.assertions],error:r instanceof Error?r:new Error(String(r))})}}return e}test(t,e){this.registeredTests.push({name:t,fn:e})}tests(){}async run(t,e){let o=e?.cwd??this.context.workingDirectory,s=await F(t,{cwd:o,env:e?.env});return{command:t,exitCode:s.exitCode,stdout:s.stdout,stderr:s.stderr,output:String(s.stdout)+String(s.stderr),success:s.exitCode===0}}async runInteractive(t,e){let o=e?.cwd??this.context.workingDirectory,s=0;try{await N(t,{cwd:o,env:e?.env,stdin:"inherit"})}catch{s=1}return{command:t,exitCode:s,stdout:"",stderr:"",output:"",success:s===0}}assertSuccess(t,e){this.assertions.push({description:e??`Command succeeded: ${t.command}`,passed:t.success,expected:"exit code 0",actual:`exit code ${t.exitCode}`})}assertError(t,e,o){let s=!t.success;if(e){let h=(typeof e=="string"?new RegExp(e):e).test(t.output),c;s?h?c="matched":c=`output: ${t.output.slice(0,200)}`:c="command succeeded",this.assertions.push({description:o??`Command failed with expected error: ${e}`,passed:s&&h,expected:`failure with error matching ${e}`,actual:c})}else this.assertions.push({description:o??`Command failed: ${t.command}`,passed:s,expected:"non-zero exit code",actual:`exit code ${t.exitCode}`})}async assertFile(t,e,o){let s=g(t)?t:u(this.context.workingDirectory,t),r=x(this.context.workingDirectory,s);if(!await w(s)){this.assertions.push({description:o??`File exists: ${r}`,passed:!1,expected:"file exists",actual:"file not found"});return}if(e){let c=await O(s),D=(typeof e=="string"?new RegExp(e):e).test(c);this.assertions.push({description:o??`File ${r} matches ${e}`,passed:D,expected:`content matching ${e}`,actual:D?"matched":`content: ${c.slice(0,200)}...`})}else this.assertions.push({description:o??`File exists: ${r}`,passed:!0,expected:"file exists",actual:"file exists"})}async assertNoFile(t,e){let o=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,o),r=await w(o);this.assertions.push({description:e??`File does not exist: ${s}`,passed:!r,expected:"file does not exist",actual:r?"file exists":"file does not exist"})}async assertDirectory(t,e){let o=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,o),r=await w(o);this.assertions.push({description:e??`Directory exists: ${s}`,passed:r,expected:"directory exists",actual:r?"directory exists":"directory not found"})}assertOutput(t,e,o){let r=(typeof e=="string"?new RegExp(e):e).test(t.output);this.assertions.push({description:o??`Output matches ${e}`,passed:r,expected:`output matching ${e}`,actual:r?"matched":`output: ${t.output.slice(0,200)}`})}assertJson(t,e,o){try{let s=JSON.parse(t.stdout);if(e){let r=e(s);this.assertions.push({description:o??"Output is valid JSON matching validator",passed:r,expected:"valid JSON matching validator",actual:r?"matched":"validator returned false"})}else this.assertions.push({description:o??"Output is valid JSON",passed:!0,expected:"valid JSON",actual:"valid JSON"});return s}catch{this.assertions.push({description:o??"Output is valid JSON",passed:!1,expected:"valid JSON",actual:`invalid JSON: ${t.stdout.slice(0,100)}`});return}}assert(t,e){this.assertions.push({description:e,passed:t,expected:"true",actual:String(t)})}assertEqual(t,e,o){this.assertions.push({description:o,passed:t===e,expected:String(e),actual:String(t)})}hasFailures(){return this.assertions.some(t=>!t.passed)}};var p=class extends m{static description="Tests the theme init command creates a valid theme structure";themeName="";themePath="";tests(){this.test("init creates theme directory",async()=>{this.themeName=`doctor-theme-${C("creative")}`,this.themePath=u(this.context.workingDirectory,this.themeName);let t=await this.runInteractive(`shopify theme init ${this.themeName} --path ${this.context.workingDirectory}`);this.assertSuccess(t),this.context.themeName=this.themeName,this.context.themePath=this.themePath}),this.test("essential theme files exist",async()=>{let t=["layout/theme.liquid","config/settings_schema.json","templates/index.json"];await Promise.all(t.map(e=>this.assertFile(u(this.themePath,e))))}),this.test("theme directories exist",async()=>{let t=["sections","snippets","assets","locales"];await Promise.all(t.map(e=>this.assertDirectory(u(this.themePath,e))))}),this.test("layout/theme.liquid has valid content",async()=>{await this.assertFile(u(this.themePath,"layout/theme.liquid"),/<!doctype html>|<html|{{ content_for_header }}/i,"layout/theme.liquid contains expected Liquid markup")})}};d();var l=class extends m{static description="Tests pushing a theme to the store creates an unpublished theme";static requiresStore=!0;tests(){this.test("push creates unpublished theme",async()=>{if(!this.context.themePath){this.assert(!1,"Theme init did not complete successfully; themePath is missing in context");return}let t=this.context.themeName??"doctor-theme",e=`shopify theme push --unpublished --json --path ${this.context.themePath} -t ${t}`;this.context.environment&&(e+=` -e ${this.context.environment}`),this.context.store&&(e+=` -s ${this.context.store}`),this.context.password&&(e+=` --password ${this.context.password}`);let o=await this.run(e);this.assertSuccess(o);let s=this.assertJson(o,r=>typeof r.theme?.id=="number");s?.theme&&(this.assert(typeof s.theme.id=="number","Theme was created with a valid ID"),this.assertEqual(s.theme.role,"unpublished","Theme role is unpublished"),this.assert(s.theme.editor_url.includes("/admin/themes/"),"Editor URL is provided"),this.assert(s.theme.preview_url.includes("preview_theme_id="),"Preview URL is provided"),this.context.themeId=String(s.theme.id),this.context.data.editorUrl=s.theme.editor_url,this.context.data.previewUrl=s.theme.preview_url)})}};d();function _(i){return{workingDirectory:i.path??y(),environment:i.environment,store:i.store,password:i.password,data:{}}}d();var a=i=>k(i),v;function J(i){v=i}function G(i){if(!v)return i;let t=/\/[^\s,)]+/g;return i.replace(t,e=>T(e,v))}function A(i,t){a(""),a(n.bold(n.cyan(`Suite: ${i}`))),a(n.dim(t))}function j(i){a(n.bold(n.blue(`Running: ${i}`)))}function q(i){let t=`(${(i.duration/1e3).toFixed(2)}s)`;if(i.status==="passed"){a(n.bold(n.green(`PASSED: ${i.name} ${n.dim(t)}`)));for(let e of I(i.assertions))a(e)}else if(i.status==="failed"){a(n.red(`FAILED: ${i.name} ${n.dim(t)}`));for(let e of I(i.assertions))a(e);i.error&&a(n.red(` Error: ${G(i.error.message)}`))}else a(n.yellow(`SKIPPED: ${i.name}`))}function S(i){let t=i.filter(h=>h.status==="passed").length,e=i.filter(h=>h.status==="failed").length,o=i.filter(h=>h.status==="skipped").length,s=i.length,r=i.reduce((h,c)=>h+c.duration,0);a(""),a(n.bold("\u2500".repeat(40))),e>0?a(n.red(n.bold(`Doctor Complete: ${e}/${s} tests failed`))):a(n.green(n.bold(`Doctor Complete: ${t}/${s} tests passed`))),a(` Passed: ${n.green(String(t))}`),a(` Failed: ${n.red(String(e))}`),o>0&&a(` Skipped: ${n.yellow(String(o))}`),a(` Total time: ${n.dim(`${(r/1e3).toFixed(2)}s`)}`)}function I(i){return i.map(t=>{if(t.passed)return n.green(` [OK] ${t.description}`);{let e=` (expected: ${t.expected}, actual: ${t.actual})`;return n.red(` [FAIL] ${t.description}${e}`)}})}var Y=[p,l];async function L(i){let t=[],e=_(i);J(e.workingDirectory);for(let o of Y){let s=new o,r=o.description??"Test suite";A(o.name,r);let h=await s.runSuite(e);for(let c of h)if(j(c.name),q(c),t.push(c),c.status==="failed")return S(t),t}return S(t),t}var f=H(U(),1);var $=class i extends b{static description="Run all theme command doctor-release tests";static hidden=!0;static flags={...E,path:f.Flags.string({char:"p",description:"The path to run tests in. Defaults to current directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>P(t),default:async()=>y()}),environment:f.Flags.string({char:"e",description:"The environment to use from shopify.theme.toml (required for store-connected tests).",env:"SHOPIFY_FLAG_ENVIRONMENT",required:!0}),store:f.Flags.string({char:"s",description:"Store URL (overrides environment).",env:"SHOPIFY_FLAG_STORE"}),password:f.Flags.string({description:"Password from Theme Access app (overrides environment).",env:"SHOPIFY_FLAG_PASSWORD"})};async run(){if(!R())return;let{flags:t}=await this.parse(i);(await L({path:t.path,environment:t.environment,store:t.store,password:t.password})).some(s=>s.status==="failed")&&(process.exitCode=1)}};export{$ as a};
@@ -1,3 +1,3 @@
1
- import{c as W}from"./chunk-YF4AXKM4.js";import{a as z,m as N,o as Q}from"./chunk-YTL45RXR.js";import{a as X}from"./chunk-Z6ZRS256.js";import{a as q,c as g}from"./chunk-XLMKHTJ5.js";import{a as B}from"./chunk-R6US7F33.js";import{a as $,b as V}from"./chunk-YY6TFARF.js";import{a as K}from"./chunk-7N7KRZOM.js";import{k as J,n as Y}from"./chunk-DVFVO6ZE.js";import{d as G,e as H,g as U,h as M}from"./chunk-7HECBXSP.js";import{p as O,q as A,r as C,u as I,v as L}from"./chunk-CZNUBAAG.js";import{i as Z,l as ee}from"./chunk-VJG7VXFU.js";import{Da as u,U as D}from"./chunk-YKDRUAY3.js";import{b as R,c as j}from"./chunk-DMOLPSXF.js";import{G as E,y as x}from"./chunk-2KUM2RU4.js";import{Va as _,zb as f}from"./chunk-ZMOW2YZ4.js";import{b as n}from"./chunk-3PYDIBTX.js";import{b as ae}from"./chunk-AE3IQG7S.js";import{g as F,p as y}from"./chunk-IWTNUJGY.js";import{e as me,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();import{resolve as ce}from"node:path";var ue=n.object({id:n.number(),name:n.string(),role:n.string(),processing:n.boolean(),src:n.string().optional(),shop:n.string(),editor_url:n.string(),preview_url:n.string()}),w=n.object({environment:n.string().optional(),path:n.string(),changed:n.boolean().optional(),theme:ue}),re=G.extend({processing:n.boolean(),sourceUrl:n.string().url().nullable()}).strict(),de=n.object({status:n.literal("success"),changed:n.boolean(),directory:n.string().refine(F,"Expected an absolute filesystem path."),theme:re}).strict(),te=n.object({status:n.literal("skipped"),reason:n.literal("unsafe-directory")}).strict(),d=H({name:"ThemePullResult",schema:n.union([de,te]),definitions:{ThemePullTheme:re},project:t=>{if(te.safeParse(t).success)return t;let{theme:e,path:r,changed:o}=w.parse(t);return{status:"success",changed:o??!0,directory:ce(r),theme:{...M(e),storeDomain:U(e.shop),processing:e.processing,sourceUrl:e.src===""?null:e.src??null,editorUrl:e.editor_url||null,previewUrl:e.preview_url||null}}}});a();function v(t,e){if(e==="json"){f(d.encode(t));return}let{environment:r,theme:o}=t;x({headline:r?`Environment: ${r}`:"",body:["The theme",...q(o),"has been pulled."],nextSteps:[[{link:{label:"View your theme",url:o.preview_url}}],[{link:{label:"Customize your theme at the theme editor",url:o.editor_url}}]]})}function oe(t){let e=t.map(r=>"error"in r?r:{...r,result:r.result??{status:"skipped",reason:"unsafe-directory"}});f(d.encode({environments:e}))}a();async function ne(t,e,r,o,s,m){let i=he(r,o,s),c=pe(r,t,o,e),l=[...i,...c,{title:"Theme download complete",task:async()=>{}}];return l.length>0&&await E(l,{renderOptions:{stdout:m?.stdout??process.stdout},noProgressBar:s.multiEnvironment}),i.length>0||c.length>0}function he(t,e,r){if(r.nodelete)return[];let o=new Set(t.map(i=>i.key));return e.applyIgnoreFilters([...e.files.values()]).map(({key:i})=>i).filter(i=>!o.has(i)).map(i=>({title:`Cleaning your local directory (removing ${i})`,task:async()=>e.delete(i)}))}function pe(t,e,r,o){let s=r.applyIgnoreFilters(t);s=s.filter(l=>{let p=l.checksum;return r.files.get(l.key)?.checksum!==p});let m=s.map(l=>l.key),i=l=>l.total===0?"[100%]":`[${Math.round(l.current/l.total*100)}%]`;return W(m,I,(l,p)=>({title:`Downloading files from remote theme ${i({current:p,total:m.length})}`,task:async()=>fe(e,r,l,o)}))}async function fe(t,e,r,o){let s=await J(t.id,r,o);s&&await Promise.all(s.map(m=>e.write(m)))}async function P(t,e,r,o){u("theme-service:pull:setup"),X({verbose:t.verbose,noColor:t.noColor});let s=e??await D(C({store:t.store}),t.password),m=new B(s),i=await(t.development?m.find():m.fetch()),{path:c,nodelete:l,live:p,development:T,only:se,ignore:ie,force:S,environment:k}=t;if(!await ye(c??y(),S??!1,k?.[0],r))return;let le=await K(s,{header:"Select a theme to open",filter:{live:p,theme:T?`${i?.id}`:t.theme}});return u("theme-service:pull:setup"),ve(le,s,{environment:k?.[0],force:S??!1,ignore:ie??[],multiEnvironment:r,nodelete:l??!1,only:se??[],path:c??y()},o)}async function ve(t,e,r,o){u("theme-service:pull:file-system");let s=N(r.path,{filters:r}),[m]=await Promise.all([Y(t.id,e),s.ready()]),i=z(m);u("theme-service:pull:file-system");let c=await ne(t,e,i,s,r,o);return w.parse({environment:r.environment,path:r.path,changed:c,theme:{id:t.id,name:t.name,role:t.role,processing:t.processing,src:t.src,shop:e.storeFqdn,editor_url:V(t,e),preview_url:$(t,e)}})}async function Te(t){return(await _("*",{cwd:t,deep:1,onlyFiles:!1})).length===0}async function ye(t,e,r,o){return e?!0:!(!await Te(t)&&!await Q(t)&&!await g(e,void 0,r,o)||await Z(t)&&!await ee(t)&&!await g(e,"The current Git directory has uncommitted changes.",r,o))}async function et(t,e,r,o){let s=await P(t,e,r,o);s&&v(s,"text")}var h=me(ae(),1);var b=class extends L{static jsonOutputSchema=d;static summary="Download your remote theme files locally.";static descriptionWithMarkdown=`Retrieves theme files from Shopify.
1
+ import{c as W}from"./chunk-YF4AXKM4.js";import{a as z,m as N,o as Q}from"./chunk-OKRKVVTK.js";import{a as X}from"./chunk-UY44O4IZ.js";import{a as q,c as g}from"./chunk-TXMZPF2U.js";import{a as B}from"./chunk-7AQZKPJU.js";import{a as $,b as V}from"./chunk-YY6TFARF.js";import{a as K}from"./chunk-GQ3LY7BY.js";import{k as J,n as Y}from"./chunk-RSNFNZ6F.js";import{d as G,e as H,g as U,h as M}from"./chunk-7HECBXSP.js";import{p as O,q as A,r as C,u as I,v as L}from"./chunk-VVHJ2AUF.js";import{i as Z,l as ee}from"./chunk-WZ3QWPK5.js";import{Ea as u,U as D}from"./chunk-UORSJB4A.js";import{b as R,c as j}from"./chunk-IKXUYCK7.js";import{G as E,y as x}from"./chunk-7A4ZE5IS.js";import{Va as _,zb as f}from"./chunk-OIQ5NQ5I.js";import{b as n}from"./chunk-3PYDIBTX.js";import{b as ae}from"./chunk-VBPMVVLV.js";import{g as F,p as y}from"./chunk-IWTNUJGY.js";import{e as me,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();import{resolve as ce}from"node:path";var ue=n.object({id:n.number(),name:n.string(),role:n.string(),processing:n.boolean(),src:n.string().optional(),shop:n.string(),editor_url:n.string(),preview_url:n.string()}),w=n.object({environment:n.string().optional(),path:n.string(),changed:n.boolean().optional(),theme:ue}),re=G.extend({processing:n.boolean(),sourceUrl:n.string().url().nullable()}).strict(),de=n.object({status:n.literal("success"),changed:n.boolean(),directory:n.string().refine(F,"Expected an absolute filesystem path."),theme:re}).strict(),te=n.object({status:n.literal("skipped"),reason:n.literal("unsafe-directory")}).strict(),d=H({name:"ThemePullResult",schema:n.union([de,te]),definitions:{ThemePullTheme:re},project:t=>{if(te.safeParse(t).success)return t;let{theme:e,path:r,changed:o}=w.parse(t);return{status:"success",changed:o??!0,directory:ce(r),theme:{...M(e),storeDomain:U(e.shop),processing:e.processing,sourceUrl:e.src===""?null:e.src??null,editorUrl:e.editor_url||null,previewUrl:e.preview_url||null}}}});a();function v(t,e){if(e==="json"){f(d.encode(t));return}let{environment:r,theme:o}=t;x({headline:r?`Environment: ${r}`:"",body:["The theme",...q(o),"has been pulled."],nextSteps:[[{link:{label:"View your theme",url:o.preview_url}}],[{link:{label:"Customize your theme at the theme editor",url:o.editor_url}}]]})}function oe(t){let e=t.map(r=>"error"in r?r:{...r,result:r.result??{status:"skipped",reason:"unsafe-directory"}});f(d.encode({environments:e}))}a();async function ne(t,e,r,o,s,m){let i=he(r,o,s),c=pe(r,t,o,e),l=[...i,...c,{title:"Theme download complete",task:async()=>{}}];return l.length>0&&await E(l,{renderOptions:{stdout:m?.stdout??process.stdout},noProgressBar:s.multiEnvironment}),i.length>0||c.length>0}function he(t,e,r){if(r.nodelete)return[];let o=new Set(t.map(i=>i.key));return e.applyIgnoreFilters([...e.files.values()]).map(({key:i})=>i).filter(i=>!o.has(i)).map(i=>({title:`Cleaning your local directory (removing ${i})`,task:async()=>e.delete(i)}))}function pe(t,e,r,o){let s=r.applyIgnoreFilters(t);s=s.filter(l=>{let p=l.checksum;return r.files.get(l.key)?.checksum!==p});let m=s.map(l=>l.key),i=l=>l.total===0?"[100%]":`[${Math.round(l.current/l.total*100)}%]`;return W(m,I,(l,p)=>({title:`Downloading files from remote theme ${i({current:p,total:m.length})}`,task:async()=>fe(e,r,l,o)}))}async function fe(t,e,r,o){let s=await J(t.id,r,o);s&&await Promise.all(s.map(m=>e.write(m)))}async function P(t,e,r,o){u("theme-service:pull:setup"),X({verbose:t.verbose,noColor:t.noColor});let s=e??await D(C({store:t.store}),t.password),m=new B(s),i=await(t.development?m.find():m.fetch()),{path:c,nodelete:l,live:p,development:T,only:se,ignore:ie,force:S,environment:k}=t;if(!await ye(c??y(),S??!1,k?.[0],r))return;let le=await K(s,{header:"Select a theme to open",filter:{live:p,theme:T?`${i?.id}`:t.theme}});return u("theme-service:pull:setup"),ve(le,s,{environment:k?.[0],force:S??!1,ignore:ie??[],multiEnvironment:r,nodelete:l??!1,only:se??[],path:c??y()},o)}async function ve(t,e,r,o){u("theme-service:pull:file-system");let s=N(r.path,{filters:r}),[m]=await Promise.all([Y(t.id,e),s.ready()]),i=z(m);u("theme-service:pull:file-system");let c=await ne(t,e,i,s,r,o);return w.parse({environment:r.environment,path:r.path,changed:c,theme:{id:t.id,name:t.name,role:t.role,processing:t.processing,src:t.src,shop:e.storeFqdn,editor_url:V(t,e),preview_url:$(t,e)}})}async function Te(t){return(await _("*",{cwd:t,deep:1,onlyFiles:!1})).length===0}async function ye(t,e,r,o){return e?!0:!(!await Te(t)&&!await Q(t)&&!await g(e,void 0,r,o)||await Z(t)&&!await ee(t)&&!await g(e,"The current Git directory has uncommitted changes.",r,o))}async function et(t,e,r,o){let s=await P(t,e,r,o);s&&v(s,"text")}var h=me(ae(),1);var b=class extends L{static jsonOutputSchema=d;static summary="Download your remote theme files locally.";static descriptionWithMarkdown=`Retrieves theme files from Shopify.
2
2
 
3
3
  If no theme is specified, then you're prompted to select the theme to pull from the list of the themes in your store.`;static description=this.descriptionForHelp();static flags={...R,...j,...O,...A("download"),theme:h.Flags.string({char:"t",description:"Theme ID or name of the remote theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_THEME_ID"}),development:h.Flags.boolean({char:"d",description:"Pull theme files from your remote development theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),live:h.Flags.boolean({char:"l",description:"Pull theme files from your remote live theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_LIVE"}),nodelete:h.Flags.boolean({char:"n",description:"Prevent deleting local files that don't exist remotely.",env:"SHOPIFY_FLAG_NODELETE"}),force:h.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"})};static multiEnvironmentsFlags=["store","password","path",["live","development","theme"]];static nonTTYFlagRequirements(){return[{flags:["theme","development","live"]}]}async command(e,r,o,s,m){u("theme-command:pull");let i=await P({...e,noColor:e["no-color"]},r,o,m);return e.json&&o||(i?v(i,e.json?"json":"text"):e.json&&f(d.encode({status:"cancelled"}))),u("theme-command:pull"),i??(e.json&&o?{status:"skipped",reason:"unsafe-directory"}:void 0)}renderEnvironmentResults(e){oe(e)}storeAuthScopes(){return["read_themes"]}};export{et as a,b};
@@ -1 +1 @@
1
- import{$ as j,B as k,D as g,H as R,M as w,d as L,p as T,q as b,r as M,s as I}from"./chunk-A2NSORBM.js";import{a as re}from"./chunk-7DBKSSDK.js";import{i as S}from"./chunk-TD6JBHUS.js";import{na as O}from"./chunk-ZMOW2YZ4.js";import{b as p}from"./chunk-3PYDIBTX.js";import{c as A,d as N}from"./chunk-IWTNUJGY.js";import{e as ne,g as x}from"./chunk-VKWPEFWQ.js";x();var H=ne(re(),1);import{isDeepStrictEqual as U}from"node:util";var m=1,z=["deterministic","agent"],G=["false-positive","accepted-risk"],E=()=>p.string({required_error:"required",invalid_type_error:"must be a string"}),P=e=>p.enum(e,{errorMap:(n,s)=>({message:s.data===void 0?`required (${e.join(" or ")})`:`must be ${e.join(" or ")}`})}),_=e=>E().max(e,`must be at most ${e} characters`).refine(n=>n.trim()!=="","must not be empty");function te(e){if(e==="")return"must not be empty";if(e.length>1024)return`must be at most ${1024} characters`;if(e.includes("\0"))return"can't contain a NUL character";if(e.trim()!==e)return"must not start or end with whitespace";if(e.includes("\\"))return"must use / as the separator";if(e.startsWith("/")||/^[a-zA-Z]:/.test(e))return"must be relative to the app directory";if(/[*?]/.test(e))return"can't contain wildcards: name one file";let n=e.split("/"),s=n.findIndex(r=>r!=="..");if(!(s!==-1&&n.slice(s).every(r=>r!==""&&r!=="."&&r!=="..")))return'must name a file, without empty or "." segments, and with ".." only at the start'}var y=p.strictObject({source:P(z),check:E().min(1,"must not be empty"),kind:P(G),path:E().superRefine((e,n)=>{let s=te(e);s&&n.addIssue({code:p.ZodIssueCode.custom,message:s})}),code:_(4e3).refine(e=>e.trim()===""||I(e),`must contain at least ${M} characters that are not whitespace, commas, or semicolons`).optional(),reason:_(4e3)},{invalid_type_error:"must be an object"}),W=p.strictObject({$schema:p.string({invalid_type_error:"must be a string"}).optional(),schema_version:p.literal(m),suppressions:p.array(y,{required_error:"required",invalid_type_error:"must be an array"})}),X=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),oe=e=>z.some(n=>n===e);function ie(e){return e===null?"null":Array.isArray(e)?"array":typeof e}var D=40;function ce(e,n){if(e==="configurations")return"configurations is no longer supported. Suppressions apply to all app configurations; remove this field.";let s=e.length>D?`${e.slice(0,D)}\u2026`:e,t=n.find(o=>o.toLowerCase()===e.toLowerCase()),r=t===void 0?"":`. Did you mean ${JSON.stringify(t)}?`;return`unknown key ${JSON.stringify(s)}${r}`}function B(e){let n=e.path.map((o,i)=>typeof o=="number"?`[${o}]`:i===0?String(o):`.${o}`).join(""),[s,t]=e.path,r=o=>({entryIndex:s==="suppressions"&&typeof t=="number"?t:-1,message:n===""?o:`${n}: ${o}`});if(e.code===p.ZodIssueCode.unrecognized_keys){let o=Object.keys(n===""?W.shape:y.shape);return e.keys.map(i=>r(ce(i,o)))}return[r(e.message)]}function Z(e){if(!Array.isArray(e))return[];let n=T();return e.flatMap((s,t)=>{if(!X(s)||typeof s.check!="string"||s.check==="")return[];let r=`suppressions[${t}].check`,o=n.get(s.check);if(!o){let a=`${r}: not a check ID that this version of Shopify CLI knows. Check the spelling, or upgrade Shopify CLI.`;return[{entryIndex:t,message:a}]}if(!oe(s.source)||o.has(s.source))return[];let i=[...o].join(" or ");return[{entryIndex:t,message:`${r}: ${s.source} checks in this version of Shopify CLI don't report ${s.check}. Use "source": "${i}", or upgrade Shopify CLI.`}]})}function ae(e){if(!Array.isArray(e))return[];let n=new Map;return e.flatMap((s,t)=>{let r=y.safeParse(s);if(!r.success)return[];let{source:o,check:i,path:a,code:c}=r.data,d=JSON.stringify([o,i,a,c?.replace(/[\s,;]/g,"")??null]),u=n.get(d);return u===void 0?(n.set(d,t),[]):[{entryIndex:t,message:`suppressions[${t}]: duplicates suppressions[${u}]`}]})}function v(e){if(!X(e))return{ok:!1,errors:[`expected a JSON object, received ${ie(e)}`]};let n=e.schema_version;if(n!==m)return{ok:!1,errors:[typeof n=="number"&&Number.isSafeInteger(n)&&n>m?`schema_version ${n} needs a newer version of Shopify CLI`:`schema_version must be ${m}`]};let s=W.safeParse(e),t=[...s.success?[]:s.error.issues.flatMap(B),...Z(e.suppressions),...ae(e.suppressions)].sort((r,o)=>r.entryIndex-o.entryIndex);return!s.success||t.length>0?{ok:!1,errors:t.map(r=>r.message)}:{ok:!0,suppressions:s.data.suppressions}}var J=50;function h(e,n){let s=n.length-J,t=s>0?[...n.slice(0,J),`\u2026and ${s} more`]:n,r=new S(`The app security suppressions could not be loaded because ${k} is invalid.`,null,[`Fix every error in ${k}, then run the command again.`],[{title:e,body:{list:{items:t}}}]);throw r.code="suppressions-file-invalid",r.details={path:j(e),errors:t},r}async function Ee(e){let n=g(e),s=await w(n);if(s.status==="missing")return[];s.status==="invalid"&&h(n,s.errors);let t=v(s.value);return t.ok||h(n,t.errors),t.suppressions}async function Pe(e,n){let s=[...new Set(n.filter(r=>r.code!==void 0).map(({path:r})=>r))],t=await Promise.all(s.map(async r=>{try{return await O(A(e,r)),!1}catch(o){return L(o)}}));return s.filter((r,o)=>t[o])}function ve(e){let n=P(G).safeParse(e.kind),s=_(4e3).safeParse(e.reason),t=n.success?[]:n.error.issues.map(i=>`--kind: ${i.message}`),r=s.success?[]:s.error.issues.map(i=>`--reason: ${i.message}`),o=[...e.kind===void 0?[]:t,...e.reason===void 0?[]:r];return o.length>0?{ok:!1,errors:o}:{ok:!0,decision:{...n.success?{kind:n.data}:{},...s.success?{reason:s.data}:{}},missing:[...e.kind===void 0?t:[],...e.reason===void 0?r:[]]}}function Ce(e){let n=_(4e3).safeParse(e);return n.success?void 0:n.error.issues[0]?.message}var ue=[[0,0],[-1,0],[0,1],[-1,1],[-2,1],[-1,2],[-2,2]],de=/[\w$.:/@-]{3,}/g;function xe(e,n,s,t){let r=pe(t,e,s);if(r!==void 0)return{status:"saved",entryIndex:r};let o=N(e.finding.location.file),i=u=>({source:e.source,check:e.checkId,kind:n.kind,path:o,...u===void 0?{}:{code:u},reason:n.reason}),a=i(void 0),c=le(a);if(c.length>0)return{status:"refused",problem:`its entry would be invalid: ${c.map(({message:u})=>u).join("; ")}`,invalidFields:[...new Set(c.map(({field:u})=>u))]};let d=V(e,s,Y(e.finding),i,a);return d.status==="refused"?d:{status:"change",change:{type:"add",entry:d.entry}}}function Ae(e,n,s,t,r){let{code:o,...i}=r[n],a=u=>({...i,kind:s.kind,...u===void 0?{}:{code:u},reason:s.reason}),c=Y(e.finding).filter(u=>u!==void 0),d=V(e,t,c,a,a(void 0));return d.status==="refused"?d:{status:"change",change:{type:"replace-code",index:n,code:d.code,kind:s.kind,reason:s.reason}}}function V(e,n,s,t,r){let{path:o}=r,i=c=>({status:"refused",problem:c,withoutCode:!0});if(s.length===0)return i("the results hold no code for its line, so no automatic code selector is available");let a=s.map(c=>({code:c,entry:t(c)})).find(({entry:c})=>fe(c,e,n));return a?{status:"named",...a}:i(e.finding.location.line===void 0?`it has no line, so its entry would cover every finding of ${e.checkId} in ${o}, and there are several`:`every automatic code candidate also names another finding of ${e.checkId} in ${o}`)}function Y(e){let{line:n}=e.location;if(n===void 0)return[void 0];let s=e.code_excerpt??[],t=s.find(i=>i.line===n);if(!t)return[];let r=ue.map(([i,a])=>s.filter(c=>c.line>=n+i&&c.line<=n+a).map(c=>c.text.trim()).filter(c=>c!=="").join(" ")),o=(t.text.match(de)??[]).filter(i=>e.message.includes(i)).sort((i,a)=>a.length-i.length);return[...new Set([...r,...o])].filter(i=>I(i)&&i.length<=4e3)}function Q(e){return(n,s)=>e[n]?.checks.find(t=>t.id===s)}function pe(e,n,s){return b({entries:e},Q(s)).entryFor(n.source,n.checkId,n.findingIndex)?.index}function fe(e,n,s){let t=b({entries:[e]},Q(s)),[r]=t.entries;return r?.status==="matched"&&r.matched_finding_count===1&&t.entryFor(n.source,n.checkId,n.findingIndex)!==void 0}function le(e){let n=y.safeParse(e);return[...n.success?[]:n.error.issues.flatMap(s=>B(s).map(({message:t})=>({field:String(s.path[0]),message:t}))),...Z([e]).map(s=>({field:"check",message:s.message.replace(/^suppressions\[0\]\./,"").replace(/\.$/,"")}))]}async function Ne(e,n,s,t){let r=g(e),o=await he(e,r);try{let i=await K(e),a=v(i);a.ok||h(r,a.errors),U(a.suppressions,s)||$();let c=structuredClone(i),d=n.map(l=>{if(l.type==="add")return c.suppressions.push(l.entry),{index:c.suppressions.length-1,change:"added",entry:l.entry};let f=c.suppressions[l.index];f||$();let se={...f.code===void 0?{}:{code:f.code},kind:f.kind,reason:f.reason};return f.code=l.code,f.kind=l.kind,f.reason=l.reason,{index:l.index,change:"code-replaced",entry:y.parse(f),previous:se}}),u=v(c);u.ok||h(r,u.errors);let ee=await R(e,c);return await t?.(),U(await K(e),i)||$(),await ee(),{path:r,saved:d}}finally{await o()}}var me={retries:4,minTimeout:100,factor:2};async function he(e,n){try{return await H.default.lock(e,{lockfilePath:`${n}.lock`,retries:me})}catch(s){if(!(s instanceof Error)||!("code"in s)||s.code!=="ELOCKED")throw s;let t=new S(`Another Shopify CLI command is saving ${k}.`,"Run the command again.");throw t.code="suppressions-file-locked",t}}async function K(e){let n=g(e),s=await w(n);return s.status==="invalid"&&h(n,s.errors),s.status==="missing"?{schema_version:m,suppressions:[]}:s.value}function $(){let e=new S("The app security suppressions changed before they could be saved.","Run the command again to use the current suppressions file.");throw e.code="suppressions-file-changed",e}export{G as a,Ee as b,Pe as c,ve as d,Ce as e,xe as f,Ae as g,Ne as h};
1
+ import{$ as j,B as k,D as g,H as R,M as w,d as L,p as T,q as b,r as M,s as I}from"./chunk-NAQJMRPT.js";import{a as re}from"./chunk-QLN6IOOY.js";import{j as S}from"./chunk-FJOVMEPN.js";import{na as O}from"./chunk-OIQ5NQ5I.js";import{b as p}from"./chunk-3PYDIBTX.js";import{c as A,d as N}from"./chunk-IWTNUJGY.js";import{e as ne,g as x}from"./chunk-VKWPEFWQ.js";x();var H=ne(re(),1);import{isDeepStrictEqual as U}from"node:util";var m=1,z=["deterministic","agent"],G=["false-positive","accepted-risk"],E=()=>p.string({required_error:"required",invalid_type_error:"must be a string"}),P=e=>p.enum(e,{errorMap:(n,s)=>({message:s.data===void 0?`required (${e.join(" or ")})`:`must be ${e.join(" or ")}`})}),_=e=>E().max(e,`must be at most ${e} characters`).refine(n=>n.trim()!=="","must not be empty");function te(e){if(e==="")return"must not be empty";if(e.length>1024)return`must be at most ${1024} characters`;if(e.includes("\0"))return"can't contain a NUL character";if(e.trim()!==e)return"must not start or end with whitespace";if(e.includes("\\"))return"must use / as the separator";if(e.startsWith("/")||/^[a-zA-Z]:/.test(e))return"must be relative to the app directory";if(/[*?]/.test(e))return"can't contain wildcards: name one file";let n=e.split("/"),s=n.findIndex(r=>r!=="..");if(!(s!==-1&&n.slice(s).every(r=>r!==""&&r!=="."&&r!=="..")))return'must name a file, without empty or "." segments, and with ".." only at the start'}var y=p.strictObject({source:P(z),check:E().min(1,"must not be empty"),kind:P(G),path:E().superRefine((e,n)=>{let s=te(e);s&&n.addIssue({code:p.ZodIssueCode.custom,message:s})}),code:_(4e3).refine(e=>e.trim()===""||I(e),`must contain at least ${M} characters that are not whitespace, commas, or semicolons`).optional(),reason:_(4e3)},{invalid_type_error:"must be an object"}),W=p.strictObject({$schema:p.string({invalid_type_error:"must be a string"}).optional(),schema_version:p.literal(m),suppressions:p.array(y,{required_error:"required",invalid_type_error:"must be an array"})}),X=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),oe=e=>z.some(n=>n===e);function ie(e){return e===null?"null":Array.isArray(e)?"array":typeof e}var D=40;function ce(e,n){if(e==="configurations")return"configurations is no longer supported. Suppressions apply to all app configurations; remove this field.";let s=e.length>D?`${e.slice(0,D)}\u2026`:e,t=n.find(o=>o.toLowerCase()===e.toLowerCase()),r=t===void 0?"":`. Did you mean ${JSON.stringify(t)}?`;return`unknown key ${JSON.stringify(s)}${r}`}function B(e){let n=e.path.map((o,i)=>typeof o=="number"?`[${o}]`:i===0?String(o):`.${o}`).join(""),[s,t]=e.path,r=o=>({entryIndex:s==="suppressions"&&typeof t=="number"?t:-1,message:n===""?o:`${n}: ${o}`});if(e.code===p.ZodIssueCode.unrecognized_keys){let o=Object.keys(n===""?W.shape:y.shape);return e.keys.map(i=>r(ce(i,o)))}return[r(e.message)]}function Z(e){if(!Array.isArray(e))return[];let n=T();return e.flatMap((s,t)=>{if(!X(s)||typeof s.check!="string"||s.check==="")return[];let r=`suppressions[${t}].check`,o=n.get(s.check);if(!o){let a=`${r}: not a check ID that this version of Shopify CLI knows. Check the spelling, or upgrade Shopify CLI.`;return[{entryIndex:t,message:a}]}if(!oe(s.source)||o.has(s.source))return[];let i=[...o].join(" or ");return[{entryIndex:t,message:`${r}: ${s.source} checks in this version of Shopify CLI don't report ${s.check}. Use "source": "${i}", or upgrade Shopify CLI.`}]})}function ae(e){if(!Array.isArray(e))return[];let n=new Map;return e.flatMap((s,t)=>{let r=y.safeParse(s);if(!r.success)return[];let{source:o,check:i,path:a,code:c}=r.data,d=JSON.stringify([o,i,a,c?.replace(/[\s,;]/g,"")??null]),u=n.get(d);return u===void 0?(n.set(d,t),[]):[{entryIndex:t,message:`suppressions[${t}]: duplicates suppressions[${u}]`}]})}function v(e){if(!X(e))return{ok:!1,errors:[`expected a JSON object, received ${ie(e)}`]};let n=e.schema_version;if(n!==m)return{ok:!1,errors:[typeof n=="number"&&Number.isSafeInteger(n)&&n>m?`schema_version ${n} needs a newer version of Shopify CLI`:`schema_version must be ${m}`]};let s=W.safeParse(e),t=[...s.success?[]:s.error.issues.flatMap(B),...Z(e.suppressions),...ae(e.suppressions)].sort((r,o)=>r.entryIndex-o.entryIndex);return!s.success||t.length>0?{ok:!1,errors:t.map(r=>r.message)}:{ok:!0,suppressions:s.data.suppressions}}var J=50;function h(e,n){let s=n.length-J,t=s>0?[...n.slice(0,J),`\u2026and ${s} more`]:n,r=new S(`The app security suppressions could not be loaded because ${k} is invalid.`,null,[`Fix every error in ${k}, then run the command again.`],[{title:e,body:{list:{items:t}}}]);throw r.code="suppressions-file-invalid",r.details={path:j(e),errors:t},r}async function Ee(e){let n=g(e),s=await w(n);if(s.status==="missing")return[];s.status==="invalid"&&h(n,s.errors);let t=v(s.value);return t.ok||h(n,t.errors),t.suppressions}async function Pe(e,n){let s=[...new Set(n.filter(r=>r.code!==void 0).map(({path:r})=>r))],t=await Promise.all(s.map(async r=>{try{return await O(A(e,r)),!1}catch(o){return L(o)}}));return s.filter((r,o)=>t[o])}function ve(e){let n=P(G).safeParse(e.kind),s=_(4e3).safeParse(e.reason),t=n.success?[]:n.error.issues.map(i=>`--kind: ${i.message}`),r=s.success?[]:s.error.issues.map(i=>`--reason: ${i.message}`),o=[...e.kind===void 0?[]:t,...e.reason===void 0?[]:r];return o.length>0?{ok:!1,errors:o}:{ok:!0,decision:{...n.success?{kind:n.data}:{},...s.success?{reason:s.data}:{}},missing:[...e.kind===void 0?t:[],...e.reason===void 0?r:[]]}}function Ce(e){let n=_(4e3).safeParse(e);return n.success?void 0:n.error.issues[0]?.message}var ue=[[0,0],[-1,0],[0,1],[-1,1],[-2,1],[-1,2],[-2,2]],de=/[\w$.:/@-]{3,}/g;function xe(e,n,s,t){let r=pe(t,e,s);if(r!==void 0)return{status:"saved",entryIndex:r};let o=N(e.finding.location.file),i=u=>({source:e.source,check:e.checkId,kind:n.kind,path:o,...u===void 0?{}:{code:u},reason:n.reason}),a=i(void 0),c=le(a);if(c.length>0)return{status:"refused",problem:`its entry would be invalid: ${c.map(({message:u})=>u).join("; ")}`,invalidFields:[...new Set(c.map(({field:u})=>u))]};let d=V(e,s,Y(e.finding),i,a);return d.status==="refused"?d:{status:"change",change:{type:"add",entry:d.entry}}}function Ae(e,n,s,t,r){let{code:o,...i}=r[n],a=u=>({...i,kind:s.kind,...u===void 0?{}:{code:u},reason:s.reason}),c=Y(e.finding).filter(u=>u!==void 0),d=V(e,t,c,a,a(void 0));return d.status==="refused"?d:{status:"change",change:{type:"replace-code",index:n,code:d.code,kind:s.kind,reason:s.reason}}}function V(e,n,s,t,r){let{path:o}=r,i=c=>({status:"refused",problem:c,withoutCode:!0});if(s.length===0)return i("the results hold no code for its line, so no automatic code selector is available");let a=s.map(c=>({code:c,entry:t(c)})).find(({entry:c})=>fe(c,e,n));return a?{status:"named",...a}:i(e.finding.location.line===void 0?`it has no line, so its entry would cover every finding of ${e.checkId} in ${o}, and there are several`:`every automatic code candidate also names another finding of ${e.checkId} in ${o}`)}function Y(e){let{line:n}=e.location;if(n===void 0)return[void 0];let s=e.code_excerpt??[],t=s.find(i=>i.line===n);if(!t)return[];let r=ue.map(([i,a])=>s.filter(c=>c.line>=n+i&&c.line<=n+a).map(c=>c.text.trim()).filter(c=>c!=="").join(" ")),o=(t.text.match(de)??[]).filter(i=>e.message.includes(i)).sort((i,a)=>a.length-i.length);return[...new Set([...r,...o])].filter(i=>I(i)&&i.length<=4e3)}function Q(e){return(n,s)=>e[n]?.checks.find(t=>t.id===s)}function pe(e,n,s){return b({entries:e},Q(s)).entryFor(n.source,n.checkId,n.findingIndex)?.index}function fe(e,n,s){let t=b({entries:[e]},Q(s)),[r]=t.entries;return r?.status==="matched"&&r.matched_finding_count===1&&t.entryFor(n.source,n.checkId,n.findingIndex)!==void 0}function le(e){let n=y.safeParse(e);return[...n.success?[]:n.error.issues.flatMap(s=>B(s).map(({message:t})=>({field:String(s.path[0]),message:t}))),...Z([e]).map(s=>({field:"check",message:s.message.replace(/^suppressions\[0\]\./,"").replace(/\.$/,"")}))]}async function Ne(e,n,s,t){let r=g(e),o=await he(e,r);try{let i=await K(e),a=v(i);a.ok||h(r,a.errors),U(a.suppressions,s)||$();let c=structuredClone(i),d=n.map(l=>{if(l.type==="add")return c.suppressions.push(l.entry),{index:c.suppressions.length-1,change:"added",entry:l.entry};let f=c.suppressions[l.index];f||$();let se={...f.code===void 0?{}:{code:f.code},kind:f.kind,reason:f.reason};return f.code=l.code,f.kind=l.kind,f.reason=l.reason,{index:l.index,change:"code-replaced",entry:y.parse(f),previous:se}}),u=v(c);u.ok||h(r,u.errors);let ee=await R(e,c);return await t?.(),U(await K(e),i)||$(),await ee(),{path:r,saved:d}}finally{await o()}}var me={retries:4,minTimeout:100,factor:2};async function he(e,n){try{return await H.default.lock(e,{lockfilePath:`${n}.lock`,retries:me})}catch(s){if(!(s instanceof Error)||!("code"in s)||s.code!=="ELOCKED")throw s;let t=new S(`Another Shopify CLI command is saving ${k}.`,"Run the command again.");throw t.code="suppressions-file-locked",t}}async function K(e){let n=g(e),s=await w(n);return s.status==="invalid"&&h(n,s.errors),s.status==="missing"?{schema_version:m,suppressions:[]}:s.value}function $(){let e=new S("The app security suppressions changed before they could be saved.","Run the command again to use the current suppressions file.");throw e.code="suppressions-file-changed",e}export{G as a,Ee as b,Pe as c,ve as d,Ce as e,xe as f,Ae as g,Ne as h};
@@ -1 +1 @@
1
- import{b as a}from"./chunk-SHOMIS6Q.js";import{b as s}from"./chunk-XEZPN5TR.js";import{Na as i}from"./chunk-YKDRUAY3.js";import{b as m}from"./chunk-AE3IQG7S.js";import{e as d,g as e}from"./chunk-VKWPEFWQ.js";e();var n=d(m(),1);var t=class c extends s{static description="List current notifications configured for the CLI.";static hidden=!0;static flags={"ignore-errors":n.Flags.boolean({hidden:!1,description:"Don't fail if an error occurs.",env:"SHOPIFY_FLAG_IGNORE_ERRORS"})};async run(){let{flags:f}=await this.parse(c);try{await a()}catch(r){let o="Error fetching notifications";if(r instanceof Error&&(o=o.concat(`: ${r.message}`)),await i(o,"expected_error"),!f["ignore-errors"])throw r}}};export{t as a};
1
+ import{b as a}from"./chunk-SWFCT5B7.js";import{b as s}from"./chunk-PSREELSQ.js";import{Oa as i}from"./chunk-UORSJB4A.js";import{b as m}from"./chunk-VBPMVVLV.js";import{e as d,g as e}from"./chunk-VKWPEFWQ.js";e();var n=d(m(),1);var t=class c extends s{static description="List current notifications configured for the CLI.";static hidden=!0;static flags={"ignore-errors":n.Flags.boolean({hidden:!1,description:"Don't fail if an error occurs.",env:"SHOPIFY_FLAG_IGNORE_ERRORS"})};async run(){let{flags:f}=await this.parse(c);try{await a()}catch(r){let o="Error fetching notifications";if(r instanceof Error&&(o=o.concat(`: ${r.message}`)),await i(o,"expected_error"),!f["ignore-errors"])throw r}}};export{t as a};
@@ -1,4 +1,4 @@
1
- import{a as Z}from"./chunk-LGDWE3H3.js";import{a as Q,b as X}from"./chunk-WE5KY6T6.js";import{b as E,c as O,d as I,e as P}from"./chunk-F5QKMDP3.js";import{c as z,e as K}from"./chunk-OTMYJWIP.js";import{B as V,m as _,t as F,u as $,v as W,z as H}from"./chunk-4WBWZIN5.js";import{q as R,s as k}from"./chunk-3FZ4LE6A.js";import{a as c}from"./chunk-JIY6XWSC.js";import{V as U,y as B}from"./chunk-2KUM2RU4.js";import{a as M}from"./chunk-LG3KEHGD.js";import{i as S}from"./chunk-TD6JBHUS.js";import{Bb as w,Eb as f,Fb as q,kb as J,mb as b,ob as y,pb as T,tb as p,vb as u,zb as Y}from"./chunk-ZMOW2YZ4.js";import{b as r}from"./chunk-3PYDIBTX.js";import{d as G}from"./chunk-DOLVBTCB.js";import{g as x,o as j,p as D,q as N}from"./chunk-IWTNUJGY.js";import{a as ce}from"./chunk-O472FAYX.js";import{e as se,g as m}from"./chunk-VKWPEFWQ.js";m();m();m();import{resolve as le}from"node:path";var ee=M({name:"UpgradeResult",schema:r.union([r.object({status:r.literal("success"),changed:r.boolean().describe("Whether the verified installed version differs from previousVersion."),scope:r.literal("global"),previousVersion:r.string().min(1),version:r.string().min(1),packageManager:r.enum(["npm","pnpm","yarn","bun","homebrew"])}).strict(),r.object({status:r.literal("success"),changed:r.null().describe("Null because local dependency changes and installed versions are not verified."),scope:r.literal("local"),directory:r.string().refine(x,"Must be an absolute filesystem path.").transform(e=>le(e)),previousVersion:r.string().min(1),availableVersion:r.string().min(1).nullable().describe("The available registry version, or null when unknown."),packages:r.array(r.string().min(1))}).strict(),r.object({status:r.literal("skipped"),reason:r.enum(["development","local-autoupgrade","dependency-not-found"]),scope:r.enum(["global","local"])}).strict()])});function ne(e,n){n==="json"?Y(ee.encode(e)):e.status==="success"&&e.scope==="global"&&B({headline:"Shopify CLI upgraded.",body:`You're now on version ${e.version}.`})}var g=se(ce());function re(e){let n=y();if(!(!n||n==="unknown"))return n==="homebrew"?`brew upgrade ${b()}`:n==="yarn"?`${n} global add @shopify/cli@${e}`:`${n} ${n==="pnpm"?"add":"install"} -g @shopify/cli@${e}`}async function Fe(e={}){ne(await pe(e),"text")}async function pe(e={}){let n=N()??D(),t=T(n),a=J();if(G())return w("Skipping upgrade in development mode."),{status:"skipped",reason:"development",scope:a?"global":"local"};if(e.autoupgrade&&!a)return{status:"skipped",reason:"local-autoupgrade",scope:"local"};if(a){let s=y(),i=re(e.version??"latest");if(!i||s==="unknown")throw new Error("Could not determine the package manager");let[o,...l]=i.split(" ");if(!o)throw new Error("Could not determine the command to run");let d=e.version??(s==="homebrew"?await O():await $("@shopify/cli",c,{cacheExpiryInHours:24})),C=d&&(0,g.lt)(c,d)?`\u2728 New version of Shopify CLI available! (${c} \u2192 ${d})`:"\u2728 New version of Shopify CLI available!";w(u`${C}
1
+ import{a as Z}from"./chunk-5ZG2SWU2.js";import{a as Q,b as X}from"./chunk-FOMMPAWZ.js";import{b as E,c as O,d as I,e as P}from"./chunk-LXFWK3O2.js";import{c as z,e as K}from"./chunk-2KACAQJS.js";import{B as V,m as _,t as F,u as $,v as W,z as H}from"./chunk-OSASE35V.js";import{q as R,s as k}from"./chunk-CE6XQDAG.js";import{a as c}from"./chunk-EE72PCKT.js";import{V as U,y as B}from"./chunk-7A4ZE5IS.js";import{a as M}from"./chunk-LG3KEHGD.js";import{j as S}from"./chunk-FJOVMEPN.js";import{Bb as w,Eb as f,Fb as q,kb as J,mb as b,ob as y,pb as T,tb as p,vb as u,zb as Y}from"./chunk-OIQ5NQ5I.js";import{b as r}from"./chunk-3PYDIBTX.js";import{d as G}from"./chunk-A5BSUUNQ.js";import{g as x,o as j,p as D,q as N}from"./chunk-IWTNUJGY.js";import{a as ce}from"./chunk-O472FAYX.js";import{e as se,g as m}from"./chunk-VKWPEFWQ.js";m();m();m();import{resolve as le}from"node:path";var ee=M({name:"UpgradeResult",schema:r.union([r.object({status:r.literal("success"),changed:r.boolean().describe("Whether the verified installed version differs from previousVersion."),scope:r.literal("global"),previousVersion:r.string().min(1),version:r.string().min(1),packageManager:r.enum(["npm","pnpm","yarn","bun","homebrew"])}).strict(),r.object({status:r.literal("success"),changed:r.null().describe("Null because local dependency changes and installed versions are not verified."),scope:r.literal("local"),directory:r.string().refine(x,"Must be an absolute filesystem path.").transform(e=>le(e)),previousVersion:r.string().min(1),availableVersion:r.string().min(1).nullable().describe("The available registry version, or null when unknown."),packages:r.array(r.string().min(1))}).strict(),r.object({status:r.literal("skipped"),reason:r.enum(["development","local-autoupgrade","dependency-not-found"]),scope:r.enum(["global","local"])}).strict()])});function ne(e,n){n==="json"?Y(ee.encode(e)):e.status==="success"&&e.scope==="global"&&B({headline:"Shopify CLI upgraded.",body:`You're now on version ${e.version}.`})}var g=se(ce());function re(e){let n=y();if(!(!n||n==="unknown"))return n==="homebrew"?`brew upgrade ${b()}`:n==="yarn"?`${n} global add @shopify/cli@${e}`:`${n} ${n==="pnpm"?"add":"install"} -g @shopify/cli@${e}`}async function Fe(e={}){ne(await pe(e),"text")}async function pe(e={}){let n=N()??D(),t=T(n),a=J();if(G())return w("Skipping upgrade in development mode."),{status:"skipped",reason:"development",scope:a?"global":"local"};if(e.autoupgrade&&!a)return{status:"skipped",reason:"local-autoupgrade",scope:"local"};if(a){let s=y(),i=re(e.version??"latest");if(!i||s==="unknown")throw new Error("Could not determine the package manager");let[o,...l]=i.split(" ");if(!o)throw new Error("Could not determine the command to run");let d=e.version??(s==="homebrew"?await O():await $("@shopify/cli",c,{cacheExpiryInHours:24})),C=d&&(0,g.lt)(c,d)?`\u2728 New version of Shopify CLI available! (${c} \u2192 ${d})`:"\u2728 New version of Shopify CLI available!";w(u`${C}
2
2
  Now upgrading by running: ${p.genericShellCommand(i)}...`);let ae=e.autoupgrade&&s==="homebrew"?{env:{HOMEBREW_NO_AUTO_UPDATE:"1"}}:{};await X(o,l,ae);let ie=s==="homebrew"?b().replace(/^shopify-cli@?/,"shopify"):"shopify",h=await E(ie);if(!h)throw new S("Couldn't verify the Shopify CLI version after upgrading.",u`Check the installed version by running ${p.genericShellCommand("shopify version")}.`);let A=d??c;if((0,g.lt)(h,A))throw new S(`Failed to upgrade Shopify CLI. Expected to be on version ${A}, but version ${h} is now installed.`,"Your package manager may be resolving @shopify/cli from a registry with outdated versions. Check your npm registry configuration and try again.");return{status:"success",changed:h!==c,scope:"global",previousVersion:c,version:h,packageManager:s}}else{if(t)return de(t,c);throw new Error("Could not determine the local project directory")}}function We(){let e=c,n=process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1";if(!n&&!k()){f("Auto-upgrade: Skipping because auto-upgrade is not enabled.");return}if(!n&&U()){f("Auto-upgrade: Skipping auto-upgrade in CI.");return}if(!n&&I(e)){f("Auto-upgrade: Skipping auto-upgrade for pre-release version.");return}let t=Z(),a=t&&(0,g.lt)(e,t)?t:void 0;return a||f("Auto-upgrade: No newer version available in the current major."),a}async function He(){try{let{notifications:e}=await z();return K(e,"",["autoupgrade"]).some(t=>t.type==="error")}catch{return!1}}async function Be(){if(U()||I(c))return;let e=W("@shopify/cli",c);if(!e)return;let n=P(c,e);k()&&!n||await R("warn-on-available-upgrade",{days:1},async()=>{q(ue(e,n))})}function ue(e,n=!1){let t=re(e),a;if(y()==="homebrew"){let o=/^shopify-cli@(\d+)$/.exec(b())?.[1],l=new g.SemVer(e).major;o&&Number(o)!==l&&(t=`brew install shopify-cli@${l}`,a=`shopify${l}`)}let s=t?u`💡 Version ${e} available! Run ${p.genericShellCommand(t)}`.value:u`💡 Version ${e} available!`.value,i=a?`${s}
3
3
  Use ${a} to run this major.`:s;if(n){let o=`https://github.com/Shopify/cli/releases/tag/${e}`,l=u`⚠️ This is a major version — review breaking changes before upgrading:\n ${p.link(o,o)}`.value;return`${i}
4
4
 
@@ -1 +1 @@
1
- import{a as p,d as m,e as u,f,g as h}from"./chunk-5T3ZT6CC.js";import{a as c}from"./chunk-RSZAAN37.js";import{a as s}from"./chunk-ASKBYEO7.js";import{P as r}from"./chunk-HMPRWNGG.js";import{b as a,c as n}from"./chunk-DMOLPSXF.js";import{b as v}from"./chunk-AE3IQG7S.js";import{e as S,g as i}from"./chunk-VKWPEFWQ.js";i();var d=S(v(),1);var o=class l extends c{static jsonOutputSchema=m;static summary="Fetch the latest GraphQL schema for a function.";static 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.";static description=this.descriptionForHelp();static flags={...a,...s,...f,...n,stdout:d.Flags.boolean({description:"Output the schema to stdout instead of writing to a file.",required:!1,default:!1,env:"SHOPIFY_FLAG_STDOUT"})};async run(){let{flags:t}=await this.parse(l),{app:e,developerPlatformClient:g,organization:F}=await r({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),y=await h(e,t.path),w=await p({app:e,extension:y,developerPlatformClient:g,orgId:F.id});return await u(w,{stdout:t.stdout,json:t.json}),{app:e}}};export{o as a};
1
+ import{a as p,d as m,e as u,f,g as h}from"./chunk-PIU3GVJ4.js";import{a as c}from"./chunk-R5COVIJM.js";import{a as s}from"./chunk-K4KKSBUW.js";import{P as r}from"./chunk-7FBOMPO5.js";import{b as a,c as n}from"./chunk-IKXUYCK7.js";import{b as v}from"./chunk-VBPMVVLV.js";import{e as S,g as i}from"./chunk-VKWPEFWQ.js";i();var d=S(v(),1);var o=class l extends c{static jsonOutputSchema=m;static summary="Fetch the latest GraphQL schema for a function.";static 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.";static description=this.descriptionForHelp();static flags={...a,...s,...f,...n,stdout:d.Flags.boolean({description:"Output the schema to stdout instead of writing to a file.",required:!1,default:!1,env:"SHOPIFY_FLAG_STDOUT"})};async run(){let{flags:t}=await this.parse(l),{app:e,developerPlatformClient:g,organization:F}=await r({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),y=await h(e,t.path),w=await p({app:e,extension:y,developerPlatformClient:g,orgId:F.id});return await u(w,{stdout:t.stdout,json:t.json}),{app:e}}};export{o as a};
@@ -1,4 +1,4 @@
1
- import{b as c}from"./chunk-4FWPOGPQ.js";import{B as a,f,k as y,m as b,u as p}from"./chunk-A2NSORBM.js";import{b as w}from"./chunk-AE3IQG7S.js";import{e as k,g as d}from"./chunk-VKWPEFWQ.js";d();var v=k(w(),1),L=["high","medium","low","none"],B={blocking:v.Flags.custom({description:"The minimum check severity that causes a non-zero exit code when the check has active findings: high, medium, or low. Suppressed and superseded findings never count. Defaults to none, which never fails on findings.",options:L,default:"none",env:"SHOPIFY_FLAG_APP_SECURITY_BLOCKING"})()};d();function U(e,n){return n==="none"?0:e.filter(t=>f[t.severity]>=f[n]&&t.findings.some(i=>i.disposition==="active")).length}async function V({includeDirs:e,excludePatterns:n,noGitIgnore:t,...i}){let s=Date.now();return{...await b(i,{includeDirs:e,excludePatterns:n,noGitIgnore:t}),elapsedMilliseconds:Date.now()-s}}function K({includeDirs:e,excludePatterns:n,noGitIgnore:t,...i}){return y(i,{includeDirs:e,excludePatterns:n,noGitIgnore:t})}d();var P={high:"High",medium:"Medium",low:"Low"},_={"false-positive":"false positive","accepted-risk":"accepted risk"};function Q(e,n){let t=e.filter(r=>m(r).length>0);if(t.length===0)return;let i=e.reduce((r,h)=>r+m(h).length,0),s=e.reduce((r,h)=>r+p(h).length,0),o=new Set(e.map(r=>r.id)),u=n.filter(r=>r.matched_finding_count>0&&o.has(r.entry.check));return{headline:`${c(i,"finding")} suppressed.`,counts:S(s,i),sections:[...t.map(I),...u.length>0?[x(u)]:[]]}}function X(e,n){let t=e.filter(u=>u.status==="stale"),i=e.filter(u=>u.status==="ambiguous"),s=e.filter(u=>u.status==="not-evaluated"),o=t.length+i.length;if(o+s.length!==0)return{headline:R(o,s.length),needsChange:o>0,sections:[...t.length>0?F(t,n):[],...i.length>0?N(i):[],...s.length>0?[{body:{subdued:Y(s)}}]:[]]}}function m(e){return e.findings.flatMap(n=>n.disposition==="suppressed"&&n.suppressed_by?[{finding:n,suppression:n.suppressed_by}]:[])}function S(e,n){return`${e} active \xB7 ${n} suppressed`}function I(e){let n=m(e),t=S(p(e).length,n.length);return{title:`${P[e.severity]} \xB7 ${e.id} \xB7 ${t}`,body:{list:{items:n.map(A)}}}}function A({finding:e,suppression:n}){return[{filePath:$(e.location)},{subdued:`\xB7 ${e.source} \xB7 ${T(n)}`},`
1
+ import{b as c}from"./chunk-4M5WHOZW.js";import{B as a,f,k as y,m as b,u as p}from"./chunk-NAQJMRPT.js";import{b as w}from"./chunk-VBPMVVLV.js";import{e as k,g as d}from"./chunk-VKWPEFWQ.js";d();var v=k(w(),1),L=["high","medium","low","none"],B={blocking:v.Flags.custom({description:"The minimum check severity that causes a non-zero exit code when the check has active findings: high, medium, or low. Suppressed and superseded findings never count. Defaults to none, which never fails on findings.",options:L,default:"none",env:"SHOPIFY_FLAG_APP_SECURITY_BLOCKING"})()};d();function U(e,n){return n==="none"?0:e.filter(t=>f[t.severity]>=f[n]&&t.findings.some(i=>i.disposition==="active")).length}async function V({includeDirs:e,excludePatterns:n,noGitIgnore:t,...i}){let s=Date.now();return{...await b(i,{includeDirs:e,excludePatterns:n,noGitIgnore:t}),elapsedMilliseconds:Date.now()-s}}function K({includeDirs:e,excludePatterns:n,noGitIgnore:t,...i}){return y(i,{includeDirs:e,excludePatterns:n,noGitIgnore:t})}d();var P={high:"High",medium:"Medium",low:"Low"},_={"false-positive":"false positive","accepted-risk":"accepted risk"};function Q(e,n){let t=e.filter(r=>m(r).length>0);if(t.length===0)return;let i=e.reduce((r,h)=>r+m(h).length,0),s=e.reduce((r,h)=>r+p(h).length,0),o=new Set(e.map(r=>r.id)),u=n.filter(r=>r.matched_finding_count>0&&o.has(r.entry.check));return{headline:`${c(i,"finding")} suppressed.`,counts:S(s,i),sections:[...t.map(I),...u.length>0?[x(u)]:[]]}}function X(e,n){let t=e.filter(u=>u.status==="stale"),i=e.filter(u=>u.status==="ambiguous"),s=e.filter(u=>u.status==="not-evaluated"),o=t.length+i.length;if(o+s.length!==0)return{headline:R(o,s.length),needsChange:o>0,sections:[...t.length>0?F(t,n):[],...i.length>0?N(i):[],...s.length>0?[{body:{subdued:Y(s)}}]:[]]}}function m(e){return e.findings.flatMap(n=>n.disposition==="suppressed"&&n.suppressed_by?[{finding:n,suppression:n.suppressed_by}]:[])}function S(e,n){return`${e} active \xB7 ${n} suppressed`}function I(e){let n=m(e),t=S(p(e).length,n.length);return{title:`${P[e.severity]} \xB7 ${e.id} \xB7 ${t}`,body:{list:{items:n.map(A)}}}}function A({finding:e,suppression:n}){return[{filePath:$(e.location)},{subdued:`\xB7 ${e.source} \xB7 ${T(n)}`},`
2
2
  ${n.reason}`]}function T(e){return e.origin==="agent"?"suppressed by the agent":`${_[e.kind]} \xB7 ${g(e.entry_index)}`}function g(e){return`suppressions[${e}]`}function x(e){return{title:"Entries in shopify.app-security.json",body:{list:{items:e.map(({index:n,entry:t,matched_finding_count:i})=>[{subdued:`${g(n)}:`},`${t.source} ${t.check} in`,{filePath:t.path},{subdued:`\xB7 matches ${c(i,"finding")}`}])}}}}function R(e,n){let t=a;return e===0?`${l(n)} in ${t} not evaluated.`:`${l(e)} in ${t} ${e===1?"suppresses":"suppress"} nothing.`}function F(e,n){return[{title:`Stale entries in ${a}`,body:{list:{items:e.map(t=>C(t,n))}}},{body:e.length===1?"This entry matches no finding. Remove it, or update it to match the code.":"These entries match no finding. Remove each entry, or update it to match the code."}]}function N(e){return[{title:`Ambiguous entries in ${a}`,body:{list:{items:e.map(G)}}},{body:e.length===1?"This entry suppresses nothing. Give it a more specific code that matches one finding.":"These entries suppress nothing. Give each entry a more specific code that matches one finding."}]}function E({index:e,entry:n}){return[{subdued:`${g(e)}:`},`${n.source} ${n.check} in`,{filePath:n.path}]}function C(e,n){return[...E(e),{subdued:`\xB7 ${_[e.entry.kind]}`},`
3
3
  ${e.entry.reason}`,...e.likely_path===void 0?[]:[`
4
4
  Maybe moved to`,{filePath:e.likely_path}],...M(e,n)]}function M({index:e,likely_finding:n},{review:t,reattach:i}){if(n===void 0)return[];let s={filePath:$({file:n.file,line:n.line})},o=i?.findingNumbers.get(e);return i&&o!==void 0?[`
@@ -1,2 +1,2 @@
1
- import{b as x,c as D,f as M}from"./chunk-OTMYJWIP.js";import{a as o}from"./chunk-JIY6XWSC.js";import{C as s,F as h,I as e,y}from"./chunk-2KUM2RU4.js";import{d as w}from"./chunk-QBRRFFMZ.js";import{Bb as _,ta as u}from"./chunk-ZMOW2YZ4.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();async function $(){let a=new Date,n=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${a.getDate().toString().padStart(2,"0")}`,i=w(),t=await s({message:"Type of message?",choices:[{label:"Info",value:"info"},{label:"Warning",value:"warning"},{label:"Error",value:"error"}]}),b=await e({message:"Title"}),E=await e({message:"Message"}),S=await s({message:"Frequency",choices:[{label:"Only once",value:"once"},{label:"Once a week",value:"once_a_week"},{label:"Once a day",value:"once_a_day"},{label:"Always",value:"always"}]}),r=await e({message:"Minimum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),l=await e({message:"Maximum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),m=await e({message:"Minimum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),c=await e({message:"Maximum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),f=await e({message:"Surface. E.g.: app, theme, hydrogen, theme_app_extension... (optional)",allowEmpty:!0}),g=await e({message:"Comma separated list of commands. E.g.: app:generate:extension (optional)",allowEmpty:!0}),T=await e({message:"Slack channel of the team who will own this notification"}),d=await x(),v={id:i,type:t,title:b,frequency:S,message:E,minVersion:r.length===0?void 0:r,maxVersion:l.length===0?void 0:l,minDate:m.length===0?void 0:m,maxDate:c.length===0?void 0:c,surface:f.length===0?void 0:f,commands:g.length===0?void 0:g.split(",").map(N=>N.trim()),ownerChannel:T};d.notifications.push(v),await u("./notifications.json",JSON.stringify(d)),y({headline:"notifications.json file updated successfully."})}async function j(){let a=await D(),n={type:{header:"Type",color:"dim"},title:{header:"Title",color:"dim"},message:{header:"Message",color:"dim"},filters:{header:"Filters",color:"dim"}},i=a.notifications.map(t=>({type:t.type,title:t.title??"",message:t.message,filters:M(t)}));h({rows:i,columns:n}),_(`
1
+ import{b as x,c as D,f as M}from"./chunk-2KACAQJS.js";import{a as o}from"./chunk-EE72PCKT.js";import{C as s,F as h,I as e,y}from"./chunk-7A4ZE5IS.js";import{d as w}from"./chunk-QBRRFFMZ.js";import{Bb as _,ta as u}from"./chunk-OIQ5NQ5I.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();async function $(){let a=new Date,n=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${a.getDate().toString().padStart(2,"0")}`,i=w(),t=await s({message:"Type of message?",choices:[{label:"Info",value:"info"},{label:"Warning",value:"warning"},{label:"Error",value:"error"}]}),b=await e({message:"Title"}),E=await e({message:"Message"}),S=await s({message:"Frequency",choices:[{label:"Only once",value:"once"},{label:"Once a week",value:"once_a_week"},{label:"Once a day",value:"once_a_day"},{label:"Always",value:"always"}]}),r=await e({message:"Minimum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),l=await e({message:"Maximum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),m=await e({message:"Minimum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),c=await e({message:"Maximum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),f=await e({message:"Surface. E.g.: app, theme, hydrogen, theme_app_extension... (optional)",allowEmpty:!0}),g=await e({message:"Comma separated list of commands. E.g.: app:generate:extension (optional)",allowEmpty:!0}),T=await e({message:"Slack channel of the team who will own this notification"}),d=await x(),v={id:i,type:t,title:b,frequency:S,message:E,minVersion:r.length===0?void 0:r,maxVersion:l.length===0?void 0:l,minDate:m.length===0?void 0:m,maxDate:c.length===0?void 0:c,surface:f.length===0?void 0:f,commands:g.length===0?void 0:g.split(",").map(N=>N.trim()),ownerChannel:T};d.notifications.push(v),await u("./notifications.json",JSON.stringify(d)),y({headline:"notifications.json file updated successfully."})}async function j(){let a=await D(),n={type:{header:"Type",color:"dim"},title:{header:"Title",color:"dim"},message:{header:"Message",color:"dim"},filters:{header:"Filters",color:"dim"}},i=a.notifications.map(t=>({type:t.type,title:t.title??"",message:t.message,filters:M(t)}));h({rows:i,columns:n}),_(`
2
2
  `)}export{$ as a,j as b};
@@ -1,4 +1,4 @@
1
- import{c as y,d as N,e as x,f as oe}from"./chunk-6IMTMS2S.js";import{a as te,c as re}from"./chunk-4NFX7YCT.js";import{a as q,c as V,e as O,f as U,h as W,i as G,m as _,p as Q,q as X,r as z,s as H,u as ee}from"./chunk-Z5QEXS6F.js";import{a as Z}from"./chunk-RSZAAN37.js";import{a as K,b as Y}from"./chunk-ASKBYEO7.js";import{b as ue}from"./chunk-YKDRUAY3.js";import{b as F,c as J}from"./chunk-DMOLPSXF.js";import{A as C,H as j,a as $,x as T,y as w,z as B}from"./chunk-2KUM2RU4.js";import{i as h,l as I}from"./chunk-TD6JBHUS.js";import{Fb as P,Sa as M,la as L,ta as S,tb as p,vb as d,zb as g}from"./chunk-ZMOW2YZ4.js";import{e as R}from"./chunk-IWTNUJGY.js";import{e as le,g as f}from"./chunk-VKWPEFWQ.js";f();f();async function pe(o,e){if(o)return o.join(`
1
+ import{c as y,d as N,e as x,f as oe}from"./chunk-OTMTS5L4.js";import{a as te,c as re}from"./chunk-652NT7OW.js";import{a as q,c as V,e as O,f as U,h as W,i as G,m as _,p as Q,q as X,r as z,s as H,u as ee}from"./chunk-NMXRDF4T.js";import{a as Z}from"./chunk-R5COVIJM.js";import{a as K,b as Y}from"./chunk-K4KKSBUW.js";import{b as ue}from"./chunk-UORSJB4A.js";import{b as F,c as J}from"./chunk-IKXUYCK7.js";import{A as C,H as j,a as $,x as T,y as w,z as B}from"./chunk-7A4ZE5IS.js";import{j as h,n as I}from"./chunk-FJOVMEPN.js";import{Fb as P,Sa as M,la as L,ta as S,tb as p,vb as d,zb as g}from"./chunk-OIQ5NQ5I.js";import{e as R}from"./chunk-IWTNUJGY.js";import{e as le,g as f}from"./chunk-VKWPEFWQ.js";f();f();async function pe(o,e){if(o)return o.join(`
2
2
  `);if(e){if(!await M(e))throw new h(d`Variable file not found at ${p.path(e)}. Please check the path and try again.`);return L(e,{encoding:"utf8"})}else return}async function ne(o){let{remoteApp:e,store:a,query:n,variables:s,variableFile:t,watch:r=!1,version:i}=o,{adminSession:l,version:u}=await j({title:d`Authenticating`,task:async()=>{let E=await te(e,a.shopDomain),k=await U({adminSession:E,userSpecifiedVersion:i,minimumDefaultVersion:q});return{adminSession:E,version:k}},renderOptions:{stdout:process.stderr}}),c=await pe(s,t);return de(n,c),re(n,a),{adminSession:l,version:u,query:n,variablesJsonl:c,watch:r}}async function ae(o){let{adminSession:e,version:a,query:n,variablesJsonl:s,watch:t}=o,r=O(n)?await G({adminSession:e,query:n,variablesJsonl:s,version:a}):await W({adminSession:e,query:n,version:a});if(r?.userErrors?.length||!r?.bulkOperation)return{store:e.storeFqdn,apiVersion:a,query:n,operation:r?.bulkOperation??null,userErrors:r?.userErrors??[],watchAborted:!1};let i=new $,l=t?await X(e,r.bulkOperation.id,i.signal,()=>i.abort()):await Q(e,r.bulkOperation.id),u=t&&!i.signal.aborted&&l.status==="COMPLETED"&&l.url?await z(l.url):void 0;return{store:e.storeFqdn,apiVersion:a,query:n,operation:l,userErrors:[],watchAborted:i.signal.aborted,results:u}}function de(o,e){if(O(o)&&!e)throw new h(d`Bulk mutations require variables. Provide a JSONL file with ${p.yellow("--variable-file")} or individual JSON objects with ${p.yellow("--variables")}.`);if(!O(o)&&e)throw new h(d`The ${p.yellow("--variables")} and ${p.yellow("--variable-file")} flags can only be used with mutations, not queries.`)}f();f();var m=le(ue(),1);function ie(o,e){let a=(0,m.parse)(e),n=new Map(a.definitions.filter(r=>r.kind===m.Kind.FRAGMENT_DEFINITION).map(r=>[r.name.value,r])),s=(0,m.getOperationAST)(a),t=s?.operation==="mutation"?A(s.selectionSet,n).flatMap(r=>r.selectionSet?A(r.selectionSet,n).filter(i=>i.name.value==="userErrors").map(i=>[r.alias?.value??r.name.value,i.alias?.value??i.name.value]):[]):[];return o.trim().split(`
3
3
  `).filter(r=>r.trim().length>0).some(r=>{let i;try{i=JSON.parse(r)}catch(l){if(l instanceof SyntaxError)return!1;throw l}return Array.isArray(i.errors)&&i.errors.length>0?!0:t.some(([l,u])=>{let c=i.data?.[l]?.[u];return Array.isArray(c)&&c.length>0})})}function A(o,e,a=[]){return o.selections.flatMap(n=>{if(n.kind===m.Kind.FIELD)return[n];if(n.kind===m.Kind.INLINE_FRAGMENT)return A(n.selectionSet,e,a);let s=n.name.value,t=e.get(s);return t&&!a.includes(s)?A(t.selectionSet,e,[...a,s]):[]})}async function se(o,e){let{format:a,watch:n,outputFile:s}=e,{operation:t,userErrors:r,watchAborted:i,results:l}=o;if(!t&&r.length===0){let u={headline:"Bulk operation not created successfully.",body:"This is an unexpected error. Please try again later."};throw a==="json"?P(`${u.headline} ${u.body}`):B(u),new I("Bulk operation response returned null with no error message.")}if(a==="json"){if(r.length||t&&["FAILED","CANCELED","EXPIRED"].includes(t.status)){let b=new h("Bulk operation failed.");throw b.details={...N(o),operation:t?x(t):null,userErrors:r},b}if(!t)throw new I("Bulk operation response returned no operation.");let u=t.type==="MUTATION"&&l!==void 0&&ie(l,o.query),c=u?"partial":"success";i&&(c="cancelled"),u&&(process.exitCode=1);let E=n&&!i&&t.type==="QUERY"&&t.status==="COMPLETED"&&String(t.objectCount)==="0"&&!t.url,k=l??(E?"":void 0);if(s&&k===void 0&&!i)throw new h("No results are available to write to the output file.");if(s&&k!==void 0){let b=R(s);await S(b,k),g(y.encode({path:b,format:"jsonl"}))}else g(y.encode({...N(o),status:c,...i?{reason:"watch-aborted"}:{},operation:x(t),...l===void 0?{}:{resultsJsonl:l}}));return}if(r.length){C({headline:"Error creating bulk operation.",body:{list:{items:r.map(u=>u.field?`${u.field.join(".")}: ${u.message}`:u.message)}}});return}t&&(i?T({headline:`Bulk operation ${t.id} is still running in the background.`,body:v(t.id)}):n||["FAILED","CANCELED","EXPIRED"].includes(t.status)?await ce(t,l,s):w({headline:"Bulk operation is running.",body:v(t.id),customSections:[{body:[{list:{items:[d`ID: ${p.cyan(t.id)}`.value]}}]}]}))}async function ce(o,e,a){let n=_(o).value,t=[{body:[{list:{items:[d`ID: ${p.cyan(o.id)}`.value,d`Status: ${p.yellow(o.status)}`.value,d`Created at: ${p.gray(String(o.createdAt))}`.value,...o.completedAt?[d`Completed at: ${p.gray(String(o.completedAt))}`.value]:[]]}}]}];switch(o.status){case"CREATED":w({headline:"Bulk operation started.",body:v(o.id),customSections:t});break;case"RUNNING":w({headline:"Bulk operation is running.",body:v(o.id),customSections:t});break;case"COMPLETED":if(e===void 0)w({headline:n,customSections:t});else{let r=H(e);a?await S(a,e):g(e),r?B({headline:"Bulk operation completed with errors.",body:a?`Results written to ${a}. Check file for error details.`:"Check results for error details.",customSections:t}):w({headline:n,body:a?[`Results written to ${a}`]:void 0,customSections:t})}break;case"CANCELED":case"CANCELING":case"EXPIRED":case"FAILED":C({headline:n,customSections:t});break}}function v(o){return[`Monitor its progress with:
4
4
  `,{command:`shopify app bulk status --id=${V(o)}`}]}var D=class o extends Z{static summary="Execute bulk operations.";static descriptionWithMarkdown="Executes an Admin API GraphQL query or mutation on the specified store, as a bulk operation. Mutations are only allowed on dev stores.\n\n Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).\n\n Use [`bulk status`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk operations.\n\n With `--watch`, completed results are written as JSONL to stdout or `--output-file`. With `--json`, stdout contains one result object with operation details and downloaded JSONL in `resultsJsonl`. With `--json --output-file`, stdout contains only an absolute file receipt with `path` and `format`.";static jsonOutputSchema=y;static description=this.descriptionForHelp();static flags={...F,...J,...K,...Y};async run(){let{flags:e}=await this.parse(o),{query:a,appContextResult:n,store:s}=await ee(e),t=e.json?"json":"text",r=await ne({remoteApp:n.remoteApp,store:s,query:a,variables:e.variables,variableFile:e["variable-file"],watch:e.watch??!1,...e.version&&{version:e.version}});oe("Starting bulk operation.",{organization:n.organization,remoteApp:n.remoteApp,storeFqdn:s.shopDomain,version:r.version},t);let i=await ae(r);return await se(i,{format:t,watch:e.watch??!1,outputFile:e["output-file"]}),{app:n.app}}};export{D as a};
@@ -1,4 +1,4 @@
1
- import{p as K,v as Y}from"./chunk-CZNUBAAG.js";import{a as B}from"./chunk-FAVPTYIR.js";import{c as C,m as z}from"./chunk-VJG7VXFU.js";import{b as J,c as V}from"./chunk-DMOLPSXF.js";import{A as $,C as b,G as T,I as M,U as w,z as H}from"./chunk-2KUM2RU4.js";import{a as P}from"./chunk-LG3KEHGD.js";import{g as D,i as E,k as W}from"./chunk-TD6JBHUS.js";import{Ba as _,Sa as G,Ua as j,ja as N,la as I,ta as A,za as O,zb as q}from"./chunk-ZMOW2YZ4.js";import{b as i,j as U}from"./chunk-3PYDIBTX.js";import{b as le}from"./chunk-AE3IQG7S.js";import{c as s,g as x}from"./chunk-IWTNUJGY.js";import{e as ae,g as m}from"./chunk-VKWPEFWQ.js";m();m();var u="https://github.com/Shopify/skeleton-theme.git",ce="https://github.com/Shopify/theme-liquid-docs.git",k={all:"All",github:"VS Code (GitHub Copilot)",cursor:"Cursor",claude:"Claude"};async function X(t,e){return v(t,e)}async function Z(t,e){return v(t,e,!0)}async function ee(t){let e=await B("Shopify","skeleton-theme",{filter:n=>!n.draft&&!n.prerelease});if(!e)throw new E("Couldn't find a stable Skeleton theme release");return{...await v(`${u}#${e.tag_name}`,t),repoUrl:u,latest:!0}}async function v(t,e,o){return await T([{title:`Cloning ${t} into ${e}`,task:async()=>{await C({repoUrl:t,destination:e,latestTag:o,shallow:!o}),await z(e),t.split("#")[0]===u&&(await Promise.all(Object.keys(k).map(async n=>Q(s(e,`.${n}`)))),await Q(s(e,".git")))}}]),{path:e,repoUrl:t,latest:o??!1,aiInstructions:null,instructionFiles:[]}}async function Q(t){await G(t)&&await _(t)}async function te(){return await b({message:"Which LLM instruction file would you like to include in your theme?",choices:[...Object.entries(k).map(([e,o])=>({label:o,value:e})),{label:"Skip",value:null}]})}async function oe(t,e){let o=[],n=[s(t,"AGENTS.md")];return await T([{title:`Adding AI instructions into ${t}`,task:async()=>{await N(async p=>{await C({repoUrl:ce,destination:p,shallow:!0});let h=e==="all"?Object.keys(k).filter(r=>r!=="all"):[e];try{let r=s(p,"ai","github","copilot-instructions.md"),d=await I(r),f=s(t,"AGENTS.md"),L=`# AGENTS.md
1
+ import{p as K,v as Y}from"./chunk-VVHJ2AUF.js";import{a as B}from"./chunk-WHOD5I7N.js";import{c as C,m as z}from"./chunk-WZ3QWPK5.js";import{b as J,c as V}from"./chunk-IKXUYCK7.js";import{A as $,C as b,G as T,I as M,U as w,z as H}from"./chunk-7A4ZE5IS.js";import{a as P}from"./chunk-LG3KEHGD.js";import{h as D,j as E,m as W}from"./chunk-FJOVMEPN.js";import{Ba as _,Sa as G,Ua as j,ja as N,la as I,ta as A,za as O,zb as q}from"./chunk-OIQ5NQ5I.js";import{b as i,j as U}from"./chunk-3PYDIBTX.js";import{b as le}from"./chunk-VBPMVVLV.js";import{c as s,g as x}from"./chunk-IWTNUJGY.js";import{e as ae,g as m}from"./chunk-VKWPEFWQ.js";m();m();var u="https://github.com/Shopify/skeleton-theme.git",ce="https://github.com/Shopify/theme-liquid-docs.git",k={all:"All",github:"VS Code (GitHub Copilot)",cursor:"Cursor",claude:"Claude"};async function X(t,e){return v(t,e)}async function Z(t,e){return v(t,e,!0)}async function ee(t){let e=await B("Shopify","skeleton-theme",{filter:n=>!n.draft&&!n.prerelease});if(!e)throw new E("Couldn't find a stable Skeleton theme release");return{...await v(`${u}#${e.tag_name}`,t),repoUrl:u,latest:!0}}async function v(t,e,o){return await T([{title:`Cloning ${t} into ${e}`,task:async()=>{await C({repoUrl:t,destination:e,latestTag:o,shallow:!o}),await z(e),t.split("#")[0]===u&&(await Promise.all(Object.keys(k).map(async n=>Q(s(e,`.${n}`)))),await Q(s(e,".git")))}}]),{path:e,repoUrl:t,latest:o??!1,aiInstructions:null,instructionFiles:[]}}async function Q(t){await G(t)&&await _(t)}async function te(){return await b({message:"Which LLM instruction file would you like to include in your theme?",choices:[...Object.entries(k).map(([e,o])=>({label:o,value:e})),{label:"Skip",value:null}]})}async function oe(t,e){let o=[],n=[s(t,"AGENTS.md")];return await T([{title:`Adding AI instructions into ${t}`,task:async()=>{await N(async p=>{await C({repoUrl:ce,destination:p,shallow:!0});let h=e==="all"?Object.keys(k).filter(r=>r!=="all"):[e];try{let r=s(p,"ai","github","copilot-instructions.md"),d=await I(r),f=s(t,"AGENTS.md"),L=`# AGENTS.md
2
2
 
3
3
  ${d}`;await A(f,L);let a=await Promise.all(h.map(l=>me(t,f,l)));n.push(...h.flatMap(l=>l==="cursor"?[]:[s(t,l==="github"?"copilot-instructions.md":"CLAUDE.md")])),a.forEach(l=>{l.copiedFile&&o.push(l.copiedFile)})}catch{throw new E("Failed to create AI instructions")}})}}]),{files:n,copiedFiles:o}}async function me(t,e,o){if(o==="cursor")return{};let p={github:"copilot-instructions.md",claude:"CLAUDE.md"}[o],h=s(t,p);try{return await O(e,h),{}}catch(r){if(r instanceof Error){let d=await I(e);return await A(h,d),{copiedFile:p}}else throw r}}m();import{resolve as ne}from"node:path";var ue=i.enum(["all","github","cursor","claude"]).nullable(),F=i.string().refine(x).describe("An absolute native filesystem path."),S=P({name:"ThemeInitResult",definitions:{AbsolutePath:F},schema:i.object({status:i.enum(["success","partial"]),changed:i.literal(!0),directory:F,repoUrl:i.string().min(1).describe("The source Git remote (including HTTPS, SSH, or SCP-style Git URLs)."),latest:i.boolean(),aiInstructions:ue,instructionFilePaths:i.array(F).nullable().describe("Created instruction files, or null when setup failed before their completion could be established."),reason:i.string().nullable().describe("The reason for incomplete setup, or null when setup completed.")}).strict()});function re(t){return{status:t.status??"success",changed:!0,directory:ne(t.path),repoUrl:t.repoUrl,latest:t.latest,aiInstructions:t.aiInstructions,instructionFilePaths:t.status==="partial"?null:t.instructionFiles.map(e=>ne(e)),reason:t.reason??null}}m();function ie(t,e){e==="json"&&q(S.encode(re(t)))}function se(t){if(t.length===0)return;let e="Files created instead of symlinks.",o=`Shopify CLI attempted to create symbolic links between AGENTS.md and ${t.join(", ")}, but your system doesn't have Developer Mode enabled or symlinks are disabled. Separate files were created instead.`;H({headline:e,body:o})}var y=ae(le(),1);var R=class extends Y{static jsonOutputSchema=S;static summary="Clones a Git repository to use as a starting point for building a new theme.";static descriptionWithMarkdown=`Clones a Git repository to your local machine to use as the starting point for building a theme.
4
4
 
@@ -1,4 +1,4 @@
1
- import{b as iA,d as mI,f as lA,g as pI,i as cA,m as b7,o as Bu,t as $5,v as sA,w as uA,x as dA}from"./chunk-FDSNRKGQ.js";import{a as gI}from"./chunk-EDWIWZWM.js";import{c as aA,f as nA}from"./chunk-2BYW3BYX.js";import{a as oA}from"./chunk-YYWSHRO2.js";import{B as ef,C as vI,_ as SCe,b as ICe,n as eA,p as T4}from"./chunk-YKDRUAY3.js";import{a as jF}from"./chunk-JIY6XWSC.js";import{d as b}from"./chunk-2KUM2RU4.js";import{c as tA}from"./chunk-H4K3F7PP.js";import{l as $F}from"./chunk-2KFYIYLI.js";import{i as rA}from"./chunk-TD6JBHUS.js";import{Eb as fI}from"./chunk-ZMOW2YZ4.js";import{a as j5,c as m,e as ps,g as o}from"./chunk-VKWPEFWQ.js";var vA=m(Vi=>{"use strict";o();var ECe=b();function hA(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(hA(522))},D:e1,C:e1,L:e1,m:e1,X:e1,S:e1,M:e1},p:0,findDOMNode:null},xCe=Symbol.for("react.portal");function CCe(e,t,r){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xCe,key:a==null?null:""+a,children:e,containerInfo:t,implementation:r}}var tf=ECe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function R4(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(hA(299));return CCe(e,t,null,r)};Vi.flushSync=function(e){var t=tf.T,r=Gi.p;try{if(tf.T=null,Gi.p=2,e)return e()}finally{tf.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=R4(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=R4(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=R4(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=R4(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 tf.H.useFormState(e,t,r)};Vi.useFormStatus=function(){return tf.H.useHostTransitionStatus()};Vi.version="19.2.4"});var fA=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{b as iA,d as mI,f as lA,g as pI,i as cA,m as b7,o as Bu,t as $5,v as sA,w as uA,x as dA}from"./chunk-FDSNRKGQ.js";import{a as gI}from"./chunk-MBAPM5HA.js";import{c as aA,f as nA}from"./chunk-XHHAVKKV.js";import{a as oA}from"./chunk-4LJERO23.js";import{B as ef,C as vI,_ as SCe,b as ICe,n as eA,p as T4}from"./chunk-UORSJB4A.js";import{a as jF}from"./chunk-EE72PCKT.js";import{d as b}from"./chunk-7A4ZE5IS.js";import{c as tA}from"./chunk-RNF6T6IO.js";import{l as $F}from"./chunk-2KFYIYLI.js";import{j as rA}from"./chunk-FJOVMEPN.js";import{Eb as fI}from"./chunk-OIQ5NQ5I.js";import{a as j5,c as m,e as ps,g as o}from"./chunk-VKWPEFWQ.js";var vA=m(Vi=>{"use strict";o();var ECe=b();function hA(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(hA(522))},D:e1,C:e1,L:e1,m:e1,X:e1,S:e1,M:e1},p:0,findDOMNode:null},xCe=Symbol.for("react.portal");function CCe(e,t,r){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xCe,key:a==null?null:""+a,children:e,containerInfo:t,implementation:r}}var tf=ECe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function R4(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(hA(299));return CCe(e,t,null,r)};Vi.flushSync=function(e){var t=tf.T,r=Gi.p;try{if(tf.T=null,Gi.p=2,e)return e()}finally{tf.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=R4(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=R4(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=R4(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=R4(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 tf.H.useFormState(e,t,r)};Vi.useFormStatus=function(){return tf.H.useHostTransitionStatus()};Vi.version="19.2.4"});var fA=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,2 +1,2 @@
1
- import{c as y}from"./chunk-DVFVO6ZE.js";import{Ga as i}from"./chunk-YKDRUAY3.js";import{A as p,D as m,G as h,U as a,z as l}from"./chunk-2KUM2RU4.js";import{i as s}from"./chunk-TD6JBHUS.js";import{j as d,k as f}from"./chunk-3PYDIBTX.js";import{b as c}from"./chunk-QGQWVA7N.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();function w(e){return[`'${e.name}'`,{subdued:`(#${e.id})`}]}function x(e){return{list:{items:e.map(w)}}}async function M(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 f()==="json"?d({type:"diagnostic",level:"error",message:`${o?`Environment: ${o}
1
+ import{c as y}from"./chunk-RSNFNZ6F.js";import{Ha as i}from"./chunk-UORSJB4A.js";import{A as p,D as m,G as h,U as a,z as l}from"./chunk-7A4ZE5IS.js";import{j as s}from"./chunk-FJOVMEPN.js";import{j as d,k as f}from"./chunk-3PYDIBTX.js";import{b as c}from"./chunk-4AWVU2OV.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();function w(e){return[`'${e.name}'`,{subdued:`(#${e.id})`}]}function x(e){return{list:{items:e.map(w)}}}async function M(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 f()==="json"?d({type:"diagnostic",level:"error",message:`${o?`Environment: ${o}
2
2
  `:""}${r}`}):p({headline:o?`Environment: ${o}`:"",body:r}),!1;if(l({body:r}),c())throw new s("This command must run from a theme directory when user input is unavailable.","Run the command from a theme directory, or use `--force` to continue.");if(!a())return!0;let t=await m({message:"Do you want to proceed?"});return i(`theme-service:confirm-directory:${t}`),t}async function k(e,r,o){if(e.role!==y||o)return!0;if(!a())throw new s(`Can't ${r} on the live theme when user input is unavailable.`,"Use `--allow-live` to confirm that you want to continue.");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 m({message:n,confirmationMessage:"Yes, proceed with live theme",cancellationMessage:"No, cancel"});return i(`theme-service:confirm-live-theme:${t}`),t}async function D(e,r,o=!1){e.length>0&&await h(e,{renderOptions:{stdout:r??process.stderr},noProgressBar:o})}export{w as a,x as b,M as c,k as d,D as e};
@@ -1 +1 @@
1
- import{b as a,g as c,i as p,j as d}from"./chunk-DVFVO6ZE.js";import{l as h}from"./chunk-TD6JBHUS.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();function f(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=f(`${r}-${e.substring(0,s)}`);return`${n} (${o})`}var u=class{adminSession;themeId;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 d({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,createdAtRuntime:!0}}};export{u as a};
1
+ import{b as a,g as c,i as p,j as d}from"./chunk-RSNFNZ6F.js";import{n as h}from"./chunk-FJOVMEPN.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();function f(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=f(`${r}-${e.substring(0,s)}`);return`${n} (${o})`}var u=class{adminSession;themeId;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 d({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,createdAtRuntime:!0}}};export{u as a};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-I3WRA2LH.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=e({cmd_app_warning_api_key_deprecation_displayed:!1}),i=t;export{i as a};
1
+ import{a as e}from"./chunk-HI5FTI3M.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=e({cmd_app_warning_api_key_deprecation_displayed:!1}),i=t;export{i as a};
@@ -0,0 +1,7 @@
1
+ import{A as i,B as t,F as s,x as e,y as o,z as n}from"./chunk-7A4ZE5IS.js";import{j as d,n as l}from"./chunk-FJOVMEPN.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
+ Error: Unexpected error
3
+ at Module._compile (internal/modules/cjs/loader.js:1137:30)
4
+ at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
5
+ at Module.load (internal/modules/cjs/loader.js:985:32)
6
+ at Function.Module._load (internal/modules/cjs/loader.js:878:14)
7
+ `,t(a);let c=[["Have you",{link:{label:"created a Shopify Partners organization",url:"https://partners.shopify.com/signup"}},{char:"?"}],"Have you confirmed your accounts from the emails you received?",["Need to connect to a different App or organization? Run the command again with",{command:"--reset"}]];t(new d("No Organization found",void 0,c)),i({headline:"Version couldn't be released.",body:"This version needs to be submitted for review and approved by Shopify before it can be released."}),s({rows:[{id:"1",name:"John Doe",email:"jon@doe.com"},{id:"2",name:"Jane Doe",email:"jane@doe.com"},{id:"3",name:"John Smith",email:"jon@smith.com"}],columns:{id:{header:"ID",color:"red"},name:{header:"Name",color:"dim"},email:{}}})}export{u as a};