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,27 +1,100 @@
|
|
|
1
|
-
import { MaybePromise, FunctionLike, NonUndefined, DeepPartial as DeepPartial$1 } from '@stryke/types/base';
|
|
2
|
-
import { TypeDefinitionParameter, TypeDefinition } from '@stryke/types/configuration';
|
|
3
|
-
import { AssetGlob } from '@stryke/types/file';
|
|
4
|
-
import { PreviewOptions, ResolvedConfig as ResolvedConfig$2, ResolvedPreviewOptions } from 'vite';
|
|
5
|
-
import { UnpluginBuildVariant, BuildConfig, BuildResolvedConfig, ViteBuildConfig, ViteResolvedBuildConfig, WebpackBuildConfig, WebpackResolvedBuildConfig, RspackBuildConfig, RspackResolvedBuildConfig, ESBuildBuildConfig, ESBuildResolvedBuildConfig, UnbuildBuildConfig, UnbuildResolvedBuildConfig, TsupBuildConfig, TsupResolvedBuildConfig, RolldownBuildConfig, RolldownResolvedBuildConfig, RollupBuildConfig, RollupResolvedBuildConfig, FarmBuildConfig, FarmResolvedBuildConfig, BuildVariant } from './types/build.js';
|
|
6
|
-
import { PluginPass, PluginObj, PluginItem, TransformOptions, transformAsync } from '@babel/core';
|
|
7
|
-
import { Format } from '@storm-software/build-tools/types';
|
|
8
|
-
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
9
|
-
import { StormWorkspaceConfig } from '@storm-software/config/types';
|
|
10
|
-
import { ResolvedConfig as ResolvedConfig$1, ConfigLayer } from 'c12';
|
|
11
|
-
import { BabelAPI } from '@babel/helper-plugin-utils';
|
|
12
1
|
import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
2
|
+
import { MaybePromise, NonUndefined, FunctionLike, DeepPartial as DeepPartial$1 } from '@stryke/types/base';
|
|
13
3
|
import { PackageJson } from '@stryke/types/package-json';
|
|
14
4
|
import { Worker } from 'jest-worker';
|
|
15
5
|
import { Jiti } from 'jiti';
|
|
16
6
|
import MagicString, { SourceMap } from 'magic-string';
|
|
17
|
-
import { DirectoryJSON } from 'memfs';
|
|
18
7
|
import { Range } from 'semver';
|
|
19
8
|
import { Project } from 'ts-morph';
|
|
20
9
|
import { Unimport } from 'unimport';
|
|
21
10
|
import { TransformResult as TransformResult$1, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginMessage, UnpluginContext, UnpluginBuildContext } from 'unplugin';
|
|
22
|
-
import {
|
|
11
|
+
import { PluginPass, PluginObj, PluginItem, TransformOptions, transformAsync } from '@babel/core';
|
|
12
|
+
import { Format } from '@storm-software/build-tools/types';
|
|
13
|
+
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
14
|
+
import { StormWorkspaceConfig } from '@storm-software/config/types';
|
|
15
|
+
import { TypeDefinition, TypeDefinitionParameter } from '@stryke/types/configuration';
|
|
16
|
+
import { AssetGlob } from '@stryke/types/file';
|
|
17
|
+
import { ResolvedConfig as ResolvedConfig$1, ConfigLayer } from 'c12';
|
|
18
|
+
import { ResolvedPreviewOptions, PreviewOptions, ResolvedConfig as ResolvedConfig$2 } from 'vite';
|
|
19
|
+
import { BabelAPI } from '@babel/helper-plugin-utils';
|
|
20
|
+
import { StoragePort, StoragePreset, VirtualFileSystemInterface, ResolveOptions, VirtualFile } from './types/fs.js';
|
|
23
21
|
import { ArrayValues } from '@stryke/types/array';
|
|
24
|
-
import {
|
|
22
|
+
import { BuildVariant, UnpluginBuildVariant, BuildConfig, BuildResolvedConfig, ViteBuildConfig, ViteResolvedBuildConfig, WebpackBuildConfig, WebpackResolvedBuildConfig, RspackBuildConfig, RspackResolvedBuildConfig, ESBuildBuildConfig, ESBuildResolvedBuildConfig, UnbuildBuildConfig, UnbuildResolvedBuildConfig, TsupBuildConfig, TsupResolvedBuildConfig, RolldownBuildConfig, RolldownResolvedBuildConfig, RollupBuildConfig, RollupResolvedBuildConfig, FarmBuildConfig, FarmResolvedBuildConfig } from './types/build.js';
|
|
23
|
+
import { TSConfig, ParsedTypeScriptConfig } from './types/tsconfig.js';
|
|
24
|
+
|
|
25
|
+
interface NamedImportDefinition {
|
|
26
|
+
name: string;
|
|
27
|
+
source: string;
|
|
28
|
+
kind: "named";
|
|
29
|
+
}
|
|
30
|
+
interface DefaultImportDefinition {
|
|
31
|
+
source: string;
|
|
32
|
+
kind: "default";
|
|
33
|
+
}
|
|
34
|
+
type ImportDefinition = NamedImportDefinition | DefaultImportDefinition;
|
|
35
|
+
type BabelPluginPass<TState = unknown> = PluginPass & TState;
|
|
36
|
+
type BabelTransformPluginFilter = (code: string, id: string) => boolean;
|
|
37
|
+
type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
|
|
38
|
+
name: string;
|
|
39
|
+
log: LogFn;
|
|
40
|
+
api: BabelAPI;
|
|
41
|
+
options: TOptions;
|
|
42
|
+
context: TContext;
|
|
43
|
+
dirname: string;
|
|
44
|
+
}) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
|
|
45
|
+
$$name: string;
|
|
46
|
+
};
|
|
47
|
+
type BabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | BabelTransformPlugin<TContext, TOptions, TState> | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions] | [
|
|
48
|
+
BabelTransformPlugin<TContext, TOptions, TState>,
|
|
49
|
+
TOptions,
|
|
50
|
+
BabelTransformPluginFilter
|
|
51
|
+
];
|
|
52
|
+
type ResolvedBabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | [
|
|
53
|
+
BabelTransformPlugin<TContext, TOptions, TState>,
|
|
54
|
+
TOptions,
|
|
55
|
+
BabelTransformPluginFilter | null
|
|
56
|
+
];
|
|
57
|
+
type BabelTransformInput = Omit<TransformOptions & Required<Pick<TransformOptions, "presets" | "plugins">>, "filename" | "root" | "sourceFileName" | "sourceMaps" | "inputSourceMap">;
|
|
58
|
+
interface BabelTransformPluginBuilderParams<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>> {
|
|
59
|
+
name: string;
|
|
60
|
+
log: LogFn;
|
|
61
|
+
api: BabelAPI;
|
|
62
|
+
options: TOptions;
|
|
63
|
+
context: TContext;
|
|
64
|
+
dirname: string;
|
|
65
|
+
}
|
|
66
|
+
type BabelTransformPluginBuilder<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = any> = (params: BabelTransformPluginBuilderParams<TContext, TOptions>) => PluginObj<TState & BabelPluginPass<TOptions>>;
|
|
67
|
+
type DeclareBabelTransformPluginReturn<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = any> = Omit<BabelTransformPlugin<TContext, TOptions, TState>, "$$name"> & Required<Pick<BabelTransformPlugin<TContext, TOptions, TState>, "$$name">>;
|
|
68
|
+
/**
|
|
69
|
+
* A non-local import specifier represents an import that is not defined within the current module.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```typescript
|
|
73
|
+
* import { bar as baz } from 'foo';
|
|
74
|
+
* // { name: 'baz', module: 'foo', imported: 'bar' }
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @remarks
|
|
78
|
+
* It captures the details of an import statement, including the local name used in the module, the source module from which it is imported, and the original name of the export in the source module.
|
|
79
|
+
*/
|
|
80
|
+
interface ImportSpecifier {
|
|
81
|
+
name?: string;
|
|
82
|
+
module: string;
|
|
83
|
+
imported: string;
|
|
84
|
+
}
|
|
85
|
+
declare type __ΩNamedImportDefinition = any[];
|
|
86
|
+
declare type __ΩDefaultImportDefinition = any[];
|
|
87
|
+
declare type __ΩImportDefinition = any[];
|
|
88
|
+
declare type __ΩBabelPluginPass = any[];
|
|
89
|
+
declare type __ΩBabelTransformPluginFilter = any[];
|
|
90
|
+
declare type __ΩBabelTransformPlugin = any[];
|
|
91
|
+
declare type __ΩBabelTransformPluginOptions = any[];
|
|
92
|
+
declare type __ΩResolvedBabelTransformPluginOptions = any[];
|
|
93
|
+
declare type __ΩBabelTransformInput = any[];
|
|
94
|
+
declare type __ΩBabelTransformPluginBuilderParams = any[];
|
|
95
|
+
declare type __ΩBabelTransformPluginBuilder = any[];
|
|
96
|
+
declare type __ΩDeclareBabelTransformPluginReturn = any[];
|
|
97
|
+
declare type __ΩImportSpecifier = any[];
|
|
25
98
|
|
|
26
99
|
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
|
|
27
100
|
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
|
@@ -29,6 +102,106 @@ type Commands<TContext extends Context = Context> = Record<CommandType, (this: T
|
|
|
29
102
|
declare type __ΩCommandType = any[];
|
|
30
103
|
declare type __ΩCommands = any[];
|
|
31
104
|
|
|
105
|
+
interface ResolvedEntryTypeDefinition extends TypeDefinition {
|
|
106
|
+
/**
|
|
107
|
+
* The user provided entry point in the source code
|
|
108
|
+
*/
|
|
109
|
+
input: TypeDefinition;
|
|
110
|
+
/**
|
|
111
|
+
* An optional name to use in the package export during the build process
|
|
112
|
+
*/
|
|
113
|
+
output?: string;
|
|
114
|
+
}
|
|
115
|
+
type BabelResolvedConfig = Omit<BabelUserConfig, "plugins" | "presets"> & Required<Pick<BabelUserConfig, "plugins" | "presets">>;
|
|
116
|
+
type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "ssr">> & {
|
|
117
|
+
/**
|
|
118
|
+
* The name of the environment
|
|
119
|
+
*/
|
|
120
|
+
name: string;
|
|
121
|
+
/**
|
|
122
|
+
* Configuration options for the preview server
|
|
123
|
+
*/
|
|
124
|
+
preview?: ResolvedPreviewOptions;
|
|
125
|
+
};
|
|
126
|
+
type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
|
|
127
|
+
type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> & {
|
|
128
|
+
assets: ResolvedAssetGlob[];
|
|
129
|
+
}> & Pick<OutputConfig, "storage">;
|
|
130
|
+
/**
|
|
131
|
+
* The resolved options for the Powerlines project configuration.
|
|
132
|
+
*/
|
|
133
|
+
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework">> & {
|
|
134
|
+
/**
|
|
135
|
+
* The configuration options that were provided inline to the Powerlines CLI.
|
|
136
|
+
*/
|
|
137
|
+
inlineConfig: InlineConfig<TUserConfig>;
|
|
138
|
+
/**
|
|
139
|
+
* The original configuration options that were provided by the user to the Powerlines process.
|
|
140
|
+
*/
|
|
141
|
+
userConfig: TUserConfig;
|
|
142
|
+
/**
|
|
143
|
+
* A string identifier for the Powerlines command being executed.
|
|
144
|
+
*/
|
|
145
|
+
command: NonUndefined<InlineConfig<TUserConfig>["command"]>;
|
|
146
|
+
/**
|
|
147
|
+
* The root directory of the project's source code
|
|
148
|
+
*
|
|
149
|
+
* @defaultValue "\{projectRoot\}/src"
|
|
150
|
+
*/
|
|
151
|
+
sourceRoot: NonUndefined<TUserConfig["sourceRoot"]>;
|
|
152
|
+
/**
|
|
153
|
+
* The root directory of the project.
|
|
154
|
+
*/
|
|
155
|
+
projectRoot: NonUndefined<TUserConfig["root"]>;
|
|
156
|
+
/**
|
|
157
|
+
* The type of project being built.
|
|
158
|
+
*/
|
|
159
|
+
projectType: NonUndefined<TUserConfig["type"]>;
|
|
160
|
+
/**
|
|
161
|
+
* The output configuration options to use for the build process
|
|
162
|
+
*/
|
|
163
|
+
output: OutputResolvedConfig;
|
|
164
|
+
/**
|
|
165
|
+
* Configuration provided to build processes
|
|
166
|
+
*
|
|
167
|
+
* @remarks
|
|
168
|
+
* This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
|
|
169
|
+
*/
|
|
170
|
+
build: Omit<TUserConfig["build"], "override"> & Required<Pick<Required<TUserConfig["build"]>, "override">>;
|
|
171
|
+
/**
|
|
172
|
+
* The log level to use for the Powerlines processes.
|
|
173
|
+
*
|
|
174
|
+
* @defaultValue "info"
|
|
175
|
+
*/
|
|
176
|
+
logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
|
|
177
|
+
};
|
|
178
|
+
type ViteResolvedConfig = ResolvedConfig<ViteUserConfig>;
|
|
179
|
+
type WebpackResolvedConfig = ResolvedConfig<WebpackUserConfig>;
|
|
180
|
+
type RspackResolvedConfig = ResolvedConfig<RspackUserConfig>;
|
|
181
|
+
type ESBuildResolvedConfig = ResolvedConfig<ESBuildUserConfig>;
|
|
182
|
+
type RollupResolvedConfig = ResolvedConfig<RollupUserConfig>;
|
|
183
|
+
type RolldownResolvedConfig = ResolvedConfig<RolldownUserConfig>;
|
|
184
|
+
type TsupResolvedConfig = ResolvedConfig<TsupUserConfig>;
|
|
185
|
+
type UnbuildResolvedConfig = ResolvedConfig<UnbuildUserConfig>;
|
|
186
|
+
type FarmResolvedConfig = ResolvedConfig<FarmUserConfig>;
|
|
187
|
+
type InferResolvedConfig<TBuildVariant extends BuildVariant | undefined> = TBuildVariant extends undefined ? ResolvedConfig : TBuildVariant extends "webpack" ? WebpackResolvedConfig : TBuildVariant extends "rspack" ? RspackResolvedConfig : TBuildVariant extends "vite" ? ViteResolvedConfig : TBuildVariant extends "esbuild" ? ESBuildResolvedConfig : TBuildVariant extends "unbuild" ? UnbuildResolvedConfig : TBuildVariant extends "tsup" ? TsupResolvedConfig : TBuildVariant extends "rolldown" ? RolldownResolvedConfig : TBuildVariant extends "rollup" ? RollupResolvedConfig : TBuildVariant extends "farm" ? FarmResolvedConfig : ResolvedConfig;
|
|
188
|
+
declare type __ΩResolvedEntryTypeDefinition = any[];
|
|
189
|
+
declare type __ΩBabelResolvedConfig = any[];
|
|
190
|
+
declare type __ΩEnvironmentResolvedConfig = any[];
|
|
191
|
+
declare type __ΩResolvedAssetGlob = any[];
|
|
192
|
+
declare type __ΩOutputResolvedConfig = any[];
|
|
193
|
+
declare type __ΩResolvedConfig = any[];
|
|
194
|
+
declare type __ΩViteResolvedConfig = any[];
|
|
195
|
+
declare type __ΩWebpackResolvedConfig = any[];
|
|
196
|
+
declare type __ΩRspackResolvedConfig = any[];
|
|
197
|
+
declare type __ΩESBuildResolvedConfig = any[];
|
|
198
|
+
declare type __ΩRollupResolvedConfig = any[];
|
|
199
|
+
declare type __ΩRolldownResolvedConfig = any[];
|
|
200
|
+
declare type __ΩTsupResolvedConfig = any[];
|
|
201
|
+
declare type __ΩUnbuildResolvedConfig = any[];
|
|
202
|
+
declare type __ΩFarmResolvedConfig = any[];
|
|
203
|
+
declare type __ΩInferResolvedConfig = any[];
|
|
204
|
+
|
|
32
205
|
interface PluginHookObject<THookFunction extends FunctionLike, TFilter extends keyof HookFilter = never> {
|
|
33
206
|
/**
|
|
34
207
|
* The order in which the plugin should be applied.
|
|
@@ -279,1097 +452,923 @@ declare type __ΩPluginBuildPlugins = any[];
|
|
|
279
452
|
declare type __ΩPlugin = any[];
|
|
280
453
|
declare type __ΩPluginNonHookFields = any[];
|
|
281
454
|
|
|
282
|
-
type
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
type
|
|
287
|
-
type
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
455
|
+
type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
|
|
456
|
+
/**
|
|
457
|
+
* The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
|
|
458
|
+
*/
|
|
459
|
+
type WorkspaceConfig = Partial<StormWorkspaceConfig> & Required<Pick<StormWorkspaceConfig, "workspaceRoot">>;
|
|
460
|
+
type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext>>;
|
|
461
|
+
/**
|
|
462
|
+
* A configuration tuple for a Powerlines plugin.
|
|
463
|
+
*/
|
|
464
|
+
type PluginConfigTuple<TContext extends PluginContext = PluginContext, TOptions = any> = [string | PluginFactory<TContext, TOptions>, TOptions] | [Plugin<TContext>];
|
|
465
|
+
/**
|
|
466
|
+
* A configuration object for a Powerlines plugin.
|
|
467
|
+
*/
|
|
468
|
+
type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions = any> = {
|
|
469
|
+
plugin: string | PluginFactory<TContext, TOptions>;
|
|
470
|
+
options: TOptions;
|
|
471
|
+
} | {
|
|
299
472
|
plugin: Plugin<TContext>;
|
|
300
|
-
|
|
301
|
-
}
|
|
302
|
-
type HooksList<TContext extends PluginContext = PluginContext> = {
|
|
303
|
-
[TKey in BaseHookKeys<TContext>]?: BaseHooksList<TContext, TKey>;
|
|
304
|
-
} & {
|
|
305
|
-
[TKey in ExternalHookKeys<TContext>]?: ExternalHooksListItem<TContext, TKey>[];
|
|
473
|
+
options?: never;
|
|
306
474
|
};
|
|
307
|
-
type InferHookHandler<TContext extends PluginContext, TKey extends HookKeys<TContext>> = Hooks<TContext>[TKey];
|
|
308
|
-
type InferHookReturnType<TContext extends PluginContext, TKey extends HookKeys<TContext>> = ReturnType<InferHookHandler<TContext, TKey>> extends Promise<infer U> ? U extends Promise<infer V> ? V : U : ReturnType<InferHookHandler<TContext, TKey>>;
|
|
309
|
-
type InferHookParameters<TContext extends PluginContext, TKey extends HookKeys<TContext>> = Parameters<InferHookHandler<TContext, TKey>>;
|
|
310
|
-
type InferHookThisType<TContext extends PluginContext, TKey extends HookKeys<TContext>> = ThisParameterType<InferHookHandler<TContext, TKey>>;
|
|
311
|
-
declare type __ΩBaseHooks = any[];
|
|
312
|
-
declare type __ΩBaseHookKeys = any[];
|
|
313
|
-
declare type __ΩExternalHooks = any[];
|
|
314
|
-
declare type __ΩExternalHookKeys = any[];
|
|
315
|
-
declare type __ΩHooks = any[];
|
|
316
|
-
declare type __ΩHookKeys = any[];
|
|
317
|
-
declare type __ΩBaseHooksListItem = any[];
|
|
318
|
-
declare type __ΩBaseHooksList = any[];
|
|
319
|
-
declare type __ΩExternalHooksListItem = any[];
|
|
320
|
-
declare type __ΩHooksList = any[];
|
|
321
|
-
declare type __ΩInferHookHandler = any[];
|
|
322
|
-
declare type __ΩInferHookReturnType = any[];
|
|
323
|
-
declare type __ΩInferHookParameters = any[];
|
|
324
|
-
declare type __ΩInferHookThisType = any[];
|
|
325
|
-
|
|
326
475
|
/**
|
|
327
|
-
*
|
|
476
|
+
* A configuration tuple for a Powerlines plugin.
|
|
328
477
|
*/
|
|
329
|
-
type
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
ERROR: LogLevel;
|
|
335
|
-
FATAL: LogLevel;
|
|
336
|
-
};
|
|
337
|
-
type WorkerProcess<TExposedMethods extends ReadonlyArray<string>> = {
|
|
338
|
-
[K in TExposedMethods[number]]: (data: any) => Promise<any>;
|
|
339
|
-
} & {
|
|
340
|
-
close: () => void;
|
|
341
|
-
end: () => ReturnType<Worker["end"]>;
|
|
342
|
-
};
|
|
343
|
-
interface MetaInfo {
|
|
344
|
-
/**
|
|
345
|
-
* The checksum generated from the resolved options
|
|
346
|
-
*/
|
|
347
|
-
checksum: string;
|
|
478
|
+
type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Promise<Plugin<TContext>> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
|
|
479
|
+
type PartialPlugin<in out TContext extends PluginContext = PluginContext> = DeepPartial$1<Plugin<TContext>>;
|
|
480
|
+
type PartialPluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<PartialPlugin<TContext>>;
|
|
481
|
+
type ProjectType = "application" | "library";
|
|
482
|
+
type BabelUserConfig = Parameters<typeof transformAsync>[1] & {
|
|
348
483
|
/**
|
|
349
|
-
* The build
|
|
484
|
+
* The Babel plugins to be used during the build process
|
|
350
485
|
*/
|
|
351
|
-
|
|
486
|
+
plugins?: BabelTransformPluginOptions[];
|
|
352
487
|
/**
|
|
353
|
-
* The
|
|
488
|
+
* The Babel presets to be used during the build process
|
|
354
489
|
*/
|
|
355
|
-
|
|
490
|
+
presets?: BabelTransformPluginOptions[];
|
|
491
|
+
};
|
|
492
|
+
interface OutputConfig {
|
|
356
493
|
/**
|
|
357
|
-
* The
|
|
494
|
+
* The path to output the final compiled files to
|
|
495
|
+
*
|
|
496
|
+
* @remarks
|
|
497
|
+
* If a value is not provided, Powerlines will attempt to:
|
|
498
|
+
* 1. Use the `outDir` value in the `tsconfig.json` file.
|
|
499
|
+
* 2. Use the `dist` directory in the project root directory.
|
|
500
|
+
*
|
|
501
|
+
* @defaultValue "dist/\{projectRoot\}"
|
|
358
502
|
*/
|
|
359
|
-
|
|
503
|
+
outputPath?: string;
|
|
360
504
|
/**
|
|
361
|
-
*
|
|
505
|
+
* The output directory path for the project build.
|
|
506
|
+
*
|
|
507
|
+
* @remarks
|
|
508
|
+
* This path is used to determine where the built files will be placed after the build process completes. This will be used in scenarios where the monorepo uses TSConfig paths to link packages together.
|
|
509
|
+
*
|
|
510
|
+
* @defaultValue "\{projectRoot\}/dist"
|
|
362
511
|
*/
|
|
363
|
-
|
|
512
|
+
buildPath?: string;
|
|
364
513
|
/**
|
|
365
|
-
*
|
|
514
|
+
* The folder where the generated runtime artifacts will be located
|
|
515
|
+
*
|
|
516
|
+
* @remarks
|
|
517
|
+
* This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
|
|
518
|
+
*
|
|
519
|
+
* @defaultValue "\{projectRoot\}/.powerlines"
|
|
366
520
|
*/
|
|
367
|
-
|
|
368
|
-
}
|
|
369
|
-
interface Resolver extends Jiti {
|
|
370
|
-
plugin: Jiti;
|
|
371
|
-
}
|
|
372
|
-
interface TransformResult {
|
|
373
|
-
code: string;
|
|
374
|
-
map: SourceMap | null;
|
|
375
|
-
}
|
|
376
|
-
/**
|
|
377
|
-
* The format for providing source code to the compiler
|
|
378
|
-
*/
|
|
379
|
-
interface SourceFile {
|
|
521
|
+
artifactsPath?: string;
|
|
380
522
|
/**
|
|
381
|
-
* The
|
|
523
|
+
* The path of the generated runtime declaration file relative to the workspace root.
|
|
524
|
+
*
|
|
525
|
+
* @defaultValue "\{projectRoot\}/powerlines.d.ts"
|
|
382
526
|
*/
|
|
383
|
-
|
|
527
|
+
dts?: string | false;
|
|
384
528
|
/**
|
|
385
|
-
*
|
|
529
|
+
* A prefix to use for identifying builtin modules
|
|
530
|
+
*
|
|
531
|
+
* @remarks
|
|
532
|
+
* This prefix will be used to identify all builtin modules generated during the "prepare" phase. An example builtin ID for a module called `"utils"` would be `"{builtinPrefix}:utils"`.
|
|
533
|
+
*
|
|
534
|
+
* @defaultValue "powerlines"
|
|
386
535
|
*/
|
|
387
|
-
|
|
536
|
+
builtinPrefix?: string;
|
|
388
537
|
/**
|
|
389
|
-
* The
|
|
538
|
+
* The module format of the output files
|
|
539
|
+
*
|
|
540
|
+
* @remarks
|
|
541
|
+
* This option can be a single format or an array of formats. If an array is provided, multiple builds will be generated for each format.
|
|
542
|
+
*
|
|
543
|
+
* @defaultValue "esm"
|
|
390
544
|
*/
|
|
391
|
-
|
|
545
|
+
format?: Format | Format[];
|
|
392
546
|
/**
|
|
393
|
-
*
|
|
547
|
+
* A list of assets to copy to the output directory
|
|
548
|
+
*
|
|
549
|
+
* @remarks
|
|
550
|
+
* 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.
|
|
394
551
|
*/
|
|
395
|
-
|
|
396
|
-
}
|
|
397
|
-
type UnimportContext = Omit<Unimport, "injectImports"> & {
|
|
398
|
-
dumpImports: () => Promise<void>;
|
|
399
|
-
injectImports: (source: SourceFile) => Promise<SourceFile>;
|
|
400
|
-
refreshRuntimeImports: () => Promise<void>;
|
|
401
|
-
};
|
|
402
|
-
interface SelectHooksOptions {
|
|
403
|
-
order?: "pre" | "post" | "normal";
|
|
404
|
-
}
|
|
405
|
-
interface InitContextOptions {
|
|
552
|
+
assets?: Array<string | AssetGlob>;
|
|
406
553
|
/**
|
|
407
|
-
*
|
|
554
|
+
* A string preset or a custom {@link StoragePort} to provide fine-grained control over generated/output file storage.
|
|
408
555
|
*
|
|
409
|
-
* @
|
|
556
|
+
* @remarks
|
|
557
|
+
* If a string preset is provided, it must be one of the following values:
|
|
558
|
+
* - `"virtual"`: Uses the local file system for storage.
|
|
559
|
+
* - `"fs"`: Uses an in-memory virtual file system for storage.
|
|
560
|
+
*
|
|
561
|
+
* If a custom {@link StoragePort} is provided, it will be used for all file storage operations during the build process.
|
|
562
|
+
*
|
|
563
|
+
* @defaultValue "virtual"
|
|
410
564
|
*/
|
|
411
|
-
|
|
565
|
+
storage?: StoragePort | StoragePreset;
|
|
412
566
|
}
|
|
413
|
-
|
|
414
|
-
* The unresolved Powerlines context.
|
|
415
|
-
*
|
|
416
|
-
* @remarks
|
|
417
|
-
* This context is used before the user configuration has been fully resolved after the `config`.
|
|
418
|
-
*/
|
|
419
|
-
interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
567
|
+
interface BaseConfig {
|
|
420
568
|
/**
|
|
421
|
-
* The
|
|
569
|
+
* The entry point(s) for the application
|
|
422
570
|
*/
|
|
423
|
-
|
|
571
|
+
entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
|
|
424
572
|
/**
|
|
425
|
-
*
|
|
573
|
+
* Configuration for the output of the build process
|
|
426
574
|
*/
|
|
427
|
-
|
|
428
|
-
projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
|
|
429
|
-
output: TResolvedConfig["output"];
|
|
430
|
-
};
|
|
575
|
+
output?: OutputConfig;
|
|
431
576
|
/**
|
|
432
|
-
*
|
|
577
|
+
* Configuration for linting the source code
|
|
578
|
+
*
|
|
579
|
+
* @remarks
|
|
580
|
+
* If set to `false`, linting will be disabled.
|
|
433
581
|
*/
|
|
434
|
-
|
|
582
|
+
lint?: Record<string, any> | false;
|
|
435
583
|
/**
|
|
436
|
-
*
|
|
584
|
+
* Configuration for testing the source code
|
|
585
|
+
*
|
|
586
|
+
* @remarks
|
|
587
|
+
* If set to `false`, testing will be disabled.
|
|
437
588
|
*/
|
|
438
|
-
|
|
589
|
+
test?: Record<string, any> | false;
|
|
439
590
|
/**
|
|
440
|
-
*
|
|
591
|
+
* Configuration for the transformation of the source code
|
|
441
592
|
*/
|
|
442
|
-
|
|
593
|
+
transform?: Record<string, any>;
|
|
443
594
|
/**
|
|
444
|
-
*
|
|
595
|
+
* Configuration provided to build processes
|
|
596
|
+
*
|
|
597
|
+
* @remarks
|
|
598
|
+
* This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
|
|
445
599
|
*/
|
|
446
|
-
|
|
600
|
+
build?: BuildConfig;
|
|
447
601
|
/**
|
|
448
|
-
*
|
|
602
|
+
* Configuration for documentation generation
|
|
603
|
+
*
|
|
604
|
+
* @remarks
|
|
605
|
+
* This configuration will be used by the documentation generation plugins during the `docs` command.
|
|
449
606
|
*/
|
|
450
|
-
|
|
607
|
+
docs?: Record<string, any>;
|
|
451
608
|
/**
|
|
452
|
-
*
|
|
609
|
+
* Configuration for deploying the source code
|
|
610
|
+
*
|
|
611
|
+
* @remarks
|
|
612
|
+
* If set to `false`, the deployment will be disabled.
|
|
453
613
|
*/
|
|
454
|
-
|
|
614
|
+
deploy?: Record<string, any> | false;
|
|
455
615
|
/**
|
|
456
|
-
*
|
|
616
|
+
* The path to the tsconfig file to be used by the compiler
|
|
617
|
+
*
|
|
618
|
+
* @remarks
|
|
619
|
+
* If a value is not provided, the plugin will attempt to find the `tsconfig.json` file in the project root directory. The parsed tsconfig compiler options will be merged with the {@link Options.tsconfigRaw} value (if provided).
|
|
620
|
+
*
|
|
621
|
+
* @defaultValue "\{projectRoot\}/tsconfig.json"
|
|
457
622
|
*/
|
|
458
|
-
|
|
623
|
+
tsconfig?: string;
|
|
459
624
|
/**
|
|
460
|
-
* The
|
|
625
|
+
* The raw {@link TSConfig} object to be used by the compiler. This object will be merged with the `tsconfig.json` file.
|
|
626
|
+
*
|
|
627
|
+
* @see https://www.typescriptlang.org/tsconfig
|
|
628
|
+
*
|
|
629
|
+
* @remarks
|
|
630
|
+
* If populated, this option takes higher priority than `tsconfig`
|
|
461
631
|
*/
|
|
462
|
-
|
|
632
|
+
tsconfigRaw?: TSConfig;
|
|
633
|
+
}
|
|
634
|
+
interface EnvironmentConfig extends BaseConfig {
|
|
463
635
|
/**
|
|
464
|
-
*
|
|
636
|
+
* Configuration options for the preview server
|
|
465
637
|
*/
|
|
466
|
-
|
|
638
|
+
preview?: PreviewOptions;
|
|
467
639
|
/**
|
|
468
|
-
*
|
|
640
|
+
* A flag indicating whether the build is for a Server-Side Rendering environment.
|
|
469
641
|
*/
|
|
470
|
-
|
|
642
|
+
ssr?: boolean;
|
|
471
643
|
/**
|
|
472
|
-
*
|
|
644
|
+
* Define if this environment is used for Server-Side Rendering
|
|
645
|
+
*
|
|
646
|
+
* @defaultValue "server" (if it isn't the client environment)
|
|
473
647
|
*/
|
|
474
|
-
|
|
648
|
+
consumer?: "client" | "server";
|
|
649
|
+
}
|
|
650
|
+
interface CommonUserConfig extends BaseConfig {
|
|
475
651
|
/**
|
|
476
|
-
* The
|
|
652
|
+
* The name of the project
|
|
477
653
|
*/
|
|
478
|
-
|
|
654
|
+
name?: string;
|
|
479
655
|
/**
|
|
480
|
-
* The
|
|
656
|
+
* The project display title
|
|
657
|
+
*
|
|
658
|
+
* @remarks
|
|
659
|
+
* This option is used in documentation generation and other places where a human-readable title is needed.
|
|
481
660
|
*/
|
|
482
|
-
|
|
661
|
+
title?: string;
|
|
483
662
|
/**
|
|
484
|
-
*
|
|
663
|
+
* A description of the project
|
|
664
|
+
*
|
|
665
|
+
* @remarks
|
|
666
|
+
* If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
|
|
485
667
|
*/
|
|
486
|
-
|
|
668
|
+
description?: string;
|
|
487
669
|
/**
|
|
488
|
-
* The
|
|
670
|
+
* The log level to use for the Powerlines processes.
|
|
671
|
+
*
|
|
672
|
+
* @defaultValue "info"
|
|
489
673
|
*/
|
|
490
|
-
|
|
674
|
+
logLevel?: LogLevelLabel | null;
|
|
491
675
|
/**
|
|
492
|
-
*
|
|
676
|
+
* A custom logger function to use for logging messages
|
|
493
677
|
*/
|
|
494
|
-
|
|
678
|
+
customLogger?: LogFn;
|
|
495
679
|
/**
|
|
496
|
-
*
|
|
680
|
+
* 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.
|
|
681
|
+
*
|
|
682
|
+
* @defaultValue "production"
|
|
497
683
|
*/
|
|
498
|
-
|
|
684
|
+
mode?: "development" | "test" | "production";
|
|
499
685
|
/**
|
|
500
|
-
* The
|
|
686
|
+
* The type of project being built
|
|
687
|
+
*
|
|
688
|
+
* @defaultValue "application"
|
|
501
689
|
*/
|
|
502
|
-
|
|
690
|
+
type?: ProjectType;
|
|
503
691
|
/**
|
|
504
|
-
* The
|
|
692
|
+
* The root directory of the project
|
|
505
693
|
*/
|
|
506
|
-
|
|
694
|
+
root: string;
|
|
507
695
|
/**
|
|
508
|
-
* The project's
|
|
696
|
+
* The root directory of the project's source code
|
|
697
|
+
*
|
|
698
|
+
* @defaultValue "\{root\}/src"
|
|
509
699
|
*/
|
|
510
|
-
|
|
700
|
+
sourceRoot?: string;
|
|
511
701
|
/**
|
|
512
|
-
*
|
|
513
|
-
*/
|
|
514
|
-
dependencies: Record<string, string | Range>;
|
|
515
|
-
/**
|
|
516
|
-
* The development dependency installations required by the project
|
|
517
|
-
*/
|
|
518
|
-
devDependencies: Record<string, string | Range>;
|
|
519
|
-
/**
|
|
520
|
-
* The parsed TypeScript configuration from the `tsconfig.json` file
|
|
521
|
-
*/
|
|
522
|
-
tsconfig: ParsedTypeScriptConfig;
|
|
523
|
-
/**
|
|
524
|
-
* The entry points of the source code
|
|
525
|
-
*/
|
|
526
|
-
entry: ResolvedEntryTypeDefinition[];
|
|
527
|
-
/**
|
|
528
|
-
* The virtual file system manager used during the build process to reference generated runtime files
|
|
529
|
-
*/
|
|
530
|
-
fs: VirtualFileSystemInterface;
|
|
531
|
-
/**
|
|
532
|
-
* The Jiti module resolver
|
|
533
|
-
*/
|
|
534
|
-
resolver: Resolver;
|
|
535
|
-
/**
|
|
536
|
-
* The builtin module id that exist in the Powerlines virtual file system
|
|
537
|
-
*/
|
|
538
|
-
builtins: string[];
|
|
539
|
-
/**
|
|
540
|
-
* The {@link Project} instance used for type reflection and module manipulation
|
|
541
|
-
*
|
|
542
|
-
* @see https://ts-morph.com/
|
|
543
|
-
*
|
|
544
|
-
* @remarks
|
|
545
|
-
* This instance is created lazily on first access.
|
|
546
|
-
*/
|
|
547
|
-
program: Project;
|
|
548
|
-
/**
|
|
549
|
-
* A helper function to resolve modules using the Jiti resolver
|
|
702
|
+
* A path to a custom configuration file to be used instead of the default `storm.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
|
|
550
703
|
*
|
|
551
704
|
* @remarks
|
|
552
|
-
* This
|
|
553
|
-
*
|
|
554
|
-
* @example
|
|
555
|
-
* ```ts
|
|
556
|
-
* const resolvedPath = await context.resolve("some-module", "/path/to/importer");
|
|
557
|
-
* ```
|
|
558
|
-
*
|
|
559
|
-
* @param id - The module to resolve.
|
|
560
|
-
* @param importer - An optional path to the importer module.
|
|
561
|
-
* @param options - Additional resolution options.
|
|
562
|
-
* @returns A promise that resolves to the resolved module path.
|
|
705
|
+
* This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
|
|
563
706
|
*/
|
|
564
|
-
|
|
707
|
+
configFile?: string;
|
|
565
708
|
/**
|
|
566
|
-
*
|
|
709
|
+
* Should the Powerlines CLI processes skip installing missing packages?
|
|
567
710
|
*
|
|
568
711
|
* @remarks
|
|
569
|
-
* This
|
|
570
|
-
*
|
|
571
|
-
* @example
|
|
572
|
-
* ```ts
|
|
573
|
-
* const module = await context.load("some-module", "/path/to/importer");
|
|
574
|
-
* ```
|
|
575
|
-
*
|
|
576
|
-
* @param id - The module to load.
|
|
577
|
-
* @returns A promise that resolves to the loaded module.
|
|
578
|
-
*/
|
|
579
|
-
load: (id: string) => Promise<TransformResult | undefined>;
|
|
580
|
-
/**
|
|
581
|
-
* The Powerlines builtin virtual files
|
|
582
|
-
*/
|
|
583
|
-
getBuiltins: () => Promise<VirtualFile[]>;
|
|
584
|
-
/**
|
|
585
|
-
* Resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
712
|
+
* This option is useful for CI/CD environments where the installation of packages is handled by a different process.
|
|
586
713
|
*
|
|
587
|
-
* @
|
|
588
|
-
* @param id - The unique identifier of the builtin file
|
|
589
|
-
* @param path - An optional path to write the builtin file to
|
|
590
|
-
* @param options - Options for writing the file
|
|
714
|
+
* @defaultValue false
|
|
591
715
|
*/
|
|
592
|
-
|
|
716
|
+
skipInstalls?: boolean;
|
|
593
717
|
/**
|
|
594
|
-
*
|
|
718
|
+
* Should the compiler processes skip any improvements that make use of cache?
|
|
595
719
|
*
|
|
596
|
-
* @
|
|
597
|
-
* @param path - An optional path to write the entry file to
|
|
598
|
-
* @param options - Options for writing the file
|
|
599
|
-
*/
|
|
600
|
-
emitEntry: (code: string, path: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
|
|
601
|
-
/**
|
|
602
|
-
* A function to update the context fields using a new user configuration options
|
|
720
|
+
* @defaultValue false
|
|
603
721
|
*/
|
|
604
|
-
|
|
722
|
+
skipCache?: boolean;
|
|
605
723
|
/**
|
|
606
|
-
* A
|
|
724
|
+
* A list of resolvable paths to plugins used during the build process
|
|
607
725
|
*/
|
|
608
|
-
|
|
726
|
+
plugins?: PluginConfig<PluginContext<any>>[];
|
|
609
727
|
/**
|
|
610
|
-
*
|
|
611
|
-
*
|
|
612
|
-
* @param name - The name to use for the logger instance
|
|
613
|
-
* @returns A logger function
|
|
728
|
+
* Environment-specific configurations
|
|
614
729
|
*/
|
|
615
|
-
|
|
730
|
+
environments?: Record<string, EnvironmentConfig>;
|
|
616
731
|
/**
|
|
617
|
-
*
|
|
732
|
+
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
618
733
|
*
|
|
619
|
-
* @
|
|
620
|
-
* @
|
|
621
|
-
*/
|
|
622
|
-
extendLog: (name: string) => LogFn;
|
|
623
|
-
/**
|
|
624
|
-
* Generates a checksum representing the current context state
|
|
734
|
+
* @remarks
|
|
735
|
+
* 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.
|
|
625
736
|
*
|
|
626
|
-
* @
|
|
737
|
+
* @defaultValue "powerlines"
|
|
627
738
|
*/
|
|
628
|
-
|
|
739
|
+
framework?: string;
|
|
629
740
|
}
|
|
630
|
-
type
|
|
741
|
+
type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = Omit<CommonUserConfig, "build"> & {
|
|
631
742
|
/**
|
|
632
|
-
*
|
|
743
|
+
* Configuration provided to build processes
|
|
744
|
+
*
|
|
745
|
+
* @remarks
|
|
746
|
+
* This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
|
|
633
747
|
*/
|
|
634
|
-
|
|
748
|
+
build: Omit<TBuildConfig, "override"> & {
|
|
749
|
+
/**
|
|
750
|
+
* The build variant being used by the Powerlines engine.
|
|
751
|
+
*/
|
|
752
|
+
variant?: TBuildVariant;
|
|
753
|
+
/**
|
|
754
|
+
* An optional set of override options to apply to the selected build variant.
|
|
755
|
+
*
|
|
756
|
+
* @remarks
|
|
757
|
+
* This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
|
|
758
|
+
*/
|
|
759
|
+
override?: Partial<TBuildResolvedConfig>;
|
|
760
|
+
};
|
|
635
761
|
};
|
|
636
|
-
|
|
762
|
+
type WebpackUserConfig = UserConfig<WebpackBuildConfig, WebpackResolvedBuildConfig, "webpack">;
|
|
763
|
+
type RspackUserConfig = UserConfig<RspackBuildConfig, RspackResolvedBuildConfig, "rspack">;
|
|
764
|
+
type RollupUserConfig = UserConfig<RollupBuildConfig, RollupResolvedBuildConfig, "rollup">;
|
|
765
|
+
type RolldownUserConfig = UserConfig<RolldownBuildConfig, RolldownResolvedBuildConfig, "rolldown">;
|
|
766
|
+
type ViteUserConfig = UserConfig<ViteBuildConfig, ViteResolvedBuildConfig, "vite">;
|
|
767
|
+
type ESBuildUserConfig = UserConfig<ESBuildBuildConfig, ESBuildResolvedBuildConfig, "esbuild">;
|
|
768
|
+
type UnbuildUserConfig = UserConfig<UnbuildBuildConfig, UnbuildResolvedBuildConfig, "unbuild">;
|
|
769
|
+
type TsupUserConfig = UserConfig<TsupBuildConfig, TsupResolvedBuildConfig, "tsup">;
|
|
770
|
+
type FarmUserConfig = UserConfig<FarmBuildConfig, FarmResolvedBuildConfig, "farm">;
|
|
771
|
+
type InferUserConfig<TBuildVariant extends BuildVariant | undefined> = TBuildVariant extends "webpack" ? WebpackUserConfig : TBuildVariant extends "rspack" ? RspackUserConfig : TBuildVariant extends "vite" ? ViteUserConfig : TBuildVariant extends "esbuild" ? ESBuildUserConfig : TBuildVariant extends "unbuild" ? UnbuildUserConfig : TBuildVariant extends "tsup" ? TsupUserConfig : TBuildVariant extends "rolldown" ? RolldownUserConfig : TBuildVariant extends "rollup" ? RollupUserConfig : TBuildVariant extends "farm" ? FarmUserConfig : UserConfig;
|
|
772
|
+
type InitialUserConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
|
|
773
|
+
root: string;
|
|
774
|
+
};
|
|
775
|
+
type ParsedUserConfig<TUserConfig extends UserConfig = UserConfig> = TUserConfig & ResolvedConfig$1<TUserConfig> & {
|
|
637
776
|
/**
|
|
638
|
-
* The
|
|
777
|
+
* The path to the user configuration file, if it exists.
|
|
639
778
|
*
|
|
640
779
|
* @remarks
|
|
641
|
-
* This is
|
|
780
|
+
* This is typically the `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` file in the project root.
|
|
642
781
|
*/
|
|
643
|
-
|
|
782
|
+
configFile?: ConfigLayer<TUserConfig>["configFile"];
|
|
783
|
+
};
|
|
784
|
+
type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
|
|
785
|
+
/**
|
|
786
|
+
* The configuration provided while executing Powerlines commands.
|
|
787
|
+
*/
|
|
788
|
+
type InlineConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
|
|
644
789
|
/**
|
|
645
|
-
* A
|
|
790
|
+
* A string identifier for the Powerlines command being executed
|
|
646
791
|
*/
|
|
647
|
-
|
|
792
|
+
command: PowerlinesCommand;
|
|
793
|
+
};
|
|
794
|
+
type NewInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & Required<Pick<InlineConfig<TUserConfig>, "root">> & {
|
|
648
795
|
/**
|
|
649
|
-
* A
|
|
796
|
+
* A string identifier for the Powerlines command being executed
|
|
650
797
|
*/
|
|
651
|
-
|
|
798
|
+
command: "new";
|
|
652
799
|
/**
|
|
653
|
-
*
|
|
654
|
-
*
|
|
655
|
-
* @throws Will throw an error if the environment does not exist
|
|
656
|
-
*
|
|
657
|
-
* @param name - The name of the environment to retrieve. If not provided, the default environment is returned.
|
|
658
|
-
* @returns A promise that resolves to the environment context.
|
|
659
|
-
*
|
|
660
|
-
* @example
|
|
661
|
-
* ```ts
|
|
662
|
-
* const devEnv = await apiContext.getEnvironment("development");
|
|
663
|
-
* const defaultEnv = await apiContext.getEnvironment();
|
|
664
|
-
* ```
|
|
800
|
+
* The package name (from the \`package.json\`) for the project that will be used in the \`new\` command to create a new project based on this configuration
|
|
665
801
|
*/
|
|
666
|
-
|
|
802
|
+
packageName?: string;
|
|
803
|
+
};
|
|
804
|
+
type CleanInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
|
|
667
805
|
/**
|
|
668
|
-
*
|
|
669
|
-
*
|
|
670
|
-
* @param name - The name of the environment to retrieve. If not provided, the default environment is returned.
|
|
671
|
-
* @returns A promise that resolves to the environment context, or undefined if the environment does not exist.
|
|
672
|
-
*
|
|
673
|
-
* @example
|
|
674
|
-
* ```ts
|
|
675
|
-
* const devEnv = await apiContext.getEnvironmentSafe("development");
|
|
676
|
-
* const defaultEnv = await apiContext.getEnvironmentSafe();
|
|
677
|
-
* ```
|
|
678
|
-
*
|
|
679
|
-
* @remarks
|
|
680
|
-
* This method is similar to `getEnvironment`, but it returns `undefined` instead of throwing an error if the specified environment does not exist.
|
|
681
|
-
* This can be useful in scenarios where the existence of an environment is optional or uncertain.
|
|
682
|
-
*
|
|
683
|
-
* ```ts
|
|
684
|
-
* const testEnv = await apiContext.getEnvironmentSafe("test");
|
|
685
|
-
* if (testEnv) {
|
|
686
|
-
* // Environment exists, safe to use it
|
|
687
|
-
* } else {
|
|
688
|
-
* // Environment does not exist, handle accordingly
|
|
689
|
-
* }
|
|
690
|
-
* ```
|
|
691
|
-
*
|
|
692
|
-
* Using this method helps avoid unhandled exceptions in cases where an environment might not be defined.
|
|
806
|
+
* A string identifier for the Powerlines command being executed
|
|
693
807
|
*/
|
|
694
|
-
|
|
808
|
+
command: "clean";
|
|
809
|
+
};
|
|
810
|
+
type PrepareInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
|
|
695
811
|
/**
|
|
696
|
-
* A
|
|
697
|
-
*
|
|
698
|
-
* @param environment - The environment configuration to use.
|
|
699
|
-
* @returns A new context instance with the updated environment.
|
|
812
|
+
* A string identifier for the Powerlines command being executed
|
|
700
813
|
*/
|
|
701
|
-
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
plugin: Plugin<PluginContext<TResolvedConfig>>;
|
|
705
|
-
context: PluginContext<TResolvedConfig>;
|
|
706
|
-
}
|
|
707
|
-
interface EnvironmentContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
|
|
814
|
+
command: "prepare";
|
|
815
|
+
};
|
|
816
|
+
type BuildInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
|
|
708
817
|
/**
|
|
709
|
-
*
|
|
710
|
-
*
|
|
711
|
-
* @remarks
|
|
712
|
-
* This is a record of plugin identifiers to their respective options. This field is populated by the Powerlines engine during both plugin initialization and the `init` command.
|
|
818
|
+
* A string identifier for the Powerlines command being executed
|
|
713
819
|
*/
|
|
714
|
-
|
|
820
|
+
command: "build";
|
|
821
|
+
};
|
|
822
|
+
type LintInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
|
|
715
823
|
/**
|
|
716
|
-
* A
|
|
824
|
+
* A string identifier for the Powerlines command being executed
|
|
717
825
|
*/
|
|
718
|
-
|
|
826
|
+
command: "lint";
|
|
827
|
+
};
|
|
828
|
+
type DocsInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
|
|
719
829
|
/**
|
|
720
|
-
*
|
|
830
|
+
* A string identifier for the Powerlines command being executed
|
|
721
831
|
*/
|
|
722
|
-
|
|
832
|
+
command: "docs";
|
|
833
|
+
};
|
|
834
|
+
type DeployInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
|
|
723
835
|
/**
|
|
724
|
-
* A
|
|
836
|
+
* A string identifier for the Powerlines command being executed
|
|
725
837
|
*/
|
|
726
|
-
|
|
727
|
-
/**
|
|
728
|
-
* Retrieves the hook handlers for a specific hook name
|
|
729
|
-
*/
|
|
730
|
-
selectHooks: <TKey extends HookKeys<PluginContext<TResolvedConfig>>>(hook: TKey, options?: SelectHooksOptions) => Hooks[TKey][];
|
|
731
|
-
}
|
|
732
|
-
interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
|
|
733
|
-
/**
|
|
734
|
-
* The environment specific resolved configuration
|
|
735
|
-
*/
|
|
736
|
-
environment: EnvironmentResolvedConfig;
|
|
737
|
-
/**
|
|
738
|
-
* An alternative property name for the {@link log} property
|
|
739
|
-
*
|
|
740
|
-
* @remarks
|
|
741
|
-
* This is provided for compatibility with other logging libraries that expect a `logger` property.
|
|
742
|
-
*/
|
|
743
|
-
logger: LogFn;
|
|
744
|
-
}
|
|
745
|
-
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = PluginContext<TResolvedConfig> & Omit<UnpluginBuildContext, "parse">;
|
|
746
|
-
interface SerializedVirtualFileSystem {
|
|
747
|
-
virtualFiles: DirectoryJSON;
|
|
748
|
-
virtualFilesMeta: Record<string, Partial<VirtualFileMetadata>>;
|
|
749
|
-
}
|
|
750
|
-
declare type __ΩLogLevel = any[];
|
|
751
|
-
declare type __ΩWorkerProcess = any[];
|
|
752
|
-
declare type __ΩMetaInfo = any[];
|
|
753
|
-
declare type __ΩResolver = any[];
|
|
754
|
-
declare type __ΩTransformResult = any[];
|
|
755
|
-
declare type __ΩSourceFile = any[];
|
|
756
|
-
declare type __ΩUnimportContext = any[];
|
|
757
|
-
declare type __ΩSelectHooksOptions = any[];
|
|
758
|
-
declare type __ΩInitContextOptions = any[];
|
|
759
|
-
declare type __ΩUnresolvedContext = any[];
|
|
760
|
-
declare type __ΩContext = any[];
|
|
761
|
-
declare type __ΩAPIContext = any[];
|
|
762
|
-
declare type __ΩEnvironmentContextPlugin = any[];
|
|
763
|
-
declare type __ΩEnvironmentContext = any[];
|
|
764
|
-
declare type __ΩPluginContext = any[];
|
|
765
|
-
declare type __ΩBuildPluginContext = any[];
|
|
766
|
-
declare type __ΩSerializedVirtualFileSystem = any[];
|
|
767
|
-
|
|
768
|
-
interface NamedImportDefinition {
|
|
769
|
-
name: string;
|
|
770
|
-
source: string;
|
|
771
|
-
kind: "named";
|
|
772
|
-
}
|
|
773
|
-
interface DefaultImportDefinition {
|
|
774
|
-
source: string;
|
|
775
|
-
kind: "default";
|
|
776
|
-
}
|
|
777
|
-
type ImportDefinition = NamedImportDefinition | DefaultImportDefinition;
|
|
778
|
-
type BabelPluginPass<TState = unknown> = PluginPass & TState;
|
|
779
|
-
type BabelTransformPluginFilter = (code: string, id: string) => boolean;
|
|
780
|
-
type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
|
|
781
|
-
name: string;
|
|
782
|
-
log: LogFn;
|
|
783
|
-
api: BabelAPI;
|
|
784
|
-
options: TOptions;
|
|
785
|
-
context: TContext;
|
|
786
|
-
dirname: string;
|
|
787
|
-
}) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
|
|
788
|
-
$$name: string;
|
|
838
|
+
command: "deploy";
|
|
789
839
|
};
|
|
790
|
-
type
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
type
|
|
796
|
-
BabelTransformPlugin<TContext, TOptions, TState>,
|
|
797
|
-
TOptions,
|
|
798
|
-
BabelTransformPluginFilter | null
|
|
799
|
-
];
|
|
800
|
-
type BabelTransformInput = Omit<TransformOptions & Required<Pick<TransformOptions, "presets" | "plugins">>, "filename" | "root" | "sourceFileName" | "sourceMaps" | "inputSourceMap">;
|
|
801
|
-
interface BabelTransformPluginBuilderParams<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>> {
|
|
802
|
-
name: string;
|
|
803
|
-
log: LogFn;
|
|
804
|
-
api: BabelAPI;
|
|
805
|
-
options: TOptions;
|
|
806
|
-
context: TContext;
|
|
807
|
-
dirname: string;
|
|
808
|
-
}
|
|
809
|
-
type BabelTransformPluginBuilder<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = any> = (params: BabelTransformPluginBuilderParams<TContext, TOptions>) => PluginObj<TState & BabelPluginPass<TOptions>>;
|
|
810
|
-
type DeclareBabelTransformPluginReturn<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = any> = Omit<BabelTransformPlugin<TContext, TOptions, TState>, "$$name"> & Required<Pick<BabelTransformPlugin<TContext, TOptions, TState>, "$$name">>;
|
|
840
|
+
type ConfigEnv = Pick<ResolvedConfig$2, "command" | "mode" | "environments" | "preview">;
|
|
841
|
+
type AnyUserConfig = Record<string, any> & (Partial<UserConfig> | Partial<WebpackUserConfig> | Partial<RspackUserConfig> | Partial<ViteUserConfig> | Partial<ESBuildUserConfig> | Partial<UnbuildUserConfig> | Partial<TsupUserConfig> | Partial<RolldownUserConfig> | Partial<RollupUserConfig> | Partial<FarmUserConfig>);
|
|
842
|
+
type UserConfigFnObject = (env: ConfigEnv) => DeepPartial$1<UserConfig>;
|
|
843
|
+
type UserConfigFnPromise = (env: ConfigEnv) => Promise<DeepPartial$1<UserConfig>>;
|
|
844
|
+
type UserConfigFn = (env: ConfigEnv) => UserConfig | Promise<DeepPartial$1<UserConfig>>;
|
|
845
|
+
type UserConfigExport = DeepPartial$1<UserConfig> | Promise<DeepPartial$1<UserConfig>> | UserConfigFnObject | UserConfigFnPromise | UserConfigFn;
|
|
811
846
|
/**
|
|
812
|
-
*
|
|
813
|
-
*
|
|
814
|
-
* @example
|
|
815
|
-
* ```typescript
|
|
816
|
-
* import { bar as baz } from 'foo';
|
|
817
|
-
* // { name: 'baz', module: 'foo', imported: 'bar' }
|
|
818
|
-
* ```
|
|
819
|
-
*
|
|
820
|
-
* @remarks
|
|
821
|
-
* It captures the details of an import statement, including the local name used in the module, the source module from which it is imported, and the original name of the export in the source module.
|
|
847
|
+
* An empty interface to allow augmentation of the defineConfig input type.
|
|
822
848
|
*/
|
|
823
|
-
interface
|
|
824
|
-
name?: string;
|
|
825
|
-
module: string;
|
|
826
|
-
imported: string;
|
|
849
|
+
interface DefineConfigInput {
|
|
827
850
|
}
|
|
828
|
-
declare type __Ω
|
|
829
|
-
declare type __Ω
|
|
830
|
-
declare type __Ω
|
|
831
|
-
declare type __Ω
|
|
832
|
-
declare type __Ω
|
|
833
|
-
declare type __Ω
|
|
834
|
-
declare type __Ω
|
|
835
|
-
declare type __Ω
|
|
836
|
-
declare type __Ω
|
|
837
|
-
declare type __Ω
|
|
838
|
-
declare type __Ω
|
|
839
|
-
declare type __Ω
|
|
840
|
-
declare type __Ω
|
|
851
|
+
declare type __ΩLogFn = any[];
|
|
852
|
+
declare type __ΩWorkspaceConfig = any[];
|
|
853
|
+
declare type __ΩPluginFactory = any[];
|
|
854
|
+
declare type __ΩPluginConfigTuple = any[];
|
|
855
|
+
declare type __ΩPluginConfigObject = any[];
|
|
856
|
+
declare type __ΩPluginConfig = any[];
|
|
857
|
+
declare type __ΩPartialPlugin = any[];
|
|
858
|
+
declare type __ΩPartialPluginFactory = any[];
|
|
859
|
+
declare type __ΩProjectType = any[];
|
|
860
|
+
declare type __ΩBabelUserConfig = any[];
|
|
861
|
+
declare type __ΩOutputConfig = any[];
|
|
862
|
+
declare type __ΩBaseConfig = any[];
|
|
863
|
+
declare type __ΩEnvironmentConfig = any[];
|
|
864
|
+
declare type __ΩCommonUserConfig = any[];
|
|
865
|
+
declare type __ΩUserConfig = any[];
|
|
866
|
+
declare type __ΩWebpackUserConfig = any[];
|
|
867
|
+
declare type __ΩRspackUserConfig = any[];
|
|
868
|
+
declare type __ΩRollupUserConfig = any[];
|
|
869
|
+
declare type __ΩRolldownUserConfig = any[];
|
|
870
|
+
declare type __ΩViteUserConfig = any[];
|
|
871
|
+
declare type __ΩESBuildUserConfig = any[];
|
|
872
|
+
declare type __ΩUnbuildUserConfig = any[];
|
|
873
|
+
declare type __ΩTsupUserConfig = any[];
|
|
874
|
+
declare type __ΩFarmUserConfig = any[];
|
|
875
|
+
declare type __ΩInferUserConfig = any[];
|
|
876
|
+
declare type __ΩInitialUserConfig = any[];
|
|
877
|
+
declare type __ΩParsedUserConfig = any[];
|
|
878
|
+
declare type __ΩPowerlinesCommand = any[];
|
|
879
|
+
declare type __ΩInlineConfig = any[];
|
|
880
|
+
declare type __ΩNewInlineConfig = any[];
|
|
881
|
+
declare type __ΩCleanInlineConfig = any[];
|
|
882
|
+
declare type __ΩPrepareInlineConfig = any[];
|
|
883
|
+
declare type __ΩBuildInlineConfig = any[];
|
|
884
|
+
declare type __ΩLintInlineConfig = any[];
|
|
885
|
+
declare type __ΩDocsInlineConfig = any[];
|
|
886
|
+
declare type __ΩDeployInlineConfig = any[];
|
|
887
|
+
declare type __ΩConfigEnv = any[];
|
|
888
|
+
declare type __ΩAnyUserConfig = any[];
|
|
889
|
+
declare type __ΩUserConfigFnObject = any[];
|
|
890
|
+
declare type __ΩUserConfigFnPromise = any[];
|
|
891
|
+
declare type __ΩUserConfigFn = any[];
|
|
892
|
+
declare type __ΩUserConfigExport = any[];
|
|
893
|
+
declare type __ΩDefineConfigInput = any[];
|
|
841
894
|
|
|
842
|
-
type
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
type
|
|
847
|
-
type
|
|
848
|
-
|
|
849
|
-
* A configuration tuple for a Powerlines plugin.
|
|
850
|
-
*/
|
|
851
|
-
type PluginConfigTuple<TContext extends PluginContext = PluginContext, TOptions = any> = [string | PluginFactory<TContext, TOptions>, TOptions] | [Plugin<TContext>];
|
|
852
|
-
/**
|
|
853
|
-
* A configuration object for a Powerlines plugin.
|
|
854
|
-
*/
|
|
855
|
-
type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions = any> = {
|
|
856
|
-
plugin: string | PluginFactory<TContext, TOptions>;
|
|
857
|
-
options: TOptions;
|
|
858
|
-
} | {
|
|
895
|
+
type BaseHooks<TContext extends PluginContext = PluginContext> = BasePluginHookFunctions<TContext>;
|
|
896
|
+
type BaseHookKeys<TContext extends PluginContext = PluginContext> = keyof BaseHooks<TContext>;
|
|
897
|
+
type ExternalHooks<TContext extends PluginContext = PluginContext> = ExternalPluginHookFunctions<TContext>;
|
|
898
|
+
type ExternalHookKeys<TContext extends PluginContext = PluginContext> = keyof ExternalHooks<TContext>;
|
|
899
|
+
type Hooks<TContext extends PluginContext = PluginContext> = PluginHookFunctions<TContext>;
|
|
900
|
+
type HookKeys<TContext extends PluginContext = PluginContext> = keyof Hooks<TContext>;
|
|
901
|
+
interface BaseHooksListItem<TContext extends PluginContext = PluginContext, TKey extends BaseHookKeys<TContext> = BaseHookKeys<TContext>> extends PluginHookObject<BaseHooks<TContext>[TKey]> {
|
|
859
902
|
plugin: Plugin<TContext>;
|
|
860
|
-
|
|
903
|
+
}
|
|
904
|
+
interface BaseHooksList<TContext extends PluginContext = PluginContext, TKey extends BaseHookKeys<TContext> = BaseHookKeys<TContext>> {
|
|
905
|
+
preOrdered?: BaseHooksListItem<TContext, TKey>[];
|
|
906
|
+
preEnforced?: BaseHooksListItem<TContext, TKey>[];
|
|
907
|
+
normal?: BaseHooksListItem<TContext, TKey>[];
|
|
908
|
+
postEnforced?: BaseHooksListItem<TContext, TKey>[];
|
|
909
|
+
postOrdered?: BaseHooksListItem<TContext, TKey>[];
|
|
910
|
+
}
|
|
911
|
+
interface ExternalHooksListItem<TContext extends PluginContext = PluginContext, TKey extends ExternalHookKeys<TContext> = ExternalHookKeys<TContext>> {
|
|
912
|
+
plugin: Plugin<TContext>;
|
|
913
|
+
handler: ExternalHooks<TContext>[TKey];
|
|
914
|
+
}
|
|
915
|
+
type HooksList<TContext extends PluginContext = PluginContext> = {
|
|
916
|
+
[TKey in BaseHookKeys<TContext>]?: BaseHooksList<TContext, TKey>;
|
|
917
|
+
} & {
|
|
918
|
+
[TKey in ExternalHookKeys<TContext>]?: ExternalHooksListItem<TContext, TKey>[];
|
|
861
919
|
};
|
|
920
|
+
type InferHookHandler<TContext extends PluginContext, TKey extends HookKeys<TContext>> = Hooks<TContext>[TKey];
|
|
921
|
+
type InferHookReturnType<TContext extends PluginContext, TKey extends HookKeys<TContext>> = ReturnType<InferHookHandler<TContext, TKey>> extends Promise<infer U> ? U extends Promise<infer V> ? V : U : ReturnType<InferHookHandler<TContext, TKey>>;
|
|
922
|
+
type InferHookParameters<TContext extends PluginContext, TKey extends HookKeys<TContext>> = Parameters<InferHookHandler<TContext, TKey>>;
|
|
923
|
+
type InferHookThisType<TContext extends PluginContext, TKey extends HookKeys<TContext>> = ThisParameterType<InferHookHandler<TContext, TKey>>;
|
|
924
|
+
declare type __ΩBaseHooks = any[];
|
|
925
|
+
declare type __ΩBaseHookKeys = any[];
|
|
926
|
+
declare type __ΩExternalHooks = any[];
|
|
927
|
+
declare type __ΩExternalHookKeys = any[];
|
|
928
|
+
declare type __ΩHooks = any[];
|
|
929
|
+
declare type __ΩHookKeys = any[];
|
|
930
|
+
declare type __ΩBaseHooksListItem = any[];
|
|
931
|
+
declare type __ΩBaseHooksList = any[];
|
|
932
|
+
declare type __ΩExternalHooksListItem = any[];
|
|
933
|
+
declare type __ΩHooksList = any[];
|
|
934
|
+
declare type __ΩInferHookHandler = any[];
|
|
935
|
+
declare type __ΩInferHookReturnType = any[];
|
|
936
|
+
declare type __ΩInferHookParameters = any[];
|
|
937
|
+
declare type __ΩInferHookThisType = any[];
|
|
938
|
+
|
|
862
939
|
/**
|
|
863
|
-
*
|
|
940
|
+
* The severity level of a {@link LogRecord}.
|
|
864
941
|
*/
|
|
865
|
-
type
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
942
|
+
type LogLevel = "debug" | "info" | "warning" | "error" | "fatal";
|
|
943
|
+
declare const LogLevel: {
|
|
944
|
+
DEBUG: LogLevel;
|
|
945
|
+
INFO: LogLevel;
|
|
946
|
+
WARNING: LogLevel;
|
|
947
|
+
ERROR: LogLevel;
|
|
948
|
+
FATAL: LogLevel;
|
|
949
|
+
};
|
|
950
|
+
type WorkerProcess<TExposedMethods extends ReadonlyArray<string>> = {
|
|
951
|
+
[K in TExposedMethods[number]]: (data: any) => Promise<any>;
|
|
952
|
+
} & {
|
|
953
|
+
close: () => void;
|
|
954
|
+
end: () => ReturnType<Worker["end"]>;
|
|
955
|
+
};
|
|
956
|
+
interface MetaInfo {
|
|
870
957
|
/**
|
|
871
|
-
* The
|
|
958
|
+
* The checksum generated from the resolved options
|
|
872
959
|
*/
|
|
873
|
-
|
|
960
|
+
checksum: string;
|
|
874
961
|
/**
|
|
875
|
-
* The
|
|
962
|
+
* The build id
|
|
876
963
|
*/
|
|
877
|
-
|
|
878
|
-
};
|
|
879
|
-
interface OutputConfig {
|
|
964
|
+
buildId: string;
|
|
880
965
|
/**
|
|
881
|
-
* The
|
|
882
|
-
*
|
|
883
|
-
* @remarks
|
|
884
|
-
* If a value is not provided, Powerlines will attempt to:
|
|
885
|
-
* 1. Use the `outDir` value in the `tsconfig.json` file.
|
|
886
|
-
* 2. Use the `dist` directory in the project root directory.
|
|
887
|
-
*
|
|
888
|
-
* @defaultValue "dist/\{projectRoot\}"
|
|
966
|
+
* The release id
|
|
889
967
|
*/
|
|
890
|
-
|
|
968
|
+
releaseId: string;
|
|
891
969
|
/**
|
|
892
|
-
* The
|
|
893
|
-
*
|
|
894
|
-
* @remarks
|
|
895
|
-
* This path is used to determine where the built files will be placed after the build process completes. This will be used in scenarios where the monorepo uses TSConfig paths to link packages together.
|
|
896
|
-
*
|
|
897
|
-
* @defaultValue "\{projectRoot\}/dist"
|
|
970
|
+
* The build timestamp
|
|
898
971
|
*/
|
|
899
|
-
|
|
972
|
+
timestamp: number;
|
|
900
973
|
/**
|
|
901
|
-
*
|
|
902
|
-
*
|
|
903
|
-
* @defaultValue "virtual"
|
|
974
|
+
* A hash that represents the path to the project root directory
|
|
904
975
|
*/
|
|
905
|
-
|
|
976
|
+
projectRootHash: string;
|
|
906
977
|
/**
|
|
907
|
-
*
|
|
908
|
-
*
|
|
909
|
-
* @defaultValue "\{projectRoot\}/powerlines.d.ts"
|
|
978
|
+
* A hash that represents the path to the project root directory
|
|
910
979
|
*/
|
|
911
|
-
|
|
980
|
+
configHash: string;
|
|
981
|
+
}
|
|
982
|
+
interface Resolver extends Jiti {
|
|
983
|
+
plugin: Jiti;
|
|
984
|
+
}
|
|
985
|
+
interface TransformResult {
|
|
986
|
+
code: string;
|
|
987
|
+
map: SourceMap | null;
|
|
988
|
+
}
|
|
989
|
+
/**
|
|
990
|
+
* The format for providing source code to the compiler
|
|
991
|
+
*/
|
|
992
|
+
interface SourceFile {
|
|
912
993
|
/**
|
|
913
|
-
*
|
|
914
|
-
*
|
|
915
|
-
* @remarks
|
|
916
|
-
* This prefix will be used to identify all builtin modules generated during the "prepare" phase. An example builtin ID for a module called `"utils"` would be `"{builtinPrefix}:utils"`.
|
|
917
|
-
*
|
|
918
|
-
* @defaultValue "powerlines"
|
|
994
|
+
* The name of the file to be compiled
|
|
919
995
|
*/
|
|
920
|
-
|
|
996
|
+
id: string;
|
|
921
997
|
/**
|
|
922
|
-
* The
|
|
923
|
-
*
|
|
924
|
-
* @remarks
|
|
925
|
-
* This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
|
|
926
|
-
*
|
|
927
|
-
* @defaultValue "\{projectRoot\}/.powerlines"
|
|
998
|
+
* The source code to be compiled
|
|
928
999
|
*/
|
|
929
|
-
|
|
1000
|
+
code: MagicString;
|
|
930
1001
|
/**
|
|
931
|
-
* The
|
|
932
|
-
*
|
|
933
|
-
* @remarks
|
|
934
|
-
* This option can be a single format or an array of formats. If an array is provided, multiple builds will be generated for each format.
|
|
935
|
-
*
|
|
936
|
-
* @defaultValue "esm"
|
|
1002
|
+
* The environment variables used in the source code
|
|
937
1003
|
*/
|
|
938
|
-
|
|
1004
|
+
env: string[];
|
|
939
1005
|
/**
|
|
940
|
-
*
|
|
1006
|
+
* The result of the transformation
|
|
1007
|
+
*/
|
|
1008
|
+
result?: TransformResult;
|
|
1009
|
+
}
|
|
1010
|
+
type UnimportContext = Omit<Unimport, "injectImports"> & {
|
|
1011
|
+
dumpImports: () => Promise<void>;
|
|
1012
|
+
injectImports: (source: SourceFile) => Promise<SourceFile>;
|
|
1013
|
+
refreshRuntimeImports: () => Promise<void>;
|
|
1014
|
+
};
|
|
1015
|
+
interface SelectHooksOptions {
|
|
1016
|
+
order?: "pre" | "post" | "normal";
|
|
1017
|
+
}
|
|
1018
|
+
interface InitContextOptions {
|
|
1019
|
+
/**
|
|
1020
|
+
* If false, the plugin will be loaded after all other plugins.
|
|
941
1021
|
*
|
|
942
|
-
* @
|
|
943
|
-
* 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.
|
|
1022
|
+
* @defaultValue true
|
|
944
1023
|
*/
|
|
945
|
-
|
|
1024
|
+
isHighPriority: boolean;
|
|
946
1025
|
}
|
|
947
|
-
|
|
1026
|
+
/**
|
|
1027
|
+
* The unresolved Powerlines context.
|
|
1028
|
+
*
|
|
1029
|
+
* @remarks
|
|
1030
|
+
* This context is used before the user configuration has been fully resolved after the `config`.
|
|
1031
|
+
*/
|
|
1032
|
+
interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
948
1033
|
/**
|
|
949
|
-
* The
|
|
1034
|
+
* The Storm workspace configuration
|
|
950
1035
|
*/
|
|
951
|
-
|
|
1036
|
+
workspaceConfig: WorkspaceConfig;
|
|
952
1037
|
/**
|
|
953
|
-
*
|
|
954
|
-
*
|
|
955
|
-
* @remarks
|
|
956
|
-
* This option is used in documentation generation and other places where a human-readable title is needed.
|
|
1038
|
+
* An object containing the options provided to Powerlines
|
|
957
1039
|
*/
|
|
958
|
-
|
|
1040
|
+
config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
|
|
1041
|
+
projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
|
|
1042
|
+
output: TResolvedConfig["output"];
|
|
1043
|
+
};
|
|
959
1044
|
/**
|
|
960
|
-
* A
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
1045
|
+
* A logging function for the Powerlines engine
|
|
1046
|
+
*/
|
|
1047
|
+
log: LogFn;
|
|
1048
|
+
/**
|
|
1049
|
+
* A logging function for fatal messages
|
|
1050
|
+
*/
|
|
1051
|
+
fatal: (message: string | UnpluginMessage) => void;
|
|
1052
|
+
/**
|
|
1053
|
+
* A logging function for error messages
|
|
964
1054
|
*/
|
|
965
|
-
|
|
1055
|
+
error: (message: string | UnpluginMessage) => void;
|
|
966
1056
|
/**
|
|
967
|
-
*
|
|
968
|
-
*
|
|
969
|
-
* @defaultValue "info"
|
|
1057
|
+
* A logging function for warning messages
|
|
970
1058
|
*/
|
|
971
|
-
|
|
1059
|
+
warn: (message: string | UnpluginMessage) => void;
|
|
972
1060
|
/**
|
|
973
|
-
* A
|
|
1061
|
+
* A logging function for informational messages
|
|
974
1062
|
*/
|
|
975
|
-
|
|
1063
|
+
info: (message: string | UnpluginMessage) => void;
|
|
976
1064
|
/**
|
|
977
|
-
*
|
|
978
|
-
*
|
|
979
|
-
* @defaultValue "production"
|
|
1065
|
+
* A logging function for debug messages
|
|
980
1066
|
*/
|
|
981
|
-
|
|
1067
|
+
debug: (message: string | UnpluginMessage) => void;
|
|
982
1068
|
/**
|
|
983
|
-
*
|
|
1069
|
+
* A logging function for trace messages
|
|
984
1070
|
*/
|
|
985
|
-
|
|
1071
|
+
trace: (message: string | UnpluginMessage) => void;
|
|
986
1072
|
/**
|
|
987
|
-
*
|
|
1073
|
+
* The metadata information
|
|
988
1074
|
*/
|
|
989
|
-
|
|
1075
|
+
meta: MetaInfo;
|
|
990
1076
|
/**
|
|
991
|
-
*
|
|
992
|
-
*
|
|
993
|
-
* @remarks
|
|
994
|
-
* If set to `false`, linting will be disabled.
|
|
1077
|
+
* The metadata information currently written to disk
|
|
995
1078
|
*/
|
|
996
|
-
|
|
1079
|
+
persistedMeta?: MetaInfo;
|
|
997
1080
|
/**
|
|
998
|
-
*
|
|
999
|
-
*
|
|
1000
|
-
* @remarks
|
|
1001
|
-
* If set to `false`, testing will be disabled.
|
|
1081
|
+
* The Powerlines artifacts directory
|
|
1002
1082
|
*/
|
|
1003
|
-
|
|
1083
|
+
artifactsPath: string;
|
|
1004
1084
|
/**
|
|
1005
|
-
*
|
|
1085
|
+
* The path to the Powerlines builtin runtime modules directory
|
|
1006
1086
|
*/
|
|
1007
|
-
|
|
1087
|
+
builtinsPath: string;
|
|
1008
1088
|
/**
|
|
1009
|
-
*
|
|
1010
|
-
*
|
|
1011
|
-
* @remarks
|
|
1012
|
-
* This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
|
|
1089
|
+
* The path to the Powerlines entry modules directory
|
|
1013
1090
|
*/
|
|
1014
|
-
|
|
1091
|
+
entryPath: string;
|
|
1015
1092
|
/**
|
|
1016
|
-
*
|
|
1017
|
-
*
|
|
1018
|
-
* @remarks
|
|
1019
|
-
* This configuration will be used by the documentation generation plugins during the `docs` command.
|
|
1093
|
+
* The path to the Powerlines TypeScript declaration files directory
|
|
1020
1094
|
*/
|
|
1021
|
-
|
|
1095
|
+
dtsPath: string;
|
|
1022
1096
|
/**
|
|
1023
|
-
*
|
|
1024
|
-
*
|
|
1025
|
-
* @remarks
|
|
1026
|
-
* If set to `false`, the deployment will be disabled.
|
|
1097
|
+
* The path to a directory where the reflection data buffers (used by the build processes) are stored
|
|
1027
1098
|
*/
|
|
1028
|
-
|
|
1099
|
+
dataPath: string;
|
|
1029
1100
|
/**
|
|
1030
|
-
* The path to
|
|
1031
|
-
*
|
|
1032
|
-
* @remarks
|
|
1033
|
-
* If a value is not provided, the plugin will attempt to find the `tsconfig.json` file in the project root directory. The parsed tsconfig compiler options will be merged with the {@link Options.tsconfigRaw} value (if provided).
|
|
1034
|
-
*
|
|
1035
|
-
* @defaultValue "\{projectRoot\}/tsconfig.json"
|
|
1101
|
+
* The path to a directory where the project cache (used by the build processes) is stored
|
|
1036
1102
|
*/
|
|
1037
|
-
|
|
1103
|
+
cachePath: string;
|
|
1038
1104
|
/**
|
|
1039
|
-
* The
|
|
1040
|
-
*
|
|
1041
|
-
* @see https://www.typescriptlang.org/tsconfig
|
|
1042
|
-
*
|
|
1043
|
-
* @remarks
|
|
1044
|
-
* If populated, this option takes higher priority than `tsconfig`
|
|
1105
|
+
* The Powerlines environment paths
|
|
1045
1106
|
*/
|
|
1046
|
-
|
|
1047
|
-
}
|
|
1048
|
-
interface EnvironmentConfig extends BaseConfig {
|
|
1107
|
+
envPaths: EnvPaths;
|
|
1049
1108
|
/**
|
|
1050
|
-
*
|
|
1109
|
+
* The file system path to the Powerlines package installation
|
|
1051
1110
|
*/
|
|
1052
|
-
|
|
1111
|
+
powerlinesPath: string;
|
|
1053
1112
|
/**
|
|
1054
|
-
*
|
|
1113
|
+
* The relative path to the Powerlines workspace root directory
|
|
1055
1114
|
*/
|
|
1056
|
-
|
|
1115
|
+
relativeToWorkspaceRoot: string;
|
|
1057
1116
|
/**
|
|
1058
|
-
*
|
|
1059
|
-
*
|
|
1060
|
-
* @defaultValue "server" (if it isn't the client environment)
|
|
1117
|
+
* The project's `package.json` file content
|
|
1061
1118
|
*/
|
|
1062
|
-
|
|
1063
|
-
}
|
|
1064
|
-
interface CommonUserConfig extends BaseConfig {
|
|
1119
|
+
packageJson: PackageJson & Record<string, any>;
|
|
1065
1120
|
/**
|
|
1066
|
-
* The
|
|
1067
|
-
*
|
|
1068
|
-
* @defaultValue "application"
|
|
1121
|
+
* The project's `project.json` file content
|
|
1069
1122
|
*/
|
|
1070
|
-
|
|
1123
|
+
projectJson?: Record<string, any>;
|
|
1071
1124
|
/**
|
|
1072
|
-
* The
|
|
1125
|
+
* The dependency installations required by the project
|
|
1073
1126
|
*/
|
|
1074
|
-
|
|
1127
|
+
dependencies: Record<string, string | Range>;
|
|
1075
1128
|
/**
|
|
1076
|
-
* The
|
|
1077
|
-
*
|
|
1078
|
-
* @defaultValue "\{root\}/src"
|
|
1129
|
+
* The development dependency installations required by the project
|
|
1079
1130
|
*/
|
|
1080
|
-
|
|
1131
|
+
devDependencies: Record<string, string | Range>;
|
|
1081
1132
|
/**
|
|
1082
|
-
*
|
|
1083
|
-
*
|
|
1084
|
-
* @remarks
|
|
1085
|
-
* This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
|
|
1133
|
+
* The parsed TypeScript configuration from the `tsconfig.json` file
|
|
1086
1134
|
*/
|
|
1087
|
-
|
|
1135
|
+
tsconfig: ParsedTypeScriptConfig;
|
|
1088
1136
|
/**
|
|
1089
|
-
*
|
|
1090
|
-
*
|
|
1091
|
-
* @remarks
|
|
1092
|
-
* This option is useful for CI/CD environments where the installation of packages is handled by a different process.
|
|
1093
|
-
*
|
|
1094
|
-
* @defaultValue false
|
|
1137
|
+
* The entry points of the source code
|
|
1095
1138
|
*/
|
|
1096
|
-
|
|
1139
|
+
entry: ResolvedEntryTypeDefinition[];
|
|
1097
1140
|
/**
|
|
1098
|
-
*
|
|
1099
|
-
*
|
|
1100
|
-
* @defaultValue false
|
|
1141
|
+
* The virtual file system manager used during the build process to reference generated runtime files
|
|
1101
1142
|
*/
|
|
1102
|
-
|
|
1143
|
+
fs: VirtualFileSystemInterface;
|
|
1103
1144
|
/**
|
|
1104
|
-
*
|
|
1145
|
+
* The Jiti module resolver
|
|
1105
1146
|
*/
|
|
1106
|
-
|
|
1147
|
+
resolver: Resolver;
|
|
1107
1148
|
/**
|
|
1108
|
-
*
|
|
1149
|
+
* The builtin module id that exist in the Powerlines virtual file system
|
|
1109
1150
|
*/
|
|
1110
|
-
|
|
1151
|
+
builtins: string[];
|
|
1111
1152
|
/**
|
|
1112
|
-
*
|
|
1153
|
+
* The {@link Project} instance used for type reflection and module manipulation
|
|
1113
1154
|
*
|
|
1114
|
-
* @
|
|
1115
|
-
* If no values are provided for {@link OutputConfig.dts | output.dts}, {@link OutputConfig.builtinPrefix | output.builtinPrefix}, or {@link OutputConfig.artifactsFolder | output.artifactsFolder}, this value will be used as the default.
|
|
1155
|
+
* @see https://ts-morph.com/
|
|
1116
1156
|
*
|
|
1117
|
-
* @
|
|
1157
|
+
* @remarks
|
|
1158
|
+
* This instance is created lazily on first access.
|
|
1118
1159
|
*/
|
|
1119
|
-
|
|
1120
|
-
}
|
|
1121
|
-
type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = Omit<CommonUserConfig, "build"> & {
|
|
1160
|
+
program: Project;
|
|
1122
1161
|
/**
|
|
1123
|
-
*
|
|
1162
|
+
* A helper function to resolve modules using the Jiti resolver
|
|
1124
1163
|
*
|
|
1125
1164
|
* @remarks
|
|
1126
|
-
* This
|
|
1165
|
+
* This function can be used to resolve modules relative to the project root directory.
|
|
1166
|
+
*
|
|
1167
|
+
* @example
|
|
1168
|
+
* ```ts
|
|
1169
|
+
* const resolvedPath = await context.resolve("some-module", "/path/to/importer");
|
|
1170
|
+
* ```
|
|
1171
|
+
*
|
|
1172
|
+
* @param id - The module to resolve.
|
|
1173
|
+
* @param importer - An optional path to the importer module.
|
|
1174
|
+
* @param options - Additional resolution options.
|
|
1175
|
+
* @returns A promise that resolves to the resolved module path.
|
|
1127
1176
|
*/
|
|
1128
|
-
|
|
1129
|
-
/**
|
|
1130
|
-
* The build variant being used by the Powerlines engine.
|
|
1131
|
-
*/
|
|
1132
|
-
variant?: TBuildVariant;
|
|
1133
|
-
/**
|
|
1134
|
-
* An optional set of override options to apply to the selected build variant.
|
|
1135
|
-
*
|
|
1136
|
-
* @remarks
|
|
1137
|
-
* This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
|
|
1138
|
-
*/
|
|
1139
|
-
override?: Partial<TBuildResolvedConfig>;
|
|
1140
|
-
};
|
|
1141
|
-
};
|
|
1142
|
-
type WebpackUserConfig = UserConfig<WebpackBuildConfig, WebpackResolvedBuildConfig, "webpack">;
|
|
1143
|
-
type RspackUserConfig = UserConfig<RspackBuildConfig, RspackResolvedBuildConfig, "rspack">;
|
|
1144
|
-
type RollupUserConfig = UserConfig<RollupBuildConfig, RollupResolvedBuildConfig, "rollup">;
|
|
1145
|
-
type RolldownUserConfig = UserConfig<RolldownBuildConfig, RolldownResolvedBuildConfig, "rolldown">;
|
|
1146
|
-
type ViteUserConfig = UserConfig<ViteBuildConfig, ViteResolvedBuildConfig, "vite">;
|
|
1147
|
-
type ESBuildUserConfig = UserConfig<ESBuildBuildConfig, ESBuildResolvedBuildConfig, "esbuild">;
|
|
1148
|
-
type UnbuildUserConfig = UserConfig<UnbuildBuildConfig, UnbuildResolvedBuildConfig, "unbuild">;
|
|
1149
|
-
type TsupUserConfig = UserConfig<TsupBuildConfig, TsupResolvedBuildConfig, "tsup">;
|
|
1150
|
-
type FarmUserConfig = UserConfig<FarmBuildConfig, FarmResolvedBuildConfig, "farm">;
|
|
1151
|
-
type InferUserConfig<TBuildVariant extends BuildVariant | undefined> = TBuildVariant extends "webpack" ? WebpackUserConfig : TBuildVariant extends "rspack" ? RspackUserConfig : TBuildVariant extends "vite" ? ViteUserConfig : TBuildVariant extends "esbuild" ? ESBuildUserConfig : TBuildVariant extends "unbuild" ? UnbuildUserConfig : TBuildVariant extends "tsup" ? TsupUserConfig : TBuildVariant extends "rolldown" ? RolldownUserConfig : TBuildVariant extends "rollup" ? RollupUserConfig : TBuildVariant extends "farm" ? FarmUserConfig : UserConfig;
|
|
1152
|
-
type InitialUserConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
|
|
1153
|
-
root: string;
|
|
1154
|
-
};
|
|
1155
|
-
type ParsedUserConfig<TUserConfig extends UserConfig = UserConfig> = TUserConfig & ResolvedConfig$1<TUserConfig> & {
|
|
1177
|
+
resolveId: (id: string, importer?: string, options?: ResolveOptions) => Promise<ExternalIdResult | undefined>;
|
|
1156
1178
|
/**
|
|
1157
|
-
*
|
|
1179
|
+
* A helper function to load modules using the Jiti resolver
|
|
1158
1180
|
*
|
|
1159
1181
|
* @remarks
|
|
1160
|
-
* This
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
/**
|
|
1170
|
-
* A string identifier for the Powerlines command being executed
|
|
1182
|
+
* This function can be used to load modules relative to the project root directory.
|
|
1183
|
+
*
|
|
1184
|
+
* @example
|
|
1185
|
+
* ```ts
|
|
1186
|
+
* const module = await context.load("some-module", "/path/to/importer");
|
|
1187
|
+
* ```
|
|
1188
|
+
*
|
|
1189
|
+
* @param id - The module to load.
|
|
1190
|
+
* @returns A promise that resolves to the loaded module.
|
|
1171
1191
|
*/
|
|
1172
|
-
|
|
1173
|
-
};
|
|
1174
|
-
type NewInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & Required<Pick<InlineConfig<TUserConfig>, "root">> & {
|
|
1192
|
+
load: (id: string) => Promise<TransformResult | undefined>;
|
|
1175
1193
|
/**
|
|
1176
|
-
*
|
|
1194
|
+
* The Powerlines builtin virtual files
|
|
1177
1195
|
*/
|
|
1178
|
-
|
|
1196
|
+
getBuiltins: () => Promise<VirtualFile[]>;
|
|
1179
1197
|
/**
|
|
1180
|
-
*
|
|
1198
|
+
* Resolves a builtin virtual file and writes it to the VFS if it does not already exist
|
|
1199
|
+
*
|
|
1200
|
+
* @param code - The source code of the builtin file
|
|
1201
|
+
* @param id - The unique identifier of the builtin file
|
|
1202
|
+
* @param path - An optional path to write the builtin file to
|
|
1181
1203
|
*/
|
|
1182
|
-
|
|
1183
|
-
};
|
|
1184
|
-
type CleanInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
|
|
1204
|
+
emitBuiltin: (code: string, id: string, path?: string) => Promise<void>;
|
|
1185
1205
|
/**
|
|
1186
|
-
*
|
|
1206
|
+
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
1207
|
+
*
|
|
1208
|
+
* @param code - The source code of the entry file
|
|
1209
|
+
* @param path - An optional path to write the entry file to
|
|
1187
1210
|
*/
|
|
1188
|
-
|
|
1189
|
-
};
|
|
1190
|
-
type PrepareInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
|
|
1211
|
+
emitEntry: (code: string, path: string) => Promise<void>;
|
|
1191
1212
|
/**
|
|
1192
|
-
* A
|
|
1213
|
+
* A function to update the context fields using a new user configuration options
|
|
1193
1214
|
*/
|
|
1194
|
-
|
|
1195
|
-
};
|
|
1196
|
-
type BuildInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
|
|
1215
|
+
withUserConfig: (userConfig: UserConfig, options?: InitContextOptions) => Promise<void>;
|
|
1197
1216
|
/**
|
|
1198
|
-
* A
|
|
1217
|
+
* A function to update the context fields using inline configuration options
|
|
1199
1218
|
*/
|
|
1200
|
-
|
|
1201
|
-
};
|
|
1202
|
-
type LintInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
|
|
1219
|
+
withInlineConfig: (inlineConfig: InlineConfig, options?: InitContextOptions) => Promise<void>;
|
|
1203
1220
|
/**
|
|
1204
|
-
*
|
|
1221
|
+
* Create a new logger instance
|
|
1222
|
+
*
|
|
1223
|
+
* @param name - The name to use for the logger instance
|
|
1224
|
+
* @returns A logger function
|
|
1205
1225
|
*/
|
|
1206
|
-
|
|
1207
|
-
};
|
|
1208
|
-
type DocsInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
|
|
1226
|
+
createLog: (name: string | null) => LogFn;
|
|
1209
1227
|
/**
|
|
1210
|
-
*
|
|
1228
|
+
* Extend the current logger instance with a new name
|
|
1229
|
+
*
|
|
1230
|
+
* @param name - The name to use for the extended logger instance
|
|
1231
|
+
* @returns A logger function
|
|
1211
1232
|
*/
|
|
1212
|
-
|
|
1213
|
-
};
|
|
1214
|
-
type DeployInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
|
|
1233
|
+
extendLog: (name: string) => LogFn;
|
|
1215
1234
|
/**
|
|
1216
|
-
*
|
|
1235
|
+
* Generates a checksum representing the current context state
|
|
1236
|
+
*
|
|
1237
|
+
* @returns A promise that resolves to a string representing the checksum
|
|
1217
1238
|
*/
|
|
1218
|
-
|
|
1219
|
-
};
|
|
1220
|
-
type ConfigEnv = Pick<ResolvedConfig$2, "command" | "mode" | "environments" | "preview">;
|
|
1221
|
-
type AnyUserConfig = Record<string, any> & (Partial<UserConfig> | Partial<WebpackUserConfig> | Partial<RspackUserConfig> | Partial<ViteUserConfig> | Partial<ESBuildUserConfig> | Partial<UnbuildUserConfig> | Partial<TsupUserConfig> | Partial<RolldownUserConfig> | Partial<RollupUserConfig> | Partial<FarmUserConfig>);
|
|
1222
|
-
type UserConfigFnObject = (env: ConfigEnv) => DeepPartial$1<UserConfig>;
|
|
1223
|
-
type UserConfigFnPromise = (env: ConfigEnv) => Promise<DeepPartial$1<UserConfig>>;
|
|
1224
|
-
type UserConfigFn = (env: ConfigEnv) => UserConfig | Promise<DeepPartial$1<UserConfig>>;
|
|
1225
|
-
type UserConfigExport = DeepPartial$1<UserConfig> | Promise<DeepPartial$1<UserConfig>> | UserConfigFnObject | UserConfigFnPromise | UserConfigFn;
|
|
1226
|
-
/**
|
|
1227
|
-
* An empty interface to allow augmentation of the defineConfig input type.
|
|
1228
|
-
*/
|
|
1229
|
-
interface DefineConfigInput {
|
|
1239
|
+
generateChecksum: () => Promise<string>;
|
|
1230
1240
|
}
|
|
1231
|
-
|
|
1232
|
-
declare type __ΩWorkspaceConfig = any[];
|
|
1233
|
-
declare type __ΩPluginFactory = any[];
|
|
1234
|
-
declare type __ΩPluginConfigTuple = any[];
|
|
1235
|
-
declare type __ΩPluginConfigObject = any[];
|
|
1236
|
-
declare type __ΩPluginConfig = any[];
|
|
1237
|
-
declare type __ΩPartialPlugin = any[];
|
|
1238
|
-
declare type __ΩPartialPluginFactory = any[];
|
|
1239
|
-
declare type __ΩProjectType = any[];
|
|
1240
|
-
declare type __ΩBabelUserConfig = any[];
|
|
1241
|
-
declare type __ΩOutputConfig = any[];
|
|
1242
|
-
declare type __ΩBaseConfig = any[];
|
|
1243
|
-
declare type __ΩEnvironmentConfig = any[];
|
|
1244
|
-
declare type __ΩCommonUserConfig = any[];
|
|
1245
|
-
declare type __ΩUserConfig = any[];
|
|
1246
|
-
declare type __ΩWebpackUserConfig = any[];
|
|
1247
|
-
declare type __ΩRspackUserConfig = any[];
|
|
1248
|
-
declare type __ΩRollupUserConfig = any[];
|
|
1249
|
-
declare type __ΩRolldownUserConfig = any[];
|
|
1250
|
-
declare type __ΩViteUserConfig = any[];
|
|
1251
|
-
declare type __ΩESBuildUserConfig = any[];
|
|
1252
|
-
declare type __ΩUnbuildUserConfig = any[];
|
|
1253
|
-
declare type __ΩTsupUserConfig = any[];
|
|
1254
|
-
declare type __ΩFarmUserConfig = any[];
|
|
1255
|
-
declare type __ΩInferUserConfig = any[];
|
|
1256
|
-
declare type __ΩInitialUserConfig = any[];
|
|
1257
|
-
declare type __ΩParsedUserConfig = any[];
|
|
1258
|
-
declare type __ΩPowerlinesCommand = any[];
|
|
1259
|
-
declare type __ΩInlineConfig = any[];
|
|
1260
|
-
declare type __ΩNewInlineConfig = any[];
|
|
1261
|
-
declare type __ΩCleanInlineConfig = any[];
|
|
1262
|
-
declare type __ΩPrepareInlineConfig = any[];
|
|
1263
|
-
declare type __ΩBuildInlineConfig = any[];
|
|
1264
|
-
declare type __ΩLintInlineConfig = any[];
|
|
1265
|
-
declare type __ΩDocsInlineConfig = any[];
|
|
1266
|
-
declare type __ΩDeployInlineConfig = any[];
|
|
1267
|
-
declare type __ΩConfigEnv = any[];
|
|
1268
|
-
declare type __ΩAnyUserConfig = any[];
|
|
1269
|
-
declare type __ΩUserConfigFnObject = any[];
|
|
1270
|
-
declare type __ΩUserConfigFnPromise = any[];
|
|
1271
|
-
declare type __ΩUserConfigFn = any[];
|
|
1272
|
-
declare type __ΩUserConfigExport = any[];
|
|
1273
|
-
declare type __ΩDefineConfigInput = any[];
|
|
1274
|
-
|
|
1275
|
-
interface ResolvedEntryTypeDefinition extends TypeDefinition {
|
|
1241
|
+
type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
|
|
1276
1242
|
/**
|
|
1277
|
-
* The
|
|
1243
|
+
* The fully resolved Powerlines configuration
|
|
1278
1244
|
*/
|
|
1279
|
-
|
|
1245
|
+
config: TResolvedConfig;
|
|
1246
|
+
};
|
|
1247
|
+
interface APIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
|
|
1280
1248
|
/**
|
|
1281
|
-
*
|
|
1249
|
+
* The expected plugins options for the Powerlines project.
|
|
1250
|
+
*
|
|
1251
|
+
* @remarks
|
|
1252
|
+
* This is a record of plugin identifiers to their respective options. This field is populated by the Powerlines engine during both plugin initialization and the `init` command.
|
|
1282
1253
|
*/
|
|
1283
|
-
|
|
1284
|
-
}
|
|
1285
|
-
type BabelResolvedConfig = Omit<BabelUserConfig, "plugins" | "presets"> & Required<Pick<BabelUserConfig, "plugins" | "presets">>;
|
|
1286
|
-
type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "mode" | "ssr">> & {
|
|
1254
|
+
plugins: Plugin<PluginContext<TResolvedConfig>>[];
|
|
1287
1255
|
/**
|
|
1288
|
-
*
|
|
1256
|
+
* A function to add a plugin to the context and update the configuration options
|
|
1289
1257
|
*/
|
|
1290
|
-
|
|
1258
|
+
addPlugin: (plugin: Plugin<PluginContext<TResolvedConfig>>) => Promise<void>;
|
|
1291
1259
|
/**
|
|
1292
|
-
*
|
|
1260
|
+
* A table for storing the current context for each configured environment
|
|
1293
1261
|
*/
|
|
1294
|
-
|
|
1295
|
-
};
|
|
1296
|
-
type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
|
|
1297
|
-
type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
|
|
1298
|
-
assets: ResolvedAssetGlob[];
|
|
1299
|
-
}>;
|
|
1300
|
-
/**
|
|
1301
|
-
* The resolved options for the Powerlines project configuration.
|
|
1302
|
-
*/
|
|
1303
|
-
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework">> & {
|
|
1262
|
+
environments: Record<string, EnvironmentContext<TResolvedConfig>>;
|
|
1304
1263
|
/**
|
|
1305
|
-
*
|
|
1264
|
+
* Retrieves the context for a specific environment by name
|
|
1265
|
+
*
|
|
1266
|
+
* @throws Will throw an error if the environment does not exist
|
|
1267
|
+
*
|
|
1268
|
+
* @param name - The name of the environment to retrieve. If not provided, the default environment is returned.
|
|
1269
|
+
* @returns A promise that resolves to the environment context.
|
|
1270
|
+
*
|
|
1271
|
+
* @example
|
|
1272
|
+
* ```ts
|
|
1273
|
+
* const devEnv = await apiContext.getEnvironment("development");
|
|
1274
|
+
* const defaultEnv = await apiContext.getEnvironment();
|
|
1275
|
+
* ```
|
|
1306
1276
|
*/
|
|
1307
|
-
|
|
1277
|
+
getEnvironment: (name?: string) => Promise<EnvironmentContext<TResolvedConfig>>;
|
|
1308
1278
|
/**
|
|
1309
|
-
*
|
|
1279
|
+
* Safely retrieves the context for a specific environment by name
|
|
1280
|
+
*
|
|
1281
|
+
* @param name - The name of the environment to retrieve. If not provided, the default environment is returned.
|
|
1282
|
+
* @returns A promise that resolves to the environment context, or undefined if the environment does not exist.
|
|
1283
|
+
*
|
|
1284
|
+
* @example
|
|
1285
|
+
* ```ts
|
|
1286
|
+
* const devEnv = await apiContext.getEnvironmentSafe("development");
|
|
1287
|
+
* const defaultEnv = await apiContext.getEnvironmentSafe();
|
|
1288
|
+
* ```
|
|
1289
|
+
*
|
|
1290
|
+
* @remarks
|
|
1291
|
+
* This method is similar to `getEnvironment`, but it returns `undefined` instead of throwing an error if the specified environment does not exist.
|
|
1292
|
+
* This can be useful in scenarios where the existence of an environment is optional or uncertain.
|
|
1293
|
+
*
|
|
1294
|
+
* ```ts
|
|
1295
|
+
* const testEnv = await apiContext.getEnvironmentSafe("test");
|
|
1296
|
+
* if (testEnv) {
|
|
1297
|
+
* // Environment exists, safe to use it
|
|
1298
|
+
* } else {
|
|
1299
|
+
* // Environment does not exist, handle accordingly
|
|
1300
|
+
* }
|
|
1301
|
+
* ```
|
|
1302
|
+
*
|
|
1303
|
+
* Using this method helps avoid unhandled exceptions in cases where an environment might not be defined.
|
|
1310
1304
|
*/
|
|
1311
|
-
|
|
1305
|
+
getEnvironmentSafe: (name?: string) => Promise<EnvironmentContext<TResolvedConfig> | undefined>;
|
|
1312
1306
|
/**
|
|
1313
|
-
* A
|
|
1307
|
+
* A function to copy the context and update the fields for a specific environment
|
|
1308
|
+
*
|
|
1309
|
+
* @param environment - The environment configuration to use.
|
|
1310
|
+
* @returns A new context instance with the updated environment.
|
|
1314
1311
|
*/
|
|
1315
|
-
|
|
1312
|
+
in: (environment: EnvironmentResolvedConfig) => Promise<EnvironmentContext<TResolvedConfig>>;
|
|
1313
|
+
}
|
|
1314
|
+
interface EnvironmentContextPlugin<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
1315
|
+
plugin: Plugin<PluginContext<TResolvedConfig>>;
|
|
1316
|
+
context: PluginContext<TResolvedConfig>;
|
|
1317
|
+
}
|
|
1318
|
+
interface EnvironmentContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
|
|
1316
1319
|
/**
|
|
1317
|
-
* The
|
|
1320
|
+
* The expected plugins options for the Powerlines project.
|
|
1318
1321
|
*
|
|
1319
|
-
* @
|
|
1322
|
+
* @remarks
|
|
1323
|
+
* This is a record of plugin identifiers to their respective options. This field is populated by the Powerlines engine during both plugin initialization and the `init` command.
|
|
1320
1324
|
*/
|
|
1321
|
-
|
|
1325
|
+
plugins: EnvironmentContextPlugin<TResolvedConfig>[];
|
|
1322
1326
|
/**
|
|
1323
|
-
*
|
|
1327
|
+
* A function to add a plugin to the context and update the configuration options
|
|
1324
1328
|
*/
|
|
1325
|
-
|
|
1329
|
+
addPlugin: (plugin: Plugin<PluginContext<TResolvedConfig>>) => Promise<void>;
|
|
1326
1330
|
/**
|
|
1327
|
-
* The
|
|
1331
|
+
* The environment specific resolved configuration
|
|
1328
1332
|
*/
|
|
1329
|
-
|
|
1333
|
+
environment: EnvironmentResolvedConfig;
|
|
1330
1334
|
/**
|
|
1331
|
-
*
|
|
1335
|
+
* A table holding references to hook functions registered by plugins
|
|
1332
1336
|
*/
|
|
1333
|
-
|
|
1337
|
+
hooks: HooksList<PluginContext<TResolvedConfig>>;
|
|
1334
1338
|
/**
|
|
1335
|
-
*
|
|
1336
|
-
*
|
|
1337
|
-
* @remarks
|
|
1338
|
-
* This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
|
|
1339
|
+
* Retrieves the hook handlers for a specific hook name
|
|
1339
1340
|
*/
|
|
1340
|
-
|
|
1341
|
+
selectHooks: <TKey extends HookKeys<PluginContext<TResolvedConfig>>>(hook: TKey, options?: SelectHooksOptions) => Hooks[TKey][];
|
|
1342
|
+
}
|
|
1343
|
+
interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
|
|
1341
1344
|
/**
|
|
1342
|
-
* The
|
|
1345
|
+
* The environment specific resolved configuration
|
|
1346
|
+
*/
|
|
1347
|
+
environment: EnvironmentResolvedConfig;
|
|
1348
|
+
/**
|
|
1349
|
+
* An alternative property name for the {@link log} property
|
|
1343
1350
|
*
|
|
1344
|
-
* @
|
|
1351
|
+
* @remarks
|
|
1352
|
+
* This is provided for compatibility with other logging libraries that expect a `logger` property.
|
|
1345
1353
|
*/
|
|
1346
|
-
|
|
1347
|
-
}
|
|
1348
|
-
type
|
|
1349
|
-
type
|
|
1350
|
-
type
|
|
1351
|
-
type
|
|
1352
|
-
type
|
|
1353
|
-
type
|
|
1354
|
-
type
|
|
1355
|
-
type
|
|
1356
|
-
type
|
|
1357
|
-
type
|
|
1358
|
-
declare type __Ω
|
|
1359
|
-
declare type __Ω
|
|
1360
|
-
declare type __Ω
|
|
1361
|
-
declare type __Ω
|
|
1362
|
-
declare type __Ω
|
|
1363
|
-
declare type __Ω
|
|
1364
|
-
declare type __Ω
|
|
1365
|
-
declare type __ΩWebpackResolvedConfig = any[];
|
|
1366
|
-
declare type __ΩRspackResolvedConfig = any[];
|
|
1367
|
-
declare type __ΩESBuildResolvedConfig = any[];
|
|
1368
|
-
declare type __ΩRollupResolvedConfig = any[];
|
|
1369
|
-
declare type __ΩRolldownResolvedConfig = any[];
|
|
1370
|
-
declare type __ΩTsupResolvedConfig = any[];
|
|
1371
|
-
declare type __ΩUnbuildResolvedConfig = any[];
|
|
1372
|
-
declare type __ΩFarmResolvedConfig = any[];
|
|
1373
|
-
declare type __ΩInferResolvedConfig = any[];
|
|
1354
|
+
logger: LogFn;
|
|
1355
|
+
}
|
|
1356
|
+
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = PluginContext<TResolvedConfig> & Omit<UnpluginBuildContext, "parse">;
|
|
1357
|
+
declare type __ΩLogLevel = any[];
|
|
1358
|
+
declare type __ΩWorkerProcess = any[];
|
|
1359
|
+
declare type __ΩMetaInfo = any[];
|
|
1360
|
+
declare type __ΩResolver = any[];
|
|
1361
|
+
declare type __ΩTransformResult = any[];
|
|
1362
|
+
declare type __ΩSourceFile = any[];
|
|
1363
|
+
declare type __ΩUnimportContext = any[];
|
|
1364
|
+
declare type __ΩSelectHooksOptions = any[];
|
|
1365
|
+
declare type __ΩInitContextOptions = any[];
|
|
1366
|
+
declare type __ΩUnresolvedContext = any[];
|
|
1367
|
+
declare type __ΩContext = any[];
|
|
1368
|
+
declare type __ΩAPIContext = any[];
|
|
1369
|
+
declare type __ΩEnvironmentContextPlugin = any[];
|
|
1370
|
+
declare type __ΩEnvironmentContext = any[];
|
|
1371
|
+
declare type __ΩPluginContext = any[];
|
|
1372
|
+
declare type __ΩBuildPluginContext = any[];
|
|
1374
1373
|
|
|
1375
|
-
export { type TsupUserConfig as $, type PartialPlugin as A, type BabelPluginPass as B, type CommandType as C, type DefaultImportDefinition as D, type PartialPluginFactory as E, type ProjectType as F, type BabelUserConfig as G, type BaseConfig as H, type ImportDefinition as I, type EnvironmentConfig as J, type CommonUserConfig as K, type LogFn as L, type WebpackUserConfig as M, type NamedImportDefinition as N, type OutputConfig as O, type PluginFactory as P, type RspackUserConfig as Q, type ResolvedBabelTransformPluginOptions as R, SUPPORTED_COMMANDS as S, type RollupUserConfig as T, type UserConfig as U, type RolldownUserConfig as V, type WorkspaceConfig as W, type ViteUserConfig as X, type ESBuildUserConfig as Y, type UnbuildUserConfig as Z, type __ΩNamedImportDefinition as _, type BabelTransformPluginFilter as a, LogLevel as a$, type FarmUserConfig as a0, type InferUserConfig as a1, type InitialUserConfig as a2, type ParsedUserConfig as a3, type PowerlinesCommand as a4, type InlineConfig as a5, type NewInlineConfig as a6, type CleanInlineConfig as a7, type PrepareInlineConfig as a8, type BuildInlineConfig as a9, type __ΩRspackUserConfig as aA, type __ΩRollupUserConfig as aB, type __ΩRolldownUserConfig as aC, type __ΩViteUserConfig as aD, type __ΩESBuildUserConfig as aE, type __ΩUnbuildUserConfig as aF, type __ΩTsupUserConfig as aG, type __ΩFarmUserConfig as aH, type __ΩInferUserConfig as aI, type __ΩInitialUserConfig as aJ, type __ΩParsedUserConfig as aK, type __ΩPowerlinesCommand as aL, type __ΩInlineConfig as aM, type __ΩNewInlineConfig as aN, type __ΩCleanInlineConfig as aO, type __ΩPrepareInlineConfig as aP, type __ΩBuildInlineConfig as aQ, type __ΩLintInlineConfig as aR, type __ΩDocsInlineConfig as aS, type __ΩDeployInlineConfig as aT, type __ΩConfigEnv as aU, type __ΩAnyUserConfig as aV, type __ΩUserConfigFnObject as aW, type __ΩUserConfigFnPromise as aX, type __ΩUserConfigFn as aY, type __ΩUserConfigExport as aZ, type __ΩDefineConfigInput as a_, type LintInlineConfig as aa, type DocsInlineConfig as ab, type DeployInlineConfig as ac, type ConfigEnv as ad, type AnyUserConfig as ae, type UserConfigFnObject as af, type UserConfigFnPromise as ag, type UserConfigFn as ah, type UserConfigExport as ai, type DefineConfigInput as aj, type __ΩLogFn as ak, type __ΩWorkspaceConfig as al, type __ΩPluginFactory as am, type __ΩPluginConfigTuple as an, type __ΩPluginConfigObject as ao, type __ΩPluginConfig as ap, type __ΩPartialPlugin as aq, type __ΩPartialPluginFactory as ar, type __ΩProjectType as as, type __ΩBabelUserConfig as at, type __ΩOutputConfig as au, type __ΩBaseConfig as av, type __ΩEnvironmentConfig as aw, type __ΩCommonUserConfig as ax, type __ΩUserConfig as ay, type __ΩWebpackUserConfig as az, type BabelTransformPlugin as b, type
|
|
1374
|
+
export { type TsupUserConfig as $, type PartialPlugin as A, type BabelPluginPass as B, type CommandType as C, type DefaultImportDefinition as D, type PartialPluginFactory as E, type ProjectType as F, type BabelUserConfig as G, type BaseConfig as H, type ImportDefinition as I, type EnvironmentConfig as J, type CommonUserConfig as K, type LogFn as L, type WebpackUserConfig as M, type NamedImportDefinition as N, type OutputConfig as O, type PluginFactory as P, type RspackUserConfig as Q, type ResolvedBabelTransformPluginOptions as R, SUPPORTED_COMMANDS as S, type RollupUserConfig as T, type UserConfig as U, type RolldownUserConfig as V, type WorkspaceConfig as W, type ViteUserConfig as X, type ESBuildUserConfig as Y, type UnbuildUserConfig as Z, type __ΩNamedImportDefinition as _, type BabelTransformPluginFilter as a, LogLevel as a$, type FarmUserConfig as a0, type InferUserConfig as a1, type InitialUserConfig as a2, type ParsedUserConfig as a3, type PowerlinesCommand as a4, type InlineConfig as a5, type NewInlineConfig as a6, type CleanInlineConfig as a7, type PrepareInlineConfig as a8, type BuildInlineConfig as a9, type __ΩRspackUserConfig as aA, type __ΩRollupUserConfig as aB, type __ΩRolldownUserConfig as aC, type __ΩViteUserConfig as aD, type __ΩESBuildUserConfig as aE, type __ΩUnbuildUserConfig as aF, type __ΩTsupUserConfig as aG, type __ΩFarmUserConfig as aH, type __ΩInferUserConfig as aI, type __ΩInitialUserConfig as aJ, type __ΩParsedUserConfig as aK, type __ΩPowerlinesCommand as aL, type __ΩInlineConfig as aM, type __ΩNewInlineConfig as aN, type __ΩCleanInlineConfig as aO, type __ΩPrepareInlineConfig as aP, type __ΩBuildInlineConfig as aQ, type __ΩLintInlineConfig as aR, type __ΩDocsInlineConfig as aS, type __ΩDeployInlineConfig as aT, type __ΩConfigEnv as aU, type __ΩAnyUserConfig as aV, type __ΩUserConfigFnObject as aW, type __ΩUserConfigFnPromise as aX, type __ΩUserConfigFn as aY, type __ΩUserConfigExport as aZ, type __ΩDefineConfigInput as a_, type LintInlineConfig as aa, type DocsInlineConfig as ab, type DeployInlineConfig as ac, type ConfigEnv as ad, type AnyUserConfig as ae, type UserConfigFnObject as af, type UserConfigFnPromise as ag, type UserConfigFn as ah, type UserConfigExport as ai, type DefineConfigInput as aj, type __ΩLogFn as ak, type __ΩWorkspaceConfig as al, type __ΩPluginFactory as am, type __ΩPluginConfigTuple as an, type __ΩPluginConfigObject as ao, type __ΩPluginConfig as ap, type __ΩPartialPlugin as aq, type __ΩPartialPluginFactory as ar, type __ΩProjectType as as, type __ΩBabelUserConfig as at, type __ΩOutputConfig as au, type __ΩBaseConfig as av, type __ΩEnvironmentConfig as aw, type __ΩCommonUserConfig as ax, type __ΩUserConfig as ay, type __ΩWebpackUserConfig as az, type BabelTransformPlugin as b, type BasePluginHookFunctions as b$, type WorkerProcess as b0, type MetaInfo as b1, type Resolver as b2, type TransformResult as b3, type SourceFile as b4, type UnimportContext as b5, type SelectHooksOptions as b6, type InitContextOptions as b7, type UnresolvedContext as b8, type Context as b9, type HookKeys as bA, type BaseHooksListItem as bB, type BaseHooksList as bC, type ExternalHooksListItem as bD, type HooksList as bE, type InferHookHandler as bF, type InferHookReturnType as bG, type InferHookParameters as bH, type InferHookThisType as bI, type __ΩBaseHooks as bJ, type __ΩBaseHookKeys as bK, type __ΩExternalHooks as bL, type __ΩExternalHookKeys as bM, type __ΩHooks as bN, type __ΩHookKeys as bO, type __ΩBaseHooksListItem as bP, type __ΩBaseHooksList as bQ, type __ΩExternalHooksListItem as bR, type __ΩHooksList as bS, type __ΩInferHookHandler as bT, type __ΩInferHookReturnType as bU, type __ΩInferHookParameters as bV, type __ΩInferHookThisType as bW, type PluginHookObject as bX, type PluginHook as bY, type GenerateTypesResult as bZ, type ConfigResult as b_, type APIContext as ba, type EnvironmentContextPlugin as bb, type EnvironmentContext as bc, type PluginContext as bd, type BuildPluginContext as be, type __ΩLogLevel as bf, type __ΩWorkerProcess as bg, type __ΩMetaInfo as bh, type __ΩResolver as bi, type __ΩTransformResult as bj, type __ΩSourceFile as bk, type __ΩUnimportContext as bl, type __ΩSelectHooksOptions as bm, type __ΩInitContextOptions as bn, type __ΩUnresolvedContext as bo, type __ΩContext as bp, type __ΩAPIContext as bq, type __ΩEnvironmentContextPlugin as br, type __ΩEnvironmentContext as bs, type __ΩPluginContext as bt, type __ΩBuildPluginContext as bu, type BaseHooks as bv, type BaseHookKeys as bw, type ExternalHooks as bx, type ExternalHookKeys as by, type Hooks as bz, type BabelTransformPluginOptions as c, type BuildPlugin as c0, type ExternalPluginHookFunctionsVariant as c1, type ExternalPluginHookFunctions as c2, type PluginHookFunctions as c3, type PluginHooks as c4, type PluginBuildPlugins as c5, type Plugin as c6, PLUGIN_NON_HOOK_FIELDS as c7, type PluginNonHookFields as c8, type __ΩPluginHookObject as c9, type FarmResolvedConfig as cA, type InferResolvedConfig as cB, type __ΩResolvedEntryTypeDefinition as cC, type __ΩBabelResolvedConfig as cD, type __ΩEnvironmentResolvedConfig as cE, type __ΩResolvedAssetGlob as cF, type __ΩOutputResolvedConfig as cG, type __ΩResolvedConfig as cH, type __ΩViteResolvedConfig as cI, type __ΩWebpackResolvedConfig as cJ, type __ΩRspackResolvedConfig as cK, type __ΩESBuildResolvedConfig as cL, type __ΩRollupResolvedConfig as cM, type __ΩRolldownResolvedConfig as cN, type __ΩTsupResolvedConfig as cO, type __ΩUnbuildResolvedConfig as cP, type __ΩFarmResolvedConfig as cQ, type __ΩInferResolvedConfig as cR, type __ΩPluginHook as ca, type __ΩGenerateTypesResult as cb, type __ΩConfigResult as cc, type __ΩBasePluginHookFunctions as cd, type __ΩBuildPlugin as ce, type __ΩExternalPluginHookFunctionsVariant as cf, type __ΩExternalPluginHookFunctions as cg, type __ΩPluginHookFunctions as ch, type __ΩPluginHooks as ci, type __ΩPluginBuildPlugins as cj, type __ΩPlugin as ck, type __ΩPluginNonHookFields as cl, type ResolvedEntryTypeDefinition as cm, type BabelResolvedConfig as cn, type EnvironmentResolvedConfig as co, type ResolvedAssetGlob as cp, type OutputResolvedConfig as cq, type ResolvedConfig as cr, type ViteResolvedConfig as cs, type WebpackResolvedConfig as ct, type RspackResolvedConfig as cu, type ESBuildResolvedConfig as cv, type RollupResolvedConfig as cw, type RolldownResolvedConfig as cx, type TsupResolvedConfig as cy, type UnbuildResolvedConfig as cz, type BabelTransformInput as d, type BabelTransformPluginBuilderParams as e, type BabelTransformPluginBuilder as f, type DeclareBabelTransformPluginReturn as g, type ImportSpecifier as h, type __ΩDefaultImportDefinition as i, type __ΩImportDefinition as j, type __ΩBabelPluginPass as k, type __ΩBabelTransformPluginFilter as l, type __ΩBabelTransformPlugin as m, type __ΩBabelTransformPluginOptions as n, type __ΩResolvedBabelTransformPluginOptions as o, type __ΩBabelTransformInput as p, type __ΩBabelTransformPluginBuilderParams as q, type __ΩBabelTransformPluginBuilder as r, type __ΩDeclareBabelTransformPluginReturn as s, type __ΩImportSpecifier as t, type Commands as u, type __ΩCommandType as v, type __ΩCommands as w, type PluginConfigTuple as x, type PluginConfigObject as y, type PluginConfig as z };
|