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.
- package/dist/astro.cjs +9 -9
- package/dist/astro.d.cts +2 -1
- package/dist/astro.d.ts +2 -1
- package/dist/astro.js +6 -6
- package/dist/{chunk-UESICHEO.cjs → chunk-2RHPFVYT.cjs} +17 -18
- package/dist/{chunk-75B5EPR4.js → chunk-3Y5CCIJR.js} +3 -3
- package/dist/{chunk-YE56I7CZ.cjs → chunk-5XYGZ3DC.cjs} +2 -2
- package/dist/{chunk-PFCQFK7H.js → chunk-5Y4JYQ66.js} +3 -3
- package/dist/{chunk-H2SX5ZYF.cjs → chunk-66GXB2UY.cjs} +4 -4
- package/dist/{chunk-VOB62ELC.js → chunk-6TJGZR5X.js} +4 -4
- package/dist/{chunk-BWZCYCIF.js → chunk-6UDHGAAI.js} +3 -3
- package/dist/{chunk-ETEQKM36.cjs → chunk-7IWH37DY.cjs} +2 -2
- package/dist/{chunk-GI35XXXH.js → chunk-EGSEJQCE.js} +3 -3
- package/dist/{chunk-ILVCZATT.js → chunk-GPPJ2CRE.js} +2 -2
- package/dist/{chunk-54SOH6E5.js → chunk-HVT7PBFF.js} +3 -3
- package/dist/chunk-IJBH5OUN.cjs +12 -0
- package/dist/chunk-JBTSAOIQ.js +31 -0
- package/dist/{chunk-MXYZKFOD.js → chunk-KYGEWAEG.js} +3 -3
- package/dist/{chunk-6X6QQH33.cjs → chunk-L2SAK2JC.cjs} +4 -4
- package/dist/chunk-LXMNDUPG.cjs +12 -0
- package/dist/{chunk-V56DIXOO.js → chunk-N7NE3VOU.js} +4 -4
- package/dist/{chunk-D55IOUF3.js → chunk-OYIM2M74.js} +522 -517
- package/dist/{chunk-RRGXS7GZ.cjs → chunk-QHGPZK2H.cjs} +4 -4
- package/dist/chunk-RQ4CHMPO.cjs +12 -0
- package/dist/chunk-S5QFX2GM.cjs +12 -0
- package/dist/{chunk-KCDZ3LCF.js → chunk-S746E63M.js} +3 -3
- package/dist/{chunk-FBBWXUGK.js → chunk-SDEBJQDT.js} +12 -13
- package/dist/chunk-SL3CXJWD.cjs +34 -0
- package/dist/{chunk-I5D3SVUH.cjs → chunk-UHCRNFFC.cjs} +9 -9
- package/dist/{chunk-5ST7UKJF.cjs → chunk-UTVZVGM3.cjs} +530 -525
- package/dist/{chunk-QIKKQQF7.cjs → chunk-UZQYBO6Z.cjs} +4 -4
- package/dist/{chunk-YOHDGH77.js → chunk-VIRKTIPK.js} +3 -3
- package/dist/{chunk-WAWIGYB4.js → chunk-WCPY7HPU.js} +4 -4
- package/dist/{chunk-MMDBMHAW.js → chunk-WPVIF35O.js} +2 -2
- package/dist/chunk-YG7U2GIR.cjs +24 -0
- package/dist/{chunk-DOBCIS3U.cjs → chunk-ZBDP43LG.cjs} +6 -6
- package/dist/chunk-ZFATNDSY.cjs +12 -0
- package/dist/{chunk-4R6CQNB2.js → chunk-ZU4IRZSQ.js} +7 -7
- package/dist/define-config.d.cts +2 -1
- package/dist/define-config.d.ts +2 -1
- package/dist/esbuild.cjs +8 -8
- package/dist/esbuild.d.cts +2 -1
- package/dist/esbuild.d.ts +2 -1
- package/dist/esbuild.js +5 -5
- package/dist/extend-plugin.d.cts +2 -1
- package/dist/extend-plugin.d.ts +2 -1
- package/dist/farm.cjs +4 -4
- package/dist/farm.d.cts +2 -1
- package/dist/farm.d.ts +2 -1
- package/dist/farm.js +3 -3
- package/dist/{hooks-D0gf1nT3.d.ts → hooks-BGYnc61f.d.ts} +1 -1
- package/dist/{hooks-fVJu9DCF.d.cts → hooks-gk8S8LFP.d.cts} +1 -1
- package/dist/index.cjs +27 -27
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +18 -18
- package/dist/internal/api.cjs +3 -3
- package/dist/internal/api.d.cts +3 -2
- package/dist/internal/api.d.ts +3 -2
- package/dist/internal/api.js +2 -2
- package/dist/lib/build/esbuild.cjs +4 -4
- package/dist/lib/build/esbuild.d.cts +2 -1
- package/dist/lib/build/esbuild.d.ts +2 -1
- package/dist/lib/build/esbuild.js +1 -1
- package/dist/lib/build/index.cjs +25 -25
- package/dist/lib/build/index.d.cts +3 -2
- package/dist/lib/build/index.d.ts +3 -2
- package/dist/lib/build/index.js +9 -9
- package/dist/lib/build/rolldown.cjs +3 -3
- package/dist/lib/build/rolldown.d.cts +2 -1
- package/dist/lib/build/rolldown.d.ts +2 -1
- package/dist/lib/build/rolldown.js +2 -2
- package/dist/lib/build/rollup.cjs +3 -3
- package/dist/lib/build/rollup.d.cts +2 -1
- package/dist/lib/build/rollup.d.ts +2 -1
- package/dist/lib/build/rollup.js +1 -1
- package/dist/lib/build/rspack.cjs +2 -2
- package/dist/lib/build/rspack.d.cts +2 -1
- package/dist/lib/build/rspack.d.ts +2 -1
- package/dist/lib/build/rspack.js +1 -1
- package/dist/lib/build/tsup.cjs +5 -5
- package/dist/lib/build/tsup.d.cts +2 -1
- package/dist/lib/build/tsup.d.ts +2 -1
- package/dist/lib/build/tsup.js +2 -2
- package/dist/lib/build/unbuild.cjs +6 -6
- package/dist/lib/build/unbuild.d.cts +3 -2
- package/dist/lib/build/unbuild.d.ts +3 -2
- package/dist/lib/build/unbuild.js +3 -3
- package/dist/lib/build/vite.cjs +4 -4
- package/dist/lib/build/vite.d.cts +2 -1
- package/dist/lib/build/vite.d.ts +2 -1
- package/dist/lib/build/vite.js +2 -2
- package/dist/lib/build/webpack.cjs +2 -2
- package/dist/lib/build/webpack.d.cts +2 -1
- package/dist/lib/build/webpack.d.ts +2 -1
- package/dist/lib/build/webpack.js +1 -1
- package/dist/lib/{chunk-7CZ2QZEV.js → chunk-3I2YOM2E.js} +4 -4
- package/dist/lib/chunk-3I2YOM2E.js.map +1 -0
- package/dist/lib/{chunk-KAOWUIFH.cjs → chunk-4XUVP2LL.cjs} +3 -3
- package/dist/lib/chunk-4XUVP2LL.cjs.map +1 -0
- package/dist/lib/{chunk-ZKYZWEHY.cjs → chunk-6U2UX2PX.cjs} +4 -4
- package/dist/lib/chunk-6U2UX2PX.cjs.map +1 -0
- package/dist/lib/{chunk-VRNWPH35.cjs → chunk-7EAV6Q7B.cjs} +10 -9
- package/dist/lib/chunk-7EAV6Q7B.cjs.map +1 -0
- package/dist/lib/{chunk-ZYBUJ2HE.js → chunk-CAPN4FSS.js} +7 -7
- package/dist/lib/chunk-CAPN4FSS.js.map +1 -0
- package/dist/lib/{chunk-LTBRHAQ2.cjs → chunk-GJNFAFKR.cjs} +4 -4
- package/dist/lib/chunk-GJNFAFKR.cjs.map +1 -0
- package/dist/lib/{chunk-VANFTXBT.cjs → chunk-GWYTWFZE.cjs} +7 -7
- package/dist/lib/chunk-GWYTWFZE.cjs.map +1 -0
- package/dist/lib/{chunk-DKE25WTL.js → chunk-HQ6TGY34.js} +2 -2
- package/dist/lib/chunk-HQ6TGY34.js.map +1 -0
- package/dist/lib/{chunk-QSBORJCS.js → chunk-HZDOJWUO.js} +6 -6
- package/dist/lib/chunk-HZDOJWUO.js.map +1 -0
- package/dist/lib/{chunk-ECJPGNXE.cjs → chunk-IK3ABDPP.cjs} +2 -2
- package/dist/lib/chunk-IK3ABDPP.cjs.map +1 -0
- package/dist/lib/{chunk-G5DJO4HA.cjs → chunk-JTUL3477.cjs} +5 -5
- package/dist/lib/chunk-JTUL3477.cjs.map +1 -0
- package/dist/lib/{chunk-E7UTFXPP.js → chunk-KFE2IR3Y.js} +4 -4
- package/dist/lib/chunk-KFE2IR3Y.js.map +1 -0
- package/dist/lib/{chunk-RY67J24J.js → chunk-KSBESEOF.js} +2 -2
- package/dist/lib/chunk-KSBESEOF.js.map +1 -0
- package/dist/lib/{chunk-26W3IQT6.js → chunk-LTVWU4J2.js} +5 -5
- package/dist/lib/chunk-LTVWU4J2.js.map +1 -0
- package/dist/lib/{chunk-GWAVDFOE.js → chunk-M7U5RMK7.js} +8 -6
- package/dist/lib/chunk-M7U5RMK7.js.map +1 -0
- package/dist/lib/{chunk-2D74QBNW.cjs → chunk-M7WHFUKR.cjs} +524 -522
- package/dist/lib/chunk-M7WHFUKR.cjs.map +1 -0
- package/dist/lib/{chunk-EOO7IRCI.js → chunk-MAHHHINV.js} +3 -3
- package/dist/lib/chunk-MAHHHINV.js.map +1 -0
- package/dist/lib/{chunk-7FQQFIHR.cjs → chunk-NANLYIUO.cjs} +4 -4
- package/dist/lib/chunk-NANLYIUO.cjs.map +1 -0
- package/dist/lib/{chunk-TNCZYSNV.js → chunk-NE46WXNJ.js} +2 -2
- package/dist/lib/chunk-NE46WXNJ.js.map +1 -0
- package/dist/lib/{chunk-QGJVGFY4.js → chunk-OF5IJ4WG.js} +6 -6
- package/dist/lib/chunk-OF5IJ4WG.js.map +1 -0
- package/dist/lib/{chunk-WDNYOFEH.js → chunk-PIFE7MUZ.js} +500 -498
- package/dist/lib/chunk-PIFE7MUZ.js.map +1 -0
- package/dist/lib/{chunk-2ZYHO243.js → chunk-PXSRMP4E.js} +2 -2
- package/dist/lib/chunk-PXSRMP4E.js.map +1 -0
- package/dist/lib/{chunk-CXYZENE4.js → chunk-Q2L3FNJO.js} +13 -7
- package/dist/lib/chunk-Q2L3FNJO.js.map +1 -0
- package/dist/lib/{chunk-XFIGAAKN.cjs → chunk-Q2RUDKWY.cjs} +8 -6
- package/dist/lib/chunk-Q2RUDKWY.cjs.map +1 -0
- package/dist/lib/{chunk-NFDRIBCM.js → chunk-Q3KJZ3B5.js} +5 -7
- package/dist/lib/chunk-Q3KJZ3B5.js.map +1 -0
- package/dist/lib/{chunk-FHZJQZOE.cjs → chunk-QXJHCA3E.cjs} +7 -7
- package/dist/lib/chunk-QXJHCA3E.cjs.map +1 -0
- package/dist/lib/{chunk-TZFBE35T.cjs → chunk-RQICHHZM.cjs} +2 -2
- package/dist/lib/chunk-RQICHHZM.cjs.map +1 -0
- package/dist/lib/{chunk-7MXG5EG2.js → chunk-RXQWNSZX.js} +3 -3
- package/dist/lib/chunk-RXQWNSZX.js.map +1 -0
- package/dist/lib/{chunk-I6A564OE.cjs → chunk-U36VZLW6.cjs} +2 -2
- package/dist/lib/chunk-U36VZLW6.cjs.map +1 -0
- package/dist/lib/{chunk-65DUUIIF.cjs → chunk-UQJWVRRE.cjs} +2 -2
- package/dist/lib/chunk-UQJWVRRE.cjs.map +1 -0
- package/dist/lib/{chunk-XHCRXNQ3.cjs → chunk-V5OY4ALI.cjs} +5 -5
- package/dist/lib/chunk-V5OY4ALI.cjs.map +1 -0
- package/dist/lib/{chunk-I3I4BYJ4.js → chunk-VJN72T2O.js} +5 -5
- package/dist/lib/chunk-VJN72T2O.js.map +1 -0
- package/dist/lib/{chunk-KACTPBW2.cjs → chunk-W4OMKQ7W.cjs} +14 -8
- package/dist/lib/chunk-W4OMKQ7W.cjs.map +1 -0
- package/dist/lib/{chunk-SB3NFYXT.cjs → chunk-XZD7S5TU.cjs} +5 -5
- package/dist/lib/chunk-XZD7S5TU.cjs.map +1 -0
- package/dist/lib/{chunk-PJKWY74P.js → chunk-YBIWVB66.js} +10 -9
- package/dist/lib/chunk-YBIWVB66.js.map +1 -0
- package/dist/lib/{chunk-JXIRUV56.js → chunk-YF3YHK4X.js} +5 -5
- package/dist/lib/chunk-YF3YHK4X.js.map +1 -0
- package/dist/lib/{chunk-TJQEGHJA.cjs → chunk-YVDJCVE5.cjs} +12 -12
- package/dist/lib/chunk-YVDJCVE5.cjs.map +1 -0
- package/dist/lib/{chunk-M2TB43VG.cjs → chunk-ZP7PDTVE.cjs} +7 -9
- package/dist/lib/chunk-ZP7PDTVE.cjs.map +1 -0
- package/dist/lib/{config-BOPIY57U.d.cts → config-AuIGsUck.d.cts} +110 -106
- package/dist/lib/{config-Chd_3Uh3.d.ts → config-B_WTwd49.d.ts} +110 -106
- package/dist/lib/config-file.d.cts +2 -1
- package/dist/lib/config-file.d.ts +2 -1
- package/dist/lib/entry.d.cts +2 -1
- package/dist/lib/entry.d.ts +2 -1
- package/dist/lib/{hooks-DkVRKYVN.d.cts → hooks-4KkL9GD2.d.cts} +1 -1
- package/dist/lib/{hooks-56fQP2HY.d.ts → hooks-DErK4Fv4.d.ts} +1 -1
- package/dist/lib/index.cjs +36 -36
- package/dist/lib/index.d.cts +3 -2
- package/dist/lib/index.d.ts +3 -2
- package/dist/lib/index.js +11 -11
- package/dist/lib/logger.d.cts +2 -1
- package/dist/lib/logger.d.ts +2 -1
- package/dist/lib/typescript/compiler-host.cjs +6 -6
- package/dist/lib/typescript/compiler-host.cjs.map +1 -1
- package/dist/lib/typescript/compiler-host.d.cts +2 -1
- package/dist/lib/typescript/compiler-host.d.ts +2 -1
- package/dist/lib/typescript/compiler-host.js +5 -5
- package/dist/lib/typescript/compiler-host.js.map +1 -1
- package/dist/lib/typescript/import-transformer.cjs +1 -1
- package/dist/lib/typescript/import-transformer.cjs.map +1 -1
- package/dist/lib/typescript/import-transformer.d.cts +2 -1
- package/dist/lib/typescript/import-transformer.d.ts +2 -1
- package/dist/lib/typescript/import-transformer.js +1 -1
- package/dist/lib/typescript/import-transformer.js.map +1 -1
- package/dist/lib/typescript/index.cjs +6 -6
- package/dist/lib/typescript/index.d.cts +2 -1
- package/dist/lib/typescript/index.d.ts +2 -1
- package/dist/lib/typescript/index.js +1 -1
- package/dist/lib/typescript/program.cjs +6 -6
- package/dist/lib/typescript/program.d.cts +2 -1
- package/dist/lib/typescript/program.d.ts +2 -1
- package/dist/lib/typescript/program.js +1 -1
- package/dist/lib/unplugin/factory.cjs +6 -6
- package/dist/lib/unplugin/factory.d.cts +3 -2
- package/dist/lib/unplugin/factory.d.ts +3 -2
- package/dist/lib/unplugin/factory.js +5 -5
- package/dist/lib/unplugin/index.cjs +9 -9
- package/dist/lib/unplugin/index.d.cts +3 -2
- package/dist/lib/unplugin/index.d.ts +3 -2
- package/dist/lib/unplugin/index.js +6 -6
- package/dist/lib/unplugin/plugin.cjs +4 -4
- package/dist/lib/unplugin/plugin.d.cts +2 -1
- package/dist/lib/unplugin/plugin.d.ts +2 -1
- package/dist/lib/unplugin/plugin.js +3 -3
- package/dist/lib/unplugin/resolve-id.cjs +2 -2
- package/dist/lib/unplugin/resolve-id.d.cts +2 -1
- package/dist/lib/unplugin/resolve-id.d.ts +2 -1
- package/dist/lib/unplugin/resolve-id.js +1 -1
- package/dist/lib/utilities/cache.cjs +4 -4
- package/dist/lib/utilities/cache.js +2 -2
- package/dist/lib/utilities/file-header.d.cts +2 -1
- package/dist/lib/utilities/file-header.d.ts +2 -1
- package/dist/lib/utilities/index.cjs +24 -24
- package/dist/lib/utilities/index.d.cts +2 -1
- package/dist/lib/utilities/index.d.ts +2 -1
- package/dist/lib/utilities/index.js +7 -7
- package/dist/lib/utilities/meta.cjs +8 -8
- package/dist/lib/utilities/meta.d.cts +2 -1
- package/dist/lib/utilities/meta.d.ts +2 -1
- package/dist/lib/utilities/meta.js +1 -1
- package/dist/lib/utilities/plugin-helpers.d.cts +2 -1
- package/dist/lib/utilities/plugin-helpers.d.ts +2 -1
- package/dist/lib/utilities/resolve-path.cjs +2 -2
- package/dist/lib/utilities/resolve-path.d.cts +2 -1
- package/dist/lib/utilities/resolve-path.d.ts +2 -1
- package/dist/lib/utilities/resolve-path.js +1 -1
- package/dist/lib/utilities/source-file.cjs +4 -4
- package/dist/lib/utilities/source-file.js +1 -1
- package/dist/lib/utilities/source-map.cjs +2 -2
- package/dist/lib/utilities/source-map.js +1 -1
- package/dist/lib/utilities/worker.cjs +3 -3
- package/dist/lib/utilities/worker.d.cts +2 -1
- package/dist/lib/utilities/worker.d.ts +2 -1
- package/dist/lib/utilities/worker.js +1 -1
- package/dist/lib/utilities/write-file.cjs +2 -2
- package/dist/lib/utilities/write-file.d.cts +2 -1
- package/dist/lib/utilities/write-file.d.ts +2 -1
- package/dist/lib/utilities/write-file.js +1 -1
- package/dist/next.cjs +8 -8
- package/dist/next.js +5 -5
- package/dist/nuxt.cjs +10 -10
- package/dist/nuxt.js +7 -7
- package/dist/{resolved-NZTd64-O.d.cts → resolved-CcuVqMqc.d.cts} +28 -3
- package/dist/{resolved-DhHHMnUD.d.ts → resolved-Dhscmo3z.d.ts} +28 -3
- package/dist/rolldown.cjs +7 -7
- package/dist/rolldown.d.cts +2 -1
- package/dist/rolldown.d.ts +2 -1
- package/dist/rolldown.js +4 -4
- package/dist/rollup.cjs +7 -7
- package/dist/rollup.d.cts +2 -1
- package/dist/rollup.d.ts +2 -1
- package/dist/rollup.js +4 -4
- package/dist/rspack.cjs +7 -7
- package/dist/rspack.d.cts +2 -1
- package/dist/rspack.d.ts +2 -1
- package/dist/rspack.js +4 -4
- package/dist/tsup.cjs +9 -9
- package/dist/tsup.js +6 -6
- package/dist/types/babel.d.cts +2 -1
- package/dist/types/babel.d.ts +2 -1
- package/dist/types/commands.d.cts +2 -1
- package/dist/types/commands.d.ts +2 -1
- package/dist/types/compiler.d.cts +2 -1
- package/dist/types/compiler.d.ts +2 -1
- package/dist/types/config.d.cts +2 -1
- package/dist/types/config.d.ts +2 -1
- package/dist/types/context.cjs +2 -2
- package/dist/types/context.d.cts +2 -1
- package/dist/types/context.d.ts +2 -1
- package/dist/types/context.js +1 -1
- package/dist/types/hooks.d.cts +2 -1
- package/dist/types/hooks.d.ts +2 -1
- package/dist/types/index.cjs +9 -9
- package/dist/types/index.d.cts +3 -2
- package/dist/types/index.d.ts +3 -2
- package/dist/types/index.js +2 -2
- package/dist/types/internal.d.cts +3 -2
- package/dist/types/internal.d.ts +3 -2
- package/dist/types/plugin.d.cts +2 -1
- package/dist/types/plugin.d.ts +2 -1
- package/dist/types/resolved.d.cts +2 -1
- package/dist/types/resolved.d.ts +2 -1
- package/dist/types/unplugin.d.cts +2 -1
- package/dist/types/unplugin.d.ts +2 -1
- package/dist/types/vfs.cjs +7 -7
- package/dist/types/vfs.d.cts +93 -111
- package/dist/types/vfs.d.ts +93 -111
- package/dist/types/vfs.js +1 -1
- package/dist/unloader.cjs +7 -7
- package/dist/unloader.d.cts +2 -1
- package/dist/unloader.d.ts +2 -1
- package/dist/unloader.js +4 -4
- package/dist/unplugin.cjs +19 -19
- package/dist/unplugin.d.cts +3 -2
- package/dist/unplugin.d.ts +3 -2
- package/dist/unplugin.js +16 -16
- package/dist/vite.cjs +8 -8
- package/dist/vite.d.cts +2 -1
- package/dist/vite.d.ts +2 -1
- package/dist/vite.js +5 -5
- package/dist/webpack.cjs +7 -7
- package/dist/webpack.d.cts +2 -1
- package/dist/webpack.d.ts +2 -1
- package/dist/webpack.js +4 -4
- package/package.json +9 -9
- package/dist/chunk-6FRFYMLC.cjs +0 -12
- package/dist/chunk-6M3HIMSG.cjs +0 -12
- package/dist/chunk-6ODSQSQL.cjs +0 -34
- package/dist/chunk-HPXUAQCU.cjs +0 -12
- package/dist/chunk-KJHDE76P.cjs +0 -24
- package/dist/chunk-R5CZG7XN.js +0 -31
- package/dist/chunk-RGMGFYXY.cjs +0 -12
- package/dist/chunk-TZ4Y7R4G.cjs +0 -12
- package/dist/lib/chunk-26W3IQT6.js.map +0 -1
- package/dist/lib/chunk-2D74QBNW.cjs.map +0 -1
- package/dist/lib/chunk-2ZYHO243.js.map +0 -1
- package/dist/lib/chunk-65DUUIIF.cjs.map +0 -1
- package/dist/lib/chunk-7CZ2QZEV.js.map +0 -1
- package/dist/lib/chunk-7FQQFIHR.cjs.map +0 -1
- package/dist/lib/chunk-7MXG5EG2.js.map +0 -1
- package/dist/lib/chunk-CXYZENE4.js.map +0 -1
- package/dist/lib/chunk-DKE25WTL.js.map +0 -1
- package/dist/lib/chunk-E7UTFXPP.js.map +0 -1
- package/dist/lib/chunk-ECJPGNXE.cjs.map +0 -1
- package/dist/lib/chunk-EOO7IRCI.js.map +0 -1
- package/dist/lib/chunk-FHZJQZOE.cjs.map +0 -1
- package/dist/lib/chunk-G5DJO4HA.cjs.map +0 -1
- package/dist/lib/chunk-GWAVDFOE.js.map +0 -1
- package/dist/lib/chunk-I3I4BYJ4.js.map +0 -1
- package/dist/lib/chunk-I6A564OE.cjs.map +0 -1
- package/dist/lib/chunk-JXIRUV56.js.map +0 -1
- package/dist/lib/chunk-KACTPBW2.cjs.map +0 -1
- package/dist/lib/chunk-KAOWUIFH.cjs.map +0 -1
- package/dist/lib/chunk-LTBRHAQ2.cjs.map +0 -1
- package/dist/lib/chunk-M2TB43VG.cjs.map +0 -1
- package/dist/lib/chunk-NFDRIBCM.js.map +0 -1
- package/dist/lib/chunk-PJKWY74P.js.map +0 -1
- package/dist/lib/chunk-QGJVGFY4.js.map +0 -1
- package/dist/lib/chunk-QSBORJCS.js.map +0 -1
- package/dist/lib/chunk-RY67J24J.js.map +0 -1
- package/dist/lib/chunk-SB3NFYXT.cjs.map +0 -1
- package/dist/lib/chunk-TJQEGHJA.cjs.map +0 -1
- package/dist/lib/chunk-TNCZYSNV.js.map +0 -1
- package/dist/lib/chunk-TZFBE35T.cjs.map +0 -1
- package/dist/lib/chunk-VANFTXBT.cjs.map +0 -1
- package/dist/lib/chunk-VRNWPH35.cjs.map +0 -1
- package/dist/lib/chunk-WDNYOFEH.js.map +0 -1
- package/dist/lib/chunk-XFIGAAKN.cjs.map +0 -1
- package/dist/lib/chunk-XHCRXNQ3.cjs.map +0 -1
- package/dist/lib/chunk-ZKYZWEHY.cjs.map +0 -1
- 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
|
-
*
|
|
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
|
-
|
|
436
|
+
id: string;
|
|
432
437
|
/**
|
|
433
|
-
*
|
|
438
|
+
* Additional metadata associated with the virtual file.
|
|
434
439
|
*/
|
|
435
|
-
|
|
436
|
-
}
|
|
437
|
-
interface VirtualBuiltinFile extends VirtualFile {
|
|
440
|
+
details: Record<string, PrimitiveJsonValue>;
|
|
438
441
|
/**
|
|
439
|
-
* The
|
|
442
|
+
* The variant of the file.
|
|
440
443
|
*
|
|
441
444
|
* @remarks
|
|
442
|
-
* This
|
|
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
|
-
|
|
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
|
|
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
|
|
499
|
+
* The underlying file metadata.
|
|
476
500
|
*/
|
|
477
|
-
|
|
501
|
+
meta: Record<string, VirtualFileSystemMetadata | undefined>;
|
|
478
502
|
/**
|
|
479
|
-
*
|
|
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
|
-
|
|
505
|
+
ids: Record<string, string>;
|
|
493
506
|
/**
|
|
494
|
-
* Check if a path or
|
|
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
|
|
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
|
|
511
|
+
* @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
|
|
499
512
|
*/
|
|
500
|
-
|
|
513
|
+
isVirtual: (pathOrId: string, options?: ResolvePathOptions) => boolean;
|
|
501
514
|
/**
|
|
502
|
-
* Check if a path
|
|
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
|
|
507
|
-
* @
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
535
|
+
isDirectory: (path: string) => boolean;
|
|
536
536
|
/**
|
|
537
|
-
*
|
|
537
|
+
* Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
|
|
538
538
|
*
|
|
539
|
-
* @
|
|
540
|
-
*
|
|
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
|
-
|
|
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
|
|
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: (
|
|
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
|
|
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: (
|
|
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
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
436
|
+
id: string;
|
|
432
437
|
/**
|
|
433
|
-
*
|
|
438
|
+
* Additional metadata associated with the virtual file.
|
|
434
439
|
*/
|
|
435
|
-
|
|
436
|
-
}
|
|
437
|
-
interface VirtualBuiltinFile extends VirtualFile {
|
|
440
|
+
details: Record<string, PrimitiveJsonValue>;
|
|
438
441
|
/**
|
|
439
|
-
* The
|
|
442
|
+
* The variant of the file.
|
|
440
443
|
*
|
|
441
444
|
* @remarks
|
|
442
|
-
* This
|
|
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
|
-
|
|
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
|
|
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
|
|
499
|
+
* The underlying file metadata.
|
|
476
500
|
*/
|
|
477
|
-
|
|
501
|
+
meta: Record<string, VirtualFileSystemMetadata | undefined>;
|
|
478
502
|
/**
|
|
479
|
-
*
|
|
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
|
-
|
|
505
|
+
ids: Record<string, string>;
|
|
493
506
|
/**
|
|
494
|
-
* Check if a path or
|
|
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
|
|
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
|
|
511
|
+
* @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
|
|
499
512
|
*/
|
|
500
|
-
|
|
513
|
+
isVirtual: (pathOrId: string, options?: ResolvePathOptions) => boolean;
|
|
501
514
|
/**
|
|
502
|
-
* Check if a path
|
|
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
|
|
507
|
-
* @
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
535
|
+
isDirectory: (path: string) => boolean;
|
|
536
536
|
/**
|
|
537
|
-
*
|
|
537
|
+
* Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
|
|
538
538
|
*
|
|
539
|
-
* @
|
|
540
|
-
*
|
|
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
|
-
|
|
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
|
|
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: (
|
|
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
|
|
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: (
|
|
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
|
-
*
|
|
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
|
-
|
|
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-
|
|
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-
|
|
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';
|