powerlines 0.19.5 → 0.21.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.cjs +4 -4
- package/dist/api.d.cts +7 -8
- package/dist/api.d.ts +7 -8
- package/dist/api.js +3 -3
- package/dist/astro.cjs +10 -10
- package/dist/astro.d.cts +1 -2
- package/dist/astro.d.ts +1 -2
- package/dist/astro.js +7 -7
- package/dist/{chunk-MLAYLHZO.js → chunk-237NITCY.js} +20 -5
- package/dist/{chunk-5PRY6OJM.cjs → chunk-2HNC5JVK.cjs} +2 -2
- package/dist/{chunk-AEJIVPUZ.js → chunk-2Q2PSPZK.js} +1 -1
- package/dist/{chunk-JPWBN72J.js → chunk-3FS7K4DZ.js} +1 -1
- package/dist/{chunk-BSGWY4AP.cjs → chunk-3JH36WUJ.cjs} +2 -2
- package/dist/{chunk-ZOUGUAQY.cjs → chunk-44UTUCBG.cjs} +34 -16
- package/dist/{chunk-KMELWYHW.cjs → chunk-6XRDZOE3.cjs} +967 -664
- package/dist/{chunk-YQZXG4X6.cjs → chunk-7C2NEC7D.cjs} +2 -2
- package/dist/{chunk-GQM2JCO3.js → chunk-A5GTERYN.js} +2 -2
- package/dist/chunk-B4KLWFY6.cjs +32 -0
- package/dist/{chunk-I4LLZ5BI.js → chunk-C5TKY75S.js} +1 -1
- package/dist/{chunk-TK6CN2KT.cjs → chunk-DMXXNXLS.cjs} +4 -4
- package/dist/{chunk-MCDMY6GK.cjs → chunk-F4BD5CXH.cjs} +2 -2
- package/dist/chunk-GRAVJX3I.js +29 -0
- package/dist/chunk-HV7SHEHD.cjs +118 -0
- package/dist/{chunk-WJ4CZKXY.js → chunk-JKBJF3UI.js} +1 -1
- package/dist/{chunk-BHPTTRBA.js → chunk-L4AXJFX2.js} +32 -14
- package/dist/{chunk-Z63SQZUB.cjs → chunk-LKYBC6DX.cjs} +4 -4
- package/dist/{chunk-RR7EC4RF.js → chunk-M6XGEVJY.js} +1 -1
- package/dist/{chunk-PAJB5K7A.js → chunk-NZXMP4J5.js} +3 -2
- package/dist/{chunk-GFINPIIK.js → chunk-OZU47JET.js} +1000 -704
- package/dist/{chunk-FCTNMPJF.cjs → chunk-PAMSESZV.cjs} +1 -1
- package/dist/chunk-PDFOF6ZP.js +112 -0
- package/dist/{chunk-7HKTQSUG.cjs → chunk-PJP4MECA.cjs} +4 -3
- package/dist/{chunk-OJSRHKHW.js → chunk-QQGXARP3.js} +1 -1
- package/dist/{chunk-ULFJBFI7.cjs → chunk-SQANNMRF.cjs} +22 -7
- package/dist/{chunk-HI3LNK6Q.js → chunk-SVDPKN3U.js} +1 -1
- package/dist/chunk-SVF4ATJR.cjs +8 -0
- package/dist/{chunk-A3FMGMBV.cjs → chunk-UVM4JAR3.cjs} +2 -2
- package/dist/{chunk-VICSRRKQ.js → chunk-WU7I52LM.js} +2 -2
- package/dist/{chunk-X5LPEBDE.cjs → chunk-WYJGOC3Y.cjs} +2 -2
- package/dist/{chunk-LIXKMZW5.cjs → chunk-YG5ORYN2.cjs} +2 -2
- package/dist/{chunk-HEG6IAVR.js → chunk-ZPOCM5XZ.js} +1 -1
- package/dist/chunk-ZWF7LZXE.js +5 -0
- package/dist/config.d.cts +1 -2
- package/dist/config.d.ts +1 -2
- package/dist/esbuild.cjs +9 -9
- package/dist/esbuild.d.cts +1 -2
- package/dist/esbuild.d.ts +1 -2
- package/dist/esbuild.js +6 -6
- package/dist/farm.cjs +5 -5
- package/dist/farm.d.cts +1 -2
- package/dist/farm.d.ts +1 -2
- package/dist/farm.js +4 -4
- package/dist/{hooks-C6t50M6a.d.cts → hooks-CJ1W5lrx.d.cts} +1 -1
- package/dist/{hooks-Bq2jUAKs.d.ts → hooks-CNEZpkMS.d.ts} +1 -1
- package/dist/index.cjs +45 -287
- package/dist/index.d.cts +3 -4
- package/dist/index.d.ts +3 -4
- package/dist/index.js +20 -244
- package/dist/lib/build/esbuild.cjs +5 -5
- package/dist/lib/build/esbuild.d.cts +3 -5
- package/dist/lib/build/esbuild.d.ts +3 -5
- package/dist/lib/build/esbuild.js +2 -2
- package/dist/lib/build/index.cjs +25 -25
- package/dist/lib/build/index.d.cts +3 -5
- package/dist/lib/build/index.d.ts +3 -5
- package/dist/lib/build/index.js +9 -9
- package/dist/lib/build/rolldown.cjs +3 -3
- package/dist/lib/build/rolldown.d.cts +1 -3
- package/dist/lib/build/rolldown.d.ts +1 -3
- package/dist/lib/build/rolldown.js +2 -2
- package/dist/lib/build/rollup.cjs +3 -3
- package/dist/lib/build/rollup.d.cts +1 -3
- package/dist/lib/build/rollup.d.ts +1 -3
- package/dist/lib/build/rollup.js +1 -1
- package/dist/lib/build/rspack.cjs +2 -2
- package/dist/lib/build/rspack.d.cts +1 -3
- package/dist/lib/build/rspack.d.ts +1 -3
- package/dist/lib/build/rspack.js +1 -1
- package/dist/lib/build/tsup.cjs +6 -6
- package/dist/lib/build/tsup.d.cts +1 -3
- package/dist/lib/build/tsup.d.ts +1 -3
- package/dist/lib/build/tsup.js +3 -3
- package/dist/lib/build/unbuild.cjs +5 -5
- package/dist/lib/build/unbuild.d.cts +2 -4
- package/dist/lib/build/unbuild.d.ts +2 -4
- package/dist/lib/build/unbuild.js +2 -2
- package/dist/lib/build/vite.cjs +5 -5
- package/dist/lib/build/vite.d.cts +1 -3
- package/dist/lib/build/vite.d.ts +1 -3
- package/dist/lib/build/vite.js +3 -3
- package/dist/lib/build/webpack.cjs +2 -2
- package/dist/lib/build/webpack.d.cts +1 -3
- package/dist/lib/build/webpack.d.ts +1 -3
- package/dist/lib/build/webpack.js +1 -1
- package/dist/lib/chunk-27VJFYDM.cjs +132 -0
- package/dist/lib/chunk-3G4C3YAU.js +124 -0
- package/dist/lib/{chunk-DX4TFRS3.js → chunk-43VJVIL2.js} +976 -681
- package/dist/lib/{chunk-5EXW3ZRC.cjs → chunk-4FX4VOLA.cjs} +25 -4
- package/dist/lib/{chunk-ADKYAHF5.js → chunk-5GM5UAUO.js} +32 -12
- package/dist/lib/{chunk-JB2JJXGW.js → chunk-5SADLYYK.js} +1 -1
- package/dist/lib/{chunk-KXCEN6Y4.js → chunk-5SP6QZLX.js} +1 -1
- package/dist/lib/{chunk-TNHDC2ZQ.cjs → chunk-7XHBIYIN.cjs} +1 -20
- package/dist/lib/{chunk-SM3S7DYW.js → chunk-BHDQZ6YX.js} +12 -2
- package/dist/lib/{chunk-F7IDAYLH.cjs → chunk-CSJ6KNIX.cjs} +12 -9
- package/dist/lib/{chunk-37W2ZDLA.cjs → chunk-E2MVGKGH.cjs} +2 -2
- package/dist/lib/{chunk-ET5QBFGZ.cjs → chunk-FN7673NC.cjs} +2 -2
- package/dist/lib/{chunk-67IBLMW6.cjs → chunk-GDXHCTCX.cjs} +14 -7
- package/dist/lib/{chunk-ESNHFT4V.cjs → chunk-HCOHRD3Q.cjs} +26 -13
- package/dist/lib/{chunk-SYHVP3OW.js → chunk-HOZ37BFN.js} +23 -4
- package/dist/lib/{chunk-7OHD3BD4.js → chunk-HQ5YA43H.js} +12 -9
- package/dist/lib/{chunk-47WZIAPZ.js → chunk-IOM7GRZU.js} +5 -8
- package/dist/lib/{chunk-WFUO3YPK.js → chunk-L4NEN725.js} +19 -4
- package/dist/lib/{chunk-MVSXEH4P.cjs → chunk-LAFEAMNN.cjs} +6 -9
- package/dist/lib/{chunk-7Y5MJRWF.js → chunk-LIN4KAV3.js} +57 -34
- package/dist/lib/{chunk-LJ4WO7TW.cjs → chunk-LMO7PRBP.cjs} +35 -13
- package/dist/lib/{chunk-4AMFNBTX.cjs → chunk-LPA7UJIR.cjs} +956 -659
- package/dist/lib/{chunk-OTBLE55Z.cjs → chunk-MPCVQK2D.cjs} +12 -1
- package/dist/lib/{chunk-5ASXKB2V.js → chunk-QAXCBFBP.js} +1 -1
- package/dist/lib/{chunk-N2EGPL2L.js → chunk-T7RMV2FW.js} +25 -12
- package/dist/lib/{chunk-7K7JH3DF.cjs → chunk-ULJVBW4L.cjs} +19 -4
- package/dist/lib/{chunk-UDJ37BEE.cjs → chunk-VGSV2BEL.cjs} +57 -34
- package/dist/lib/{chunk-AOKLB4V2.cjs → chunk-Y2BHXV33.cjs} +1 -1
- package/dist/lib/{chunk-GRJJZ5VJ.js → chunk-YH5GOJS3.js} +2 -15
- package/dist/lib/{chunk-Q3ERHHXJ.js → chunk-YV6MDKW4.js} +13 -6
- package/dist/lib/{config-LK_Wl1SU.d.cts → config-7vXtXiGg.d.cts} +204 -118
- package/dist/lib/{config-CnPcoKqT.d.ts → config-B9aVEiiX.d.ts} +204 -118
- package/dist/lib/config-file.d.cts +1 -3
- package/dist/lib/config-file.d.ts +1 -3
- package/dist/lib/create-program.d.cts +1 -3
- package/dist/lib/create-program.d.ts +1 -3
- package/dist/lib/entry.cjs +9 -9
- package/dist/lib/entry.d.cts +1 -3
- package/dist/lib/entry.d.ts +1 -3
- package/dist/lib/entry.js +1 -1
- package/dist/lib/{hooks-DX1o8l6J.d.ts → hooks-BxUBzqCb.d.ts} +1 -1
- package/dist/lib/{hooks-BD2rDhpA.d.cts → hooks-cvv50JDh.d.cts} +1 -1
- package/dist/lib/index.cjs +32 -28
- package/dist/lib/index.d.cts +326 -7
- package/dist/lib/index.d.ts +326 -7
- package/dist/lib/index.js +8 -8
- package/dist/lib/logger.d.cts +1 -3
- package/dist/lib/logger.d.ts +1 -3
- package/dist/lib/typescript/compiler-host.d.cts +1 -3
- package/dist/lib/typescript/compiler-host.d.ts +1 -3
- package/dist/lib/typescript/import-transformer.d.cts +1 -3
- package/dist/lib/typescript/import-transformer.d.ts +1 -3
- package/dist/lib/typescript/index.d.cts +1 -3
- package/dist/lib/typescript/index.d.ts +1 -3
- package/dist/lib/typescript/program.d.cts +1 -3
- package/dist/lib/typescript/program.d.ts +1 -3
- package/dist/lib/unplugin/factory.cjs +5 -5
- package/dist/lib/unplugin/factory.d.cts +7 -9
- package/dist/lib/unplugin/factory.d.ts +7 -9
- package/dist/lib/unplugin/factory.js +4 -4
- package/dist/lib/unplugin/index.cjs +8 -8
- package/dist/lib/unplugin/index.d.cts +2 -4
- package/dist/lib/unplugin/index.d.ts +2 -4
- package/dist/lib/unplugin/index.js +5 -5
- package/dist/lib/unplugin/plugin.cjs +3 -3
- package/dist/lib/unplugin/plugin.d.cts +1 -3
- package/dist/lib/unplugin/plugin.d.ts +1 -3
- package/dist/lib/unplugin/plugin.js +2 -2
- package/dist/lib/unplugin/resolve-id.cjs +2 -2
- package/dist/lib/unplugin/resolve-id.d.cts +1 -3
- package/dist/lib/unplugin/resolve-id.d.ts +1 -3
- package/dist/lib/unplugin/resolve-id.js +1 -1
- package/dist/lib/utilities/bundle.cjs +4 -4
- package/dist/lib/utilities/bundle.d.cts +1 -3
- package/dist/lib/utilities/bundle.d.ts +1 -3
- package/dist/lib/utilities/bundle.js +3 -3
- package/dist/lib/utilities/cache.d.cts +1 -3
- package/dist/lib/utilities/cache.d.ts +1 -3
- package/dist/lib/utilities/file-header.d.cts +1 -3
- package/dist/lib/utilities/file-header.d.ts +1 -3
- package/dist/lib/utilities/index.cjs +14 -14
- package/dist/lib/utilities/index.d.cts +1 -3
- package/dist/lib/utilities/index.d.ts +1 -3
- package/dist/lib/utilities/index.js +5 -5
- package/dist/lib/utilities/meta.cjs +8 -8
- package/dist/lib/utilities/meta.d.cts +1 -3
- package/dist/lib/utilities/meta.d.ts +1 -3
- package/dist/lib/utilities/meta.js +1 -1
- package/dist/lib/utilities/resolve-path.d.cts +1 -3
- package/dist/lib/utilities/resolve-path.d.ts +1 -3
- package/dist/lib/utilities/resolve.cjs +5 -5
- package/dist/lib/utilities/resolve.d.cts +1 -3
- package/dist/lib/utilities/resolve.d.ts +1 -3
- package/dist/lib/utilities/resolve.js +4 -4
- package/dist/lib/utilities/source-file.d.cts +1 -3
- package/dist/lib/utilities/source-file.d.ts +1 -3
- package/dist/lib/utilities/source-map.d.cts +1 -3
- package/dist/lib/utilities/source-map.d.ts +1 -3
- package/dist/lib/utilities/worker.d.cts +1 -3
- package/dist/lib/utilities/worker.d.ts +1 -3
- package/dist/lib/utilities/write-file.d.cts +1 -3
- package/dist/lib/utilities/write-file.d.ts +1 -3
- package/dist/next.cjs +9 -9
- package/dist/next.js +6 -6
- package/dist/nuxt.cjs +11 -11
- package/dist/nuxt.js +8 -8
- package/dist/plugin-utils/{chunk-YKIS7BLU.cjs → chunk-5MO4BCOW.cjs} +24 -0
- package/dist/plugin-utils/{chunk-HHFA3IEZ.js → chunk-CYVV2MB7.js} +24 -0
- package/dist/plugin-utils/{chunk-75UVEMIV.cjs → chunk-DZZPNO5H.cjs} +2 -2
- package/dist/plugin-utils/{chunk-WEIEQXIJ.cjs → chunk-ECFS7DPV.cjs} +5 -5
- package/dist/plugin-utils/{chunk-MQOW6ENT.cjs → chunk-F65J5WOX.cjs} +1 -1
- package/dist/plugin-utils/{chunk-IHME6YWJ.js → chunk-GV7O3E7P.js} +1 -1
- package/dist/plugin-utils/chunk-J33TXWF6.js +12 -0
- package/dist/plugin-utils/{chunk-PK6PYFWY.js → chunk-L277XSSN.js} +1 -1
- package/dist/plugin-utils/{chunk-YDYJAGMP.js → chunk-QKMG6ZAU.js} +1 -1
- package/dist/plugin-utils/chunk-QP6OJWFG.cjs +14 -0
- package/dist/plugin-utils/{chunk-5TL6KEQ5.cjs → chunk-UNAGYQRB.cjs} +4 -4
- package/dist/plugin-utils/{chunk-432MQOUZ.js → chunk-XIXI67PY.js} +1 -1
- package/dist/plugin-utils/{config-48EWGWXq.d.cts → config-BzVVjChJ.d.cts} +201 -115
- package/dist/plugin-utils/{config-48EWGWXq.d.ts → config-BzVVjChJ.d.ts} +201 -115
- package/dist/plugin-utils/enforce.cjs +5 -5
- package/dist/plugin-utils/enforce.d.cts +1 -3
- package/dist/plugin-utils/enforce.d.ts +1 -3
- package/dist/plugin-utils/enforce.js +4 -4
- package/dist/plugin-utils/extend.cjs +4 -4
- package/dist/plugin-utils/extend.d.cts +1 -3
- package/dist/plugin-utils/extend.d.ts +1 -3
- package/dist/plugin-utils/extend.js +3 -3
- package/dist/plugin-utils/get-config-path.cjs +2 -2
- package/dist/plugin-utils/get-config-path.d.cts +2 -4
- package/dist/plugin-utils/get-config-path.d.ts +2 -4
- package/dist/plugin-utils/get-config-path.js +1 -1
- package/dist/plugin-utils/helpers.cjs +14 -14
- package/dist/plugin-utils/helpers.d.cts +3 -5
- package/dist/plugin-utils/helpers.d.ts +3 -5
- package/dist/plugin-utils/helpers.js +1 -1
- package/dist/plugin-utils/index.cjs +24 -24
- package/dist/plugin-utils/index.d.cts +1 -3
- package/dist/plugin-utils/index.d.ts +1 -3
- package/dist/plugin-utils/index.js +6 -6
- package/dist/plugin-utils/merge.cjs +3 -3
- package/dist/plugin-utils/merge.d.cts +1 -3
- package/dist/plugin-utils/merge.d.ts +1 -3
- package/dist/plugin-utils/merge.js +2 -2
- package/dist/plugin-utils/paths.cjs +2 -2
- package/dist/plugin-utils/paths.d.cts +4 -5
- package/dist/plugin-utils/paths.d.ts +4 -5
- package/dist/plugin-utils/paths.js +1 -1
- package/dist/{resolved-B41SbjnS.d.cts → resolved-D8vIizyA.d.cts} +81 -66
- package/dist/{resolved-J7a2Aeuk.d.ts → resolved-DWxXKJYy.d.ts} +81 -66
- package/dist/rolldown.cjs +8 -8
- package/dist/rolldown.d.cts +1 -2
- package/dist/rolldown.d.ts +1 -2
- package/dist/rolldown.js +5 -5
- package/dist/rollup.cjs +8 -8
- package/dist/rollup.d.cts +1 -2
- package/dist/rollup.d.ts +1 -2
- package/dist/rollup.js +5 -5
- package/dist/rspack.cjs +8 -8
- package/dist/rspack.d.cts +1 -2
- package/dist/rspack.d.ts +1 -2
- package/dist/rspack.js +5 -5
- package/dist/tsup.cjs +10 -10
- package/dist/tsup.js +7 -7
- package/dist/types/babel.d.cts +1 -2
- package/dist/types/babel.d.ts +1 -2
- package/dist/types/build.d.cts +94 -7
- package/dist/types/build.d.ts +94 -7
- package/dist/types/commands.cjs +2 -2
- package/dist/types/commands.d.cts +1 -2
- package/dist/types/commands.d.ts +1 -2
- package/dist/types/commands.js +1 -1
- package/dist/types/config.d.cts +1 -2
- package/dist/types/config.d.ts +1 -2
- package/dist/types/context.d.cts +2 -3
- package/dist/types/context.d.ts +2 -3
- package/dist/types/hooks.d.cts +1 -2
- package/dist/types/hooks.d.ts +1 -2
- package/dist/types/index.cjs +6 -22
- package/dist/types/index.d.cts +2 -3
- package/dist/types/index.d.ts +2 -3
- package/dist/types/index.js +2 -2
- package/dist/types/internal.d.cts +2 -3
- package/dist/types/internal.d.ts +2 -3
- package/dist/types/plugin.d.cts +1 -2
- package/dist/types/plugin.d.ts +1 -2
- package/dist/types/resolved.d.cts +1 -2
- package/dist/types/resolved.d.ts +1 -2
- package/dist/types/unplugin.d.cts +1 -2
- package/dist/types/unplugin.d.ts +1 -2
- package/dist/types/vfs.cjs +4 -20
- package/dist/types/vfs.d.cts +47 -54
- package/dist/types/vfs.d.ts +47 -54
- package/dist/types/vfs.js +1 -1
- package/dist/unloader.cjs +8 -8
- package/dist/unloader.d.cts +3 -4
- package/dist/unloader.d.ts +3 -4
- package/dist/unloader.js +5 -5
- package/dist/unplugin.cjs +20 -20
- package/dist/unplugin.d.cts +4 -5
- package/dist/unplugin.d.ts +4 -5
- package/dist/unplugin.js +17 -17
- package/dist/vite.cjs +9 -9
- package/dist/vite.d.cts +1 -2
- package/dist/vite.d.ts +1 -2
- package/dist/vite.js +6 -6
- package/dist/webpack.cjs +8 -8
- package/dist/webpack.d.cts +1 -2
- package/dist/webpack.d.ts +1 -2
- package/dist/webpack.js +5 -5
- package/package.json +8 -6
- package/dist/chunk-CWCEYGLM.js +0 -43
- package/dist/chunk-F5NKLRZD.cjs +0 -49
- package/dist/chunk-OBYFBPPO.js +0 -9
- package/dist/chunk-RDMLGFIT.js +0 -29
- package/dist/chunk-RF6RSWD4.cjs +0 -16
- package/dist/chunk-XDLLDHRY.cjs +0 -32
- package/dist/lib/chunk-POOHWK7C.cjs +0 -63
- package/dist/lib/chunk-VLHOYZG2.js +0 -55
- package/dist/plugin-utils/chunk-2HFS2OOG.cjs +0 -14
- package/dist/plugin-utils/chunk-CVZA2RT3.js +0 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Format } from '@storm-software/build-tools/types';
|
|
2
2
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
3
3
|
import { StormWorkspaceConfig } from '@storm-software/config/types';
|
|
4
|
-
import { NonUndefined, MaybePromise, FunctionLike, DeepPartial } from '@stryke/types/base';
|
|
4
|
+
import { NonUndefined, MaybePromise, FunctionLike, DeepPartial as DeepPartial$1 } from '@stryke/types/base';
|
|
5
5
|
import { TypeDefinition, TypeDefinitionParameter } from '@stryke/types/configuration';
|
|
6
6
|
import { AssetGlob } from '@stryke/types/file';
|
|
7
7
|
import { ResolvedPreviewOptions, PreviewOptions } from 'vite';
|
|
@@ -15,9 +15,7 @@ import { ArrayValues } from '@stryke/types/array';
|
|
|
15
15
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
16
16
|
import ts from 'typescript';
|
|
17
17
|
import { PrimitiveJsonValue } from '@stryke/json/types';
|
|
18
|
-
import { Volume } from 'memfs';
|
|
19
18
|
import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
|
|
20
|
-
import { IUnionFs } from 'unionfs';
|
|
21
19
|
|
|
22
20
|
type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
|
|
23
21
|
type BuildVariant = UnpluginBuildVariant | "tsup" | "unbuild";
|
|
@@ -28,6 +26,87 @@ interface BuildConfig {
|
|
|
28
26
|
* @defaultValue "neutral"
|
|
29
27
|
*/
|
|
30
28
|
platform?: "node" | "browser" | "neutral";
|
|
29
|
+
/**
|
|
30
|
+
* Array of strings indicating the polyfills to include for the build.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* This option allows you to specify which polyfills should be included in the build process to ensure compatibility with the target environment. The paths for the polyfills can use placeholder tokens (the `replacePathTokens` helper function will be used to resolve the actual values).
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* {
|
|
38
|
+
* polyfill: ['{projectRoot}/custom-polyfill.ts']
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
polyfill?: string[];
|
|
43
|
+
/**
|
|
44
|
+
* Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
|
|
45
|
+
*
|
|
46
|
+
* @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
|
|
47
|
+
*/
|
|
48
|
+
mainFields?: string[];
|
|
49
|
+
/**
|
|
50
|
+
* Array of strings indicating what conditions should be used for module resolution.
|
|
51
|
+
*/
|
|
52
|
+
conditions?: string[];
|
|
53
|
+
/**
|
|
54
|
+
* Array of strings indicating what file extensions should be used for module resolution.
|
|
55
|
+
*
|
|
56
|
+
* @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
|
|
57
|
+
*/
|
|
58
|
+
extensions?: string[];
|
|
59
|
+
/**
|
|
60
|
+
* Array of strings indicating what modules should be deduplicated to a single version in the build.
|
|
61
|
+
*
|
|
62
|
+
* @remarks
|
|
63
|
+
* This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
|
|
64
|
+
*/
|
|
65
|
+
dedupe?: string[];
|
|
66
|
+
/**
|
|
67
|
+
* Array of strings or regular expressions that indicate what modules are builtin for the environment.
|
|
68
|
+
*/
|
|
69
|
+
builtins?: (string | RegExp)[];
|
|
70
|
+
/**
|
|
71
|
+
* Define global variable replacements.
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* This option allows you to specify global constants that will be replaced in the code during the build process. It is similar to the `define` option in esbuild and Vite, enabling you to replace specific identifiers with constant expressions at build time.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* {
|
|
79
|
+
* define: {
|
|
80
|
+
* __VERSION__: '"1.0.0"',
|
|
81
|
+
* __DEV__: 'process.env.NODE_ENV !== "production"'
|
|
82
|
+
* }
|
|
83
|
+
* }
|
|
84
|
+
* ```
|
|
85
|
+
*
|
|
86
|
+
* @see https://esbuild.github.io/api/#define
|
|
87
|
+
* @see https://vitejs.dev/config/build-options.html#define
|
|
88
|
+
* @see https://github.com/rollup/plugins/tree/master/packages/replace
|
|
89
|
+
*/
|
|
90
|
+
define?: Record<string, any>;
|
|
91
|
+
/**
|
|
92
|
+
* Global variables that will have import statements injected where necessary
|
|
93
|
+
*
|
|
94
|
+
* @remarks
|
|
95
|
+
* This option allows you to specify global variables that should be automatically imported from specified modules whenever they are used in the code. This is particularly useful for polyfilling Node.js globals in a browser environment.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```ts
|
|
99
|
+
* {
|
|
100
|
+
* inject: {
|
|
101
|
+
* process: 'process/browser',
|
|
102
|
+
* Buffer: ['buffer', 'Buffer'],
|
|
103
|
+
* }
|
|
104
|
+
* }
|
|
105
|
+
* ```
|
|
106
|
+
*
|
|
107
|
+
* @see https://github.com/rollup/plugins/tree/master/packages/inject
|
|
108
|
+
*/
|
|
109
|
+
inject?: Record<string, string | string[]>;
|
|
31
110
|
/**
|
|
32
111
|
* The alias mappings to use for module resolution during the build process.
|
|
33
112
|
*
|
|
@@ -43,8 +122,13 @@ interface BuildConfig {
|
|
|
43
122
|
* }
|
|
44
123
|
* }
|
|
45
124
|
* ```
|
|
125
|
+
*
|
|
126
|
+
* @see https://github.com/rollup/plugins/tree/master/packages/alias
|
|
46
127
|
*/
|
|
47
|
-
alias?: Record<string, string
|
|
128
|
+
alias?: Record<string, string> | Array<{
|
|
129
|
+
find: string | RegExp;
|
|
130
|
+
replacement: string;
|
|
131
|
+
}>;
|
|
48
132
|
/**
|
|
49
133
|
* A list of modules that should not be bundled, even if they are external dependencies.
|
|
50
134
|
*
|
|
@@ -61,15 +145,16 @@ interface BuildConfig {
|
|
|
61
145
|
*/
|
|
62
146
|
skipNodeModulesBundle?: boolean;
|
|
63
147
|
/**
|
|
64
|
-
*
|
|
148
|
+
* An optional set of override options to apply to the selected build variant.
|
|
65
149
|
*
|
|
66
|
-
* @
|
|
150
|
+
* @remarks
|
|
151
|
+
* 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.
|
|
67
152
|
*/
|
|
68
|
-
|
|
153
|
+
override?: Record<string, any>;
|
|
69
154
|
}
|
|
70
|
-
type BuildResolvedConfig = BuildConfig
|
|
155
|
+
type BuildResolvedConfig = Omit<BuildConfig, "override">;
|
|
71
156
|
|
|
72
|
-
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "
|
|
157
|
+
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
|
|
73
158
|
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
|
74
159
|
|
|
75
160
|
interface ResolvedEntryTypeDefinition extends TypeDefinition {
|
|
@@ -82,7 +167,7 @@ interface ResolvedEntryTypeDefinition extends TypeDefinition {
|
|
|
82
167
|
*/
|
|
83
168
|
output?: string;
|
|
84
169
|
}
|
|
85
|
-
type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "ssr" | "preview"
|
|
170
|
+
type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "mode" | "ssr">> & {
|
|
86
171
|
/**
|
|
87
172
|
* The name of the environment
|
|
88
173
|
*/
|
|
@@ -99,7 +184,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
|
|
|
99
184
|
/**
|
|
100
185
|
* The resolved options for the Powerlines project configuration.
|
|
101
186
|
*/
|
|
102
|
-
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "
|
|
187
|
+
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">> & {
|
|
103
188
|
/**
|
|
104
189
|
* The configuration options that were provided inline to the Powerlines CLI.
|
|
105
190
|
*/
|
|
@@ -130,6 +215,13 @@ type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserCon
|
|
|
130
215
|
* The output configuration options to use for the build process
|
|
131
216
|
*/
|
|
132
217
|
output: OutputResolvedConfig;
|
|
218
|
+
/**
|
|
219
|
+
* Configuration provided to build processes
|
|
220
|
+
*
|
|
221
|
+
* @remarks
|
|
222
|
+
* This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
|
|
223
|
+
*/
|
|
224
|
+
build: Omit<TUserConfig["build"], "override"> & Required<Pick<Required<TUserConfig["build"]>, "override">>;
|
|
133
225
|
/**
|
|
134
226
|
* The log level to use for the Powerlines processes.
|
|
135
227
|
*
|
|
@@ -160,6 +252,10 @@ interface GenerateTypesResult {
|
|
|
160
252
|
directives?: string[];
|
|
161
253
|
code: string;
|
|
162
254
|
}
|
|
255
|
+
type DeepPartial<T> = {
|
|
256
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
257
|
+
};
|
|
258
|
+
type ConfigResult<TContext extends PluginContext = PluginContext> = DeepPartial<TContext["config"]> & Record<string, any>;
|
|
163
259
|
interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext> extends Record<CommandType, (this: TContext) => MaybePromise<void>> {
|
|
164
260
|
/**
|
|
165
261
|
* A function that returns configuration options to be merged with the build context's options.
|
|
@@ -175,7 +271,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
|
|
|
175
271
|
* @param config - The partial configuration object to be modified.
|
|
176
272
|
* @returns A promise that resolves to a partial configuration object.
|
|
177
273
|
*/
|
|
178
|
-
config: (this:
|
|
274
|
+
config: (this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>;
|
|
179
275
|
/**
|
|
180
276
|
* Modify environment configs before it's resolved. The hook can either mutate the passed-in environment config directly, or return a partial config object that will be deeply merged into existing config.
|
|
181
277
|
*
|
|
@@ -283,7 +379,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
|
|
|
283
379
|
* @param config - The partial configuration object to be modified.
|
|
284
380
|
* @returns A promise that resolves to a partial configuration object.
|
|
285
381
|
*/
|
|
286
|
-
config: PluginHook<(this:
|
|
382
|
+
config: PluginHook<(this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>> | ConfigResult<TContext>;
|
|
287
383
|
/**
|
|
288
384
|
* A hook that is called to transform the source code.
|
|
289
385
|
*
|
|
@@ -426,11 +522,8 @@ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
|
|
|
426
522
|
tsconfigFilePath: string;
|
|
427
523
|
};
|
|
428
524
|
|
|
429
|
-
declare const
|
|
430
|
-
declare const __VFS_REVERT__
|
|
431
|
-
declare const __VFS_CACHE__ = "__VFS_CACHE__";
|
|
432
|
-
declare const __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
|
|
433
|
-
declare const __VFS_UNIFIED__ = "__VFS_UNIFIED__";
|
|
525
|
+
declare const __VFS_PATCH__: unique symbol;
|
|
526
|
+
declare const __VFS_REVERT__: unique symbol;
|
|
434
527
|
type OutputModeType = "fs" | "virtual";
|
|
435
528
|
interface VirtualFile {
|
|
436
529
|
/**
|
|
@@ -470,7 +563,24 @@ interface VirtualFile {
|
|
|
470
563
|
*/
|
|
471
564
|
code: string | NodeJS.ArrayBufferView;
|
|
472
565
|
}
|
|
473
|
-
|
|
566
|
+
interface VirtualFileMetadata {
|
|
567
|
+
/**
|
|
568
|
+
* The identifier for the file data.
|
|
569
|
+
*/
|
|
570
|
+
id: string;
|
|
571
|
+
/**
|
|
572
|
+
* The variant of the file.
|
|
573
|
+
*/
|
|
574
|
+
variant: string;
|
|
575
|
+
/**
|
|
576
|
+
* The output mode of the file.
|
|
577
|
+
*/
|
|
578
|
+
mode: string;
|
|
579
|
+
/**
|
|
580
|
+
* Additional metadata associated with the file.
|
|
581
|
+
*/
|
|
582
|
+
properties: Record<string, string>;
|
|
583
|
+
}
|
|
474
584
|
interface ResolveFSOptions {
|
|
475
585
|
mode?: OutputModeType;
|
|
476
586
|
}
|
|
@@ -499,12 +609,18 @@ interface ResolvePathOptions extends ResolveFSOptions {
|
|
|
499
609
|
type?: "file" | "directory";
|
|
500
610
|
}
|
|
501
611
|
interface VirtualFileSystemInterface {
|
|
502
|
-
|
|
612
|
+
/**
|
|
613
|
+
* Patches the File System to include the virtual file system (VFS) contents.
|
|
614
|
+
*/
|
|
615
|
+
[__VFS_PATCH__]: () => void;
|
|
616
|
+
/**
|
|
617
|
+
* Reverts the virtual file system (VFS) to its previous state.
|
|
618
|
+
*/
|
|
503
619
|
[__VFS_REVERT__]: () => void;
|
|
504
620
|
/**
|
|
505
621
|
* The underlying file metadata.
|
|
506
622
|
*/
|
|
507
|
-
|
|
623
|
+
metadata: Record<string, VirtualFileMetadata | undefined>;
|
|
508
624
|
/**
|
|
509
625
|
* A map of module ids to their file paths.
|
|
510
626
|
*/
|
|
@@ -524,7 +640,7 @@ interface VirtualFileSystemInterface {
|
|
|
524
640
|
* @param options - Optional parameters for resolving the path.
|
|
525
641
|
* @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
526
642
|
*/
|
|
527
|
-
|
|
643
|
+
isPhysical: (pathOrId: string, options?: ResolvePathOptions) => boolean;
|
|
528
644
|
/**
|
|
529
645
|
* Checks if a file exists in the virtual file system (VFS).
|
|
530
646
|
*
|
|
@@ -539,15 +655,6 @@ interface VirtualFileSystemInterface {
|
|
|
539
655
|
* @returns `true` if the directory exists, otherwise `false`.
|
|
540
656
|
*/
|
|
541
657
|
isDirectory: (path: string) => boolean;
|
|
542
|
-
/**
|
|
543
|
-
* Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
|
|
544
|
-
*
|
|
545
|
-
* @see https://www.typescriptlang.org/tsconfig#paths
|
|
546
|
-
*
|
|
547
|
-
* @param pathOrId - The path or id to check.
|
|
548
|
-
* @returns Whether the path or id corresponds to a virtual file.
|
|
549
|
-
*/
|
|
550
|
-
isTsconfigPath: (pathOrId: string) => boolean;
|
|
551
658
|
/**
|
|
552
659
|
* Checks if a file exists in the virtual file system (VFS).
|
|
553
660
|
*
|
|
@@ -561,7 +668,7 @@ interface VirtualFileSystemInterface {
|
|
|
561
668
|
* @param pathOrId - The path or id of the file.
|
|
562
669
|
* @returns The metadata of the file if it exists, otherwise undefined.
|
|
563
670
|
*/
|
|
564
|
-
getMetadata: (pathOrId: PathLike) =>
|
|
671
|
+
getMetadata: (pathOrId: PathLike) => VirtualFileMetadata | undefined;
|
|
565
672
|
/**
|
|
566
673
|
* Gets the stats of a file in the virtual file system (VFS).
|
|
567
674
|
*
|
|
@@ -769,23 +876,12 @@ interface VirtualFileSystemInterface {
|
|
|
769
876
|
*/
|
|
770
877
|
resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
|
|
771
878
|
/**
|
|
772
|
-
*
|
|
773
|
-
*
|
|
774
|
-
* @see https://www.typescriptlang.org/tsconfig#paths
|
|
775
|
-
*
|
|
776
|
-
* @param path - The path to check.
|
|
777
|
-
* @returns The resolved file path if it exists, otherwise undefined.
|
|
778
|
-
*/
|
|
779
|
-
resolveTsconfigPath: (path: string) => string | false;
|
|
780
|
-
/**
|
|
781
|
-
* Resolves a package name based on TypeScript's `tsconfig.json` paths.
|
|
782
|
-
*
|
|
783
|
-
* @see https://www.typescriptlang.org/tsconfig#paths
|
|
879
|
+
* Formats a path to match the virtual file system (VFS) structure.
|
|
784
880
|
*
|
|
785
|
-
* @param path - The path to
|
|
786
|
-
* @returns The
|
|
881
|
+
* @param path - The path to format.
|
|
882
|
+
* @returns The formatted path.
|
|
787
883
|
*/
|
|
788
|
-
|
|
884
|
+
formatPath: (path: string) => string;
|
|
789
885
|
/**
|
|
790
886
|
* Resolves a path or id to a file path in the virtual file system.
|
|
791
887
|
*
|
|
@@ -794,23 +890,9 @@ interface VirtualFileSystemInterface {
|
|
|
794
890
|
*/
|
|
795
891
|
realpathSync: (pathOrId: string) => string;
|
|
796
892
|
/**
|
|
797
|
-
*
|
|
798
|
-
*
|
|
799
|
-
* @returns A record mapping file paths to their partial metadata.
|
|
800
|
-
*/
|
|
801
|
-
getPartialMeta: () => Record<string, Partial<VirtualFileSystemMetadata>>;
|
|
802
|
-
/**
|
|
803
|
-
* A map of cached file paths to their underlying file content.
|
|
893
|
+
* Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
|
|
804
894
|
*/
|
|
805
|
-
|
|
806
|
-
/**
|
|
807
|
-
* A reference to the underlying virtual file system.
|
|
808
|
-
*/
|
|
809
|
-
[__VFS_VIRTUAL__]: Volume;
|
|
810
|
-
/**
|
|
811
|
-
* A reference to the underlying unified file system.
|
|
812
|
-
*/
|
|
813
|
-
[__VFS_UNIFIED__]: IUnionFs;
|
|
895
|
+
dispose: () => Promise<void>;
|
|
814
896
|
}
|
|
815
897
|
|
|
816
898
|
interface MetaInfo {
|
|
@@ -838,14 +920,6 @@ interface MetaInfo {
|
|
|
838
920
|
* A hash that represents the path to the project root directory
|
|
839
921
|
*/
|
|
840
922
|
configHash: string;
|
|
841
|
-
/**
|
|
842
|
-
* A mapping of runtime ids to their corresponding file paths
|
|
843
|
-
*/
|
|
844
|
-
builtinIdMap: Record<string, string>;
|
|
845
|
-
/**
|
|
846
|
-
* A mapping of virtual file paths to their corresponding file contents
|
|
847
|
-
*/
|
|
848
|
-
virtualFiles: Record<string, string | null>;
|
|
849
923
|
}
|
|
850
924
|
interface Resolver extends Jiti {
|
|
851
925
|
plugin: Jiti;
|
|
@@ -858,7 +932,13 @@ interface InitContextOptions {
|
|
|
858
932
|
*/
|
|
859
933
|
isHighPriority: boolean;
|
|
860
934
|
}
|
|
861
|
-
|
|
935
|
+
/**
|
|
936
|
+
* The unresolved Powerlines context.
|
|
937
|
+
*
|
|
938
|
+
* @remarks
|
|
939
|
+
* This context is used before the user configuration has been fully resolved after the `config`.
|
|
940
|
+
*/
|
|
941
|
+
interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
862
942
|
/**
|
|
863
943
|
* The Storm workspace configuration
|
|
864
944
|
*/
|
|
@@ -866,7 +946,10 @@ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
|
866
946
|
/**
|
|
867
947
|
* An object containing the options provided to Powerlines
|
|
868
948
|
*/
|
|
869
|
-
config: TResolvedConfig
|
|
949
|
+
config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
|
|
950
|
+
projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
|
|
951
|
+
output: TResolvedConfig["output"];
|
|
952
|
+
};
|
|
870
953
|
/**
|
|
871
954
|
* A logging function for the Powerlines engine
|
|
872
955
|
*/
|
|
@@ -1023,6 +1106,12 @@ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
|
1023
1106
|
*/
|
|
1024
1107
|
extendLog: (name: string) => LogFn;
|
|
1025
1108
|
}
|
|
1109
|
+
type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
|
|
1110
|
+
/**
|
|
1111
|
+
* The fully resolved Powerlines configuration
|
|
1112
|
+
*/
|
|
1113
|
+
config: TResolvedConfig;
|
|
1114
|
+
};
|
|
1026
1115
|
interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
|
|
1027
1116
|
/**
|
|
1028
1117
|
* The environment specific resolved configuration
|
|
@@ -1062,7 +1151,7 @@ type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions
|
|
|
1062
1151
|
* A configuration tuple for a Powerlines plugin.
|
|
1063
1152
|
*/
|
|
1064
1153
|
type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Promise<Plugin<TContext>> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
|
|
1065
|
-
type PartialPlugin<in out TContext extends PluginContext = PluginContext> = DeepPartial<Plugin<TContext>>;
|
|
1154
|
+
type PartialPlugin<in out TContext extends PluginContext = PluginContext> = DeepPartial$1<Plugin<TContext>>;
|
|
1066
1155
|
type PartialPluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<PartialPlugin<TContext>>;
|
|
1067
1156
|
type ProjectType = "application" | "library";
|
|
1068
1157
|
interface OutputConfig {
|
|
@@ -1163,24 +1252,33 @@ interface BaseConfig {
|
|
|
1163
1252
|
* The entry point(s) for the application
|
|
1164
1253
|
*/
|
|
1165
1254
|
entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
|
|
1255
|
+
/**
|
|
1256
|
+
* Configuration for the output of the build process
|
|
1257
|
+
*/
|
|
1258
|
+
output?: OutputConfig;
|
|
1166
1259
|
/**
|
|
1167
1260
|
* Configuration for linting the source code
|
|
1261
|
+
*
|
|
1262
|
+
* @remarks
|
|
1263
|
+
* If set to `false`, linting will be disabled.
|
|
1168
1264
|
*/
|
|
1169
1265
|
lint?: Record<string, any> | false;
|
|
1170
1266
|
/**
|
|
1171
1267
|
* Configuration for testing the source code
|
|
1268
|
+
*
|
|
1269
|
+
* @remarks
|
|
1270
|
+
* If set to `false`, testing will be disabled.
|
|
1172
1271
|
*/
|
|
1173
1272
|
test?: Record<string, any> | false;
|
|
1174
|
-
/**
|
|
1175
|
-
* Configuration for the output of the build process
|
|
1176
|
-
*/
|
|
1177
|
-
output?: OutputConfig;
|
|
1178
1273
|
/**
|
|
1179
1274
|
* Configuration for the transformation of the source code
|
|
1180
1275
|
*/
|
|
1181
1276
|
transform?: Record<string, any>;
|
|
1182
1277
|
/**
|
|
1183
|
-
*
|
|
1278
|
+
* Configuration provided to build processes
|
|
1279
|
+
*
|
|
1280
|
+
* @remarks
|
|
1281
|
+
* This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
|
|
1184
1282
|
*/
|
|
1185
1283
|
build?: BuildConfig;
|
|
1186
1284
|
/**
|
|
@@ -1190,6 +1288,13 @@ interface BaseConfig {
|
|
|
1190
1288
|
* This configuration will be used by the documentation generation plugins during the `docs` command.
|
|
1191
1289
|
*/
|
|
1192
1290
|
docs?: Record<string, any>;
|
|
1291
|
+
/**
|
|
1292
|
+
* Configuration for deploying the source code
|
|
1293
|
+
*
|
|
1294
|
+
* @remarks
|
|
1295
|
+
* If set to `false`, the deployment will be disabled.
|
|
1296
|
+
*/
|
|
1297
|
+
deploy?: Record<string, any> | false;
|
|
1193
1298
|
/**
|
|
1194
1299
|
* The path to the tsconfig file to be used by the compiler
|
|
1195
1300
|
*
|
|
@@ -1210,37 +1315,6 @@ interface BaseConfig {
|
|
|
1210
1315
|
tsconfigRaw?: TSConfig;
|
|
1211
1316
|
}
|
|
1212
1317
|
interface EnvironmentConfig extends BaseConfig {
|
|
1213
|
-
/**
|
|
1214
|
-
* Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
|
|
1215
|
-
*
|
|
1216
|
-
* @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
|
|
1217
|
-
*/
|
|
1218
|
-
mainFields?: string[];
|
|
1219
|
-
/**
|
|
1220
|
-
* Array of strings indicating what conditions should be used for module resolution.
|
|
1221
|
-
*/
|
|
1222
|
-
conditions?: string[];
|
|
1223
|
-
/**
|
|
1224
|
-
* Array of strings indicating what conditions should be used for external modules.
|
|
1225
|
-
*/
|
|
1226
|
-
externalConditions?: string[];
|
|
1227
|
-
/**
|
|
1228
|
-
* Array of strings indicating what file extensions should be used for module resolution.
|
|
1229
|
-
*
|
|
1230
|
-
* @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
|
|
1231
|
-
*/
|
|
1232
|
-
extensions?: string[];
|
|
1233
|
-
/**
|
|
1234
|
-
* Array of strings indicating what modules should be deduplicated to a single version in the build.
|
|
1235
|
-
*
|
|
1236
|
-
* @remarks
|
|
1237
|
-
* This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
|
|
1238
|
-
*/
|
|
1239
|
-
dedupe?: string[];
|
|
1240
|
-
/**
|
|
1241
|
-
* Array of strings or regular expressions that indicate what modules are builtin for the environment.
|
|
1242
|
-
*/
|
|
1243
|
-
builtins?: (string | RegExp)[];
|
|
1244
1318
|
/**
|
|
1245
1319
|
* Configuration options for the preview server
|
|
1246
1320
|
*/
|
|
@@ -1313,16 +1387,28 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
1313
1387
|
*/
|
|
1314
1388
|
framework?: string;
|
|
1315
1389
|
}
|
|
1316
|
-
type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = CommonUserConfig & {
|
|
1317
|
-
|
|
1390
|
+
type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = Omit<CommonUserConfig, "build"> & {
|
|
1391
|
+
/**
|
|
1392
|
+
* Configuration provided to build processes
|
|
1393
|
+
*
|
|
1394
|
+
* @remarks
|
|
1395
|
+
* This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
|
|
1396
|
+
*/
|
|
1397
|
+
build: Omit<TBuildConfig, "override"> & {
|
|
1318
1398
|
/**
|
|
1319
1399
|
* The build variant being used by the Powerlines engine.
|
|
1320
1400
|
*/
|
|
1321
1401
|
variant?: TBuildVariant;
|
|
1402
|
+
/**
|
|
1403
|
+
* An optional set of override options to apply to the selected build variant.
|
|
1404
|
+
*
|
|
1405
|
+
* @remarks
|
|
1406
|
+
* 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.
|
|
1407
|
+
*/
|
|
1408
|
+
override?: Partial<TBuildResolvedConfig>;
|
|
1322
1409
|
};
|
|
1323
|
-
override?: Partial<TBuildResolvedConfig>;
|
|
1324
1410
|
};
|
|
1325
|
-
type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "
|
|
1411
|
+
type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
|
|
1326
1412
|
/**
|
|
1327
1413
|
* The configuration provided while executing Powerlines commands.
|
|
1328
1414
|
*/
|
|
@@ -1333,4 +1419,4 @@ type InlineConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserCo
|
|
|
1333
1419
|
command: PowerlinesCommand;
|
|
1334
1420
|
};
|
|
1335
1421
|
|
|
1336
|
-
export type { BuildVariant as B,
|
|
1422
|
+
export type { BuildVariant as B, ConfigResult as C, ExternalPluginHookFunctions as E, GenerateTypesResult as G, PluginContext as P, ResolvedConfig as R, UnresolvedContext as U, Plugin as a, PluginFactory as b, PartialPlugin as c, PartialPluginFactory as d, BasePluginHookFunctions as e, PluginHookFunctions as f, PluginHookObject as g, PluginConfigObject as h, PluginConfigTuple as i, PluginConfig as j, PluginHook as k, EnvironmentConfig as l, EnvironmentResolvedConfig as m };
|