powerlines 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (365) hide show
  1. package/dist/astro.cjs +9 -9
  2. package/dist/astro.d.cts +2 -1
  3. package/dist/astro.d.ts +2 -1
  4. package/dist/astro.js +6 -6
  5. package/dist/{chunk-UESICHEO.cjs → chunk-2RHPFVYT.cjs} +17 -18
  6. package/dist/{chunk-75B5EPR4.js → chunk-3Y5CCIJR.js} +3 -3
  7. package/dist/{chunk-YE56I7CZ.cjs → chunk-5XYGZ3DC.cjs} +2 -2
  8. package/dist/{chunk-PFCQFK7H.js → chunk-5Y4JYQ66.js} +3 -3
  9. package/dist/{chunk-H2SX5ZYF.cjs → chunk-66GXB2UY.cjs} +4 -4
  10. package/dist/{chunk-VOB62ELC.js → chunk-6TJGZR5X.js} +4 -4
  11. package/dist/{chunk-BWZCYCIF.js → chunk-6UDHGAAI.js} +3 -3
  12. package/dist/{chunk-ETEQKM36.cjs → chunk-7IWH37DY.cjs} +2 -2
  13. package/dist/{chunk-GI35XXXH.js → chunk-EGSEJQCE.js} +3 -3
  14. package/dist/{chunk-ILVCZATT.js → chunk-GPPJ2CRE.js} +2 -2
  15. package/dist/{chunk-54SOH6E5.js → chunk-HVT7PBFF.js} +3 -3
  16. package/dist/chunk-IJBH5OUN.cjs +12 -0
  17. package/dist/chunk-JBTSAOIQ.js +31 -0
  18. package/dist/{chunk-MXYZKFOD.js → chunk-KYGEWAEG.js} +3 -3
  19. package/dist/{chunk-6X6QQH33.cjs → chunk-L2SAK2JC.cjs} +4 -4
  20. package/dist/chunk-LXMNDUPG.cjs +12 -0
  21. package/dist/{chunk-V56DIXOO.js → chunk-N7NE3VOU.js} +4 -4
  22. package/dist/{chunk-D55IOUF3.js → chunk-OYIM2M74.js} +522 -517
  23. package/dist/{chunk-RRGXS7GZ.cjs → chunk-QHGPZK2H.cjs} +4 -4
  24. package/dist/chunk-RQ4CHMPO.cjs +12 -0
  25. package/dist/chunk-S5QFX2GM.cjs +12 -0
  26. package/dist/{chunk-KCDZ3LCF.js → chunk-S746E63M.js} +3 -3
  27. package/dist/{chunk-FBBWXUGK.js → chunk-SDEBJQDT.js} +12 -13
  28. package/dist/chunk-SL3CXJWD.cjs +34 -0
  29. package/dist/{chunk-I5D3SVUH.cjs → chunk-UHCRNFFC.cjs} +9 -9
  30. package/dist/{chunk-5ST7UKJF.cjs → chunk-UTVZVGM3.cjs} +530 -525
  31. package/dist/{chunk-QIKKQQF7.cjs → chunk-UZQYBO6Z.cjs} +4 -4
  32. package/dist/{chunk-YOHDGH77.js → chunk-VIRKTIPK.js} +3 -3
  33. package/dist/{chunk-WAWIGYB4.js → chunk-WCPY7HPU.js} +4 -4
  34. package/dist/{chunk-MMDBMHAW.js → chunk-WPVIF35O.js} +2 -2
  35. package/dist/chunk-YG7U2GIR.cjs +24 -0
  36. package/dist/{chunk-DOBCIS3U.cjs → chunk-ZBDP43LG.cjs} +6 -6
  37. package/dist/chunk-ZFATNDSY.cjs +12 -0
  38. package/dist/{chunk-4R6CQNB2.js → chunk-ZU4IRZSQ.js} +7 -7
  39. package/dist/define-config.d.cts +2 -1
  40. package/dist/define-config.d.ts +2 -1
  41. package/dist/esbuild.cjs +8 -8
  42. package/dist/esbuild.d.cts +2 -1
  43. package/dist/esbuild.d.ts +2 -1
  44. package/dist/esbuild.js +5 -5
  45. package/dist/extend-plugin.d.cts +2 -1
  46. package/dist/extend-plugin.d.ts +2 -1
  47. package/dist/farm.cjs +4 -4
  48. package/dist/farm.d.cts +2 -1
  49. package/dist/farm.d.ts +2 -1
  50. package/dist/farm.js +3 -3
  51. package/dist/{hooks-D0gf1nT3.d.ts → hooks-BGYnc61f.d.ts} +1 -1
  52. package/dist/{hooks-fVJu9DCF.d.cts → hooks-gk8S8LFP.d.cts} +1 -1
  53. package/dist/index.cjs +27 -27
  54. package/dist/index.d.cts +4 -3
  55. package/dist/index.d.ts +4 -3
  56. package/dist/index.js +18 -18
  57. package/dist/internal/api.cjs +3 -3
  58. package/dist/internal/api.d.cts +3 -2
  59. package/dist/internal/api.d.ts +3 -2
  60. package/dist/internal/api.js +2 -2
  61. package/dist/lib/build/esbuild.cjs +4 -4
  62. package/dist/lib/build/esbuild.d.cts +2 -1
  63. package/dist/lib/build/esbuild.d.ts +2 -1
  64. package/dist/lib/build/esbuild.js +1 -1
  65. package/dist/lib/build/index.cjs +25 -25
  66. package/dist/lib/build/index.d.cts +3 -2
  67. package/dist/lib/build/index.d.ts +3 -2
  68. package/dist/lib/build/index.js +9 -9
  69. package/dist/lib/build/rolldown.cjs +3 -3
  70. package/dist/lib/build/rolldown.d.cts +2 -1
  71. package/dist/lib/build/rolldown.d.ts +2 -1
  72. package/dist/lib/build/rolldown.js +2 -2
  73. package/dist/lib/build/rollup.cjs +3 -3
  74. package/dist/lib/build/rollup.d.cts +2 -1
  75. package/dist/lib/build/rollup.d.ts +2 -1
  76. package/dist/lib/build/rollup.js +1 -1
  77. package/dist/lib/build/rspack.cjs +2 -2
  78. package/dist/lib/build/rspack.d.cts +2 -1
  79. package/dist/lib/build/rspack.d.ts +2 -1
  80. package/dist/lib/build/rspack.js +1 -1
  81. package/dist/lib/build/tsup.cjs +5 -5
  82. package/dist/lib/build/tsup.d.cts +2 -1
  83. package/dist/lib/build/tsup.d.ts +2 -1
  84. package/dist/lib/build/tsup.js +2 -2
  85. package/dist/lib/build/unbuild.cjs +6 -6
  86. package/dist/lib/build/unbuild.d.cts +3 -2
  87. package/dist/lib/build/unbuild.d.ts +3 -2
  88. package/dist/lib/build/unbuild.js +3 -3
  89. package/dist/lib/build/vite.cjs +4 -4
  90. package/dist/lib/build/vite.d.cts +2 -1
  91. package/dist/lib/build/vite.d.ts +2 -1
  92. package/dist/lib/build/vite.js +2 -2
  93. package/dist/lib/build/webpack.cjs +2 -2
  94. package/dist/lib/build/webpack.d.cts +2 -1
  95. package/dist/lib/build/webpack.d.ts +2 -1
  96. package/dist/lib/build/webpack.js +1 -1
  97. package/dist/lib/{chunk-7CZ2QZEV.js → chunk-3I2YOM2E.js} +4 -4
  98. package/dist/lib/chunk-3I2YOM2E.js.map +1 -0
  99. package/dist/lib/{chunk-KAOWUIFH.cjs → chunk-4XUVP2LL.cjs} +3 -3
  100. package/dist/lib/chunk-4XUVP2LL.cjs.map +1 -0
  101. package/dist/lib/{chunk-ZKYZWEHY.cjs → chunk-6U2UX2PX.cjs} +4 -4
  102. package/dist/lib/chunk-6U2UX2PX.cjs.map +1 -0
  103. package/dist/lib/{chunk-VRNWPH35.cjs → chunk-7EAV6Q7B.cjs} +10 -9
  104. package/dist/lib/chunk-7EAV6Q7B.cjs.map +1 -0
  105. package/dist/lib/{chunk-ZYBUJ2HE.js → chunk-CAPN4FSS.js} +7 -7
  106. package/dist/lib/chunk-CAPN4FSS.js.map +1 -0
  107. package/dist/lib/{chunk-LTBRHAQ2.cjs → chunk-GJNFAFKR.cjs} +4 -4
  108. package/dist/lib/chunk-GJNFAFKR.cjs.map +1 -0
  109. package/dist/lib/{chunk-VANFTXBT.cjs → chunk-GWYTWFZE.cjs} +7 -7
  110. package/dist/lib/chunk-GWYTWFZE.cjs.map +1 -0
  111. package/dist/lib/{chunk-DKE25WTL.js → chunk-HQ6TGY34.js} +2 -2
  112. package/dist/lib/chunk-HQ6TGY34.js.map +1 -0
  113. package/dist/lib/{chunk-QSBORJCS.js → chunk-HZDOJWUO.js} +6 -6
  114. package/dist/lib/chunk-HZDOJWUO.js.map +1 -0
  115. package/dist/lib/{chunk-ECJPGNXE.cjs → chunk-IK3ABDPP.cjs} +2 -2
  116. package/dist/lib/chunk-IK3ABDPP.cjs.map +1 -0
  117. package/dist/lib/{chunk-G5DJO4HA.cjs → chunk-JTUL3477.cjs} +5 -5
  118. package/dist/lib/chunk-JTUL3477.cjs.map +1 -0
  119. package/dist/lib/{chunk-E7UTFXPP.js → chunk-KFE2IR3Y.js} +4 -4
  120. package/dist/lib/chunk-KFE2IR3Y.js.map +1 -0
  121. package/dist/lib/{chunk-RY67J24J.js → chunk-KSBESEOF.js} +2 -2
  122. package/dist/lib/chunk-KSBESEOF.js.map +1 -0
  123. package/dist/lib/{chunk-26W3IQT6.js → chunk-LTVWU4J2.js} +5 -5
  124. package/dist/lib/chunk-LTVWU4J2.js.map +1 -0
  125. package/dist/lib/{chunk-GWAVDFOE.js → chunk-M7U5RMK7.js} +8 -6
  126. package/dist/lib/chunk-M7U5RMK7.js.map +1 -0
  127. package/dist/lib/{chunk-2D74QBNW.cjs → chunk-M7WHFUKR.cjs} +524 -522
  128. package/dist/lib/chunk-M7WHFUKR.cjs.map +1 -0
  129. package/dist/lib/{chunk-EOO7IRCI.js → chunk-MAHHHINV.js} +3 -3
  130. package/dist/lib/chunk-MAHHHINV.js.map +1 -0
  131. package/dist/lib/{chunk-7FQQFIHR.cjs → chunk-NANLYIUO.cjs} +4 -4
  132. package/dist/lib/chunk-NANLYIUO.cjs.map +1 -0
  133. package/dist/lib/{chunk-TNCZYSNV.js → chunk-NE46WXNJ.js} +2 -2
  134. package/dist/lib/chunk-NE46WXNJ.js.map +1 -0
  135. package/dist/lib/{chunk-QGJVGFY4.js → chunk-OF5IJ4WG.js} +6 -6
  136. package/dist/lib/chunk-OF5IJ4WG.js.map +1 -0
  137. package/dist/lib/{chunk-WDNYOFEH.js → chunk-PIFE7MUZ.js} +500 -498
  138. package/dist/lib/chunk-PIFE7MUZ.js.map +1 -0
  139. package/dist/lib/{chunk-2ZYHO243.js → chunk-PXSRMP4E.js} +2 -2
  140. package/dist/lib/chunk-PXSRMP4E.js.map +1 -0
  141. package/dist/lib/{chunk-CXYZENE4.js → chunk-Q2L3FNJO.js} +13 -7
  142. package/dist/lib/chunk-Q2L3FNJO.js.map +1 -0
  143. package/dist/lib/{chunk-XFIGAAKN.cjs → chunk-Q2RUDKWY.cjs} +8 -6
  144. package/dist/lib/chunk-Q2RUDKWY.cjs.map +1 -0
  145. package/dist/lib/{chunk-NFDRIBCM.js → chunk-Q3KJZ3B5.js} +5 -7
  146. package/dist/lib/chunk-Q3KJZ3B5.js.map +1 -0
  147. package/dist/lib/{chunk-FHZJQZOE.cjs → chunk-QXJHCA3E.cjs} +7 -7
  148. package/dist/lib/chunk-QXJHCA3E.cjs.map +1 -0
  149. package/dist/lib/{chunk-TZFBE35T.cjs → chunk-RQICHHZM.cjs} +2 -2
  150. package/dist/lib/chunk-RQICHHZM.cjs.map +1 -0
  151. package/dist/lib/{chunk-7MXG5EG2.js → chunk-RXQWNSZX.js} +3 -3
  152. package/dist/lib/chunk-RXQWNSZX.js.map +1 -0
  153. package/dist/lib/{chunk-I6A564OE.cjs → chunk-U36VZLW6.cjs} +2 -2
  154. package/dist/lib/chunk-U36VZLW6.cjs.map +1 -0
  155. package/dist/lib/{chunk-65DUUIIF.cjs → chunk-UQJWVRRE.cjs} +2 -2
  156. package/dist/lib/chunk-UQJWVRRE.cjs.map +1 -0
  157. package/dist/lib/{chunk-XHCRXNQ3.cjs → chunk-V5OY4ALI.cjs} +5 -5
  158. package/dist/lib/chunk-V5OY4ALI.cjs.map +1 -0
  159. package/dist/lib/{chunk-I3I4BYJ4.js → chunk-VJN72T2O.js} +5 -5
  160. package/dist/lib/chunk-VJN72T2O.js.map +1 -0
  161. package/dist/lib/{chunk-KACTPBW2.cjs → chunk-W4OMKQ7W.cjs} +14 -8
  162. package/dist/lib/chunk-W4OMKQ7W.cjs.map +1 -0
  163. package/dist/lib/{chunk-SB3NFYXT.cjs → chunk-XZD7S5TU.cjs} +5 -5
  164. package/dist/lib/chunk-XZD7S5TU.cjs.map +1 -0
  165. package/dist/lib/{chunk-PJKWY74P.js → chunk-YBIWVB66.js} +10 -9
  166. package/dist/lib/chunk-YBIWVB66.js.map +1 -0
  167. package/dist/lib/{chunk-JXIRUV56.js → chunk-YF3YHK4X.js} +5 -5
  168. package/dist/lib/chunk-YF3YHK4X.js.map +1 -0
  169. package/dist/lib/{chunk-TJQEGHJA.cjs → chunk-YVDJCVE5.cjs} +12 -12
  170. package/dist/lib/chunk-YVDJCVE5.cjs.map +1 -0
  171. package/dist/lib/{chunk-M2TB43VG.cjs → chunk-ZP7PDTVE.cjs} +7 -9
  172. package/dist/lib/chunk-ZP7PDTVE.cjs.map +1 -0
  173. package/dist/lib/{config-BOPIY57U.d.cts → config-AuIGsUck.d.cts} +110 -106
  174. package/dist/lib/{config-Chd_3Uh3.d.ts → config-B_WTwd49.d.ts} +110 -106
  175. package/dist/lib/config-file.d.cts +2 -1
  176. package/dist/lib/config-file.d.ts +2 -1
  177. package/dist/lib/entry.d.cts +2 -1
  178. package/dist/lib/entry.d.ts +2 -1
  179. package/dist/lib/{hooks-DkVRKYVN.d.cts → hooks-4KkL9GD2.d.cts} +1 -1
  180. package/dist/lib/{hooks-56fQP2HY.d.ts → hooks-DErK4Fv4.d.ts} +1 -1
  181. package/dist/lib/index.cjs +36 -36
  182. package/dist/lib/index.d.cts +3 -2
  183. package/dist/lib/index.d.ts +3 -2
  184. package/dist/lib/index.js +11 -11
  185. package/dist/lib/logger.d.cts +2 -1
  186. package/dist/lib/logger.d.ts +2 -1
  187. package/dist/lib/typescript/compiler-host.cjs +6 -6
  188. package/dist/lib/typescript/compiler-host.cjs.map +1 -1
  189. package/dist/lib/typescript/compiler-host.d.cts +2 -1
  190. package/dist/lib/typescript/compiler-host.d.ts +2 -1
  191. package/dist/lib/typescript/compiler-host.js +5 -5
  192. package/dist/lib/typescript/compiler-host.js.map +1 -1
  193. package/dist/lib/typescript/import-transformer.cjs +1 -1
  194. package/dist/lib/typescript/import-transformer.cjs.map +1 -1
  195. package/dist/lib/typescript/import-transformer.d.cts +2 -1
  196. package/dist/lib/typescript/import-transformer.d.ts +2 -1
  197. package/dist/lib/typescript/import-transformer.js +1 -1
  198. package/dist/lib/typescript/import-transformer.js.map +1 -1
  199. package/dist/lib/typescript/index.cjs +6 -6
  200. package/dist/lib/typescript/index.d.cts +2 -1
  201. package/dist/lib/typescript/index.d.ts +2 -1
  202. package/dist/lib/typescript/index.js +1 -1
  203. package/dist/lib/typescript/program.cjs +6 -6
  204. package/dist/lib/typescript/program.d.cts +2 -1
  205. package/dist/lib/typescript/program.d.ts +2 -1
  206. package/dist/lib/typescript/program.js +1 -1
  207. package/dist/lib/unplugin/factory.cjs +6 -6
  208. package/dist/lib/unplugin/factory.d.cts +3 -2
  209. package/dist/lib/unplugin/factory.d.ts +3 -2
  210. package/dist/lib/unplugin/factory.js +5 -5
  211. package/dist/lib/unplugin/index.cjs +9 -9
  212. package/dist/lib/unplugin/index.d.cts +3 -2
  213. package/dist/lib/unplugin/index.d.ts +3 -2
  214. package/dist/lib/unplugin/index.js +6 -6
  215. package/dist/lib/unplugin/plugin.cjs +4 -4
  216. package/dist/lib/unplugin/plugin.d.cts +2 -1
  217. package/dist/lib/unplugin/plugin.d.ts +2 -1
  218. package/dist/lib/unplugin/plugin.js +3 -3
  219. package/dist/lib/unplugin/resolve-id.cjs +2 -2
  220. package/dist/lib/unplugin/resolve-id.d.cts +2 -1
  221. package/dist/lib/unplugin/resolve-id.d.ts +2 -1
  222. package/dist/lib/unplugin/resolve-id.js +1 -1
  223. package/dist/lib/utilities/cache.cjs +4 -4
  224. package/dist/lib/utilities/cache.js +2 -2
  225. package/dist/lib/utilities/file-header.d.cts +2 -1
  226. package/dist/lib/utilities/file-header.d.ts +2 -1
  227. package/dist/lib/utilities/index.cjs +24 -24
  228. package/dist/lib/utilities/index.d.cts +2 -1
  229. package/dist/lib/utilities/index.d.ts +2 -1
  230. package/dist/lib/utilities/index.js +7 -7
  231. package/dist/lib/utilities/meta.cjs +8 -8
  232. package/dist/lib/utilities/meta.d.cts +2 -1
  233. package/dist/lib/utilities/meta.d.ts +2 -1
  234. package/dist/lib/utilities/meta.js +1 -1
  235. package/dist/lib/utilities/plugin-helpers.d.cts +2 -1
  236. package/dist/lib/utilities/plugin-helpers.d.ts +2 -1
  237. package/dist/lib/utilities/resolve-path.cjs +2 -2
  238. package/dist/lib/utilities/resolve-path.d.cts +2 -1
  239. package/dist/lib/utilities/resolve-path.d.ts +2 -1
  240. package/dist/lib/utilities/resolve-path.js +1 -1
  241. package/dist/lib/utilities/source-file.cjs +4 -4
  242. package/dist/lib/utilities/source-file.js +1 -1
  243. package/dist/lib/utilities/source-map.cjs +2 -2
  244. package/dist/lib/utilities/source-map.js +1 -1
  245. package/dist/lib/utilities/worker.cjs +3 -3
  246. package/dist/lib/utilities/worker.d.cts +2 -1
  247. package/dist/lib/utilities/worker.d.ts +2 -1
  248. package/dist/lib/utilities/worker.js +1 -1
  249. package/dist/lib/utilities/write-file.cjs +2 -2
  250. package/dist/lib/utilities/write-file.d.cts +2 -1
  251. package/dist/lib/utilities/write-file.d.ts +2 -1
  252. package/dist/lib/utilities/write-file.js +1 -1
  253. package/dist/next.cjs +8 -8
  254. package/dist/next.js +5 -5
  255. package/dist/nuxt.cjs +10 -10
  256. package/dist/nuxt.js +7 -7
  257. package/dist/{resolved-NZTd64-O.d.cts → resolved-CcuVqMqc.d.cts} +28 -3
  258. package/dist/{resolved-DhHHMnUD.d.ts → resolved-Dhscmo3z.d.ts} +28 -3
  259. package/dist/rolldown.cjs +7 -7
  260. package/dist/rolldown.d.cts +2 -1
  261. package/dist/rolldown.d.ts +2 -1
  262. package/dist/rolldown.js +4 -4
  263. package/dist/rollup.cjs +7 -7
  264. package/dist/rollup.d.cts +2 -1
  265. package/dist/rollup.d.ts +2 -1
  266. package/dist/rollup.js +4 -4
  267. package/dist/rspack.cjs +7 -7
  268. package/dist/rspack.d.cts +2 -1
  269. package/dist/rspack.d.ts +2 -1
  270. package/dist/rspack.js +4 -4
  271. package/dist/tsup.cjs +9 -9
  272. package/dist/tsup.js +6 -6
  273. package/dist/types/babel.d.cts +2 -1
  274. package/dist/types/babel.d.ts +2 -1
  275. package/dist/types/commands.d.cts +2 -1
  276. package/dist/types/commands.d.ts +2 -1
  277. package/dist/types/compiler.d.cts +2 -1
  278. package/dist/types/compiler.d.ts +2 -1
  279. package/dist/types/config.d.cts +2 -1
  280. package/dist/types/config.d.ts +2 -1
  281. package/dist/types/context.cjs +2 -2
  282. package/dist/types/context.d.cts +2 -1
  283. package/dist/types/context.d.ts +2 -1
  284. package/dist/types/context.js +1 -1
  285. package/dist/types/hooks.d.cts +2 -1
  286. package/dist/types/hooks.d.ts +2 -1
  287. package/dist/types/index.cjs +9 -9
  288. package/dist/types/index.d.cts +3 -2
  289. package/dist/types/index.d.ts +3 -2
  290. package/dist/types/index.js +2 -2
  291. package/dist/types/internal.d.cts +3 -2
  292. package/dist/types/internal.d.ts +3 -2
  293. package/dist/types/plugin.d.cts +2 -1
  294. package/dist/types/plugin.d.ts +2 -1
  295. package/dist/types/resolved.d.cts +2 -1
  296. package/dist/types/resolved.d.ts +2 -1
  297. package/dist/types/unplugin.d.cts +2 -1
  298. package/dist/types/unplugin.d.ts +2 -1
  299. package/dist/types/vfs.cjs +7 -7
  300. package/dist/types/vfs.d.cts +93 -111
  301. package/dist/types/vfs.d.ts +93 -111
  302. package/dist/types/vfs.js +1 -1
  303. package/dist/unloader.cjs +7 -7
  304. package/dist/unloader.d.cts +2 -1
  305. package/dist/unloader.d.ts +2 -1
  306. package/dist/unloader.js +4 -4
  307. package/dist/unplugin.cjs +19 -19
  308. package/dist/unplugin.d.cts +3 -2
  309. package/dist/unplugin.d.ts +3 -2
  310. package/dist/unplugin.js +16 -16
  311. package/dist/vite.cjs +8 -8
  312. package/dist/vite.d.cts +2 -1
  313. package/dist/vite.d.ts +2 -1
  314. package/dist/vite.js +5 -5
  315. package/dist/webpack.cjs +7 -7
  316. package/dist/webpack.d.cts +2 -1
  317. package/dist/webpack.d.ts +2 -1
  318. package/dist/webpack.js +4 -4
  319. package/package.json +9 -9
  320. package/dist/chunk-6FRFYMLC.cjs +0 -12
  321. package/dist/chunk-6M3HIMSG.cjs +0 -12
  322. package/dist/chunk-6ODSQSQL.cjs +0 -34
  323. package/dist/chunk-HPXUAQCU.cjs +0 -12
  324. package/dist/chunk-KJHDE76P.cjs +0 -24
  325. package/dist/chunk-R5CZG7XN.js +0 -31
  326. package/dist/chunk-RGMGFYXY.cjs +0 -12
  327. package/dist/chunk-TZ4Y7R4G.cjs +0 -12
  328. package/dist/lib/chunk-26W3IQT6.js.map +0 -1
  329. package/dist/lib/chunk-2D74QBNW.cjs.map +0 -1
  330. package/dist/lib/chunk-2ZYHO243.js.map +0 -1
  331. package/dist/lib/chunk-65DUUIIF.cjs.map +0 -1
  332. package/dist/lib/chunk-7CZ2QZEV.js.map +0 -1
  333. package/dist/lib/chunk-7FQQFIHR.cjs.map +0 -1
  334. package/dist/lib/chunk-7MXG5EG2.js.map +0 -1
  335. package/dist/lib/chunk-CXYZENE4.js.map +0 -1
  336. package/dist/lib/chunk-DKE25WTL.js.map +0 -1
  337. package/dist/lib/chunk-E7UTFXPP.js.map +0 -1
  338. package/dist/lib/chunk-ECJPGNXE.cjs.map +0 -1
  339. package/dist/lib/chunk-EOO7IRCI.js.map +0 -1
  340. package/dist/lib/chunk-FHZJQZOE.cjs.map +0 -1
  341. package/dist/lib/chunk-G5DJO4HA.cjs.map +0 -1
  342. package/dist/lib/chunk-GWAVDFOE.js.map +0 -1
  343. package/dist/lib/chunk-I3I4BYJ4.js.map +0 -1
  344. package/dist/lib/chunk-I6A564OE.cjs.map +0 -1
  345. package/dist/lib/chunk-JXIRUV56.js.map +0 -1
  346. package/dist/lib/chunk-KACTPBW2.cjs.map +0 -1
  347. package/dist/lib/chunk-KAOWUIFH.cjs.map +0 -1
  348. package/dist/lib/chunk-LTBRHAQ2.cjs.map +0 -1
  349. package/dist/lib/chunk-M2TB43VG.cjs.map +0 -1
  350. package/dist/lib/chunk-NFDRIBCM.js.map +0 -1
  351. package/dist/lib/chunk-PJKWY74P.js.map +0 -1
  352. package/dist/lib/chunk-QGJVGFY4.js.map +0 -1
  353. package/dist/lib/chunk-QSBORJCS.js.map +0 -1
  354. package/dist/lib/chunk-RY67J24J.js.map +0 -1
  355. package/dist/lib/chunk-SB3NFYXT.cjs.map +0 -1
  356. package/dist/lib/chunk-TJQEGHJA.cjs.map +0 -1
  357. package/dist/lib/chunk-TNCZYSNV.js.map +0 -1
  358. package/dist/lib/chunk-TZFBE35T.cjs.map +0 -1
  359. package/dist/lib/chunk-VANFTXBT.cjs.map +0 -1
  360. package/dist/lib/chunk-VRNWPH35.cjs.map +0 -1
  361. package/dist/lib/chunk-WDNYOFEH.js.map +0 -1
  362. package/dist/lib/chunk-XFIGAAKN.cjs.map +0 -1
  363. package/dist/lib/chunk-XHCRXNQ3.cjs.map +0 -1
  364. package/dist/lib/chunk-ZKYZWEHY.cjs.map +0 -1
  365. package/dist/lib/chunk-ZYBUJ2HE.js.map +0 -1
