powerlines 0.23.6 → 0.23.9
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-DxPACGY4.d.ts → api-5H3zEedD.d.ts} +1 -1
- package/dist/{api--9pVSIbm.d.cts → api-B77aqxGC.d.cts} +1 -1
- package/dist/api.cjs +2 -2
- package/dist/api.d.cts +2 -2
- package/dist/api.d.ts +2 -2
- package/dist/api.js +1 -1
- package/dist/astro.cjs +16 -18
- package/dist/astro.d.cts +8 -6
- package/dist/astro.d.ts +8 -6
- package/dist/astro.js +16 -5
- package/dist/{chunk-Q3ZFML4W.cjs → chunk-2QLM4MYP.cjs} +2 -2
- package/dist/{chunk-62BQYRPM.cjs → chunk-6ZKM7WOB.cjs} +33 -20
- package/dist/{chunk-E4M4KEL3.js → chunk-FDEGM4CR.js} +33 -21
- package/dist/{chunk-I3EUY74Q.cjs → chunk-FJWXCUGQ.cjs} +20 -18
- package/dist/{chunk-4OAW547A.cjs → chunk-G5K3I7JU.cjs} +2 -2
- package/dist/{chunk-VRFJDHDN.cjs → chunk-ITL6JGKX.cjs} +2 -2
- package/dist/{chunk-W36NC3B7.js → chunk-KOBCKTHY.js} +1 -1
- package/dist/{chunk-GZNJUK7U.js → chunk-RKMUBSYG.js} +17 -17
- package/dist/{chunk-5CCEQUAZ.js → chunk-S47BU5QR.js} +1 -1
- package/dist/{chunk-XWBVMNBI.js → chunk-UYJXRMS3.js} +1 -1
- package/dist/config.d.cts +2 -2
- package/dist/config.d.ts +2 -2
- package/dist/esbuild.cjs +6 -6
- package/dist/esbuild.d.cts +5 -4
- package/dist/esbuild.d.ts +5 -4
- package/dist/esbuild.js +3 -3
- package/dist/farm.cjs +3 -3
- package/dist/farm.d.cts +9 -7
- package/dist/farm.d.ts +9 -7
- package/dist/farm.js +2 -2
- package/dist/index.cjs +14 -32
- package/dist/index.d.cts +2 -10
- package/dist/index.d.ts +2 -10
- package/dist/index.js +2 -16
- package/dist/lib/{api-B6hfFxVS.d.ts → api-Cm51oVbC.d.cts} +1 -1
- package/dist/lib/{api-CD2QlMig.d.cts → api-mja4jirh.d.ts} +1 -1
- package/dist/lib/build/esbuild.d.cts +1 -1
- package/dist/lib/build/esbuild.d.ts +1 -1
- package/dist/lib/build/index.d.cts +3 -3
- package/dist/lib/build/index.d.ts +3 -3
- package/dist/lib/build/rolldown.d.cts +1 -1
- package/dist/lib/build/rolldown.d.ts +1 -1
- package/dist/lib/build/rollup.d.cts +1 -1
- package/dist/lib/build/rollup.d.ts +1 -1
- package/dist/lib/build/rspack.d.cts +1 -1
- package/dist/lib/build/rspack.d.ts +1 -1
- package/dist/lib/build/tsup.d.cts +1 -1
- package/dist/lib/build/tsup.d.ts +1 -1
- package/dist/lib/build/unbuild.d.cts +3 -3
- package/dist/lib/build/unbuild.d.ts +3 -3
- package/dist/lib/build/vite.d.cts +1 -1
- package/dist/lib/build/vite.d.ts +1 -1
- package/dist/lib/build/webpack.d.cts +1 -1
- package/dist/lib/build/webpack.d.ts +1 -1
- package/dist/lib/{chunk-CCGA6ZHZ.cjs → chunk-3KR6TYGW.cjs} +13 -13
- package/dist/lib/{chunk-764HUXP3.js → chunk-63MH3ERQ.js} +25 -4
- package/dist/lib/{chunk-XW5TELHB.cjs → chunk-7JAGT5GC.cjs} +10 -3
- package/dist/lib/{chunk-EN4XP4D5.js → chunk-AHONHQGB.js} +1 -1
- package/dist/lib/{chunk-EJTGOYSI.cjs → chunk-B3DJ4CXY.cjs} +10 -10
- package/dist/lib/{chunk-NDKPSA3I.js → chunk-BGGENJH4.js} +2 -2
- package/dist/lib/{chunk-NVUXGMU5.cjs → chunk-LQEGZT5U.cjs} +25 -4
- package/dist/lib/{chunk-SZH2DJOG.js → chunk-OI7EHXNE.js} +3 -3
- package/dist/lib/{chunk-ZPIKFR7Z.js → chunk-PVCAB6BZ.js} +10 -3
- package/dist/lib/{chunk-27RAXIPT.cjs → chunk-SMZ672RP.cjs} +6 -6
- package/dist/lib/{config-DeUaQYc_.d.ts → config-7Q2dBjJE.d.ts} +7 -1
- package/dist/lib/{config-DTSdCZsw.d.cts → config-BnJpgcGr.d.cts} +7 -1
- package/dist/lib/config-file.cjs +3 -3
- package/dist/lib/config-file.d.cts +3 -2
- package/dist/lib/config-file.d.ts +3 -2
- package/dist/lib/config-file.js +1 -1
- package/dist/lib/contexts/api-context.cjs +5 -5
- 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 +4 -4
- package/dist/lib/contexts/context.cjs +3 -3
- package/dist/lib/contexts/context.d.cts +10 -3
- package/dist/lib/contexts/context.d.ts +10 -3
- package/dist/lib/contexts/context.js +2 -2
- package/dist/lib/contexts/environment-context.cjs +4 -4
- 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 +3 -3
- package/dist/lib/contexts/index.cjs +7 -7
- package/dist/lib/contexts/index.d.cts +3 -3
- package/dist/lib/contexts/index.d.ts +3 -3
- package/dist/lib/contexts/index.js +4 -4
- package/dist/lib/contexts/plugin-context.d.cts +3 -3
- package/dist/lib/contexts/plugin-context.d.ts +3 -3
- package/dist/lib/entry.d.cts +1 -1
- package/dist/lib/entry.d.ts +1 -1
- package/dist/lib/index.cjs +12 -12
- package/dist/lib/index.d.cts +4 -3
- package/dist/lib/index.d.ts +4 -3
- package/dist/lib/index.js +5 -5
- package/dist/lib/{internal-CpVMJCaU.d.ts → internal-BEygquYh.d.ts} +2 -2
- package/dist/lib/{internal-ypnrUNZy.d.cts → internal-BeR8fOB1.d.cts} +2 -2
- package/dist/lib/logger.d.cts +1 -1
- package/dist/lib/logger.d.ts +1 -1
- package/dist/lib/typescript/compiler-host.d.cts +1 -1
- package/dist/lib/typescript/compiler-host.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/program.d.cts +1 -1
- package/dist/lib/typescript/program.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 +6 -6
- package/dist/lib/unplugin/factory.d.cts +4 -16
- package/dist/lib/unplugin/factory.d.ts +4 -16
- package/dist/lib/unplugin/factory.js +5 -5
- package/dist/lib/unplugin/helpers.d.cts +1 -1
- package/dist/lib/unplugin/helpers.d.ts +1 -1
- package/dist/lib/unplugin/index.cjs +6 -6
- package/dist/lib/unplugin/index.d.cts +3 -2
- package/dist/lib/unplugin/index.d.ts +3 -2
- package/dist/lib/unplugin/index.js +5 -5
- package/dist/lib/unplugin/plugin.d.cts +5 -3
- package/dist/lib/unplugin/plugin.d.ts +5 -3
- package/dist/lib/unplugin/resolve-id.d.cts +1 -1
- package/dist/lib/unplugin/resolve-id.d.ts +1 -1
- package/dist/lib/unplugin-CbbNDduM.d.ts +18 -0
- package/dist/lib/unplugin-ppAOzR__.d.cts +18 -0
- package/dist/lib/utilities/bundle.d.cts +1 -1
- package/dist/lib/utilities/bundle.d.ts +1 -1
- 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.d.cts +1 -1
- package/dist/lib/utilities/index.d.ts +1 -1
- package/dist/lib/utilities/meta.d.cts +1 -1
- package/dist/lib/utilities/meta.d.ts +1 -1
- package/dist/lib/utilities/resolve-path.d.cts +1 -1
- package/dist/lib/utilities/resolve-path.d.ts +1 -1
- package/dist/lib/utilities/resolve.d.cts +1 -1
- package/dist/lib/utilities/resolve.d.ts +1 -1
- 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 +21 -18
- package/dist/next.js +21 -5
- package/dist/nuxt.cjs +21 -18
- package/dist/nuxt.d.cts +12 -6
- package/dist/nuxt.d.ts +12 -6
- package/dist/nuxt.js +21 -5
- package/dist/plugin-utils/{context-DRFZE3XI.d.ts → context-Cg11S-CE.d.cts} +6 -0
- package/dist/plugin-utils/{context-DRFZE3XI.d.cts → context-Cg11S-CE.d.ts} +6 -0
- package/dist/plugin-utils/context-helpers.d.cts +1 -1
- package/dist/plugin-utils/context-helpers.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/{resolved-DKFZ11S7.d.ts → resolved-B3BSdXCt.d.ts} +13 -1
- package/dist/{resolved-C00CJgsk.d.cts → resolved-DGrpILrS.d.cts} +13 -1
- package/dist/rolldown.cjs +8 -16
- package/dist/rolldown.d.cts +5 -5
- package/dist/rolldown.d.ts +5 -5
- package/dist/rolldown.js +8 -3
- package/dist/rollup.cjs +8 -16
- package/dist/rollup.d.cts +5 -5
- package/dist/rollup.d.ts +5 -5
- package/dist/rollup.js +8 -3
- package/dist/rspack.cjs +8 -16
- package/dist/rspack.d.cts +3 -3
- package/dist/rspack.d.ts +3 -3
- package/dist/rspack.js +8 -3
- package/dist/tsup.cjs +40 -18
- package/dist/tsup.d.cts +3 -2
- package/dist/tsup.d.ts +3 -2
- package/dist/tsup.js +40 -5
- 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.d.cts +1 -1
- package/dist/types/context.d.ts +1 -1
- package/dist/types/hooks.d.cts +1 -1
- package/dist/types/hooks.d.ts +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/internal.d.cts +2 -2
- package/dist/types/internal.d.ts +2 -2
- package/dist/types/plugin.d.cts +1 -1
- package/dist/types/plugin.d.ts +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 +8 -16
- package/dist/unloader.d.cts +7 -6
- package/dist/unloader.d.ts +7 -6
- package/dist/unloader.js +8 -3
- package/dist/unplugin.cjs +186 -26
- package/dist/unplugin.d.cts +58 -35
- package/dist/unplugin.d.ts +58 -35
- package/dist/unplugin.js +186 -16
- package/dist/vite.cjs +6 -6
- package/dist/vite.d.cts +7 -6
- package/dist/vite.d.ts +7 -6
- package/dist/vite.js +3 -3
- package/dist/webpack.cjs +6 -6
- package/dist/webpack.d.cts +5 -5
- package/dist/webpack.d.ts +5 -5
- package/dist/webpack.js +3 -3
- package/package.json +10 -10
- package/dist/babel-types.d.ts +0 -292
- package/dist/chunk-33BDG6M5.js +0 -38
- package/dist/chunk-3HOOIAF4.js +0 -7
- package/dist/chunk-AK5B45AH.js +0 -14
- package/dist/chunk-GHHMURR4.js +0 -7
- package/dist/chunk-GXJ5L37C.cjs +0 -10
- package/dist/chunk-IVABRCNA.js +0 -29
- package/dist/chunk-JJXDDTSL.cjs +0 -22
- package/dist/chunk-K5TOHSUD.cjs +0 -17
- package/dist/chunk-M7N6RX2H.js +0 -19
- package/dist/chunk-MAOXZVDE.cjs +0 -22
- package/dist/chunk-NWZXH2HK.cjs +0 -10
- package/dist/chunk-PFECSHR6.cjs +0 -41
- package/dist/chunk-RM37JA3L.cjs +0 -32
- package/dist/chunk-RVO5GC2H.cjs +0 -10
- package/dist/chunk-TSKJTJ2P.js +0 -19
- package/dist/chunk-XDNNFAQR.js +0 -7
- package/dist/chunk-YBOJFFO2.cjs +0 -10
- package/dist/chunk-ZOMJH52N.js +0 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Configuration } from 'webpack';
|
|
2
|
-
import { C as Context } from '../config-
|
|
2
|
+
import { C as Context } from '../config-BnJpgcGr.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-7Q2dBjJE.js';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
5
5
|
import '@storm-software/config/types';
|
|
@@ -4,9 +4,9 @@ var chunk2NZADVP5_cjs = require('./chunk-2NZADVP5.cjs');
|
|
|
4
4
|
var chunk4NHFXDTQ_cjs = require('./chunk-4NHFXDTQ.cjs');
|
|
5
5
|
var chunkZBDVQVUK_cjs = require('./chunk-ZBDVQVUK.cjs');
|
|
6
6
|
var chunkBQU53ZNB_cjs = require('./chunk-BQU53ZNB.cjs');
|
|
7
|
-
var
|
|
7
|
+
var chunkSMZ672RP_cjs = require('./chunk-SMZ672RP.cjs');
|
|
8
8
|
var chunkB3EE3VHZ_cjs = require('./chunk-B3EE3VHZ.cjs');
|
|
9
|
-
var
|
|
9
|
+
var chunkLQEGZT5U_cjs = require('./chunk-LQEGZT5U.cjs');
|
|
10
10
|
var chunk7XHBIYIN_cjs = require('./chunk-7XHBIYIN.cjs');
|
|
11
11
|
var chunkJA4HSQRN_cjs = require('./chunk-JA4HSQRN.cjs');
|
|
12
12
|
var chunk3OCI4TH7_cjs = require('./chunk-3OCI4TH7.cjs');
|
|
@@ -476,7 +476,7 @@ var PowerlinesAPI = class _PowerlinesAPI {
|
|
|
476
476
|
* Initialize the Powerlines API
|
|
477
477
|
*/
|
|
478
478
|
static async from(workspaceRoot, config) {
|
|
479
|
-
const api = new _PowerlinesAPI(await
|
|
479
|
+
const api = new _PowerlinesAPI(await chunkSMZ672RP_cjs.PowerlinesAPIContext.from(workspaceRoot, config));
|
|
480
480
|
api.#context.$$internal.api = api;
|
|
481
481
|
for (const plugin of api.context.config.plugins ?? []) {
|
|
482
482
|
await api.#addPlugin(plugin);
|
|
@@ -523,7 +523,7 @@ ${context.entry.map((entry) => `- ${entry.input.file || entry.file}${entry.outpu
|
|
|
523
523
|
context.log(types.LogLevelLabel.TRACE, `Powerlines configuration has been resolved:
|
|
524
524
|
|
|
525
525
|
${console.formatLogMessage(context.config)}`);
|
|
526
|
-
context.fs[
|
|
526
|
+
context.fs[chunkLQEGZT5U_cjs.__VFS_PATCH__]();
|
|
527
527
|
await chunk7XHBIYIN_cjs.writeMetaFile(context);
|
|
528
528
|
context.persistedMeta = context.meta;
|
|
529
529
|
if (!exists.existsSync(context.cachePath)) {
|
|
@@ -655,7 +655,7 @@ ${formatTypes(generatedTypes)}
|
|
|
655
655
|
}
|
|
656
656
|
await this.callPostHook(context, "prepare");
|
|
657
657
|
await chunk7XHBIYIN_cjs.writeMetaFile(context);
|
|
658
|
-
context.fs[
|
|
658
|
+
context.fs[chunkLQEGZT5U_cjs.__VFS_REVERT__]();
|
|
659
659
|
});
|
|
660
660
|
this.context.log(types.LogLevelLabel.INFO, "Powerlines API has been prepared successfully");
|
|
661
661
|
}
|
|
@@ -828,7 +828,7 @@ ${formatTypes(generatedTypes)}
|
|
|
828
828
|
this.context.log(types.LogLevelLabel.TRACE, "Powerlines finalize execution started");
|
|
829
829
|
await this.#executeEnvironments(async (context) => {
|
|
830
830
|
await this.callHook(context, "finalize");
|
|
831
|
-
context.fs[
|
|
831
|
+
context.fs[chunkLQEGZT5U_cjs.__VFS_REVERT__]();
|
|
832
832
|
await context.fs.dispose();
|
|
833
833
|
});
|
|
834
834
|
this.context.log(types.LogLevelLabel.TRACE, "Powerlines finalize execution completed");
|
|
@@ -993,11 +993,11 @@ ${formatTypes(generatedTypes)}
|
|
|
993
993
|
if (isPromise.isPromiseLike(config)) {
|
|
994
994
|
awaited = await Promise.resolve(config);
|
|
995
995
|
}
|
|
996
|
-
if (!
|
|
996
|
+
if (!chunkLQEGZT5U_cjs.isPluginConfig(awaited)) {
|
|
997
997
|
throw new Error(`Invalid plugin specified in the configuration - ${JSON.stringify(awaited)}. Please ensure the value is a plugin name, an object with the \`plugin\` and \`props\` properties, or an instance of \`Plugin\`.`);
|
|
998
998
|
}
|
|
999
999
|
let plugin;
|
|
1000
|
-
if (
|
|
1000
|
+
if (chunkLQEGZT5U_cjs.isPlugin(awaited)) {
|
|
1001
1001
|
plugin = awaited;
|
|
1002
1002
|
} else if (isFunction.isFunction(awaited)) {
|
|
1003
1003
|
plugin = await Promise.resolve(awaited());
|
|
@@ -1008,10 +1008,10 @@ ${formatTypes(generatedTypes)}
|
|
|
1008
1008
|
} else {
|
|
1009
1009
|
plugin = resolved;
|
|
1010
1010
|
}
|
|
1011
|
-
} else if (
|
|
1011
|
+
} else if (chunkLQEGZT5U_cjs.isPluginConfigTuple(awaited) || chunkLQEGZT5U_cjs.isPluginConfigObject(awaited)) {
|
|
1012
1012
|
let pluginConfig;
|
|
1013
1013
|
let pluginOptions;
|
|
1014
|
-
if (
|
|
1014
|
+
if (chunkLQEGZT5U_cjs.isPluginConfigTuple(awaited)) {
|
|
1015
1015
|
pluginConfig = awaited[0];
|
|
1016
1016
|
pluginOptions = awaited?.length === 2 ? awaited[1] : void 0;
|
|
1017
1017
|
} else {
|
|
@@ -1027,17 +1027,17 @@ ${formatTypes(generatedTypes)}
|
|
|
1027
1027
|
}
|
|
1028
1028
|
} else if (isFunction.isFunction(pluginConfig)) {
|
|
1029
1029
|
plugin = await Promise.resolve(pluginConfig(pluginOptions));
|
|
1030
|
-
} else if (
|
|
1030
|
+
} else if (chunkLQEGZT5U_cjs.isPlugin(pluginConfig)) {
|
|
1031
1031
|
plugin = pluginConfig;
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
1034
|
if (!plugin) {
|
|
1035
1035
|
throw new Error(`The plugin configuration ${JSON.stringify(awaited)} is invalid. This configuration must point to a valid Powerlines plugin module.`);
|
|
1036
1036
|
}
|
|
1037
|
-
if (!
|
|
1037
|
+
if (!chunkLQEGZT5U_cjs.isPlugin(plugin)) {
|
|
1038
1038
|
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.`);
|
|
1039
1039
|
}
|
|
1040
|
-
if (
|
|
1040
|
+
if (chunkLQEGZT5U_cjs.checkDedupe(plugin, this.context.plugins)) {
|
|
1041
1041
|
this.context.log(types.LogLevelLabel.TRACE, `Duplicate ${chalk2__default.default.bold.cyanBright(plugin.name)} plugin dependency detected - Skipping initialization.`);
|
|
1042
1042
|
return null;
|
|
1043
1043
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CACHE_HASH_LENGTH, PROJECT_ROOT_HASH_LENGTH, getPrefixedProjectRootHash
|
|
2
|
-
import { loadWorkspaceConfig, loadUserConfigFile } from './chunk-
|
|
1
|
+
import { CACHE_HASH_LENGTH, PROJECT_ROOT_HASH_LENGTH, getPrefixedProjectRootHash } from './chunk-YH5GOJS3.js';
|
|
2
|
+
import { loadWorkspaceConfig, loadUserConfigFile } from './chunk-PVCAB6BZ.js';
|
|
3
3
|
import { extendLog, createLog } from './chunk-ENRLU4UR.js';
|
|
4
4
|
import { resolveEntriesSync, getUniqueEntries } from './chunk-XZFEHPYE.js';
|
|
5
5
|
import { __name } from './chunk-SHUYVCID.js';
|
|
@@ -10,6 +10,7 @@ import { existsSync } from '@stryke/fs/exists';
|
|
|
10
10
|
import { relativeToWorkspaceRoot } from '@stryke/fs/get-workspace-root';
|
|
11
11
|
import { readJsonFile } from '@stryke/fs/json';
|
|
12
12
|
import { resolvePackage } from '@stryke/fs/resolve';
|
|
13
|
+
import { hashDirectory } from '@stryke/hash/hash-files';
|
|
13
14
|
import { murmurhash } from '@stryke/hash/murmurhash';
|
|
14
15
|
import { getUnique } from '@stryke/helpers/get-unique';
|
|
15
16
|
import { omit } from '@stryke/helpers/omit';
|
|
@@ -2330,6 +2331,26 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
2330
2331
|
*/
|
|
2331
2332
|
logFn;
|
|
2332
2333
|
/**
|
|
2334
|
+
* Generates a checksum representing the current context state
|
|
2335
|
+
*
|
|
2336
|
+
* @param root - The root directory of the project to generate the checksum for
|
|
2337
|
+
* @returns A promise that resolves to a string representing the checksum
|
|
2338
|
+
*/
|
|
2339
|
+
async generateChecksum(root = this.config.projectRoot) {
|
|
2340
|
+
this.#checksum = await hashDirectory(root, {
|
|
2341
|
+
ignore: [
|
|
2342
|
+
"node_modules",
|
|
2343
|
+
".git",
|
|
2344
|
+
".nx",
|
|
2345
|
+
".cache",
|
|
2346
|
+
".storm",
|
|
2347
|
+
"tmp",
|
|
2348
|
+
"dist"
|
|
2349
|
+
]
|
|
2350
|
+
});
|
|
2351
|
+
return this.#checksum;
|
|
2352
|
+
}
|
|
2353
|
+
/**
|
|
2333
2354
|
* Initialize the context with the provided configuration options
|
|
2334
2355
|
*
|
|
2335
2356
|
* @param config - The partial user configuration to use for initialization.
|
|
@@ -2361,7 +2382,7 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
2361
2382
|
if (existsSync(packageJsonPath)) {
|
|
2362
2383
|
this.packageJson = await readJsonFile(packageJsonPath);
|
|
2363
2384
|
}
|
|
2364
|
-
this.#checksum = await
|
|
2385
|
+
this.#checksum = await this.generateChecksum(cacheKey.projectRoot);
|
|
2365
2386
|
this.resolver = createResolver({
|
|
2366
2387
|
workspaceRoot: this.workspaceConfig.workspaceRoot,
|
|
2367
2388
|
projectRoot: cacheKey.projectRoot,
|
|
@@ -2369,7 +2390,7 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
2369
2390
|
mode: cacheKey.mode,
|
|
2370
2391
|
skipCache: cacheKey.skipCache
|
|
2371
2392
|
});
|
|
2372
|
-
const userConfig = await loadUserConfigFile(cacheKey.projectRoot, this.resolver, cacheKey.command, cacheKey.mode, cacheKey.configFile, cacheKey.framework);
|
|
2393
|
+
const userConfig = await loadUserConfigFile(cacheKey.projectRoot, this.workspaceConfig.workspaceRoot, this.resolver, cacheKey.command, cacheKey.mode, cacheKey.configFile, cacheKey.framework);
|
|
2373
2394
|
this.mergeUserConfig(userConfig.config);
|
|
2374
2395
|
configCache.set(cacheKey, {
|
|
2375
2396
|
projectJson: this.projectJson,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
4
4
|
var getConfig = require('@storm-software/config-tools/get-config');
|
|
5
5
|
var exists = require('@stryke/fs/exists');
|
|
6
|
+
var append = require('@stryke/path/append');
|
|
6
7
|
var joinPaths = require('@stryke/path/join-paths');
|
|
7
8
|
var isFunction = require('@stryke/type-checks/is-function');
|
|
8
9
|
var isSetObject = require('@stryke/type-checks/is-set-object');
|
|
@@ -23,11 +24,17 @@ async function loadWorkspaceConfig(workspaceRoot, cwd) {
|
|
|
23
24
|
}));
|
|
24
25
|
}
|
|
25
26
|
chunkUSNT2KNT_cjs.__name(loadWorkspaceConfig, "loadWorkspaceConfig");
|
|
26
|
-
async function loadUserConfigFile(projectRoot, jiti, command, mode, configFile, framework = "powerlines") {
|
|
27
|
+
async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mode, configFile, framework = "powerlines") {
|
|
27
28
|
let resolvedUserConfig = {};
|
|
28
|
-
const resolvedUserConfigFile = configFile && exists.existsSync(configFile) ? configFile : configFile && exists.existsSync(joinPaths.joinPaths(projectRoot, configFile)) ? joinPaths.joinPaths(projectRoot, configFile) : exists.existsSync(joinPaths.joinPaths(projectRoot, `${framework}.config.ts`)) ? joinPaths.joinPaths(projectRoot, `${framework}.config.ts`) : exists.existsSync(joinPaths.joinPaths(projectRoot, `${framework}.config.js`)) ? joinPaths.joinPaths(projectRoot, `${framework}.config.js`) : exists.existsSync(joinPaths.joinPaths(projectRoot, `${framework}.config.mts`)) ? joinPaths.joinPaths(projectRoot, `${framework}.config.mts`) : exists.existsSync(joinPaths.joinPaths(projectRoot, `${framework}.config.mjs`)) ? joinPaths.joinPaths(projectRoot, `${framework}.config.mjs`) : void 0;
|
|
29
|
+
const resolvedUserConfigFile = configFile && exists.existsSync(configFile) ? configFile : configFile && exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), configFile)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), configFile) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.js`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.js`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`) : void 0;
|
|
29
30
|
if (resolvedUserConfigFile) {
|
|
30
|
-
|
|
31
|
+
let resolvedPath;
|
|
32
|
+
try {
|
|
33
|
+
resolvedPath = jiti.esmResolve(resolvedUserConfigFile);
|
|
34
|
+
} catch {
|
|
35
|
+
resolvedPath = resolvedUserConfigFile;
|
|
36
|
+
}
|
|
37
|
+
const resolved = await jiti.import(resolvedPath);
|
|
31
38
|
if (resolved) {
|
|
32
39
|
let config = {};
|
|
33
40
|
if (isFunction.isFunction(resolved)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createPluginContext } from './chunk-KFJCWNVG.js';
|
|
2
|
-
import { PowerlinesContext, isPlugin, isPluginHook, isHookExternal, addPluginHook, getHookHandler } from './chunk-
|
|
2
|
+
import { PowerlinesContext, isPlugin, isPluginHook, isHookExternal, addPluginHook, getHookHandler } from './chunk-63MH3ERQ.js';
|
|
3
3
|
import { __name } from './chunk-SHUYVCID.js';
|
|
4
4
|
import { resolvePackage } from '@stryke/fs/resolve';
|
|
5
5
|
import { isFunction } from '@stryke/type-checks/is-function';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkB3EE3VHZ_cjs = require('./chunk-B3EE3VHZ.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkLQEGZT5U_cjs = require('./chunk-LQEGZT5U.cjs');
|
|
5
5
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
6
6
|
var resolve = require('@stryke/fs/resolve');
|
|
7
7
|
var isFunction = require('@stryke/type-checks/is-function');
|
|
@@ -17,7 +17,7 @@ var PLUGIN_NON_HOOK_FIELDS = [
|
|
|
17
17
|
];
|
|
18
18
|
|
|
19
19
|
// src/lib/contexts/environment-context.ts
|
|
20
|
-
var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends
|
|
20
|
+
var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends chunkLQEGZT5U_cjs.PowerlinesContext {
|
|
21
21
|
static {
|
|
22
22
|
chunkUSNT2KNT_cjs.__name(this, "PowerlinesEnvironmentContext");
|
|
23
23
|
}
|
|
@@ -65,7 +65,7 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends c
|
|
|
65
65
|
if (!result || isObject.isObject(result) && Object.keys(result).length === 0) {
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
|
-
resolvedPlugin =
|
|
68
|
+
resolvedPlugin = chunkLQEGZT5U_cjs.isPlugin(result) ? result : plugin;
|
|
69
69
|
}
|
|
70
70
|
const context = chunkB3EE3VHZ_cjs.createPluginContext(resolvedPlugin, this);
|
|
71
71
|
this.plugins.push({
|
|
@@ -75,28 +75,28 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends c
|
|
|
75
75
|
this.#hooks = Object.keys(resolvedPlugin).filter((key) => !PLUGIN_NON_HOOK_FIELDS.includes(key)).reduce((ret, key) => {
|
|
76
76
|
const hook = key;
|
|
77
77
|
const pluginHook = resolvedPlugin[hook];
|
|
78
|
-
if (!
|
|
78
|
+
if (!chunkLQEGZT5U_cjs.isPluginHook(pluginHook)) {
|
|
79
79
|
return ret;
|
|
80
80
|
}
|
|
81
|
-
if (!
|
|
81
|
+
if (!chunkLQEGZT5U_cjs.isHookExternal(hook)) {
|
|
82
82
|
ret[hook] ??= {};
|
|
83
83
|
if (resolvedPlugin.enforce) {
|
|
84
84
|
ret[hook][`${resolvedPlugin.enforce}Enforced`] ??= [];
|
|
85
|
-
|
|
85
|
+
chunkLQEGZT5U_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][`${resolvedPlugin.enforce}Enforced`]);
|
|
86
86
|
return ret;
|
|
87
87
|
}
|
|
88
88
|
if (isFunction.isFunction(pluginHook) || !pluginHook.order) {
|
|
89
89
|
ret[hook].normal ??= [];
|
|
90
|
-
|
|
90
|
+
chunkLQEGZT5U_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook].normal);
|
|
91
91
|
return ret;
|
|
92
92
|
}
|
|
93
93
|
ret[hook][`${pluginHook.order}Ordered`] ??= [];
|
|
94
|
-
|
|
94
|
+
chunkLQEGZT5U_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][`${pluginHook.order}Ordered`]);
|
|
95
95
|
} else {
|
|
96
96
|
ret[hook] ??= [];
|
|
97
97
|
ret[hook].push({
|
|
98
98
|
plugin: resolvedPlugin,
|
|
99
|
-
hook:
|
|
99
|
+
hook: chunkLQEGZT5U_cjs.getHookHandler(pluginHook).bind(context)
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
return ret;
|
|
@@ -108,7 +108,7 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends c
|
|
|
108
108
|
selectHooks(hook, options) {
|
|
109
109
|
const handlers = [];
|
|
110
110
|
if (this.hooks[hook]) {
|
|
111
|
-
if (!
|
|
111
|
+
if (!chunkLQEGZT5U_cjs.isHookExternal(hook)) {
|
|
112
112
|
const hooks = this.hooks[hook];
|
|
113
113
|
if (options?.order) {
|
|
114
114
|
if (options?.order === "pre") {
|
|
@@ -2,9 +2,9 @@ import { writeFile } from './chunk-TANQDHYY.js';
|
|
|
2
2
|
import { getFileHeader } from './chunk-GANVMM73.js';
|
|
3
3
|
import { handleResolveId } from './chunk-G7S5PIAC.js';
|
|
4
4
|
import { getParsedTypeScriptConfig, getTsconfigFilePath, isIncludeMatchFound } from './chunk-YOENMDZY.js';
|
|
5
|
-
import { PowerlinesAPIContext } from './chunk-
|
|
5
|
+
import { PowerlinesAPIContext } from './chunk-OI7EHXNE.js';
|
|
6
6
|
import { callHook } from './chunk-KFJCWNVG.js';
|
|
7
|
-
import { __VFS_PATCH__, __VFS_REVERT__, isPluginConfig, isPlugin, isPluginConfigTuple, isPluginConfigObject, checkDedupe } from './chunk-
|
|
7
|
+
import { __VFS_PATCH__, __VFS_REVERT__, isPluginConfig, isPlugin, isPluginConfigTuple, isPluginConfigObject, checkDedupe } from './chunk-63MH3ERQ.js';
|
|
8
8
|
import { writeMetaFile } from './chunk-YH5GOJS3.js';
|
|
9
9
|
import { createLog } from './chunk-ENRLU4UR.js';
|
|
10
10
|
import { getString } from './chunk-M263EZ4F.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk7XHBIYIN_cjs = require('./chunk-7XHBIYIN.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunk7JAGT5GC_cjs = require('./chunk-7JAGT5GC.cjs');
|
|
5
5
|
var chunkJA4HSQRN_cjs = require('./chunk-JA4HSQRN.cjs');
|
|
6
6
|
var chunkISBHXSDH_cjs = require('./chunk-ISBHXSDH.cjs');
|
|
7
7
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
@@ -12,6 +12,7 @@ var exists = require('@stryke/fs/exists');
|
|
|
12
12
|
var getWorkspaceRoot = require('@stryke/fs/get-workspace-root');
|
|
13
13
|
var json = require('@stryke/fs/json');
|
|
14
14
|
var resolve = require('@stryke/fs/resolve');
|
|
15
|
+
var hashFiles = require('@stryke/hash/hash-files');
|
|
15
16
|
var murmurhash = require('@stryke/hash/murmurhash');
|
|
16
17
|
var getUnique = require('@stryke/helpers/get-unique');
|
|
17
18
|
var omit = require('@stryke/helpers/omit');
|
|
@@ -1999,7 +2000,7 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
1999
2000
|
* @returns A promise that resolves to the new context.
|
|
2000
2001
|
*/
|
|
2001
2002
|
static async from(workspaceRoot, config) {
|
|
2002
|
-
const context = new _PowerlinesContext(await
|
|
2003
|
+
const context = new _PowerlinesContext(await chunk7JAGT5GC_cjs.loadWorkspaceConfig(workspaceRoot, config.root));
|
|
2003
2004
|
await context.withUserConfig(config);
|
|
2004
2005
|
context.powerlinesPath = await resolve.resolvePackage("powerlines");
|
|
2005
2006
|
if (!context.powerlinesPath) {
|
|
@@ -2356,6 +2357,26 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
2356
2357
|
*/
|
|
2357
2358
|
logFn;
|
|
2358
2359
|
/**
|
|
2360
|
+
* Generates a checksum representing the current context state
|
|
2361
|
+
*
|
|
2362
|
+
* @param root - The root directory of the project to generate the checksum for
|
|
2363
|
+
* @returns A promise that resolves to a string representing the checksum
|
|
2364
|
+
*/
|
|
2365
|
+
async generateChecksum(root = this.config.projectRoot) {
|
|
2366
|
+
this.#checksum = await hashFiles.hashDirectory(root, {
|
|
2367
|
+
ignore: [
|
|
2368
|
+
"node_modules",
|
|
2369
|
+
".git",
|
|
2370
|
+
".nx",
|
|
2371
|
+
".cache",
|
|
2372
|
+
".storm",
|
|
2373
|
+
"tmp",
|
|
2374
|
+
"dist"
|
|
2375
|
+
]
|
|
2376
|
+
});
|
|
2377
|
+
return this.#checksum;
|
|
2378
|
+
}
|
|
2379
|
+
/**
|
|
2359
2380
|
* Initialize the context with the provided configuration options
|
|
2360
2381
|
*
|
|
2361
2382
|
* @param config - The partial user configuration to use for initialization.
|
|
@@ -2387,7 +2408,7 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
2387
2408
|
if (exists.existsSync(packageJsonPath)) {
|
|
2388
2409
|
this.packageJson = await json.readJsonFile(packageJsonPath);
|
|
2389
2410
|
}
|
|
2390
|
-
this.#checksum = await
|
|
2411
|
+
this.#checksum = await this.generateChecksum(cacheKey.projectRoot);
|
|
2391
2412
|
this.resolver = createResolver({
|
|
2392
2413
|
workspaceRoot: this.workspaceConfig.workspaceRoot,
|
|
2393
2414
|
projectRoot: cacheKey.projectRoot,
|
|
@@ -2395,7 +2416,7 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
2395
2416
|
mode: cacheKey.mode,
|
|
2396
2417
|
skipCache: cacheKey.skipCache
|
|
2397
2418
|
});
|
|
2398
|
-
const userConfig = await
|
|
2419
|
+
const userConfig = await chunk7JAGT5GC_cjs.loadUserConfigFile(cacheKey.projectRoot, this.workspaceConfig.workspaceRoot, this.resolver, cacheKey.command, cacheKey.mode, cacheKey.configFile, cacheKey.framework);
|
|
2399
2420
|
this.mergeUserConfig(userConfig.config);
|
|
2400
2421
|
configCache.set(cacheKey, {
|
|
2401
2422
|
projectJson: this.projectJson,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PowerlinesEnvironmentContext } from './chunk-
|
|
2
|
-
import { PowerlinesContext } from './chunk-
|
|
3
|
-
import { loadWorkspaceConfig } from './chunk-
|
|
1
|
+
import { PowerlinesEnvironmentContext } from './chunk-AHONHQGB.js';
|
|
2
|
+
import { PowerlinesContext } from './chunk-63MH3ERQ.js';
|
|
3
|
+
import { loadWorkspaceConfig } from './chunk-PVCAB6BZ.js';
|
|
4
4
|
import { __name } from './chunk-SHUYVCID.js';
|
|
5
5
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
6
6
|
import { toArray } from '@stryke/convert/to-array';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __name } from './chunk-SHUYVCID.js';
|
|
2
2
|
import { getWorkspaceConfig } from '@storm-software/config-tools/get-config';
|
|
3
3
|
import { existsSync } from '@stryke/fs/exists';
|
|
4
|
+
import { appendPath } from '@stryke/path/append';
|
|
4
5
|
import { joinPaths } from '@stryke/path/join-paths';
|
|
5
6
|
import { isFunction } from '@stryke/type-checks/is-function';
|
|
6
7
|
import { isSetObject } from '@stryke/type-checks/is-set-object';
|
|
@@ -17,11 +18,17 @@ async function loadWorkspaceConfig(workspaceRoot, cwd) {
|
|
|
17
18
|
}));
|
|
18
19
|
}
|
|
19
20
|
__name(loadWorkspaceConfig, "loadWorkspaceConfig");
|
|
20
|
-
async function loadUserConfigFile(projectRoot, jiti, command, mode, configFile, framework = "powerlines") {
|
|
21
|
+
async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mode, configFile, framework = "powerlines") {
|
|
21
22
|
let resolvedUserConfig = {};
|
|
22
|
-
const resolvedUserConfigFile = configFile && existsSync(configFile) ? configFile : configFile && existsSync(joinPaths(projectRoot, configFile)) ? joinPaths(projectRoot, configFile) : existsSync(joinPaths(projectRoot, `${framework}.config.ts`)) ? joinPaths(projectRoot, `${framework}.config.ts`) : existsSync(joinPaths(projectRoot, `${framework}.config.js`)) ? joinPaths(projectRoot, `${framework}.config.js`) : existsSync(joinPaths(projectRoot, `${framework}.config.mts`)) ? joinPaths(projectRoot, `${framework}.config.mts`) : existsSync(joinPaths(projectRoot, `${framework}.config.mjs`)) ? joinPaths(projectRoot, `${framework}.config.mjs`) : void 0;
|
|
23
|
+
const resolvedUserConfigFile = configFile && existsSync(configFile) ? configFile : configFile && existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), configFile)) ? joinPaths(appendPath(projectRoot, workspaceRoot), configFile) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.js`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.js`) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`) : void 0;
|
|
23
24
|
if (resolvedUserConfigFile) {
|
|
24
|
-
|
|
25
|
+
let resolvedPath;
|
|
26
|
+
try {
|
|
27
|
+
resolvedPath = jiti.esmResolve(resolvedUserConfigFile);
|
|
28
|
+
} catch {
|
|
29
|
+
resolvedPath = resolvedUserConfigFile;
|
|
30
|
+
}
|
|
31
|
+
const resolved = await jiti.import(resolvedPath);
|
|
25
32
|
if (resolved) {
|
|
26
33
|
let config = {};
|
|
27
34
|
if (isFunction(resolved)) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkB3DJ4CXY_cjs = require('./chunk-B3DJ4CXY.cjs');
|
|
4
|
+
var chunkLQEGZT5U_cjs = require('./chunk-LQEGZT5U.cjs');
|
|
5
|
+
var chunk7JAGT5GC_cjs = require('./chunk-7JAGT5GC.cjs');
|
|
6
6
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
7
7
|
var types = require('@storm-software/config-tools/types');
|
|
8
8
|
var toArray = require('@stryke/convert/to-array');
|
|
@@ -64,7 +64,7 @@ function createDefaultEnvironment(userConfig) {
|
|
|
64
64
|
chunkUSNT2KNT_cjs.__name(createDefaultEnvironment, "createDefaultEnvironment");
|
|
65
65
|
|
|
66
66
|
// src/lib/contexts/api-context.ts
|
|
67
|
-
var PowerlinesAPIContext = class _PowerlinesAPIContext extends
|
|
67
|
+
var PowerlinesAPIContext = class _PowerlinesAPIContext extends chunkLQEGZT5U_cjs.PowerlinesContext {
|
|
68
68
|
static {
|
|
69
69
|
chunkUSNT2KNT_cjs.__name(this, "PowerlinesAPIContext");
|
|
70
70
|
}
|
|
@@ -79,7 +79,7 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends chunkNVUXGMU5_cjs
|
|
|
79
79
|
* @returns A promise that resolves to the new context.
|
|
80
80
|
*/
|
|
81
81
|
static async from(workspaceRoot, config) {
|
|
82
|
-
const context = new _PowerlinesAPIContext(await
|
|
82
|
+
const context = new _PowerlinesAPIContext(await chunk7JAGT5GC_cjs.loadWorkspaceConfig(workspaceRoot, config.root));
|
|
83
83
|
await context.withUserConfig(config);
|
|
84
84
|
context.powerlinesPath = await resolve.resolvePackage("powerlines");
|
|
85
85
|
if (!context.powerlinesPath) {
|
|
@@ -127,7 +127,7 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends chunkNVUXGMU5_cjs
|
|
|
127
127
|
if (this.environments[environment.name]) {
|
|
128
128
|
context = this.environments[environment.name];
|
|
129
129
|
} else {
|
|
130
|
-
context = await
|
|
130
|
+
context = await chunkB3DJ4CXY_cjs.PowerlinesEnvironmentContext.fromConfig(this.workspaceConfig, this.config);
|
|
131
131
|
}
|
|
132
132
|
if (isSetObject.isSetObject(this.config.inlineConfig)) {
|
|
133
133
|
await context.withInlineConfig(this.config.inlineConfig);
|
|
@@ -1166,6 +1166,12 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1166
1166
|
* @returns A logger function
|
|
1167
1167
|
*/
|
|
1168
1168
|
extendLog: (name: string) => LogFn;
|
|
1169
|
+
/**
|
|
1170
|
+
* Generates a checksum representing the current context state
|
|
1171
|
+
*
|
|
1172
|
+
* @returns A promise that resolves to a string representing the checksum
|
|
1173
|
+
*/
|
|
1174
|
+
generateChecksum: () => Promise<string>;
|
|
1169
1175
|
}
|
|
1170
1176
|
type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
|
|
1171
1177
|
/**
|
|
@@ -1651,4 +1657,4 @@ type DeployInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineCon
|
|
|
1651
1657
|
command: "deploy";
|
|
1652
1658
|
};
|
|
1653
1659
|
|
|
1654
|
-
export { type
|
|
1660
|
+
export { type BuildInlineConfig as $, type APIContext as A, type InferHookReturnType as B, type Context as C, type UnpluginBuildVariant as D, type ESBuildResolvedBuildConfig as E, type InferResolvedConfig as F, type InferUnpluginVariant as G, type HooksList as H, type InitialUserConfig as I, type BuildPlugin as J, type InferUserConfig as K, type LogFn as L, type MakeDirectoryOptions as M, type SourceFile as N, type TransformResult as O, type PowerlinesCommand as P, type WorkerProcess as Q, type ResolvePathOptions as R, type SelectHooksOptions as S, type TsupBuildConfig as T, type UnbuildBuildConfig as U, type VirtualFileSystemInterface as V, type WriteFileData as W, type PrepareInlineConfig as X, type NewInlineConfig as Y, type CleanInlineConfig as Z, __VFS_PATCH__ as _, type VirtualFileMetadata as a, type LintInlineConfig as a0, type DocsInlineConfig as a1, type DeployInlineConfig as a2, type ResolveFSOptions as b, type WriteFileOptions as c, __VFS_REVERT__ as d, type WorkspaceConfig as e, type ParsedUserConfig as f, type ResolvedEntryTypeDefinition as g, type RolldownResolvedBuildConfig as h, type RollupResolvedBuildConfig as i, type TsupResolvedBuildConfig as j, type UnbuildResolvedBuildConfig as k, type ViteResolvedBuildConfig as l, type ResolvedConfig as m, type EnvironmentContext as n, type Plugin as o, type PluginContext as p, type EnvironmentResolvedConfig as q, type EnvironmentContextPlugin as r, type HookKeys as s, type InferHookHandler as t, type MetaInfo as u, type Resolver as v, type VirtualFile as w, type PowerlinesWriteFileOptions as x, type InitContextOptions as y, type InferHookParameters as z };
|
|
@@ -1166,6 +1166,12 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1166
1166
|
* @returns A logger function
|
|
1167
1167
|
*/
|
|
1168
1168
|
extendLog: (name: string) => LogFn;
|
|
1169
|
+
/**
|
|
1170
|
+
* Generates a checksum representing the current context state
|
|
1171
|
+
*
|
|
1172
|
+
* @returns A promise that resolves to a string representing the checksum
|
|
1173
|
+
*/
|
|
1174
|
+
generateChecksum: () => Promise<string>;
|
|
1169
1175
|
}
|
|
1170
1176
|
type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
|
|
1171
1177
|
/**
|
|
@@ -1651,4 +1657,4 @@ type DeployInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineCon
|
|
|
1651
1657
|
command: "deploy";
|
|
1652
1658
|
};
|
|
1653
1659
|
|
|
1654
|
-
export { type
|
|
1660
|
+
export { type BuildInlineConfig as $, type APIContext as A, type InferHookReturnType as B, type Context as C, type UnpluginBuildVariant as D, type ESBuildResolvedBuildConfig as E, type InferResolvedConfig as F, type InferUnpluginVariant as G, type HooksList as H, type InitialUserConfig as I, type BuildPlugin as J, type InferUserConfig as K, type LogFn as L, type MakeDirectoryOptions as M, type SourceFile as N, type TransformResult as O, type PowerlinesCommand as P, type WorkerProcess as Q, type ResolvePathOptions as R, type SelectHooksOptions as S, type TsupBuildConfig as T, type UnbuildBuildConfig as U, type VirtualFileSystemInterface as V, type WriteFileData as W, type PrepareInlineConfig as X, type NewInlineConfig as Y, type CleanInlineConfig as Z, __VFS_PATCH__ as _, type VirtualFileMetadata as a, type LintInlineConfig as a0, type DocsInlineConfig as a1, type DeployInlineConfig as a2, type ResolveFSOptions as b, type WriteFileOptions as c, __VFS_REVERT__ as d, type WorkspaceConfig as e, type ParsedUserConfig as f, type ResolvedEntryTypeDefinition as g, type RolldownResolvedBuildConfig as h, type RollupResolvedBuildConfig as i, type TsupResolvedBuildConfig as j, type UnbuildResolvedBuildConfig as k, type ViteResolvedBuildConfig as l, type ResolvedConfig as m, type EnvironmentContext as n, type Plugin as o, type PluginContext as p, type EnvironmentResolvedConfig as q, type EnvironmentContextPlugin as r, type HookKeys as s, type InferHookHandler as t, type MetaInfo as u, type Resolver as v, type VirtualFile as w, type PowerlinesWriteFileOptions as x, type InitContextOptions as y, type InferHookParameters as z };
|
package/dist/lib/config-file.cjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk7JAGT5GC_cjs = require('./chunk-7JAGT5GC.cjs');
|
|
4
4
|
require('./chunk-USNT2KNT.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "loadUserConfigFile", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunk7JAGT5GC_cjs.loadUserConfigFile; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "loadWorkspaceConfig", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk7JAGT5GC_cjs.loadWorkspaceConfig; }
|
|
15
15
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Jiti } from 'jiti';
|
|
2
|
-
import { C as Context, e as WorkspaceConfig, P as PowerlinesCommand, f as ParsedUserConfig } from './config-
|
|
2
|
+
import { C as Context, e as WorkspaceConfig, P as PowerlinesCommand, f as ParsedUserConfig } from './config-BnJpgcGr.cjs';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
5
5
|
import '@storm-software/config/types';
|
|
@@ -43,6 +43,7 @@ declare function loadWorkspaceConfig(workspaceRoot: string, cwd: string): Promis
|
|
|
43
43
|
* Loads the user configuration file for the project.
|
|
44
44
|
*
|
|
45
45
|
* @param projectRoot - The root directory of the project.
|
|
46
|
+
* @param workspaceRoot - The root directory of the workspace.
|
|
46
47
|
* @param jiti - An instance of Jiti to resolve modules from
|
|
47
48
|
* @param command - The {@link PowerlinesCommand} string associated with the current running process
|
|
48
49
|
* @param mode - The mode in which the project is running (default is "production").
|
|
@@ -50,7 +51,7 @@ declare function loadWorkspaceConfig(workspaceRoot: string, cwd: string): Promis
|
|
|
50
51
|
* @param framework - The framework name to use for default configuration file names.
|
|
51
52
|
* @returns A promise that resolves to the resolved user configuration.
|
|
52
53
|
*/
|
|
53
|
-
declare function loadUserConfigFile(projectRoot: string, jiti: Jiti, command?: PowerlinesCommand, mode?: string, configFile?: string, framework?: string): Promise<ParsedUserConfig>;
|
|
54
|
+
declare function loadUserConfigFile(projectRoot: string, workspaceRoot: string, jiti: Jiti, command?: PowerlinesCommand, mode?: string, configFile?: string, framework?: string): Promise<ParsedUserConfig>;
|
|
54
55
|
declare type __ΩPartiallyResolvedContext = any[];
|
|
55
56
|
|
|
56
57
|
export { type PartiallyResolvedContext, type __ΩPartiallyResolvedContext, loadUserConfigFile, loadWorkspaceConfig };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Jiti } from 'jiti';
|
|
2
|
-
import { C as Context, e as WorkspaceConfig, P as PowerlinesCommand, f as ParsedUserConfig } from './config-
|
|
2
|
+
import { C as Context, e as WorkspaceConfig, P as PowerlinesCommand, f as ParsedUserConfig } from './config-7Q2dBjJE.js';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
5
5
|
import '@storm-software/config/types';
|
|
@@ -43,6 +43,7 @@ declare function loadWorkspaceConfig(workspaceRoot: string, cwd: string): Promis
|
|
|
43
43
|
* Loads the user configuration file for the project.
|
|
44
44
|
*
|
|
45
45
|
* @param projectRoot - The root directory of the project.
|
|
46
|
+
* @param workspaceRoot - The root directory of the workspace.
|
|
46
47
|
* @param jiti - An instance of Jiti to resolve modules from
|
|
47
48
|
* @param command - The {@link PowerlinesCommand} string associated with the current running process
|
|
48
49
|
* @param mode - The mode in which the project is running (default is "production").
|
|
@@ -50,7 +51,7 @@ declare function loadWorkspaceConfig(workspaceRoot: string, cwd: string): Promis
|
|
|
50
51
|
* @param framework - The framework name to use for default configuration file names.
|
|
51
52
|
* @returns A promise that resolves to the resolved user configuration.
|
|
52
53
|
*/
|
|
53
|
-
declare function loadUserConfigFile(projectRoot: string, jiti: Jiti, command?: PowerlinesCommand, mode?: string, configFile?: string, framework?: string): Promise<ParsedUserConfig>;
|
|
54
|
+
declare function loadUserConfigFile(projectRoot: string, workspaceRoot: string, jiti: Jiti, command?: PowerlinesCommand, mode?: string, configFile?: string, framework?: string): Promise<ParsedUserConfig>;
|
|
54
55
|
declare type __ΩPartiallyResolvedContext = any[];
|
|
55
56
|
|
|
56
57
|
export { type PartiallyResolvedContext, type __ΩPartiallyResolvedContext, loadUserConfigFile, loadWorkspaceConfig };
|
package/dist/lib/config-file.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { loadUserConfigFile, loadWorkspaceConfig } from './chunk-
|
|
1
|
+
export { loadUserConfigFile, loadWorkspaceConfig } from './chunk-PVCAB6BZ.js';
|
|
2
2
|
import './chunk-SHUYVCID.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkSMZ672RP_cjs = require('../chunk-SMZ672RP.cjs');
|
|
4
|
+
require('../chunk-B3DJ4CXY.cjs');
|
|
5
5
|
require('../chunk-B3EE3VHZ.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-LQEGZT5U.cjs');
|
|
7
7
|
require('../chunk-7XHBIYIN.cjs');
|
|
8
|
-
require('../chunk-
|
|
8
|
+
require('../chunk-7JAGT5GC.cjs');
|
|
9
9
|
require('../chunk-JA4HSQRN.cjs');
|
|
10
10
|
require('../chunk-ISBHXSDH.cjs');
|
|
11
11
|
require('../chunk-USNT2KNT.cjs');
|
|
@@ -14,5 +14,5 @@ require('../chunk-USNT2KNT.cjs');
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, "PowerlinesAPIContext", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkSMZ672RP_cjs.PowerlinesAPIContext; }
|
|
18
18
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as ResolvedConfig, A as APIContext, I as InitialUserConfig, n as EnvironmentContext, L as LogFn, o as Plugin, p as PluginContext, e as WorkspaceConfig, q as EnvironmentResolvedConfig } from '../config-
|
|
1
|
+
import { m as ResolvedConfig, A as APIContext, I as InitialUserConfig, n as EnvironmentContext, L as LogFn, o as Plugin, p as PluginContext, e as WorkspaceConfig, q as EnvironmentResolvedConfig } from '../config-BnJpgcGr.cjs';
|
|
2
2
|
import { PowerlinesContext } from './context.cjs';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
@@ -28,8 +28,8 @@ import '@stryke/types/array';
|
|
|
28
28
|
import '../tsconfig-Bz-CiFqD.cjs';
|
|
29
29
|
import '@stryke/types/tsconfig';
|
|
30
30
|
import 'typescript';
|
|
31
|
-
import '../internal-
|
|
32
|
-
import '../api-
|
|
31
|
+
import '../internal-BeR8fOB1.cjs';
|
|
32
|
+
import '../api-Cm51oVbC.cjs';
|
|
33
33
|
|
|
34
34
|
declare class PowerlinesAPIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends PowerlinesContext<TResolvedConfig> implements APIContext<TResolvedConfig> {
|
|
35
35
|
#private;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as ResolvedConfig, A as APIContext, I as InitialUserConfig, n as EnvironmentContext, L as LogFn, o as Plugin, p as PluginContext, e as WorkspaceConfig, q as EnvironmentResolvedConfig } from '../config-
|
|
1
|
+
import { m as ResolvedConfig, A as APIContext, I as InitialUserConfig, n as EnvironmentContext, L as LogFn, o as Plugin, p as PluginContext, e as WorkspaceConfig, q as EnvironmentResolvedConfig } from '../config-7Q2dBjJE.js';
|
|
2
2
|
import { PowerlinesContext } from './context.js';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
@@ -28,8 +28,8 @@ import '@stryke/types/array';
|
|
|
28
28
|
import '../tsconfig-Bz-CiFqD.js';
|
|
29
29
|
import '@stryke/types/tsconfig';
|
|
30
30
|
import 'typescript';
|
|
31
|
-
import '../internal-
|
|
32
|
-
import '../api-
|
|
31
|
+
import '../internal-BEygquYh.js';
|
|
32
|
+
import '../api-mja4jirh.js';
|
|
33
33
|
|
|
34
34
|
declare class PowerlinesAPIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends PowerlinesContext<TResolvedConfig> implements APIContext<TResolvedConfig> {
|
|
35
35
|
#private;
|