powerlines 0.28.0 → 0.30.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 (664) hide show
  1. package/README.md +8 -2
  2. package/dist/{api-D-3EvHyy.d.cts → api-2c6P7OLq.d.cts} +1 -1
  3. package/dist/{api-BgDfE1J3.d.ts → api-D6eCzojg.d.ts} +1 -1
  4. package/dist/api.cjs +4 -4
  5. package/dist/api.d.cts +3 -2
  6. package/dist/api.d.ts +3 -2
  7. package/dist/api.js +3 -3
  8. package/dist/astro.cjs +6 -6
  9. package/dist/astro.d.cts +2 -1
  10. package/dist/astro.d.ts +2 -1
  11. package/dist/astro.js +5 -5
  12. package/dist/babel-types.d.ts +292 -0
  13. package/dist/{chunk-DD4XJNKQ.cjs → chunk-2LSP523Q.cjs} +5 -5
  14. package/dist/{chunk-XMYY4XUM.cjs → chunk-2TMERZSM.cjs} +4 -4
  15. package/dist/{chunk-FZ6J2GMT.js → chunk-575Z57QD.js} +2 -2
  16. package/dist/{chunk-6MQ6LCVC.js → chunk-5GOXUZPZ.js} +2 -2
  17. package/dist/{chunk-QRE6JMCD.js → chunk-7DOCWJ76.js} +423 -142
  18. package/dist/{chunk-T3T6WSX2.cjs → chunk-BXKRABQU.cjs} +2 -2
  19. package/dist/chunk-HRAVYQI4.cjs +12 -0
  20. package/dist/{chunk-NHZBSVDJ.js → chunk-IBPL4XRD.js} +3 -3
  21. package/dist/{chunk-Z3HPP53Q.js → chunk-K3D4TTN5.js} +3 -3
  22. package/dist/{chunk-FJ67PPIW.cjs → chunk-NP2ZVRIF.cjs} +4 -4
  23. package/dist/chunk-OXST2CTF.cjs +12 -0
  24. package/dist/{chunk-ERZWC77E.cjs → chunk-PYLCLJKJ.cjs} +421 -140
  25. package/dist/{chunk-ON3LABX3.cjs → chunk-SALASTMK.cjs} +2 -2
  26. package/dist/chunk-TFHWUEMM.js +9 -0
  27. package/dist/{chunk-5CV2NNIR.js → chunk-VYLFOZVJ.js} +3 -3
  28. package/dist/{chunk-VJ26HHRE.js → chunk-W2BP7RBB.js} +3 -3
  29. package/dist/{chunk-MRHWIMY2.cjs → chunk-YFKHICPO.cjs} +2 -2
  30. package/dist/{chunk-UMZ2WNMA.js → chunk-ZFMDBIE2.js} +2 -2
  31. package/dist/{context-CcPf9RC_.d.ts → context-CRJ4Zq86.d.ts} +26 -10
  32. package/dist/{context-CDZY3RHt.d.cts → context-D5kPamM6.d.cts} +26 -10
  33. package/dist/esbuild.cjs +8 -8
  34. package/dist/esbuild.d.cts +2 -1
  35. package/dist/esbuild.d.ts +2 -1
  36. package/dist/esbuild.js +5 -5
  37. package/dist/farm.cjs +5 -5
  38. package/dist/farm.d.cts +2 -1
  39. package/dist/farm.d.ts +2 -1
  40. package/dist/farm.js +4 -4
  41. package/dist/index.cjs +18 -18
  42. package/dist/index.d.cts +5 -4
  43. package/dist/index.d.ts +5 -4
  44. package/dist/index.js +6 -6
  45. package/dist/lib/{api-BIHEKpyq.d.ts → api-DPyF-O8S.d.ts} +1 -1
  46. package/dist/lib/{api-Wawenasn.d.cts → api-DzuW_qQS.d.cts} +1 -1
  47. package/dist/lib/build/esbuild.cjs +9 -7
  48. package/dist/lib/build/esbuild.cjs.map +1 -0
  49. package/dist/lib/build/esbuild.d.cts +3 -2
  50. package/dist/lib/build/esbuild.d.ts +3 -2
  51. package/dist/lib/build/esbuild.js +6 -4
  52. package/dist/lib/build/esbuild.js.map +1 -0
  53. package/dist/lib/build/index.cjs +47 -28
  54. package/dist/lib/build/index.cjs.map +1 -0
  55. package/dist/lib/build/index.d.cts +6 -4
  56. package/dist/lib/build/index.d.ts +6 -4
  57. package/dist/lib/build/index.js +15 -12
  58. package/dist/lib/build/index.js.map +1 -0
  59. package/dist/lib/build/rolldown.cjs +6 -4
  60. package/dist/lib/build/rolldown.cjs.map +1 -0
  61. package/dist/lib/build/rolldown.d.cts +3 -2
  62. package/dist/lib/build/rolldown.d.ts +3 -2
  63. package/dist/lib/build/rolldown.js +5 -3
  64. package/dist/lib/build/rolldown.js.map +1 -0
  65. package/dist/lib/build/rollup.cjs +6 -4
  66. package/dist/lib/build/rollup.cjs.map +1 -0
  67. package/dist/lib/build/rollup.d.cts +3 -2
  68. package/dist/lib/build/rollup.d.ts +3 -2
  69. package/dist/lib/build/rollup.js +4 -2
  70. package/dist/lib/build/rollup.js.map +1 -0
  71. package/dist/lib/build/rspack.cjs +5 -3
  72. package/dist/lib/build/rspack.cjs.map +1 -0
  73. package/dist/lib/build/rspack.d.cts +3 -2
  74. package/dist/lib/build/rspack.d.ts +3 -2
  75. package/dist/lib/build/rspack.js +4 -2
  76. package/dist/lib/build/rspack.js.map +1 -0
  77. package/dist/lib/build/tsdown.cjs +25 -0
  78. package/dist/lib/build/tsdown.cjs.map +1 -0
  79. package/dist/lib/build/tsdown.d.cts +60 -0
  80. package/dist/lib/build/tsdown.d.ts +60 -0
  81. package/dist/lib/build/tsdown.js +4 -0
  82. package/dist/lib/build/tsdown.js.map +1 -0
  83. package/dist/lib/build/tsup.cjs +10 -8
  84. package/dist/lib/build/tsup.cjs.map +1 -0
  85. package/dist/lib/build/tsup.d.cts +3 -2
  86. package/dist/lib/build/tsup.d.ts +3 -2
  87. package/dist/lib/build/tsup.js +7 -5
  88. package/dist/lib/build/tsup.js.map +1 -0
  89. package/dist/lib/build/unbuild.cjs +9 -7
  90. package/dist/lib/build/unbuild.cjs.map +1 -0
  91. package/dist/lib/build/unbuild.d.cts +5 -4
  92. package/dist/lib/build/unbuild.d.ts +5 -4
  93. package/dist/lib/build/unbuild.js +6 -4
  94. package/dist/lib/build/unbuild.js.map +1 -0
  95. package/dist/lib/build/vite.cjs +9 -7
  96. package/dist/lib/build/vite.cjs.map +1 -0
  97. package/dist/lib/build/vite.d.cts +3 -2
  98. package/dist/lib/build/vite.d.ts +3 -2
  99. package/dist/lib/build/vite.js +7 -5
  100. package/dist/lib/build/vite.js.map +1 -0
  101. package/dist/lib/build/webpack.cjs +5 -3
  102. package/dist/lib/build/webpack.cjs.map +1 -0
  103. package/dist/lib/build/webpack.d.cts +3 -2
  104. package/dist/lib/build/webpack.d.ts +3 -2
  105. package/dist/lib/build/webpack.js +4 -2
  106. package/dist/lib/build/webpack.js.map +1 -0
  107. package/dist/lib/{chunk-3Y4F37CB.cjs → chunk-23BFL3LB.cjs} +6 -4
  108. package/dist/lib/chunk-23BFL3LB.cjs.map +1 -0
  109. package/dist/lib/{chunk-26M3IUSK.js → chunk-26JHNKA7.js} +3 -1
  110. package/dist/lib/chunk-26JHNKA7.js.map +1 -0
  111. package/dist/lib/{chunk-Z6BSDYUR.cjs → chunk-2HAOX4Q2.cjs} +155 -85
  112. package/dist/lib/chunk-2HAOX4Q2.cjs.map +1 -0
  113. package/dist/lib/{chunk-2RHE4SGK.js → chunk-2IXO6SBG.js} +3 -1
  114. package/dist/lib/chunk-2IXO6SBG.js.map +1 -0
  115. package/dist/lib/{chunk-K3NBD5LL.cjs → chunk-2JR645O3.cjs} +5 -3
  116. package/dist/lib/chunk-2JR645O3.cjs.map +1 -0
  117. package/dist/lib/{chunk-S4OH7KW6.cjs → chunk-2OMOKN7Y.cjs} +93 -58
  118. package/dist/lib/chunk-2OMOKN7Y.cjs.map +1 -0
  119. package/dist/lib/{chunk-ENRLU4UR.js → chunk-35EO5Y7R.js} +3 -1
  120. package/dist/lib/chunk-35EO5Y7R.js.map +1 -0
  121. package/dist/lib/{chunk-NDYKRNPQ.js → chunk-367E23MI.js} +3 -1
  122. package/dist/lib/chunk-367E23MI.js.map +1 -0
  123. package/dist/lib/{chunk-PURLNHXG.cjs → chunk-3DKBH67A.cjs} +16 -14
  124. package/dist/lib/chunk-3DKBH67A.cjs.map +1 -0
  125. package/dist/lib/chunk-3GMJQ5G3.cjs +4 -0
  126. package/dist/lib/chunk-3GMJQ5G3.cjs.map +1 -0
  127. package/dist/lib/{chunk-OEF6EHQV.js → chunk-45D4XIOK.js} +3 -1
  128. package/dist/lib/chunk-45D4XIOK.js.map +1 -0
  129. package/dist/lib/chunk-4BPHC6QQ.js +3 -0
  130. package/dist/lib/chunk-4BPHC6QQ.js.map +1 -0
  131. package/dist/lib/{chunk-7VRXU4F7.cjs → chunk-4NBEK7BB.cjs} +8 -7
  132. package/dist/lib/chunk-4NBEK7BB.cjs.map +1 -0
  133. package/dist/lib/{chunk-XBSGDSV3.cjs → chunk-4UN7FLKQ.cjs} +6 -4
  134. package/dist/lib/chunk-4UN7FLKQ.cjs.map +1 -0
  135. package/dist/lib/{chunk-NZ6NCXM2.js → chunk-5QJRVWP3.js} +4 -2
  136. package/dist/lib/chunk-5QJRVWP3.js.map +1 -0
  137. package/dist/lib/{chunk-ONETLSPO.js → chunk-5QMQ5G73.js} +4 -2
  138. package/dist/lib/chunk-5QMQ5G73.js.map +1 -0
  139. package/dist/lib/{chunk-H7A5QVLY.cjs → chunk-62ZJYXT3.cjs} +7 -5
  140. package/dist/lib/chunk-62ZJYXT3.cjs.map +1 -0
  141. package/dist/lib/{chunk-JA4HSQRN.cjs → chunk-632PWWU7.cjs} +5 -3
  142. package/dist/lib/chunk-632PWWU7.cjs.map +1 -0
  143. package/dist/lib/{chunk-PIFNMTKN.cjs → chunk-63DAS6TJ.cjs} +6 -4
  144. package/dist/lib/chunk-63DAS6TJ.cjs.map +1 -0
  145. package/dist/lib/chunk-65ANDTTL.cjs +203 -0
  146. package/dist/lib/chunk-65ANDTTL.cjs.map +1 -0
  147. package/dist/lib/{chunk-OL35IC6Z.js → chunk-6OGQTUXF.js} +3 -1
  148. package/dist/lib/chunk-6OGQTUXF.js.map +1 -0
  149. package/dist/lib/{chunk-Y2DPOC4G.js → chunk-76DBMONS.js} +52 -32
  150. package/dist/lib/chunk-76DBMONS.js.map +1 -0
  151. package/dist/lib/{chunk-GSGF6RL2.js → chunk-7CDTHZ3R.js} +58 -23
  152. package/dist/lib/chunk-7CDTHZ3R.js.map +1 -0
  153. package/dist/lib/{chunk-R3XAVNPY.cjs → chunk-7OO4SKFN.cjs} +6 -4
  154. package/dist/lib/chunk-7OO4SKFN.cjs.map +1 -0
  155. package/dist/{plugin-utils/chunk-SHUYVCID.js → lib/chunk-7QVYU63E.js} +2 -0
  156. package/dist/lib/chunk-7QVYU63E.js.map +1 -0
  157. package/dist/lib/{chunk-GANVMM73.js → chunk-7R23HVGQ.js} +3 -1
  158. package/dist/lib/chunk-7R23HVGQ.js.map +1 -0
  159. package/dist/lib/chunk-A4RSMLXW.cjs +13 -0
  160. package/dist/lib/chunk-A4RSMLXW.cjs.map +1 -0
  161. package/dist/lib/{chunk-6OYSDQXE.cjs → chunk-AQNUFK3L.cjs} +47 -9
  162. package/dist/lib/chunk-AQNUFK3L.cjs.map +1 -0
  163. package/dist/lib/{chunk-HRRI4KOM.cjs → chunk-BJGMF356.cjs} +8 -6
  164. package/dist/lib/chunk-BJGMF356.cjs.map +1 -0
  165. package/dist/lib/{chunk-GLFOKUTH.cjs → chunk-BQA4H72F.cjs} +12 -10
  166. package/dist/lib/chunk-BQA4H72F.cjs.map +1 -0
  167. package/dist/lib/chunk-CLOW34EQ.js +3 -0
  168. package/dist/lib/chunk-CLOW34EQ.js.map +1 -0
  169. package/dist/lib/{chunk-VHCBD2IS.js → chunk-CTMPQSK7.js} +54 -1
  170. package/dist/lib/chunk-CTMPQSK7.js.map +1 -0
  171. package/dist/lib/{chunk-M263EZ4F.js → chunk-D55ZAZCX.js} +3 -1
  172. package/dist/lib/chunk-D55ZAZCX.js.map +1 -0
  173. package/dist/lib/{chunk-XIK3Y6BP.js → chunk-D5IEZABI.js} +4 -2
  174. package/dist/lib/chunk-D5IEZABI.js.map +1 -0
  175. package/dist/lib/chunk-DQJCGJ5P.js +3 -0
  176. package/dist/lib/chunk-DQJCGJ5P.js.map +1 -0
  177. package/dist/lib/{chunk-KFDNKOXM.js → chunk-EBBGE5FN.js} +20 -2
  178. package/dist/lib/chunk-EBBGE5FN.js.map +1 -0
  179. package/dist/lib/chunk-EXAOCEQF.cjs +112 -0
  180. package/dist/lib/chunk-EXAOCEQF.cjs.map +1 -0
  181. package/dist/lib/{chunk-T35JQHYE.js → chunk-FFATMOAQ.js} +3 -1
  182. package/dist/lib/chunk-FFATMOAQ.js.map +1 -0
  183. package/dist/lib/{chunk-VKFXVPY6.js → chunk-FHSSBMCC.js} +70 -14
  184. package/dist/lib/chunk-FHSSBMCC.js.map +1 -0
  185. package/dist/lib/chunk-FJMP4CXA.js +3 -0
  186. package/dist/lib/chunk-FJMP4CXA.js.map +1 -0
  187. package/dist/lib/{chunk-4PTER5EV.js → chunk-FKPVNUDU.js} +3 -1
  188. package/dist/lib/chunk-FKPVNUDU.js.map +1 -0
  189. package/dist/lib/{chunk-ZGMEHSNN.js → chunk-FPFPUYXS.js} +3 -1
  190. package/dist/lib/chunk-FPFPUYXS.js.map +1 -0
  191. package/dist/lib/{chunk-QF3UTBJE.cjs → chunk-FQZQA4EJ.cjs} +13 -11
  192. package/dist/lib/chunk-FQZQA4EJ.cjs.map +1 -0
  193. package/dist/lib/{chunk-3T56KQ7U.cjs → chunk-GDODHF3Y.cjs} +6 -4
  194. package/dist/lib/chunk-GDODHF3Y.cjs.map +1 -0
  195. package/dist/lib/{chunk-LBR46BPB.cjs → chunk-GEMGC7W6.cjs} +97 -77
  196. package/dist/lib/chunk-GEMGC7W6.cjs.map +1 -0
  197. package/dist/lib/chunk-GTNYRHTO.js +3 -0
  198. package/dist/lib/chunk-GTNYRHTO.js.map +1 -0
  199. package/dist/lib/{chunk-32Q2PG5D.js → chunk-HDUSUF6L.js} +3 -1
  200. package/dist/lib/chunk-HDUSUF6L.js.map +1 -0
  201. package/dist/lib/{chunk-TANQDHYY.js → chunk-HQ6TGY34.js} +3 -1
  202. package/dist/lib/chunk-HQ6TGY34.js.map +1 -0
  203. package/dist/lib/{chunk-JG4IL7XL.cjs → chunk-HYQXPNVP.cjs} +4 -2
  204. package/dist/lib/chunk-HYQXPNVP.cjs.map +1 -0
  205. package/dist/lib/{chunk-GK75G3OD.cjs → chunk-JSU4O5TH.cjs} +7 -5
  206. package/dist/lib/chunk-JSU4O5TH.cjs.map +1 -0
  207. package/dist/lib/chunk-K3FDM5F3.cjs +4 -0
  208. package/dist/lib/chunk-K3FDM5F3.cjs.map +1 -0
  209. package/dist/lib/{chunk-DYGQQI74.js → chunk-KLU5DWCZ.js} +4 -2
  210. package/dist/lib/chunk-KLU5DWCZ.js.map +1 -0
  211. package/dist/lib/{chunk-V2523R33.cjs → chunk-KOD33DBU.cjs} +37 -10
  212. package/dist/lib/chunk-KOD33DBU.cjs.map +1 -0
  213. package/dist/lib/{chunk-OYLWPIBP.cjs → chunk-LIZRGQES.cjs} +7 -5
  214. package/dist/lib/chunk-LIZRGQES.cjs.map +1 -0
  215. package/dist/lib/{chunk-GLWPZDAR.js → chunk-LSSLZECF.js} +4 -2
  216. package/dist/lib/chunk-LSSLZECF.js.map +1 -0
  217. package/dist/lib/{chunk-GD7KTLPU.js → chunk-M7SU453W.js} +31 -4
  218. package/dist/lib/chunk-M7SU453W.js.map +1 -0
  219. package/dist/lib/{chunk-4NHFXDTQ.cjs → chunk-MFC7UJHT.cjs} +5 -3
  220. package/dist/lib/chunk-MFC7UJHT.cjs.map +1 -0
  221. package/dist/lib/{chunk-6RLV3FIS.js → chunk-MJ6WN3XA.js} +4 -2
  222. package/dist/lib/chunk-MJ6WN3XA.js.map +1 -0
  223. package/dist/lib/{chunk-T6KEXFRH.cjs → chunk-NPSC73QO.cjs} +10 -8
  224. package/dist/lib/chunk-NPSC73QO.cjs.map +1 -0
  225. package/dist/lib/{chunk-NST5TNW6.js → chunk-OC2AD37X.js} +3 -1
  226. package/dist/lib/chunk-OC2AD37X.js.map +1 -0
  227. package/dist/lib/{chunk-WUE7NTBW.cjs → chunk-OGEFARN2.cjs} +12 -10
  228. package/dist/lib/chunk-OGEFARN2.cjs.map +1 -0
  229. package/dist/lib/{chunk-3OCI4TH7.cjs → chunk-OXOTWH3L.cjs} +6 -4
  230. package/dist/lib/chunk-OXOTWH3L.cjs.map +1 -0
  231. package/dist/lib/{chunk-USNT2KNT.cjs → chunk-PK6SKIKE.cjs} +2 -0
  232. package/dist/lib/chunk-PK6SKIKE.cjs.map +1 -0
  233. package/dist/lib/{chunk-XBM7FHNK.js → chunk-Q25ZPXA7.js} +3 -1
  234. package/dist/lib/chunk-Q25ZPXA7.js.map +1 -0
  235. package/dist/lib/chunk-Q7C3YOFX.js +103 -0
  236. package/dist/lib/chunk-Q7C3YOFX.js.map +1 -0
  237. package/dist/lib/{chunk-XUYQYUWZ.cjs → chunk-QBE4SZN6.cjs} +6 -4
  238. package/dist/lib/chunk-QBE4SZN6.cjs.map +1 -0
  239. package/dist/lib/{chunk-GA3RXX4R.cjs → chunk-QHTL2U3L.cjs} +10 -8
  240. package/dist/lib/chunk-QHTL2U3L.cjs.map +1 -0
  241. package/dist/lib/chunk-QMKA57N4.cjs +4 -0
  242. package/dist/lib/chunk-QMKA57N4.cjs.map +1 -0
  243. package/dist/lib/{chunk-MRAGQ33T.js → chunk-RHADQ6HA.js} +4 -2
  244. package/dist/lib/chunk-RHADQ6HA.js.map +1 -0
  245. package/dist/lib/{chunk-KG4HFVJU.js → chunk-RNSQODBR.js} +136 -66
  246. package/dist/lib/chunk-RNSQODBR.js.map +1 -0
  247. package/dist/lib/{chunk-2NZADVP5.cjs → chunk-RQICHHZM.cjs} +4 -2
  248. package/dist/lib/chunk-RQICHHZM.cjs.map +1 -0
  249. package/dist/lib/{chunk-S6WYOXLM.js → chunk-RTFLBGJI.js} +4 -3
  250. package/dist/lib/chunk-RTFLBGJI.js.map +1 -0
  251. package/dist/lib/{chunk-67DW5UDQ.js → chunk-SUABYS33.js} +5 -3
  252. package/dist/lib/chunk-SUABYS33.js.map +1 -0
  253. package/dist/lib/chunk-UYDY7RRQ.cjs +4 -0
  254. package/dist/lib/chunk-UYDY7RRQ.cjs.map +1 -0
  255. package/dist/lib/{chunk-AHK7GRPM.js → chunk-W2KADD56.js} +4 -2
  256. package/dist/lib/chunk-W2KADD56.js.map +1 -0
  257. package/dist/lib/chunk-XBOHJTOI.cjs +4 -0
  258. package/dist/lib/chunk-XBOHJTOI.cjs.map +1 -0
  259. package/dist/lib/{chunk-XLHFUATD.cjs → chunk-Y5KONJVR.cjs} +55 -2
  260. package/dist/lib/chunk-Y5KONJVR.cjs.map +1 -0
  261. package/dist/lib/{chunk-YXJJCE6V.cjs → chunk-YF57WETC.cjs} +4 -2
  262. package/dist/lib/chunk-YF57WETC.cjs.map +1 -0
  263. package/dist/lib/{chunk-OKXWWMEF.js → chunk-YFB6OGXJ.js} +4 -2
  264. package/dist/lib/chunk-YFB6OGXJ.js.map +1 -0
  265. package/dist/lib/{chunk-L56XA427.js → chunk-YJEZASNU.js} +41 -3
  266. package/dist/lib/chunk-YJEZASNU.js.map +1 -0
  267. package/dist/lib/{chunk-A2NW7WAN.js → chunk-YMEXAI6M.js} +3 -1
  268. package/dist/lib/chunk-YMEXAI6M.js.map +1 -0
  269. package/dist/lib/{chunk-YYEAV24J.cjs → chunk-YYG2XJQN.cjs} +30 -11
  270. package/dist/lib/chunk-YYG2XJQN.cjs.map +1 -0
  271. package/dist/lib/{chunk-NDC5BKCD.cjs → chunk-YZ2NKI4K.cjs} +4 -2
  272. package/dist/lib/chunk-YZ2NKI4K.cjs.map +1 -0
  273. package/dist/lib/{chunk-YYN6TKSY.cjs → chunk-ZFOPHCGK.cjs} +4 -2
  274. package/dist/lib/chunk-ZFOPHCGK.cjs.map +1 -0
  275. package/dist/lib/{chunk-HL4KTZDB.cjs → chunk-ZGTXKPKZ.cjs} +5 -3
  276. package/dist/lib/chunk-ZGTXKPKZ.cjs.map +1 -0
  277. package/dist/lib/{chunk-4W6WV35V.js → chunk-ZLWW2MXD.js} +21 -15
  278. package/dist/lib/chunk-ZLWW2MXD.js.map +1 -0
  279. package/dist/lib/{chunk-N22WOZ3U.js → chunk-ZVZFMMNL.js} +7 -5
  280. package/dist/lib/chunk-ZVZFMMNL.js.map +1 -0
  281. package/dist/lib/{chunk-D6MI2V6R.cjs → chunk-ZWLSNYIN.cjs} +23 -17
  282. package/dist/lib/chunk-ZWLSNYIN.cjs.map +1 -0
  283. package/dist/lib/{config-D2dTFLlQ.d.cts → config-CHOLTlno.d.cts} +32 -19
  284. package/dist/lib/{config-Dzk6j2mr.d.ts → config-Cf85ts8m.d.ts} +32 -19
  285. package/dist/lib/config-file.cjs +6 -4
  286. package/dist/lib/config-file.cjs.map +1 -0
  287. package/dist/lib/config-file.d.cts +3 -2
  288. package/dist/lib/config-file.d.ts +3 -2
  289. package/dist/lib/config-file.js +4 -2
  290. package/dist/lib/config-file.js.map +1 -0
  291. package/dist/lib/contexts/api-context.cjs +20 -18
  292. package/dist/lib/contexts/api-context.cjs.map +1 -0
  293. package/dist/lib/contexts/api-context.d.cts +25 -6
  294. package/dist/lib/contexts/api-context.d.ts +25 -6
  295. package/dist/lib/contexts/api-context.js +19 -17
  296. package/dist/lib/contexts/api-context.js.map +1 -0
  297. package/dist/lib/contexts/context.cjs +17 -15
  298. package/dist/lib/contexts/context.cjs.map +1 -0
  299. package/dist/lib/contexts/context.d.cts +17 -4
  300. package/dist/lib/contexts/context.d.ts +17 -4
  301. package/dist/lib/contexts/context.js +16 -14
  302. package/dist/lib/contexts/context.js.map +1 -0
  303. package/dist/lib/contexts/environment-context.cjs +19 -17
  304. package/dist/lib/contexts/environment-context.cjs.map +1 -0
  305. package/dist/lib/contexts/environment-context.d.cts +6 -5
  306. package/dist/lib/contexts/environment-context.d.ts +6 -5
  307. package/dist/lib/contexts/environment-context.js +18 -16
  308. package/dist/lib/contexts/environment-context.js.map +1 -0
  309. package/dist/lib/contexts/index.cjs +24 -22
  310. package/dist/lib/contexts/index.cjs.map +1 -0
  311. package/dist/lib/contexts/index.d.cts +5 -4
  312. package/dist/lib/contexts/index.d.ts +5 -4
  313. package/dist/lib/contexts/index.js +20 -18
  314. package/dist/lib/contexts/index.js.map +1 -0
  315. package/dist/lib/contexts/plugin-context.cjs +5 -3
  316. package/dist/lib/contexts/plugin-context.cjs.map +1 -0
  317. package/dist/lib/contexts/plugin-context.d.cts +5 -4
  318. package/dist/lib/contexts/plugin-context.d.ts +5 -4
  319. package/dist/lib/contexts/plugin-context.js +4 -2
  320. package/dist/lib/contexts/plugin-context.js.map +1 -0
  321. package/dist/lib/entry.cjs +13 -11
  322. package/dist/lib/entry.cjs.map +1 -0
  323. package/dist/lib/entry.d.cts +3 -2
  324. package/dist/lib/entry.d.ts +3 -2
  325. package/dist/lib/entry.js +5 -3
  326. package/dist/lib/entry.js.map +1 -0
  327. package/dist/lib/fs/helpers.cjs +18 -12
  328. package/dist/lib/fs/helpers.cjs.map +1 -0
  329. package/dist/lib/fs/helpers.d.cts +10 -1
  330. package/dist/lib/fs/helpers.d.ts +10 -1
  331. package/dist/lib/fs/helpers.js +4 -2
  332. package/dist/lib/fs/helpers.js.map +1 -0
  333. package/dist/lib/fs/index.cjs +12 -10
  334. package/dist/lib/fs/index.cjs.map +1 -0
  335. package/dist/lib/fs/index.d.cts +4 -3
  336. package/dist/lib/fs/index.d.ts +4 -3
  337. package/dist/lib/fs/index.js +11 -9
  338. package/dist/lib/fs/index.js.map +1 -0
  339. package/dist/lib/fs/storage/base.cjs +5 -3
  340. package/dist/lib/fs/storage/base.cjs.map +1 -0
  341. package/dist/lib/fs/storage/base.d.cts +42 -1
  342. package/dist/lib/fs/storage/base.d.ts +42 -1
  343. package/dist/lib/fs/storage/base.js +4 -2
  344. package/dist/lib/fs/storage/base.js.map +1 -0
  345. package/dist/lib/fs/storage/file-system.cjs +7 -5
  346. package/dist/lib/fs/storage/file-system.cjs.map +1 -0
  347. package/dist/lib/fs/storage/file-system.d.cts +34 -2
  348. package/dist/lib/fs/storage/file-system.d.ts +34 -2
  349. package/dist/lib/fs/storage/file-system.js +6 -4
  350. package/dist/lib/fs/storage/file-system.js.map +1 -0
  351. package/dist/lib/fs/storage/index.cjs +10 -8
  352. package/dist/lib/fs/storage/index.cjs.map +1 -0
  353. package/dist/lib/fs/storage/index.d.cts +4 -2
  354. package/dist/lib/fs/storage/index.d.ts +4 -2
  355. package/dist/lib/fs/storage/index.js +7 -5
  356. package/dist/lib/fs/storage/index.js.map +1 -0
  357. package/dist/lib/fs/storage/virtual.cjs +6 -4
  358. package/dist/lib/fs/storage/virtual.cjs.map +1 -0
  359. package/dist/lib/fs/storage/virtual.d.cts +2 -1
  360. package/dist/lib/fs/storage/virtual.d.ts +2 -1
  361. package/dist/lib/fs/storage/virtual.js +5 -3
  362. package/dist/lib/fs/storage/virtual.js.map +1 -0
  363. package/dist/lib/fs/vfs.cjs +11 -9
  364. package/dist/lib/fs/vfs.cjs.map +1 -0
  365. package/dist/lib/fs/vfs.d.cts +48 -7
  366. package/dist/lib/fs/vfs.d.ts +48 -7
  367. package/dist/lib/fs/vfs.js +10 -8
  368. package/dist/lib/fs/vfs.js.map +1 -0
  369. package/dist/lib/{fs-Dg-aTfiN.d.cts → fs-abWbkR69.d.cts} +85 -4
  370. package/dist/lib/{fs-Dg-aTfiN.d.ts → fs-abWbkR69.d.ts} +85 -4
  371. package/dist/lib/index.cjs +98 -96
  372. package/dist/lib/index.cjs.map +1 -0
  373. package/dist/lib/index.d.cts +6 -5
  374. package/dist/lib/index.d.ts +6 -5
  375. package/dist/lib/index.js +38 -36
  376. package/dist/lib/index.js.map +1 -0
  377. package/dist/lib/{internal-DC9vYMIn.d.cts → internal-CJEi85Up.d.cts} +2 -2
  378. package/dist/lib/{internal-Cgp0NF-t.d.ts → internal-CgJbkA5Y.d.ts} +2 -2
  379. package/dist/lib/logger.cjs +6 -4
  380. package/dist/lib/logger.cjs.map +1 -0
  381. package/dist/lib/logger.d.cts +3 -2
  382. package/dist/lib/logger.d.ts +3 -2
  383. package/dist/lib/logger.js +4 -2
  384. package/dist/lib/logger.js.map +1 -0
  385. package/dist/lib/typescript/import-transformer.cjs +5 -3
  386. package/dist/lib/typescript/import-transformer.cjs.map +1 -0
  387. package/dist/lib/typescript/import-transformer.d.cts +3 -2
  388. package/dist/lib/typescript/import-transformer.d.ts +3 -2
  389. package/dist/lib/typescript/import-transformer.js +4 -2
  390. package/dist/lib/typescript/import-transformer.js.map +1 -0
  391. package/dist/lib/typescript/index.cjs +21 -19
  392. package/dist/lib/typescript/index.cjs.map +1 -0
  393. package/dist/lib/typescript/index.d.cts +3 -2
  394. package/dist/lib/typescript/index.d.ts +3 -2
  395. package/dist/lib/typescript/index.js +8 -6
  396. package/dist/lib/typescript/index.js.map +1 -0
  397. package/dist/lib/typescript/isolated-decl.cjs +5 -3
  398. package/dist/lib/typescript/isolated-decl.cjs.map +1 -0
  399. package/dist/lib/typescript/isolated-decl.js +4 -2
  400. package/dist/lib/typescript/isolated-decl.js.map +1 -0
  401. package/dist/lib/typescript/ts-morph.cjs +6 -4
  402. package/dist/lib/typescript/ts-morph.cjs.map +1 -0
  403. package/dist/lib/typescript/ts-morph.d.cts +5 -4
  404. package/dist/lib/typescript/ts-morph.d.ts +5 -4
  405. package/dist/lib/typescript/ts-morph.js +4 -2
  406. package/dist/lib/typescript/ts-morph.js.map +1 -0
  407. package/dist/lib/typescript/tsconfig.cjs +11 -9
  408. package/dist/lib/typescript/tsconfig.cjs.map +1 -0
  409. package/dist/lib/typescript/tsconfig.js +4 -2
  410. package/dist/lib/typescript/tsconfig.js.map +1 -0
  411. package/dist/lib/unplugin/factory.cjs +23 -21
  412. package/dist/lib/unplugin/factory.cjs.map +1 -0
  413. package/dist/lib/unplugin/factory.d.cts +5 -4
  414. package/dist/lib/unplugin/factory.d.ts +5 -4
  415. package/dist/lib/unplugin/factory.js +22 -20
  416. package/dist/lib/unplugin/factory.js.map +1 -0
  417. package/dist/lib/unplugin/helpers.cjs +5 -3
  418. package/dist/lib/unplugin/helpers.cjs.map +1 -0
  419. package/dist/lib/unplugin/helpers.d.cts +3 -2
  420. package/dist/lib/unplugin/helpers.d.ts +3 -2
  421. package/dist/lib/unplugin/helpers.js +4 -2
  422. package/dist/lib/unplugin/helpers.js.map +1 -0
  423. package/dist/lib/unplugin/index.cjs +28 -26
  424. package/dist/lib/unplugin/index.cjs.map +1 -0
  425. package/dist/lib/unplugin/index.d.cts +5 -4
  426. package/dist/lib/unplugin/index.d.ts +5 -4
  427. package/dist/lib/unplugin/index.js +25 -23
  428. package/dist/lib/unplugin/index.js.map +1 -0
  429. package/dist/lib/unplugin/plugin.cjs +8 -6
  430. package/dist/lib/unplugin/plugin.cjs.map +1 -0
  431. package/dist/lib/unplugin/plugin.d.cts +5 -4
  432. package/dist/lib/unplugin/plugin.d.ts +5 -4
  433. package/dist/lib/unplugin/plugin.js +7 -5
  434. package/dist/lib/unplugin/plugin.js.map +1 -0
  435. package/dist/lib/{unplugin-CvYjC7ZL.d.cts → unplugin-B_IjyAl1.d.cts} +2 -2
  436. package/dist/lib/{unplugin-D7lpyIpN.d.ts → unplugin-CzkNGCn5.d.ts} +2 -2
  437. package/dist/lib/utilities/bundle.cjs +8 -6
  438. package/dist/lib/utilities/bundle.cjs.map +1 -0
  439. package/dist/lib/utilities/bundle.d.cts +3 -2
  440. package/dist/lib/utilities/bundle.d.ts +3 -2
  441. package/dist/lib/utilities/bundle.js +7 -5
  442. package/dist/lib/utilities/bundle.js.map +1 -0
  443. package/dist/lib/utilities/cache.cjs +7 -5
  444. package/dist/lib/utilities/cache.cjs.map +1 -0
  445. package/dist/lib/utilities/cache.d.cts +3 -2
  446. package/dist/lib/utilities/cache.d.ts +3 -2
  447. package/dist/lib/utilities/cache.js +5 -3
  448. package/dist/lib/utilities/cache.js.map +1 -0
  449. package/dist/lib/utilities/file-header.cjs +6 -4
  450. package/dist/lib/utilities/file-header.cjs.map +1 -0
  451. package/dist/lib/utilities/file-header.d.cts +3 -2
  452. package/dist/lib/utilities/file-header.d.ts +3 -2
  453. package/dist/lib/utilities/file-header.js +4 -2
  454. package/dist/lib/utilities/file-header.js.map +1 -0
  455. package/dist/lib/utilities/index.cjs +45 -43
  456. package/dist/lib/utilities/index.cjs.map +1 -0
  457. package/dist/lib/utilities/index.d.cts +3 -2
  458. package/dist/lib/utilities/index.d.ts +3 -2
  459. package/dist/lib/utilities/index.js +17 -15
  460. package/dist/lib/utilities/index.js.map +1 -0
  461. package/dist/lib/utilities/meta.cjs +10 -8
  462. package/dist/lib/utilities/meta.cjs.map +1 -0
  463. package/dist/lib/utilities/meta.d.cts +3 -2
  464. package/dist/lib/utilities/meta.d.ts +3 -2
  465. package/dist/lib/utilities/meta.js +4 -2
  466. package/dist/lib/utilities/meta.js.map +1 -0
  467. package/dist/lib/utilities/resolve.cjs +9 -7
  468. package/dist/lib/utilities/resolve.cjs.map +1 -0
  469. package/dist/lib/utilities/resolve.d.cts +3 -2
  470. package/dist/lib/utilities/resolve.d.ts +3 -2
  471. package/dist/lib/utilities/resolve.js +8 -6
  472. package/dist/lib/utilities/resolve.js.map +1 -0
  473. package/dist/lib/utilities/source-file.cjs +7 -5
  474. package/dist/lib/utilities/source-file.cjs.map +1 -0
  475. package/dist/lib/utilities/source-file.d.cts +3 -2
  476. package/dist/lib/utilities/source-file.d.ts +3 -2
  477. package/dist/lib/utilities/source-file.js +4 -2
  478. package/dist/lib/utilities/source-file.js.map +1 -0
  479. package/dist/lib/utilities/source-map.cjs +5 -3
  480. package/dist/lib/utilities/source-map.cjs.map +1 -0
  481. package/dist/lib/utilities/source-map.d.cts +3 -2
  482. package/dist/lib/utilities/source-map.d.ts +3 -2
  483. package/dist/lib/utilities/source-map.js +4 -2
  484. package/dist/lib/utilities/source-map.js.map +1 -0
  485. package/dist/lib/utilities/worker.cjs +7 -5
  486. package/dist/lib/utilities/worker.cjs.map +1 -0
  487. package/dist/lib/utilities/worker.d.cts +3 -2
  488. package/dist/lib/utilities/worker.d.ts +3 -2
  489. package/dist/lib/utilities/worker.js +5 -3
  490. package/dist/lib/utilities/worker.js.map +1 -0
  491. package/dist/lib/utilities/write-file.cjs +5 -3
  492. package/dist/lib/utilities/write-file.cjs.map +1 -0
  493. package/dist/lib/utilities/write-file.d.cts +3 -2
  494. package/dist/lib/utilities/write-file.d.ts +3 -2
  495. package/dist/lib/utilities/write-file.js +4 -2
  496. package/dist/lib/utilities/write-file.js.map +1 -0
  497. package/dist/next.cjs +6 -6
  498. package/dist/next.js +5 -5
  499. package/dist/nuxt.cjs +8 -8
  500. package/dist/nuxt.js +6 -6
  501. package/dist/plugin-utils/{chunk-GV7O3E7P.js → chunk-36OM2X4L.js} +4 -2
  502. package/dist/plugin-utils/chunk-36OM2X4L.js.map +1 -0
  503. package/dist/{lib/chunk-SHUYVCID.js → plugin-utils/chunk-7QVYU63E.js} +2 -0
  504. package/dist/plugin-utils/chunk-7QVYU63E.js.map +1 -0
  505. package/dist/plugin-utils/{chunk-XIXI67PY.js → chunk-7YN6UEMJ.js} +4 -2
  506. package/dist/plugin-utils/chunk-7YN6UEMJ.js.map +1 -0
  507. package/dist/plugin-utils/{chunk-DZZPNO5H.cjs → chunk-B2V5OVYF.cjs} +6 -4
  508. package/dist/plugin-utils/chunk-B2V5OVYF.cjs.map +1 -0
  509. package/dist/plugin-utils/{chunk-NFXNZFMN.cjs → chunk-DUIPLC7F.cjs} +5 -3
  510. package/dist/plugin-utils/chunk-DUIPLC7F.cjs.map +1 -0
  511. package/dist/plugin-utils/{chunk-SEH3RVMF.js → chunk-G32M72GJ.js} +3 -1
  512. package/dist/plugin-utils/chunk-G32M72GJ.js.map +1 -0
  513. package/dist/plugin-utils/{chunk-5MO4BCOW.cjs → chunk-GH7PPING.cjs} +4 -2
  514. package/dist/plugin-utils/chunk-GH7PPING.cjs.map +1 -0
  515. package/dist/plugin-utils/{chunk-CYVV2MB7.js → chunk-H7GJUBNY.js} +3 -1
  516. package/dist/plugin-utils/chunk-H7GJUBNY.js.map +1 -0
  517. package/dist/plugin-utils/{chunk-ECFS7DPV.cjs → chunk-ID47RJFS.cjs} +9 -7
  518. package/dist/plugin-utils/chunk-ID47RJFS.cjs.map +1 -0
  519. package/dist/plugin-utils/{chunk-FBLNGP3S.js → chunk-NRJ5QYX2.js} +3 -1
  520. package/dist/plugin-utils/chunk-NRJ5QYX2.js.map +1 -0
  521. package/dist/plugin-utils/{chunk-USNT2KNT.cjs → chunk-PK6SKIKE.cjs} +2 -0
  522. package/dist/plugin-utils/chunk-PK6SKIKE.cjs.map +1 -0
  523. package/dist/plugin-utils/{chunk-QKMG6ZAU.js → chunk-QQ63YK2G.js} +4 -2
  524. package/dist/plugin-utils/chunk-QQ63YK2G.js.map +1 -0
  525. package/dist/plugin-utils/{chunk-DCJAIIJ5.cjs → chunk-RBMEE2JC.cjs} +4 -2
  526. package/dist/plugin-utils/chunk-RBMEE2JC.cjs.map +1 -0
  527. package/dist/plugin-utils/{chunk-UNAGYQRB.cjs → chunk-UXLKUCEY.cjs} +9 -7
  528. package/dist/plugin-utils/chunk-UXLKUCEY.cjs.map +1 -0
  529. package/dist/plugin-utils/{chunk-F65J5WOX.cjs → chunk-VJGI676W.cjs} +16 -14
  530. package/dist/plugin-utils/chunk-VJGI676W.cjs.map +1 -0
  531. package/dist/plugin-utils/{chunk-L277XSSN.js → chunk-X4BI25Z5.js} +3 -1
  532. package/dist/plugin-utils/chunk-X4BI25Z5.js.map +1 -0
  533. package/dist/plugin-utils/{context-iOcgJtAf.d.cts → context-DDQIG3fZ.d.cts} +96 -9
  534. package/dist/plugin-utils/{context-iOcgJtAf.d.ts → context-DDQIG3fZ.d.ts} +96 -9
  535. package/dist/plugin-utils/context-helpers.cjs +6 -4
  536. package/dist/plugin-utils/context-helpers.cjs.map +1 -0
  537. package/dist/plugin-utils/context-helpers.d.cts +1 -1
  538. package/dist/plugin-utils/context-helpers.d.ts +1 -1
  539. package/dist/plugin-utils/context-helpers.js +4 -2
  540. package/dist/plugin-utils/context-helpers.js.map +1 -0
  541. package/dist/plugin-utils/enforce.cjs +8 -6
  542. package/dist/plugin-utils/enforce.cjs.map +1 -0
  543. package/dist/plugin-utils/enforce.d.cts +1 -1
  544. package/dist/plugin-utils/enforce.d.ts +1 -1
  545. package/dist/plugin-utils/enforce.js +7 -5
  546. package/dist/plugin-utils/enforce.js.map +1 -0
  547. package/dist/plugin-utils/extend.cjs +7 -5
  548. package/dist/plugin-utils/extend.cjs.map +1 -0
  549. package/dist/plugin-utils/extend.d.cts +1 -1
  550. package/dist/plugin-utils/extend.d.ts +1 -1
  551. package/dist/plugin-utils/extend.js +6 -4
  552. package/dist/plugin-utils/extend.js.map +1 -0
  553. package/dist/plugin-utils/get-config-path.cjs +5 -3
  554. package/dist/plugin-utils/get-config-path.cjs.map +1 -0
  555. package/dist/plugin-utils/get-config-path.d.cts +1 -1
  556. package/dist/plugin-utils/get-config-path.d.ts +1 -1
  557. package/dist/plugin-utils/get-config-path.js +4 -2
  558. package/dist/plugin-utils/get-config-path.js.map +1 -0
  559. package/dist/plugin-utils/helpers.cjs +17 -15
  560. package/dist/plugin-utils/helpers.cjs.map +1 -0
  561. package/dist/plugin-utils/helpers.d.cts +3 -3
  562. package/dist/plugin-utils/helpers.d.ts +3 -3
  563. package/dist/plugin-utils/helpers.js +4 -2
  564. package/dist/plugin-utils/helpers.js.map +1 -0
  565. package/dist/plugin-utils/index.cjs +30 -28
  566. package/dist/plugin-utils/index.cjs.map +1 -0
  567. package/dist/plugin-utils/index.d.cts +1 -1
  568. package/dist/plugin-utils/index.d.ts +1 -1
  569. package/dist/plugin-utils/index.js +10 -8
  570. package/dist/plugin-utils/index.js.map +1 -0
  571. package/dist/plugin-utils/merge.cjs +6 -4
  572. package/dist/plugin-utils/merge.cjs.map +1 -0
  573. package/dist/plugin-utils/merge.d.cts +1 -1
  574. package/dist/plugin-utils/merge.d.ts +1 -1
  575. package/dist/plugin-utils/merge.js +5 -3
  576. package/dist/plugin-utils/merge.js.map +1 -0
  577. package/dist/plugin-utils/paths.cjs +5 -3
  578. package/dist/plugin-utils/paths.cjs.map +1 -0
  579. package/dist/plugin-utils/paths.d.cts +1 -1
  580. package/dist/plugin-utils/paths.d.ts +1 -1
  581. package/dist/plugin-utils/paths.js +4 -2
  582. package/dist/plugin-utils/paths.js.map +1 -0
  583. package/dist/rolldown.cjs +18 -10
  584. package/dist/rolldown.d.cts +2 -1
  585. package/dist/rolldown.d.ts +2 -1
  586. package/dist/rolldown.js +5 -10
  587. package/dist/rollup.cjs +5 -5
  588. package/dist/rollup.d.cts +2 -1
  589. package/dist/rollup.d.ts +2 -1
  590. package/dist/rollup.js +4 -4
  591. package/dist/rspack.cjs +5 -5
  592. package/dist/rspack.d.cts +2 -1
  593. package/dist/rspack.d.ts +2 -1
  594. package/dist/rspack.js +4 -4
  595. package/dist/tsdown.cjs +114 -0
  596. package/dist/tsdown.d.cts +28 -0
  597. package/dist/tsdown.d.ts +28 -0
  598. package/dist/tsdown.js +108 -0
  599. package/dist/tsup.cjs +6 -6
  600. package/dist/tsup.js +5 -5
  601. package/dist/types/api.d.cts +3 -2
  602. package/dist/types/api.d.ts +3 -2
  603. package/dist/types/babel.d.cts +2 -1
  604. package/dist/types/babel.d.ts +2 -1
  605. package/dist/types/build.d.cts +11 -10
  606. package/dist/types/build.d.ts +11 -10
  607. package/dist/types/commands.d.cts +2 -1
  608. package/dist/types/commands.d.ts +2 -1
  609. package/dist/types/config.d.cts +2 -1
  610. package/dist/types/config.d.ts +2 -1
  611. package/dist/types/context.cjs +2 -2
  612. package/dist/types/context.d.cts +2 -1
  613. package/dist/types/context.d.ts +2 -1
  614. package/dist/types/context.js +1 -1
  615. package/dist/types/fs.cjs +4 -4
  616. package/dist/types/fs.d.cts +85 -4
  617. package/dist/types/fs.d.ts +85 -4
  618. package/dist/types/fs.js +1 -1
  619. package/dist/types/hooks.d.cts +2 -1
  620. package/dist/types/hooks.d.ts +2 -1
  621. package/dist/types/index.cjs +9 -9
  622. package/dist/types/index.d.cts +4 -3
  623. package/dist/types/index.d.ts +4 -3
  624. package/dist/types/index.js +4 -4
  625. package/dist/types/internal.d.cts +3 -2
  626. package/dist/types/internal.d.ts +3 -2
  627. package/dist/types/plugin.cjs +2 -2
  628. package/dist/types/plugin.d.cts +2 -1
  629. package/dist/types/plugin.d.ts +2 -1
  630. package/dist/types/plugin.js +1 -1
  631. package/dist/types/resolved.d.cts +2 -1
  632. package/dist/types/resolved.d.ts +2 -1
  633. package/dist/types/unplugin.d.cts +3 -2
  634. package/dist/types/unplugin.d.ts +3 -2
  635. package/dist/unloader.cjs +5 -5
  636. package/dist/unloader.d.cts +2 -1
  637. package/dist/unloader.d.ts +2 -1
  638. package/dist/unloader.js +4 -4
  639. package/dist/unplugin.cjs +8 -8
  640. package/dist/unplugin.d.cts +3 -2
  641. package/dist/unplugin.d.ts +3 -2
  642. package/dist/unplugin.js +6 -6
  643. package/dist/vite.cjs +8 -8
  644. package/dist/vite.d.cts +2 -1
  645. package/dist/vite.d.ts +2 -1
  646. package/dist/vite.js +5 -5
  647. package/dist/webpack.cjs +8 -8
  648. package/dist/webpack.d.cts +2 -1
  649. package/dist/webpack.d.ts +2 -1
  650. package/dist/webpack.js +5 -5
  651. package/package.json +71 -50
  652. package/dist/chunk-C3APS65S.cjs +0 -12
  653. package/dist/lib/chunk-35FGUJFD.cjs +0 -2
  654. package/dist/lib/chunk-DX2VAXZB.cjs +0 -11
  655. package/dist/lib/chunk-FFT4PWRM.js +0 -1
  656. package/dist/lib/chunk-H5JWMXTZ.js +0 -1
  657. package/dist/lib/chunk-I2DQRMX3.js +0 -1
  658. package/dist/lib/chunk-K2SFTPN3.cjs +0 -2
  659. package/dist/lib/chunk-MVIKYHBX.cjs +0 -2
  660. package/dist/lib/chunk-NQAHFTUW.js +0 -1
  661. package/dist/lib/chunk-NYNHNTHT.js +0 -1
  662. package/dist/lib/chunk-TWABN364.cjs +0 -147
  663. package/dist/lib/chunk-VVSEE3JE.cjs +0 -2
  664. package/dist/lib/chunk-YK4PYVLM.cjs +0 -2
