powerlines 0.9.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-3L4KRPXQ.cjs → chunk-2RHPFVYT.cjs} +17 -18
  6. package/dist/{chunk-VQ5O5N7V.js → chunk-3Y5CCIJR.js} +3 -3
  7. package/dist/{chunk-YE56I7CZ.cjs → chunk-5XYGZ3DC.cjs} +2 -2
  8. package/dist/{chunk-V4TNA6HX.js → chunk-5Y4JYQ66.js} +3 -3
  9. package/dist/{chunk-WM76YQJH.cjs → chunk-66GXB2UY.cjs} +4 -4
  10. package/dist/{chunk-VOB62ELC.js → chunk-6TJGZR5X.js} +4 -4
  11. package/dist/{chunk-OKC6TA7P.js → chunk-6UDHGAAI.js} +3 -3
  12. package/dist/{chunk-ETEQKM36.cjs → chunk-7IWH37DY.cjs} +2 -2
  13. package/dist/{chunk-BDTLKRKQ.js → chunk-EGSEJQCE.js} +3 -3
  14. package/dist/{chunk-ILVCZATT.js → chunk-GPPJ2CRE.js} +2 -2
  15. package/dist/{chunk-RGJMMCOR.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-W3NQCDUN.js → chunk-KYGEWAEG.js} +3 -3
  19. package/dist/{chunk-FOLQTZUP.cjs → chunk-L2SAK2JC.cjs} +4 -4
  20. package/dist/chunk-LXMNDUPG.cjs +12 -0
  21. package/dist/{chunk-GHW2FUF5.js → chunk-N7NE3VOU.js} +4 -4
  22. package/dist/{chunk-OEL3BTQP.js → chunk-OYIM2M74.js} +547 -522
  23. package/dist/{chunk-QK36ULYT.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-IOBFVFH2.js → chunk-S746E63M.js} +3 -3
  27. package/dist/{chunk-MKZOY5EV.js → chunk-SDEBJQDT.js} +12 -13
  28. package/dist/chunk-SL3CXJWD.cjs +34 -0
  29. package/dist/{chunk-KC4VY5X4.cjs → chunk-UHCRNFFC.cjs} +9 -9
  30. package/dist/{chunk-ZQZ5ZUGG.cjs → chunk-UTVZVGM3.cjs} +555 -530
  31. package/dist/{chunk-QIKKQQF7.cjs → chunk-UZQYBO6Z.cjs} +4 -4
  32. package/dist/{chunk-65PSZQFC.js → chunk-VIRKTIPK.js} +3 -3
  33. package/dist/{chunk-UYS3BU6I.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-BY4UTCHZ.cjs → chunk-ZBDP43LG.cjs} +6 -6
  37. package/dist/chunk-ZFATNDSY.cjs +12 -0
  38. package/dist/{chunk-C3I5QEF5.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-YQG6JE5R.cjs → chunk-M7WHFUKR.cjs} +549 -527
  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-6IEUZ5DZ.js → chunk-PIFE7MUZ.js} +525 -503
  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-4JUWHOFJ.cjs +0 -12
  321. package/dist/chunk-ARHKVB3S.cjs +0 -12
  322. package/dist/chunk-JCXSBKRJ.js +0 -31
  323. package/dist/chunk-NRMXL6VA.cjs +0 -34
  324. package/dist/chunk-QKXJRYA5.cjs +0 -12
  325. package/dist/chunk-STLRGAW6.cjs +0 -24
  326. package/dist/chunk-TJIHTRP5.cjs +0 -12
  327. package/dist/chunk-VES34CLG.cjs +0 -12
  328. package/dist/lib/chunk-26W3IQT6.js.map +0 -1
  329. package/dist/lib/chunk-2ZYHO243.js.map +0 -1
  330. package/dist/lib/chunk-65DUUIIF.cjs.map +0 -1
  331. package/dist/lib/chunk-6IEUZ5DZ.js.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-XFIGAAKN.cjs.map +0 -1
  362. package/dist/lib/chunk-XHCRXNQ3.cjs.map +0 -1
  363. package/dist/lib/chunk-YQG6JE5R.cjs.map +0 -1
  364. package/dist/lib/chunk-ZKYZWEHY.cjs.map +0 -1
  365. package/dist/lib/chunk-ZYBUJ2HE.js.map +0 -1
