powerlines 0.26.1 → 0.27.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-5ka33LJ7.d.ts → api-CHbGX3BG.d.ts} +1 -1
- package/dist/{api-BkLj_Pdr.d.cts → api-DGMQopJ5.d.cts} +1 -1
- package/dist/api.cjs +4 -4
- package/dist/api.d.cts +7 -3
- package/dist/api.d.ts +7 -3
- package/dist/api.js +3 -3
- package/dist/astro.cjs +7 -7
- package/dist/astro.d.cts +1 -1
- package/dist/astro.d.ts +1 -1
- package/dist/astro.js +6 -6
- package/dist/{chunk-7FSPH7XF.js → chunk-2DWFEC7G.js} +55 -20
- package/dist/{chunk-MK2RZ2TI.js → chunk-6MQ6LCVC.js} +2 -2
- package/dist/{chunk-Z5UEYORO.js → chunk-A7PVG2HH.js} +12 -11
- package/dist/{chunk-HTJKPEWU.cjs → chunk-AATT73UY.cjs} +12 -11
- package/dist/{chunk-VB3XSHVU.js → chunk-BH4JSKPK.js} +12 -11
- package/dist/{chunk-X7GYPVW3.cjs → chunk-CF7B5HOG.cjs} +14 -13
- package/dist/{chunk-B2VW6P4S.js → chunk-CSJMUAPJ.js} +3 -3
- package/dist/{chunk-JU2HWIWS.js → chunk-FZ6J2GMT.js} +2 -2
- package/dist/{chunk-BTNHSS2P.cjs → chunk-GBIIAZH5.cjs} +2 -2
- package/dist/{chunk-72SDU2KV.cjs → chunk-HG7JY6AQ.cjs} +6 -6
- package/dist/{chunk-4ED7PXFR.js → chunk-ISPXQBOL.js} +4 -4
- package/dist/{chunk-TG7TOUX6.cjs → chunk-KW66GUWJ.cjs} +6 -6
- package/dist/{chunk-MBBNZS6K.cjs → chunk-ON3LABX3.cjs} +2 -2
- package/dist/{chunk-EBXVKPUX.js → chunk-P647W2BA.js} +2 -2
- package/dist/{chunk-WXES55IE.js → chunk-PYID3NKT.js} +4 -4
- package/dist/{chunk-S7MXT5A2.js → chunk-QXHINXRM.js} +2 -2
- package/dist/{chunk-ATP7FECH.cjs → chunk-RCYXXBJ3.cjs} +57 -22
- package/dist/{chunk-HO7YFSFA.cjs → chunk-T3T6WSX2.cjs} +2 -2
- package/dist/chunk-UWLQNNZE.cjs +12 -0
- package/dist/{chunk-YUX7LOBU.cjs → chunk-YULFP33E.cjs} +2 -2
- package/dist/config.cjs +2 -2
- package/dist/config.d.cts +3 -3
- package/dist/config.d.ts +3 -3
- package/dist/config.js +1 -1
- package/dist/{context-C31xTHzG.d.cts → context-BjOICcQB.d.cts} +12 -2
- package/dist/{context-B7qcwIf-.d.ts → context-BqTYt9FC.d.ts} +12 -2
- package/dist/esbuild.cjs +9 -9
- package/dist/esbuild.d.cts +1 -1
- package/dist/esbuild.d.ts +1 -1
- package/dist/esbuild.js +6 -6
- package/dist/farm.cjs +5 -5
- package/dist/farm.d.cts +1 -1
- package/dist/farm.d.ts +1 -1
- package/dist/farm.js +4 -4
- package/dist/index.cjs +19 -19
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/lib/{api-DEqxjfbe.d.ts → api-Cxmk8sFc.d.ts} +1 -1
- package/dist/lib/{api-D-l8sXIX.d.cts → api-_rRpguWX.d.cts} +1 -1
- package/dist/lib/build/esbuild.cjs +4 -4
- package/dist/lib/build/esbuild.d.cts +1 -1
- package/dist/lib/build/esbuild.d.ts +1 -1
- package/dist/lib/build/esbuild.js +1 -1
- package/dist/lib/build/index.cjs +24 -24
- package/dist/lib/build/index.d.cts +3 -3
- package/dist/lib/build/index.d.ts +3 -3
- package/dist/lib/build/index.js +8 -8
- package/dist/lib/build/rolldown.cjs +3 -3
- package/dist/lib/build/rolldown.d.cts +1 -1
- package/dist/lib/build/rolldown.d.ts +1 -1
- package/dist/lib/build/rolldown.js +2 -2
- package/dist/lib/build/rollup.cjs +3 -3
- package/dist/lib/build/rollup.d.cts +1 -1
- package/dist/lib/build/rollup.d.ts +1 -1
- package/dist/lib/build/rollup.js +1 -1
- package/dist/lib/build/rspack.cjs +2 -2
- package/dist/lib/build/rspack.d.cts +1 -1
- package/dist/lib/build/rspack.d.ts +1 -1
- package/dist/lib/build/rspack.js +1 -1
- package/dist/lib/build/tsup.cjs +5 -5
- package/dist/lib/build/tsup.d.cts +1 -1
- package/dist/lib/build/tsup.d.ts +1 -1
- package/dist/lib/build/tsup.js +2 -2
- package/dist/lib/build/unbuild.cjs +5 -5
- package/dist/lib/build/unbuild.d.cts +3 -3
- package/dist/lib/build/unbuild.d.ts +3 -3
- package/dist/lib/build/unbuild.js +2 -2
- package/dist/lib/build/vite.cjs +4 -4
- package/dist/lib/build/vite.d.cts +1 -1
- package/dist/lib/build/vite.d.ts +1 -1
- package/dist/lib/build/vite.js +2 -2
- package/dist/lib/build/webpack.cjs +2 -2
- package/dist/lib/build/webpack.d.cts +1 -1
- package/dist/lib/build/webpack.d.ts +1 -1
- package/dist/lib/build/webpack.js +1 -1
- package/dist/lib/{chunk-EN52JYUK.js → chunk-26M3IUSK.js} +6 -3
- package/dist/lib/{chunk-MI55FDCZ.js → chunk-2RHE4SGK.js} +6 -3
- package/dist/lib/{chunk-TAVG226Z.js → chunk-4PTER5EV.js} +12 -13
- package/dist/lib/{chunk-OBA5U4Y2.js → chunk-4SULM54S.js} +9 -2
- package/dist/lib/{chunk-R33US3PV.cjs → chunk-4V5OI73E.cjs} +9 -2
- package/dist/lib/{chunk-W6GWSJ22.js → chunk-67DW5UDQ.js} +7 -4
- package/dist/lib/{chunk-WOKPJMGJ.js → chunk-7GCAHOJK.js} +10 -9
- package/dist/lib/{chunk-VODWHWD6.js → chunk-AFLI3CLM.js} +9 -8
- package/dist/lib/{chunk-OFXWRM3U.js → chunk-AHK7GRPM.js} +14 -15
- package/dist/lib/{chunk-LOW2TIQ6.cjs → chunk-AJDYMANR.cjs} +2 -2
- package/dist/lib/{chunk-CGOFWVPH.js → chunk-CP77I6WM.js} +68 -13
- package/dist/lib/{chunk-DLVVEHMU.js → chunk-CU23POMD.js} +1 -1
- package/dist/lib/{chunk-NUE5DIH3.cjs → chunk-GK75G3OD.cjs} +15 -16
- package/dist/lib/{chunk-P6COOJAL.cjs → chunk-GKCWJVF7.cjs} +12 -12
- package/dist/lib/{chunk-PQRWG64T.cjs → chunk-GLFOKUTH.cjs} +7 -4
- package/dist/lib/{chunk-NIRFKQAD.js → chunk-HE6HOGLS.js} +35 -12
- package/dist/lib/{chunk-TSFG3WEA.cjs → chunk-HL4KTZDB.cjs} +12 -13
- package/dist/lib/{chunk-4N3TNY6C.js → chunk-HM52GHX3.js} +2 -2
- package/dist/lib/{chunk-7MHUTBEC.cjs → chunk-I76RI47U.cjs} +1 -1
- package/dist/lib/{chunk-EIY23D6A.js → chunk-KJDASLW3.js} +2 -2
- package/dist/lib/{chunk-X6JDYLWM.cjs → chunk-NDC5BKCD.cjs} +6 -3
- package/dist/lib/chunk-OL35IC6Z.js +81 -0
- package/dist/lib/chunk-PIFNMTKN.cjs +83 -0
- package/dist/lib/{chunk-MHOYD2EV.cjs → chunk-Q4D2L67H.cjs} +11 -6
- package/dist/lib/{chunk-TZCC5IWH.cjs → chunk-QDRITYHV.cjs} +10 -9
- package/dist/lib/{chunk-7OVZZWGY.js → chunk-QR2N3DPP.js} +1 -1
- package/dist/lib/{chunk-WCXA5WFX.cjs → chunk-R3E56AJ4.cjs} +10 -9
- package/dist/lib/{chunk-I4S26ZQH.cjs → chunk-UJYCAW2D.cjs} +4 -4
- package/dist/lib/{chunk-MKKWFHGE.cjs → chunk-UNUP4XMO.cjs} +2 -2
- package/dist/lib/{chunk-WGSZ4X6N.js → chunk-YB54H3SQ.js} +1 -1
- package/dist/lib/{chunk-YM65TZEQ.js → chunk-YGSXCTX2.js} +10 -5
- package/dist/lib/{chunk-F2CXZUSB.cjs → chunk-YYN6TKSY.cjs} +6 -3
- package/dist/lib/{chunk-WBSA6OG6.cjs → chunk-Z5JKSYRP.cjs} +37 -14
- package/dist/lib/{chunk-WA2MPCRV.cjs → chunk-ZDBHX3VV.cjs} +78 -23
- package/dist/lib/{config-DmlWvbZH.d.ts → config-B2q8Me0M.d.ts} +1 -1
- package/dist/lib/{config-CjIhBeVY.d.cts → config-DMXVnKGF.d.cts} +1 -1
- package/dist/lib/config-file.d.cts +1 -1
- package/dist/lib/config-file.d.ts +1 -1
- package/dist/lib/contexts/api-context.cjs +6 -6
- package/dist/lib/contexts/api-context.d.cts +3 -3
- package/dist/lib/contexts/api-context.d.ts +3 -3
- package/dist/lib/contexts/api-context.js +5 -5
- package/dist/lib/contexts/context.cjs +3 -3
- package/dist/lib/contexts/context.d.cts +4 -4
- package/dist/lib/contexts/context.d.ts +4 -4
- package/dist/lib/contexts/context.js +2 -2
- package/dist/lib/contexts/environment-context.cjs +5 -5
- package/dist/lib/contexts/environment-context.d.cts +3 -3
- package/dist/lib/contexts/environment-context.d.ts +3 -3
- package/dist/lib/contexts/environment-context.js +4 -4
- package/dist/lib/contexts/index.cjs +9 -9
- package/dist/lib/contexts/index.d.cts +3 -3
- package/dist/lib/contexts/index.d.ts +3 -3
- package/dist/lib/contexts/index.js +5 -5
- package/dist/lib/contexts/plugin-context.cjs +2 -2
- package/dist/lib/contexts/plugin-context.d.cts +3 -3
- package/dist/lib/contexts/plugin-context.d.ts +3 -3
- package/dist/lib/contexts/plugin-context.js +1 -1
- package/dist/lib/entry.d.cts +1 -1
- package/dist/lib/entry.d.ts +1 -1
- package/dist/lib/fs/index.cjs +2 -2
- package/dist/lib/fs/index.d.cts +1 -1
- package/dist/lib/fs/index.d.ts +1 -1
- package/dist/lib/fs/index.js +1 -1
- package/dist/lib/fs/vfs.cjs +2 -2
- package/dist/lib/fs/vfs.d.cts +1 -1
- package/dist/lib/fs/vfs.d.ts +1 -1
- package/dist/lib/fs/vfs.js +1 -1
- package/dist/lib/index.cjs +19 -19
- package/dist/lib/index.d.cts +4 -4
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.js +10 -10
- package/dist/lib/{internal-2E9DIMXV.d.ts → internal-CGIi3MOX.d.ts} +2 -2
- package/dist/lib/{internal-DIb2oGbS.d.cts → internal-CfIJWv8T.d.cts} +2 -2
- package/dist/lib/logger.d.cts +1 -1
- package/dist/lib/logger.d.ts +1 -1
- package/dist/lib/typescript/import-transformer.d.cts +1 -1
- package/dist/lib/typescript/import-transformer.d.ts +1 -1
- package/dist/lib/typescript/index.d.cts +1 -1
- package/dist/lib/typescript/index.d.ts +1 -1
- package/dist/lib/typescript/ts-morph.d.cts +1 -1
- package/dist/lib/typescript/ts-morph.d.ts +1 -1
- package/dist/lib/unplugin/factory.cjs +7 -7
- package/dist/lib/unplugin/factory.d.cts +8 -4
- package/dist/lib/unplugin/factory.d.ts +8 -4
- package/dist/lib/unplugin/factory.js +6 -6
- package/dist/lib/unplugin/helpers.d.cts +1 -1
- package/dist/lib/unplugin/helpers.d.ts +1 -1
- package/dist/lib/unplugin/index.cjs +9 -9
- package/dist/lib/unplugin/index.d.cts +3 -3
- package/dist/lib/unplugin/index.d.ts +3 -3
- package/dist/lib/unplugin/index.js +7 -7
- package/dist/lib/unplugin/plugin.cjs +2 -2
- package/dist/lib/unplugin/plugin.d.cts +3 -3
- package/dist/lib/unplugin/plugin.d.ts +3 -3
- package/dist/lib/unplugin/plugin.js +1 -1
- package/dist/lib/{unplugin-DjE-j8jO.d.cts → unplugin-B_F1TZK4.d.cts} +2 -2
- package/dist/lib/{unplugin-DiDHWF3n.d.ts → unplugin-Da9GAj4a.d.ts} +2 -2
- package/dist/lib/utilities/bundle.cjs +3 -3
- package/dist/lib/utilities/bundle.d.cts +1 -1
- package/dist/lib/utilities/bundle.d.ts +1 -1
- package/dist/lib/utilities/bundle.js +2 -2
- package/dist/lib/utilities/cache.d.cts +1 -1
- package/dist/lib/utilities/cache.d.ts +1 -1
- package/dist/lib/utilities/file-header.d.cts +1 -1
- package/dist/lib/utilities/file-header.d.ts +1 -1
- package/dist/lib/utilities/index.cjs +5 -5
- package/dist/lib/utilities/index.d.cts +1 -1
- package/dist/lib/utilities/index.d.ts +1 -1
- package/dist/lib/utilities/index.js +3 -3
- package/dist/lib/utilities/meta.d.cts +1 -1
- package/dist/lib/utilities/meta.d.ts +1 -1
- package/dist/lib/utilities/resolve.cjs +4 -4
- package/dist/lib/utilities/resolve.d.cts +1 -1
- package/dist/lib/utilities/resolve.d.ts +1 -1
- package/dist/lib/utilities/resolve.js +3 -3
- package/dist/lib/utilities/source-file.d.cts +1 -1
- package/dist/lib/utilities/source-file.d.ts +1 -1
- package/dist/lib/utilities/source-map.d.cts +1 -1
- package/dist/lib/utilities/source-map.d.ts +1 -1
- package/dist/lib/utilities/worker.d.cts +1 -1
- package/dist/lib/utilities/worker.d.ts +1 -1
- package/dist/lib/utilities/write-file.d.cts +1 -1
- package/dist/lib/utilities/write-file.d.ts +1 -1
- package/dist/next.cjs +6 -6
- package/dist/next.js +5 -5
- package/dist/nuxt.cjs +9 -9
- package/dist/nuxt.js +7 -7
- package/dist/plugin-utils/context-helpers.d.cts +1 -1
- package/dist/plugin-utils/context-helpers.d.ts +1 -1
- package/dist/plugin-utils/{context-BHqBmuik.d.ts → context-y3G_SQPM.d.cts} +1 -1
- package/dist/plugin-utils/{context-BHqBmuik.d.cts → context-y3G_SQPM.d.ts} +1 -1
- package/dist/plugin-utils/enforce.d.cts +1 -1
- package/dist/plugin-utils/enforce.d.ts +1 -1
- package/dist/plugin-utils/extend.d.cts +1 -1
- package/dist/plugin-utils/extend.d.ts +1 -1
- package/dist/plugin-utils/get-config-path.d.cts +1 -1
- package/dist/plugin-utils/get-config-path.d.ts +1 -1
- package/dist/plugin-utils/helpers.d.cts +1 -1
- package/dist/plugin-utils/helpers.d.ts +1 -1
- package/dist/plugin-utils/index.d.cts +1 -1
- package/dist/plugin-utils/index.d.ts +1 -1
- package/dist/plugin-utils/merge.d.cts +1 -1
- package/dist/plugin-utils/merge.d.ts +1 -1
- package/dist/plugin-utils/paths.d.cts +1 -1
- package/dist/plugin-utils/paths.d.ts +1 -1
- package/dist/rolldown.cjs +5 -5
- package/dist/rolldown.d.cts +1 -1
- package/dist/rolldown.d.ts +1 -1
- package/dist/rolldown.js +4 -4
- package/dist/rollup.cjs +5 -5
- package/dist/rollup.d.cts +1 -1
- package/dist/rollup.d.ts +1 -1
- package/dist/rollup.js +4 -4
- package/dist/rspack.cjs +5 -5
- package/dist/rspack.d.cts +1 -1
- package/dist/rspack.d.ts +1 -1
- package/dist/rspack.js +4 -4
- package/dist/tsup.cjs +7 -7
- package/dist/tsup.js +6 -6
- package/dist/types/api.d.cts +2 -2
- package/dist/types/api.d.ts +2 -2
- package/dist/types/babel.d.cts +1 -1
- package/dist/types/babel.d.ts +1 -1
- package/dist/types/commands.d.cts +1 -1
- package/dist/types/commands.d.ts +1 -1
- package/dist/types/config.d.cts +1 -1
- package/dist/types/config.d.ts +1 -1
- package/dist/types/context.cjs +2 -2
- package/dist/types/context.d.cts +1 -1
- package/dist/types/context.d.ts +1 -1
- package/dist/types/context.js +1 -1
- package/dist/types/fs.cjs +4 -4
- package/dist/types/fs.js +1 -1
- package/dist/types/hooks.d.cts +1 -1
- package/dist/types/hooks.d.ts +1 -1
- package/dist/types/index.cjs +8 -8
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +3 -3
- package/dist/types/internal.d.cts +2 -2
- package/dist/types/internal.d.ts +2 -2
- package/dist/types/plugin.cjs +2 -2
- package/dist/types/plugin.d.cts +1 -1
- package/dist/types/plugin.d.ts +1 -1
- package/dist/types/plugin.js +1 -1
- package/dist/types/resolved.d.cts +1 -1
- package/dist/types/resolved.d.ts +1 -1
- package/dist/types/unplugin.d.cts +2 -2
- package/dist/types/unplugin.d.ts +2 -2
- package/dist/unloader.cjs +5 -5
- package/dist/unloader.d.cts +1 -1
- package/dist/unloader.d.ts +1 -1
- package/dist/unloader.js +4 -4
- package/dist/unplugin.cjs +8 -8
- package/dist/unplugin.d.cts +2 -2
- package/dist/unplugin.d.ts +2 -2
- package/dist/unplugin.js +6 -6
- package/dist/vite.cjs +9 -9
- package/dist/vite.d.cts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +6 -6
- package/dist/webpack.cjs +8 -8
- package/dist/webpack.d.cts +1 -1
- package/dist/webpack.d.ts +1 -1
- package/dist/webpack.js +5 -5
- package/package.json +9 -23
- package/dist/chunk-A7E2JCG5.cjs +0 -12
- package/dist/lib/chunk-64C5OLXR.js +0 -136
- package/dist/lib/chunk-WOPQZBAQ.cjs +0 -143
package/dist/lib/build/vite.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as ViteResolvedBuildConfig, C as Context } from '../config-
|
|
1
|
+
import { V as ViteResolvedBuildConfig, C as Context } from '../config-B2q8Me0M.js';
|
|
2
2
|
import '@storm-software/build-tools/types';
|
|
3
3
|
import '@storm-software/config-tools/types';
|
|
4
4
|
import '@storm-software/config/types';
|
package/dist/lib/build/vite.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { DEFAULT_VITE_CONFIG, extractViteConfig } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { DEFAULT_VITE_CONFIG, extractViteConfig } from '../chunk-AFLI3CLM.js';
|
|
2
|
+
import '../chunk-7GCAHOJK.js';
|
|
3
3
|
import '../chunk-N5YLKWC2.js';
|
|
4
4
|
import '../chunk-SHUYVCID.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYYN6TKSY_cjs = require('../chunk-YYN6TKSY.cjs');
|
|
4
4
|
require('../chunk-USNT2KNT.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "extractWebpackConfig", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkYYN6TKSY_cjs.extractWebpackConfig; }
|
|
11
11
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Configuration } from 'webpack';
|
|
2
|
-
import { C as Context } from '../config-
|
|
2
|
+
import { C as Context } from '../config-DMXVnKGF.cjs';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
5
5
|
import '@storm-software/config/types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Configuration } from 'webpack';
|
|
2
|
-
import { C as Context } from '../config-
|
|
2
|
+
import { C as Context } from '../config-B2q8Me0M.js';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
5
5
|
import '@storm-software/config/types';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { extractWebpackConfig } from '../chunk-
|
|
1
|
+
export { extractWebpackConfig } from '../chunk-26M3IUSK.js';
|
|
2
2
|
import '../chunk-SHUYVCID.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __name } from './chunk-SHUYVCID.js';
|
|
2
|
+
import { omit } from '@stryke/helpers/omit';
|
|
2
3
|
import { joinPaths } from '@stryke/path/join-paths';
|
|
3
4
|
import defu from 'defu';
|
|
4
5
|
|
|
@@ -20,7 +21,10 @@ function extractWebpackConfig(context) {
|
|
|
20
21
|
return ret;
|
|
21
22
|
}, {}) : context.config.build.alias : {})
|
|
22
23
|
}
|
|
23
|
-
}, context.config.build.variant === "webpack" ? context.config.build.override : {},
|
|
24
|
+
}, context.config.build.variant === "webpack" ? context.config.build.override : {}, context.config.build.variant === "webpack" ? omit(context.config.build, [
|
|
25
|
+
"override",
|
|
26
|
+
"variant"
|
|
27
|
+
]) : {}, {
|
|
24
28
|
output: {
|
|
25
29
|
path: joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.buildPath)
|
|
26
30
|
},
|
|
@@ -38,8 +42,7 @@ function extractWebpackConfig(context) {
|
|
|
38
42
|
recordsInputPath: joinPaths(context.cachePath, "webpack", ".webpack-records.json"),
|
|
39
43
|
recordsOutputPath: joinPaths(context.cachePath, "webpack", ".webpack-records.json"),
|
|
40
44
|
context: joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot),
|
|
41
|
-
noExternal: context.builtins
|
|
42
|
-
}, context.config.build.variant === "webpack" ? context.config.build : {}, {
|
|
45
|
+
noExternal: context.builtins,
|
|
43
46
|
devtool: context.config.mode !== "development" ? false : "source-map",
|
|
44
47
|
optimization: {
|
|
45
48
|
minimize: context.config.mode !== "development"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __name } from './chunk-SHUYVCID.js';
|
|
2
|
+
import { omit } from '@stryke/helpers/omit';
|
|
2
3
|
import { joinPaths } from '@stryke/path/join-paths';
|
|
3
4
|
import defu from 'defu';
|
|
4
5
|
|
|
@@ -13,7 +14,10 @@ function extractRspackConfig(context) {
|
|
|
13
14
|
return ret;
|
|
14
15
|
}, {})
|
|
15
16
|
}
|
|
16
|
-
}, context.config.build.variant === "rspack" ? context.config.build.override : {},
|
|
17
|
+
}, context.config.build.variant === "rspack" ? context.config.build.override : {}, context.config.build.variant === "rspack" ? omit(context.config.build, [
|
|
18
|
+
"override",
|
|
19
|
+
"variant"
|
|
20
|
+
]) : {}, {
|
|
17
21
|
external: context.config.build.external,
|
|
18
22
|
noExternal: context.config.build.noExternal,
|
|
19
23
|
skipNodeModulesBundle: context.config.build.skipNodeModulesBundle
|
|
@@ -31,8 +35,7 @@ function extractRspackConfig(context) {
|
|
|
31
35
|
recordsInputPath: joinPaths(context.cachePath, "rspack", ".rspack-records.json"),
|
|
32
36
|
recordsOutputPath: joinPaths(context.cachePath, "rspack", ".rspack-records.json"),
|
|
33
37
|
context: joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot),
|
|
34
|
-
noExternal: context.builtins
|
|
35
|
-
}, context.config.build.variant === "rspack" ? context.config.build : {}, {
|
|
38
|
+
noExternal: context.builtins,
|
|
36
39
|
cache: context.config.mode === "development",
|
|
37
40
|
devtool: context.config.mode !== "development" ? false : "source-map",
|
|
38
41
|
optimization: {
|
|
@@ -5,6 +5,7 @@ import inject from '@rollup/plugin-inject';
|
|
|
5
5
|
import resolve from '@rollup/plugin-node-resolve';
|
|
6
6
|
import replace from '@rollup/plugin-replace';
|
|
7
7
|
import { toArray } from '@stryke/convert/to-array';
|
|
8
|
+
import { omit } from '@stryke/helpers/omit';
|
|
8
9
|
import { joinPaths } from '@stryke/path/join-paths';
|
|
9
10
|
import { isFunction } from '@stryke/type-checks/is-function';
|
|
10
11
|
import { isString } from '@stryke/type-checks/is-string';
|
|
@@ -112,28 +113,26 @@ function extractRollupConfig(context) {
|
|
|
112
113
|
}),
|
|
113
114
|
dtsBundlePlugin
|
|
114
115
|
].filter(Boolean)
|
|
115
|
-
}, context.config.build.variant === "rollup" ? context.config.build.override : {}, context.config.build.variant === "vite" ? context.config.build.override.build?.rollupOptions : {},
|
|
116
|
+
}, context.config.build.variant === "rollup" ? context.config.build.override : {}, context.config.build.variant === "vite" ? context.config.build.override.build?.rollupOptions : {}, context.config.build.variant === "rollup" ? omit(context.config.build, [
|
|
117
|
+
"override",
|
|
118
|
+
"variant"
|
|
119
|
+
]) : {}, context.config.build.variant === "vite" ? context.config.build.build?.rollupOptions : {}, {
|
|
116
120
|
cache: !context.config.skipCache ? joinPaths(context.cachePath, "rollup") : false,
|
|
117
|
-
|
|
118
|
-
dir: context.config.output.buildPath
|
|
119
|
-
},
|
|
120
|
-
logLevel: context.config.logLevel
|
|
121
|
-
}, context.config.build.variant === "rollup" ? context.config.build : {}, context.config.build.variant === "vite" ? context.config.build.build?.rollupOptions : {}, {
|
|
122
|
-
output: {
|
|
123
|
-
sourcemap: context.config.mode === "development"
|
|
124
|
-
}
|
|
125
|
-
}, {
|
|
126
|
-
logLevel: "silent",
|
|
121
|
+
logLevel: context.config.logLevel,
|
|
127
122
|
output: [
|
|
128
123
|
{
|
|
124
|
+
dir: context.config.output.buildPath,
|
|
129
125
|
format: "es",
|
|
130
126
|
entryFileNames: "[name].js",
|
|
131
|
-
preserveModules: true
|
|
127
|
+
preserveModules: true,
|
|
128
|
+
sourcemap: context.config.mode === "development"
|
|
132
129
|
},
|
|
133
130
|
{
|
|
131
|
+
dir: context.config.output.buildPath,
|
|
134
132
|
format: "cjs",
|
|
135
133
|
entryFileNames: "[name].cjs",
|
|
136
|
-
preserveModules: true
|
|
134
|
+
preserveModules: true,
|
|
135
|
+
sourcemap: context.config.mode === "development"
|
|
137
136
|
}
|
|
138
137
|
]
|
|
139
138
|
});
|
|
@@ -9,6 +9,7 @@ import { toArray } from '@stryke/convert/to-array';
|
|
|
9
9
|
import { readFileBuffer, readFileBufferSync, writeFileBuffer } from '@stryke/fs/buffer';
|
|
10
10
|
import { existsSync } from '@stryke/fs/exists';
|
|
11
11
|
import { getResolutionCombinations, resolve, resolveSync } from '@stryke/fs/resolve';
|
|
12
|
+
import { murmurhash } from '@stryke/hash/murmurhash';
|
|
12
13
|
import { appendPath } from '@stryke/path/append';
|
|
13
14
|
import { toAbsolutePath } from '@stryke/path/correct-path';
|
|
14
15
|
import { hasFileExtension, findFilePath, findFileName } from '@stryke/path/file-path-fns';
|
|
@@ -879,9 +880,14 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
879
880
|
if (isAbsolutePath(id)) {
|
|
880
881
|
return id;
|
|
881
882
|
}
|
|
883
|
+
const resolverCacheKey = murmurhash({
|
|
884
|
+
id: this.#normalizeId(id),
|
|
885
|
+
importer,
|
|
886
|
+
options
|
|
887
|
+
});
|
|
882
888
|
let result;
|
|
883
889
|
if (!this.#context.config.skipCache) {
|
|
884
|
-
result = this.resolverCache.get(
|
|
890
|
+
result = this.resolverCache.get(resolverCacheKey);
|
|
885
891
|
if (result) {
|
|
886
892
|
return result;
|
|
887
893
|
}
|
|
@@ -907,6 +913,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
907
913
|
}
|
|
908
914
|
try {
|
|
909
915
|
result = await resolve(id, {
|
|
916
|
+
...options,
|
|
910
917
|
paths
|
|
911
918
|
});
|
|
912
919
|
} catch {
|
|
@@ -915,7 +922,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
915
922
|
if (result) {
|
|
916
923
|
result = toAbsolutePath(appendPath(result, this.#context.config.projectRoot), this.#context.workspaceConfig.workspaceRoot);
|
|
917
924
|
if (!this.#context.config.skipCache) {
|
|
918
|
-
this.resolverCache.set(
|
|
925
|
+
this.resolverCache.set(resolverCacheKey, result);
|
|
919
926
|
}
|
|
920
927
|
}
|
|
921
928
|
return result;
|
|
@@ -11,6 +11,7 @@ var toArray = require('@stryke/convert/to-array');
|
|
|
11
11
|
var buffer = require('@stryke/fs/buffer');
|
|
12
12
|
var exists = require('@stryke/fs/exists');
|
|
13
13
|
var resolve = require('@stryke/fs/resolve');
|
|
14
|
+
var murmurhash = require('@stryke/hash/murmurhash');
|
|
14
15
|
var append = require('@stryke/path/append');
|
|
15
16
|
var correctPath = require('@stryke/path/correct-path');
|
|
16
17
|
var filePathFns = require('@stryke/path/file-path-fns');
|
|
@@ -901,9 +902,14 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
901
902
|
if (isType.isAbsolutePath(id)) {
|
|
902
903
|
return id;
|
|
903
904
|
}
|
|
905
|
+
const resolverCacheKey = murmurhash.murmurhash({
|
|
906
|
+
id: this.#normalizeId(id),
|
|
907
|
+
importer,
|
|
908
|
+
options
|
|
909
|
+
});
|
|
904
910
|
let result;
|
|
905
911
|
if (!this.#context.config.skipCache) {
|
|
906
|
-
result = this.resolverCache.get(
|
|
912
|
+
result = this.resolverCache.get(resolverCacheKey);
|
|
907
913
|
if (result) {
|
|
908
914
|
return result;
|
|
909
915
|
}
|
|
@@ -929,6 +935,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
929
935
|
}
|
|
930
936
|
try {
|
|
931
937
|
result = await resolve.resolve(id, {
|
|
938
|
+
...options,
|
|
932
939
|
paths
|
|
933
940
|
});
|
|
934
941
|
} catch {
|
|
@@ -937,7 +944,7 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
937
944
|
if (result) {
|
|
938
945
|
result = correctPath.toAbsolutePath(append.appendPath(result, this.#context.config.projectRoot), this.#context.workspaceConfig.workspaceRoot);
|
|
939
946
|
if (!this.#context.config.skipCache) {
|
|
940
|
-
this.resolverCache.set(
|
|
947
|
+
this.resolverCache.set(resolverCacheKey, result);
|
|
941
948
|
}
|
|
942
949
|
}
|
|
943
950
|
return result;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getString } from './chunk-M263EZ4F.js';
|
|
2
|
-
import { extractRollupConfig } from './chunk-
|
|
2
|
+
import { extractRollupConfig } from './chunk-4PTER5EV.js';
|
|
3
3
|
import { __name } from './chunk-SHUYVCID.js';
|
|
4
|
+
import { omit } from '@stryke/helpers/omit';
|
|
4
5
|
import { joinPaths } from '@stryke/path/join-paths';
|
|
5
6
|
import { isObject } from '@stryke/type-checks/is-object';
|
|
6
7
|
import defu from 'defu';
|
|
@@ -123,7 +124,10 @@ function extractUnbuildConfig(context) {
|
|
|
123
124
|
}
|
|
124
125
|
return ret;
|
|
125
126
|
}, {}) : context.config.build.alias : {})
|
|
126
|
-
}, context.config.build.variant === "unbuild" ? context.config.build.override : {},
|
|
127
|
+
}, context.config.build.variant === "unbuild" ? context.config.build.override : {}, context.config.build.variant === "unbuild" ? omit(context.config.build, [
|
|
128
|
+
"override",
|
|
129
|
+
"variant"
|
|
130
|
+
]) : {}, {
|
|
127
131
|
projectName: context.config.name,
|
|
128
132
|
name: context.config.name,
|
|
129
133
|
orgName: isObject(context.workspaceConfig.organization) ? context.workspaceConfig.organization.name : context.workspaceConfig.organization,
|
|
@@ -145,8 +149,7 @@ function extractUnbuildConfig(context) {
|
|
|
145
149
|
fsCache: joinPaths(context.envPaths.cache, "jiti"),
|
|
146
150
|
moduleCache: true
|
|
147
151
|
},
|
|
148
|
-
rollup: extractRollupConfig(context)
|
|
149
|
-
}, context.config.build.variant === "unbuild" ? context.config.build : {}, {
|
|
152
|
+
rollup: extractRollupConfig(context),
|
|
150
153
|
debug: context.config.mode === "development",
|
|
151
154
|
minify: context.config.mode !== "development",
|
|
152
155
|
sourcemap: context.config.mode === "development"
|
|
@@ -94,6 +94,15 @@ export { ${key} };`;
|
|
|
94
94
|
"noExternal",
|
|
95
95
|
"skipNodeModulesBundle",
|
|
96
96
|
"extensions"
|
|
97
|
+
]) : {}, context.config.build.variant === "esbuild" ? omit(context.config.build, [
|
|
98
|
+
"alias",
|
|
99
|
+
"inject",
|
|
100
|
+
"external",
|
|
101
|
+
"noExternal",
|
|
102
|
+
"skipNodeModulesBundle",
|
|
103
|
+
"extensions",
|
|
104
|
+
"variant",
|
|
105
|
+
"override"
|
|
97
106
|
]) : {}, {
|
|
98
107
|
mainFields: context.config.build.mainFields,
|
|
99
108
|
conditions: context.config.build.conditions,
|
|
@@ -105,15 +114,7 @@ export { ${key} };`;
|
|
|
105
114
|
treeShaking: Boolean(context.config.build?.treeshake) || context.config.build?.treeShaking,
|
|
106
115
|
outdir: context.config.output.buildPath,
|
|
107
116
|
tsconfig: context.tsconfig.tsconfigFilePath,
|
|
108
|
-
tsconfigRaw: context.tsconfig.tsconfigJson
|
|
109
|
-
}, context.config.build.variant === "esbuild" ? omit(context.config.build, [
|
|
110
|
-
"alias",
|
|
111
|
-
"inject",
|
|
112
|
-
"external",
|
|
113
|
-
"noExternal",
|
|
114
|
-
"skipNodeModulesBundle",
|
|
115
|
-
"extensions"
|
|
116
|
-
]) : {}, {
|
|
117
|
+
tsconfigRaw: context.tsconfig.tsconfigJson,
|
|
117
118
|
minify: context.config.mode !== "development",
|
|
118
119
|
metafile: context.config.mode === "development",
|
|
119
120
|
sourcemap: context.config.mode === "development"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { extractESBuildConfig } from './chunk-
|
|
1
|
+
import { extractESBuildConfig } from './chunk-7GCAHOJK.js';
|
|
2
2
|
import { __name } from './chunk-SHUYVCID.js';
|
|
3
|
+
import { omit } from '@stryke/helpers/omit';
|
|
3
4
|
import { joinPaths } from '@stryke/path/join-paths';
|
|
4
5
|
import defu from 'defu';
|
|
5
6
|
|
|
@@ -49,13 +50,19 @@ function extractViteConfig(context) {
|
|
|
49
50
|
conditions: context.config.build.conditions,
|
|
50
51
|
extensions: context.config.build.extensions
|
|
51
52
|
}
|
|
52
|
-
}, context.config.build.variant === "vite" ? context.config.build.override : {},
|
|
53
|
+
}, context.config.build.variant === "vite" ? context.config.build.override : {}, context.config.build.variant === "vite" ? omit(context.config.build, [
|
|
54
|
+
"override",
|
|
55
|
+
"variant"
|
|
56
|
+
]) : {}, {
|
|
53
57
|
define: context.config.build.define,
|
|
54
58
|
rootDir: context.config.sourceRoot,
|
|
55
59
|
platform: context.config.build.platform,
|
|
56
60
|
mode: context.config.mode === "development" ? "development" : "production",
|
|
57
61
|
cacheDir: joinPaths(context.cachePath, "vite"),
|
|
58
62
|
build: {
|
|
63
|
+
minify: context.config.mode !== "development",
|
|
64
|
+
metafile: context.config.mode === "development",
|
|
65
|
+
sourcemap: context.config.mode === "development",
|
|
59
66
|
outDir: context.config.output.buildPath,
|
|
60
67
|
tsconfig: context.tsconfig.tsconfigFilePath,
|
|
61
68
|
tsconfigRaw: context.tsconfig.tsconfigJson
|
|
@@ -63,12 +70,6 @@ function extractViteConfig(context) {
|
|
|
63
70
|
esbuild: extractESBuildConfig(context),
|
|
64
71
|
logLevel: context.config.logLevel ?? void 0,
|
|
65
72
|
envDir: context.config.projectRoot
|
|
66
|
-
}, context.config.build.variant === "vite" ? context.config.build : {}, {
|
|
67
|
-
build: {
|
|
68
|
-
minify: context.config.mode !== "development",
|
|
69
|
-
metafile: context.config.mode === "development",
|
|
70
|
-
sourcemap: context.config.mode === "development"
|
|
71
|
-
}
|
|
72
73
|
}, DEFAULT_VITE_CONFIG);
|
|
73
74
|
}
|
|
74
75
|
__name(extractViteConfig, "extractViteConfig");
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { dtsBundlePlugin } from './chunk-
|
|
1
|
+
import { dtsBundlePlugin } from './chunk-4PTER5EV.js';
|
|
2
2
|
import { __name } from './chunk-SHUYVCID.js';
|
|
3
3
|
import { getBabelInputPlugin } from '@rollup/plugin-babel';
|
|
4
4
|
import inject from '@rollup/plugin-inject';
|
|
5
5
|
import resolve from '@rollup/plugin-node-resolve';
|
|
6
6
|
import replace from '@rollup/plugin-replace';
|
|
7
7
|
import { toArray } from '@stryke/convert/to-array';
|
|
8
|
+
import { omit } from '@stryke/helpers/omit';
|
|
8
9
|
import { joinPaths } from '@stryke/path/join-paths';
|
|
9
10
|
import { isFunction } from '@stryke/type-checks/is-function';
|
|
10
11
|
import { isString } from '@stryke/type-checks/is-string';
|
|
@@ -93,7 +94,10 @@ function extractRolldownConfig(context) {
|
|
|
93
94
|
}),
|
|
94
95
|
dtsBundlePlugin
|
|
95
96
|
]
|
|
96
|
-
}, context.config.build.variant === "rolldown" || context.config.build.variant === "rollup" ? context.config.build.override : {}, context.config.build.variant === "vite" ? context.config.build.override.build?.rollupOptions : {},
|
|
97
|
+
}, context.config.build.variant === "rolldown" || context.config.build.variant === "rollup" ? context.config.build.override : {}, context.config.build.variant === "vite" ? context.config.build.override.build?.rollupOptions : {}, context.config.build.variant === "rolldown" || context.config.build.variant === "rollup" ? omit(context.config.build, [
|
|
98
|
+
"override",
|
|
99
|
+
"variant"
|
|
100
|
+
]) : {}, context.config.build.variant === "vite" ? context.config.build.build : {}, {
|
|
97
101
|
experimental: {
|
|
98
102
|
viteMode: context.config.build.variant === "vite"
|
|
99
103
|
},
|
|
@@ -106,29 +110,24 @@ function extractRolldownConfig(context) {
|
|
|
106
110
|
platform: context.config.build.platform,
|
|
107
111
|
tsconfig: context.tsconfig.tsconfigFilePath,
|
|
108
112
|
cache: !context.config.skipCache ? joinPaths(context.cachePath, "rolldown") : false,
|
|
109
|
-
output: {
|
|
110
|
-
dir: context.config.output.buildPath
|
|
111
|
-
},
|
|
112
113
|
logLevel: context.config.logLevel,
|
|
113
|
-
onLog: context.log
|
|
114
|
-
}, context.config.build.variant === "rolldown" || context.config.build.variant === "rollup" ? context.config.build : {}, context.config.build.variant === "vite" ? context.config.build.build : {}, {
|
|
115
|
-
output: {
|
|
116
|
-
sourcemap: context.config.mode === "development"
|
|
117
|
-
},
|
|
118
|
-
minify: context.config.mode === "production"
|
|
119
|
-
}, {
|
|
114
|
+
onLog: context.log,
|
|
120
115
|
jsx: "automatic",
|
|
121
|
-
logLevel: "silent",
|
|
122
116
|
keepNames: true,
|
|
123
117
|
treeshake: true,
|
|
118
|
+
minify: context.config.mode === "production",
|
|
124
119
|
output: [
|
|
125
120
|
{
|
|
121
|
+
dir: context.config.output.buildPath,
|
|
126
122
|
format: "es",
|
|
127
|
-
preserveModules: true
|
|
123
|
+
preserveModules: true,
|
|
124
|
+
sourcemap: context.config.mode === "development"
|
|
128
125
|
},
|
|
129
126
|
{
|
|
127
|
+
dir: context.config.output.buildPath,
|
|
130
128
|
format: "cjs",
|
|
131
|
-
preserveModules: true
|
|
129
|
+
preserveModules: true,
|
|
130
|
+
sourcemap: context.config.mode === "development"
|
|
132
131
|
}
|
|
133
132
|
]
|
|
134
133
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkR3E56AJ4_cjs = require('./chunk-R3E56AJ4.cjs');
|
|
4
4
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
5
5
|
var types = require('@storm-software/config-tools/types');
|
|
6
6
|
var esbuild = require('esbuild');
|
|
@@ -11,7 +11,7 @@ async function bundle(context, file, overrides = {}) {
|
|
|
11
11
|
throw new Error(`Module not found: "${file}". Please check the path and try again.`);
|
|
12
12
|
}
|
|
13
13
|
const result = await esbuild.build({
|
|
14
|
-
...
|
|
14
|
+
...chunkR3E56AJ4_cjs.extractESBuildConfig(context),
|
|
15
15
|
entry: [
|
|
16
16
|
path
|
|
17
17
|
],
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { getFileHeader } from './chunk-GANVMM73.js';
|
|
2
2
|
import { writeFile } from './chunk-TANQDHYY.js';
|
|
3
|
-
import { PowerlinesAPIContext } from './chunk-
|
|
4
|
-
import {
|
|
5
|
-
import { isPluginConfig, isPlugin, isPluginConfigTuple, isPluginConfigObject, checkDedupe } from './chunk-NIRFKQAD.js';
|
|
3
|
+
import { PowerlinesAPIContext } from './chunk-HM52GHX3.js';
|
|
4
|
+
import { isPluginConfig, isPlugin, isPluginConfigTuple, isPluginConfigObject, checkDedupe } from './chunk-HE6HOGLS.js';
|
|
6
5
|
import { writeMetaFile } from './chunk-OEF6EHQV.js';
|
|
7
6
|
import { createProgram } from './chunk-4W6WV35V.js';
|
|
8
7
|
import { getParsedTypeScriptConfig, getTsconfigFilePath, isIncludeMatchFound } from './chunk-ZGMEHSNN.js';
|
|
@@ -30,11 +29,12 @@ import { isPromiseLike } from '@stryke/type-checks/is-promise';
|
|
|
30
29
|
import { isSet } from '@stryke/type-checks/is-set';
|
|
31
30
|
import { isSetObject } from '@stryke/type-checks/is-set-object';
|
|
32
31
|
import { isSetString } from '@stryke/type-checks/is-set-string';
|
|
33
|
-
import
|
|
32
|
+
import chalk3 from 'chalk';
|
|
34
33
|
import Handlebars from 'handlebars';
|
|
35
34
|
import { declare } from '@babel/helper-plugin-utils';
|
|
36
35
|
import * as t from '@babel/types';
|
|
37
36
|
import { flattenDiagnosticMessageText } from 'typescript';
|
|
37
|
+
import { defu } from 'defu';
|
|
38
38
|
import { getPackageName, hasPackageVersion, getPackageVersion } from '@stryke/string-format/package';
|
|
39
39
|
import { getObjectDiff } from '@donedeal0/superdiff';
|
|
40
40
|
import { readJsonFile } from '@stryke/fs/json';
|
|
@@ -190,6 +190,57 @@ ${diagnosticMessage.length > 5e3 ? `${diagnosticMessage.slice(0, 5e3)}...` : dia
|
|
|
190
190
|
return formatTypes(builtinModules);
|
|
191
191
|
}
|
|
192
192
|
__name(emitTypes, "emitTypes");
|
|
193
|
+
async function callHook(context, hook, options, ...args) {
|
|
194
|
+
const handlers = context.selectHooks(hook, options);
|
|
195
|
+
if (handlers.length > 0) {
|
|
196
|
+
context.log(LogLevelLabel.DEBUG, ` \u{1F9E9} Calling plugin hook: ${chalk3.bold.cyanBright(`${hook}${options?.order ? ` (${options.order})` : ""}`)}`);
|
|
197
|
+
let results = [];
|
|
198
|
+
if (options?.sequential === false) {
|
|
199
|
+
results = await Promise.all(handlers.map(async (handler) => {
|
|
200
|
+
if (!isFunction(handler)) {
|
|
201
|
+
throw new Error(`Plugin hook handler for hook "${hook}" is not a function.`);
|
|
202
|
+
}
|
|
203
|
+
return Promise.resolve(handler.apply(null, ...args));
|
|
204
|
+
}));
|
|
205
|
+
} else {
|
|
206
|
+
for (const handler of handlers) {
|
|
207
|
+
if (!isFunction(handler)) {
|
|
208
|
+
throw new Error(`Plugin hook handler for hook "${hook}" is not a function.`);
|
|
209
|
+
}
|
|
210
|
+
if (options?.result === "first" || options?.asNextParam === false) {
|
|
211
|
+
results.push(await Promise.resolve(handler.apply(null, ...args)));
|
|
212
|
+
if (options?.result === "first" && isSet(results[results.length - 1])) {
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
} else {
|
|
216
|
+
const sequenceArgs = [
|
|
217
|
+
...args
|
|
218
|
+
];
|
|
219
|
+
if (results.length > 0 && sequenceArgs.length > 0) {
|
|
220
|
+
sequenceArgs[0] = isFunction(options.asNextParam) ? await Promise.resolve(options.asNextParam(results[0])) : results[0];
|
|
221
|
+
}
|
|
222
|
+
const result = await Promise.resolve(
|
|
223
|
+
// eslint-disable-next-line ts/no-unsafe-call
|
|
224
|
+
handler.apply(null, ...sequenceArgs)
|
|
225
|
+
);
|
|
226
|
+
results = [
|
|
227
|
+
result
|
|
228
|
+
];
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
const definedResults = results.filter((result) => isSet(result));
|
|
233
|
+
if (definedResults.length > 0) {
|
|
234
|
+
let mergedResult = void 0;
|
|
235
|
+
for (const result of definedResults) {
|
|
236
|
+
mergedResult = defu(result, mergedResult ?? {});
|
|
237
|
+
}
|
|
238
|
+
return mergedResult;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return void 0;
|
|
242
|
+
}
|
|
243
|
+
__name(callHook, "callHook");
|
|
193
244
|
async function installPackage(context, packageName, dev = false) {
|
|
194
245
|
if (!await isPackageListed(getPackageName(packageName), {
|
|
195
246
|
cwd: context.config.projectRoot
|
|
@@ -333,9 +384,9 @@ async function resolveTsconfig(context) {
|
|
|
333
384
|
if (changes.length > 0) {
|
|
334
385
|
context.log(LogLevelLabel.WARN, `Updating the following configuration values in "${context.tsconfig.tsconfigFilePath}" file:
|
|
335
386
|
|
|
336
|
-
${changes.map((change, i) => `${
|
|
337
|
-
${
|
|
338
|
-
${
|
|
387
|
+
${changes.map((change, i) => `${chalk3.bold.whiteBright(`${i + 1}. ${titleCase(change.status)} the ${change.field} field: `)}
|
|
388
|
+
${chalk3.red(` - Previous: ${change.previous} `)}
|
|
389
|
+
${chalk3.green(` - Updated: ${change.current} `)}
|
|
339
390
|
`).join("\n")}
|
|
340
391
|
`);
|
|
341
392
|
}
|
|
@@ -373,7 +424,11 @@ var PowerlinesAPI = class _PowerlinesAPI {
|
|
|
373
424
|
this.#context = context;
|
|
374
425
|
}
|
|
375
426
|
/**
|
|
376
|
-
* Initialize
|
|
427
|
+
* Initialize a Powerlines API instance
|
|
428
|
+
*
|
|
429
|
+
* @param workspaceRoot - The directory of the underlying workspace the Powerlines project exists in
|
|
430
|
+
* @param config - An object containing the configuration required to run Powerlines tasks.
|
|
431
|
+
* @returns A new instance of the Powerlines API
|
|
377
432
|
*/
|
|
378
433
|
static async from(workspaceRoot, config) {
|
|
379
434
|
const api = new _PowerlinesAPI(await PowerlinesAPIContext.from(workspaceRoot, config));
|
|
@@ -697,7 +752,7 @@ ${formatTypes(generatedTypes)}
|
|
|
697
752
|
}
|
|
698
753
|
}
|
|
699
754
|
await Promise.all(context.config.output.assets.map(async (asset) => {
|
|
700
|
-
context.log(LogLevelLabel.DEBUG, `Copying asset(s): ${
|
|
755
|
+
context.log(LogLevelLabel.DEBUG, `Copying asset(s): ${chalk3.redBright(context.workspaceConfig.workspaceRoot === asset.input ? asset.glob : joinPaths(replacePath(asset.input, context.workspaceConfig.workspaceRoot), asset.glob))} -> ${chalk3.greenBright(joinPaths(replacePath(asset.output, context.workspaceConfig.workspaceRoot), asset.glob))} ${Array.isArray(asset.ignore) && asset.ignore.length > 0 ? ` (ignoring: ${asset.ignore.map((i) => chalk3.yellowBright(i)).join(", ")})` : ""}`);
|
|
701
756
|
await copyFiles(asset, asset.output);
|
|
702
757
|
}));
|
|
703
758
|
await this.callHook("build", {
|
|
@@ -845,7 +900,7 @@ ${formatTypes(generatedTypes)}
|
|
|
845
900
|
await this.#addPlugin(required);
|
|
846
901
|
}
|
|
847
902
|
}
|
|
848
|
-
this.context.log(LogLevelLabel.DEBUG, `Successfully initialized the ${
|
|
903
|
+
this.context.log(LogLevelLabel.DEBUG, `Successfully initialized the ${chalk3.bold.cyanBright(plugin.name)} plugin`);
|
|
849
904
|
await this.context.addPlugin(plugin);
|
|
850
905
|
}
|
|
851
906
|
}
|
|
@@ -906,10 +961,10 @@ ${formatTypes(generatedTypes)}
|
|
|
906
961
|
throw new Error(`The plugin option ${JSON.stringify(plugin)} does not export a valid module. This configuration must point to a valid Powerlines plugin module.`);
|
|
907
962
|
}
|
|
908
963
|
if (checkDedupe(plugin, this.context.plugins)) {
|
|
909
|
-
this.context.log(LogLevelLabel.TRACE, `Duplicate ${
|
|
964
|
+
this.context.log(LogLevelLabel.TRACE, `Duplicate ${chalk3.bold.cyanBright(plugin.name)} plugin dependency detected - Skipping initialization.`);
|
|
910
965
|
return null;
|
|
911
966
|
}
|
|
912
|
-
this.context.log(LogLevelLabel.TRACE, `Initializing the ${
|
|
967
|
+
this.context.log(LogLevelLabel.TRACE, `Initializing the ${chalk3.bold.cyanBright(plugin.name)} plugin...`);
|
|
913
968
|
return plugin;
|
|
914
969
|
}
|
|
915
970
|
async #resolvePlugin(pluginPath) {
|
|
@@ -987,7 +1042,7 @@ function createUnpluginFactory(variant, decorate) {
|
|
|
987
1042
|
async function resolveId(id, importer, options = {
|
|
988
1043
|
isEntry: false
|
|
989
1044
|
}) {
|
|
990
|
-
return api.context.
|
|
1045
|
+
return api.context.resolve(id, importer, options);
|
|
991
1046
|
}
|
|
992
1047
|
__name(resolveId, "resolveId");
|
|
993
1048
|
async function load(id) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extractESBuildConfig } from './chunk-
|
|
1
|
+
import { extractESBuildConfig } from './chunk-7GCAHOJK.js';
|
|
2
2
|
import { __name } from './chunk-SHUYVCID.js';
|
|
3
3
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
4
4
|
import { build } from 'esbuild';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkHL4KTZDB_cjs = require('./chunk-HL4KTZDB.cjs');
|
|
4
4
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
5
5
|
var pluginBabel = require('@rollup/plugin-babel');
|
|
6
6
|
var inject = require('@rollup/plugin-inject');
|
|
7
7
|
var resolve = require('@rollup/plugin-node-resolve');
|
|
8
8
|
var replace = require('@rollup/plugin-replace');
|
|
9
9
|
var toArray = require('@stryke/convert/to-array');
|
|
10
|
+
var omit = require('@stryke/helpers/omit');
|
|
10
11
|
var joinPaths = require('@stryke/path/join-paths');
|
|
11
12
|
var isFunction = require('@stryke/type-checks/is-function');
|
|
12
13
|
var isString = require('@stryke/type-checks/is-string');
|
|
@@ -101,9 +102,12 @@ function extractRolldownConfig(context) {
|
|
|
101
102
|
],
|
|
102
103
|
preferBuiltins: true
|
|
103
104
|
}),
|
|
104
|
-
|
|
105
|
+
chunkHL4KTZDB_cjs.dtsBundlePlugin
|
|
105
106
|
]
|
|
106
|
-
}, context.config.build.variant === "rolldown" || context.config.build.variant === "rollup" ? context.config.build.override : {}, context.config.build.variant === "vite" ? context.config.build.override.build?.rollupOptions : {},
|
|
107
|
+
}, context.config.build.variant === "rolldown" || context.config.build.variant === "rollup" ? context.config.build.override : {}, context.config.build.variant === "vite" ? context.config.build.override.build?.rollupOptions : {}, context.config.build.variant === "rolldown" || context.config.build.variant === "rollup" ? omit.omit(context.config.build, [
|
|
108
|
+
"override",
|
|
109
|
+
"variant"
|
|
110
|
+
]) : {}, context.config.build.variant === "vite" ? context.config.build.build : {}, {
|
|
107
111
|
experimental: {
|
|
108
112
|
viteMode: context.config.build.variant === "vite"
|
|
109
113
|
},
|
|
@@ -116,29 +120,24 @@ function extractRolldownConfig(context) {
|
|
|
116
120
|
platform: context.config.build.platform,
|
|
117
121
|
tsconfig: context.tsconfig.tsconfigFilePath,
|
|
118
122
|
cache: !context.config.skipCache ? joinPaths.joinPaths(context.cachePath, "rolldown") : false,
|
|
119
|
-
output: {
|
|
120
|
-
dir: context.config.output.buildPath
|
|
121
|
-
},
|
|
122
123
|
logLevel: context.config.logLevel,
|
|
123
|
-
onLog: context.log
|
|
124
|
-
}, context.config.build.variant === "rolldown" || context.config.build.variant === "rollup" ? context.config.build : {}, context.config.build.variant === "vite" ? context.config.build.build : {}, {
|
|
125
|
-
output: {
|
|
126
|
-
sourcemap: context.config.mode === "development"
|
|
127
|
-
},
|
|
128
|
-
minify: context.config.mode === "production"
|
|
129
|
-
}, {
|
|
124
|
+
onLog: context.log,
|
|
130
125
|
jsx: "automatic",
|
|
131
|
-
logLevel: "silent",
|
|
132
126
|
keepNames: true,
|
|
133
127
|
treeshake: true,
|
|
128
|
+
minify: context.config.mode === "production",
|
|
134
129
|
output: [
|
|
135
130
|
{
|
|
131
|
+
dir: context.config.output.buildPath,
|
|
136
132
|
format: "es",
|
|
137
|
-
preserveModules: true
|
|
133
|
+
preserveModules: true,
|
|
134
|
+
sourcemap: context.config.mode === "development"
|
|
138
135
|
},
|
|
139
136
|
{
|
|
137
|
+
dir: context.config.output.buildPath,
|
|
140
138
|
format: "cjs",
|
|
141
|
-
preserveModules: true
|
|
139
|
+
preserveModules: true,
|
|
140
|
+
sourcemap: context.config.mode === "development"
|
|
142
141
|
}
|
|
143
142
|
]
|
|
144
143
|
});
|