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,154 +0,0 @@
|
|
|
1
|
-
import { __name } from './chunk-SHUYVCID.js';
|
|
2
|
-
import { listFiles } from '@stryke/fs/list-files';
|
|
3
|
-
import { readFile } from '@stryke/fs/read-file';
|
|
4
|
-
import { resolvePackage } from '@stryke/fs/resolve';
|
|
5
|
-
import { findFileName } from '@stryke/path/file-path-fns';
|
|
6
|
-
import { joinPaths } from '@stryke/path/join-paths';
|
|
7
|
-
import defu from 'defu';
|
|
8
|
-
import { minimatch } from 'minimatch';
|
|
9
|
-
import ts from 'typescript';
|
|
10
|
-
|
|
11
|
-
var SourcesMap = Map;
|
|
12
|
-
async function loadLibFiles() {
|
|
13
|
-
const libLocation = await resolvePackage("typescript");
|
|
14
|
-
if (!libLocation) {
|
|
15
|
-
throw new Error("Could not resolve TypeScript package location.");
|
|
16
|
-
}
|
|
17
|
-
const libFiles = await listFiles(joinPaths(libLocation, "lib", "**", "lib.*.d.ts"));
|
|
18
|
-
if (libFiles.length === 0) {
|
|
19
|
-
throw new Error("No TypeScript library files found.");
|
|
20
|
-
}
|
|
21
|
-
const lib = /* @__PURE__ */ new Map();
|
|
22
|
-
for (const file of libFiles) {
|
|
23
|
-
lib.set(`/node_modules/typescript/lib/${findFileName(file)}`, await readFile(file));
|
|
24
|
-
}
|
|
25
|
-
return lib;
|
|
26
|
-
}
|
|
27
|
-
__name(loadLibFiles, "loadLibFiles");
|
|
28
|
-
function getDefaultCompilerOptions() {
|
|
29
|
-
return {
|
|
30
|
-
...ts.getDefaultCompilerOptions(),
|
|
31
|
-
jsx: ts.JsxEmit.React,
|
|
32
|
-
strict: true,
|
|
33
|
-
esModuleInterop: true,
|
|
34
|
-
module: ts.ModuleKind.ESNext,
|
|
35
|
-
suppressOutputPathCheck: true,
|
|
36
|
-
skipLibCheck: true,
|
|
37
|
-
skipDefaultLibCheck: true,
|
|
38
|
-
moduleResolution: ts.ModuleResolutionKind.Node10
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
__name(getDefaultCompilerOptions, "getDefaultCompilerOptions");
|
|
42
|
-
async function createVirtualProgram(rootNames, context, compilerOptions = {}) {
|
|
43
|
-
const options = defu(compilerOptions, getDefaultCompilerOptions());
|
|
44
|
-
const host = {
|
|
45
|
-
name: "storm-vfs",
|
|
46
|
-
root: context.workspaceConfig.workspaceRoot,
|
|
47
|
-
...ts.sys,
|
|
48
|
-
realpath: /* @__PURE__ */ __name((path) => {
|
|
49
|
-
if (context.fs.existsSync(path)) {
|
|
50
|
-
return context.fs.resolveSync(path);
|
|
51
|
-
}
|
|
52
|
-
return ts.sys.realpath?.(path) ?? path;
|
|
53
|
-
}, "realpath"),
|
|
54
|
-
getCurrentDirectory() {
|
|
55
|
-
return context.workspaceConfig.workspaceRoot;
|
|
56
|
-
},
|
|
57
|
-
getCanonicalFileName(fileName) {
|
|
58
|
-
return fileName;
|
|
59
|
-
},
|
|
60
|
-
getDefaultLibFileName(_options) {
|
|
61
|
-
return ts.getDefaultLibFileName(options);
|
|
62
|
-
},
|
|
63
|
-
getDefaultLibLocation() {
|
|
64
|
-
return "/";
|
|
65
|
-
},
|
|
66
|
-
getNewLine() {
|
|
67
|
-
return "\n";
|
|
68
|
-
},
|
|
69
|
-
useCaseSensitiveFileNames() {
|
|
70
|
-
return true;
|
|
71
|
-
},
|
|
72
|
-
fileExists(fileName) {
|
|
73
|
-
return context.fs.existsSync(fileName);
|
|
74
|
-
},
|
|
75
|
-
readFile(fileName) {
|
|
76
|
-
if (context.fs.existsSync(fileName)) {
|
|
77
|
-
return context.fs.readFileSync(fileName);
|
|
78
|
-
}
|
|
79
|
-
return void 0;
|
|
80
|
-
},
|
|
81
|
-
readDirectory: /* @__PURE__ */ __name((path, extensions = [], exclude = [], include = []) => {
|
|
82
|
-
let results = [];
|
|
83
|
-
if (context.fs.existsSync(path)) {
|
|
84
|
-
results = context.fs.readdirSync(path, {
|
|
85
|
-
encoding: "utf8",
|
|
86
|
-
recursive: true
|
|
87
|
-
});
|
|
88
|
-
if (extensions.length > 0) {
|
|
89
|
-
results = results.filter((file) => extensions.some((ext) => file.endsWith(ext.startsWith(".") ? ext : `.${ext}`)));
|
|
90
|
-
}
|
|
91
|
-
if (exclude.length > 0) {
|
|
92
|
-
results = results.filter((file) => !exclude.some((pattern) => minimatch(file, pattern)));
|
|
93
|
-
}
|
|
94
|
-
if (include.length > 0) {
|
|
95
|
-
results = results.filter((file) => include.some((pattern) => minimatch(file, pattern)));
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return results;
|
|
99
|
-
}, "readDirectory"),
|
|
100
|
-
writeFile(fileName, data) {
|
|
101
|
-
context.fs.writeFileSync(fileName, data);
|
|
102
|
-
},
|
|
103
|
-
resolvePath: /* @__PURE__ */ __name((fileName) => {
|
|
104
|
-
if (context.fs.existsSync(fileName)) {
|
|
105
|
-
return context.fs.resolveSync(fileName);
|
|
106
|
-
}
|
|
107
|
-
return ts.sys.resolvePath(fileName);
|
|
108
|
-
}, "resolvePath"),
|
|
109
|
-
getSourceFile(fileName, languageVersionOrOptions, _, shouldCreateNewSourceFile) {
|
|
110
|
-
if (context.fs.existsSync(fileName)) {
|
|
111
|
-
return ts.createSourceFile(fileName, context.fs.readFileSync(fileName), languageVersionOrOptions ?? compilerOptions.target ?? getDefaultCompilerOptions().target, false);
|
|
112
|
-
} else if (shouldCreateNewSourceFile) {
|
|
113
|
-
const sourceFile = ts.createSourceFile(fileName, "", languageVersionOrOptions ?? compilerOptions.target ?? getDefaultCompilerOptions().target, false);
|
|
114
|
-
context.fs.writeFileSync(fileName, sourceFile.text);
|
|
115
|
-
return sourceFile;
|
|
116
|
-
}
|
|
117
|
-
return void 0;
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
return ts.createProgram(rootNames, options, host);
|
|
121
|
-
}
|
|
122
|
-
__name(createVirtualProgram, "createVirtualProgram");
|
|
123
|
-
function createVirtualCompilerHost(context, sys, compilerOptions) {
|
|
124
|
-
return {
|
|
125
|
-
compilerHost: {
|
|
126
|
-
...sys,
|
|
127
|
-
getCanonicalFileName: /* @__PURE__ */ __name((fileName) => fileName, "getCanonicalFileName"),
|
|
128
|
-
getDefaultLibFileName: /* @__PURE__ */ __name(() => `/${ts.getDefaultLibFileName(compilerOptions)}`, "getDefaultLibFileName"),
|
|
129
|
-
// getDefaultLibLocation: () => '/',
|
|
130
|
-
getNewLine: /* @__PURE__ */ __name(() => sys.newLine, "getNewLine"),
|
|
131
|
-
getSourceFile: /* @__PURE__ */ __name((fileName, languageVersionOrOptions) => {
|
|
132
|
-
const resolved = context.fs.resolveSync(fileName);
|
|
133
|
-
if (resolved && context.fs.existsSync(resolved)) {
|
|
134
|
-
return context.fs.readFileSync(resolved);
|
|
135
|
-
}
|
|
136
|
-
return ts.createSourceFile(fileName, sys.readFile(fileName), languageVersionOrOptions ?? compilerOptions.target, false);
|
|
137
|
-
}, "getSourceFile"),
|
|
138
|
-
useCaseSensitiveFileNames: /* @__PURE__ */ __name(() => sys.useCaseSensitiveFileNames, "useCaseSensitiveFileNames")
|
|
139
|
-
},
|
|
140
|
-
updateFile: /* @__PURE__ */ __name((sourceFile) => {
|
|
141
|
-
const alreadyExists = context.fs.existsSync(sourceFile.fileName);
|
|
142
|
-
sys.writeFile(sourceFile.fileName, sourceFile.text);
|
|
143
|
-
return alreadyExists;
|
|
144
|
-
}, "updateFile"),
|
|
145
|
-
deleteFile: /* @__PURE__ */ __name((sourceFile) => {
|
|
146
|
-
const alreadyExists = context.fs.existsSync(sourceFile.fileName);
|
|
147
|
-
sys.deleteFile(sourceFile.fileName);
|
|
148
|
-
return alreadyExists;
|
|
149
|
-
}, "deleteFile")
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
__name(createVirtualCompilerHost, "createVirtualCompilerHost");
|
|
153
|
-
|
|
154
|
-
export { SourcesMap, createVirtualCompilerHost, createVirtualProgram, getDefaultCompilerOptions, loadLibFiles };
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
4
|
-
var join = require('@stryke/path/join');
|
|
5
|
-
var tsMorph = require('ts-morph');
|
|
6
|
-
|
|
7
|
-
var VirtualFileSystemHost = class VirtualFileSystemHost2 extends tsMorph.InMemoryFileSystemHost {
|
|
8
|
-
static {
|
|
9
|
-
chunkUSNT2KNT_cjs.__name(this, "VirtualFileSystemHost");
|
|
10
|
-
}
|
|
11
|
-
#fs;
|
|
12
|
-
constructor(fs) {
|
|
13
|
-
super();
|
|
14
|
-
this.#fs = fs;
|
|
15
|
-
}
|
|
16
|
-
deleteSync(path) {
|
|
17
|
-
this.#fs.rmSync(path);
|
|
18
|
-
}
|
|
19
|
-
readDirSync(dirPath) {
|
|
20
|
-
return this.#fs.readdirSync(dirPath).reduce((ret, entry) => {
|
|
21
|
-
const fullPath = this.#fs.resolveSync(join.joinPaths(dirPath, entry));
|
|
22
|
-
if (fullPath) {
|
|
23
|
-
ret.push({
|
|
24
|
-
name: entry,
|
|
25
|
-
isDirectory: this.#fs.isDirectory(fullPath),
|
|
26
|
-
isFile: this.#fs.isFile(fullPath),
|
|
27
|
-
isSymlink: false
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
return ret;
|
|
31
|
-
}, []);
|
|
32
|
-
}
|
|
33
|
-
async readFile(filePath) {
|
|
34
|
-
if (!this.#fs.existsSync(filePath)) {
|
|
35
|
-
throw new Error(`File not found: '${filePath}'. Please check the path and try again.`);
|
|
36
|
-
}
|
|
37
|
-
return await this.#fs.readFile(filePath);
|
|
38
|
-
}
|
|
39
|
-
readFileSync(filePath) {
|
|
40
|
-
if (!this.#fs.existsSync(filePath)) {
|
|
41
|
-
throw new Error(`File not found: '${filePath}'. Please check the path and try again.`);
|
|
42
|
-
}
|
|
43
|
-
return this.#fs.readFileSync(filePath);
|
|
44
|
-
}
|
|
45
|
-
async writeFile(filePath, fileText) {
|
|
46
|
-
return this.#fs.writeFile(filePath, fileText);
|
|
47
|
-
}
|
|
48
|
-
writeFileSync(filePath, fileText) {
|
|
49
|
-
this.#fs.writeFileSync(filePath, fileText);
|
|
50
|
-
}
|
|
51
|
-
async mkdir(dirPath) {
|
|
52
|
-
await this.#fs.mkdir(dirPath);
|
|
53
|
-
}
|
|
54
|
-
mkdirSync(dirPath) {
|
|
55
|
-
this.#fs.mkdirSync(dirPath);
|
|
56
|
-
}
|
|
57
|
-
async move(srcPath, destPath) {
|
|
58
|
-
await this.#fs.move(srcPath, destPath);
|
|
59
|
-
}
|
|
60
|
-
moveSync(srcPath, destPath) {
|
|
61
|
-
this.#fs.moveSync(srcPath, destPath);
|
|
62
|
-
}
|
|
63
|
-
async copy(srcPath, destPath) {
|
|
64
|
-
await this.#fs.copy(srcPath, destPath);
|
|
65
|
-
}
|
|
66
|
-
copySync(srcPath, destPath) {
|
|
67
|
-
this.#fs.copySync(srcPath, destPath);
|
|
68
|
-
}
|
|
69
|
-
async fileExists(filePath) {
|
|
70
|
-
return this.#fs.isFile(filePath);
|
|
71
|
-
}
|
|
72
|
-
fileExistsSync(filePath) {
|
|
73
|
-
return this.#fs.isFile(filePath);
|
|
74
|
-
}
|
|
75
|
-
async directoryExists(dirPath) {
|
|
76
|
-
return this.#fs.isDirectory(dirPath);
|
|
77
|
-
}
|
|
78
|
-
directoryExistsSync(dirPath) {
|
|
79
|
-
return this.#fs.isDirectory(dirPath);
|
|
80
|
-
}
|
|
81
|
-
realpathSync(path) {
|
|
82
|
-
return this.#fs.resolveSync(path) || path;
|
|
83
|
-
}
|
|
84
|
-
getCurrentDirectory() {
|
|
85
|
-
return "/";
|
|
86
|
-
}
|
|
87
|
-
async glob(patterns) {
|
|
88
|
-
return this.#fs.glob(patterns);
|
|
89
|
-
}
|
|
90
|
-
globSync(patterns) {
|
|
91
|
-
return this.#fs.globSync(patterns);
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
function createProgram(context, override) {
|
|
95
|
-
const project = new tsMorph.Project({
|
|
96
|
-
compilerOptions: {
|
|
97
|
-
...context.tsconfig.options
|
|
98
|
-
},
|
|
99
|
-
tsConfigFilePath: context.tsconfig.tsconfigFilePath,
|
|
100
|
-
fileSystem: new VirtualFileSystemHost(context.fs),
|
|
101
|
-
...override
|
|
102
|
-
});
|
|
103
|
-
return project;
|
|
104
|
-
}
|
|
105
|
-
chunkUSNT2KNT_cjs.__name(createProgram, "createProgram");
|
|
106
|
-
|
|
107
|
-
exports.createProgram = createProgram;
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
4
|
-
var listFiles = require('@stryke/fs/list-files');
|
|
5
|
-
var readFile = require('@stryke/fs/read-file');
|
|
6
|
-
var resolve = require('@stryke/fs/resolve');
|
|
7
|
-
var filePathFns = require('@stryke/path/file-path-fns');
|
|
8
|
-
var joinPaths = require('@stryke/path/join-paths');
|
|
9
|
-
var defu = require('defu');
|
|
10
|
-
var minimatch = require('minimatch');
|
|
11
|
-
var ts = require('typescript');
|
|
12
|
-
|
|
13
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
|
|
15
|
-
var defu__default = /*#__PURE__*/_interopDefault(defu);
|
|
16
|
-
var ts__default = /*#__PURE__*/_interopDefault(ts);
|
|
17
|
-
|
|
18
|
-
var SourcesMap = Map;
|
|
19
|
-
async function loadLibFiles() {
|
|
20
|
-
const libLocation = await resolve.resolvePackage("typescript");
|
|
21
|
-
if (!libLocation) {
|
|
22
|
-
throw new Error("Could not resolve TypeScript package location.");
|
|
23
|
-
}
|
|
24
|
-
const libFiles = await listFiles.listFiles(joinPaths.joinPaths(libLocation, "lib", "**", "lib.*.d.ts"));
|
|
25
|
-
if (libFiles.length === 0) {
|
|
26
|
-
throw new Error("No TypeScript library files found.");
|
|
27
|
-
}
|
|
28
|
-
const lib = /* @__PURE__ */ new Map();
|
|
29
|
-
for (const file of libFiles) {
|
|
30
|
-
lib.set(`/node_modules/typescript/lib/${filePathFns.findFileName(file)}`, await readFile.readFile(file));
|
|
31
|
-
}
|
|
32
|
-
return lib;
|
|
33
|
-
}
|
|
34
|
-
chunkUSNT2KNT_cjs.__name(loadLibFiles, "loadLibFiles");
|
|
35
|
-
function getDefaultCompilerOptions() {
|
|
36
|
-
return {
|
|
37
|
-
...ts__default.default.getDefaultCompilerOptions(),
|
|
38
|
-
jsx: ts__default.default.JsxEmit.React,
|
|
39
|
-
strict: true,
|
|
40
|
-
esModuleInterop: true,
|
|
41
|
-
module: ts__default.default.ModuleKind.ESNext,
|
|
42
|
-
suppressOutputPathCheck: true,
|
|
43
|
-
skipLibCheck: true,
|
|
44
|
-
skipDefaultLibCheck: true,
|
|
45
|
-
moduleResolution: ts__default.default.ModuleResolutionKind.Node10
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
chunkUSNT2KNT_cjs.__name(getDefaultCompilerOptions, "getDefaultCompilerOptions");
|
|
49
|
-
async function createVirtualProgram(rootNames, context, compilerOptions = {}) {
|
|
50
|
-
const options = defu__default.default(compilerOptions, getDefaultCompilerOptions());
|
|
51
|
-
const host = {
|
|
52
|
-
name: "storm-vfs",
|
|
53
|
-
root: context.workspaceConfig.workspaceRoot,
|
|
54
|
-
...ts__default.default.sys,
|
|
55
|
-
realpath: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((path) => {
|
|
56
|
-
if (context.fs.existsSync(path)) {
|
|
57
|
-
return context.fs.resolveSync(path);
|
|
58
|
-
}
|
|
59
|
-
return ts__default.default.sys.realpath?.(path) ?? path;
|
|
60
|
-
}, "realpath"),
|
|
61
|
-
getCurrentDirectory() {
|
|
62
|
-
return context.workspaceConfig.workspaceRoot;
|
|
63
|
-
},
|
|
64
|
-
getCanonicalFileName(fileName) {
|
|
65
|
-
return fileName;
|
|
66
|
-
},
|
|
67
|
-
getDefaultLibFileName(_options) {
|
|
68
|
-
return ts__default.default.getDefaultLibFileName(options);
|
|
69
|
-
},
|
|
70
|
-
getDefaultLibLocation() {
|
|
71
|
-
return "/";
|
|
72
|
-
},
|
|
73
|
-
getNewLine() {
|
|
74
|
-
return "\n";
|
|
75
|
-
},
|
|
76
|
-
useCaseSensitiveFileNames() {
|
|
77
|
-
return true;
|
|
78
|
-
},
|
|
79
|
-
fileExists(fileName) {
|
|
80
|
-
return context.fs.existsSync(fileName);
|
|
81
|
-
},
|
|
82
|
-
readFile(fileName) {
|
|
83
|
-
if (context.fs.existsSync(fileName)) {
|
|
84
|
-
return context.fs.readFileSync(fileName);
|
|
85
|
-
}
|
|
86
|
-
return void 0;
|
|
87
|
-
},
|
|
88
|
-
readDirectory: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((path, extensions = [], exclude = [], include = []) => {
|
|
89
|
-
let results = [];
|
|
90
|
-
if (context.fs.existsSync(path)) {
|
|
91
|
-
results = context.fs.readdirSync(path, {
|
|
92
|
-
encoding: "utf8",
|
|
93
|
-
recursive: true
|
|
94
|
-
});
|
|
95
|
-
if (extensions.length > 0) {
|
|
96
|
-
results = results.filter((file) => extensions.some((ext) => file.endsWith(ext.startsWith(".") ? ext : `.${ext}`)));
|
|
97
|
-
}
|
|
98
|
-
if (exclude.length > 0) {
|
|
99
|
-
results = results.filter((file) => !exclude.some((pattern) => minimatch.minimatch(file, pattern)));
|
|
100
|
-
}
|
|
101
|
-
if (include.length > 0) {
|
|
102
|
-
results = results.filter((file) => include.some((pattern) => minimatch.minimatch(file, pattern)));
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return results;
|
|
106
|
-
}, "readDirectory"),
|
|
107
|
-
writeFile(fileName, data) {
|
|
108
|
-
context.fs.writeFileSync(fileName, data);
|
|
109
|
-
},
|
|
110
|
-
resolvePath: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((fileName) => {
|
|
111
|
-
if (context.fs.existsSync(fileName)) {
|
|
112
|
-
return context.fs.resolveSync(fileName);
|
|
113
|
-
}
|
|
114
|
-
return ts__default.default.sys.resolvePath(fileName);
|
|
115
|
-
}, "resolvePath"),
|
|
116
|
-
getSourceFile(fileName, languageVersionOrOptions, _, shouldCreateNewSourceFile) {
|
|
117
|
-
if (context.fs.existsSync(fileName)) {
|
|
118
|
-
return ts__default.default.createSourceFile(fileName, context.fs.readFileSync(fileName), languageVersionOrOptions ?? compilerOptions.target ?? getDefaultCompilerOptions().target, false);
|
|
119
|
-
} else if (shouldCreateNewSourceFile) {
|
|
120
|
-
const sourceFile = ts__default.default.createSourceFile(fileName, "", languageVersionOrOptions ?? compilerOptions.target ?? getDefaultCompilerOptions().target, false);
|
|
121
|
-
context.fs.writeFileSync(fileName, sourceFile.text);
|
|
122
|
-
return sourceFile;
|
|
123
|
-
}
|
|
124
|
-
return void 0;
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
return ts__default.default.createProgram(rootNames, options, host);
|
|
128
|
-
}
|
|
129
|
-
chunkUSNT2KNT_cjs.__name(createVirtualProgram, "createVirtualProgram");
|
|
130
|
-
function createVirtualCompilerHost(context, sys, compilerOptions) {
|
|
131
|
-
return {
|
|
132
|
-
compilerHost: {
|
|
133
|
-
...sys,
|
|
134
|
-
getCanonicalFileName: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((fileName) => fileName, "getCanonicalFileName"),
|
|
135
|
-
getDefaultLibFileName: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name(() => `/${ts__default.default.getDefaultLibFileName(compilerOptions)}`, "getDefaultLibFileName"),
|
|
136
|
-
// getDefaultLibLocation: () => '/',
|
|
137
|
-
getNewLine: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name(() => sys.newLine, "getNewLine"),
|
|
138
|
-
getSourceFile: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((fileName, languageVersionOrOptions) => {
|
|
139
|
-
const resolved = context.fs.resolveSync(fileName);
|
|
140
|
-
if (resolved && context.fs.existsSync(resolved)) {
|
|
141
|
-
return context.fs.readFileSync(resolved);
|
|
142
|
-
}
|
|
143
|
-
return ts__default.default.createSourceFile(fileName, sys.readFile(fileName), languageVersionOrOptions ?? compilerOptions.target, false);
|
|
144
|
-
}, "getSourceFile"),
|
|
145
|
-
useCaseSensitiveFileNames: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name(() => sys.useCaseSensitiveFileNames, "useCaseSensitiveFileNames")
|
|
146
|
-
},
|
|
147
|
-
updateFile: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((sourceFile) => {
|
|
148
|
-
const alreadyExists = context.fs.existsSync(sourceFile.fileName);
|
|
149
|
-
sys.writeFile(sourceFile.fileName, sourceFile.text);
|
|
150
|
-
return alreadyExists;
|
|
151
|
-
}, "updateFile"),
|
|
152
|
-
deleteFile: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((sourceFile) => {
|
|
153
|
-
const alreadyExists = context.fs.existsSync(sourceFile.fileName);
|
|
154
|
-
sys.deleteFile(sourceFile.fileName);
|
|
155
|
-
return alreadyExists;
|
|
156
|
-
}, "deleteFile")
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
chunkUSNT2KNT_cjs.__name(createVirtualCompilerHost, "createVirtualCompilerHost");
|
|
160
|
-
|
|
161
|
-
exports.SourcesMap = SourcesMap;
|
|
162
|
-
exports.createVirtualCompilerHost = createVirtualCompilerHost;
|
|
163
|
-
exports.createVirtualProgram = createVirtualProgram;
|
|
164
|
-
exports.getDefaultCompilerOptions = getDefaultCompilerOptions;
|
|
165
|
-
exports.loadLibFiles = loadLibFiles;
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { __name } from './chunk-SHUYVCID.js';
|
|
2
|
-
import { joinPaths } from '@stryke/path/join';
|
|
3
|
-
import { InMemoryFileSystemHost, Project } from 'ts-morph';
|
|
4
|
-
|
|
5
|
-
var VirtualFileSystemHost = class VirtualFileSystemHost2 extends InMemoryFileSystemHost {
|
|
6
|
-
static {
|
|
7
|
-
__name(this, "VirtualFileSystemHost");
|
|
8
|
-
}
|
|
9
|
-
#fs;
|
|
10
|
-
constructor(fs) {
|
|
11
|
-
super();
|
|
12
|
-
this.#fs = fs;
|
|
13
|
-
}
|
|
14
|
-
deleteSync(path) {
|
|
15
|
-
this.#fs.rmSync(path);
|
|
16
|
-
}
|
|
17
|
-
readDirSync(dirPath) {
|
|
18
|
-
return this.#fs.readdirSync(dirPath).reduce((ret, entry) => {
|
|
19
|
-
const fullPath = this.#fs.resolveSync(joinPaths(dirPath, entry));
|
|
20
|
-
if (fullPath) {
|
|
21
|
-
ret.push({
|
|
22
|
-
name: entry,
|
|
23
|
-
isDirectory: this.#fs.isDirectory(fullPath),
|
|
24
|
-
isFile: this.#fs.isFile(fullPath),
|
|
25
|
-
isSymlink: false
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return ret;
|
|
29
|
-
}, []);
|
|
30
|
-
}
|
|
31
|
-
async readFile(filePath) {
|
|
32
|
-
if (!this.#fs.existsSync(filePath)) {
|
|
33
|
-
throw new Error(`File not found: '${filePath}'. Please check the path and try again.`);
|
|
34
|
-
}
|
|
35
|
-
return await this.#fs.readFile(filePath);
|
|
36
|
-
}
|
|
37
|
-
readFileSync(filePath) {
|
|
38
|
-
if (!this.#fs.existsSync(filePath)) {
|
|
39
|
-
throw new Error(`File not found: '${filePath}'. Please check the path and try again.`);
|
|
40
|
-
}
|
|
41
|
-
return this.#fs.readFileSync(filePath);
|
|
42
|
-
}
|
|
43
|
-
async writeFile(filePath, fileText) {
|
|
44
|
-
return this.#fs.writeFile(filePath, fileText);
|
|
45
|
-
}
|
|
46
|
-
writeFileSync(filePath, fileText) {
|
|
47
|
-
this.#fs.writeFileSync(filePath, fileText);
|
|
48
|
-
}
|
|
49
|
-
async mkdir(dirPath) {
|
|
50
|
-
await this.#fs.mkdir(dirPath);
|
|
51
|
-
}
|
|
52
|
-
mkdirSync(dirPath) {
|
|
53
|
-
this.#fs.mkdirSync(dirPath);
|
|
54
|
-
}
|
|
55
|
-
async move(srcPath, destPath) {
|
|
56
|
-
await this.#fs.move(srcPath, destPath);
|
|
57
|
-
}
|
|
58
|
-
moveSync(srcPath, destPath) {
|
|
59
|
-
this.#fs.moveSync(srcPath, destPath);
|
|
60
|
-
}
|
|
61
|
-
async copy(srcPath, destPath) {
|
|
62
|
-
await this.#fs.copy(srcPath, destPath);
|
|
63
|
-
}
|
|
64
|
-
copySync(srcPath, destPath) {
|
|
65
|
-
this.#fs.copySync(srcPath, destPath);
|
|
66
|
-
}
|
|
67
|
-
async fileExists(filePath) {
|
|
68
|
-
return this.#fs.isFile(filePath);
|
|
69
|
-
}
|
|
70
|
-
fileExistsSync(filePath) {
|
|
71
|
-
return this.#fs.isFile(filePath);
|
|
72
|
-
}
|
|
73
|
-
async directoryExists(dirPath) {
|
|
74
|
-
return this.#fs.isDirectory(dirPath);
|
|
75
|
-
}
|
|
76
|
-
directoryExistsSync(dirPath) {
|
|
77
|
-
return this.#fs.isDirectory(dirPath);
|
|
78
|
-
}
|
|
79
|
-
realpathSync(path) {
|
|
80
|
-
return this.#fs.resolveSync(path) || path;
|
|
81
|
-
}
|
|
82
|
-
getCurrentDirectory() {
|
|
83
|
-
return "/";
|
|
84
|
-
}
|
|
85
|
-
async glob(patterns) {
|
|
86
|
-
return this.#fs.glob(patterns);
|
|
87
|
-
}
|
|
88
|
-
globSync(patterns) {
|
|
89
|
-
return this.#fs.globSync(patterns);
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
function createProgram(context, override) {
|
|
93
|
-
const project = new Project({
|
|
94
|
-
compilerOptions: {
|
|
95
|
-
...context.tsconfig.options
|
|
96
|
-
},
|
|
97
|
-
tsConfigFilePath: context.tsconfig.tsconfigFilePath,
|
|
98
|
-
fileSystem: new VirtualFileSystemHost(context.fs),
|
|
99
|
-
...override
|
|
100
|
-
});
|
|
101
|
-
return project;
|
|
102
|
-
}
|
|
103
|
-
__name(createProgram, "createProgram");
|
|
104
|
-
|
|
105
|
-
export { createProgram };
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkWUYK74EH_cjs = require('../chunk-WUYK74EH.cjs');
|
|
4
|
-
var chunkGA3RXX4R_cjs = require('../chunk-GA3RXX4R.cjs');
|
|
5
|
-
var chunkUSNT2KNT_cjs = require('../chunk-USNT2KNT.cjs');
|
|
6
|
-
var types = require('@storm-software/config-tools/types');
|
|
7
|
-
var resolve = require('@stryke/fs/resolve');
|
|
8
|
-
var joinPaths = require('@stryke/path/join-paths');
|
|
9
|
-
var replace = require('@stryke/path/replace');
|
|
10
|
-
var isFunction = require('@stryke/type-checks/is-function');
|
|
11
|
-
var defu = require('defu');
|
|
12
|
-
var typescript = require('typescript');
|
|
13
|
-
|
|
14
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
|
|
16
|
-
var defu__default = /*#__PURE__*/_interopDefault(defu);
|
|
17
|
-
|
|
18
|
-
function createVirtualSystem(context) {
|
|
19
|
-
return {
|
|
20
|
-
args: [],
|
|
21
|
-
createDirectory: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((path) => {
|
|
22
|
-
context.fs.mkdirSync(path);
|
|
23
|
-
}, "createDirectory"),
|
|
24
|
-
// TODO: could make a real file tree
|
|
25
|
-
directoryExists: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((directoryName) => {
|
|
26
|
-
return context.fs.existsSync(directoryName);
|
|
27
|
-
}, "directoryExists"),
|
|
28
|
-
exit: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name(() => {
|
|
29
|
-
throw new Error("Not implemented: exit");
|
|
30
|
-
}, "exit"),
|
|
31
|
-
fileExists: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((fileName) => context.fs.existsSync(fileName), "fileExists"),
|
|
32
|
-
getCurrentDirectory: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name(() => "/", "getCurrentDirectory"),
|
|
33
|
-
getDirectories: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name(() => [], "getDirectories"),
|
|
34
|
-
getExecutingFilePath: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name(() => {
|
|
35
|
-
throw new Error("Not implemented: getExecutingFilePath");
|
|
36
|
-
}, "getExecutingFilePath"),
|
|
37
|
-
readDirectory: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((directoryName) => {
|
|
38
|
-
return context.fs.readdirSync(directoryName);
|
|
39
|
-
}, "readDirectory"),
|
|
40
|
-
readFile: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((fileName) => {
|
|
41
|
-
if (context.fs.existsSync(fileName)) {
|
|
42
|
-
return context.fs.readFileSync(fileName);
|
|
43
|
-
}
|
|
44
|
-
return void 0;
|
|
45
|
-
}, "readFile"),
|
|
46
|
-
resolvePath: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((path) => context.fs.resolveSync(path) || path, "resolvePath"),
|
|
47
|
-
newLine: "\n",
|
|
48
|
-
useCaseSensitiveFileNames: true,
|
|
49
|
-
write: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name(() => {
|
|
50
|
-
throw new Error("Not implemented: write");
|
|
51
|
-
}, "write"),
|
|
52
|
-
writeFile: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((fileName, contents) => {
|
|
53
|
-
context.fs.writeFileSync(fileName, contents);
|
|
54
|
-
}, "writeFile"),
|
|
55
|
-
deleteFile: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((fileName) => {
|
|
56
|
-
context.fs.unlinkSync(fileName);
|
|
57
|
-
}, "deleteFile")
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
chunkUSNT2KNT_cjs.__name(createVirtualSystem, "createVirtualSystem");
|
|
61
|
-
function createCompilerHost(context, compilerOptions) {
|
|
62
|
-
const host = typescript.createCompilerHost(compilerOptions);
|
|
63
|
-
return {
|
|
64
|
-
...host,
|
|
65
|
-
require(baseDir, moduleName) {
|
|
66
|
-
const modulePath = context.fs.resolveSync(moduleName);
|
|
67
|
-
if (modulePath) {
|
|
68
|
-
return {
|
|
69
|
-
module: context.fs.readFileSync(modulePath),
|
|
70
|
-
modulePath,
|
|
71
|
-
error: void 0
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
if (isFunction.isFunction(typescript.sys?.require)) {
|
|
75
|
-
return typescript.sys.require(baseDir, moduleName);
|
|
76
|
-
}
|
|
77
|
-
return {
|
|
78
|
-
module: {},
|
|
79
|
-
error: new Error(`Failed to resolve module '${moduleName}' from '${baseDir}' during TypeScript compilation. This is likely due to a missing dependency or an incorrect module path.`)
|
|
80
|
-
};
|
|
81
|
-
},
|
|
82
|
-
getCanonicalFileName(fileName) {
|
|
83
|
-
return context.fs.resolveSync(fileName) || host.getCanonicalFileName(fileName);
|
|
84
|
-
},
|
|
85
|
-
realpath(fileName) {
|
|
86
|
-
return context.fs.resolveSync(fileName) || host.realpath?.(fileName);
|
|
87
|
-
},
|
|
88
|
-
fileExists(fileName) {
|
|
89
|
-
if (context.fs.existsSync(fileName)) {
|
|
90
|
-
return true;
|
|
91
|
-
}
|
|
92
|
-
if (fileName.includes("tsconfig.json")) {
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
return host.fileExists(fileName);
|
|
96
|
-
},
|
|
97
|
-
readFile(fileName) {
|
|
98
|
-
if (context.fs.existsSync(fileName)) {
|
|
99
|
-
return context.fs.readFileSync(fileName);
|
|
100
|
-
}
|
|
101
|
-
return host.readFile(fileName);
|
|
102
|
-
},
|
|
103
|
-
writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
|
|
104
|
-
context.fs.existsSync(fileName) ? context.fs.writeFileSync(fileName, text) : host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
|
|
105
|
-
},
|
|
106
|
-
getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
|
|
107
|
-
const path = context.fs.resolveSync(fileName);
|
|
108
|
-
if (path) {
|
|
109
|
-
try {
|
|
110
|
-
return typescript.createSourceFile(path, context.fs.readFileSync(path), languageVersionOrOptions ?? compilerOptions.target ?? chunkWUYK74EH_cjs.getDefaultCompilerOptions().target, false);
|
|
111
|
-
} catch (error) {
|
|
112
|
-
context.log(types.LogLevelLabel.ERROR, `Failed to create source file for '${fileName}': ${error.message}`);
|
|
113
|
-
throw error;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return host.getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
chunkUSNT2KNT_cjs.__name(createCompilerHost, "createCompilerHost");
|
|
121
|
-
async function createProgram(context, fileNames, _options = {}) {
|
|
122
|
-
context.log(types.LogLevelLabel.TRACE, "Adding TypeScript library files.");
|
|
123
|
-
const typescriptPath = await resolve.resolvePackage("typescript");
|
|
124
|
-
if (!typescriptPath) {
|
|
125
|
-
throw new Error("Could not resolve TypeScript package location. Please ensure TypeScript is installed.");
|
|
126
|
-
}
|
|
127
|
-
const files = fileNames.reduce((ret, fileName) => {
|
|
128
|
-
const formatted = replace.replacePath(fileName, context.workspaceConfig.workspaceRoot);
|
|
129
|
-
if (!ret.includes(formatted)) {
|
|
130
|
-
ret.push(formatted);
|
|
131
|
-
}
|
|
132
|
-
return ret;
|
|
133
|
-
}, [
|
|
134
|
-
joinPaths.joinPaths(typescriptPath, "lib", "lib.esnext.full.d.ts")
|
|
135
|
-
]);
|
|
136
|
-
context.log(types.LogLevelLabel.TRACE, "Parsing TypeScript configuration for the Powerlines project.");
|
|
137
|
-
const resolvedTsconfig = chunkGA3RXX4R_cjs.getParsedTypeScriptConfig(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.tsconfig.tsconfigFilePath, defu__default.default({
|
|
138
|
-
compilerOptions: {
|
|
139
|
-
strict: false,
|
|
140
|
-
noEmit: false,
|
|
141
|
-
declaration: true,
|
|
142
|
-
declarationMap: false,
|
|
143
|
-
emitDeclarationOnly: true,
|
|
144
|
-
skipLibCheck: true
|
|
145
|
-
},
|
|
146
|
-
exclude: [
|
|
147
|
-
"node_modules",
|
|
148
|
-
"dist"
|
|
149
|
-
],
|
|
150
|
-
include: fileNames
|
|
151
|
-
}, context.config.tsconfigRaw ?? {}));
|
|
152
|
-
resolvedTsconfig.options.configFilePath = joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.tsconfig.tsconfigFilePath);
|
|
153
|
-
resolvedTsconfig.options.pathsBasePath = context.workspaceConfig.workspaceRoot;
|
|
154
|
-
resolvedTsconfig.options.suppressOutputPathCheck = true;
|
|
155
|
-
context.log(types.LogLevelLabel.TRACE, "Creating the TypeScript compiler host");
|
|
156
|
-
const host = createCompilerHost(context, resolvedTsconfig.options);
|
|
157
|
-
context.log(types.LogLevelLabel.TRACE, "Creating the TypeScript compiler program");
|
|
158
|
-
return typescript.createProgram(files, resolvedTsconfig.options, host);
|
|
159
|
-
}
|
|
160
|
-
chunkUSNT2KNT_cjs.__name(createProgram, "createProgram");
|
|
161
|
-
|
|
162
|
-
exports.createCompilerHost = createCompilerHost;
|
|
163
|
-
exports.createProgram = createProgram;
|
|
164
|
-
exports.createVirtualSystem = createVirtualSystem;
|