powerlines 0.20.0 → 0.22.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-WRP6ANCC.js → chunk-237NITCY.js} +20 -5
- package/dist/{chunk-LM6YBGC6.cjs → chunk-2HNC5JVK.cjs} +2 -2
- package/dist/{chunk-4KCSCJ6E.js → chunk-2Q2PSPZK.js} +1 -1
- package/dist/{chunk-24AZZCCW.js → chunk-3FS7K4DZ.js} +1 -1
- package/dist/{chunk-OQNYDN5F.cjs → chunk-3JH36WUJ.cjs} +2 -2
- package/dist/{chunk-CTSV5JAF.cjs → chunk-44UTUCBG.cjs} +21 -8
- package/dist/{chunk-MOH4CWHN.cjs → chunk-6XRDZOE3.cjs} +968 -664
- package/dist/{chunk-MZQXGWUK.cjs → chunk-7C2NEC7D.cjs} +2 -2
- package/dist/{chunk-SIEHJFKB.js → chunk-A5GTERYN.js} +2 -2
- package/dist/chunk-B4KLWFY6.cjs +32 -0
- package/dist/{chunk-FBMQTOMN.js → chunk-C5TKY75S.js} +1 -1
- package/dist/{chunk-T4AJOD6A.cjs → chunk-DMXXNXLS.cjs} +4 -4
- package/dist/{chunk-IHWRGHX6.cjs → chunk-F4BD5CXH.cjs} +2 -2
- package/dist/chunk-GRAVJX3I.js +29 -0
- package/dist/{chunk-WE7PLY4H.cjs → chunk-HV7SHEHD.cjs} +11 -4
- package/dist/{chunk-WJ4CZKXY.js → chunk-JKBJF3UI.js} +1 -1
- package/dist/{chunk-2QGVOWKM.js → chunk-L4AXJFX2.js} +19 -6
- package/dist/{chunk-VXF37DA2.cjs → chunk-LKYBC6DX.cjs} +4 -4
- package/dist/{chunk-A2EZ3M22.js → chunk-M6XGEVJY.js} +1 -1
- package/dist/{chunk-FYKDALJL.js → chunk-NZXMP4J5.js} +1 -1
- package/dist/{chunk-F4TS44KB.js → chunk-OZU47JET.js} +999 -702
- package/dist/{chunk-FCTNMPJF.cjs → chunk-PAMSESZV.cjs} +1 -1
- package/dist/{chunk-TY3QAXEY.js → chunk-PDFOF6ZP.js} +11 -4
- package/dist/{chunk-IMMNZSFZ.cjs → chunk-PJP4MECA.cjs} +2 -2
- package/dist/{chunk-VSZXQLMI.js → chunk-QQGXARP3.js} +1 -1
- package/dist/{chunk-6UVRB3IN.cjs → chunk-SQANNMRF.cjs} +22 -7
- package/dist/{chunk-2KGMZZ36.js → chunk-SVDPKN3U.js} +1 -1
- package/dist/chunk-SVF4ATJR.cjs +8 -0
- package/dist/{chunk-VVFIZVYE.cjs → chunk-UVM4JAR3.cjs} +2 -2
- package/dist/{chunk-JKF342AW.js → chunk-WU7I52LM.js} +2 -2
- package/dist/{chunk-P3BP6LXC.cjs → chunk-WYJGOC3Y.cjs} +2 -2
- package/dist/{chunk-KL7HP7JM.cjs → chunk-YG5ORYN2.cjs} +2 -2
- package/dist/{chunk-QH3M5FBF.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-CUxY7WKY.d.cts → hooks-CJ1W5lrx.d.cts} +1 -1
- package/dist/{hooks-BBZyf9CN.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 +1 -3
- package/dist/lib/build/esbuild.d.ts +1 -3
- package/dist/lib/build/esbuild.js +2 -2
- package/dist/lib/build/index.cjs +23 -23
- package/dist/lib/build/index.d.cts +2 -4
- package/dist/lib/build/index.d.ts +2 -4
- package/dist/lib/build/index.js +8 -8
- 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.d.cts +1 -3
- package/dist/lib/build/rspack.d.ts +1 -3
- 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-K4FER6YK.cjs → chunk-27VJFYDM.cjs} +13 -6
- package/dist/lib/{chunk-ZJNDT3GX.js → chunk-3G4C3YAU.js} +12 -5
- package/dist/lib/{chunk-TTKY3DR4.js → chunk-43VJVIL2.js} +975 -679
- package/dist/lib/{chunk-CLV4J4L7.cjs → chunk-4FX4VOLA.cjs} +2 -3
- package/dist/lib/{chunk-DFRWBQQT.js → chunk-5GM5UAUO.js} +3 -4
- package/dist/lib/{chunk-S5F4DE65.js → chunk-5SADLYYK.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-FGYAS4NB.cjs → chunk-CSJ6KNIX.cjs} +11 -4
- package/dist/lib/{chunk-O36FCQM6.cjs → chunk-E2MVGKGH.cjs} +2 -2
- package/dist/lib/{chunk-O5LNKYQV.cjs → chunk-FN7673NC.cjs} +2 -2
- package/dist/lib/{chunk-HIY6WOU3.cjs → chunk-GDXHCTCX.cjs} +13 -6
- package/dist/lib/{chunk-IBONIIAZ.cjs → chunk-HCOHRD3Q.cjs} +19 -6
- package/dist/lib/{chunk-OI2V6L7D.js → chunk-HOZ37BFN.js} +2 -3
- package/dist/lib/{chunk-4QRL5CNE.js → chunk-HQ5YA43H.js} +11 -4
- package/dist/lib/{chunk-IXREPTHZ.js → chunk-IOM7GRZU.js} +1 -1
- package/dist/lib/{chunk-WFUO3YPK.js → chunk-L4NEN725.js} +19 -4
- package/dist/lib/{chunk-H7V7EPB2.cjs → chunk-LAFEAMNN.cjs} +2 -2
- package/dist/lib/{chunk-7Y5MJRWF.js → chunk-LIN4KAV3.js} +57 -34
- package/dist/lib/{chunk-MWA3DWY5.cjs → chunk-LMO7PRBP.cjs} +4 -5
- package/dist/lib/{chunk-ARCFV3IJ.cjs → chunk-LPA7UJIR.cjs} +955 -657
- package/dist/lib/{chunk-OTBLE55Z.cjs → chunk-MPCVQK2D.cjs} +12 -1
- package/dist/lib/{chunk-4RUHX7LV.js → chunk-QAXCBFBP.js} +1 -1
- package/dist/lib/{chunk-WWNNBLU7.js → chunk-T7RMV2FW.js} +18 -5
- 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-GRJJZ5VJ.js → chunk-YH5GOJS3.js} +2 -15
- package/dist/lib/{chunk-NU4GDWLL.js → chunk-YV6MDKW4.js} +12 -5
- package/dist/lib/{config-DN8Ad0lv.d.cts → config-7vXtXiGg.d.cts} +67 -67
- package/dist/lib/{config-Bag1Ft7u.d.ts → config-B9aVEiiX.d.ts} +67 -67
- 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-BVnPAWgt.d.ts → hooks-BxUBzqCb.d.ts} +1 -1
- package/dist/lib/{hooks-H2P-7xA4.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-DGUQQKZF.js +41 -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-HZIY2AV4.cjs +43 -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-5TL6KEQ5.cjs → chunk-UNAGYQRB.cjs} +4 -4
- package/dist/plugin-utils/{chunk-432MQOUZ.js → chunk-XIXI67PY.js} +1 -1
- package/dist/plugin-utils/{config-pwKiZvzJ.d.cts → context-BseW8r26.d.cts} +406 -406
- package/dist/plugin-utils/{config-pwKiZvzJ.d.ts → context-BseW8r26.d.ts} +406 -406
- package/dist/plugin-utils/context-helpers.cjs +11 -0
- package/dist/plugin-utils/context-helpers.d.cts +29 -0
- package/dist/plugin-utils/context-helpers.d.ts +29 -0
- package/dist/plugin-utils/context-helpers.js +2 -0
- package/dist/plugin-utils/enforce.cjs +5 -5
- package/dist/plugin-utils/enforce.d.cts +9 -11
- package/dist/plugin-utils/enforce.d.ts +9 -11
- package/dist/plugin-utils/enforce.js +4 -4
- package/dist/plugin-utils/extend.cjs +4 -4
- package/dist/plugin-utils/extend.d.cts +9 -11
- package/dist/plugin-utils/extend.d.ts +9 -11
- 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 +9 -11
- package/dist/plugin-utils/get-config-path.d.ts +9 -11
- 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 +7 -9
- package/dist/plugin-utils/helpers.d.ts +7 -9
- package/dist/plugin-utils/helpers.js +1 -1
- package/dist/plugin-utils/index.cjs +27 -22
- package/dist/plugin-utils/index.d.cts +10 -11
- package/dist/plugin-utils/index.d.ts +10 -11
- package/dist/plugin-utils/index.js +6 -5
- package/dist/plugin-utils/merge.cjs +3 -3
- package/dist/plugin-utils/merge.d.cts +9 -11
- package/dist/plugin-utils/merge.d.ts +9 -11
- package/dist/plugin-utils/merge.js +2 -2
- package/dist/plugin-utils/paths.d.cts +9 -11
- package/dist/plugin-utils/paths.d.ts +9 -11
- package/dist/{resolved-ohMN-3VJ.d.cts → resolved-D8vIizyA.d.cts} +15 -16
- package/dist/{resolved-Sxyrlt6g.d.ts → resolved-DWxXKJYy.d.ts} +15 -16
- 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 +18 -1
- package/dist/types/build.d.ts +18 -1
- 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 +1 -2
- package/dist/types/context.d.ts +1 -2
- 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 +1 -2
- package/dist/unloader.d.ts +1 -2
- package/dist/unloader.js +5 -5
- package/dist/unplugin.cjs +20 -20
- package/dist/unplugin.d.cts +2 -3
- package/dist/unplugin.d.ts +2 -3
- 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 +3 -3
- package/dist/chunk-OBYFBPPO.js +0 -9
- package/dist/chunk-RF6RSWD4.cjs +0 -16
- package/dist/chunk-SECEPZQ3.cjs +0 -32
- package/dist/chunk-XBS3AHAK.js +0 -29
|
@@ -1,23 +1,21 @@
|
|
|
1
|
+
import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
2
|
+
import { NonUndefined, MaybePromise, FunctionLike, DeepPartial as DeepPartial$1 } from '@stryke/types/base';
|
|
3
|
+
import { PackageJson } from '@stryke/types/package-json';
|
|
4
|
+
import { Jiti } from 'jiti';
|
|
5
|
+
import { ParserOptions, ParseResult } from 'oxc-parser';
|
|
6
|
+
import { Range } from 'semver';
|
|
7
|
+
import { TransformResult, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginContext, UnpluginBuildContext, UnpluginMessage } from 'unplugin';
|
|
1
8
|
import { Format } from '@storm-software/build-tools/types';
|
|
2
9
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
3
10
|
import { StormWorkspaceConfig } from '@storm-software/config/types';
|
|
4
|
-
import { NonUndefined, MaybePromise, FunctionLike, DeepPartial as DeepPartial$1 } from '@stryke/types/base';
|
|
5
11
|
import { TypeDefinition, TypeDefinitionParameter } from '@stryke/types/configuration';
|
|
6
12
|
import { AssetGlob } from '@stryke/types/file';
|
|
7
13
|
import { ResolvedPreviewOptions, PreviewOptions } from 'vite';
|
|
8
|
-
import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
9
|
-
import { PackageJson } from '@stryke/types/package-json';
|
|
10
|
-
import { Jiti } from 'jiti';
|
|
11
|
-
import { ParserOptions, ParseResult } from 'oxc-parser';
|
|
12
|
-
import { Range } from 'semver';
|
|
13
|
-
import { TransformResult, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginMessage, UnpluginBuildContext, UnpluginContext } from 'unplugin';
|
|
14
|
-
import { ArrayValues } from '@stryke/types/array';
|
|
15
14
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
16
15
|
import ts from 'typescript';
|
|
17
16
|
import { PrimitiveJsonValue } from '@stryke/json/types';
|
|
18
|
-
import { Volume } from 'memfs';
|
|
19
17
|
import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
|
|
20
|
-
import {
|
|
18
|
+
import { ArrayValues } from '@stryke/types/array';
|
|
21
19
|
|
|
22
20
|
type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
|
|
23
21
|
type BuildVariant = UnpluginBuildVariant | "tsup" | "unbuild";
|
|
@@ -28,6 +26,20 @@ 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[];
|
|
31
43
|
/**
|
|
32
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.
|
|
33
45
|
*
|
|
@@ -113,7 +125,10 @@ interface BuildConfig {
|
|
|
113
125
|
*
|
|
114
126
|
* @see https://github.com/rollup/plugins/tree/master/packages/alias
|
|
115
127
|
*/
|
|
116
|
-
alias?: Record<string, string
|
|
128
|
+
alias?: Record<string, string> | Array<{
|
|
129
|
+
find: string | RegExp;
|
|
130
|
+
replacement: string;
|
|
131
|
+
}>;
|
|
117
132
|
/**
|
|
118
133
|
* A list of modules that should not be bundled, even if they are external dependencies.
|
|
119
134
|
*
|
|
@@ -139,7 +154,7 @@ interface BuildConfig {
|
|
|
139
154
|
}
|
|
140
155
|
type BuildResolvedConfig = Omit<BuildConfig, "override">;
|
|
141
156
|
|
|
142
|
-
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"];
|
|
143
158
|
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
|
144
159
|
|
|
145
160
|
interface ResolvedEntryTypeDefinition extends TypeDefinition {
|
|
@@ -169,7 +184,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
|
|
|
169
184
|
/**
|
|
170
185
|
* The resolved options for the Powerlines project configuration.
|
|
171
186
|
*/
|
|
172
|
-
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "framework">> & {
|
|
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">> & {
|
|
173
188
|
/**
|
|
174
189
|
* The configuration options that were provided inline to the Powerlines CLI.
|
|
175
190
|
*/
|
|
@@ -507,11 +522,8 @@ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
|
|
|
507
522
|
tsconfigFilePath: string;
|
|
508
523
|
};
|
|
509
524
|
|
|
510
|
-
declare const
|
|
511
|
-
declare const __VFS_REVERT__
|
|
512
|
-
declare const __VFS_CACHE__ = "__VFS_CACHE__";
|
|
513
|
-
declare const __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
|
|
514
|
-
declare const __VFS_UNIFIED__ = "__VFS_UNIFIED__";
|
|
525
|
+
declare const __VFS_PATCH__: unique symbol;
|
|
526
|
+
declare const __VFS_REVERT__: unique symbol;
|
|
515
527
|
type OutputModeType = "fs" | "virtual";
|
|
516
528
|
interface VirtualFile {
|
|
517
529
|
/**
|
|
@@ -551,7 +563,24 @@ interface VirtualFile {
|
|
|
551
563
|
*/
|
|
552
564
|
code: string | NodeJS.ArrayBufferView;
|
|
553
565
|
}
|
|
554
|
-
|
|
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
|
+
}
|
|
555
584
|
interface ResolveFSOptions {
|
|
556
585
|
mode?: OutputModeType;
|
|
557
586
|
}
|
|
@@ -580,12 +609,18 @@ interface ResolvePathOptions extends ResolveFSOptions {
|
|
|
580
609
|
type?: "file" | "directory";
|
|
581
610
|
}
|
|
582
611
|
interface VirtualFileSystemInterface {
|
|
583
|
-
|
|
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
|
+
*/
|
|
584
619
|
[__VFS_REVERT__]: () => void;
|
|
585
620
|
/**
|
|
586
621
|
* The underlying file metadata.
|
|
587
622
|
*/
|
|
588
|
-
|
|
623
|
+
metadata: Record<string, VirtualFileMetadata | undefined>;
|
|
589
624
|
/**
|
|
590
625
|
* A map of module ids to their file paths.
|
|
591
626
|
*/
|
|
@@ -605,7 +640,7 @@ interface VirtualFileSystemInterface {
|
|
|
605
640
|
* @param options - Optional parameters for resolving the path.
|
|
606
641
|
* @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
607
642
|
*/
|
|
608
|
-
|
|
643
|
+
isPhysical: (pathOrId: string, options?: ResolvePathOptions) => boolean;
|
|
609
644
|
/**
|
|
610
645
|
* Checks if a file exists in the virtual file system (VFS).
|
|
611
646
|
*
|
|
@@ -620,15 +655,6 @@ interface VirtualFileSystemInterface {
|
|
|
620
655
|
* @returns `true` if the directory exists, otherwise `false`.
|
|
621
656
|
*/
|
|
622
657
|
isDirectory: (path: string) => boolean;
|
|
623
|
-
/**
|
|
624
|
-
* Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
|
|
625
|
-
*
|
|
626
|
-
* @see https://www.typescriptlang.org/tsconfig#paths
|
|
627
|
-
*
|
|
628
|
-
* @param pathOrId - The path or id to check.
|
|
629
|
-
* @returns Whether the path or id corresponds to a virtual file.
|
|
630
|
-
*/
|
|
631
|
-
isTsconfigPath: (pathOrId: string) => boolean;
|
|
632
658
|
/**
|
|
633
659
|
* Checks if a file exists in the virtual file system (VFS).
|
|
634
660
|
*
|
|
@@ -642,7 +668,7 @@ interface VirtualFileSystemInterface {
|
|
|
642
668
|
* @param pathOrId - The path or id of the file.
|
|
643
669
|
* @returns The metadata of the file if it exists, otherwise undefined.
|
|
644
670
|
*/
|
|
645
|
-
getMetadata: (pathOrId: PathLike) =>
|
|
671
|
+
getMetadata: (pathOrId: PathLike) => VirtualFileMetadata | undefined;
|
|
646
672
|
/**
|
|
647
673
|
* Gets the stats of a file in the virtual file system (VFS).
|
|
648
674
|
*
|
|
@@ -850,23 +876,12 @@ interface VirtualFileSystemInterface {
|
|
|
850
876
|
*/
|
|
851
877
|
resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
|
|
852
878
|
/**
|
|
853
|
-
*
|
|
854
|
-
*
|
|
855
|
-
* @see https://www.typescriptlang.org/tsconfig#paths
|
|
856
|
-
*
|
|
857
|
-
* @param path - The path to check.
|
|
858
|
-
* @returns The resolved file path if it exists, otherwise undefined.
|
|
859
|
-
*/
|
|
860
|
-
resolveTsconfigPath: (path: string) => string | false;
|
|
861
|
-
/**
|
|
862
|
-
* Resolves a package name based on TypeScript's `tsconfig.json` paths.
|
|
879
|
+
* Formats a path to match the virtual file system (VFS) structure.
|
|
863
880
|
*
|
|
864
|
-
* @
|
|
865
|
-
*
|
|
866
|
-
* @param path - The path to check.
|
|
867
|
-
* @returns The resolved package name if it exists, otherwise undefined.
|
|
881
|
+
* @param path - The path to format.
|
|
882
|
+
* @returns The formatted path.
|
|
868
883
|
*/
|
|
869
|
-
|
|
884
|
+
formatPath: (path: string) => string;
|
|
870
885
|
/**
|
|
871
886
|
* Resolves a path or id to a file path in the virtual file system.
|
|
872
887
|
*
|
|
@@ -875,131 +890,401 @@ interface VirtualFileSystemInterface {
|
|
|
875
890
|
*/
|
|
876
891
|
realpathSync: (pathOrId: string) => string;
|
|
877
892
|
/**
|
|
878
|
-
*
|
|
893
|
+
* Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
|
|
894
|
+
*/
|
|
895
|
+
dispose: () => Promise<void>;
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
|
|
899
|
+
/**
|
|
900
|
+
* The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
|
|
901
|
+
*/
|
|
902
|
+
type WorkspaceConfig = Partial<StormWorkspaceConfig> & Required<Pick<StormWorkspaceConfig, "workspaceRoot">>;
|
|
903
|
+
type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext>>;
|
|
904
|
+
/**
|
|
905
|
+
* A configuration tuple for a Powerlines plugin.
|
|
906
|
+
*/
|
|
907
|
+
type PluginConfigTuple<TContext extends PluginContext = PluginContext, TOptions = any> = [string | PluginFactory<TContext, TOptions>, TOptions] | [Plugin<TContext>];
|
|
908
|
+
/**
|
|
909
|
+
* A configuration object for a Powerlines plugin.
|
|
910
|
+
*/
|
|
911
|
+
type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions = any> = {
|
|
912
|
+
plugin: string | PluginFactory<TContext, TOptions>;
|
|
913
|
+
options: TOptions;
|
|
914
|
+
} | {
|
|
915
|
+
plugin: Plugin<TContext>;
|
|
916
|
+
options?: never;
|
|
917
|
+
};
|
|
918
|
+
/**
|
|
919
|
+
* A configuration tuple for a Powerlines plugin.
|
|
920
|
+
*/
|
|
921
|
+
type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Promise<Plugin<TContext>> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
|
|
922
|
+
type PartialPlugin<in out TContext extends PluginContext = PluginContext> = DeepPartial$1<Plugin<TContext>>;
|
|
923
|
+
type PartialPluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<PartialPlugin<TContext>>;
|
|
924
|
+
type ProjectType = "application" | "library";
|
|
925
|
+
interface OutputConfig {
|
|
926
|
+
/**
|
|
927
|
+
* The path to output the final compiled files to
|
|
928
|
+
*
|
|
929
|
+
* @remarks
|
|
930
|
+
* If a value is not provided, Powerlines will attempt to:
|
|
931
|
+
* 1. Use the `outDir` value in the `tsconfig.json` file.
|
|
932
|
+
* 2. Use the `dist` directory in the project root directory.
|
|
879
933
|
*
|
|
880
|
-
* @
|
|
934
|
+
* @defaultValue "dist/\{projectRoot\}"
|
|
881
935
|
*/
|
|
882
|
-
|
|
936
|
+
outputPath?: string;
|
|
883
937
|
/**
|
|
884
|
-
*
|
|
938
|
+
* The format of the output files
|
|
939
|
+
*
|
|
940
|
+
* @defaultValue "virtual"
|
|
885
941
|
*/
|
|
886
|
-
|
|
942
|
+
mode?: OutputModeType;
|
|
887
943
|
/**
|
|
888
|
-
*
|
|
944
|
+
* The path of the generated runtime declaration file relative to the workspace root.
|
|
945
|
+
*
|
|
946
|
+
* @defaultValue "\{projectRoot\}/powerlines.d.ts"
|
|
889
947
|
*/
|
|
890
|
-
|
|
948
|
+
dts?: string | false;
|
|
891
949
|
/**
|
|
892
|
-
* A
|
|
950
|
+
* A prefix to use for identifying builtin modules
|
|
951
|
+
*
|
|
952
|
+
* @remarks
|
|
953
|
+
* 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"`.
|
|
954
|
+
*
|
|
955
|
+
* @defaultValue "powerlines"
|
|
893
956
|
*/
|
|
894
|
-
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
interface MetaInfo {
|
|
957
|
+
builtinPrefix?: string;
|
|
898
958
|
/**
|
|
899
|
-
* The
|
|
959
|
+
* The folder where the generated runtime artifacts will be located
|
|
960
|
+
*
|
|
961
|
+
* @remarks
|
|
962
|
+
* This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
|
|
963
|
+
*
|
|
964
|
+
* @defaultValue "\{projectRoot\}/.powerlines"
|
|
900
965
|
*/
|
|
901
|
-
|
|
966
|
+
artifactsFolder?: string;
|
|
902
967
|
/**
|
|
903
|
-
* The
|
|
968
|
+
* The module format of the output files
|
|
969
|
+
*
|
|
970
|
+
* @remarks
|
|
971
|
+
* 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.
|
|
972
|
+
*
|
|
973
|
+
* @defaultValue "esm"
|
|
904
974
|
*/
|
|
905
|
-
|
|
975
|
+
format?: Format | Format[];
|
|
906
976
|
/**
|
|
907
|
-
*
|
|
977
|
+
* A list of assets to copy to the output directory
|
|
978
|
+
*
|
|
979
|
+
* @remarks
|
|
980
|
+
* 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.
|
|
908
981
|
*/
|
|
909
|
-
|
|
982
|
+
assets?: Array<string | AssetGlob>;
|
|
983
|
+
}
|
|
984
|
+
interface BaseConfig {
|
|
910
985
|
/**
|
|
911
|
-
* The
|
|
986
|
+
* The name of the project
|
|
912
987
|
*/
|
|
913
|
-
|
|
988
|
+
name?: string;
|
|
914
989
|
/**
|
|
915
|
-
*
|
|
990
|
+
* The project display title
|
|
991
|
+
*
|
|
992
|
+
* @remarks
|
|
993
|
+
* This option is used in documentation generation and other places where a human-readable title is needed.
|
|
916
994
|
*/
|
|
917
|
-
|
|
995
|
+
title?: string;
|
|
918
996
|
/**
|
|
919
|
-
* A
|
|
997
|
+
* A description of the project
|
|
998
|
+
*
|
|
999
|
+
* @remarks
|
|
1000
|
+
* If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
|
|
920
1001
|
*/
|
|
921
|
-
|
|
1002
|
+
description?: string;
|
|
922
1003
|
/**
|
|
923
|
-
*
|
|
1004
|
+
* The log level to use for the Powerlines processes.
|
|
1005
|
+
*
|
|
1006
|
+
* @defaultValue "info"
|
|
924
1007
|
*/
|
|
925
|
-
|
|
1008
|
+
logLevel?: LogLevelLabel | null;
|
|
926
1009
|
/**
|
|
927
|
-
* A
|
|
1010
|
+
* A custom logger function to use for logging messages
|
|
928
1011
|
*/
|
|
929
|
-
|
|
930
|
-
}
|
|
931
|
-
interface Resolver extends Jiti {
|
|
932
|
-
plugin: Jiti;
|
|
933
|
-
}
|
|
934
|
-
interface InitContextOptions {
|
|
1012
|
+
customLogger?: LogFn;
|
|
935
1013
|
/**
|
|
936
|
-
*
|
|
1014
|
+
* 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.
|
|
937
1015
|
*
|
|
938
|
-
* @defaultValue
|
|
1016
|
+
* @defaultValue "production"
|
|
939
1017
|
*/
|
|
940
|
-
|
|
941
|
-
}
|
|
942
|
-
/**
|
|
943
|
-
* The unresolved Powerlines context.
|
|
944
|
-
*
|
|
945
|
-
* @remarks
|
|
946
|
-
* This context is used before the user configuration has been fully resolved after the `config`.
|
|
947
|
-
*/
|
|
948
|
-
interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
1018
|
+
mode?: "development" | "test" | "production";
|
|
949
1019
|
/**
|
|
950
|
-
* The
|
|
1020
|
+
* The entry point(s) for the application
|
|
951
1021
|
*/
|
|
952
|
-
|
|
1022
|
+
entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
|
|
953
1023
|
/**
|
|
954
|
-
*
|
|
1024
|
+
* Configuration for the output of the build process
|
|
955
1025
|
*/
|
|
956
|
-
|
|
957
|
-
projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
|
|
958
|
-
output: TResolvedConfig["output"];
|
|
959
|
-
};
|
|
1026
|
+
output?: OutputConfig;
|
|
960
1027
|
/**
|
|
961
|
-
*
|
|
1028
|
+
* Configuration for linting the source code
|
|
1029
|
+
*
|
|
1030
|
+
* @remarks
|
|
1031
|
+
* If set to `false`, linting will be disabled.
|
|
962
1032
|
*/
|
|
963
|
-
|
|
1033
|
+
lint?: Record<string, any> | false;
|
|
964
1034
|
/**
|
|
965
|
-
*
|
|
1035
|
+
* Configuration for testing the source code
|
|
1036
|
+
*
|
|
1037
|
+
* @remarks
|
|
1038
|
+
* If set to `false`, testing will be disabled.
|
|
966
1039
|
*/
|
|
967
|
-
|
|
1040
|
+
test?: Record<string, any> | false;
|
|
968
1041
|
/**
|
|
969
|
-
*
|
|
1042
|
+
* Configuration for the transformation of the source code
|
|
970
1043
|
*/
|
|
971
|
-
|
|
1044
|
+
transform?: Record<string, any>;
|
|
972
1045
|
/**
|
|
973
|
-
*
|
|
1046
|
+
* Configuration provided to build processes
|
|
1047
|
+
*
|
|
1048
|
+
* @remarks
|
|
1049
|
+
* This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
|
|
974
1050
|
*/
|
|
975
|
-
|
|
1051
|
+
build?: BuildConfig;
|
|
976
1052
|
/**
|
|
977
|
-
*
|
|
1053
|
+
* Configuration for documentation generation
|
|
1054
|
+
*
|
|
1055
|
+
* @remarks
|
|
1056
|
+
* This configuration will be used by the documentation generation plugins during the `docs` command.
|
|
978
1057
|
*/
|
|
979
|
-
|
|
1058
|
+
docs?: Record<string, any>;
|
|
980
1059
|
/**
|
|
981
|
-
*
|
|
1060
|
+
* Configuration for deploying the source code
|
|
1061
|
+
*
|
|
1062
|
+
* @remarks
|
|
1063
|
+
* If set to `false`, the deployment will be disabled.
|
|
982
1064
|
*/
|
|
983
|
-
|
|
1065
|
+
deploy?: Record<string, any> | false;
|
|
984
1066
|
/**
|
|
985
|
-
*
|
|
1067
|
+
* The path to the tsconfig file to be used by the compiler
|
|
1068
|
+
*
|
|
1069
|
+
* @remarks
|
|
1070
|
+
* 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).
|
|
1071
|
+
*
|
|
1072
|
+
* @defaultValue "\{projectRoot\}/tsconfig.json"
|
|
986
1073
|
*/
|
|
987
|
-
|
|
1074
|
+
tsconfig?: string;
|
|
988
1075
|
/**
|
|
989
|
-
* The
|
|
1076
|
+
* The raw {@link TSConfig} object to be used by the compiler. This object will be merged with the `tsconfig.json` file.
|
|
1077
|
+
*
|
|
1078
|
+
* @see https://www.typescriptlang.org/tsconfig
|
|
1079
|
+
*
|
|
1080
|
+
* @remarks
|
|
1081
|
+
* If populated, this option takes higher priority than `tsconfig`
|
|
990
1082
|
*/
|
|
991
|
-
|
|
1083
|
+
tsconfigRaw?: TSConfig;
|
|
1084
|
+
}
|
|
1085
|
+
interface EnvironmentConfig extends BaseConfig {
|
|
992
1086
|
/**
|
|
993
|
-
*
|
|
1087
|
+
* Configuration options for the preview server
|
|
994
1088
|
*/
|
|
995
|
-
|
|
1089
|
+
preview?: PreviewOptions;
|
|
996
1090
|
/**
|
|
997
|
-
*
|
|
1091
|
+
* A flag indicating whether the build is for a Server-Side Rendering environment.
|
|
998
1092
|
*/
|
|
999
|
-
|
|
1093
|
+
ssr?: boolean;
|
|
1000
1094
|
/**
|
|
1001
|
-
*
|
|
1002
|
-
|
|
1095
|
+
* Define if this environment is used for Server-Side Rendering
|
|
1096
|
+
*
|
|
1097
|
+
* @defaultValue "server" (if it isn't the client environment)
|
|
1098
|
+
*/
|
|
1099
|
+
consumer?: "client" | "server";
|
|
1100
|
+
}
|
|
1101
|
+
interface CommonUserConfig extends BaseConfig {
|
|
1102
|
+
/**
|
|
1103
|
+
* The type of project being built
|
|
1104
|
+
*
|
|
1105
|
+
* @defaultValue "application"
|
|
1106
|
+
*/
|
|
1107
|
+
type?: ProjectType;
|
|
1108
|
+
/**
|
|
1109
|
+
* The root directory of the project
|
|
1110
|
+
*/
|
|
1111
|
+
root: string;
|
|
1112
|
+
/**
|
|
1113
|
+
* The root directory of the project's source code
|
|
1114
|
+
*
|
|
1115
|
+
* @defaultValue "\{root\}/src"
|
|
1116
|
+
*/
|
|
1117
|
+
sourceRoot?: string;
|
|
1118
|
+
/**
|
|
1119
|
+
* A path to a custom configuration file to be used instead of the default `storm.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
|
|
1120
|
+
*
|
|
1121
|
+
* @remarks
|
|
1122
|
+
* This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
|
|
1123
|
+
*/
|
|
1124
|
+
configFile?: string;
|
|
1125
|
+
/**
|
|
1126
|
+
* Should the Powerlines CLI processes skip installing missing packages?
|
|
1127
|
+
*
|
|
1128
|
+
* @remarks
|
|
1129
|
+
* This option is useful for CI/CD environments where the installation of packages is handled by a different process.
|
|
1130
|
+
*
|
|
1131
|
+
* @defaultValue false
|
|
1132
|
+
*/
|
|
1133
|
+
skipInstalls?: boolean;
|
|
1134
|
+
/**
|
|
1135
|
+
* Should the compiler processes skip any improvements that make use of cache?
|
|
1136
|
+
*
|
|
1137
|
+
* @defaultValue false
|
|
1138
|
+
*/
|
|
1139
|
+
skipCache?: boolean;
|
|
1140
|
+
/**
|
|
1141
|
+
* A list of resolvable paths to plugins used during the build process
|
|
1142
|
+
*/
|
|
1143
|
+
plugins?: PluginConfig<PluginContext<any>>[];
|
|
1144
|
+
/**
|
|
1145
|
+
* Environment-specific configurations
|
|
1146
|
+
*/
|
|
1147
|
+
environments?: Record<string, EnvironmentConfig>;
|
|
1148
|
+
/**
|
|
1149
|
+
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
1150
|
+
*
|
|
1151
|
+
* @remarks
|
|
1152
|
+
* 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.
|
|
1153
|
+
*
|
|
1154
|
+
* @defaultValue "powerlines"
|
|
1155
|
+
*/
|
|
1156
|
+
framework?: string;
|
|
1157
|
+
}
|
|
1158
|
+
type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = Omit<CommonUserConfig, "build"> & {
|
|
1159
|
+
/**
|
|
1160
|
+
* Configuration provided to build processes
|
|
1161
|
+
*
|
|
1162
|
+
* @remarks
|
|
1163
|
+
* This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
|
|
1164
|
+
*/
|
|
1165
|
+
build: Omit<TBuildConfig, "override"> & {
|
|
1166
|
+
/**
|
|
1167
|
+
* The build variant being used by the Powerlines engine.
|
|
1168
|
+
*/
|
|
1169
|
+
variant?: TBuildVariant;
|
|
1170
|
+
/**
|
|
1171
|
+
* An optional set of override options to apply to the selected build variant.
|
|
1172
|
+
*
|
|
1173
|
+
* @remarks
|
|
1174
|
+
* 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.
|
|
1175
|
+
*/
|
|
1176
|
+
override?: Partial<TBuildResolvedConfig>;
|
|
1177
|
+
};
|
|
1178
|
+
};
|
|
1179
|
+
type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
|
|
1180
|
+
/**
|
|
1181
|
+
* The configuration provided while executing Powerlines commands.
|
|
1182
|
+
*/
|
|
1183
|
+
type InlineConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
|
|
1184
|
+
/**
|
|
1185
|
+
* A string identifier for the Powerlines command being executed
|
|
1186
|
+
*/
|
|
1187
|
+
command: PowerlinesCommand;
|
|
1188
|
+
};
|
|
1189
|
+
|
|
1190
|
+
interface MetaInfo {
|
|
1191
|
+
/**
|
|
1192
|
+
* The checksum generated from the resolved options
|
|
1193
|
+
*/
|
|
1194
|
+
checksum: string;
|
|
1195
|
+
/**
|
|
1196
|
+
* The build id
|
|
1197
|
+
*/
|
|
1198
|
+
buildId: string;
|
|
1199
|
+
/**
|
|
1200
|
+
* The release id
|
|
1201
|
+
*/
|
|
1202
|
+
releaseId: string;
|
|
1203
|
+
/**
|
|
1204
|
+
* The build timestamp
|
|
1205
|
+
*/
|
|
1206
|
+
timestamp: number;
|
|
1207
|
+
/**
|
|
1208
|
+
* A hash that represents the path to the project root directory
|
|
1209
|
+
*/
|
|
1210
|
+
projectRootHash: string;
|
|
1211
|
+
/**
|
|
1212
|
+
* A hash that represents the path to the project root directory
|
|
1213
|
+
*/
|
|
1214
|
+
configHash: string;
|
|
1215
|
+
}
|
|
1216
|
+
interface Resolver extends Jiti {
|
|
1217
|
+
plugin: Jiti;
|
|
1218
|
+
}
|
|
1219
|
+
interface InitContextOptions {
|
|
1220
|
+
/**
|
|
1221
|
+
* If false, the plugin will be loaded after all other plugins.
|
|
1222
|
+
*
|
|
1223
|
+
* @defaultValue true
|
|
1224
|
+
*/
|
|
1225
|
+
isHighPriority: boolean;
|
|
1226
|
+
}
|
|
1227
|
+
/**
|
|
1228
|
+
* The unresolved Powerlines context.
|
|
1229
|
+
*
|
|
1230
|
+
* @remarks
|
|
1231
|
+
* This context is used before the user configuration has been fully resolved after the `config`.
|
|
1232
|
+
*/
|
|
1233
|
+
interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
1234
|
+
/**
|
|
1235
|
+
* The Storm workspace configuration
|
|
1236
|
+
*/
|
|
1237
|
+
workspaceConfig: WorkspaceConfig;
|
|
1238
|
+
/**
|
|
1239
|
+
* An object containing the options provided to Powerlines
|
|
1240
|
+
*/
|
|
1241
|
+
config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
|
|
1242
|
+
projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
|
|
1243
|
+
output: TResolvedConfig["output"];
|
|
1244
|
+
};
|
|
1245
|
+
/**
|
|
1246
|
+
* A logging function for the Powerlines engine
|
|
1247
|
+
*/
|
|
1248
|
+
log: LogFn;
|
|
1249
|
+
/**
|
|
1250
|
+
* A logging function for fatal messages
|
|
1251
|
+
*/
|
|
1252
|
+
fatal: (message: string | UnpluginMessage) => void;
|
|
1253
|
+
/**
|
|
1254
|
+
* A logging function for error messages
|
|
1255
|
+
*/
|
|
1256
|
+
error: (message: string | UnpluginMessage) => void;
|
|
1257
|
+
/**
|
|
1258
|
+
* A logging function for warning messages
|
|
1259
|
+
*/
|
|
1260
|
+
warn: (message: string | UnpluginMessage) => void;
|
|
1261
|
+
/**
|
|
1262
|
+
* A logging function for informational messages
|
|
1263
|
+
*/
|
|
1264
|
+
info: (message: string | UnpluginMessage) => void;
|
|
1265
|
+
/**
|
|
1266
|
+
* A logging function for debug messages
|
|
1267
|
+
*/
|
|
1268
|
+
debug: (message: string | UnpluginMessage) => void;
|
|
1269
|
+
/**
|
|
1270
|
+
* A logging function for trace messages
|
|
1271
|
+
*/
|
|
1272
|
+
trace: (message: string | UnpluginMessage) => void;
|
|
1273
|
+
/**
|
|
1274
|
+
* The metadata information
|
|
1275
|
+
*/
|
|
1276
|
+
meta: MetaInfo;
|
|
1277
|
+
/**
|
|
1278
|
+
* The metadata information currently written to disk
|
|
1279
|
+
*/
|
|
1280
|
+
persistedMeta?: MetaInfo;
|
|
1281
|
+
/**
|
|
1282
|
+
* The Powerlines artifacts directory
|
|
1283
|
+
*/
|
|
1284
|
+
artifactsPath: string;
|
|
1285
|
+
/**
|
|
1286
|
+
* The path to the Powerlines builtin runtime modules directory
|
|
1287
|
+
*/
|
|
1003
1288
|
builtinsPath: string;
|
|
1004
1289
|
/**
|
|
1005
1290
|
* The path to the Powerlines entry modules directory
|
|
@@ -1134,289 +1419,4 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1134
1419
|
}
|
|
1135
1420
|
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = PluginContext<TResolvedConfig> & Omit<UnpluginBuildContext, "parse">;
|
|
1136
1421
|
|
|
1137
|
-
type
|
|
1138
|
-
/**
|
|
1139
|
-
* The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
|
|
1140
|
-
*/
|
|
1141
|
-
type WorkspaceConfig = Partial<StormWorkspaceConfig> & Required<Pick<StormWorkspaceConfig, "workspaceRoot">>;
|
|
1142
|
-
type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext>>;
|
|
1143
|
-
/**
|
|
1144
|
-
* A configuration tuple for a Powerlines plugin.
|
|
1145
|
-
*/
|
|
1146
|
-
type PluginConfigTuple<TContext extends PluginContext = PluginContext, TOptions = any> = [string | PluginFactory<TContext, TOptions>, TOptions] | [Plugin<TContext>];
|
|
1147
|
-
/**
|
|
1148
|
-
* A configuration object for a Powerlines plugin.
|
|
1149
|
-
*/
|
|
1150
|
-
type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions = any> = {
|
|
1151
|
-
plugin: string | PluginFactory<TContext, TOptions>;
|
|
1152
|
-
options: TOptions;
|
|
1153
|
-
} | {
|
|
1154
|
-
plugin: Plugin<TContext>;
|
|
1155
|
-
options?: never;
|
|
1156
|
-
};
|
|
1157
|
-
/**
|
|
1158
|
-
* A configuration tuple for a Powerlines plugin.
|
|
1159
|
-
*/
|
|
1160
|
-
type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Promise<Plugin<TContext>> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
|
|
1161
|
-
type PartialPlugin<in out TContext extends PluginContext = PluginContext> = DeepPartial$1<Plugin<TContext>>;
|
|
1162
|
-
type PartialPluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<PartialPlugin<TContext>>;
|
|
1163
|
-
type ProjectType = "application" | "library";
|
|
1164
|
-
interface OutputConfig {
|
|
1165
|
-
/**
|
|
1166
|
-
* The path to output the final compiled files to
|
|
1167
|
-
*
|
|
1168
|
-
* @remarks
|
|
1169
|
-
* If a value is not provided, Powerlines will attempt to:
|
|
1170
|
-
* 1. Use the `outDir` value in the `tsconfig.json` file.
|
|
1171
|
-
* 2. Use the `dist` directory in the project root directory.
|
|
1172
|
-
*
|
|
1173
|
-
* @defaultValue "dist/\{projectRoot\}"
|
|
1174
|
-
*/
|
|
1175
|
-
outputPath?: string;
|
|
1176
|
-
/**
|
|
1177
|
-
* The format of the output files
|
|
1178
|
-
*
|
|
1179
|
-
* @defaultValue "virtual"
|
|
1180
|
-
*/
|
|
1181
|
-
mode?: OutputModeType;
|
|
1182
|
-
/**
|
|
1183
|
-
* The path of the generated runtime declaration file relative to the workspace root.
|
|
1184
|
-
*
|
|
1185
|
-
* @defaultValue "\{projectRoot\}/powerlines.d.ts"
|
|
1186
|
-
*/
|
|
1187
|
-
dts?: string | false;
|
|
1188
|
-
/**
|
|
1189
|
-
* A prefix to use for identifying builtin modules
|
|
1190
|
-
*
|
|
1191
|
-
* @remarks
|
|
1192
|
-
* 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"`.
|
|
1193
|
-
*
|
|
1194
|
-
* @defaultValue "powerlines"
|
|
1195
|
-
*/
|
|
1196
|
-
builtinPrefix?: string;
|
|
1197
|
-
/**
|
|
1198
|
-
* The folder where the generated runtime artifacts will be located
|
|
1199
|
-
*
|
|
1200
|
-
* @remarks
|
|
1201
|
-
* This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
|
|
1202
|
-
*
|
|
1203
|
-
* @defaultValue "\{projectRoot\}/.powerlines"
|
|
1204
|
-
*/
|
|
1205
|
-
artifactsFolder?: string;
|
|
1206
|
-
/**
|
|
1207
|
-
* The module format of the output files
|
|
1208
|
-
*
|
|
1209
|
-
* @remarks
|
|
1210
|
-
* 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.
|
|
1211
|
-
*
|
|
1212
|
-
* @defaultValue "esm"
|
|
1213
|
-
*/
|
|
1214
|
-
format?: Format | Format[];
|
|
1215
|
-
/**
|
|
1216
|
-
* A list of assets to copy to the output directory
|
|
1217
|
-
*
|
|
1218
|
-
* @remarks
|
|
1219
|
-
* 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.
|
|
1220
|
-
*/
|
|
1221
|
-
assets?: Array<string | AssetGlob>;
|
|
1222
|
-
}
|
|
1223
|
-
interface BaseConfig {
|
|
1224
|
-
/**
|
|
1225
|
-
* The name of the project
|
|
1226
|
-
*/
|
|
1227
|
-
name?: string;
|
|
1228
|
-
/**
|
|
1229
|
-
* The project display title
|
|
1230
|
-
*
|
|
1231
|
-
* @remarks
|
|
1232
|
-
* This option is used in documentation generation and other places where a human-readable title is needed.
|
|
1233
|
-
*/
|
|
1234
|
-
title?: string;
|
|
1235
|
-
/**
|
|
1236
|
-
* A description of the project
|
|
1237
|
-
*
|
|
1238
|
-
* @remarks
|
|
1239
|
-
* If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
|
|
1240
|
-
*/
|
|
1241
|
-
description?: string;
|
|
1242
|
-
/**
|
|
1243
|
-
* The log level to use for the Powerlines processes.
|
|
1244
|
-
*
|
|
1245
|
-
* @defaultValue "info"
|
|
1246
|
-
*/
|
|
1247
|
-
logLevel?: LogLevelLabel | null;
|
|
1248
|
-
/**
|
|
1249
|
-
* A custom logger function to use for logging messages
|
|
1250
|
-
*/
|
|
1251
|
-
customLogger?: LogFn;
|
|
1252
|
-
/**
|
|
1253
|
-
* 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.
|
|
1254
|
-
*
|
|
1255
|
-
* @defaultValue "production"
|
|
1256
|
-
*/
|
|
1257
|
-
mode?: "development" | "test" | "production";
|
|
1258
|
-
/**
|
|
1259
|
-
* The entry point(s) for the application
|
|
1260
|
-
*/
|
|
1261
|
-
entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
|
|
1262
|
-
/**
|
|
1263
|
-
* Configuration for the output of the build process
|
|
1264
|
-
*/
|
|
1265
|
-
output?: OutputConfig;
|
|
1266
|
-
/**
|
|
1267
|
-
* Configuration for linting the source code
|
|
1268
|
-
*
|
|
1269
|
-
* @remarks
|
|
1270
|
-
* If set to `false`, linting will be disabled.
|
|
1271
|
-
*/
|
|
1272
|
-
lint?: Record<string, any> | false;
|
|
1273
|
-
/**
|
|
1274
|
-
* Configuration for testing the source code
|
|
1275
|
-
*
|
|
1276
|
-
* @remarks
|
|
1277
|
-
* If set to `false`, testing will be disabled.
|
|
1278
|
-
*/
|
|
1279
|
-
test?: Record<string, any> | false;
|
|
1280
|
-
/**
|
|
1281
|
-
* Configuration for the transformation of the source code
|
|
1282
|
-
*/
|
|
1283
|
-
transform?: Record<string, any>;
|
|
1284
|
-
/**
|
|
1285
|
-
* Configuration provided to build processes
|
|
1286
|
-
*
|
|
1287
|
-
* @remarks
|
|
1288
|
-
* This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
|
|
1289
|
-
*/
|
|
1290
|
-
build?: BuildConfig;
|
|
1291
|
-
/**
|
|
1292
|
-
* Configuration for documentation generation
|
|
1293
|
-
*
|
|
1294
|
-
* @remarks
|
|
1295
|
-
* This configuration will be used by the documentation generation plugins during the `docs` command.
|
|
1296
|
-
*/
|
|
1297
|
-
docs?: Record<string, any>;
|
|
1298
|
-
/**
|
|
1299
|
-
* The path to the tsconfig file to be used by the compiler
|
|
1300
|
-
*
|
|
1301
|
-
* @remarks
|
|
1302
|
-
* 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).
|
|
1303
|
-
*
|
|
1304
|
-
* @defaultValue "\{projectRoot\}/tsconfig.json"
|
|
1305
|
-
*/
|
|
1306
|
-
tsconfig?: string;
|
|
1307
|
-
/**
|
|
1308
|
-
* The raw {@link TSConfig} object to be used by the compiler. This object will be merged with the `tsconfig.json` file.
|
|
1309
|
-
*
|
|
1310
|
-
* @see https://www.typescriptlang.org/tsconfig
|
|
1311
|
-
*
|
|
1312
|
-
* @remarks
|
|
1313
|
-
* If populated, this option takes higher priority than `tsconfig`
|
|
1314
|
-
*/
|
|
1315
|
-
tsconfigRaw?: TSConfig;
|
|
1316
|
-
}
|
|
1317
|
-
interface EnvironmentConfig extends BaseConfig {
|
|
1318
|
-
/**
|
|
1319
|
-
* Configuration options for the preview server
|
|
1320
|
-
*/
|
|
1321
|
-
preview?: PreviewOptions;
|
|
1322
|
-
/**
|
|
1323
|
-
* A flag indicating whether the build is for a Server-Side Rendering environment.
|
|
1324
|
-
*/
|
|
1325
|
-
ssr?: boolean;
|
|
1326
|
-
/**
|
|
1327
|
-
* Define if this environment is used for Server-Side Rendering
|
|
1328
|
-
*
|
|
1329
|
-
* @defaultValue "server" (if it isn't the client environment)
|
|
1330
|
-
*/
|
|
1331
|
-
consumer?: "client" | "server";
|
|
1332
|
-
}
|
|
1333
|
-
interface CommonUserConfig extends BaseConfig {
|
|
1334
|
-
/**
|
|
1335
|
-
* The type of project being built
|
|
1336
|
-
*
|
|
1337
|
-
* @defaultValue "application"
|
|
1338
|
-
*/
|
|
1339
|
-
type?: ProjectType;
|
|
1340
|
-
/**
|
|
1341
|
-
* The root directory of the project
|
|
1342
|
-
*/
|
|
1343
|
-
root: string;
|
|
1344
|
-
/**
|
|
1345
|
-
* The root directory of the project's source code
|
|
1346
|
-
*
|
|
1347
|
-
* @defaultValue "\{root\}/src"
|
|
1348
|
-
*/
|
|
1349
|
-
sourceRoot?: string;
|
|
1350
|
-
/**
|
|
1351
|
-
* A path to a custom configuration file to be used instead of the default `storm.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
|
|
1352
|
-
*
|
|
1353
|
-
* @remarks
|
|
1354
|
-
* This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
|
|
1355
|
-
*/
|
|
1356
|
-
configFile?: string;
|
|
1357
|
-
/**
|
|
1358
|
-
* Should the Powerlines CLI processes skip installing missing packages?
|
|
1359
|
-
*
|
|
1360
|
-
* @remarks
|
|
1361
|
-
* This option is useful for CI/CD environments where the installation of packages is handled by a different process.
|
|
1362
|
-
*
|
|
1363
|
-
* @defaultValue false
|
|
1364
|
-
*/
|
|
1365
|
-
skipInstalls?: boolean;
|
|
1366
|
-
/**
|
|
1367
|
-
* Should the compiler processes skip any improvements that make use of cache?
|
|
1368
|
-
*
|
|
1369
|
-
* @defaultValue false
|
|
1370
|
-
*/
|
|
1371
|
-
skipCache?: boolean;
|
|
1372
|
-
/**
|
|
1373
|
-
* A list of resolvable paths to plugins used during the build process
|
|
1374
|
-
*/
|
|
1375
|
-
plugins?: PluginConfig<PluginContext<any>>[];
|
|
1376
|
-
/**
|
|
1377
|
-
* Environment-specific configurations
|
|
1378
|
-
*/
|
|
1379
|
-
environments?: Record<string, EnvironmentConfig>;
|
|
1380
|
-
/**
|
|
1381
|
-
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
1382
|
-
*
|
|
1383
|
-
* @remarks
|
|
1384
|
-
* 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.
|
|
1385
|
-
*
|
|
1386
|
-
* @defaultValue "powerlines"
|
|
1387
|
-
*/
|
|
1388
|
-
framework?: string;
|
|
1389
|
-
}
|
|
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"> & {
|
|
1398
|
-
/**
|
|
1399
|
-
* The build variant being used by the Powerlines engine.
|
|
1400
|
-
*/
|
|
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>;
|
|
1409
|
-
};
|
|
1410
|
-
};
|
|
1411
|
-
type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "release" | "clean";
|
|
1412
|
-
/**
|
|
1413
|
-
* The configuration provided while executing Powerlines commands.
|
|
1414
|
-
*/
|
|
1415
|
-
type InlineConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
|
|
1416
|
-
/**
|
|
1417
|
-
* A string identifier for the Powerlines command being executed
|
|
1418
|
-
*/
|
|
1419
|
-
command: PowerlinesCommand;
|
|
1420
|
-
};
|
|
1421
|
-
|
|
1422
|
-
export type { BuildVariant as B, Context 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, ConfigResult as l, EnvironmentConfig as m, EnvironmentResolvedConfig as n };
|
|
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 };
|