@@ -1,13 +1,12 @@
1
- import { PLUGIN_NON_HOOK_FIELDS } from './chunk-6MQ6LCVC.js';
1
+ import { PLUGIN_NON_HOOK_FIELDS } from './chunk-5GOXUZPZ.js';
2
2
  import { SUPPORTED_COMMANDS } from './chunk-2MYPFASJ.js';
3
- import { StoragePreset } from './chunk-FZ6J2GMT.js';
3
+ import { StoragePreset } from './chunk-575Z57QD.js';
4
4
  import { __name } from './chunk-7QVYU63E.js';
5
5
  import { transformAsync } from '@babel/core';
6
6
  import { formatLogMessage } from '@storm-software/config-tools/logger/console';
7
7
  import { LogLevelLabel } from '@storm-software/config-tools/types';
8
8
  import { toArray } from '@stryke/convert/to-array';
9
- import { copyFiles } from '@stryke/fs/copy-file';
10
- import { createDirectory } from '@stryke/fs/helpers';
9
+ import { createDirectorySync, createDirectory } from '@stryke/fs/helpers';
11
10
  import { install } from '@stryke/fs/install';
12
11
  import { listFilesSync, listFiles } from '@stryke/fs/list-files';
13
12
  import { isPackageExists, isPackageListed, doesPackageMatch, getPackageListing } from '@stryke/fs/package-fns';