@@ -1,3 +1,4 @@
1
+ import { PrimitiveJsonValue } from '@stryke/json/types';
1
2
  import { Volume } from 'memfs';
2
3
  import { StatSyncOptions, Stats, PathLike, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
3
4
  import { IUnionFs } from 'unionfs';
@@ -9,30 +10,57 @@ declare const __VFS_CACHE__ = "__VFS_CACHE__";
9
10
  declare const __VFS_RESOLVER__ = "__VFS_RESOLVER__";
10
11
  declare const __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
11
12
  declare const __VFS_UNIFIED__ = "__VFS_UNIFIED__";
13
+ type OutputModeType = "fs" | "virtual";
12
14
  interface VirtualFile {
13
15
  /**
14
- * A virtual path to the file in the virtual file system.
16
+ * The unique identifier for the virtual file.
17
+ *
18
+ * @remarks
19
+ * If no specific id is provided, it defaults to the file's {@link path}.
15
20
  */
16
- path: string;
21
+ id: string;
17
22
  /**
18
- * The contents of the virtual file.
23
+ * Additional metadata associated with the virtual file.
19
24
  */
20
- contents: string;
21
- }
22
- interface VirtualBuiltinFile extends VirtualFile {
25
+ details: Record<string, PrimitiveJsonValue>;
23
26
  /**
24
- * The unique identifier for the virtual file.
27
+ * The variant of the file.
25
28
  *
26
29
  * @remarks
27
- * This property is read-only and is set when the file is created.
30
+ * This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
31
+ * - `builtin`: Indicates that the file is a built-in module provided by the system.
32
+ * - `entry`: Indicates that the file is an entry point for execution.
33
+ * - `normal`: Indicates that the file is a standard file without any special role.
28
34
  */
29
- id: string;
35
+ variant: string;
36
+ /**
37
+ * The output mode of the file.
38
+ *
39
+ * @remarks
40
+ * This indicates whether the file is intended to be written to the actual file system (`fs`) or kept in the virtual file system (`virtual`).
41
+ */
42
+ mode: OutputModeType;
43
+ /**
44
+ * A virtual (or actual) path to the file in the file system.
45
+ */
46
+ path: string;
47
+ /**
48
+ * The contents of the file.
49
+ */
50
+ code: string | NodeJS.ArrayBufferView;
30
51
  }
31
- type OutputModeType = "fs" | "virtual";
52
+ type VirtualFileSystemMetadata = Pick<VirtualFile, "id" | "details" | "variant" | "mode">;
32
53
  interface ResolveFSOptions {
33
54
  mode?: OutputModeType;
34
55
  }
35
56
  type MakeDirectoryOptions = (Mode | MakeDirectoryOptions$1) & ResolveFSOptions;
57
+ interface PowerlinesWriteFileOptions extends ResolveFSOptions {
58
+ skipFormat?: boolean;
59
+ }
60
+ type NodeWriteFileOptions = WriteFileOptions$1;
61
+ type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
62
+ type PowerLinesWriteFileData = Partial<Omit<VirtualFile, "path" | "mode" | "code">> & Pick<VirtualFile, "code">;
63
+ type WriteFileData = string | NodeJS.ArrayBufferView | PowerLinesWriteFileData;
36
64
  interface ResolvePathOptions extends ResolveFSOptions {
37
65
  /**
38
66
  * Should the resolved path include the file extension?
@@ -49,82 +77,63 @@ interface ResolvePathOptions extends ResolveFSOptions {
49
77
  */
50
78
  type?: "file" | "directory";
51
79
  }
52
- type WriteFileOptions = WriteFileOptions$1 & ResolveFSOptions;
53
- interface WriteBuiltinFileOptions extends ResolveFSOptions {
54
- skipFormat?: boolean;
55
- }
56
80
  interface VirtualFileSystemInterface {
57
81
  [__VFS_INIT__]: () => void;
58
82
  [__VFS_REVERT__]: () => void;
59
83
  /**
60
- * The underlying builtin module Ids.
61
- */
62
- builtinIdMap: Map<string, string>;
63
- /**
64
- * Checks if a path or ID corresponds to a builtin file.
65
- *
66
- * @param id - The id of the builtin file to check against.
67
- * @param pathOrId - The path or id of the file to check.
68
- * @returns Whether the path or ID corresponds to a builtin file.
84
+ * The underlying file metadata.
69
85
  */
70
- isMatchingBuiltinId: (id: string, pathOrId: string) => boolean;
86
+ meta: Record<string, VirtualFileSystemMetadata | undefined>;
71
87
  /**
72
- * Checks if a provided string is a valid builtin ID (does not need to already be created in the file system).
73
- *
74
- * @param id - The ID to check.
75
- * @returns Whether the ID is a valid builtin ID.
88
+ * A map of module ids to their file paths.
76
89
  */
77
- isValidBuiltinId: (id: string) => boolean;
90
+ ids: Record<string, string>;
78
91
  /**
79
- * Check if a path or ID corresponds to a virtual file.
92
+ * Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
80
93
  *
81
- * @param pathOrId - The path or ID to check.
94
+ * @param pathOrId - The path or id to check.
82
95
  * @param options - Optional parameters for resolving the path.
83
- * @returns Whether the path or ID corresponds to a virtual file.
96
+ * @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
84
97
  */
85
- isVirtualFile: (pathOrId: string, options?: ResolvePathOptions) => boolean;
98
+ isVirtual: (pathOrId: string, options?: ResolvePathOptions) => boolean;
86
99
  /**
87
- * Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
100
+ * Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
88
101
  *
89
- * @see https://www.typescriptlang.org/tsconfig#paths
90
- *
91
- * @param pathOrId - The path or ID to check.
92
- * @returns Whether the path or ID corresponds to a virtual file.
93
- */
94
- isTsconfigPath: (pathOrId: string) => boolean;
95
- /**
96
- * Checks if a given path or ID corresponds to a builtin module file.
97
- */
98
- isBuiltinFile: (pathOrID: string, options?: ResolvePathOptions) => boolean;
99
- /**
100
- * Returns a list of builtin module files in the virtual file system.
101
- */
102
- listBuiltinFiles: () => Promise<VirtualBuiltinFile[]>;
103
- /**
104
- * Checks if a file exists in the virtual file system (VFS).
102
+ * @param pathOrId - The path or id to check.
103
+ * @param options - Optional parameters for resolving the path.
104
+ * @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
105
105
  */
106
- existsSync: (pathOrId: string) => boolean;
106
+ isFs: (pathOrId: string, options?: ResolvePathOptions) => boolean;
107
107
  /**
108
108
  * Checks if a file exists in the virtual file system (VFS).
109
109
  *
110
110
  * @param path - The path of the file to check.
111
111
  * @returns `true` if the file exists, otherwise `false`.
112
112
  */
113
- fileExistsSync: (path: string) => boolean;
113
+ isFile: (path: string) => boolean;
114
114
  /**
115
115
  * Checks if a directory exists in the virtual file system (VFS).
116
116
  *
117
117
  * @param path - The path of the directory to check.
118
118
  * @returns `true` if the directory exists, otherwise `false`.
119
119
  */
120
- directoryExistsSync: (path: string) => boolean;
120
+ isDirectory: (path: string) => boolean;
121
121
  /**
122
- * Checks if a path exists in the virtual file system (VFS).
122
+ * Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
123
123
  *
124
- * @param path - The path to check.
125
- * @returns `true` if the path exists, otherwise `false`.
124
+ * @see https://www.typescriptlang.org/tsconfig#paths
125
+ *
126
+ * @param pathOrId - The path or id to check.
127
+ * @returns Whether the path or id corresponds to a virtual file.
126
128
  */
127
- pathExistsSync: (path: string) => boolean;
129
+ isTsconfigPath: (pathOrId: string) => boolean;
130
+ /**
131
+ * Checks if a file exists in the virtual file system (VFS).
132
+ *
133
+ * @param pathOrId - The path or id of the file.
134
+ * @returns `true` if the file exists, otherwise `false`.
135
+ */
136
+ existsSync: (pathOrId: string) => boolean;
128
137
  /**
129
138
  * Gets the stats of a file in the virtual file system (VFS).
130
139
  *
@@ -260,71 +269,28 @@ interface VirtualFileSystemInterface {
260
269
  /**
261
270
  * Writes a file to the virtual file system (VFS).
262
271
  *
263
- * @param file - The path to the file.
272
+ * @param path - The path to the file.
264
273
  * @param data - The contents of the file.
265
274
  * @param options - Optional parameters for writing the file.
266
275
  * @returns A promise that resolves when the file is written.
267
276
  */
268
- writeFile: (file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions) => Promise<void>;
277
+ writeFile: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
269
278
  /**
270
279
  * Writes a file to the virtual file system (VFS).
271
280
  *
272
- * @param file - The path to the file.
281
+ * @param path - The path to the file.
273
282
  * @param data - The contents of the file.
274
283
  * @param options - Optional parameters for writing the file.
275
284
  */
276
- writeFileSync: (file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions) => void;
277
- /**
278
- * Adds a builtin module file to the virtual file system.
279
- *
280
- * @param id - The unique identifier for the builtin module file.
281
- * @param path - The path to the builtin module file.
282
- * @param contents - The contents of the builtin module file.
283
- * @param options - Optional parameters for writing the builtin module file.
284
- */
285
- writeBuiltinFile: (id: string, path: string, contents: string, options?: WriteBuiltinFileOptions) => Promise<void>;
286
- /**
287
- * Adds an entry file to the virtual file system.
288
- *
289
- * @param name - The unique identifier for the entry file.
290
- * @param contents - The contents of the entry file.
291
- * @param options - Optional parameters for writing the entry file.
292
- */
293
- writeEntryFile: (name: string, contents: string, options?: WriteBuiltinFileOptions) => Promise<void>;
294
- /**
295
- * Writes a file to disk from the physical file system (on disk).
296
- *
297
- * @param path - The path to the file to write.
298
- * @param contents - The contents of the file to write.
299
- * @param options - Optional parameters for writing the file.
300
- * @returns A promise that resolves when the file is written.
301
- */
302
- writeFileToDisk: (path: string, contents: string, options?: {
303
- skipFormat?: boolean;
304
- }) => Promise<void>;
285
+ writeFileSync: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => void;
305
286
  /**
306
- * Resolves a path or ID to a file path in the virtual file system.
287
+ * Resolves a path or id to a file path in the virtual file system.
307
288
  *
308
289
  * @param pathOrId - The path or id of the file to resolve.
309
290
  * @param options - Optional parameters for resolving the path.
310
291
  * @returns The resolved path of the file if it exists, otherwise false.
311
292
  */
312
- resolvePath: (pathOrId: string, options?: ResolvePathOptions) => string | false;
313
- /**
314
- * Resolves a path or ID to a file path in the virtual file system.
315
- *
316
- * @param pathOrId - The path or id of the file to resolve.
317
- * @returns The resolved path of the file if it exists, otherwise false.
318
- */
319
- realpathSync: (pathOrId: string) => string;
320
- /**
321
- * Resolves a path or ID to a builtin module file id in the virtual file system.
322
- *
323
- * @param pathOrId - The path or id of the file to resolve.
324
- * @param paths - Optional array of paths to search for the file.
325
- * @returns The resolved id of the builtin module file if it exists, otherwise false.
326
- */
327
- resolveId: (pathOrId: string) => string | false;
293
+ resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
328
294
  /**
329
295
  * Resolves a path based on TypeScript's `tsconfig.json` paths.
330
296
  *
@@ -343,6 +309,19 @@ interface VirtualFileSystemInterface {
343
309
  * @returns The resolved package name if it exists, otherwise undefined.
344
310
  */
345
311
  resolveTsconfigPathPackage: (path: string) => string | false;
312
+ /**
313
+ * Resolves a path or id to a file path in the virtual file system.
314
+ *
315
+ * @param pathOrId - The path or id of the file to resolve.
316
+ * @returns The resolved path of the file if it exists, otherwise false.
317
+ */
318
+ realpathSync: (pathOrId: string) => string;
319
+ /**
320
+ * Retrieves a partial metadata mapping of all files in the virtual file system (VFS).
321
+ *
322
+ * @returns A record mapping file paths to their partial metadata.
323
+ */
324
+ getPartialMeta: () => Record<string, Partial<VirtualFileSystemMetadata>>;
346
325
  /**
347
326
  * A map of cached file paths to their underlying file content.
348
327
  */
@@ -357,14 +336,17 @@ interface VirtualFileSystemInterface {
357
336
  [__VFS_UNIFIED__]: IUnionFs;
358
337
  }
359
338
  declare type __ΩVirtualFileExtension = any[];
360
- declare type __ΩVirtualFile = any[];
361
- declare type __ΩVirtualBuiltinFile = any[];
362
339
  declare type __ΩOutputModeType = any[];
340
+ declare type __ΩVirtualFile = any[];
341
+ declare type __ΩVirtualFileSystemMetadata = any[];
363
342
  declare type __ΩResolveFSOptions = any[];
364
343
  declare type __ΩMakeDirectoryOptions = any[];
365
- declare type __ΩResolvePathOptions = any[];
344
+ declare type __ΩPowerlinesWriteFileOptions = any[];
345
+ declare type __ΩNodeWriteFileOptions = any[];
366
346
  declare type __ΩWriteFileOptions = any[];
367
- declare type __ΩWriteBuiltinFileOptions = any[];
347
+ declare type __ΩPowerLinesWriteFileData = any[];
348
+ declare type __ΩWriteFileData = any[];
349
+ declare type __ΩResolvePathOptions = any[];
368
350
  declare type __ΩVirtualFileSystemInterface = any[];
369
351
 
370
- export { type MakeDirectoryOptions, type OutputModeType, type ResolveFSOptions, type ResolvePathOptions, type VirtualBuiltinFile, type VirtualFile, type VirtualFileExtension, type VirtualFileSystemInterface, type WriteBuiltinFileOptions, type WriteFileOptions, __VFS_CACHE__, __VFS_INIT__, __VFS_RESOLVER__, __VFS_REVERT__, __VFS_UNIFIED__, __VFS_VIRTUAL__, type __ΩMakeDirectoryOptions, type __ΩOutputModeType, type __ΩResolveFSOptions, type __ΩResolvePathOptions, type __ΩVirtualBuiltinFile, type __ΩVirtualFile, type __ΩVirtualFileExtension, type __ΩVirtualFileSystemInterface, type __ΩWriteBuiltinFileOptions, type __ΩWriteFileOptions };
352
+ export { type MakeDirectoryOptions, type NodeWriteFileOptions, type OutputModeType, type PowerLinesWriteFileData, type PowerlinesWriteFileOptions, type ResolveFSOptions, type ResolvePathOptions, type VirtualFile, type VirtualFileExtension, type VirtualFileSystemInterface, type VirtualFileSystemMetadata, type WriteFileData, type WriteFileOptions, __VFS_CACHE__, __VFS_INIT__, __VFS_RESOLVER__, __VFS_REVERT__, __VFS_UNIFIED__, __VFS_VIRTUAL__, type __ΩMakeDirectoryOptions, type __ΩNodeWriteFileOptions, type __ΩOutputModeType, type __ΩPowerLinesWriteFileData, type __ΩPowerlinesWriteFileOptions, type __ΩResolveFSOptions, type __ΩResolvePathOptions, type __ΩVirtualFile, type __ΩVirtualFileExtension, type __ΩVirtualFileSystemInterface, type __ΩVirtualFileSystemMetadata, type __ΩWriteFileData, type __ΩWriteFileOptions };
@@ -1,3 +1,4 @@
1
+ import { PrimitiveJsonValue } from '@stryke/json/types';
1
2
  import { Volume } from 'memfs';
2
3
  import { StatSyncOptions, Stats, PathLike, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
3
4
  import { IUnionFs } from 'unionfs';
@@ -9,30 +10,57 @@ declare const __VFS_CACHE__ = "__VFS_CACHE__";
9
10
  declare const __VFS_RESOLVER__ = "__VFS_RESOLVER__";
10
11
  declare const __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
11
12
  declare const __VFS_UNIFIED__ = "__VFS_UNIFIED__";
13
+ type OutputModeType = "fs" | "virtual";
12
14
  interface VirtualFile {
13
15
  /**
14
- * A virtual path to the file in the virtual file system.
16
+ * The unique identifier for the virtual file.
17
+ *
18
+ * @remarks
19
+ * If no specific id is provided, it defaults to the file's {@link path}.
15
20
  */
16
- path: string;
21
+ id: string;
17
22
  /**
18
- * The contents of the virtual file.
23
+ * Additional metadata associated with the virtual file.
19
24
  */
20
- contents: string;
21
- }
22
- interface VirtualBuiltinFile extends VirtualFile {
25
+ details: Record<string, PrimitiveJsonValue>;
23
26
  /**
24
- * The unique identifier for the virtual file.
27
+ * The variant of the file.
25
28
  *
26
29
  * @remarks
27
- * This property is read-only and is set when the file is created.
30
+ * This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
31
+ * - `builtin`: Indicates that the file is a built-in module provided by the system.
32
+ * - `entry`: Indicates that the file is an entry point for execution.
33
+ * - `normal`: Indicates that the file is a standard file without any special role.
28
34
  */
29
- id: string;
35
+ variant: string;
36
+ /**
37
+ * The output mode of the file.
38
+ *
39
+ * @remarks
40
+ * This indicates whether the file is intended to be written to the actual file system (`fs`) or kept in the virtual file system (`virtual`).
41
+ */
42
+ mode: OutputModeType;
43
+ /**
44
+ * A virtual (or actual) path to the file in the file system.
45
+ */
46
+ path: string;
47
+ /**
48
+ * The contents of the file.
49
+ */
50
+ code: string | NodeJS.ArrayBufferView;
30
51
  }
31
- type OutputModeType = "fs" | "virtual";
52
+ type VirtualFileSystemMetadata = Pick<VirtualFile, "id" | "details" | "variant" | "mode">;
32
53
  interface ResolveFSOptions {
33
54
  mode?: OutputModeType;
34
55
  }
35
56
  type MakeDirectoryOptions = (Mode | MakeDirectoryOptions$1) & ResolveFSOptions;
57
+ interface PowerlinesWriteFileOptions extends ResolveFSOptions {
58
+ skipFormat?: boolean;
59
+ }
60
+ type NodeWriteFileOptions = WriteFileOptions$1;
61
+ type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
62
+ type PowerLinesWriteFileData = Partial<Omit<VirtualFile, "path" | "mode" | "code">> & Pick<VirtualFile, "code">;
63
+ type WriteFileData = string | NodeJS.ArrayBufferView | PowerLinesWriteFileData;
36
64
  interface ResolvePathOptions extends ResolveFSOptions {
37
65
  /**
38
66
  * Should the resolved path include the file extension?
@@ -49,82 +77,63 @@ interface ResolvePathOptions extends ResolveFSOptions {
49
77
  */
50
78
  type?: "file" | "directory";
51
79
  }
52
- type WriteFileOptions = WriteFileOptions$1 & ResolveFSOptions;
53
- interface WriteBuiltinFileOptions extends ResolveFSOptions {
54
- skipFormat?: boolean;
55
- }
56
80
  interface VirtualFileSystemInterface {
57
81
  [__VFS_INIT__]: () => void;
58
82
  [__VFS_REVERT__]: () => void;
59
83
  /**
60
- * The underlying builtin module Ids.
61
- */
62
- builtinIdMap: Map<string, string>;
63
- /**
64
- * Checks if a path or ID corresponds to a builtin file.
65
- *
66
- * @param id - The id of the builtin file to check against.
67
- * @param pathOrId - The path or id of the file to check.
68
- * @returns Whether the path or ID corresponds to a builtin file.
84
+ * The underlying file metadata.
69
85
  */
70
- isMatchingBuiltinId: (id: string, pathOrId: string) => boolean;
86
+ meta: Record<string, VirtualFileSystemMetadata | undefined>;
71
87
  /**
72
- * Checks if a provided string is a valid builtin ID (does not need to already be created in the file system).
73
- *
74
- * @param id - The ID to check.
75
- * @returns Whether the ID is a valid builtin ID.
88
+ * A map of module ids to their file paths.
76
89
  */
77
- isValidBuiltinId: (id: string) => boolean;
90
+ ids: Record<string, string>;
78
91
  /**
79
- * Check if a path or ID corresponds to a virtual file.
92
+ * Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
80
93
  *
81
- * @param pathOrId - The path or ID to check.
94
+ * @param pathOrId - The path or id to check.
82
95
  * @param options - Optional parameters for resolving the path.
83
- * @returns Whether the path or ID corresponds to a virtual file.
96
+ * @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
84
97
  */
85
- isVirtualFile: (pathOrId: string, options?: ResolvePathOptions) => boolean;
98
+ isVirtual: (pathOrId: string, options?: ResolvePathOptions) => boolean;
86
99
  /**
87
- * Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
100
+ * Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
88
101
  *
89
- * @see https://www.typescriptlang.org/tsconfig#paths
90
- *
91
- * @param pathOrId - The path or ID to check.
92
- * @returns Whether the path or ID corresponds to a virtual file.
93
- */
94
- isTsconfigPath: (pathOrId: string) => boolean;
95
- /**
96
- * Checks if a given path or ID corresponds to a builtin module file.
97
- */
98
- isBuiltinFile: (pathOrID: string, options?: ResolvePathOptions) => boolean;
99
- /**
100
- * Returns a list of builtin module files in the virtual file system.
101
- */
102
- listBuiltinFiles: () => Promise<VirtualBuiltinFile[]>;
103
- /**
104
- * Checks if a file exists in the virtual file system (VFS).
102
+ * @param pathOrId - The path or id to check.
103
+ * @param options - Optional parameters for resolving the path.
104
+ * @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
105
105
  */
106
- existsSync: (pathOrId: string) => boolean;
106
+ isFs: (pathOrId: string, options?: ResolvePathOptions) => boolean;
107
107
  /**
108
108
  * Checks if a file exists in the virtual file system (VFS).
109
109
  *
110
110
  * @param path - The path of the file to check.
111
111
  * @returns `true` if the file exists, otherwise `false`.
112
112
  */
113
- fileExistsSync: (path: string) => boolean;
113
+ isFile: (path: string) => boolean;
114
114
  /**
115
115
  * Checks if a directory exists in the virtual file system (VFS).
116
116
  *
117
117
  * @param path - The path of the directory to check.
118
118
  * @returns `true` if the directory exists, otherwise `false`.
119
119
  */
120
- directoryExistsSync: (path: string) => boolean;
120
+ isDirectory: (path: string) => boolean;
121
121
  /**
122
- * Checks if a path exists in the virtual file system (VFS).
122
+ * Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
123
123
  *
124
- * @param path - The path to check.
125
- * @returns `true` if the path exists, otherwise `false`.
124
+ * @see https://www.typescriptlang.org/tsconfig#paths
125
+ *
126
+ * @param pathOrId - The path or id to check.
127
+ * @returns Whether the path or id corresponds to a virtual file.
126
128
  */
127
- pathExistsSync: (path: string) => boolean;
129
+ isTsconfigPath: (pathOrId: string) => boolean;
130
+ /**
131
+ * Checks if a file exists in the virtual file system (VFS).
132
+ *
133
+ * @param pathOrId - The path or id of the file.
134
+ * @returns `true` if the file exists, otherwise `false`.
135
+ */
136
+ existsSync: (pathOrId: string) => boolean;
128
137
  /**
129
138
  * Gets the stats of a file in the virtual file system (VFS).
130
139
  *
@@ -260,71 +269,28 @@ interface VirtualFileSystemInterface {
260
269
  /**
261
270
  * Writes a file to the virtual file system (VFS).
262
271
  *
263
- * @param file - The path to the file.
272
+ * @param path - The path to the file.
264
273
  * @param data - The contents of the file.
265
274
  * @param options - Optional parameters for writing the file.
266
275
  * @returns A promise that resolves when the file is written.
267
276
  */
268
- writeFile: (file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions) => Promise<void>;
277
+ writeFile: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
269
278
  /**
270
279
  * Writes a file to the virtual file system (VFS).
271
280
  *
272
- * @param file - The path to the file.
281
+ * @param path - The path to the file.
273
282
  * @param data - The contents of the file.
274
283
  * @param options - Optional parameters for writing the file.
275
284
  */
276
- writeFileSync: (file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions) => void;
277
- /**
278
- * Adds a builtin module file to the virtual file system.
279
- *
280
- * @param id - The unique identifier for the builtin module file.
281
- * @param path - The path to the builtin module file.
282
- * @param contents - The contents of the builtin module file.
283
- * @param options - Optional parameters for writing the builtin module file.
284
- */
285
- writeBuiltinFile: (id: string, path: string, contents: string, options?: WriteBuiltinFileOptions) => Promise<void>;
286
- /**
287
- * Adds an entry file to the virtual file system.
288
- *
289
- * @param name - The unique identifier for the entry file.
290
- * @param contents - The contents of the entry file.
291
- * @param options - Optional parameters for writing the entry file.
292
- */
293
- writeEntryFile: (name: string, contents: string, options?: WriteBuiltinFileOptions) => Promise<void>;
294
- /**
295
- * Writes a file to disk from the physical file system (on disk).
296
- *
297
- * @param path - The path to the file to write.
298
- * @param contents - The contents of the file to write.
299
- * @param options - Optional parameters for writing the file.
300
- * @returns A promise that resolves when the file is written.
301
- */
302
- writeFileToDisk: (path: string, contents: string, options?: {
303
- skipFormat?: boolean;
304
- }) => Promise<void>;
285
+ writeFileSync: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => void;
305
286
  /**
306
- * Resolves a path or ID to a file path in the virtual file system.
287
+ * Resolves a path or id to a file path in the virtual file system.
307
288
  *
308
289
  * @param pathOrId - The path or id of the file to resolve.
309
290
  * @param options - Optional parameters for resolving the path.
310
291
  * @returns The resolved path of the file if it exists, otherwise false.
311
292
  */
312
- resolvePath: (pathOrId: string, options?: ResolvePathOptions) => string | false;
313
- /**
314
- * Resolves a path or ID to a file path in the virtual file system.
315
- *
316
- * @param pathOrId - The path or id of the file to resolve.
317
- * @returns The resolved path of the file if it exists, otherwise false.
318
- */
319
- realpathSync: (pathOrId: string) => string;
320
- /**
321
- * Resolves a path or ID to a builtin module file id in the virtual file system.
322
- *
323
- * @param pathOrId - The path or id of the file to resolve.
324
- * @param paths - Optional array of paths to search for the file.
325
- * @returns The resolved id of the builtin module file if it exists, otherwise false.
326
- */
327
- resolveId: (pathOrId: string) => string | false;
293
+ resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
328
294
  /**
329
295
  * Resolves a path based on TypeScript's `tsconfig.json` paths.
330
296
  *
@@ -343,6 +309,19 @@ interface VirtualFileSystemInterface {
343
309
  * @returns The resolved package name if it exists, otherwise undefined.
344
310
  */
345
311
  resolveTsconfigPathPackage: (path: string) => string | false;
312
+ /**
313
+ * Resolves a path or id to a file path in the virtual file system.
314
+ *
315
+ * @param pathOrId - The path or id of the file to resolve.
316
+ * @returns The resolved path of the file if it exists, otherwise false.
317
+ */
318
+ realpathSync: (pathOrId: string) => string;
319
+ /**
320
+ * Retrieves a partial metadata mapping of all files in the virtual file system (VFS).
321
+ *
322
+ * @returns A record mapping file paths to their partial metadata.
323
+ */
324
+ getPartialMeta: () => Record<string, Partial<VirtualFileSystemMetadata>>;
346
325
  /**
347
326
  * A map of cached file paths to their underlying file content.
348
327
  */
@@ -357,14 +336,17 @@ interface VirtualFileSystemInterface {
357
336
  [__VFS_UNIFIED__]: IUnionFs;
358
337
  }
359
338
  declare type __ΩVirtualFileExtension = any[];
360
- declare type __ΩVirtualFile = any[];
361
- declare type __ΩVirtualBuiltinFile = any[];
362
339
  declare type __ΩOutputModeType = any[];
340
+ declare type __ΩVirtualFile = any[];
341
+ declare type __ΩVirtualFileSystemMetadata = any[];
363
342
  declare type __ΩResolveFSOptions = any[];
364
343
  declare type __ΩMakeDirectoryOptions = any[];
365
- declare type __ΩResolvePathOptions = any[];
344
+ declare type __ΩPowerlinesWriteFileOptions = any[];
345
+ declare type __ΩNodeWriteFileOptions = any[];
366
346
  declare type __ΩWriteFileOptions = any[];
367
- declare type __ΩWriteBuiltinFileOptions = any[];
347
+ declare type __ΩPowerLinesWriteFileData = any[];
348
+ declare type __ΩWriteFileData = any[];
349
+ declare type __ΩResolvePathOptions = any[];
368
350
  declare type __ΩVirtualFileSystemInterface = any[];
369
351
 
370
- export { type MakeDirectoryOptions, type OutputModeType, type ResolveFSOptions, type ResolvePathOptions, type VirtualBuiltinFile, type VirtualFile, type VirtualFileExtension, type VirtualFileSystemInterface, type WriteBuiltinFileOptions, type WriteFileOptions, __VFS_CACHE__, __VFS_INIT__, __VFS_RESOLVER__, __VFS_REVERT__, __VFS_UNIFIED__, __VFS_VIRTUAL__, type __ΩMakeDirectoryOptions, type __ΩOutputModeType, type __ΩResolveFSOptions, type __ΩResolvePathOptions, type __ΩVirtualBuiltinFile, type __ΩVirtualFile, type __ΩVirtualFileExtension, type __ΩVirtualFileSystemInterface, type __ΩWriteBuiltinFileOptions, type __ΩWriteFileOptions };
352
+ export { type MakeDirectoryOptions, type NodeWriteFileOptions, type OutputModeType, type PowerLinesWriteFileData, type PowerlinesWriteFileOptions, type ResolveFSOptions, type ResolvePathOptions, type VirtualFile, type VirtualFileExtension, type VirtualFileSystemInterface, type VirtualFileSystemMetadata, type WriteFileData, type WriteFileOptions, __VFS_CACHE__, __VFS_INIT__, __VFS_RESOLVER__, __VFS_REVERT__, __VFS_UNIFIED__, __VFS_VIRTUAL__, type __ΩMakeDirectoryOptions, type __ΩNodeWriteFileOptions, type __ΩOutputModeType, type __ΩPowerLinesWriteFileData, type __ΩPowerlinesWriteFileOptions, type __ΩResolveFSOptions, type __ΩResolvePathOptions, type __ΩVirtualFile, type __ΩVirtualFileExtension, type __ΩVirtualFileSystemInterface, type __ΩVirtualFileSystemMetadata, type __ΩWriteFileData, type __ΩWriteFileOptions };
package/dist/types/vfs.js CHANGED
@@ -1,4 +1,4 @@
1
- export { __VFS_CACHE__, __VFS_INIT__, __VFS_RESOLVER__, __VFS_REVERT__, __VFS_UNIFIED__, __VFS_VIRTUAL__ } from '../chunk-ILVCZATT.js';
1
+ export { __VFS_CACHE__, __VFS_INIT__, __VFS_RESOLVER__, __VFS_REVERT__, __VFS_UNIFIED__, __VFS_VIRTUAL__ } from '../chunk-GPPJ2CRE.js';
2
2
  import '../chunk-7QVYU63E.js';
3
3
  //# sourceMappingURL=vfs.js.map
4
4
  //# sourceMappingURL=vfs.js.map
package/dist/unloader.cjs CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunk6FRFYMLC_cjs = require('./chunk-6FRFYMLC.cjs');
6
- require('./chunk-UESICHEO.cjs');
7
- require('./chunk-5ST7UKJF.cjs');
5
+ var chunkS5QFX2GM_cjs = require('./chunk-S5QFX2GM.cjs');
6
+ require('./chunk-2RHPFVYT.cjs');
7
+ require('./chunk-UTVZVGM3.cjs');
8
8
  require('./chunk-APVMN2H7.cjs');
9
- require('./chunk-YE56I7CZ.cjs');
9
+ require('./chunk-5XYGZ3DC.cjs');
10
10
  require('./chunk-5VPVJHJO.cjs');
11
11
  require('./chunk-PK6SKIKE.cjs');
12
12
 
@@ -14,15 +14,15 @@ require('./chunk-PK6SKIKE.cjs');
14
14
 
15
15
  Object.defineProperty(exports, "default", {
16
16
  enumerable: true,
17
- get: function () { return chunk6FRFYMLC_cjs.unloader_default; }
17
+ get: function () { return chunkS5QFX2GM_cjs.unloader_default; }
18
18
  });
19
19
  Object.defineProperty(exports, "module.exports", {
20
20
  enumerable: true,
21
- get: function () { return chunk6FRFYMLC_cjs.unloader; }
21
+ get: function () { return chunkS5QFX2GM_cjs.unloader; }
22
22
  });
23
23
  Object.defineProperty(exports, "unloader", {
24
24
  enumerable: true,
25
- get: function () { return chunk6FRFYMLC_cjs.unloader; }
25
+ get: function () { return chunkS5QFX2GM_cjs.unloader; }
26
26
  });
27
27
  //# sourceMappingURL=unloader.cjs.map
28
28
  //# sourceMappingURL=unloader.cjs.map