powerlines 0.24.8 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{api-C32Buv5_.d.ts → api-BTK8aYwE.d.cts} +1 -1
- package/dist/{api-wzd5AREv.d.cts → api-eyrYBmQh.d.ts} +1 -1
- package/dist/api.cjs +8 -6
- package/dist/api.d.cts +20 -22
- package/dist/api.d.ts +20 -22
- package/dist/api.js +7 -5
- package/dist/astro.cjs +12 -10
- package/dist/astro.d.cts +19 -21
- package/dist/astro.d.ts +19 -21
- package/dist/astro.js +10 -8
- package/dist/{chunk-JKBJF3UI.js → chunk-2MYPFASJ.js} +2 -0
- package/dist/chunk-2VIXD2XB.js +3 -0
- package/dist/{chunk-OB7MYWHE.js → chunk-44PO64SX.js} +4 -2
- package/dist/chunk-4JCNAKOE.cjs +4 -0
- package/dist/{chunk-QH4TS5V4.cjs → chunk-6MFZ436T.cjs} +978 -1032
- package/dist/chunk-6ZGIV2SU.cjs +4 -0
- package/dist/chunk-7BZQBW77.cjs +4 -0
- package/dist/{chunk-JQCWV4DT.js → chunk-7LKYXMB3.js} +2 -0
- package/dist/{chunk-SHUYVCID.js → chunk-7QVYU63E.js} +2 -0
- package/dist/chunk-AFJCY3R6.js +3 -0
- package/dist/chunk-AXIRZAL7.js +3 -0
- package/dist/chunk-BTNHSS2P.cjs +13 -0
- package/dist/{chunk-FQXHIKCM.cjs → chunk-C2U4ATHO.cjs} +9 -7
- package/dist/chunk-DFLNRC3B.cjs +4 -0
- package/dist/chunk-DS7OM4NX.cjs +4 -0
- package/dist/{chunk-W5X3ZEZ5.js → chunk-EBXVKPUX.js} +2 -0
- package/dist/{chunk-X74SYWFL.cjs → chunk-G2EHTXK6.cjs} +9 -7
- package/dist/chunk-GIE6OE3X.js +3 -0
- package/dist/chunk-HJW7OH6E.js +3 -0
- package/dist/{chunk-MOXO6WJO.js → chunk-HSIMIWOH.js} +3 -1
- package/dist/{chunk-5IBA5HC2.cjs → chunk-HTJKPEWU.cjs} +6 -4
- package/dist/chunk-IHUNA3MO.cjs +4 -0
- package/dist/chunk-JU2HWIWS.js +12 -0
- package/dist/{chunk-BCHFSOQ4.js → chunk-LQXE5JHF.js} +906 -957
- package/dist/chunk-MBBNZS6K.cjs +16 -0
- package/dist/{chunk-3TNZWTLG.js → chunk-NNADGQRN.js} +5 -3
- package/dist/chunk-OYASPHNL.js +3 -0
- package/dist/chunk-PCCFAZML.js +3 -0
- package/dist/{chunk-USNT2KNT.cjs → chunk-PK6SKIKE.cjs} +2 -0
- package/dist/{chunk-ETKZMGLN.cjs → chunk-PSTCR335.cjs} +2 -0
- package/dist/chunk-Q7EJVZVI.cjs +4 -0
- package/dist/{chunk-CJSGAITR.js → chunk-S7MXT5A2.js} +3 -1
- package/dist/{chunk-7RWEBVQC.cjs → chunk-SDVEUTY2.cjs} +13 -11
- package/dist/{chunk-OLCL34MI.js → chunk-SYDUPBME.js} +6 -4
- package/dist/chunk-TLHFXGYV.js +3 -0
- package/dist/chunk-TP5MEMLG.cjs +12 -0
- package/dist/chunk-VNRXLY2T.js +3 -0
- package/dist/chunk-VQCQRLGM.cjs +4 -0
- package/dist/chunk-XZO6ZJQP.cjs +4 -0
- package/dist/{chunk-XP7OML7S.cjs → chunk-YUX7LOBU.cjs} +2 -0
- package/dist/chunk-YZZUOOPS.cjs +4 -0
- package/dist/chunk-Z5H7LD6W.js +3 -0
- package/dist/{chunk-VBR53KGY.js → chunk-Z5UEYORO.js} +5 -3
- package/dist/{chunk-PAMSESZV.cjs → chunk-Z6ARQDHR.cjs} +2 -0
- package/dist/config.cjs +5 -3
- package/dist/config.d.cts +19 -21
- package/dist/config.d.ts +19 -21
- package/dist/config.js +4 -2
- package/dist/{resolved-CSqGKlA5.d.cts → context-TizkCfOv.d.cts} +848 -849
- package/dist/{resolved-BABoCnXm.d.ts → context-jhcT1Vi1.d.ts} +848 -849
- package/dist/esbuild.cjs +13 -11
- package/dist/esbuild.d.cts +19 -21
- package/dist/esbuild.d.ts +19 -21
- package/dist/esbuild.js +10 -8
- package/dist/farm.cjs +9 -7
- package/dist/farm.d.cts +19 -21
- package/dist/farm.d.ts +19 -21
- package/dist/farm.js +8 -6
- package/dist/index.cjs +39 -41
- package/dist/index.d.cts +30 -55
- package/dist/index.d.ts +30 -55
- package/dist/index.js +20 -18
- package/dist/lib/{api-CDUN9en8.d.ts → api-CCOhyMZo.d.cts} +1 -1
- package/dist/lib/{api-BRMITKt-.d.cts → api-CpJJXdtL.d.ts} +1 -1
- package/dist/lib/build/esbuild.cjs +5 -5
- package/dist/lib/build/esbuild.d.cts +2 -2
- package/dist/lib/build/esbuild.d.ts +2 -2
- package/dist/lib/build/esbuild.js +2 -2
- package/dist/lib/build/index.cjs +25 -25
- package/dist/lib/build/index.d.cts +4 -4
- package/dist/lib/build/index.d.ts +4 -4
- package/dist/lib/build/index.js +9 -9
- package/dist/lib/build/rolldown.cjs +3 -3
- package/dist/lib/build/rolldown.d.cts +2 -2
- package/dist/lib/build/rolldown.d.ts +2 -2
- package/dist/lib/build/rolldown.js +2 -2
- package/dist/lib/build/rollup.cjs +3 -3
- package/dist/lib/build/rollup.d.cts +2 -2
- package/dist/lib/build/rollup.d.ts +2 -2
- package/dist/lib/build/rollup.js +1 -1
- package/dist/lib/build/rspack.cjs +2 -2
- package/dist/lib/build/rspack.d.cts +2 -2
- package/dist/lib/build/rspack.d.ts +2 -2
- package/dist/lib/build/rspack.js +1 -1
- package/dist/lib/build/tsup.cjs +6 -6
- package/dist/lib/build/tsup.d.cts +2 -2
- package/dist/lib/build/tsup.d.ts +2 -2
- package/dist/lib/build/tsup.js +3 -3
- package/dist/lib/build/unbuild.cjs +5 -5
- package/dist/lib/build/unbuild.d.cts +4 -4
- package/dist/lib/build/unbuild.d.ts +4 -4
- package/dist/lib/build/unbuild.js +2 -2
- package/dist/lib/build/vite.cjs +5 -5
- package/dist/lib/build/vite.d.cts +2 -2
- package/dist/lib/build/vite.d.ts +2 -2
- package/dist/lib/build/vite.js +3 -3
- package/dist/lib/build/webpack.cjs +2 -2
- package/dist/lib/build/webpack.d.cts +2 -2
- package/dist/lib/build/webpack.d.ts +2 -2
- package/dist/lib/build/webpack.js +1 -1
- package/dist/lib/chunk-3T56KQ7U.cjs +49 -0
- package/dist/lib/{chunk-PZLO6FZW.js → chunk-3W53W5J2.js} +2 -2
- package/dist/lib/chunk-4W6WV35V.js +108 -0
- package/dist/lib/chunk-6OYSDQXE.cjs +139 -0
- package/dist/lib/{chunk-EV357RFB.cjs → chunk-7MHUTBEC.cjs} +1 -3
- package/dist/lib/{chunk-A2NFSQ5K.js → chunk-7OVZZWGY.js} +1 -1
- package/dist/lib/chunk-A2NW7WAN.js +47 -0
- package/dist/lib/chunk-D6MI2V6R.cjs +115 -0
- package/dist/lib/{chunk-VHLINWXG.js → chunk-DLVVEHMU.js} +1 -1
- package/dist/lib/{chunk-XLYMVIVD.cjs → chunk-DNQBXFNE.cjs} +10 -10
- package/dist/lib/{chunk-UGVHYKKN.js → chunk-DYLE5FD3.js} +39 -2
- package/dist/lib/{chunk-AKBAX4FH.js → chunk-EN52JYUK.js} +1 -1
- package/dist/lib/{chunk-JYDGFQIV.cjs → chunk-F2CXZUSB.cjs} +1 -1
- package/dist/lib/{chunk-7VJ42H2I.cjs → chunk-HRRI4KOM.cjs} +1 -3
- package/dist/lib/{chunk-LPRZ3HD4.cjs → chunk-IXTLRVAK.cjs} +3 -3
- package/dist/lib/{chunk-SYF7QG2J.js → chunk-J3BW52BU.js} +1 -1
- package/dist/lib/chunk-KFDNKOXM.js +56 -0
- package/dist/lib/chunk-L56XA427.js +137 -0
- package/dist/lib/{chunk-6PPZCPME.cjs → chunk-LOW2TIQ6.cjs} +2 -2
- package/dist/lib/{chunk-TMZCGC5U.js → chunk-MI55FDCZ.js} +1 -1
- package/dist/lib/{chunk-DUZJ7ZF2.cjs → chunk-MKKWFHGE.cjs} +2 -2
- package/dist/lib/{chunk-ISBHXSDH.cjs → chunk-N5XEKCVW.cjs} +1 -1
- package/dist/lib/{chunk-XZFEHPYE.js → chunk-N5YLKWC2.js} +1 -1
- package/dist/lib/chunk-NIRFKQAD.js +845 -0
- package/dist/lib/{chunk-YMHOAMCU.cjs → chunk-NLJR4WIX.cjs} +41 -4
- package/dist/lib/{chunk-L3HESXYF.cjs → chunk-NUE5DIH3.cjs} +3 -3
- package/dist/lib/chunk-OBA5U4Y2.js +1059 -0
- package/dist/lib/{chunk-FQLZZYYO.js → chunk-OEF6EHQV.js} +1 -3
- package/dist/lib/{chunk-WTTBXYFQ.js → chunk-OFXWRM3U.js} +2 -2
- package/dist/lib/chunk-ONETLSPO.js +85 -0
- package/dist/lib/{chunk-2OV26JXJ.cjs → chunk-PQRWG64T.cjs} +3 -3
- package/dist/lib/chunk-R33US3PV.cjs +1081 -0
- package/dist/lib/{chunk-OA7OL7HF.cjs → chunk-SFEEJZLK.cjs} +38 -66
- package/dist/lib/{chunk-H6EOZSIZ.js → chunk-TAVG226Z.js} +1 -1
- package/dist/lib/{chunk-DALRRHB4.cjs → chunk-TSFG3WEA.cjs} +1 -1
- package/dist/lib/{chunk-RMA2PMP7.cjs → chunk-TZCC5IWH.cjs} +3 -3
- package/dist/lib/chunk-VHCBD2IS.js +149 -0
- package/dist/lib/{chunk-HY6DNFCT.js → chunk-VODWHWD6.js} +2 -2
- package/dist/lib/{chunk-2X5DUDNT.js → chunk-W6GWSJ22.js} +2 -2
- package/dist/lib/chunk-WBSA6OG6.cjs +860 -0
- package/dist/lib/{chunk-TOCNXURI.cjs → chunk-WCXA5WFX.cjs} +4 -4
- package/dist/lib/{chunk-6I5PL7H2.js → chunk-WGSZ4X6N.js} +1 -3
- package/dist/lib/{chunk-T2KQZC5K.js → chunk-WLDQUTFD.js} +27 -54
- package/dist/lib/{chunk-AOHJEL2Q.js → chunk-WOKPJMGJ.js} +3 -3
- package/dist/lib/{chunk-TDJNFAOV.cjs → chunk-X6JDYLWM.cjs} +1 -1
- package/dist/lib/chunk-XLHFUATD.cjs +151 -0
- package/dist/lib/chunk-XUYQYUWZ.cjs +87 -0
- package/dist/lib/chunk-YYEAV24J.cjs +67 -0
- package/dist/lib/{config-D8KrE7SZ.d.cts → config-Cqxh4V21.d.cts} +58 -475
- package/dist/lib/{config-DBIFdRoq.d.ts → config-D-WwQL-4.d.ts} +58 -475
- package/dist/lib/config-file.d.cts +2 -2
- package/dist/lib/config-file.d.ts +2 -2
- package/dist/lib/contexts/api-context.cjs +12 -7
- package/dist/lib/contexts/api-context.d.cts +27 -4
- package/dist/lib/contexts/api-context.d.ts +27 -4
- package/dist/lib/contexts/api-context.js +11 -6
- package/dist/lib/contexts/context.cjs +10 -5
- package/dist/lib/contexts/context.d.cts +7 -7
- package/dist/lib/contexts/context.d.ts +7 -7
- package/dist/lib/contexts/context.js +9 -4
- package/dist/lib/contexts/environment-context.cjs +11 -6
- package/dist/lib/contexts/environment-context.d.cts +4 -4
- package/dist/lib/contexts/environment-context.d.ts +4 -4
- package/dist/lib/contexts/environment-context.js +10 -5
- package/dist/lib/contexts/index.cjs +14 -9
- package/dist/lib/contexts/index.d.cts +4 -4
- package/dist/lib/contexts/index.d.ts +4 -4
- package/dist/lib/contexts/index.js +11 -6
- package/dist/lib/contexts/plugin-context.d.cts +4 -4
- package/dist/lib/contexts/plugin-context.d.ts +4 -4
- package/dist/lib/entry.cjs +9 -9
- package/dist/lib/entry.d.cts +2 -2
- package/dist/lib/entry.d.ts +2 -2
- package/dist/lib/entry.js +1 -1
- package/dist/lib/fs/helpers.cjs +47 -0
- package/dist/lib/fs/helpers.d.cts +74 -0
- package/dist/lib/fs/helpers.d.ts +74 -0
- package/dist/lib/fs/helpers.js +2 -0
- package/dist/lib/fs/index.cjs +17 -0
- package/dist/lib/fs/index.d.cts +33 -0
- package/dist/lib/fs/index.d.ts +33 -0
- package/dist/lib/fs/index.js +8 -0
- package/dist/lib/fs/storage/base.cjs +11 -0
- package/dist/lib/fs/storage/base.d.cts +138 -0
- package/dist/lib/fs/storage/base.d.ts +138 -0
- package/dist/lib/fs/storage/base.js +2 -0
- package/dist/lib/fs/storage/file-system.cjs +13 -0
- package/dist/lib/fs/storage/file-system.d.cts +90 -0
- package/dist/lib/fs/storage/file-system.d.ts +90 -0
- package/dist/lib/fs/storage/file-system.js +4 -0
- package/dist/lib/fs/storage/index.cjs +22 -0
- package/dist/lib/fs/storage/index.d.cts +6 -0
- package/dist/lib/fs/storage/index.d.ts +6 -0
- package/dist/lib/fs/storage/index.js +5 -0
- package/dist/lib/fs/storage/virtual.cjs +12 -0
- package/dist/lib/fs/storage/virtual.d.cts +66 -0
- package/dist/lib/fs/storage/virtual.d.ts +66 -0
- package/dist/lib/fs/storage/virtual.js +3 -0
- package/dist/lib/fs/vfs.cjs +16 -0
- package/dist/lib/fs/vfs.d.cts +247 -0
- package/dist/lib/fs/vfs.d.ts +247 -0
- package/dist/lib/fs/vfs.js +7 -0
- package/dist/lib/fs-Dg-aTfiN.d.cts +378 -0
- package/dist/lib/fs-Dg-aTfiN.d.ts +378 -0
- package/dist/lib/index.cjs +62 -68
- package/dist/lib/index.d.cts +18 -356
- package/dist/lib/index.d.ts +18 -356
- package/dist/lib/index.js +19 -13
- package/dist/lib/{internal-CaGANOWK.d.cts → internal-Cl7s1iAA.d.cts} +2 -2
- package/dist/lib/{internal-1qCyw7bA.d.ts → internal-W5pvS6e9.d.ts} +2 -2
- package/dist/lib/logger.d.cts +2 -2
- package/dist/lib/logger.d.ts +2 -2
- package/dist/lib/typescript/import-transformer.cjs +7 -45
- package/dist/lib/typescript/import-transformer.d.cts +2 -2
- package/dist/lib/typescript/import-transformer.d.ts +2 -2
- package/dist/lib/typescript/import-transformer.js +2 -47
- package/dist/lib/typescript/index.cjs +10 -22
- package/dist/lib/typescript/index.d.cts +4 -4
- package/dist/lib/typescript/index.d.ts +4 -4
- package/dist/lib/typescript/index.js +2 -2
- package/dist/lib/typescript/ts-morph.cjs +6 -2
- package/dist/lib/typescript/ts-morph.d.cts +28 -4
- package/dist/lib/typescript/ts-morph.d.ts +28 -4
- package/dist/lib/typescript/ts-morph.js +1 -1
- package/dist/lib/unplugin/factory.cjs +14 -9
- package/dist/lib/unplugin/factory.d.cts +4 -4
- package/dist/lib/unplugin/factory.d.ts +4 -4
- package/dist/lib/unplugin/factory.js +13 -8
- package/dist/lib/unplugin/helpers.d.cts +2 -2
- package/dist/lib/unplugin/helpers.d.ts +2 -2
- package/dist/lib/unplugin/index.cjs +16 -11
- package/dist/lib/unplugin/index.d.cts +4 -4
- package/dist/lib/unplugin/index.d.ts +4 -4
- package/dist/lib/unplugin/index.js +14 -9
- package/dist/lib/unplugin/plugin.cjs +2 -2
- package/dist/lib/unplugin/plugin.d.cts +4 -4
- package/dist/lib/unplugin/plugin.d.ts +4 -4
- package/dist/lib/unplugin/plugin.js +1 -1
- package/dist/lib/{unplugin-CEeJqADD.d.ts → unplugin-Cg2NoKj0.d.ts} +2 -2
- package/dist/lib/{unplugin-bUSyjd0S.d.cts → unplugin-trF-VLnO.d.cts} +2 -2
- package/dist/lib/utilities/bundle.cjs +4 -4
- package/dist/lib/utilities/bundle.d.cts +2 -2
- package/dist/lib/utilities/bundle.d.ts +2 -2
- package/dist/lib/utilities/bundle.js +3 -3
- package/dist/lib/utilities/cache.d.cts +2 -2
- package/dist/lib/utilities/cache.d.ts +2 -2
- package/dist/lib/utilities/file-header.d.cts +2 -2
- package/dist/lib/utilities/file-header.d.ts +2 -2
- package/dist/lib/utilities/index.cjs +22 -22
- package/dist/lib/utilities/index.d.cts +2 -2
- package/dist/lib/utilities/index.d.ts +2 -2
- package/dist/lib/utilities/index.js +6 -6
- package/dist/lib/utilities/meta.cjs +7 -7
- package/dist/lib/utilities/meta.d.cts +2 -2
- package/dist/lib/utilities/meta.d.ts +2 -2
- package/dist/lib/utilities/meta.js +1 -1
- package/dist/lib/utilities/resolve.cjs +5 -5
- package/dist/lib/utilities/resolve.d.cts +2 -2
- package/dist/lib/utilities/resolve.d.ts +2 -2
- package/dist/lib/utilities/resolve.js +4 -4
- package/dist/lib/utilities/source-file.d.cts +2 -2
- package/dist/lib/utilities/source-file.d.ts +2 -2
- package/dist/lib/utilities/source-map.d.cts +2 -2
- package/dist/lib/utilities/source-map.d.ts +2 -2
- package/dist/lib/utilities/worker.d.cts +2 -2
- package/dist/lib/utilities/worker.d.ts +2 -2
- package/dist/lib/utilities/write-file.d.cts +2 -2
- package/dist/lib/utilities/write-file.d.ts +2 -2
- package/dist/next.cjs +11 -9
- package/dist/next.js +9 -7
- package/dist/nuxt.cjs +13 -11
- package/dist/nuxt.js +11 -9
- package/dist/plugin-utils/{chunk-JHTLGE4X.js → chunk-K2GWRZPV.js} +1 -1
- package/dist/plugin-utils/{chunk-HSYQWNIH.cjs → chunk-VWFJOPKC.cjs} +1 -1
- package/dist/plugin-utils/{context-BITGF5LZ.d.cts → context-PtfEjz3_.d.cts} +187 -230
- package/dist/plugin-utils/{context-BITGF5LZ.d.ts → context-PtfEjz3_.d.ts} +187 -230
- package/dist/plugin-utils/context-helpers.d.cts +1 -2
- package/dist/plugin-utils/context-helpers.d.ts +1 -2
- package/dist/plugin-utils/enforce.d.cts +1 -2
- package/dist/plugin-utils/enforce.d.ts +1 -2
- package/dist/plugin-utils/extend.d.cts +1 -2
- package/dist/plugin-utils/extend.d.ts +1 -2
- package/dist/plugin-utils/get-config-path.d.cts +1 -2
- package/dist/plugin-utils/get-config-path.d.ts +1 -2
- package/dist/plugin-utils/helpers.d.cts +1 -2
- package/dist/plugin-utils/helpers.d.ts +1 -2
- package/dist/plugin-utils/index.cjs +2 -2
- package/dist/plugin-utils/index.d.cts +1 -2
- package/dist/plugin-utils/index.d.ts +1 -2
- package/dist/plugin-utils/index.js +1 -1
- package/dist/plugin-utils/merge.d.cts +1 -2
- package/dist/plugin-utils/merge.d.ts +1 -2
- package/dist/plugin-utils/paths.cjs +2 -2
- package/dist/plugin-utils/paths.d.cts +2 -3
- package/dist/plugin-utils/paths.d.ts +2 -3
- package/dist/plugin-utils/paths.js +1 -1
- package/dist/rolldown.cjs +9 -7
- package/dist/rolldown.d.cts +19 -21
- package/dist/rolldown.d.ts +19 -21
- package/dist/rolldown.js +8 -6
- package/dist/rollup.cjs +9 -7
- package/dist/rollup.d.cts +19 -21
- package/dist/rollup.d.ts +19 -21
- package/dist/rollup.js +8 -6
- package/dist/rspack.cjs +9 -7
- package/dist/rspack.d.cts +18 -20
- package/dist/rspack.d.ts +18 -20
- package/dist/rspack.js +8 -6
- package/dist/tsup.cjs +12 -10
- package/dist/tsup.js +10 -8
- package/dist/types/api.cjs +3 -1
- package/dist/types/api.cjs.map +1 -0
- package/dist/types/api.d.cts +20 -22
- package/dist/types/api.d.ts +20 -22
- package/dist/types/api.js +3 -1
- package/dist/types/api.js.map +1 -0
- package/dist/types/babel.cjs +3 -1
- package/dist/types/babel.cjs.map +1 -0
- package/dist/types/babel.d.cts +17 -19
- package/dist/types/babel.d.ts +17 -19
- package/dist/types/babel.js +3 -1
- package/dist/types/babel.js.map +1 -0
- package/dist/types/build.cjs +3 -1
- package/dist/types/build.cjs.map +1 -0
- package/dist/types/build.js +3 -1
- package/dist/types/build.js.map +1 -0
- package/dist/types/commands.cjs +5 -3
- package/dist/types/commands.cjs.map +1 -0
- package/dist/types/commands.d.cts +18 -20
- package/dist/types/commands.d.ts +18 -20
- package/dist/types/commands.js +4 -2
- package/dist/types/commands.js.map +1 -0
- package/dist/types/config.cjs +3 -1
- package/dist/types/config.cjs.map +1 -0
- package/dist/types/config.d.cts +2 -4
- package/dist/types/config.d.ts +2 -4
- package/dist/types/config.js +3 -1
- package/dist/types/config.js.map +1 -0
- package/dist/types/context.cjs +5 -3
- package/dist/types/context.cjs.map +1 -0
- package/dist/types/context.d.cts +8 -10
- package/dist/types/context.d.ts +8 -10
- package/dist/types/context.js +4 -2
- package/dist/types/context.js.map +1 -0
- package/dist/types/fs.cjs +10 -4
- package/dist/types/fs.cjs.map +1 -0
- package/dist/types/fs.d.cts +138 -184
- package/dist/types/fs.d.ts +138 -184
- package/dist/types/fs.js +4 -2
- package/dist/types/fs.js.map +1 -0
- package/dist/types/hooks.cjs +3 -1
- package/dist/types/hooks.cjs.map +1 -0
- package/dist/types/hooks.d.cts +19 -21
- package/dist/types/hooks.d.ts +19 -21
- package/dist/types/hooks.js +3 -1
- package/dist/types/hooks.js.map +1 -0
- package/dist/types/index.cjs +26 -20
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.cts +13 -15
- package/dist/types/index.d.ts +13 -15
- package/dist/types/index.js +17 -15
- package/dist/types/index.js.map +1 -0
- package/dist/types/internal.cjs +2 -0
- package/dist/types/internal.cjs.map +1 -0
- package/dist/types/internal.d.cts +20 -22
- package/dist/types/internal.d.ts +20 -22
- package/dist/types/internal.js +2 -0
- package/dist/types/internal.js.map +1 -0
- package/dist/types/plugin.cjs +5 -3
- package/dist/types/plugin.cjs.map +1 -0
- package/dist/types/plugin.d.cts +9 -11
- package/dist/types/plugin.d.ts +9 -11
- package/dist/types/plugin.js +4 -2
- package/dist/types/plugin.js.map +1 -0
- package/dist/types/resolved.cjs +3 -1
- package/dist/types/resolved.cjs.map +1 -0
- package/dist/types/resolved.d.cts +7 -9
- package/dist/types/resolved.d.ts +7 -9
- package/dist/types/resolved.js +3 -1
- package/dist/types/resolved.js.map +1 -0
- package/dist/types/tsconfig.cjs +3 -1
- package/dist/types/tsconfig.cjs.map +1 -0
- package/dist/types/tsconfig.js +3 -1
- package/dist/types/tsconfig.js.map +1 -0
- package/dist/types/typedoc.cjs +3 -1
- package/dist/types/typedoc.cjs.map +1 -0
- package/dist/types/typedoc.js +3 -1
- package/dist/types/typedoc.js.map +1 -0
- package/dist/types/unplugin.cjs +3 -1
- package/dist/types/unplugin.cjs.map +1 -0
- package/dist/types/unplugin.d.cts +11 -13
- package/dist/types/unplugin.d.ts +11 -13
- package/dist/types/unplugin.js +3 -1
- package/dist/types/unplugin.js.map +1 -0
- package/dist/unloader.cjs +9 -7
- package/dist/unloader.d.cts +19 -21
- package/dist/unloader.d.ts +19 -21
- package/dist/unloader.js +8 -6
- package/dist/unplugin.cjs +20 -20
- package/dist/unplugin.d.cts +19 -21
- package/dist/unplugin.d.ts +19 -21
- package/dist/unplugin.js +10 -10
- package/dist/vite.cjs +13 -11
- package/dist/vite.d.cts +19 -21
- package/dist/vite.d.ts +19 -21
- package/dist/vite.js +10 -8
- package/dist/webpack.cjs +12 -10
- package/dist/webpack.d.cts +19 -21
- package/dist/webpack.d.ts +19 -21
- package/dist/webpack.js +9 -7
- package/package.json +72 -19
- package/schemas/fs.capnp +4 -59
- package/dist/chunk-2NO7N5OW.cjs +0 -2
- package/dist/chunk-7GYTTM4M.cjs +0 -2
- package/dist/chunk-AENPRFWJ.cjs +0 -2
- package/dist/chunk-AYKZK666.cjs +0 -8
- package/dist/chunk-BUR2JQ6G.cjs +0 -11
- package/dist/chunk-DRXFQCNC.js +0 -1
- package/dist/chunk-FNZDWE4L.js +0 -1
- package/dist/chunk-GHJU2KGP.cjs +0 -2
- package/dist/chunk-GRU7B3QM.cjs +0 -2
- package/dist/chunk-HQFZ64VC.cjs +0 -2
- package/dist/chunk-J4BQZHTQ.js +0 -1
- package/dist/chunk-JGB5YQ2U.js +0 -1
- package/dist/chunk-KALR2O2F.cjs +0 -2
- package/dist/chunk-LOUZXJFY.cjs +0 -10
- package/dist/chunk-OO3YXM72.js +0 -1
- package/dist/chunk-QE3WGMAP.js +0 -1
- package/dist/chunk-SMNKPH4T.js +0 -1
- package/dist/chunk-T2P533I5.js +0 -1
- package/dist/chunk-V3MLQDZQ.js +0 -1
- package/dist/chunk-VT7NVLLU.js +0 -5
- package/dist/chunk-YRJ4MLVL.cjs +0 -2
- package/dist/chunk-ZC43PZXS.cjs +0 -2
- package/dist/lib/chunk-3MZQ4MQX.cjs +0 -2360
- package/dist/lib/chunk-5JAFU45Z.js +0 -2324
- package/dist/lib/chunk-HAXL7QE7.js +0 -154
- package/dist/lib/chunk-SAS5EPBD.cjs +0 -107
- package/dist/lib/chunk-WUYK74EH.cjs +0 -165
- package/dist/lib/chunk-YQ3ODCHV.js +0 -105
- package/dist/lib/typescript/compiler-host.cjs +0 -164
- package/dist/lib/typescript/compiler-host.d.cts +0 -63
- package/dist/lib/typescript/compiler-host.d.ts +0 -63
- package/dist/lib/typescript/compiler-host.js +0 -156
- package/dist/lib/typescript/program.cjs +0 -27
- package/dist/lib/typescript/program.d.cts +0 -68
- package/dist/lib/typescript/program.d.ts +0 -68
- package/dist/lib/typescript/program.js +0 -2
- /package/dist/{chunk-2NCILNCH.cjs → lib/chunk-K2SFTPN3.cjs} +0 -0
- /package/dist/{chunk-BLNT5INX.js → lib/chunk-NQAHFTUW.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
2
|
-
import {
|
|
2
|
+
import { MaybePromise, NonUndefined, FunctionLike, DeepPartial as DeepPartial$1 } from '@stryke/types/base';
|
|
3
3
|
import { PackageJson } from '@stryke/types/package-json';
|
|
4
4
|
import { Jiti } from 'jiti';
|
|
5
5
|
import { SourceMap } from 'magic-string';
|
|
@@ -13,7 +13,6 @@ import { TypeDefinition, TypeDefinitionParameter } from '@stryke/types/configura
|
|
|
13
13
|
import { AssetGlob } from '@stryke/types/file';
|
|
14
14
|
import { ResolvedPreviewOptions, PreviewOptions } from 'vite';
|
|
15
15
|
import { ResolveOptions as ResolveOptions$1 } from '@stryke/fs/resolve';
|
|
16
|
-
import { StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
|
|
17
16
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
18
17
|
import ts from 'typescript';
|
|
19
18
|
import { ArrayValues } from '@stryke/types/array';
|
|
@@ -155,9 +154,107 @@ interface BuildConfig {
|
|
|
155
154
|
}
|
|
156
155
|
type BuildResolvedConfig = Omit<BuildConfig, "override">;
|
|
157
156
|
|
|
158
|
-
declare
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
declare enum StoragePreset {
|
|
158
|
+
VIRTUAL = "virtual",
|
|
159
|
+
FS = "fs"
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Interface defining the methods and properties for a storage adapter.
|
|
163
|
+
*/
|
|
164
|
+
interface StorageAdapter {
|
|
165
|
+
/**
|
|
166
|
+
* A name identifying the storage adapter type.
|
|
167
|
+
*/
|
|
168
|
+
name: string;
|
|
169
|
+
/**
|
|
170
|
+
* Checks if a key exists in the storage.
|
|
171
|
+
*
|
|
172
|
+
* @param key - The key to check for existence.
|
|
173
|
+
* @returns A promise that resolves to `true` if the key exists, otherwise `false`.
|
|
174
|
+
*/
|
|
175
|
+
exists: (key: string) => Promise<boolean>;
|
|
176
|
+
/**
|
|
177
|
+
* Synchronously checks if a key exists in the storage.
|
|
178
|
+
*
|
|
179
|
+
* @param key - The key to check for existence.
|
|
180
|
+
* @returns Returns `true` if the key exists, otherwise `false`.
|
|
181
|
+
*/
|
|
182
|
+
existsSync: (key: string) => boolean;
|
|
183
|
+
/**
|
|
184
|
+
* Read a value associated with a key from the storage.
|
|
185
|
+
*
|
|
186
|
+
* @param key - The key to read the value for.
|
|
187
|
+
* @returns A promise that resolves to the value if found, otherwise `null`.
|
|
188
|
+
*/
|
|
189
|
+
get: (key: string) => Promise<string | null>;
|
|
190
|
+
/**
|
|
191
|
+
* Synchronously reads the value associated with a key from the storage.
|
|
192
|
+
*
|
|
193
|
+
* @param key - The key to read the value for.
|
|
194
|
+
* @returns The value if found, otherwise `null`.
|
|
195
|
+
*/
|
|
196
|
+
getSync: (key: string) => string | null;
|
|
197
|
+
/**
|
|
198
|
+
* Writes a value to the storage for the given key.
|
|
199
|
+
*
|
|
200
|
+
* @param key - The key to associate the value with.
|
|
201
|
+
* @param value - The value to store.
|
|
202
|
+
*/
|
|
203
|
+
set: (key: string, value: string) => Promise<void>;
|
|
204
|
+
/**
|
|
205
|
+
* Synchronously writes a value to the storage for the given key.
|
|
206
|
+
*
|
|
207
|
+
* @param key - The key to associate the value with.
|
|
208
|
+
* @param value - The value to store.
|
|
209
|
+
*/
|
|
210
|
+
setSync: (key: string, value: string) => void;
|
|
211
|
+
/**
|
|
212
|
+
* Removes a value from the storage.
|
|
213
|
+
*
|
|
214
|
+
* @param key - The key whose value should be removed.
|
|
215
|
+
*/
|
|
216
|
+
remove: (key: string) => Promise<void>;
|
|
217
|
+
/**
|
|
218
|
+
* Synchronously removes a value from the storage.
|
|
219
|
+
*
|
|
220
|
+
* @param key - The key whose value should be removed.
|
|
221
|
+
*/
|
|
222
|
+
removeSync: (key: string) => void;
|
|
223
|
+
/**
|
|
224
|
+
* Remove all entries from the storage that match the provided base path.
|
|
225
|
+
*
|
|
226
|
+
* @param base - The base path or prefix to clear entries from.
|
|
227
|
+
*/
|
|
228
|
+
clear: (base?: string) => Promise<void>;
|
|
229
|
+
/**
|
|
230
|
+
* Synchronously remove all entries from the storage that match the provided base path.
|
|
231
|
+
*
|
|
232
|
+
* @param base - The base path or prefix to clear entries from.
|
|
233
|
+
*/
|
|
234
|
+
clearSync: (base?: string) => void;
|
|
235
|
+
/**
|
|
236
|
+
* Lists all keys under the provided base path.
|
|
237
|
+
*
|
|
238
|
+
* @param base - The base path or prefix to list keys from.
|
|
239
|
+
* @returns A promise resolving to the list of keys.
|
|
240
|
+
*/
|
|
241
|
+
list: (base?: string) => Promise<string[]>;
|
|
242
|
+
/**
|
|
243
|
+
* Synchronously lists all keys under the provided base path.
|
|
244
|
+
*
|
|
245
|
+
* @param base - The base path or prefix to list keys from.
|
|
246
|
+
* @returns The list of keys.
|
|
247
|
+
*/
|
|
248
|
+
listSync: (base?: string) => string[];
|
|
249
|
+
/**
|
|
250
|
+
* Releases any resources held by the storage adapter.
|
|
251
|
+
*/
|
|
252
|
+
dispose: () => MaybePromise<void>;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* A mapping of file paths to storage adapter names and their corresponding {@link StorageAdapter} instances.
|
|
256
|
+
*/
|
|
257
|
+
type StoragePort = Record<string, StorageAdapter>;
|
|
161
258
|
interface VirtualFileMetadata {
|
|
162
259
|
/**
|
|
163
260
|
* The identifier for the file data.
|
|
@@ -177,10 +274,6 @@ interface VirtualFileMetadata {
|
|
|
177
274
|
* - `normal`: Indicates that the file is a standard file without any special role.
|
|
178
275
|
*/
|
|
179
276
|
type: string;
|
|
180
|
-
/**
|
|
181
|
-
* The output mode of the file.
|
|
182
|
-
*/
|
|
183
|
-
mode: string;
|
|
184
277
|
/**
|
|
185
278
|
* Additional metadata associated with the file.
|
|
186
279
|
*/
|
|
@@ -202,16 +295,9 @@ interface VirtualFileData {
|
|
|
202
295
|
* This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
|
|
203
296
|
* - `builtin`: Indicates that the file is a built-in module provided by the system.
|
|
204
297
|
* - `entry`: Indicates that the file is an entry point for execution.
|
|
205
|
-
* - `chunk`: Indicates that the file is a code chunk, typically used in code-splitting scenarios.
|
|
206
|
-
* - `prebuilt-chunk`: Indicates that the file is a prebuilt code chunk.
|
|
207
|
-
* - `asset`: Indicates that the file is a static asset, such as an image or stylesheet.
|
|
208
298
|
* - `normal`: Indicates that the file is a standard file without any special role.
|
|
209
299
|
*/
|
|
210
300
|
type?: string;
|
|
211
|
-
/**
|
|
212
|
-
* The output mode of the file.
|
|
213
|
-
*/
|
|
214
|
-
mode?: string;
|
|
215
301
|
/**
|
|
216
302
|
* Additional metadata associated with the file.
|
|
217
303
|
*/
|
|
@@ -227,21 +313,18 @@ interface VirtualFile extends Required<VirtualFileData>, VirtualFileMetadata {
|
|
|
227
313
|
*/
|
|
228
314
|
timestamp: number;
|
|
229
315
|
}
|
|
230
|
-
interface
|
|
231
|
-
mode?: OutputModeType;
|
|
232
|
-
}
|
|
233
|
-
type MakeDirectoryOptions = (Mode | MakeDirectoryOptions$1) & ResolveFSOptions;
|
|
234
|
-
interface PowerlinesWriteFileOptions extends ResolveFSOptions {
|
|
316
|
+
interface WriteOptions {
|
|
235
317
|
/**
|
|
236
318
|
* Should the file skip formatting before being written?
|
|
237
319
|
*
|
|
238
320
|
* @defaultValue false
|
|
239
321
|
*/
|
|
240
322
|
skipFormat?: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* Additional metadata for the file.
|
|
325
|
+
*/
|
|
326
|
+
meta?: VirtualFileMetadata;
|
|
241
327
|
}
|
|
242
|
-
type NodeWriteFileOptions = WriteFileOptions$1;
|
|
243
|
-
type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
|
|
244
|
-
type WriteFileData = string | NodeJS.ArrayBufferView | VirtualFileData;
|
|
245
328
|
interface ResolveOptions extends ResolveOptions$1 {
|
|
246
329
|
/**
|
|
247
330
|
* If true, the module is being resolved as an entry point.
|
|
@@ -265,14 +348,6 @@ interface ResolveOptions extends ResolveOptions$1 {
|
|
|
265
348
|
skipNodeModulesBundle?: boolean;
|
|
266
349
|
}
|
|
267
350
|
interface VirtualFileSystemInterface {
|
|
268
|
-
/**
|
|
269
|
-
* Patches the File System to include the virtual file system (VFS) contents.
|
|
270
|
-
*/
|
|
271
|
-
[__VFS_PATCH__]: () => void;
|
|
272
|
-
/**
|
|
273
|
-
* Reverts the virtual file system (VFS) to its previous state.
|
|
274
|
-
*/
|
|
275
|
-
[__VFS_REVERT__]: () => void;
|
|
276
351
|
/**
|
|
277
352
|
* The underlying file metadata.
|
|
278
353
|
*/
|
|
@@ -285,208 +360,92 @@ interface VirtualFileSystemInterface {
|
|
|
285
360
|
* A map of module ids to their file paths.
|
|
286
361
|
*/
|
|
287
362
|
paths: Readonly<Record<string, string>>;
|
|
288
|
-
/**
|
|
289
|
-
* Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
|
|
290
|
-
*
|
|
291
|
-
* @param pathOrId - The path or id to check.
|
|
292
|
-
* @param importer - The importer path, if any.
|
|
293
|
-
* @param options - Optional parameters for resolving the path.
|
|
294
|
-
* @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
|
|
295
|
-
*/
|
|
296
|
-
isVirtual: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
|
|
297
|
-
/**
|
|
298
|
-
* Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
299
|
-
*
|
|
300
|
-
* @param pathOrId - The path or id to check.
|
|
301
|
-
* @param importer - The importer path, if any.
|
|
302
|
-
* @param options - Optional parameters for resolving the path.
|
|
303
|
-
* @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
304
|
-
*/
|
|
305
|
-
isPhysical: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
|
|
306
363
|
/**
|
|
307
364
|
* Checks if a file exists in the virtual file system (VFS).
|
|
308
365
|
*
|
|
309
|
-
* @param path - The path of the file
|
|
366
|
+
* @param path - The path or id of the file.
|
|
310
367
|
* @returns `true` if the file exists, otherwise `false`.
|
|
311
368
|
*/
|
|
312
|
-
|
|
369
|
+
exists: (path: string) => Promise<boolean>;
|
|
313
370
|
/**
|
|
314
|
-
* Checks if a
|
|
371
|
+
* Synchronously Checks if a file exists in the virtual file system (VFS).
|
|
315
372
|
*
|
|
316
|
-
* @param path - The path of the
|
|
317
|
-
* @returns `true` if the
|
|
373
|
+
* @param path - The path or id of the file.
|
|
374
|
+
* @returns `true` if the file exists, otherwise `false`.
|
|
318
375
|
*/
|
|
319
|
-
|
|
376
|
+
existsSync: (path: string) => boolean;
|
|
320
377
|
/**
|
|
321
|
-
* Checks if a file
|
|
378
|
+
* Checks if a file is virtual in the virtual file system (VFS).
|
|
322
379
|
*
|
|
323
|
-
* @param
|
|
324
|
-
* @returns `true` if the file
|
|
380
|
+
* @param path - The path or id of the file.
|
|
381
|
+
* @returns `true` if the file is virtual, otherwise `false`.
|
|
325
382
|
*/
|
|
326
|
-
|
|
383
|
+
isVirtual: (path: string) => boolean;
|
|
327
384
|
/**
|
|
328
385
|
* Gets the metadata of a file in the virtual file system (VFS).
|
|
329
386
|
*
|
|
330
|
-
* @param
|
|
387
|
+
* @param path - The path or id of the file.
|
|
331
388
|
* @returns The metadata of the file if it exists, otherwise undefined.
|
|
332
389
|
*/
|
|
333
|
-
getMetadata: (
|
|
334
|
-
/**
|
|
335
|
-
* Gets the stats of a file in the virtual file system (VFS).
|
|
336
|
-
*
|
|
337
|
-
* @param pathOrId - The path or id of the file.
|
|
338
|
-
* @param options - Optional parameters for getting the stats.
|
|
339
|
-
* @returns The stats of the file if it exists, otherwise undefined.
|
|
340
|
-
*/
|
|
341
|
-
lstat: (pathOrId: string, options?: StatSyncOptions & {
|
|
342
|
-
bigint?: false | undefined;
|
|
343
|
-
throwIfNoEntry: false;
|
|
344
|
-
}) => Promise<Stats>;
|
|
345
|
-
/**
|
|
346
|
-
* Gets the stats of a file in the virtual file system (VFS).
|
|
347
|
-
*
|
|
348
|
-
* @param pathOrId - The path or id of the file.
|
|
349
|
-
* @param options - Optional parameters for getting the stats.
|
|
350
|
-
* @returns The stats of the file if it exists, otherwise undefined.
|
|
351
|
-
*/
|
|
352
|
-
lstatSync: (pathOrId: string, options?: StatSyncOptions & {
|
|
353
|
-
bigint?: false | undefined;
|
|
354
|
-
throwIfNoEntry: false;
|
|
355
|
-
}) => Stats | undefined;
|
|
356
|
-
/**
|
|
357
|
-
* Gets the stats of a file in the virtual file system (VFS).
|
|
358
|
-
*
|
|
359
|
-
* @param pathOrId - The path or id of the file.
|
|
360
|
-
* @returns The stats of the file if it exists, otherwise false.
|
|
361
|
-
*/
|
|
362
|
-
stat: (pathOrId: string, options?: StatSyncOptions & {
|
|
363
|
-
bigint?: false | undefined;
|
|
364
|
-
throwIfNoEntry: false;
|
|
365
|
-
}) => Promise<Stats>;
|
|
366
|
-
/**
|
|
367
|
-
* Gets the stats of a file in the virtual file system (VFS).
|
|
368
|
-
*
|
|
369
|
-
* @param pathOrId - The path or id of the file.
|
|
370
|
-
* @returns The stats of the file if it exists, otherwise false.
|
|
371
|
-
*/
|
|
372
|
-
statSync: (pathOrId: string, options?: StatSyncOptions & {
|
|
373
|
-
bigint?: false | undefined;
|
|
374
|
-
throwIfNoEntry: false;
|
|
375
|
-
}) => Stats | undefined;
|
|
390
|
+
getMetadata: (path: string) => VirtualFileMetadata | undefined;
|
|
376
391
|
/**
|
|
377
392
|
* Lists files in a given path.
|
|
378
393
|
*
|
|
379
394
|
* @param path - The path to list files from.
|
|
380
|
-
* @param options - Options for listing files, such as encoding and recursion.
|
|
381
395
|
* @returns An array of file names in the specified path.
|
|
382
396
|
*/
|
|
383
|
-
|
|
384
|
-
encoding: BufferEncoding | null;
|
|
385
|
-
withFileTypes?: false | undefined;
|
|
386
|
-
recursive?: boolean | undefined;
|
|
387
|
-
} | BufferEncoding) => string[];
|
|
397
|
+
listSync: (path: string) => string[];
|
|
388
398
|
/**
|
|
389
399
|
* Lists files in a given path.
|
|
390
400
|
*
|
|
391
401
|
* @param path - The path to list files from.
|
|
392
|
-
* @param options - Options for listing files, such as encoding and recursion.
|
|
393
402
|
* @returns An array of file names in the specified path.
|
|
394
403
|
*/
|
|
395
|
-
|
|
396
|
-
encoding: BufferEncoding | null;
|
|
397
|
-
withFileTypes?: false | undefined;
|
|
398
|
-
recursive?: boolean | undefined;
|
|
399
|
-
} | BufferEncoding) => Promise<string[]>;
|
|
404
|
+
list: (path: string) => Promise<string[]>;
|
|
400
405
|
/**
|
|
401
406
|
* Removes a file or symbolic link in the virtual file system (VFS).
|
|
402
407
|
*
|
|
403
408
|
* @param path - The path to the file to remove.
|
|
404
409
|
* @returns A promise that resolves when the file is removed.
|
|
405
410
|
*/
|
|
406
|
-
|
|
411
|
+
removeSync: (path: string) => void;
|
|
407
412
|
/**
|
|
408
413
|
* Asynchronously removes a file or symbolic link in the virtual file system (VFS).
|
|
409
414
|
*
|
|
410
415
|
* @param path - The path to the file to remove.
|
|
411
416
|
* @returns A promise that resolves when the file is removed.
|
|
412
417
|
*/
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* Removes a directory in the virtual file system (VFS).
|
|
416
|
-
*
|
|
417
|
-
* @param path - The path to create the directory at.
|
|
418
|
-
* @param options - Options for creating the directory.
|
|
419
|
-
*/
|
|
420
|
-
rmdirSync: (path: string, options?: RmDirOptions & ResolveFSOptions) => any;
|
|
421
|
-
/**
|
|
422
|
-
* Removes a directory in the virtual file system (VFS).
|
|
423
|
-
*
|
|
424
|
-
* @param path - The path to create the directory at.
|
|
425
|
-
* @param options - Options for creating the directory.
|
|
426
|
-
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
427
|
-
*/
|
|
428
|
-
rmdir: (path: string, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
|
|
429
|
-
/**
|
|
430
|
-
* Removes a file or directory in the virtual file system (VFS).
|
|
431
|
-
*
|
|
432
|
-
* @param path - The path to the file or directory to remove.
|
|
433
|
-
* @param options - Options for removing the file or directory.
|
|
434
|
-
* @returns A promise that resolves when the file or directory is removed.
|
|
435
|
-
*/
|
|
436
|
-
rm: (path: string, options?: RmOptions & ResolveFSOptions) => Promise<void>;
|
|
437
|
-
/**
|
|
438
|
-
* Synchronously removes a file or directory in the virtual file system (VFS).
|
|
439
|
-
*
|
|
440
|
-
* @param path - The path to the file or directory to remove.
|
|
441
|
-
* @param options - Options for removing the file or directory.
|
|
442
|
-
*/
|
|
443
|
-
rmSync: (path: string, options?: RmOptions & ResolveFSOptions) => void;
|
|
444
|
-
/**
|
|
445
|
-
* Creates a directory in the virtual file system (VFS).
|
|
446
|
-
*
|
|
447
|
-
* @param path - The path to create the directory at.
|
|
448
|
-
* @param options - Options for creating the directory.
|
|
449
|
-
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
450
|
-
*/
|
|
451
|
-
mkdirSync: (path: string, options?: MakeDirectoryOptions) => string | undefined;
|
|
452
|
-
/**
|
|
453
|
-
* Creates a directory in the virtual file system (VFS).
|
|
454
|
-
*
|
|
455
|
-
* @param path - The path to create the directory at.
|
|
456
|
-
* @param options - Options for creating the directory.
|
|
457
|
-
* @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
|
|
458
|
-
*/
|
|
459
|
-
mkdir: (path: string, options?: MakeDirectoryOptions) => Promise<string | undefined>;
|
|
418
|
+
remove: (path: string) => Promise<void>;
|
|
460
419
|
/**
|
|
461
420
|
* Reads a file from the virtual file system (VFS).
|
|
462
421
|
*
|
|
463
|
-
* @param
|
|
422
|
+
* @param path - The path or id of the file.
|
|
464
423
|
* @returns The contents of the file if it exists, otherwise undefined.
|
|
465
424
|
*/
|
|
466
|
-
|
|
425
|
+
read: (path: string) => Promise<string | undefined>;
|
|
467
426
|
/**
|
|
468
427
|
* Reads a file from the virtual file system (VFS).
|
|
469
428
|
*
|
|
470
|
-
* @param
|
|
429
|
+
* @param path - The path or id of the file.
|
|
471
430
|
*/
|
|
472
|
-
|
|
431
|
+
readSync: (path: string) => string | undefined;
|
|
473
432
|
/**
|
|
474
433
|
* Writes a file to the virtual file system (VFS).
|
|
475
434
|
*
|
|
476
435
|
* @param path - The path to the file.
|
|
477
436
|
* @param data - The contents of the file.
|
|
478
|
-
* @param options -
|
|
437
|
+
* @param options - Options for writing the file.
|
|
479
438
|
* @returns A promise that resolves when the file is written.
|
|
480
439
|
*/
|
|
481
|
-
|
|
440
|
+
write: (path: string, data: string, options?: WriteOptions) => Promise<void>;
|
|
482
441
|
/**
|
|
483
442
|
* Writes a file to the virtual file system (VFS).
|
|
484
443
|
*
|
|
485
444
|
* @param path - The path to the file.
|
|
486
445
|
* @param data - The contents of the file.
|
|
487
|
-
* @param options -
|
|
446
|
+
* @param options - Options for writing the file.
|
|
488
447
|
*/
|
|
489
|
-
|
|
448
|
+
writeSync: (path: string, data: string, options?: WriteOptions) => void;
|
|
490
449
|
/**
|
|
491
450
|
* Moves a file from one path to another in the virtual file system (VFS).
|
|
492
451
|
*
|
|
@@ -529,13 +488,6 @@ interface VirtualFileSystemInterface {
|
|
|
529
488
|
* @returns An array of file paths matching the provided pattern(s)
|
|
530
489
|
*/
|
|
531
490
|
globSync: (pattern: string | string[]) => string[];
|
|
532
|
-
/**
|
|
533
|
-
* Resolves a path or id to a file path in the virtual file system.
|
|
534
|
-
*
|
|
535
|
-
* @param pathOrId - The path or id of the file to resolve.
|
|
536
|
-
* @returns The resolved path of the file if it exists, otherwise false.
|
|
537
|
-
*/
|
|
538
|
-
realpathSync: (pathOrId: string) => string;
|
|
539
491
|
/**
|
|
540
492
|
* A helper function to resolve modules using the Jiti resolver
|
|
541
493
|
*
|
|
@@ -589,7 +541,7 @@ interface ResolvedEntryTypeDefinition extends TypeDefinition {
|
|
|
589
541
|
*/
|
|
590
542
|
output?: string;
|
|
591
543
|
}
|
|
592
|
-
type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "
|
|
544
|
+
type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "ssr">> & {
|
|
593
545
|
/**
|
|
594
546
|
* The name of the environment
|
|
595
547
|
*/
|
|
@@ -600,9 +552,9 @@ type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "
|
|
|
600
552
|
preview?: ResolvedPreviewOptions;
|
|
601
553
|
};
|
|
602
554
|
type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
|
|
603
|
-
type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
|
|
555
|
+
type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> & {
|
|
604
556
|
assets: ResolvedAssetGlob[];
|
|
605
|
-
}>;
|
|
557
|
+
}> & Pick<OutputConfig, "storage">;
|
|
606
558
|
/**
|
|
607
559
|
* The resolved options for the Powerlines project configuration.
|
|
608
560
|
*/
|
|
@@ -997,13 +949,16 @@ interface OutputConfig {
|
|
|
997
949
|
*
|
|
998
950
|
* @defaultValue "\{projectRoot\}/dist"
|
|
999
951
|
*/
|
|
1000
|
-
|
|
952
|
+
buildPath?: string;
|
|
1001
953
|
/**
|
|
1002
|
-
* The
|
|
954
|
+
* The folder where the generated runtime artifacts will be located
|
|
1003
955
|
*
|
|
1004
|
-
* @
|
|
956
|
+
* @remarks
|
|
957
|
+
* This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
|
|
958
|
+
*
|
|
959
|
+
* @defaultValue "\{projectRoot\}/.powerlines"
|
|
1005
960
|
*/
|
|
1006
|
-
|
|
961
|
+
artifactsPath?: string;
|
|
1007
962
|
/**
|
|
1008
963
|
* The path of the generated runtime declaration file relative to the workspace root.
|
|
1009
964
|
*
|
|
@@ -1019,15 +974,6 @@ interface OutputConfig {
|
|
|
1019
974
|
* @defaultValue "powerlines"
|
|
1020
975
|
*/
|
|
1021
976
|
builtinPrefix?: string;
|
|
1022
|
-
/**
|
|
1023
|
-
* The folder where the generated runtime artifacts will be located
|
|
1024
|
-
*
|
|
1025
|
-
* @remarks
|
|
1026
|
-
* This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
|
|
1027
|
-
*
|
|
1028
|
-
* @defaultValue "\{projectRoot\}/.powerlines"
|
|
1029
|
-
*/
|
|
1030
|
-
artifactsFolder?: string;
|
|
1031
977
|
/**
|
|
1032
978
|
* The module format of the output files
|
|
1033
979
|
*
|
|
@@ -1044,42 +990,21 @@ interface OutputConfig {
|
|
|
1044
990
|
* The assets can be specified as a string (path to the asset) or as an object with a `glob` property (to match multiple files). The paths are relative to the project root directory.
|
|
1045
991
|
*/
|
|
1046
992
|
assets?: Array<string | AssetGlob>;
|
|
1047
|
-
}
|
|
1048
|
-
interface BaseConfig {
|
|
1049
|
-
/**
|
|
1050
|
-
* The name of the project
|
|
1051
|
-
*/
|
|
1052
|
-
name?: string;
|
|
1053
|
-
/**
|
|
1054
|
-
* The project display title
|
|
1055
|
-
*
|
|
1056
|
-
* @remarks
|
|
1057
|
-
* This option is used in documentation generation and other places where a human-readable title is needed.
|
|
1058
|
-
*/
|
|
1059
|
-
title?: string;
|
|
1060
993
|
/**
|
|
1061
|
-
* A
|
|
994
|
+
* A string preset or a custom {@link StoragePort} to provide fine-grained control over generated/output file storage.
|
|
1062
995
|
*
|
|
1063
996
|
* @remarks
|
|
1064
|
-
* If
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
/**
|
|
1068
|
-
* The log level to use for the Powerlines processes.
|
|
997
|
+
* If a string preset is provided, it must be one of the following values:
|
|
998
|
+
* - `"virtual"`: Uses the local file system for storage.
|
|
999
|
+
* - `"fs"`: Uses an in-memory virtual file system for storage.
|
|
1069
1000
|
*
|
|
1070
|
-
* @
|
|
1071
|
-
*/
|
|
1072
|
-
logLevel?: LogLevelLabel | null;
|
|
1073
|
-
/**
|
|
1074
|
-
* A custom logger function to use for logging messages
|
|
1075
|
-
*/
|
|
1076
|
-
customLogger?: LogFn;
|
|
1077
|
-
/**
|
|
1078
|
-
* Explicitly set a mode to run in. This mode will be used at various points throughout the Powerlines processes, such as when compiling the source code.
|
|
1001
|
+
* If a custom {@link StoragePort} is provided, it will be used for all file storage operations during the build process.
|
|
1079
1002
|
*
|
|
1080
|
-
* @defaultValue "
|
|
1003
|
+
* @defaultValue "virtual"
|
|
1081
1004
|
*/
|
|
1082
|
-
|
|
1005
|
+
storage?: StoragePort | StoragePreset;
|
|
1006
|
+
}
|
|
1007
|
+
interface BaseConfig {
|
|
1083
1008
|
/**
|
|
1084
1009
|
* The entry point(s) for the application
|
|
1085
1010
|
*/
|
|
@@ -1163,6 +1088,40 @@ interface EnvironmentConfig extends BaseConfig {
|
|
|
1163
1088
|
consumer?: "client" | "server";
|
|
1164
1089
|
}
|
|
1165
1090
|
interface CommonUserConfig extends BaseConfig {
|
|
1091
|
+
/**
|
|
1092
|
+
* The name of the project
|
|
1093
|
+
*/
|
|
1094
|
+
name?: string;
|
|
1095
|
+
/**
|
|
1096
|
+
* The project display title
|
|
1097
|
+
*
|
|
1098
|
+
* @remarks
|
|
1099
|
+
* This option is used in documentation generation and other places where a human-readable title is needed.
|
|
1100
|
+
*/
|
|
1101
|
+
title?: string;
|
|
1102
|
+
/**
|
|
1103
|
+
* A description of the project
|
|
1104
|
+
*
|
|
1105
|
+
* @remarks
|
|
1106
|
+
* If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
|
|
1107
|
+
*/
|
|
1108
|
+
description?: string;
|
|
1109
|
+
/**
|
|
1110
|
+
* The log level to use for the Powerlines processes.
|
|
1111
|
+
*
|
|
1112
|
+
* @defaultValue "info"
|
|
1113
|
+
*/
|
|
1114
|
+
logLevel?: LogLevelLabel | null;
|
|
1115
|
+
/**
|
|
1116
|
+
* A custom logger function to use for logging messages
|
|
1117
|
+
*/
|
|
1118
|
+
customLogger?: LogFn;
|
|
1119
|
+
/**
|
|
1120
|
+
* Explicitly set a mode to run in. This mode will be used at various points throughout the Powerlines processes, such as when compiling the source code.
|
|
1121
|
+
*
|
|
1122
|
+
* @defaultValue "production"
|
|
1123
|
+
*/
|
|
1124
|
+
mode?: "development" | "test" | "production";
|
|
1166
1125
|
/**
|
|
1167
1126
|
* The type of project being built
|
|
1168
1127
|
*
|
|
@@ -1213,7 +1172,7 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
1213
1172
|
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
1214
1173
|
*
|
|
1215
1174
|
* @remarks
|
|
1216
|
-
* If no values are provided for {@link OutputConfig.dts | output.dts}, {@link OutputConfig.builtinPrefix | output.builtinPrefix}, or {@link OutputConfig.
|
|
1175
|
+
* If no values are provided for {@link OutputConfig.dts | output.dts}, {@link OutputConfig.builtinPrefix | output.builtinPrefix}, or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
|
|
1217
1176
|
*
|
|
1218
1177
|
* @defaultValue "powerlines"
|
|
1219
1178
|
*/
|
|
@@ -1469,17 +1428,15 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1469
1428
|
* @param code - The source code of the builtin file
|
|
1470
1429
|
* @param id - The unique identifier of the builtin file
|
|
1471
1430
|
* @param path - An optional path to write the builtin file to
|
|
1472
|
-
* @param options - Options for writing the file
|
|
1473
1431
|
*/
|
|
1474
|
-
emitBuiltin: (code: string, id: string, path?: string
|
|
1432
|
+
emitBuiltin: (code: string, id: string, path?: string) => Promise<void>;
|
|
1475
1433
|
/**
|
|
1476
1434
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
1477
1435
|
*
|
|
1478
1436
|
* @param code - The source code of the entry file
|
|
1479
1437
|
* @param path - An optional path to write the entry file to
|
|
1480
|
-
* @param options - Options for writing the file
|
|
1481
1438
|
*/
|
|
1482
|
-
emitEntry: (code: string, path: string
|
|
1439
|
+
emitEntry: (code: string, path: string) => Promise<void>;
|
|
1483
1440
|
/**
|
|
1484
1441
|
* A function to update the context fields using a new user configuration options
|
|
1485
1442
|
*/
|