@@ -28,9 +27,9 @@ import Handlebars from 'handlebars';
28
27
  import { declare } from '@babel/helper-plugin-utils';
29
28
  import * as t from '@babel/types';
30
29
  import ts, { flattenDiagnosticMessageText } from 'typescript';
31
- import { joinPaths } from '@stryke/path/join';
32
- import defu7, { defu } from 'defu';
30
+ import defu7, { createDefu, defu } from 'defu';
33
31
  import { InMemoryFileSystemHost, Project } from 'ts-morph';
32
+ import { isString } from '@stryke/type-checks/is-string';
34
33
  import { getPackageName, hasPackageVersion, getPackageVersion } from '@stryke/string-format/package';
35
34
  import { getObjectDiff } from '@donedeal0/superdiff';
36
35
  import { readJsonFile, readJsonFileSync } from '@stryke/fs/json';
@@ -48,22 +47,23 @@ import { getUnique, getUniqueBy } from '@stryke/helpers/get-unique';
48
47
  import { omit } from '@stryke/helpers/omit';
49
48
  import { fetchRequest } from '@stryke/http/fetch';
50
49
  import { isAbsolutePath, isAbsolute } from '@stryke/path/is-type';
50
+ import { joinPaths } from '@stryke/path/join';
51
51
  import { isNull } from '@stryke/type-checks/is-null';