@@ -23,6 +23,7 @@ import { Range } from 'semver';
23
23
  import { TransformResult, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginContext, UnpluginBuildContext } from 'unplugin';
24
24
  import { ArrayValues } from '@stryke/types/array';
25
25
  import { P as ParsedTypeScriptConfig, T as TSConfig } from './tsconfig-Bz-CiFqD.cjs';
26
+ import { PrimitiveJsonValue } from '@stryke/json/types';
26
27
  import { Volume } from 'memfs';
27
28
  import { StatSyncOptions, Stats, PathLike, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
28
29
  import { IUnionFs } from 'unionfs';
@@ -424,30 +425,57 @@ declare const __VFS_REVERT__ = "__VFS_REVERT__";
424
425
  declare const __VFS_CACHE__ = "__VFS_CACHE__";
425
426
  declare const __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
426
427
  declare const __VFS_UNIFIED__ = "__VFS_UNIFIED__";
428
+ type OutputModeType = "fs" | "virtual";
427
429
  interface VirtualFile {
428
430
  /**
429
- * A virtual path to the file in the virtual file system.
431
+ * The unique identifier for the virtual file.
432
+ *
433
+ * @remarks
434
+ * If no specific id is provided, it defaults to the file's {@link path}.
430
435
  */
431
- path: string;
436
+ id: string;
432
437
  /**
433
- * The contents of the virtual file.
438
+ * Additional metadata associated with the virtual file.
434
439
  */
435
- contents: string;
436
- }
437
- interface VirtualBuiltinFile extends VirtualFile {
440
+ details: Record<string, PrimitiveJsonValue>;
438
441
  /**
439
- * The unique identifier for the virtual file.
442
+ * The variant of the file.
440
443
  *
441
444
  * @remarks
442
- * This property is read-only and is set when the file is created.
445
+ * This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
446
+ * - `builtin`: Indicates that the file is a built-in module provided by the system.
447
+ * - `entry`: Indicates that the file is an entry point for execution.
448
+ * - `normal`: Indicates that the file is a standard file without any special role.
443
449
  */
444
- id: string;
450
+ variant: string;
451
+ /**
452
+ * The output mode of the file.
453
+ *
454
+ * @remarks
455
+ * This indicates whether the file is intended to be written to the actual file system (`fs`) or kept in the virtual file system (`virtual`).
456
+ */
457
+ mode: OutputModeType;
458
+ /**
459
+ * A virtual (or actual) path to the file in the file system.
460
+ */
461
+ path: string;
462
+ /**
463
+ * The contents of the file.
464
+ */
465
+ code: string | NodeJS.ArrayBufferView;
445
466
  }
446
- type OutputModeType = "fs" | "virtual";
467
+ type VirtualFileSystemMetadata = Pick<VirtualFile, "id" | "details" | "variant" | "mode">;
447
468
  interface ResolveFSOptions {
448
469
  mode?: OutputModeType;
449
470
  }
450
471
  type MakeDirectoryOptions = (Mode | MakeDirectoryOptions$1) & ResolveFSOptions;
472
+ interface PowerlinesWriteFileOptions extends ResolveFSOptions {
473
+ skipFormat?: boolean;
474
+ }
475
+ type NodeWriteFileOptions = WriteFileOptions$1;
476
+ type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
477
+ type PowerLinesWriteFileData = Partial<Omit<VirtualFile, "path" | "mode" | "code">> & Pick<VirtualFile, "code">;
478
+ type WriteFileData = string | NodeJS.ArrayBufferView | PowerLinesWriteFileData;
451
479
  interface ResolvePathOptions extends ResolveFSOptions {
452
480
  /**
453
481
  * Should the resolved path include the file extension?
@@ -464,82 +492,63 @@ interface ResolvePathOptions extends ResolveFSOptions {
464
492
  */
465
493
  type?: "file" | "directory";
466
494
  }
467
- type WriteFileOptions = WriteFileOptions$1 & ResolveFSOptions;
468
- interface WriteBuiltinFileOptions extends ResolveFSOptions {
469
- skipFormat?: boolean;
470
- }
471
495
  interface VirtualFileSystemInterface {
472
496
  [__VFS_INIT__]: () => void;
473
497
  [__VFS_REVERT__]: () => void;
474
498
  /**
475
- * The underlying builtin module Ids.
499
+ * The underlying file metadata.
476
500
  */
477
- builtinIdMap: Map<string, string>;
501
+ meta: Record<string, VirtualFileSystemMetadata | undefined>;
478
502
  /**
479
- * Checks if a path or ID corresponds to a builtin file.
480
- *
481
- * @param id - The id of the builtin file to check against.
482
- * @param pathOrId - The path or id of the file to check.
483
- * @returns Whether the path or ID corresponds to a builtin file.
484
- */
485
- isMatchingBuiltinId: (id: string, pathOrId: string) => boolean;
486
- /**
487
- * Checks if a provided string is a valid builtin ID (does not need to already be created in the file system).
488
- *
489
- * @param id - The ID to check.
490
- * @returns Whether the ID is a valid builtin ID.
503
+ * A map of module ids to their file paths.
491
504
  */
492
- isValidBuiltinId: (id: string) => boolean;
505
+ ids: Record<string, string>;
493
506
  /**
494
- * Check if a path or ID corresponds to a virtual file.
507
+ * Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
495
508
  *
496
- * @param pathOrId - The path or ID to check.
509
+ * @param pathOrId - The path or id to check.
497
510
  * @param options - Optional parameters for resolving the path.
498
- * @returns Whether the path or ID corresponds to a virtual file.
511
+ * @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
499
512
  */
500
- isVirtualFile: (pathOrId: string, options?: ResolvePathOptions) => boolean;
513
+ isVirtual: (pathOrId: string, options?: ResolvePathOptions) => boolean;
501
514
  /**
502
- * Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
503
- *
504
- * @see https://www.typescriptlang.org/tsconfig#paths
515
+ * Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
505
516
  *
506
- * @param pathOrId - The path or ID to check.
507
- * @returns Whether the path or ID corresponds to a virtual file.
508
- */
509
- isTsconfigPath: (pathOrId: string) => boolean;
510
- /**
511
- * Checks if a given path or ID corresponds to a builtin module file.
512
- */
513
- isBuiltinFile: (pathOrID: string, options?: ResolvePathOptions) => boolean;
514
- /**
515
- * Returns a list of builtin module files in the virtual file system.
516
- */
517
- listBuiltinFiles: () => Promise<VirtualBuiltinFile[]>;
518
- /**
519
- * Checks if a file exists in the virtual file system (VFS).
517
+ * @param pathOrId - The path or id to check.
518
+ * @param options - Optional parameters for resolving the path.
519
+ * @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
520
520
  */
521
- existsSync: (pathOrId: string) => boolean;
521
+ isFs: (pathOrId: string, options?: ResolvePathOptions) => boolean;
522
522
  /**
523
523
  * Checks if a file exists in the virtual file system (VFS).
524
524
  *
525
525
  * @param path - The path of the file to check.
526
526
  * @returns `true` if the file exists, otherwise `false`.
527
527
  */
528
- fileExistsSync: (path: string) => boolean;
528
+ isFile: (path: string) => boolean;
529
529
  /**
530
530
  * Checks if a directory exists in the virtual file system (VFS).
531
531
  *
532
532
  * @param path - The path of the directory to check.
533
533
  * @returns `true` if the directory exists, otherwise `false`.
534
534
  */
535
- directoryExistsSync: (path: string) => boolean;
535
+ isDirectory: (path: string) => boolean;
536
536
  /**
537
- * Checks if a path exists in the virtual file system (VFS).
537
+ * Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
538
538
  *
539
- * @param path - The path to check.
540
- * @returns `true` if the path exists, otherwise `false`.
539
+ * @see https://www.typescriptlang.org/tsconfig#paths
540
+ *
541
+ * @param pathOrId - The path or id to check.
542
+ * @returns Whether the path or id corresponds to a virtual file.
543
+ */
544
+ isTsconfigPath: (pathOrId: string) => boolean;
545
+ /**
546
+ * Checks if a file exists in the virtual file system (VFS).
547
+ *
548
+ * @param pathOrId - The path or id of the file.
549
+ * @returns `true` if the file exists, otherwise `false`.
541
550
  */
542
- pathExistsSync: (path: string) => boolean;
551
+ existsSync: (pathOrId: string) => boolean;
543
552
  /**
544
553
  * Gets the stats of a file in the virtual file system (VFS).
545
554
  *
@@ -675,71 +684,28 @@ interface VirtualFileSystemInterface {
675
684
  /**
676
685
  * Writes a file to the virtual file system (VFS).
677
686
  *
678
- * @param file - The path to the file.
687
+ * @param path - The path to the file.
679
688
  * @param data - The contents of the file.
680
689
  * @param options - Optional parameters for writing the file.
681
690
  * @returns A promise that resolves when the file is written.
682
691
  */
683
- writeFile: (file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions) => Promise<void>;
692
+ writeFile: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
684
693
  /**
685
694
  * Writes a file to the virtual file system (VFS).
686
695
  *
687
- * @param file - The path to the file.
696
+ * @param path - The path to the file.
688
697
  * @param data - The contents of the file.
689
698
  * @param options - Optional parameters for writing the file.
690
699
  */
691
- writeFileSync: (file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions) => void;
692
- /**
693
- * Adds a builtin module file to the virtual file system.
694
- *
695
- * @param id - The unique identifier for the builtin module file.
696
- * @param path - The path to the builtin module file.
697
- * @param contents - The contents of the builtin module file.
698
- * @param options - Optional parameters for writing the builtin module file.
699
- */
700
- writeBuiltinFile: (id: string, path: string, contents: string, options?: WriteBuiltinFileOptions) => Promise<void>;
701
- /**
702
- * Adds an entry file to the virtual file system.
703
- *
704
- * @param name - The unique identifier for the entry file.
705
- * @param contents - The contents of the entry file.
706
- * @param options - Optional parameters for writing the entry file.
707
- */
708
- writeEntryFile: (name: string, contents: string, options?: WriteBuiltinFileOptions) => Promise<void>;
700
+ writeFileSync: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => void;
709
701
  /**
710
- * Writes a file to disk from the physical file system (on disk).
711
- *
712
- * @param path - The path to the file to write.
713
- * @param contents - The contents of the file to write.
714
- * @param options - Optional parameters for writing the file.
715
- * @returns A promise that resolves when the file is written.
716
- */
717
- writeFileToDisk: (path: string, contents: string, options?: {
718
- skipFormat?: boolean;
719
- }) => Promise<void>;
720
- /**
721
- * Resolves a path or ID to a file path in the virtual file system.
702
+ * Resolves a path or id to a file path in the virtual file system.
722
703
  *
723
704
  * @param pathOrId - The path or id of the file to resolve.
724
705
  * @param options - Optional parameters for resolving the path.
725
706
  * @returns The resolved path of the file if it exists, otherwise false.
726
707
  */
727
- resolvePath: (pathOrId: string, options?: ResolvePathOptions) => string | false;
728
- /**
729
- * Resolves a path or ID to a file path in the virtual file system.
730
- *
731
- * @param pathOrId - The path or id of the file to resolve.
732
- * @returns The resolved path of the file if it exists, otherwise false.
733
- */
734
- realpathSync: (pathOrId: string) => string;
735
- /**
736
- * Resolves a path or ID to a builtin module file id in the virtual file system.
737
- *
738
- * @param pathOrId - The path or id of the file to resolve.
739
- * @param paths - Optional array of paths to search for the file.
740
- * @returns The resolved id of the builtin module file if it exists, otherwise false.
741
- */
742
- resolveId: (pathOrId: string) => string | false;
708
+ resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
743
709
  /**
744
710
  * Resolves a path based on TypeScript's `tsconfig.json` paths.
745
711
  *
@@ -758,6 +724,19 @@ interface VirtualFileSystemInterface {
758
724
  * @returns The resolved package name if it exists, otherwise undefined.
759
725
  */
760
726
  resolveTsconfigPathPackage: (path: string) => string | false;
727
+ /**
728
+ * Resolves a path or id to a file path in the virtual file system.
729
+ *
730
+ * @param pathOrId - The path or id of the file to resolve.
731
+ * @returns The resolved path of the file if it exists, otherwise false.
732
+ */
733
+ realpathSync: (pathOrId: string) => string;
734
+ /**
735
+ * Retrieves a partial metadata mapping of all files in the virtual file system (VFS).
736
+ *
737
+ * @returns A record mapping file paths to their partial metadata.
738
+ */
739
+ getPartialMeta: () => Record<string, Partial<VirtualFileSystemMetadata>>;
761
740
  /**
762
741
  * A map of cached file paths to their underlying file content.
763
742
  */
@@ -915,6 +894,31 @@ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
915
894
  * The Jiti module resolver
916
895
  */
917
896
  resolver: Resolver;
897
+ /**
898
+ * The builtin module id that exist in the Powerlines virtual file system
899
+ */
900
+ builtins: string[];
901
+ /**
902
+ * The Powerlines builtin virtual files
903
+ */
904
+ getBuiltins: () => Promise<VirtualFile[]>;
905
+ /**
906
+ * Resolves a builtin virtual file and writes it to the VFS if it does not already exist
907
+ *
908
+ * @param code - The source code of the builtin file
909
+ * @param id - The unique identifier of the builtin file
910
+ * @param path - An optional path to write the builtin file to
911
+ * @param options - Options for writing the file
912
+ */
913
+ writeBuiltin: (code: string, id: string, path?: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
914
+ /**
915
+ * Resolves a entry virtual file and writes it to the VFS if it does not already exist
916
+ *
917
+ * @param code - The source code of the entry file
918
+ * @param path - An optional path to write the entry file to
919
+ * @param options - Options for writing the file
920
+ */
921
+ writeEntry: (code: string, path: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
918
922
  /**
919
923
  * Parses the source code and returns a {@link ParseResult} object.
920
924
  */
@@ -23,6 +23,7 @@ import { Range } from 'semver';
23
23
  import { TransformResult, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginContext, UnpluginBuildContext } from 'unplugin';
24
24
  import { ArrayValues } from '@stryke/types/array';
25
25
  import { P as ParsedTypeScriptConfig, T as TSConfig } from './tsconfig-Bz-CiFqD.js';
26
+ import { PrimitiveJsonValue } from '@stryke/json/types';
26
27
  import { Volume } from 'memfs';
27
28
  import { StatSyncOptions, Stats, PathLike, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
28
29
  import { IUnionFs } from 'unionfs';
@@ -424,30 +425,57 @@ declare const __VFS_REVERT__ = "__VFS_REVERT__";
424
425
  declare const __VFS_CACHE__ = "__VFS_CACHE__";
425
426
  declare const __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
426
427
  declare const __VFS_UNIFIED__ = "__VFS_UNIFIED__";
428
+ type OutputModeType = "fs" | "virtual";
427
429
  interface VirtualFile {
428
430
  /**
429
- * A virtual path to the file in the virtual file system.
431
+ * The unique identifier for the virtual file.
432
+ *
433
+ * @remarks
434
+ * If no specific id is provided, it defaults to the file's {@link path}.
430
435
  */
431
- path: string;
436
+ id: string;
432
437
  /**
433
- * The contents of the virtual file.
438
+ * Additional metadata associated with the virtual file.
434
439
  */
435
- contents: string;
436
- }
437
- interface VirtualBuiltinFile extends VirtualFile {
440
+ details: Record<string, PrimitiveJsonValue>;
438
441
  /**
439
- * The unique identifier for the virtual file.
442
+ * The variant of the file.
440
443
  *
441
444
  * @remarks
442
- * This property is read-only and is set when the file is created.
445
+ * This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
446
+ * - `builtin`: Indicates that the file is a built-in module provided by the system.
447
+ * - `entry`: Indicates that the file is an entry point for execution.
448
+ * - `normal`: Indicates that the file is a standard file without any special role.
443
449
  */
444
- id: string;
450
+ variant: string;
451
+ /**
452
+ * The output mode of the file.
453
+ *
454
+ * @remarks
455
+ * This indicates whether the file is intended to be written to the actual file system (`fs`) or kept in the virtual file system (`virtual`).
456
+ */
457
+ mode: OutputModeType;
458
+ /**
459
+ * A virtual (or actual) path to the file in the file system.
460
+ */
461
+ path: string;
462
+ /**
463
+ * The contents of the file.
464
+ */
465
+ code: string | NodeJS.ArrayBufferView;
445
466
  }
446
- type OutputModeType = "fs" | "virtual";
467
+ type VirtualFileSystemMetadata = Pick<VirtualFile, "id" | "details" | "variant" | "mode">;
447
468
  interface ResolveFSOptions {
448
469
  mode?: OutputModeType;
449
470
  }
450
471
  type MakeDirectoryOptions = (Mode | MakeDirectoryOptions$1) & ResolveFSOptions;
472
+ interface PowerlinesWriteFileOptions extends ResolveFSOptions {
473
+ skipFormat?: boolean;
474
+ }
475
+ type NodeWriteFileOptions = WriteFileOptions$1;
476
+ type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
477
+ type PowerLinesWriteFileData = Partial<Omit<VirtualFile, "path" | "mode" | "code">> & Pick<VirtualFile, "code">;
478
+ type WriteFileData = string | NodeJS.ArrayBufferView | PowerLinesWriteFileData;
451
479
  interface ResolvePathOptions extends ResolveFSOptions {
452
480
  /**
453
481
  * Should the resolved path include the file extension?
@@ -464,82 +492,63 @@ interface ResolvePathOptions extends ResolveFSOptions {
464
492
  */
465
493
  type?: "file" | "directory";
466
494
  }
467
- type WriteFileOptions = WriteFileOptions$1 & ResolveFSOptions;
468
- interface WriteBuiltinFileOptions extends ResolveFSOptions {
469
- skipFormat?: boolean;
470
- }
471
495
  interface VirtualFileSystemInterface {
472
496
  [__VFS_INIT__]: () => void;
473
497
  [__VFS_REVERT__]: () => void;
474
498
  /**
475
- * The underlying builtin module Ids.
499
+ * The underlying file metadata.
476
500
  */
477
- builtinIdMap: Map<string, string>;
501
+ meta: Record<string, VirtualFileSystemMetadata | undefined>;
478
502
  /**
479
- * Checks if a path or ID corresponds to a builtin file.
480
- *
481
- * @param id - The id of the builtin file to check against.
482
- * @param pathOrId - The path or id of the file to check.
483
- * @returns Whether the path or ID corresponds to a builtin file.
484
- */
485
- isMatchingBuiltinId: (id: string, pathOrId: string) => boolean;
486
- /**
487
- * Checks if a provided string is a valid builtin ID (does not need to already be created in the file system).
488
- *
489
- * @param id - The ID to check.
490
- * @returns Whether the ID is a valid builtin ID.
503
+ * A map of module ids to their file paths.
491
504
  */
492
- isValidBuiltinId: (id: string) => boolean;
505
+ ids: Record<string, string>;
493
506
  /**
494
- * Check if a path or ID corresponds to a virtual file.
507
+ * Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
495
508
  *
496
- * @param pathOrId - The path or ID to check.
509
+ * @param pathOrId - The path or id to check.
497
510
  * @param options - Optional parameters for resolving the path.
498
- * @returns Whether the path or ID corresponds to a virtual file.
511
+ * @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
499
512
  */
500
- isVirtualFile: (pathOrId: string, options?: ResolvePathOptions) => boolean;
513
+ isVirtual: (pathOrId: string, options?: ResolvePathOptions) => boolean;
501
514
  /**
502
- * Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
503
- *
504
- * @see https://www.typescriptlang.org/tsconfig#paths
515
+ * Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
505
516
  *
506
- * @param pathOrId - The path or ID to check.
507
- * @returns Whether the path or ID corresponds to a virtual file.
508
- */
509
- isTsconfigPath: (pathOrId: string) => boolean;
510
- /**
511
- * Checks if a given path or ID corresponds to a builtin module file.
512
- */
513
- isBuiltinFile: (pathOrID: string, options?: ResolvePathOptions) => boolean;
514
- /**
515
- * Returns a list of builtin module files in the virtual file system.
516
- */
517
- listBuiltinFiles: () => Promise<VirtualBuiltinFile[]>;
518
- /**
519
- * Checks if a file exists in the virtual file system (VFS).
517
+ * @param pathOrId - The path or id to check.
518
+ * @param options - Optional parameters for resolving the path.
519
+ * @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
520
520
  */
521
- existsSync: (pathOrId: string) => boolean;
521
+ isFs: (pathOrId: string, options?: ResolvePathOptions) => boolean;
522
522
  /**
523
523
  * Checks if a file exists in the virtual file system (VFS).
524
524
  *
525
525
  * @param path - The path of the file to check.
526
526
  * @returns `true` if the file exists, otherwise `false`.
527
527
  */
528
- fileExistsSync: (path: string) => boolean;
528
+ isFile: (path: string) => boolean;
529
529
  /**
530
530
  * Checks if a directory exists in the virtual file system (VFS).
531
531
  *
532
532
  * @param path - The path of the directory to check.
533
533
  * @returns `true` if the directory exists, otherwise `false`.
534
534
  */
535
- directoryExistsSync: (path: string) => boolean;
535
+ isDirectory: (path: string) => boolean;
536
536
  /**
537
- * Checks if a path exists in the virtual file system (VFS).
537
+ * Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
538
538
  *
539
- * @param path - The path to check.
540
- * @returns `true` if the path exists, otherwise `false`.
539
+ * @see https://www.typescriptlang.org/tsconfig#paths
540
+ *
541
+ * @param pathOrId - The path or id to check.
542
+ * @returns Whether the path or id corresponds to a virtual file.
543
+ */
544
+ isTsconfigPath: (pathOrId: string) => boolean;
545
+ /**
546
+ * Checks if a file exists in the virtual file system (VFS).
547
+ *
548
+ * @param pathOrId - The path or id of the file.
549
+ * @returns `true` if the file exists, otherwise `false`.
541
550
  */
542
- pathExistsSync: (path: string) => boolean;
551
+ existsSync: (pathOrId: string) => boolean;
543
552
  /**
544
553
  * Gets the stats of a file in the virtual file system (VFS).
545
554
  *
@@ -675,71 +684,28 @@ interface VirtualFileSystemInterface {
675
684
  /**
676
685
  * Writes a file to the virtual file system (VFS).
677
686
  *
678
- * @param file - The path to the file.
687
+ * @param path - The path to the file.
679
688
  * @param data - The contents of the file.
680
689
  * @param options - Optional parameters for writing the file.
681
690
  * @returns A promise that resolves when the file is written.
682
691
  */
683
- writeFile: (file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions) => Promise<void>;
692
+ writeFile: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
684
693
  /**
685
694
  * Writes a file to the virtual file system (VFS).
686
695
  *
687
- * @param file - The path to the file.
696
+ * @param path - The path to the file.
688
697
  * @param data - The contents of the file.
689
698
  * @param options - Optional parameters for writing the file.
690
699
  */
691
- writeFileSync: (file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions) => void;
692
- /**
693
- * Adds a builtin module file to the virtual file system.
694
- *
695
- * @param id - The unique identifier for the builtin module file.
696
- * @param path - The path to the builtin module file.
697
- * @param contents - The contents of the builtin module file.
698
- * @param options - Optional parameters for writing the builtin module file.
699
- */
700
- writeBuiltinFile: (id: string, path: string, contents: string, options?: WriteBuiltinFileOptions) => Promise<void>;
701
- /**
702
- * Adds an entry file to the virtual file system.
703
- *
704
- * @param name - The unique identifier for the entry file.
705
- * @param contents - The contents of the entry file.
706
- * @param options - Optional parameters for writing the entry file.
707
- */
708
- writeEntryFile: (name: string, contents: string, options?: WriteBuiltinFileOptions) => Promise<void>;
700
+ writeFileSync: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => void;
709
701
  /**
710
- * Writes a file to disk from the physical file system (on disk).
711
- *
712
- * @param path - The path to the file to write.
713
- * @param contents - The contents of the file to write.
714
- * @param options - Optional parameters for writing the file.
715
- * @returns A promise that resolves when the file is written.
716
- */
717
- writeFileToDisk: (path: string, contents: string, options?: {
718
- skipFormat?: boolean;
719
- }) => Promise<void>;
720
- /**
721
- * Resolves a path or ID to a file path in the virtual file system.
702
+ * Resolves a path or id to a file path in the virtual file system.
722
703
  *
723
704
  * @param pathOrId - The path or id of the file to resolve.
724
705
  * @param options - Optional parameters for resolving the path.
725
706
  * @returns The resolved path of the file if it exists, otherwise false.
726
707
  */
727
- resolvePath: (pathOrId: string, options?: ResolvePathOptions) => string | false;
728
- /**
729
- * Resolves a path or ID to a file path in the virtual file system.
730
- *
731
- * @param pathOrId - The path or id of the file to resolve.
732
- * @returns The resolved path of the file if it exists, otherwise false.
733
- */
734
- realpathSync: (pathOrId: string) => string;
735
- /**
736
- * Resolves a path or ID to a builtin module file id in the virtual file system.
737
- *
738
- * @param pathOrId - The path or id of the file to resolve.
739
- * @param paths - Optional array of paths to search for the file.
740
- * @returns The resolved id of the builtin module file if it exists, otherwise false.
741
- */
742
- resolveId: (pathOrId: string) => string | false;
708
+ resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
743
709
  /**
744
710
  * Resolves a path based on TypeScript's `tsconfig.json` paths.
745
711
  *
@@ -758,6 +724,19 @@ interface VirtualFileSystemInterface {
758
724
  * @returns The resolved package name if it exists, otherwise undefined.
759
725
  */
760
726
  resolveTsconfigPathPackage: (path: string) => string | false;
727
+ /**
728
+ * Resolves a path or id to a file path in the virtual file system.
729
+ *
730
+ * @param pathOrId - The path or id of the file to resolve.
731
+ * @returns The resolved path of the file if it exists, otherwise false.
732
+ */
733
+ realpathSync: (pathOrId: string) => string;
734
+ /**
735
+ * Retrieves a partial metadata mapping of all files in the virtual file system (VFS).
736
+ *
737
+ * @returns A record mapping file paths to their partial metadata.
738
+ */
739
+ getPartialMeta: () => Record<string, Partial<VirtualFileSystemMetadata>>;
761
740
  /**
762
741
  * A map of cached file paths to their underlying file content.
763
742
  */
@@ -915,6 +894,31 @@ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
915
894
  * The Jiti module resolver
916
895
  */
917
896
  resolver: Resolver;
897
+ /**
898
+ * The builtin module id that exist in the Powerlines virtual file system
899
+ */
900
+ builtins: string[];
901
+ /**
902
+ * The Powerlines builtin virtual files
903
+ */
904
+ getBuiltins: () => Promise<VirtualFile[]>;
905
+ /**
906
+ * Resolves a builtin virtual file and writes it to the VFS if it does not already exist
907
+ *
908
+ * @param code - The source code of the builtin file
909
+ * @param id - The unique identifier of the builtin file
910
+ * @param path - An optional path to write the builtin file to
911
+ * @param options - Options for writing the file
912
+ */
913
+ writeBuiltin: (code: string, id: string, path?: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
914
+ /**
915
+ * Resolves a entry virtual file and writes it to the VFS if it does not already exist
916
+ *
917
+ * @param code - The source code of the entry file
918
+ * @param path - An optional path to write the entry file to
919
+ * @param options - Options for writing the file
920
+ */
921
+ writeEntry: (code: string, path: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
918
922
  /**
919
923
  * Parses the source code and returns a {@link ParseResult} object.
920
924
  */
@@ -1,5 +1,5 @@
1
1
  import { Jiti } from 'jiti';
2
- import { C as Context, W as WorkspaceConfig, P as PowerlinesCommand, a as ParsedUserConfig } from './config-BOPIY57U.cjs';
2
+ import { C as Context, W as WorkspaceConfig, P as PowerlinesCommand, a as ParsedUserConfig } from './config-AuIGsUck.cjs';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
5
5
  import '@storm-software/config/types';
@@ -26,6 +26,7 @@ import '@stryke/types/array';
26
26
  import './tsconfig-Bz-CiFqD.cjs';
27
27
  import '@stryke/types/tsconfig';
28
28
  import 'typescript';
29
+ import '@stryke/json/types';
29
30
  import 'memfs';
30
31
  import 'node:fs';
31
32
  import 'unionfs';
@@ -1,5 +1,5 @@
1
1
  import { Jiti } from 'jiti';
2
- import { C as Context, W as WorkspaceConfig, P as PowerlinesCommand, a as ParsedUserConfig } from './config-Chd_3Uh3.js';
2
+ import { C as Context, W as WorkspaceConfig, P as PowerlinesCommand, a as ParsedUserConfig } from './config-B_WTwd49.js';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
5
5
  import '@storm-software/config/types';
@@ -26,6 +26,7 @@ import '@stryke/types/array';
26
26
  import './tsconfig-Bz-CiFqD.js';
27
27
  import '@stryke/types/tsconfig';
28
28
  import 'typescript';
29
+ import '@stryke/json/types';
29
30
  import 'memfs';
30
31
  import 'node:fs';
31
32
  import 'unionfs';