52
- import { isString } from '@stryke/type-checks/is-string';
53
52
  import { uuid } from '@stryke/unique-id/uuid';
54
53
  import { tsconfigPathsToRegExp, match } from 'bundle-require';
55
54
  import { create } from 'flat-cache';
56
55
  import { parse } from 'oxc-parser';
57
- import { Response } from 'undici';
56
+ import { Agent, setGlobalDispatcher, interceptors, Response } from 'undici';
58
57
  import { createJiti } from 'jiti';
59
58
  import { isUndefined } from '@stryke/type-checks/is-undefined';
60
59
  import { parseTypeDefinition } from '@stryke/convert/parse-type-definition';
61
- import { isFile } from '@stryke/fs/is-file';
60
+ import { isDirectory, isFile } from '@stryke/fs/is-file';
62
61
  import * as $ from '@stryke/capnp';
63
62
  import { readFileBuffer, readFileBufferSync, writeFileBuffer } from '@stryke/fs/buffer';
64
63
  import { isParentPath } from '@stryke/path/is-parent-path';
65
64
  import { prettyBytes } from '@stryke/string-format/pretty-bytes';
66
65
  import { Blob } from 'node:buffer';
66
+ import { fileURLToPath } from 'node:url';
67
67
  import { resolveConfig, format } from 'prettier';
68
68
  import { getLogFn, getLogLevel } from '@storm-software/config-tools/logger';
69
69
  import { getColor } from '@storm-software/config-tools/utilities/colors';
@@ -192,13 +192,16 @@ var VirtualFileSystemHost = class extends InMemoryFileSystemHost {
192
192
  this.#context.fs.removeSync(path);
193
193
  }
194
194
  readDirSync(dirPath) {
195
+ if (!this.#context.fs.isDirectorySync(dirPath)) {
196
+ return [];
197
+ }
195
198
  return this.#context.fs.listSync(dirPath).reduce((ret, entry) => {
196
- const fullPath = this.#context.fs.resolveSync(joinPaths(dirPath, entry));
199
+ const fullPath = this.#context.fs.resolveSync(entry);
197
200
  if (fullPath) {
198
201
  ret.push({
199
202
  name: entry,
200
- isDirectory: this.#context.fs.existsSync(fullPath),
201
- isFile: this.#context.fs.existsSync(fullPath),
203
+ isDirectory: this.#context.fs.isDirectorySync(fullPath),
204
+ isFile: this.#context.fs.isFileSync(fullPath),
202
205
  isSymlink: false
203
206
  });
204
207
  }
@@ -206,14 +209,14 @@ var VirtualFileSystemHost = class extends InMemoryFileSystemHost {
206
209
  }, []);
207
210
  }
208
211
  async readFile(filePath) {
209
- if (!this.#context.fs.existsSync(filePath)) {
210
- throw new Error(`File not found: '${filePath}'. Please check the path and try again.`);
212
+ if (!this.#context.fs.isFileSync(filePath)) {
213
+ return "";
211
214
  }
212
215
  return await this.#context.fs.read(filePath);
213
216
  }
214
217
  readFileSync(filePath) {
215
- if (!this.#context.fs.existsSync(filePath)) {
216
- throw new Error(`File not found: '${filePath}'. Please check the path and try again.`);
218
+ if (!this.#context.fs.isFileSync(filePath)) {
219
+ return "";
217
220
  }
218
221
  return this.#context.fs.readSync(filePath);
219
222
  }
@@ -223,9 +226,11 @@ var VirtualFileSystemHost = class extends InMemoryFileSystemHost {
223
226
  writeFileSync(filePath, fileText) {
224
227
  this.#context.fs.writeSync(filePath, fileText);
225
228
  }
226
- async mkdir(_dirPath) {
229
+ async mkdir(dirPath) {
230
+ await this.#context.fs.mkdir(dirPath);
227
231
  }
228
- mkdirSync(_dirPath) {
232
+ mkdirSync(dirPath) {
233
+ this.#context.fs.mkdirSync(dirPath);
229
234
  }
230
235
  async move(srcPath, destPath) {
231
236
  await this.#context.fs.move(srcPath, destPath);
@@ -240,16 +245,16 @@ var VirtualFileSystemHost = class extends InMemoryFileSystemHost {
240
245
  this.#context.fs.copySync(srcPath, destPath);
241
246
  }
242
247
  async fileExists(filePath) {
243
- return this.#context.fs.exists(filePath);
248
+ return this.#context.fs.isFile(filePath);
244
249
  }
245
250
  fileExistsSync(filePath) {
246
- return this.#context.fs.existsSync(filePath);
251
+ return this.#context.fs.isFileSync(filePath);
247
252
  }
248
253
  async directoryExists(dirPath) {
249
- return this.#context.fs.exists(dirPath);
254
+ return this.#context.fs.isDirectory(dirPath);
250
255
  }
251
256
  directoryExistsSync(dirPath) {
252
- return this.#context.fs.existsSync(dirPath);
257
+ return this.#context.fs.isDirectorySync(dirPath);
253
258
  }
254
259
  realpathSync(path) {
255
260
  return this.#context.fs.resolveSync(path) || path;
@@ -328,6 +333,14 @@ ${diagnosticMessage.length > 5e3 ? `${diagnosticMessage.slice(0, 5e3)}...` : dia
328
333
  return formatTypes(builtinModules);
329
334
  }
330
335
  __name(emitTypes, "emitTypes");
336
+ var mergeResults = createDefu((obj, key, value) => {
337
+ if (isString(obj[key]) && isString(value)) {
338
+ obj[key] = `${obj[key] || ""}
339
+ ${value || ""}`.trim();
340
+ return true;
341
+ }
342
+ return false;
343
+ });
331
344
  async function callHook(context, hook, options, ...args) {
332
345
  const handlers = context.selectHooks(hook, options);
333
346
  if (handlers.length > 0) {
@@ -335,22 +348,28 @@ async function callHook(context, hook, options, ...args) {
335
348
  let results = [];
336
349
  if (options?.sequential === false) {
337
350
  results = await Promise.all(handlers.map(async (handler) => {
338
- if (!isFunction(handler)) {
351
+ if (!isFunction(handler.handle)) {
339
352
  throw new Error(`Plugin hook handler for hook "${hook}" is not a function.`);
340
353
  }
341
- return Promise.resolve(handler.apply(null, [
342
- ...args
343
- ]));
354
+ return Promise.resolve(
355
+ // eslint-disable-next-line ts/no-unsafe-call
356
+ handler.handle.apply(handler.context, [
357
+ ...args
358
+ ])
359
+ );
344
360
  }));
345
361
  } else {
346
362
  for (const handler of handlers) {
347
- if (!isFunction(handler)) {
363
+ if (!isFunction(handler.handle)) {
348
364
  throw new Error(`Plugin hook handler for hook "${hook}" is not a function.`);
349
365
  }
350
366
  if (options?.result === "first" || options?.asNextParam === false) {
351
- results.push(await Promise.resolve(handler.apply(null, [
352
- ...args
353
- ])));
367
+ results.push(await Promise.resolve(
368
+ // eslint-disable-next-line ts/no-unsafe-call
369
+ handler.handle.apply(handler.context, [
370
+ ...args
371
+ ])
372
+ ));
354
373
  if (options?.result === "first" && isSet(results[results.length - 1])) {
355
374
  break;
356
375
  }
@@ -362,8 +381,8 @@ async function callHook(context, hook, options, ...args) {
362
381
  sequenceArgs[0] = isFunction(options.asNextParam) ? await Promise.resolve(options.asNextParam(results[0])) : results[0];
363
382
  }
364
383
  const result = await Promise.resolve(
365
- // eslint-disable-next-line ts/no-unsafe-call, no-useless-call
366
- handler.apply(null, [
384
+ // eslint-disable-next-line ts/no-unsafe-call
385
+ handler.handle.apply(handler.context, [
367
386
  ...sequenceArgs
368
387
  ])
369
388
  );
@@ -372,9 +391,14 @@ async function callHook(context, hook, options, ...args) {
372
391
  results = [
373
392
  result
374
393
  ];
375
- } else {
394
+ } else if (isString(result)) {
395
+ results = [
396
+ `${isString(results[0]) ? results[0] || "" : ""}
397
+ ${result || ""}`.trim()
398
+ ];
399
+ } else if (isObject(result)) {
376
400
  results = [
377
- defu(result, results[0] ?? {})
401
+ mergeResults(result, results[0] ?? {})
378
402
  ];
379
403
  }
380
404
  }
@@ -1165,20 +1189,17 @@ function normalizePath(path, builtinsPath, prefix = "powerlines") {
1165
1189
  return isAbsolutePath(path) ? path : isValidId(toFilePath(path), prefix) ? normalizeId(toFilePath(path), prefix).replace(new RegExp(`^${prefix.replace(/:$/, "")}:`), builtinsPath) : toFilePath(path);
1166
1190
  }
1167
1191
  __name(normalizePath, "normalizePath");
1168
- function normalizeKey(key, sep = ":") {
1169
- if (!key) {
1170
- return "";
1171
- }
1172
- return key.replace(/[:/\\]/g, sep).replace(/^[:/\\]|[:/\\]$/g, "");
1173
- }
1174
- __name(normalizeKey, "normalizeKey");
1175
- function filterKeyByBase(key, base) {
1176
- if (base) {
1177
- return key.startsWith(base) && key[key.length - 1] !== "$";
1178
- }
1179
- return key[key.length - 1] !== "$";
1192
+ function normalizeGlobPatterns(workspaceRoot, patterns) {
1193
+ return getUnique(toArray(patterns).map((pattern) => {
1194
+ if (isSetObject(pattern) && (isSetString(pattern.input) || isSetString(pattern.glob))) {
1195
+ return joinPaths(pattern.input || workspaceRoot, pattern.glob || "**/*");
1196
+ } else if (!isSetString(pattern)) {
1197
+ return void 0;
1198
+ }
1199
+ return pattern;
1200
+ }).filter(isSetString));
1180
1201
  }
1181
- __name(filterKeyByBase, "filterKeyByBase");
1202
+ __name(normalizeGlobPatterns, "normalizeGlobPatterns");
1182
1203
  var BaseStorageAdapter = class {
1183
1204
  static {
1184
1205
  __name(this, "BaseStorageAdapter");
@@ -1233,6 +1254,21 @@ var BaseStorageAdapter = class {
1233
1254
  }
1234
1255
  }
1235
1256
  /**
1257
+ * Synchronously creates a directory at the specified path.
1258
+ *
1259
+ * @param _ - The path of the directory to create.
1260
+ */
1261
+ mkdirSync(_) {
1262
+ }
1263
+ /**
1264
+ * Creates a directory at the specified path.
1265
+ *
1266
+ * @param dirPath - The path of the directory to create.
1267
+ */
1268
+ async mkdir(dirPath) {
1269
+ return Promise.resolve(this.mkdirSync(dirPath));
1270
+ }
1271
+ /**
1236
1272
  * Asynchronously removes a key from the storage.
1237
1273
  *
1238
1274
  * @param key - The key to remove.
@@ -1281,6 +1317,42 @@ var BaseStorageAdapter = class {
1281
1317
  return this.listSync(base);
1282
1318
  }
1283
1319
  /**
1320
+ * Synchronously checks if the given key is a directory.
1321
+ *
1322
+ * @param _ - The key to check.
1323
+ * @returns `true` if the key is a directory, otherwise `false`.
1324
+ */
1325
+ isDirectorySync(_) {
1326
+ return false;
1327
+ }
1328
+ /**
1329
+ * Checks if the given key is a directory.
1330
+ *
1331
+ * @param key - The key to check.
1332
+ * @returns A promise that resolves to `true` if the key is a directory, otherwise `false`.
1333
+ */
1334
+ async isDirectory(key) {
1335
+ return Promise.resolve(this.isDirectorySync(key));
1336
+ }
1337
+ /**
1338
+ * Synchronously checks if the given key is a file.
1339
+ *
1340
+ * @param key - The key to check.
1341
+ * @returns `true` if the key is a file, otherwise `false`.
1342
+ */
1343
+ isFileSync(key) {
1344
+ return this.existsSync(key) && !this.isDirectorySync(key);
1345
+ }
1346
+ /**
1347
+ * Checks if the given key is a file.
1348
+ *
1349
+ * @param key - The key to check.
1350
+ * @returns A promise that resolves to `true` if the key is a file, otherwise `false`.
1351
+ */
1352
+ async isFile(key) {
1353
+ return Promise.resolve(this.isFileSync(key));
1354
+ }
1355
+ /**
1284
1356
  * Disposes of the storage adapter, releasing any held resources.
1285
1357
  *
1286
1358
  * @returns A promise that resolves when the disposal is complete.
@@ -1421,6 +1493,22 @@ var FileSystemStorageAdapter = class extends BaseStorageAdapter {
1421
1493
  }
1422
1494
  }
1423
1495
  /**
1496
+ * Synchronously creates a directory at the specified path.
1497
+ *
1498
+ * @param dirPath - The path of the directory to create.
1499
+ */
1500
+ mkdirSync(dirPath) {
1501
+ createDirectorySync(this.resolve(dirPath));
1502
+ }
1503
+ /**
1504
+ * Creates a directory at the specified path.
1505
+ *
1506
+ * @param dirPath - The path of the directory to create.
1507
+ */
1508
+ async mkdir(dirPath) {
1509
+ await createDirectory(this.resolve(dirPath));
1510
+ }
1511
+ /**
1424
1512
  * Lists all keys under a given base path synchronously.
1425
1513
  *
1426
1514
  * @param base - The base path to list keys from.
@@ -1446,6 +1534,24 @@ var FileSystemStorageAdapter = class extends BaseStorageAdapter {
1446
1534
  ignore: this.options.ignore
1447
1535
  }).catch(ignoreNotfound).then((r) => r || []);
1448
1536
  }
1537
+ /**
1538
+ * Synchronously checks if the given key is a directory.
1539
+ *
1540
+ * @param key - The key to check.
1541
+ * @returns `true` if the key is a directory, otherwise `false`.
1542
+ */
1543
+ isDirectorySync(key) {
1544
+ return isDirectory(this.resolve(key));
1545
+ }
1546
+ /**
1547
+ * Synchronously checks if the given key is a file.
1548
+ *
1549
+ * @param key - The key to check.
1550
+ * @returns `true` if the key is a file, otherwise `false`.
1551
+ */
1552
+ isFileSync(key) {
1553
+ return !isFile(this.resolve(key));
1554
+ }
1449
1555
  };
1450
1556
  var VirtualStorageAdapter = class extends BaseStorageAdapter {
1451
1557
  static {
@@ -1816,26 +1922,65 @@ var VirtualFileSystem = class _VirtualFileSystem {
1816
1922
  return this.#getStorage(resolved)?.adapter?.name === "virtual";
1817
1923
  }
1818
1924
  /**
1925
+ * Checks if a path is a directory in the virtual file system (VFS).
1926
+ *
1927
+ * @param path - The path to check.
1928
+ * @returns `true` if the path is a directory, otherwise `false`.
1929
+ */
1930
+ isDirectorySync(path) {
1931
+ const resolved = this.resolveSync(path);
1932
+ if (!resolved) {
1933
+ return false;
1934
+ }
1935
+ return !!(this.existsSync(resolved) && this.#getStorage(resolved)?.adapter?.isDirectorySync(resolved));
1936
+ }
1937
+ /**
1938
+ * Checks if a path is a directory in the virtual file system (VFS).
1939
+ *
1940
+ * @param path - The path to check.
1941
+ * @returns `true` if the path is a directory, otherwise `false`.
1942
+ */
1943
+ async isDirectory(path) {
1944
+ const resolved = await this.resolve(path);
1945
+ if (!resolved) {
1946
+ return false;
1947
+ }
1948
+ return !!(await this.exists(resolved) && await this.#getStorage(resolved)?.adapter?.isDirectory(resolved));
1949
+ }
1950
+ /**
1951
+ * Checks if a path is a file in the virtual file system (VFS).
1952
+ *
1953
+ * @param path - The path to check.
1954
+ * @returns `true` if the path is a file, otherwise `false`.
1955
+ */
1956
+ isFileSync(path) {
1957
+ const resolved = this.resolveSync(path);
1958
+ if (!resolved) {
1959
+ return false;
1960
+ }
1961
+ return this.#getStorage(resolved)?.adapter?.isFileSync(resolved) ?? false;
1962
+ }
1963
+ /**
1964
+ * Checks if a path is a file in the virtual file system (VFS).
1965
+ *
1966
+ * @param path - The path to check.
1967
+ * @returns `true` if the path is a file, otherwise `false`.
1968
+ */
1969
+ async isFile(path) {
1970
+ const resolved = await this.resolve(path);
1971
+ if (!resolved) {
1972
+ return false;
1973
+ }
1974
+ return await this.#getStorage(resolved)?.adapter?.isFile(resolved) ?? false;
1975
+ }
1976
+ /**
1819
1977
  * Lists files in a given path.
1820
1978
  *
1821
1979
  * @param path - The path to list files from.
1822
1980
  * @returns An array of file names in the specified path.
1823
1981
  */
1824
1982
  listSync(path) {
1825
- let maskedMounts = [];
1826
- const allKeys = [];
1827
- for (const storage of this.#getStorages(path, true)) {
1828
- for (const key of storage.adapter.listSync(storage.relativeBase)) {
1829
- if (!maskedMounts.some((p) => `${storage.base}${normalizeKey(key)}`.startsWith(p))) {
1830
- allKeys.push(`${storage.base}${normalizeKey(key)}`);
1831
- }
1832
- }
1833
- maskedMounts = [
1834
- storage.base,
1835
- ...maskedMounts.filter((p) => !p.startsWith(storage.base))
1836
- ];
1837
- }
1838
- return allKeys.filter((key) => filterKeyByBase(key, path));
1983
+ return getUnique(this.#getStorages(path, true).map((storage) => storage.adapter.listSync(storage.relativeBase ? storage.base ? appendPath(storage.relativeBase, storage.base) : storage.relativeBase : storage.base)).flat());
1839
1984
  }
1840
1985
  /**
1841
1986
  * Lists files in a given path.
@@ -1844,20 +1989,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
1844
1989
  * @returns An array of file names in the specified path.
1845
1990
  */
1846
1991
  async list(path) {
1847
- let maskedMounts = [];
1848
- const allKeys = [];
1849
- for (const storage of this.#getStorages(path, true)) {
1850
- for (const key of await storage.adapter.list(storage.relativeBase)) {
1851
- if (!maskedMounts.some((p) => `${storage.base}${normalizeKey(key)}`.startsWith(p))) {
1852
- allKeys.push(`${storage.base}${normalizeKey(key)}`);
1853
- }
1854
- }
1855
- maskedMounts = [
1856
- storage.base,
1857
- ...maskedMounts.filter((p) => !p.startsWith(storage.base))
1858
- ];
1859
- }
1860
- return allKeys.filter((key) => filterKeyByBase(key, path));
1992
+ return getUnique((await Promise.all(this.#getStorages(path, true).map(async (storage) => storage.adapter.list(storage.relativeBase ? storage.base ? appendPath(storage.relativeBase, storage.base) : storage.relativeBase : storage.base)))).flat());
1861
1993
  }
1862
1994
  /**
1863
1995
  * Removes a file in the virtual file system (VFS).
@@ -1909,12 +2041,16 @@ var VirtualFileSystem = class _VirtualFileSystem {
1909
2041
  */
1910
2042
  async glob(patterns) {
1911
2043
  const results = [];
1912
- for (const pattern of toArray(patterns)) {
2044
+ for (const pattern of normalizeGlobPatterns(this.#context.workspaceConfig.workspaceRoot, patterns)) {
1913
2045
  const normalized = this.#normalizePath(pattern);
1914
2046
  if (!/[*?[\]{}]/.test(normalized) && !normalized.includes("**")) {
1915
- const resolved = this.resolveSync(normalized);
1916
- if (resolved && !results.includes(resolved)) {
1917
- results.push(resolved);
2047
+ if (this.isDirectorySync(normalized)) {
2048
+ results.push(...await this.list(normalized));
2049
+ } else {
2050
+ const resolved = await this.resolve(normalized);
2051
+ if (resolved && !results.includes(resolved)) {
2052
+ results.push(resolved);
2053
+ }
1918
2054
  }
1919
2055
  continue;
1920
2056
  }
@@ -1940,12 +2076,16 @@ var VirtualFileSystem = class _VirtualFileSystem {
1940
2076
  */
1941
2077
  globSync(patterns) {
1942
2078
  const results = [];
1943
- for (const pattern of toArray(patterns)) {
2079
+ for (const pattern of normalizeGlobPatterns(this.#context.workspaceConfig.workspaceRoot, patterns)) {
1944
2080
  const normalized = this.#normalizePath(pattern);
1945
2081
  if (!/[*?[\]{}]/.test(normalized) && !normalized.includes("**")) {
1946
- const resolved = this.resolveSync(normalized);
1947
- if (resolved && !results.includes(resolved)) {
1948
- results.push(resolved);
2082
+ if (this.isDirectorySync(normalized)) {
2083
+ results.push(...this.listSync(normalized));
2084
+ } else {
2085
+ const resolved = this.resolveSync(normalized);
2086
+ if (resolved && !results.includes(resolved)) {
2087
+ results.push(resolved);
2088
+ }
1949
2089
  }
1950
2090
  continue;
1951
2091
  }
@@ -1971,20 +2111,27 @@ var VirtualFileSystem = class _VirtualFileSystem {
1971
2111
  * @param destPath - The destination path to copy to
1972
2112
  */
1973
2113
  async copy(srcPath, destPath) {
1974
- if (hasFileExtension(srcPath)) {
1975
- const content = await this.read(srcPath);
2114
+ const src = srcPath instanceof URL ? fileURLToPath(srcPath) : srcPath;
2115
+ const dest = destPath instanceof URL ? fileURLToPath(destPath) : destPath;
2116
+ if (!isSetString(src) && (!isSetObject(src) || !isSetString(src.input)) || !isSetString(dest)) {
2117
+ return;
2118
+ }
2119
+ const sourceStr = isString(src) ? src : src.input ? src.input : this.#context.workspaceConfig.workspaceRoot;
2120
+ const source = await this.resolve(sourceStr);
2121
+ if (!source) {
2122
+ return;
2123
+ }
2124
+ if (this.isDirectorySync(source) || isSetString(src) && src.includes("*") || isSetObject(src) && isSetString(src.glob)) {
2125
+ await Promise.all((await this.glob(src)).map(async (file) => {
2126
+ return this.copy(file, appendPath(replacePath(file, sourceStr), dest));
2127
+ }));
2128
+ } else {
2129
+ const content = await this.read(source);
1976
2130
  if (content !== void 0) {
1977
- await this.write(hasFileExtension(destPath) ? destPath : joinPaths$1(destPath, findFileName(srcPath)), content);
2131
+ await this.write(this.#normalizePath(dest), content, {
2132
+ skipFormat: true
2133
+ });
1978
2134
  }
1979
- } else {
1980
- await Promise.all((await this.list(srcPath)).map(async (file) => {
1981
- const relativePath2 = file.replace(this.#normalizePath(srcPath), "");
1982
- const destinationPath = this.#normalizePath(appendPath(destPath, relativePath2));
1983
- const content = await this.read(file);
1984
- if (content !== void 0) {
1985
- await this.write(destinationPath, content);
1986
- }
1987
- }));
1988
2135
  }
1989
2136
  }
1990
2137
  /**
@@ -1994,20 +2141,27 @@ var VirtualFileSystem = class _VirtualFileSystem {
1994
2141
  * @param destPath - The destination path to copy to
1995
2142
  */
1996
2143
  copySync(srcPath, destPath) {
1997
- if (hasFileExtension(srcPath)) {
1998
- const content = this.readSync(srcPath);
2144
+ const src = srcPath instanceof URL ? fileURLToPath(srcPath) : srcPath;
2145
+ const dest = destPath instanceof URL ? fileURLToPath(destPath) : destPath;
2146
+ if (!isSetString(src) && (!isSetObject(src) || !isSetString(src.input)) || !isSetString(dest)) {
2147
+ return;
2148
+ }
2149
+ const sourceStr = isString(src) ? src : src.input ? src.input : this.#context.workspaceConfig.workspaceRoot;
2150
+ const source = this.resolveSync(sourceStr);
2151
+ if (!source) {
2152
+ return;
2153
+ }
2154
+ if (this.isDirectorySync(source) || isSetString(src) && src.includes("*") || isSetObject(src) && isSetString(src.glob)) {
2155
+ this.globSync(src).map((file) => {
2156
+ return this.copySync(file, appendPath(findFilePath(replacePath(file, sourceStr)), dest));
2157
+ });
2158
+ } else {
2159
+ const content = this.readSync(source);
1999
2160
  if (content !== void 0) {
2000
- this.writeSync(hasFileExtension(destPath) ? destPath : joinPaths$1(destPath, findFileName(srcPath)), content);
2161
+ this.writeSync(this.#normalizePath(hasFileExtension(dest) ? dest : appendPath(findFileName(source), dest)), content, {
2162
+ skipFormat: true
2163
+ });
2001
2164
  }
2002
- } else {
2003
- this.listSync(srcPath).forEach((file) => {
2004
- const relativePath2 = file.replace(this.#normalizePath(srcPath), "");
2005
- const destinationPath = this.#normalizePath(appendPath(destPath, relativePath2));
2006
- const content = this.readSync(file);
2007
- if (content !== void 0) {
2008
- this.writeSync(destinationPath, content);
2009
- }
2010
- });
2011
2165
  }
2012
2166
  }
2013
2167
  /**
@@ -2126,6 +2280,22 @@ var VirtualFileSystem = class _VirtualFileSystem {
2126
2280
  return adapter.setSync(relativeKey, data);
2127
2281
  }
2128
2282
  /**
2283
+ * Synchronously creates a directory at the specified path.
2284
+ *
2285
+ * @param dirPath - The path of the directory to create.
2286
+ */
2287
+ mkdirSync(dirPath) {
2288
+ return this.#getStorage(dirPath)?.adapter?.mkdirSync(dirPath);
2289
+ }
2290
+ /**
2291
+ * Creates a directory at the specified path.
2292
+ *
2293
+ * @param path - The path of the directory to create.
2294
+ */
2295
+ async mkdir(path) {
2296
+ return this.#getStorage(path)?.adapter?.mkdir(path);
2297
+ }
2298
+ /**
2129
2299
  * Retrieves the metadata of a file in the virtual file system (VFS).
2130
2300
  *
2131
2301
  * @param pathOrId - The path or ID of the file to retrieve metadata for.
@@ -2363,16 +2533,29 @@ __name(writeMetaFile, "writeMetaFile");
2363
2533
 
2364
2534
  // src/lib/contexts/context.ts
2365
2535
  var configCache = /* @__PURE__ */ new WeakMap();
2536
+ var agent = new Agent({
2537
+ keepAliveTimeout: 1e4
2538
+ });
2539
+ setGlobalDispatcher(agent.compose(interceptors.retry({
2540
+ maxRetries: 3,
2541
+ minTimeout: 1e3,
2542
+ maxTimeout: 1e4,
2543
+ timeoutFactor: 2,
2544
+ retryAfter: true
2545
+ })));
2366
2546
  var PowerlinesContext = class _PowerlinesContext {
2367
2547
  static {
2368
2548
  __name(this, "PowerlinesContext");
2369
2549
  }
2370
2550
  /**
2371
- * Internal reference to the API instance
2551
+ * Internal references storage
2552
+ *
2553
+ * @danger
2554
+ * This field is for internal use only and should not be accessed or modified directly. It is unstable and can be changed at anytime.
2372
2555
  *
2373
2556
  * @internal
2374
2557
  */
2375
- #api;
2558
+ #internal = {};
2376
2559
  #workspaceConfig;
2377
2560
  #checksum = null;
2378
2561
  #buildId = uuid();
@@ -2462,12 +2645,24 @@ var PowerlinesContext = class _PowerlinesContext {
2462
2645
  /**
2463
2646
  * Internal context fields and methods
2464
2647
  *
2648
+ * @danger
2649
+ * This field is for internal use only and should not be accessed or modified directly. It is unstable and can be changed at anytime.
2650
+ *
2465
2651
  * @internal
2466
2652
  */
2467
2653
  get $$internal() {
2468
- return {
2469
- api: this.#api
2470
- };
2654
+ return this.#internal;
2655
+ }
2656
+ /**
2657
+ * Internal context fields and methods
2658
+ *
2659
+ * @danger
2660
+ * This field is for internal use only and should not be accessed or modified directly. It is unstable and can be changed at anytime.
2661
+ *
2662
+ * @internal
2663
+ */
2664
+ set $$internal(value) {
2665
+ this.#internal = value;
2471
2666
  }
2472
2667
  /**
2473
2668
  * The resolved entry type definitions for the project
@@ -2694,19 +2889,27 @@ var PowerlinesContext = class _PowerlinesContext {
2694
2889
  });
2695
2890
  }
2696
2891
  }
2697
- const result = await fetchRequest(input, options);
2892
+ const response = await fetchRequest(input, {
2893
+ timeout: 12e3,
2894
+ ...options
2895
+ });
2896
+ const result = {
2897
+ body: await response.text(),
2898
+ status: response.status,
2899
+ statusText: response.statusText,
2900
+ headers: Object.fromEntries(response.headers.entries())
2901
+ };
2698
2902
  if (!this.config.skipCache && !options.skipCache) {
2699
2903
  try {
2700
- this.requestCache.set(cacheKey, {
2701
- body: await result.text(),
2702
- status: result.status,
2703
- statusText: result.statusText,
2704
- headers: Object.fromEntries(result.headers.entries())
2705
- });
2904
+ this.requestCache.set(cacheKey, result);
2706
2905
  } catch {
2707
2906
  }
2708
2907
  }
2709
- return result;
2908
+ return new Response(result.body, {
2909
+ status: result.status,
2910
+ statusText: result.statusText,
2911
+ headers: result.headers
2912
+ });
2710
2913
  }
2711
2914
  /**
2712
2915
  * Parse code using [Oxc-Parser](https://github.com/oxc/oxc) into an (ESTree-compatible)[https://github.com/estree/estree] AST object.
@@ -3390,36 +3593,90 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends P
3390
3593
  * Retrieves the hook handlers for a specific hook name
3391
3594
  */
3392
3595
  selectHooks(hook, options) {
3393
- const handlers = [];
3596
+ const result = [];
3394
3597
  if (this.hooks[hook]) {
3395
3598
  if (!isHookExternal(hook)) {
3396
3599
  const hooks = this.hooks[hook];
3397
3600
  if (options?.order) {
3398
3601
  if (options?.order === "pre") {
3399
- handlers.push(...(hooks.preOrdered ?? []).map((h) => h.handler));
3400
- handlers.push(...(hooks.preEnforced ?? []).map((h) => h.handler));
3602
+ result.push(...(hooks.preOrdered ?? []).map((h) => {
3603
+ const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
3604
+ if (!plugin) {
3605
+ throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
3606
+ }
3607
+ return {
3608
+ handle: h.handler,
3609
+ context: plugin.context
3610
+ };
3611
+ }));
3612
+ result.push(...(hooks.preEnforced ?? []).map((h) => {
3613
+ const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
3614
+ if (!plugin) {
3615
+ throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
3616
+ }
3617
+ return {
3618
+ handle: h.handler,
3619
+ context: plugin.context
3620
+ };
3621
+ }));
3401
3622
  } else if (options?.order === "post") {
3402
- handlers.push(...(hooks.postOrdered ?? []).map((h) => h.handler));
3403
- handlers.push(...(hooks.postEnforced ?? []).map((h) => h.handler));
3623
+ result.push(...(hooks.postOrdered ?? []).map((h) => {
3624
+ const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
3625
+ if (!plugin) {
3626
+ throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
3627
+ }
3628
+ return {
3629
+ handle: h.handler,
3630
+ context: plugin.context
3631
+ };
3632
+ }));
3633
+ result.push(...(hooks.postEnforced ?? []).map((h) => {
3634
+ const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
3635
+ if (!plugin) {
3636
+ throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
3637
+ }
3638
+ return {
3639
+ handle: h.handler,
3640
+ context: plugin.context
3641
+ };
3642
+ }));
3404
3643
  } else {
3405
- handlers.push(...(hooks.normal ?? []).map((h) => h.handler));
3644
+ result.push(...(hooks.normal ?? []).map((h) => {
3645
+ const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
3646
+ if (!plugin) {
3647
+ throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
3648
+ }
3649
+ return {
3650
+ handle: h.handler,
3651
+ context: plugin.context
3652
+ };
3653
+ }));
3406
3654
  }
3407
3655
  } else {
3408
- handlers.push(...this.selectHooks(hook, {
3656
+ result.push(...this.selectHooks(hook, {
3409
3657
  order: "pre"
3410
3658
  }));
3411
- handlers.push(...this.selectHooks(hook, {
3659
+ result.push(...this.selectHooks(hook, {
3412
3660
  order: "normal"
3413
3661
  }));
3414
- handlers.push(...this.selectHooks(hook, {
3662
+ result.push(...this.selectHooks(hook, {
3415
3663
  order: "post"
3416
3664
  }));
3417
3665
  }
3418
3666
  } else {
3419
- handlers.push(...this.hooks[hook].map((h) => h.handler));
3667
+ result.push(...this.hooks[hook].map((h) => {
3668
+ const plugin = this.plugins.find((p) => p.plugin.name === h.plugin.name);
3669
+ if (!plugin) {
3670
+ throw new Error(`Could not find plugin context for plugin "${h.plugin.name}".`);
3671
+ }
3672
+ return {
3673
+ handle: h.handler,
3674
+ context: plugin.context
3675
+ };
3676
+ }));
3420
3677
  }
3421
3678
  }
3422
- return handlers;
3679
+ return result;
3423
3680
  }
3424
3681
  constructor(config, workspaceConfig) {
3425
3682
  super(workspaceConfig);
@@ -3452,6 +3709,31 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends PowerlinesContext
3452
3709
  return context;
3453
3710
  }
3454
3711
  /**
3712
+ * Internal context fields and methods
3713
+ *
3714
+ * @danger
3715
+ * This field is for internal use only and should not be accessed or modified directly. It is unstable and can be changed at anytime.
3716
+ *
3717
+ * @internal
3718
+ */
3719
+ get $$internal() {
3720
+ return super.$$internal;
3721
+ }
3722
+ /**
3723
+ * Internal context fields and methods
3724
+ *
3725
+ * @danger
3726
+ * This field is for internal use only and should not be accessed or modified directly. It is unstable and can be changed at anytime.
3727
+ *
3728
+ * @internal
3729
+ */
3730
+ set $$internal(value) {
3731
+ super.$$internal = value;
3732
+ for (const environment of Object.values(this.environments)) {
3733
+ environment.$$internal = super.$$internal;
3734
+ }
3735
+ }
3736
+ /**
3455
3737
  * A record of all environments by name
3456
3738
  */
3457
3739
  get environments() {
@@ -3625,7 +3907,9 @@ var PowerlinesAPI = class _PowerlinesAPI {
3625
3907
  */
3626
3908
  static async from(workspaceRoot, config) {
3627
3909
  const api = new _PowerlinesAPI(await PowerlinesAPIContext.from(workspaceRoot, config));
3628
- api.#context.$$internal.api = api;
3910
+ api.#context.$$internal = {
3911
+ api
3912
+ };
3629
3913
  for (const plugin of api.context.config.plugins ?? []) {
3630
3914
  await api.#addPlugin(plugin);
3631
3915
  }
@@ -3750,7 +4034,7 @@ ${formatLogMessage(context.config)}`);
3750
4034
  context.log(LogLevelLabel.TRACE, `Generating TypeScript declaration file ${context.dtsPath}.`);
3751
4035
  const directives = [];
3752
4036
  const asNextParam = /* @__PURE__ */ __name((previousResult) => isObject(previousResult) ? previousResult.code : previousResult, "asNextParam");
3753
- let result = await this.callHook("generateTypes", {
4037
+ let result = await this.callHook("types", {
3754
4038
  environment: context,
3755
4039
  sequential: true,
3756
4040
  order: "pre",
@@ -3767,7 +4051,7 @@ ${formatLogMessage(context.config)}`);
3767
4051
  generatedTypes = result;
3768
4052
  }
3769
4053
  }
3770
- result = await this.callHook("generateTypes", {
4054
+ result = await this.callHook("types", {
3771
4055
  environment: context,
3772
4056
  sequential: true,
3773
4057
  order: "normal",
@@ -3784,7 +4068,7 @@ ${formatLogMessage(context.config)}`);
3784
4068
  generatedTypes = result;
3785
4069
  }
3786
4070
  }
3787
- result = await this.callHook("generateTypes", {
4071
+ result = await this.callHook("types", {
3788
4072
  environment: context,
3789
4073
  sequential: true,
3790
4074
  order: "post",
@@ -3957,15 +4241,12 @@ ${formatTypes(generatedTypes)}
3957
4241
  const destinationPath = joinPaths$1(appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot), "dist");
3958
4242
  if (sourcePath !== destinationPath) {
3959
4243
  context.log(LogLevelLabel.INFO, `Copying build output files from project's build directory (${context.config.output.buildPath}) to the workspace's output directory (${context.config.output.outputPath}).`);
3960
- await copyFiles({
3961
- input: sourcePath,
3962
- glob: "**/*"
3963
- }, destinationPath);
4244
+ await context.fs.copy(sourcePath, destinationPath);
3964
4245
  }
3965
4246
  }
3966
4247
  await Promise.all(context.config.output.assets.map(async (asset) => {
3967
4248
  context.log(LogLevelLabel.DEBUG, `Copying asset(s): ${chalk5.redBright(context.workspaceConfig.workspaceRoot === asset.input ? asset.glob : joinPaths$1(replacePath(asset.input, context.workspaceConfig.workspaceRoot), asset.glob))} -> ${chalk5.greenBright(joinPaths$1(replacePath(asset.output, context.workspaceConfig.workspaceRoot), asset.glob))} ${Array.isArray(asset.ignore) && asset.ignore.length > 0 ? ` (ignoring: ${asset.ignore.map((i) => chalk5.yellowBright(i)).join(", ")})` : ""}`);
3968
- await copyFiles(asset, asset.output);
4249
+ await context.fs.copy(asset, asset.output);
3969
4250
  }));
3970
4251
  await this.callHook("build", {
3971
4252
  environment: context,
@@ -4230,5 +4511,5 @@ Note: Please ensure the plugin package's default export is a class that extends
4230
4511
  };
4231
4512
 
4232
4513
  export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, PowerlinesAPI, _capnpFileId, createLog, extendLog };
4233
- //# sourceMappingURL=chunk-QRE6JMCD.js.map
4234
- //# sourceMappingURL=chunk-QRE6JMCD.js.map
4514
+ //# sourceMappingURL=chunk-7DOCWJ76.js.map
4515
+ //# sourceMappingURL=chunk-7DOCWJ76.js.map