powerlines 0.37.31 → 0.37.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.cjs +2 -2
- package/dist/api.js +1 -1
- package/dist/astro.cjs +5 -5
- package/dist/astro.js +4 -4
- package/dist/{chunk-DQFKSPI5.cjs → chunk-2SKHJHPI.cjs} +5 -5
- package/dist/chunk-4G7C2OQK.cjs +12 -0
- package/dist/{chunk-MS7QGIJM.cjs → chunk-5HIL7EVA.cjs} +6 -6
- package/dist/chunk-5YUJKRDM.cjs +12 -0
- package/dist/{chunk-Z5JSF22L.js → chunk-C2LWIHQL.js} +3 -3
- package/dist/{chunk-3XBU4DDR.js → chunk-EED2UPZI.js} +3 -3
- package/dist/{chunk-BGBDDKML.js → chunk-FJHS7DAU.js} +3 -3
- package/dist/{chunk-W6O3CPYC.js → chunk-LML34F4E.js} +5 -5
- package/dist/{chunk-6WYVGWDN.cjs → chunk-M5ZTDIE2.cjs} +7 -7
- package/dist/{chunk-K2PLWWNA.js → chunk-NXF47SUO.js} +4 -4
- package/dist/{chunk-5WZHLXMC.js → chunk-OBW6UYPF.js} +3 -3
- package/dist/{chunk-ST65VKTR.cjs → chunk-TPEJ4HAR.cjs} +167 -210
- package/dist/{chunk-SE3RCXWI.cjs → chunk-VBGDN56Q.cjs} +3 -3
- package/dist/{chunk-4VHA6QFN.js → chunk-YDYRZGLC.js} +154 -199
- package/dist/esbuild.cjs +7 -7
- package/dist/esbuild.js +4 -4
- package/dist/farm.cjs +3 -3
- package/dist/farm.js +2 -2
- package/dist/index.cjs +10 -10
- package/dist/index.js +2 -2
- package/dist/lib/build/esbuild.cjs +5 -5
- package/dist/lib/build/esbuild.js +2 -2
- package/dist/lib/build/index.cjs +30 -30
- package/dist/lib/build/index.d.cts +1 -1
- package/dist/lib/build/index.d.ts +1 -1
- package/dist/lib/build/index.js +10 -10
- package/dist/lib/build/rolldown.cjs +3 -3
- package/dist/lib/build/rolldown.js +2 -2
- package/dist/lib/build/rollup.cjs +3 -3
- package/dist/lib/build/rollup.js +1 -1
- package/dist/lib/build/rspack.cjs +2 -2
- package/dist/lib/build/rspack.js +1 -1
- package/dist/lib/build/tsdown.cjs +5 -5
- package/dist/lib/build/tsdown.js +1 -1
- package/dist/lib/build/tsup.cjs +6 -6
- package/dist/lib/build/tsup.js +3 -3
- package/dist/lib/build/unbuild.cjs +5 -5
- package/dist/lib/build/unbuild.d.cts +1 -1
- package/dist/lib/build/unbuild.d.ts +1 -1
- package/dist/lib/build/unbuild.js +2 -2
- package/dist/lib/build/vite.cjs +5 -5
- package/dist/lib/build/vite.js +3 -3
- package/dist/lib/build/webpack.cjs +2 -2
- package/dist/lib/build/webpack.js +1 -1
- package/dist/lib/{chunk-NPRQVHXP.cjs → chunk-2J3BIEL5.cjs} +7 -83
- package/dist/lib/chunk-2J3BIEL5.cjs.map +1 -0
- package/dist/lib/{chunk-NMZHPWB6.js → chunk-2JWZTFXS.js} +4 -4
- package/dist/lib/{chunk-NMZHPWB6.js.map → chunk-2JWZTFXS.js.map} +1 -1
- package/dist/lib/{chunk-TFOAWLRF.js → chunk-37ISVVSL.js} +4 -4
- package/dist/lib/chunk-37ISVVSL.js.map +1 -0
- package/dist/lib/{chunk-JJDYYD64.cjs → chunk-47ELJR3Z.cjs} +7 -7
- package/dist/lib/chunk-47ELJR3Z.cjs.map +1 -0
- package/dist/lib/{chunk-G6LP5AUT.cjs → chunk-5OPL6S37.cjs} +13 -9
- package/dist/lib/chunk-5OPL6S37.cjs.map +1 -0
- package/dist/lib/{chunk-7ZLMFCZF.js → chunk-7D4ANVQ3.js} +3 -3
- package/dist/lib/{chunk-7ZLMFCZF.js.map → chunk-7D4ANVQ3.js.map} +1 -1
- package/dist/lib/{chunk-NHY25RLN.js → chunk-C2P7PUMG.js} +3 -3
- package/dist/lib/chunk-C2P7PUMG.js.map +1 -0
- package/dist/lib/{chunk-37QKQRHL.js → chunk-DNSJN2LL.js} +4 -4
- package/dist/lib/chunk-DNSJN2LL.js.map +1 -0
- package/dist/lib/{chunk-FSQATFTG.js → chunk-DW3OHFKB.js} +4 -4
- package/dist/lib/chunk-DW3OHFKB.js.map +1 -0
- package/dist/lib/{chunk-ZFOPHCGK.cjs → chunk-FC4WYLMZ.cjs} +3 -3
- package/dist/lib/chunk-FC4WYLMZ.cjs.map +1 -0
- package/dist/lib/{chunk-FR7QMZ4X.cjs → chunk-FSSYT5DT.cjs} +5 -5
- package/dist/lib/chunk-FSSYT5DT.cjs.map +1 -0
- package/dist/lib/{chunk-NMCDCHEL.cjs → chunk-HFM5IVGD.cjs} +39 -33
- package/dist/lib/chunk-HFM5IVGD.cjs.map +1 -0
- package/dist/lib/{chunk-GF5FQKAI.js → chunk-HX5UF7YV.js} +36 -30
- package/dist/lib/chunk-HX5UF7YV.js.map +1 -0
- package/dist/lib/{chunk-3SANFGBI.js → chunk-I66U3XHM.js} +7 -7
- package/dist/lib/chunk-I66U3XHM.js.map +1 -0
- package/dist/lib/{chunk-6MX6ZNGS.cjs → chunk-JF4ZEC67.cjs} +19 -19
- package/dist/lib/{chunk-6MX6ZNGS.cjs.map → chunk-JF4ZEC67.cjs.map} +1 -1
- package/dist/lib/{chunk-2IXO6SBG.js → chunk-KJCQ3FNZ.js} +3 -3
- package/dist/lib/chunk-KJCQ3FNZ.js.map +1 -0
- package/dist/lib/{chunk-FYRHGPDZ.js → chunk-L273AS74.js} +12 -8
- package/dist/lib/chunk-L273AS74.js.map +1 -0
- package/dist/lib/{chunk-TAHP4BEC.cjs → chunk-L3OTKQT7.cjs} +5 -5
- package/dist/lib/chunk-L3OTKQT7.cjs.map +1 -0
- package/dist/lib/{chunk-S6HKYEP4.js → chunk-LLWUZWXK.js} +51 -48
- package/dist/lib/chunk-LLWUZWXK.js.map +1 -0
- package/dist/lib/{chunk-YZ2NKI4K.cjs → chunk-M6FABDGH.cjs} +3 -3
- package/dist/lib/chunk-M6FABDGH.cjs.map +1 -0
- package/dist/lib/{chunk-KLU5DWCZ.js → chunk-N37JIOZ4.js} +28 -8
- package/dist/lib/chunk-N37JIOZ4.js.map +1 -0
- package/dist/lib/{chunk-TBRFVVYJ.cjs → chunk-O3ZBMF6Z.cjs} +6 -6
- package/dist/lib/{chunk-TBRFVVYJ.cjs.map → chunk-O3ZBMF6Z.cjs.map} +1 -1
- package/dist/lib/{chunk-PD6TYAFZ.cjs → chunk-PNVVTXLD.cjs} +4 -4
- package/dist/lib/{chunk-PD6TYAFZ.cjs.map → chunk-PNVVTXLD.cjs.map} +1 -1
- package/dist/lib/{chunk-QNGZB26V.cjs → chunk-QTOV3SHA.cjs} +5 -5
- package/dist/lib/chunk-QTOV3SHA.cjs.map +1 -0
- package/dist/lib/{chunk-CEHUDHRY.js → chunk-SLC5EL2C.js} +4 -4
- package/dist/lib/chunk-SLC5EL2C.js.map +1 -0
- package/dist/lib/{chunk-TAXCKJWL.cjs → chunk-U7XNN2N5.cjs} +75 -72
- package/dist/lib/chunk-U7XNN2N5.cjs.map +1 -0
- package/dist/lib/{chunk-O7HKPUBS.cjs → chunk-UOVILPP5.cjs} +5 -5
- package/dist/lib/chunk-UOVILPP5.cjs.map +1 -0
- package/dist/lib/{chunk-TQ45IJLR.cjs → chunk-VKFPSCIU.cjs} +3 -3
- package/dist/lib/chunk-VKFPSCIU.cjs.map +1 -0
- package/dist/lib/{chunk-26JHNKA7.js → chunk-VOTCZHM5.js} +3 -3
- package/dist/lib/chunk-VOTCZHM5.js.map +1 -0
- package/dist/lib/{chunk-NMHBDJX7.js → chunk-WQRK3BBU.js} +7 -83
- package/dist/lib/chunk-WQRK3BBU.js.map +1 -0
- package/dist/lib/{chunk-EEF6LJVD.js → chunk-X6CZ2G2G.js} +3 -3
- package/dist/lib/{chunk-EEF6LJVD.js.map → chunk-X6CZ2G2G.js.map} +1 -1
- package/dist/lib/{chunk-FQZQA4EJ.cjs → chunk-Y36HVRRL.cjs} +29 -7
- package/dist/lib/chunk-Y36HVRRL.cjs.map +1 -0
- package/dist/lib/{chunk-HUWGH27W.cjs → chunk-YZNE7GOJ.cjs} +4 -4
- package/dist/lib/{chunk-HUWGH27W.cjs.map → chunk-YZNE7GOJ.cjs.map} +1 -1
- package/dist/lib/{chunk-3DYPJHNF.js → chunk-ZK2C72JS.js} +3 -3
- package/dist/lib/{chunk-3DYPJHNF.js.map → chunk-ZK2C72JS.js.map} +1 -1
- package/dist/lib/contexts/api-context.cjs +6 -6
- package/dist/lib/contexts/api-context.d.cts +1 -1
- package/dist/lib/contexts/api-context.d.ts +1 -1
- package/dist/lib/contexts/api-context.js +5 -5
- package/dist/lib/contexts/context.cjs +4 -4
- package/dist/lib/contexts/context.d.cts +5 -5
- package/dist/lib/contexts/context.d.ts +5 -5
- package/dist/lib/contexts/context.js +3 -3
- package/dist/lib/contexts/environment-context.cjs +5 -5
- package/dist/lib/contexts/environment-context.d.cts +1 -1
- package/dist/lib/contexts/environment-context.d.ts +1 -1
- package/dist/lib/contexts/environment-context.js +4 -4
- package/dist/lib/contexts/index.cjs +8 -8
- package/dist/lib/contexts/index.d.cts +1 -1
- package/dist/lib/contexts/index.d.ts +1 -1
- package/dist/lib/contexts/index.js +5 -5
- package/dist/lib/contexts/plugin-context.d.cts +1 -1
- package/dist/lib/contexts/plugin-context.d.ts +1 -1
- package/dist/lib/entry.cjs +17 -9
- package/dist/lib/entry.d.cts +16 -2
- package/dist/lib/entry.d.ts +16 -2
- package/dist/lib/entry.js +1 -1
- package/dist/lib/fs/index.cjs +2 -2
- package/dist/lib/fs/index.js +1 -1
- package/dist/lib/fs/vfs.cjs +2 -2
- package/dist/lib/fs/vfs.js +1 -1
- package/dist/lib/index.cjs +32 -24
- package/dist/lib/index.d.cts +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/index.js +9 -9
- package/dist/lib/{internal-DyXNBori.d.ts → internal-CFBs3Fok.d.cts} +1 -5
- package/dist/lib/{internal-Dt8PM9M2.d.cts → internal-Dlj-vo3a.d.ts} +1 -5
- package/dist/lib/unplugin/factory.cjs +7 -7
- package/dist/lib/unplugin/factory.js +6 -6
- package/dist/lib/unplugin/index.cjs +7 -7
- package/dist/lib/unplugin/index.js +6 -6
- package/dist/lib/utilities/bundle.cjs +4 -4
- package/dist/lib/utilities/bundle.js +3 -3
- package/dist/lib/utilities/index.cjs +6 -6
- package/dist/lib/utilities/index.js +4 -4
- package/dist/lib/utilities/resolve.cjs +5 -5
- package/dist/lib/utilities/resolve.js +4 -4
- package/dist/next.cjs +4 -4
- package/dist/next.js +3 -3
- package/dist/nuxt.cjs +9 -14
- package/dist/nuxt.js +5 -10
- package/dist/rolldown.cjs +6 -6
- package/dist/rolldown.js +3 -3
- package/dist/rollup.cjs +3 -3
- package/dist/rollup.js +2 -2
- package/dist/rspack.cjs +3 -3
- package/dist/rspack.js +2 -2
- package/dist/tsdown.cjs +4 -4
- package/dist/tsdown.js +3 -3
- package/dist/tsup.cjs +5 -5
- package/dist/tsup.js +4 -4
- package/dist/types/internal.d.cts +1 -5
- package/dist/types/internal.d.ts +1 -5
- package/dist/unloader.cjs +3 -3
- package/dist/unloader.js +2 -2
- package/dist/unplugin.cjs +8 -8
- package/dist/unplugin.js +4 -4
- package/dist/vite.cjs +7 -7
- package/dist/vite.js +4 -4
- package/dist/webpack.cjs +6 -6
- package/dist/webpack.js +3 -3
- package/package.json +2 -2
- package/dist/chunk-KQNFLNDO.cjs +0 -12
- package/dist/chunk-ZPGYJJAN.cjs +0 -12
- package/dist/lib/chunk-26JHNKA7.js.map +0 -1
- package/dist/lib/chunk-2IXO6SBG.js.map +0 -1
- package/dist/lib/chunk-37QKQRHL.js.map +0 -1
- package/dist/lib/chunk-3SANFGBI.js.map +0 -1
- package/dist/lib/chunk-CEHUDHRY.js.map +0 -1
- package/dist/lib/chunk-FQZQA4EJ.cjs.map +0 -1
- package/dist/lib/chunk-FR7QMZ4X.cjs.map +0 -1
- package/dist/lib/chunk-FSQATFTG.js.map +0 -1
- package/dist/lib/chunk-FYRHGPDZ.js.map +0 -1
- package/dist/lib/chunk-G6LP5AUT.cjs.map +0 -1
- package/dist/lib/chunk-GF5FQKAI.js.map +0 -1
- package/dist/lib/chunk-JJDYYD64.cjs.map +0 -1
- package/dist/lib/chunk-KLU5DWCZ.js.map +0 -1
- package/dist/lib/chunk-NHY25RLN.js.map +0 -1
- package/dist/lib/chunk-NMCDCHEL.cjs.map +0 -1
- package/dist/lib/chunk-NMHBDJX7.js.map +0 -1
- package/dist/lib/chunk-NPRQVHXP.cjs.map +0 -1
- package/dist/lib/chunk-O7HKPUBS.cjs.map +0 -1
- package/dist/lib/chunk-QNGZB26V.cjs.map +0 -1
- package/dist/lib/chunk-S6HKYEP4.js.map +0 -1
- package/dist/lib/chunk-TAHP4BEC.cjs.map +0 -1
- package/dist/lib/chunk-TAXCKJWL.cjs.map +0 -1
- package/dist/lib/chunk-TFOAWLRF.js.map +0 -1
- package/dist/lib/chunk-TQ45IJLR.cjs.map +0 -1
- package/dist/lib/chunk-YZ2NKI4K.cjs.map +0 -1
- package/dist/lib/chunk-ZFOPHCGK.cjs.map +0 -1
|
@@ -5,7 +5,6 @@ var chunkV5WOGN7O_cjs = require('./chunk-V5WOGN7O.cjs');
|
|
|
5
5
|
var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
|
|
6
6
|
var core = require('@babel/core');
|
|
7
7
|
var console = require('@storm-software/config-tools/logger/console');
|
|
8
|
-
var types = require('@storm-software/config-tools/types');
|
|
9
8
|
var toArray = require('@stryke/convert/to-array');
|
|
10
9
|
var helpers = require('@stryke/fs/helpers');
|
|
11
10
|
var install = require('@stryke/fs/install');
|
|
@@ -28,6 +27,7 @@ var chalk5 = require('chalk');
|
|
|
28
27
|
var Handlebars = require('handlebars');
|
|
29
28
|
var helperPluginUtils = require('@babel/helper-plugin-utils');
|
|
30
29
|
var t = require('@babel/types');
|
|
30
|
+
var types = require('@storm-software/config-tools/types');
|
|
31
31
|
var ts = require('typescript');
|
|
32
32
|
var defu7 = require('defu');
|
|
33
33
|
var tsMorph = require('ts-morph');
|
|
@@ -107,6 +107,11 @@ var ts__default = /*#__PURE__*/_interopDefault(ts);
|
|
|
107
107
|
var defu7__default = /*#__PURE__*/_interopDefault(defu7);
|
|
108
108
|
var $__namespace = /*#__PURE__*/_interopNamespace($);
|
|
109
109
|
|
|
110
|
+
// package.json
|
|
111
|
+
var name = "powerlines";
|
|
112
|
+
var version = "0.37.32";
|
|
113
|
+
var package_default = {
|
|
114
|
+
version};
|
|
110
115
|
function resolveModulePath(nodePath, state) {
|
|
111
116
|
if (!t__namespace.isStringLiteral(nodePath.node)) {
|
|
112
117
|
return;
|
|
@@ -146,8 +151,8 @@ function matchesPattern(state, calleePath, pattern) {
|
|
|
146
151
|
if (!t__namespace.isIdentifier(node) || pattern.includes(".")) {
|
|
147
152
|
return false;
|
|
148
153
|
}
|
|
149
|
-
const
|
|
150
|
-
return node.name ===
|
|
154
|
+
const name2 = pattern.split(".")[0];
|
|
155
|
+
return node.name === name2;
|
|
151
156
|
}
|
|
152
157
|
chunkPK6SKIKE_cjs.__name(matchesPattern, "matchesPattern");
|
|
153
158
|
var importVisitors = {
|
|
@@ -481,13 +486,13 @@ async function installDependencies(context) {
|
|
|
481
486
|
}
|
|
482
487
|
context.log(types.LogLevelLabel.DEBUG, `The following packages are required:
|
|
483
488
|
Dependencies:
|
|
484
|
-
${Object.entries(context.dependencies).map(([
|
|
489
|
+
${Object.entries(context.dependencies).map(([name2, version2]) => `- ${name2}@${String(version2)}`).join(" \n")}
|
|
485
490
|
|
|
486
491
|
DevDependencies:
|
|
487
|
-
${Object.entries(context.devDependencies).map(([
|
|
492
|
+
${Object.entries(context.devDependencies).map(([name2, version2]) => `- ${name2}@${String(version2)}`).join(" \n")}`);
|
|
488
493
|
await Promise.all([
|
|
489
|
-
Promise.all(Object.entries(context.dependencies).map(async ([
|
|
490
|
-
Promise.all(Object.entries(context.devDependencies).map(async ([
|
|
494
|
+
Promise.all(Object.entries(context.dependencies).map(async ([name2, version2]) => installPackage(context, `${_package.getPackageName(name2)}@${String(version2)}`, false))),
|
|
495
|
+
Promise.all(Object.entries(context.devDependencies).map(async ([name2, version2]) => installPackage(context, `${_package.getPackageName(name2)}@${String(version2)}`, true)))
|
|
491
496
|
]);
|
|
492
497
|
}
|
|
493
498
|
chunkPK6SKIKE_cjs.__name(installDependencies, "installDependencies");
|
|
@@ -706,9 +711,9 @@ var DEFAULT_ENVIRONMENT = "default";
|
|
|
706
711
|
var GLOBAL_ENVIRONMENT = "__global__";
|
|
707
712
|
|
|
708
713
|
// src/internal/helpers/environment.ts
|
|
709
|
-
function createEnvironment(
|
|
710
|
-
return defu7__default.default(userConfig.environments?.[
|
|
711
|
-
name,
|
|
714
|
+
function createEnvironment(name2, userConfig) {
|
|
715
|
+
return defu7__default.default(userConfig.environments?.[name2] ?? {}, {
|
|
716
|
+
name: name2,
|
|
712
717
|
title: userConfig.title || titleCase.titleCase(userConfig.name),
|
|
713
718
|
ssr: false,
|
|
714
719
|
mainFields: userConfig.build?.platform === "browser" ? [
|
|
@@ -936,19 +941,39 @@ function resolveEntry(context, typeDefinition) {
|
|
|
936
941
|
};
|
|
937
942
|
}
|
|
938
943
|
chunkPK6SKIKE_cjs.__name(resolveEntry, "resolveEntry");
|
|
944
|
+
function isTypeDefinition(entry) {
|
|
945
|
+
return !isString.isString(entry) && entry.file !== void 0;
|
|
946
|
+
}
|
|
947
|
+
chunkPK6SKIKE_cjs.__name(isTypeDefinition, "isTypeDefinition");
|
|
948
|
+
function isResolvedEntryTypeDefinition(entry) {
|
|
949
|
+
return isTypeDefinition(entry) && entry.input !== void 0 && entry.output !== void 0;
|
|
950
|
+
}
|
|
951
|
+
chunkPK6SKIKE_cjs.__name(isResolvedEntryTypeDefinition, "isResolvedEntryTypeDefinition");
|
|
939
952
|
function resolveEntriesSync(context, typeDefinitions) {
|
|
940
|
-
return typeDefinitions.map((entry) =>
|
|
941
|
-
|
|
942
|
-
|
|
953
|
+
return typeDefinitions.map((entry) => {
|
|
954
|
+
if (isResolvedEntryTypeDefinition(entry)) {
|
|
955
|
+
return {
|
|
956
|
+
...entry,
|
|
957
|
+
file: replacePathTokens(context, entry.file)
|
|
958
|
+
};
|
|
959
|
+
}
|
|
960
|
+
let typeDefinition;
|
|
961
|
+
if (isString.isString(entry)) {
|
|
962
|
+
typeDefinition = parseTypeDefinition.parseTypeDefinition(replacePathTokens(context, entry));
|
|
963
|
+
} else {
|
|
964
|
+
typeDefinition = entry;
|
|
965
|
+
typeDefinition.file = replacePathTokens(context, typeDefinition.file);
|
|
966
|
+
}
|
|
967
|
+
const filePath = append.appendPath(typeDefinition.file, context.config.projectRoot);
|
|
943
968
|
if (isFile.isFile(filePath)) {
|
|
944
969
|
return resolveEntry(context, {
|
|
945
970
|
file: replace.replacePath(filePath, context.config.projectRoot),
|
|
946
|
-
name:
|
|
971
|
+
name: typeDefinition.name
|
|
947
972
|
});
|
|
948
973
|
}
|
|
949
974
|
return listFiles.listFilesSync(filePath).map((file) => resolveEntry(context, {
|
|
950
975
|
file,
|
|
951
|
-
name:
|
|
976
|
+
name: typeDefinition.name
|
|
952
977
|
}));
|
|
953
978
|
}).flat().filter(Boolean);
|
|
954
979
|
}
|
|
@@ -1181,7 +1206,7 @@ FileMetadata._Properties = $__namespace.CompositeList(FileMetadata_KeyValuePair)
|
|
|
1181
1206
|
FileSystem._Ids = $__namespace.CompositeList(FileId);
|
|
1182
1207
|
FileSystem._Storage = $__namespace.CompositeList(FileStorage);
|
|
1183
1208
|
FileSystem._Metadata = $__namespace.CompositeList(FileMetadata);
|
|
1184
|
-
var createLog = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((
|
|
1209
|
+
var createLog = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((name2, options = {}) => {
|
|
1185
1210
|
const logLevel = options.logLevel === null ? types.LogLevelLabel.SILENT : options.logLevel || types.LogLevelLabel.INFO;
|
|
1186
1211
|
if (logLevel === types.LogLevelLabel.SILENT) {
|
|
1187
1212
|
return noop.noop;
|
|
@@ -1192,7 +1217,7 @@ var createLog = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((name, options = {}) =>
|
|
|
1192
1217
|
return (type, ...args) => logger.getLogFn(logger.getLogLevel(type), {
|
|
1193
1218
|
...options,
|
|
1194
1219
|
logLevel
|
|
1195
|
-
})(`${chalk5__default.default.bold.hex(colors.getColor("brand", options))(`${
|
|
1220
|
+
})(`${chalk5__default.default.bold.hex(colors.getColor("brand", options))(`${name2 ? kebabCase.kebabCase(name2) : ""}${options.name ? `${name2 ? chalk5__default.default.gray(" > ") : ""}${kebabCase.kebabCase(options.name)}` : ""}${chalk5__default.default.gray(" > ")}`)}${args.join(" ")} `.trim());
|
|
1196
1221
|
}, "createLog");
|
|
1197
1222
|
var BADGE_COLORS = [
|
|
1198
1223
|
"#00A0DD",
|
|
@@ -1218,8 +1243,8 @@ var BADGE_COLORS = [
|
|
|
1218
1243
|
"#34D399",
|
|
1219
1244
|
"#8B5CF6"
|
|
1220
1245
|
];
|
|
1221
|
-
var extendLog = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((logFn,
|
|
1222
|
-
return (type, ...args) => logFn(type, ` ${chalk5__default.default.inverse.hex(BADGE_COLORS[
|
|
1246
|
+
var extendLog = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((logFn, name2) => {
|
|
1247
|
+
return (type, ...args) => logFn(type, ` ${chalk5__default.default.inverse.hex(BADGE_COLORS[name2.split("").map((char) => char.charCodeAt(0)).reduce((ret, charCode) => ret + charCode, 0) % BADGE_COLORS.length] || BADGE_COLORS[0])(` ${titleCase.titleCase(name2)} `)} ${args.join(" ")} `);
|
|
1223
1248
|
}, "extendLog");
|
|
1224
1249
|
async function format(path, data) {
|
|
1225
1250
|
let code = data;
|
|
@@ -1878,12 +1903,12 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
1878
1903
|
}
|
|
1879
1904
|
let metadata;
|
|
1880
1905
|
if (fs._hasMetadata()) {
|
|
1881
|
-
metadata = fs.metadata.find((meta) => meta.id === (id?.id ?? file.path));
|
|
1906
|
+
metadata = fs.metadata.find((meta) => meta.id === result.#normalizeId(id?.id ?? file.path));
|
|
1882
1907
|
}
|
|
1883
1908
|
await result.write(file.path, file.code, {
|
|
1884
1909
|
meta: {
|
|
1885
|
-
id: id?.id
|
|
1886
|
-
type: metadata?.type,
|
|
1910
|
+
id: result.#normalizeId(id?.id ?? metadata?.id ?? file.path),
|
|
1911
|
+
type: metadata?.type || "normal",
|
|
1887
1912
|
properties: metadata?._hasProperties() ? metadata?.properties.values().reduce((ret, kvp) => {
|
|
1888
1913
|
ret[kvp.key] = kvp.value;
|
|
1889
1914
|
return ret;
|
|
@@ -1894,37 +1919,6 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
1894
1919
|
}
|
|
1895
1920
|
}));
|
|
1896
1921
|
}
|
|
1897
|
-
if (result.#metadata && Object.keys(result.#metadata).length > 0) {
|
|
1898
|
-
result.#log(types.LogLevelLabel.DEBUG, `Preparing to load ${Object.keys(result.#metadata).length} previously stored metadata records...`);
|
|
1899
|
-
const entry = Object.entries(result.#metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
|
|
1900
|
-
if (meta.properties) {
|
|
1901
|
-
const typeDefinition = {
|
|
1902
|
-
file: path
|
|
1903
|
-
};
|
|
1904
|
-
if (isSetString.isSetString(meta.properties.name)) {
|
|
1905
|
-
typeDefinition.name = meta.properties.name;
|
|
1906
|
-
}
|
|
1907
|
-
if (isSetString.isSetString(meta.properties["input.file"]) || isSetString.isSetString(meta.properties["input.name"])) {
|
|
1908
|
-
typeDefinition.input ??= {};
|
|
1909
|
-
if (isSetString.isSetString(meta.properties["input.file"])) {
|
|
1910
|
-
typeDefinition.input.file = meta.properties["input.file"];
|
|
1911
|
-
}
|
|
1912
|
-
if (isSetString.isSetString(meta.properties["input.name"])) {
|
|
1913
|
-
typeDefinition.input.name = meta.properties["input.name"];
|
|
1914
|
-
}
|
|
1915
|
-
}
|
|
1916
|
-
if (isSetString.isSetString(meta.properties.output)) {
|
|
1917
|
-
typeDefinition.output = meta.properties.output;
|
|
1918
|
-
}
|
|
1919
|
-
return typeDefinition;
|
|
1920
|
-
}
|
|
1921
|
-
return null;
|
|
1922
|
-
}).filter(Boolean);
|
|
1923
|
-
result.#log(types.LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
|
|
1924
|
-
context.entry = entry;
|
|
1925
|
-
} else {
|
|
1926
|
-
result.#log(types.LogLevelLabel.DEBUG, "No previously stored metadata records were found on the local system.");
|
|
1927
|
-
}
|
|
1928
1922
|
} else {
|
|
1929
1923
|
const message = new $__namespace.Message();
|
|
1930
1924
|
result = new _VirtualFileSystem(context, message.initRoot(FileSystem));
|
|
@@ -1955,11 +1949,11 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
1955
1949
|
}
|
|
1956
1950
|
let metadata;
|
|
1957
1951
|
if (fs._hasMetadata()) {
|
|
1958
|
-
metadata = fs.metadata.find((meta) => meta.id === (id?.id ?? file.path));
|
|
1952
|
+
metadata = fs.metadata.find((meta) => meta.id === result.#normalizeId(id?.id ?? file.path));
|
|
1959
1953
|
}
|
|
1960
1954
|
result.writeSync(file.path, file.code, {
|
|
1961
1955
|
meta: {
|
|
1962
|
-
id: id?.id
|
|
1956
|
+
id: result.#normalizeId(id?.id ?? metadata?.id ?? file.path),
|
|
1963
1957
|
type: metadata?.type,
|
|
1964
1958
|
properties: metadata?._hasProperties() ? metadata?.properties.values().reduce((ret, kvp) => {
|
|
1965
1959
|
ret[kvp.key] = kvp.value;
|
|
@@ -1971,37 +1965,6 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
1971
1965
|
}
|
|
1972
1966
|
});
|
|
1973
1967
|
}
|
|
1974
|
-
if (result.#metadata && Object.keys(result.#metadata).length > 0) {
|
|
1975
|
-
result.#log(types.LogLevelLabel.DEBUG, `Preparing to load ${Object.keys(result.#metadata).length} previously stored metadata records...`);
|
|
1976
|
-
const entry = Object.entries(result.#metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
|
|
1977
|
-
if (meta.properties) {
|
|
1978
|
-
const typeDefinition = {
|
|
1979
|
-
file: path
|
|
1980
|
-
};
|
|
1981
|
-
if (isSetString.isSetString(meta.properties.name)) {
|
|
1982
|
-
typeDefinition.name = meta.properties.name;
|
|
1983
|
-
}
|
|
1984
|
-
if (isSetString.isSetString(meta.properties["input.file"]) || isSetString.isSetString(meta.properties["input.name"])) {
|
|
1985
|
-
typeDefinition.input ??= {};
|
|
1986
|
-
if (isSetString.isSetString(meta.properties["input.file"])) {
|
|
1987
|
-
typeDefinition.input.file = meta.properties["input.file"];
|
|
1988
|
-
}
|
|
1989
|
-
if (isSetString.isSetString(meta.properties["input.name"])) {
|
|
1990
|
-
typeDefinition.input.name = meta.properties["input.name"];
|
|
1991
|
-
}
|
|
1992
|
-
}
|
|
1993
|
-
if (isSetString.isSetString(meta.properties.output)) {
|
|
1994
|
-
typeDefinition.output = meta.properties.output;
|
|
1995
|
-
}
|
|
1996
|
-
return typeDefinition;
|
|
1997
|
-
}
|
|
1998
|
-
return null;
|
|
1999
|
-
}).filter(Boolean);
|
|
2000
|
-
result.#log(types.LogLevelLabel.DEBUG, `Loaded ${entry.length} entry type definitions from VFS metadata.`);
|
|
2001
|
-
context.entry = entry;
|
|
2002
|
-
} else {
|
|
2003
|
-
result.#log(types.LogLevelLabel.DEBUG, "No previously stored metadata records were found on the local system.");
|
|
2004
|
-
}
|
|
2005
1968
|
} else {
|
|
2006
1969
|
const message = new $__namespace.Message();
|
|
2007
1970
|
result = new _VirtualFileSystem(context, message.initRoot(FileSystem));
|
|
@@ -2138,20 +2101,6 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
2138
2101
|
};
|
|
2139
2102
|
return ret;
|
|
2140
2103
|
}, {});
|
|
2141
|
-
if (context.config.skipCache !== true) {
|
|
2142
|
-
Object.entries(this.#metadata).filter(([, value]) => value.type === "entry").forEach(([id, value]) => {
|
|
2143
|
-
this.#context.entry ??= [];
|
|
2144
|
-
this.#context.entry.push({
|
|
2145
|
-
file: id,
|
|
2146
|
-
name: value.properties.name,
|
|
2147
|
-
output: value.properties.output,
|
|
2148
|
-
input: value.properties["input.file"] ? {
|
|
2149
|
-
file: value.properties["input.file"],
|
|
2150
|
-
name: value.properties["input.name"]
|
|
2151
|
-
} : void 0
|
|
2152
|
-
});
|
|
2153
|
-
});
|
|
2154
|
-
}
|
|
2155
2104
|
}
|
|
2156
2105
|
this.#ids = {};
|
|
2157
2106
|
this.#paths = {};
|
|
@@ -2845,8 +2794,8 @@ var VirtualFileSystem = class _VirtualFileSystem {
|
|
|
2845
2794
|
};
|
|
2846
2795
|
var PROJECT_ROOT_HASH_LENGTH = 45;
|
|
2847
2796
|
var CACHE_HASH_LENGTH = 62;
|
|
2848
|
-
function getPrefixedProjectRootHash(
|
|
2849
|
-
const combined = `${kebabCase.kebabCase(
|
|
2797
|
+
function getPrefixedProjectRootHash(name2, projectRootHash) {
|
|
2798
|
+
const combined = `${kebabCase.kebabCase(name2)}_${projectRootHash}`;
|
|
2850
2799
|
return combined.length > PROJECT_ROOT_HASH_LENGTH ? combined.slice(0, PROJECT_ROOT_HASH_LENGTH) : combined;
|
|
2851
2800
|
}
|
|
2852
2801
|
chunkPK6SKIKE_cjs.__name(getPrefixedProjectRootHash, "getPrefixedProjectRootHash");
|
|
@@ -2882,9 +2831,7 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
2882
2831
|
*
|
|
2883
2832
|
* @internal
|
|
2884
2833
|
*/
|
|
2885
|
-
#internal = {
|
|
2886
|
-
entry: []
|
|
2887
|
-
};
|
|
2834
|
+
#internal = {};
|
|
2888
2835
|
#workspaceConfig;
|
|
2889
2836
|
#checksum = null;
|
|
2890
2837
|
#buildId = uuid.uuid();
|
|
@@ -3005,13 +2952,8 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3005
2952
|
* The resolved entry type definitions for the project
|
|
3006
2953
|
*/
|
|
3007
2954
|
get entry() {
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
/**
|
|
3011
|
-
* Sets the resolved entry type definitions for the project
|
|
3012
|
-
*/
|
|
3013
|
-
set entry(value) {
|
|
3014
|
-
this.$$internal.entry = value;
|
|
2955
|
+
const entry = this._entry;
|
|
2956
|
+
return resolveEntriesSync(this, !entry || entry.length === 0 ? toArray.toArray(this.config.entry) : entry);
|
|
3015
2957
|
}
|
|
3016
2958
|
/**
|
|
3017
2959
|
* The TypeScript configuration parsed from the tsconfig file
|
|
@@ -3211,6 +3153,35 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3211
3153
|
return this.#requestCache;
|
|
3212
3154
|
}
|
|
3213
3155
|
/**
|
|
3156
|
+
* The entry points that exist in the Powerlines virtual file system
|
|
3157
|
+
*/
|
|
3158
|
+
get _entry() {
|
|
3159
|
+
return Object.entries(this.fs.metadata).filter(([, meta]) => meta && meta.type === "entry").map(([path, meta]) => {
|
|
3160
|
+
if (meta.properties) {
|
|
3161
|
+
const typeDefinition = {
|
|
3162
|
+
file: path
|
|
3163
|
+
};
|
|
3164
|
+
if (isSetString.isSetString(meta.properties.name)) {
|
|
3165
|
+
typeDefinition.name = meta.properties.name;
|
|
3166
|
+
}
|
|
3167
|
+
if (isSetString.isSetString(meta.properties["input.file"]) || isSetString.isSetString(meta.properties["input.name"])) {
|
|
3168
|
+
typeDefinition.input ??= {};
|
|
3169
|
+
if (isSetString.isSetString(meta.properties["input.file"])) {
|
|
3170
|
+
typeDefinition.input.file = meta.properties["input.file"];
|
|
3171
|
+
}
|
|
3172
|
+
if (isSetString.isSetString(meta.properties["input.name"])) {
|
|
3173
|
+
typeDefinition.input.name = meta.properties["input.name"];
|
|
3174
|
+
}
|
|
3175
|
+
}
|
|
3176
|
+
if (isSetString.isSetString(meta.properties.output)) {
|
|
3177
|
+
typeDefinition.output = meta.properties.output;
|
|
3178
|
+
}
|
|
3179
|
+
return typeDefinition;
|
|
3180
|
+
}
|
|
3181
|
+
return void 0;
|
|
3182
|
+
}).filter(Boolean);
|
|
3183
|
+
}
|
|
3184
|
+
/**
|
|
3214
3185
|
* A function to perform HTTP fetch requests
|
|
3215
3186
|
*
|
|
3216
3187
|
* @remarks
|
|
@@ -3468,14 +3439,6 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3468
3439
|
*/
|
|
3469
3440
|
async emitEntry(code, path, options = {}) {
|
|
3470
3441
|
const entryPath = append.appendPath(replace.replacePath(replace.replacePath(replace.replacePath(path, this.entryPath), this.config.projectRoot), this.workspaceConfig.workspaceRoot), this.entryPath);
|
|
3471
|
-
if (this.$$internal.entry) {
|
|
3472
|
-
this.$$internal.entry.push({
|
|
3473
|
-
name: options.name,
|
|
3474
|
-
file: entryPath,
|
|
3475
|
-
input: options.input,
|
|
3476
|
-
output: options.output
|
|
3477
|
-
});
|
|
3478
|
-
}
|
|
3479
3442
|
return this.emit(code, entryPath, defu7__default.default({
|
|
3480
3443
|
meta: {
|
|
3481
3444
|
type: "entry",
|
|
@@ -3500,14 +3463,6 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3500
3463
|
*/
|
|
3501
3464
|
emitEntrySync(code, path, options = {}) {
|
|
3502
3465
|
const entryPath = append.appendPath(replace.replacePath(replace.replacePath(replace.replacePath(path, this.entryPath), this.config.projectRoot), this.workspaceConfig.workspaceRoot), this.entryPath);
|
|
3503
|
-
if (this.$$internal.entry) {
|
|
3504
|
-
this.$$internal.entry.push({
|
|
3505
|
-
name: options?.name,
|
|
3506
|
-
file: entryPath,
|
|
3507
|
-
input: options?.input,
|
|
3508
|
-
output: options?.output
|
|
3509
|
-
});
|
|
3510
|
-
}
|
|
3511
3466
|
return this.emitSync(code, entryPath, defu7__default.default({
|
|
3512
3467
|
meta: {
|
|
3513
3468
|
type: "entry",
|
|
@@ -3649,8 +3604,8 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3649
3604
|
* @param name - The name to use for the logger instance
|
|
3650
3605
|
* @returns A logger function
|
|
3651
3606
|
*/
|
|
3652
|
-
createLog(
|
|
3653
|
-
return createLog(
|
|
3607
|
+
createLog(name2 = null) {
|
|
3608
|
+
return createLog(name2, {
|
|
3654
3609
|
...this.config,
|
|
3655
3610
|
logLevel: isNull.isNull(this.config.logLevel) ? "silent" : this.config.logLevel
|
|
3656
3611
|
});
|
|
@@ -3661,8 +3616,8 @@ var PowerlinesContext = class _PowerlinesContext {
|
|
|
3661
3616
|
* @param name - The name to use for the extended logger instance
|
|
3662
3617
|
* @returns A logger function
|
|
3663
3618
|
*/
|
|
3664
|
-
extendLog(
|
|
3665
|
-
return extendLog(this.log,
|
|
3619
|
+
extendLog(name2) {
|
|
3620
|
+
return extendLog(this.log, name2);
|
|
3666
3621
|
}
|
|
3667
3622
|
/**
|
|
3668
3623
|
* Generates a checksum representing the current context state
|
|
@@ -4286,7 +4241,7 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends PowerlinesContext
|
|
|
4286
4241
|
*/
|
|
4287
4242
|
async init(config = {}) {
|
|
4288
4243
|
await super.init(config);
|
|
4289
|
-
await Promise.all(toArray.toArray(this.config.userConfig.environments && Object.keys(this.config.userConfig.environments).length > 0 ? Object.keys(this.config.userConfig.environments).map((
|
|
4244
|
+
await Promise.all(toArray.toArray(this.config.userConfig.environments && Object.keys(this.config.userConfig.environments).length > 0 ? Object.keys(this.config.userConfig.environments).map((name2) => createEnvironment(name2, this.config.userConfig)) : createDefaultEnvironment(this.config.userConfig)).map(async (env) => {
|
|
4290
4245
|
this.#environments[env.name] = await this.in(env);
|
|
4291
4246
|
}));
|
|
4292
4247
|
}
|
|
@@ -4322,8 +4277,8 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends PowerlinesContext
|
|
|
4322
4277
|
isHighPriority: true
|
|
4323
4278
|
}) {
|
|
4324
4279
|
await super.withUserConfig(userConfig, options);
|
|
4325
|
-
await Promise.all(Object.keys(this.#environments).map(async (
|
|
4326
|
-
await this.#environments[
|
|
4280
|
+
await Promise.all(Object.keys(this.#environments).map(async (name2) => {
|
|
4281
|
+
await this.#environments[name2].withUserConfig(userConfig, options);
|
|
4327
4282
|
}));
|
|
4328
4283
|
}
|
|
4329
4284
|
/**
|
|
@@ -4335,8 +4290,8 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends PowerlinesContext
|
|
|
4335
4290
|
isHighPriority: true
|
|
4336
4291
|
}) {
|
|
4337
4292
|
await super.withInlineConfig(inlineConfig, options);
|
|
4338
|
-
await Promise.all(Object.keys(this.#environments).map(async (
|
|
4339
|
-
await this.#environments[
|
|
4293
|
+
await Promise.all(Object.keys(this.#environments).map(async (name2) => {
|
|
4294
|
+
await this.#environments[name2].withInlineConfig(inlineConfig, options);
|
|
4340
4295
|
}));
|
|
4341
4296
|
}
|
|
4342
4297
|
/**
|
|
@@ -4346,8 +4301,8 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends PowerlinesContext
|
|
|
4346
4301
|
*/
|
|
4347
4302
|
async addPlugin(plugin) {
|
|
4348
4303
|
this.plugins.push(plugin);
|
|
4349
|
-
await Promise.all(Object.keys(this.environments).map(async (
|
|
4350
|
-
await this.environments[
|
|
4304
|
+
await Promise.all(Object.keys(this.environments).map(async (name2) => {
|
|
4305
|
+
await this.environments[name2].addPlugin(plugin);
|
|
4351
4306
|
}));
|
|
4352
4307
|
}
|
|
4353
4308
|
/**
|
|
@@ -4356,18 +4311,18 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends PowerlinesContext
|
|
|
4356
4311
|
* @param name - The name of the environment to retrieve.
|
|
4357
4312
|
* @returns The requested environment context.
|
|
4358
4313
|
*/
|
|
4359
|
-
async getEnvironment(
|
|
4314
|
+
async getEnvironment(name2) {
|
|
4360
4315
|
let environment;
|
|
4361
|
-
if (
|
|
4362
|
-
environment = this.environments[
|
|
4316
|
+
if (name2) {
|
|
4317
|
+
environment = this.environments[name2];
|
|
4363
4318
|
}
|
|
4364
4319
|
if (Object.keys(this.environments).length === 1) {
|
|
4365
4320
|
environment = this.environments[Object.keys(this.environments)[0]];
|
|
4366
4321
|
this.log(types.LogLevelLabel.DEBUG, `Applying the only configured environment: ${chalk5__default.default.bold.cyanBright(environment?.environment.name)}`);
|
|
4367
4322
|
}
|
|
4368
4323
|
if (!environment) {
|
|
4369
|
-
if (
|
|
4370
|
-
throw new Error(`Environment "${
|
|
4324
|
+
if (name2) {
|
|
4325
|
+
throw new Error(`Environment "${name2}" not found.`);
|
|
4371
4326
|
}
|
|
4372
4327
|
environment = await this.in(createDefaultEnvironment(this.config.userConfig));
|
|
4373
4328
|
this.log(types.LogLevelLabel.WARN, `No environment specified, and no default environment found. Using a temporary default environment: ${chalk5__default.default.bold.cyanBright(environment?.environment.name)}`);
|
|
@@ -4380,9 +4335,9 @@ var PowerlinesAPIContext = class _PowerlinesAPIContext extends PowerlinesContext
|
|
|
4380
4335
|
* @param name - The name of the environment to retrieve.
|
|
4381
4336
|
* @returns The requested environment context or `undefined` if not found.
|
|
4382
4337
|
*/
|
|
4383
|
-
async getEnvironmentSafe(
|
|
4338
|
+
async getEnvironmentSafe(name2) {
|
|
4384
4339
|
try {
|
|
4385
|
-
return await this.getEnvironment(
|
|
4340
|
+
return await this.getEnvironment(name2);
|
|
4386
4341
|
} catch {
|
|
4387
4342
|
return void 0;
|
|
4388
4343
|
}
|
|
@@ -4461,14 +4416,14 @@ var PowerlinesAPI = class _PowerlinesAPI {
|
|
|
4461
4416
|
const api = new _PowerlinesAPI(await PowerlinesAPIContext.from(workspaceRoot, config));
|
|
4462
4417
|
api.#context.$$internal = {
|
|
4463
4418
|
api,
|
|
4464
|
-
addPlugin: api.#addPlugin.bind(api)
|
|
4465
|
-
entry: []
|
|
4419
|
+
addPlugin: api.#addPlugin.bind(api)
|
|
4466
4420
|
};
|
|
4421
|
+
api.context.info(`\u{1F50C} The Powerlines v${package_default.version} engine has started`);
|
|
4467
4422
|
for (const plugin of api.context.config.plugins ?? []) {
|
|
4468
4423
|
await api.#addPlugin(plugin);
|
|
4469
4424
|
}
|
|
4470
4425
|
if (api.context.plugins.length === 0) {
|
|
4471
|
-
api.context.
|
|
4426
|
+
api.context.warn("No Powerlines plugins were specified in the options. Please ensure this is correct, as it is generally not recommended.");
|
|
4472
4427
|
}
|
|
4473
4428
|
const pluginConfig = await api.callHook("config", {
|
|
4474
4429
|
environment: await api.context.getEnvironment(),
|
|
@@ -4491,11 +4446,11 @@ var PowerlinesAPI = class _PowerlinesAPI {
|
|
|
4491
4446
|
async prepare(inlineConfig = {
|
|
4492
4447
|
command: "prepare"
|
|
4493
4448
|
}) {
|
|
4494
|
-
this.context.
|
|
4495
|
-
this.context.
|
|
4449
|
+
this.context.info(" \u{1F3D7}\uFE0F Preparing the Powerlines project");
|
|
4450
|
+
this.context.debug(" \u2699\uFE0F Aggregating configuration options for the Powerlines project");
|
|
4496
4451
|
await this.context.withInlineConfig(inlineConfig);
|
|
4497
4452
|
await this.#executeEnvironments(async (context) => {
|
|
4498
|
-
context.
|
|
4453
|
+
context.debug(`Initializing the processing options for the Powerlines project.`);
|
|
4499
4454
|
await this.callHook("configResolved", {
|
|
4500
4455
|
environment: context,
|
|
4501
4456
|
order: "pre"
|
|
@@ -4505,7 +4460,7 @@ var PowerlinesAPI = class _PowerlinesAPI {
|
|
|
4505
4460
|
environment: context,
|
|
4506
4461
|
order: "normal"
|
|
4507
4462
|
});
|
|
4508
|
-
context.
|
|
4463
|
+
context.debug(`The configuration provided ${toArray.toArray(context.config.entry).length} entry point(s), Powerlines has found ${context.entry.length} entry files(s) for the ${context.config.title} project${context.entry.length > 0 && context.entry.length < 10 ? `:
|
|
4509
4464
|
${context.entry.map((entry) => `- ${entry.file}${entry.output ? ` -> ${entry.output}` : ""}`).join(" \n")}` : ""}.`);
|
|
4510
4465
|
await resolveTsconfig(context);
|
|
4511
4466
|
await installDependencies(context);
|
|
@@ -4513,7 +4468,7 @@ ${context.entry.map((entry) => `- ${entry.file}${entry.output ? ` -> ${entry.out
|
|
|
4513
4468
|
environment: context,
|
|
4514
4469
|
order: "post"
|
|
4515
4470
|
});
|
|
4516
|
-
context.
|
|
4471
|
+
context.trace(`Powerlines configuration has been resolved:
|
|
4517
4472
|
|
|
4518
4473
|
${console.formatLogMessage(context.config)}`);
|
|
4519
4474
|
if (!context.fs.existsSync(context.cachePath)) {
|
|
@@ -4531,11 +4486,11 @@ ${console.formatLogMessage(context.config)}`);
|
|
|
4531
4486
|
order: "normal"
|
|
4532
4487
|
});
|
|
4533
4488
|
if (context.config.output.dts !== false) {
|
|
4534
|
-
context.
|
|
4489
|
+
context.debug(`Preparing the TypeScript definitions for the Powerlines project.`);
|
|
4535
4490
|
if (context.fs.existsSync(context.dtsPath)) {
|
|
4536
4491
|
await context.fs.remove(context.dtsPath);
|
|
4537
4492
|
}
|
|
4538
|
-
context.
|
|
4493
|
+
context.debug("Transforming built-ins runtime modules files.");
|
|
4539
4494
|
const builtinFilePaths = await Promise.all((await context.getBuiltins()).map(async (file) => {
|
|
4540
4495
|
const result2 = await core.transformAsync(file.code.toString(), {
|
|
4541
4496
|
highlightCode: true,
|
|
@@ -4568,7 +4523,7 @@ ${console.formatLogMessage(context.config)}`);
|
|
|
4568
4523
|
context.warn(`File ID is missing for a built-in runtime file at ${file.path}.`);
|
|
4569
4524
|
file.id = replace.replacePath(replace.replacePath(file.path, context.workspaceConfig.workspaceRoot), context.builtinsPath);
|
|
4570
4525
|
}
|
|
4571
|
-
context.
|
|
4526
|
+
context.trace(`Writing transformed built-in runtime file ${file.id}.`);
|
|
4572
4527
|
await context.emitBuiltin(result2.code, file.id);
|
|
4573
4528
|
return file.path;
|
|
4574
4529
|
}));
|
|
@@ -4587,9 +4542,9 @@ ${console.formatLogMessage(context.config)}`);
|
|
|
4587
4542
|
[]
|
|
4588
4543
|
// [joinPaths(typescriptPath, "lib", "lib.esnext.full.d.ts")]
|
|
4589
4544
|
);
|
|
4590
|
-
context.
|
|
4591
|
-
let types
|
|
4592
|
-
context.
|
|
4545
|
+
context.debug("Parsing TypeScript configuration for the Powerlines project.");
|
|
4546
|
+
let types = await emitTypes(context, files);
|
|
4547
|
+
context.debug(`Generating TypeScript declaration file ${context.dtsPath}.`);
|
|
4593
4548
|
const directives = [];
|
|
4594
4549
|
const asNextParam = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((previousResult) => isObject.isObject(previousResult) ? previousResult.code : previousResult, "asNextParam");
|
|
4595
4550
|
let result = await this.callHook("types", {
|
|
@@ -4598,15 +4553,15 @@ ${console.formatLogMessage(context.config)}`);
|
|
|
4598
4553
|
order: "pre",
|
|
4599
4554
|
result: "merge",
|
|
4600
4555
|
asNextParam
|
|
4601
|
-
}, types
|
|
4556
|
+
}, types);
|
|
4602
4557
|
if (result) {
|
|
4603
4558
|
if (isSetObject.isSetObject(result)) {
|
|
4604
|
-
types
|
|
4559
|
+
types = result.code;
|
|
4605
4560
|
if (Array.isArray(result.directives) && result.directives.length > 0) {
|
|
4606
4561
|
directives.push(...result.directives);
|
|
4607
4562
|
}
|
|
4608
4563
|
} else if (isSetString.isSetString(result)) {
|
|
4609
|
-
types
|
|
4564
|
+
types = result;
|
|
4610
4565
|
}
|
|
4611
4566
|
}
|
|
4612
4567
|
result = await this.callHook("types", {
|
|
@@ -4615,15 +4570,15 @@ ${console.formatLogMessage(context.config)}`);
|
|
|
4615
4570
|
order: "normal",
|
|
4616
4571
|
result: "merge",
|
|
4617
4572
|
asNextParam
|
|
4618
|
-
}, types
|
|
4573
|
+
}, types);
|
|
4619
4574
|
if (result) {
|
|
4620
4575
|
if (isSetObject.isSetObject(result)) {
|
|
4621
|
-
types
|
|
4576
|
+
types = result.code;
|
|
4622
4577
|
if (Array.isArray(result.directives) && result.directives.length > 0) {
|
|
4623
4578
|
directives.push(...result.directives);
|
|
4624
4579
|
}
|
|
4625
4580
|
} else if (isSetString.isSetString(result)) {
|
|
4626
|
-
types
|
|
4581
|
+
types = result;
|
|
4627
4582
|
}
|
|
4628
4583
|
}
|
|
4629
4584
|
result = await this.callHook("types", {
|
|
@@ -4632,18 +4587,18 @@ ${console.formatLogMessage(context.config)}`);
|
|
|
4632
4587
|
order: "post",
|
|
4633
4588
|
result: "merge",
|
|
4634
4589
|
asNextParam
|
|
4635
|
-
}, types
|
|
4590
|
+
}, types);
|
|
4636
4591
|
if (result) {
|
|
4637
4592
|
if (isSetObject.isSetObject(result)) {
|
|
4638
|
-
types
|
|
4593
|
+
types = result.code;
|
|
4639
4594
|
if (Array.isArray(result.directives) && result.directives.length > 0) {
|
|
4640
4595
|
directives.push(...result.directives);
|
|
4641
4596
|
}
|
|
4642
4597
|
} else if (isSetString.isSetString(result)) {
|
|
4643
|
-
types
|
|
4598
|
+
types = result;
|
|
4644
4599
|
}
|
|
4645
4600
|
}
|
|
4646
|
-
if (types
|
|
4601
|
+
if (types?.trim() || directives.length > 0) {
|
|
4647
4602
|
await context.fs.write(context.dtsPath, `${directives ? `${directives.map((directive) => `/// <reference types="${directive}" />`).join("\n")}
|
|
4648
4603
|
|
|
4649
4604
|
` : ""}${getFileHeader(context, {
|
|
@@ -4651,7 +4606,7 @@ ${console.formatLogMessage(context.config)}`);
|
|
|
4651
4606
|
prettierIgnore: false
|
|
4652
4607
|
})}
|
|
4653
4608
|
|
|
4654
|
-
${formatTypes(types
|
|
4609
|
+
${formatTypes(types)}
|
|
4655
4610
|
`);
|
|
4656
4611
|
} else {
|
|
4657
4612
|
const dtsRelativePath = getTsconfigDtsPath(context);
|
|
@@ -4666,7 +4621,7 @@ ${formatTypes(types$1)}
|
|
|
4666
4621
|
if (!context.tsconfig) {
|
|
4667
4622
|
throw new Error("Failed to parse the TypeScript configuration file.");
|
|
4668
4623
|
}
|
|
4669
|
-
this.context.
|
|
4624
|
+
this.context.debug("Formatting files generated during the prepare step.");
|
|
4670
4625
|
await Promise.all([
|
|
4671
4626
|
formatFolder(context, context.builtinsPath),
|
|
4672
4627
|
formatFolder(context, context.entryPath)
|
|
@@ -4678,7 +4633,7 @@ ${formatTypes(types$1)}
|
|
|
4678
4633
|
await writeMetaFile(context);
|
|
4679
4634
|
context.persistedMeta = context.meta;
|
|
4680
4635
|
});
|
|
4681
|
-
this.context.
|
|
4636
|
+
this.context.info("\u2714 Powerlines preparation has completed successfully");
|
|
4682
4637
|
}
|
|
4683
4638
|
/**
|
|
4684
4639
|
* Create a new Powerlines project
|
|
@@ -4690,17 +4645,17 @@ ${formatTypes(types$1)}
|
|
|
4690
4645
|
* @returns A promise that resolves when the project has been created
|
|
4691
4646
|
*/
|
|
4692
4647
|
async new(inlineConfig) {
|
|
4693
|
-
this.context.
|
|
4648
|
+
this.context.info("\u{1F195} Creating a new Powerlines project");
|
|
4694
4649
|
await this.prepare(inlineConfig);
|
|
4695
4650
|
await this.#executeEnvironments(async (context) => {
|
|
4696
|
-
context.
|
|
4651
|
+
context.debug("Initializing the processing options for the Powerlines project.");
|
|
4697
4652
|
await this.callHook("new", {
|
|
4698
4653
|
environment: context,
|
|
4699
4654
|
order: "pre"
|
|
4700
4655
|
});
|
|
4701
4656
|
const files = await listFiles.listFiles(joinPaths.joinPaths(context.powerlinesPath, "files/common/**/*.hbs"));
|
|
4702
4657
|
for (const file of files) {
|
|
4703
|
-
context.
|
|
4658
|
+
context.trace(`Adding template file to project: ${file}`);
|
|
4704
4659
|
const template = Handlebars__default.default.compile(file);
|
|
4705
4660
|
await context.fs.write(joinPaths.joinPaths(context.config.projectRoot, file.replace(".hbs", "")), template(context));
|
|
4706
4661
|
}
|
|
@@ -4711,14 +4666,14 @@ ${formatTypes(types$1)}
|
|
|
4711
4666
|
if (context.config.projectType === "application") {
|
|
4712
4667
|
const files2 = await listFiles.listFiles(joinPaths.joinPaths(context.powerlinesPath, "files/application/**/*.hbs"));
|
|
4713
4668
|
for (const file of files2) {
|
|
4714
|
-
context.
|
|
4669
|
+
context.trace(`Adding application template file: ${file}`);
|
|
4715
4670
|
const template = Handlebars__default.default.compile(file);
|
|
4716
4671
|
await context.fs.write(joinPaths.joinPaths(context.config.projectRoot, file.replace(".hbs", "")), template(context));
|
|
4717
4672
|
}
|
|
4718
4673
|
} else {
|
|
4719
4674
|
const files2 = await listFiles.listFiles(joinPaths.joinPaths(context.powerlinesPath, "files/library/**/*.hbs"));
|
|
4720
4675
|
for (const file of files2) {
|
|
4721
|
-
context.
|
|
4676
|
+
context.trace(`Adding library template file: ${file}`);
|
|
4722
4677
|
const template = Handlebars__default.default.compile(file);
|
|
4723
4678
|
await context.fs.write(joinPaths.joinPaths(context.config.projectRoot, file.replace(".hbs", "")), template(context));
|
|
4724
4679
|
}
|
|
@@ -4728,7 +4683,7 @@ ${formatTypes(types$1)}
|
|
|
4728
4683
|
order: "post"
|
|
4729
4684
|
});
|
|
4730
4685
|
});
|
|
4731
|
-
this.context.
|
|
4686
|
+
this.context.debug("\u2714 Powerlines new command completed successfully");
|
|
4732
4687
|
}
|
|
4733
4688
|
/**
|
|
4734
4689
|
* Clean any previously prepared artifacts
|
|
@@ -4742,10 +4697,10 @@ ${formatTypes(types$1)}
|
|
|
4742
4697
|
async clean(inlineConfig = {
|
|
4743
4698
|
command: "clean"
|
|
4744
4699
|
}) {
|
|
4745
|
-
this.context.
|
|
4700
|
+
this.context.info("\u{1F9F9} Cleaning the previous Powerlines artifacts");
|
|
4746
4701
|
await this.prepare(inlineConfig);
|
|
4747
4702
|
await this.#executeEnvironments(async (context) => {
|
|
4748
|
-
|
|
4703
|
+
context.debug("Cleaning the project's dist and artifacts directories.");
|
|
4749
4704
|
await context.fs.remove(joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.buildPath));
|
|
4750
4705
|
await context.fs.remove(joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.config.output.artifactsPath));
|
|
4751
4706
|
await this.callHook("clean", {
|
|
@@ -4753,7 +4708,7 @@ ${formatTypes(types$1)}
|
|
|
4753
4708
|
sequential: false
|
|
4754
4709
|
});
|
|
4755
4710
|
});
|
|
4756
|
-
this.context.
|
|
4711
|
+
this.context.debug("\u2714 Powerlines cleaning completed successfully");
|
|
4757
4712
|
}
|
|
4758
4713
|
/**
|
|
4759
4714
|
* Lint the project
|
|
@@ -4764,7 +4719,7 @@ ${formatTypes(types$1)}
|
|
|
4764
4719
|
async lint(inlineConfig = {
|
|
4765
4720
|
command: "lint"
|
|
4766
4721
|
}) {
|
|
4767
|
-
this.context.
|
|
4722
|
+
this.context.info("\u{1F4CB} Linting the Powerlines project");
|
|
4768
4723
|
await this.prepare(inlineConfig);
|
|
4769
4724
|
await this.#executeEnvironments(async (context) => {
|
|
4770
4725
|
if (context.config.lint !== false) {
|
|
@@ -4774,7 +4729,7 @@ ${formatTypes(types$1)}
|
|
|
4774
4729
|
});
|
|
4775
4730
|
}
|
|
4776
4731
|
});
|
|
4777
|
-
this.context.
|
|
4732
|
+
this.context.debug("\u2714 Powerlines linting completed successfully");
|
|
4778
4733
|
}
|
|
4779
4734
|
/**
|
|
4780
4735
|
* Build the project
|
|
@@ -4788,7 +4743,7 @@ ${formatTypes(types$1)}
|
|
|
4788
4743
|
async build(inlineConfig = {
|
|
4789
4744
|
command: "build"
|
|
4790
4745
|
}) {
|
|
4791
|
-
this.context.
|
|
4746
|
+
this.context.info("\u{1F4E6} Building the Powerlines project");
|
|
4792
4747
|
await this.prepare(inlineConfig);
|
|
4793
4748
|
if (this.context.config.singleBuild) {
|
|
4794
4749
|
await this.#handleBuild(await this.#context.toEnvironment());
|
|
@@ -4797,7 +4752,7 @@ ${formatTypes(types$1)}
|
|
|
4797
4752
|
await this.#handleBuild(context);
|
|
4798
4753
|
});
|
|
4799
4754
|
}
|
|
4800
|
-
this.context.
|
|
4755
|
+
this.context.debug("\u2714 Powerlines build completed successfully");
|
|
4801
4756
|
}
|
|
4802
4757
|
/**
|
|
4803
4758
|
* Prepare the documentation for the project
|
|
@@ -4808,10 +4763,10 @@ ${formatTypes(types$1)}
|
|
|
4808
4763
|
async docs(inlineConfig = {
|
|
4809
4764
|
command: "docs"
|
|
4810
4765
|
}) {
|
|
4811
|
-
this.context.
|
|
4766
|
+
this.context.info("\u{1F4D3} Generating documentation for the Powerlines project");
|
|
4812
4767
|
await this.prepare(inlineConfig);
|
|
4813
4768
|
await this.#executeEnvironments(async (context) => {
|
|
4814
|
-
context.
|
|
4769
|
+
context.debug("Writing documentation for the Powerlines project artifacts.");
|
|
4815
4770
|
await this.prepare(inlineConfig);
|
|
4816
4771
|
await this.#executeEnvironments(async (context2) => {
|
|
4817
4772
|
await this.callHook("docs", {
|
|
@@ -4819,7 +4774,7 @@ ${formatTypes(types$1)}
|
|
|
4819
4774
|
});
|
|
4820
4775
|
});
|
|
4821
4776
|
});
|
|
4822
|
-
this
|
|
4777
|
+
this.context.debug("\u2714 Powerlines documentation generation completed successfully");
|
|
4823
4778
|
}
|
|
4824
4779
|
/**
|
|
4825
4780
|
* Deploy the project source code
|
|
@@ -4832,14 +4787,14 @@ ${formatTypes(types$1)}
|
|
|
4832
4787
|
async deploy(inlineConfig = {
|
|
4833
4788
|
command: "deploy"
|
|
4834
4789
|
}) {
|
|
4835
|
-
this.context.
|
|
4790
|
+
this.context.info("\u{1F680} Deploying the Powerlines project");
|
|
4836
4791
|
await this.prepare(inlineConfig);
|
|
4837
4792
|
await this.#executeEnvironments(async (context) => {
|
|
4838
4793
|
await this.callHook("deploy", {
|
|
4839
4794
|
environment: context
|
|
4840
4795
|
});
|
|
4841
4796
|
});
|
|
4842
|
-
this.context.
|
|
4797
|
+
this.context.debug("\u2714 Powerlines deploy completed successfully");
|
|
4843
4798
|
}
|
|
4844
4799
|
/**
|
|
4845
4800
|
* Finalization process
|
|
@@ -4850,14 +4805,14 @@ ${formatTypes(types$1)}
|
|
|
4850
4805
|
* @returns A promise that resolves when the finalization process has completed
|
|
4851
4806
|
*/
|
|
4852
4807
|
async finalize() {
|
|
4853
|
-
this.context.
|
|
4808
|
+
this.context.info("\u{1F3C1} Powerlines finalization processes started");
|
|
4854
4809
|
await this.#executeEnvironments(async (context) => {
|
|
4855
4810
|
await this.callHook("finalize", {
|
|
4856
4811
|
environment: context
|
|
4857
4812
|
});
|
|
4858
4813
|
await context.fs.dispose();
|
|
4859
4814
|
});
|
|
4860
|
-
this.context.
|
|
4815
|
+
this.context.debug("\u2714 Powerlines finalization completed successfully");
|
|
4861
4816
|
}
|
|
4862
4817
|
/**
|
|
4863
4818
|
* Invokes the configured plugin hooks
|
|
@@ -4898,12 +4853,12 @@ ${formatTypes(types$1)}
|
|
|
4898
4853
|
const sourcePath = append.appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot);
|
|
4899
4854
|
const destinationPath = joinPaths.joinPaths(append.appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot), "dist");
|
|
4900
4855
|
if (context.fs.existsSync(sourcePath) && sourcePath !== destinationPath) {
|
|
4901
|
-
context.
|
|
4856
|
+
context.debug(`Copying build output files from project's build directory (${context.config.output.buildPath}) to the workspace's output directory (${context.config.output.outputPath}).`);
|
|
4902
4857
|
await context.fs.copy(sourcePath, destinationPath);
|
|
4903
4858
|
}
|
|
4904
4859
|
}
|
|
4905
4860
|
await Promise.all(context.config.output.assets.map(async (asset) => {
|
|
4906
|
-
context.
|
|
4861
|
+
context.trace(`Copying asset(s): ${chalk5__default.default.redBright(context.workspaceConfig.workspaceRoot === asset.input ? asset.glob : joinPaths.joinPaths(replace.replacePath(asset.input, context.workspaceConfig.workspaceRoot), asset.glob))} -> ${chalk5__default.default.greenBright(joinPaths.joinPaths(replace.replacePath(asset.output, context.workspaceConfig.workspaceRoot), asset.glob))} ${Array.isArray(asset.ignore) && asset.ignore.length > 0 ? ` (ignoring: ${asset.ignore.map((i) => chalk5__default.default.yellowBright(i)).join(", ")})` : ""}`);
|
|
4907
4862
|
await context.fs.copy(asset, asset.output);
|
|
4908
4863
|
}));
|
|
4909
4864
|
await this.callHook("build", {
|
|
@@ -4918,23 +4873,23 @@ ${formatTypes(types$1)}
|
|
|
4918
4873
|
*/
|
|
4919
4874
|
async #getEnvironments() {
|
|
4920
4875
|
if (!this.context.config.environments || Object.keys(this.context.config.environments).length <= 1) {
|
|
4921
|
-
this.context.
|
|
4876
|
+
this.context.debug("No environments are configured for this Powerlines project. Using the default environment.");
|
|
4922
4877
|
return [
|
|
4923
4878
|
await this.context.getEnvironment()
|
|
4924
4879
|
];
|
|
4925
4880
|
}
|
|
4926
|
-
this.context.
|
|
4927
|
-
return (await Promise.all(Object.entries(this.context.config.environments).map(async ([
|
|
4928
|
-
const environment = await this.context.getEnvironmentSafe(
|
|
4881
|
+
this.context.debug(`Found ${Object.keys(this.context.config.environments).length} configured environment(s) for this Powerlines project.`);
|
|
4882
|
+
return (await Promise.all(Object.entries(this.context.config.environments).map(async ([name2, config]) => {
|
|
4883
|
+
const environment = await this.context.getEnvironmentSafe(name2);
|
|
4929
4884
|
if (!environment) {
|
|
4930
4885
|
const resolvedEnvironment = await this.callHook("configEnvironment", {
|
|
4931
|
-
environment:
|
|
4932
|
-
},
|
|
4886
|
+
environment: name2
|
|
4887
|
+
}, name2, config);
|
|
4933
4888
|
if (resolvedEnvironment) {
|
|
4934
|
-
this.context.environments[
|
|
4889
|
+
this.context.environments[name2] = await this.context.in(resolvedEnvironment);
|
|
4935
4890
|
}
|
|
4936
4891
|
}
|
|
4937
|
-
return this.context.environments[
|
|
4892
|
+
return this.context.environments[name2];
|
|
4938
4893
|
}))).filter((context) => isSet.isSet(context));
|
|
4939
4894
|
}
|
|
4940
4895
|
/**
|
|
@@ -4959,7 +4914,7 @@ ${formatTypes(types$1)}
|
|
|
4959
4914
|
return;
|
|
4960
4915
|
}
|
|
4961
4916
|
for (const plugin of result) {
|
|
4962
|
-
this.context.
|
|
4917
|
+
this.context.debug(`Successfully initialized the ${chalk5__default.default.bold.cyanBright(plugin.name)} plugin`);
|
|
4963
4918
|
await this.context.addPlugin(plugin);
|
|
4964
4919
|
}
|
|
4965
4920
|
}
|
|
@@ -5046,10 +5001,10 @@ Please ensure the value is one of the following:
|
|
|
5046
5001
|
const result = [];
|
|
5047
5002
|
for (const plugin of plugins) {
|
|
5048
5003
|
if (checkDedupe(plugin, this.context.plugins)) {
|
|
5049
|
-
this.context.
|
|
5004
|
+
this.context.trace(`Duplicate ${chalk5__default.default.bold.cyanBright(plugin.name)} plugin dependency detected - Skipping initialization.`);
|
|
5050
5005
|
} else {
|
|
5051
5006
|
result.push(plugin);
|
|
5052
|
-
this.context.
|
|
5007
|
+
this.context.trace(`Initializing the ${chalk5__default.default.bold.cyanBright(plugin.name)} plugin...`);
|
|
5053
5008
|
}
|
|
5054
5009
|
}
|
|
5055
5010
|
return result;
|
|
@@ -5066,12 +5021,12 @@ Please ensure the value is one of the following:
|
|
|
5066
5021
|
]
|
|
5067
5022
|
});
|
|
5068
5023
|
if (!isInstalled && this.context.config.skipInstalls !== true) {
|
|
5069
|
-
this.#context.
|
|
5024
|
+
this.#context.warn(`The plugin package "${pluginPath}" is not installed. It will be installed automatically.`);
|
|
5070
5025
|
const result = await install.install(pluginPath, {
|
|
5071
5026
|
cwd: this.context.config.projectRoot
|
|
5072
5027
|
});
|
|
5073
5028
|
if (isNumber.isNumber(result.exitCode) && result.exitCode > 0) {
|
|
5074
|
-
this.#context.
|
|
5029
|
+
this.#context.error(result.stderr);
|
|
5075
5030
|
throw new Error(`An error occurred while installing the build plugin package "${pluginPath}" `);
|
|
5076
5031
|
}
|
|
5077
5032
|
}
|
|
@@ -5115,5 +5070,7 @@ exports.combineContexts = combineContexts;
|
|
|
5115
5070
|
exports.createLog = createLog;
|
|
5116
5071
|
exports.extendLog = extendLog;
|
|
5117
5072
|
exports.isUnpluginBuilderVariant = isUnpluginBuilderVariant;
|
|
5118
|
-
|
|
5119
|
-
|
|
5073
|
+
exports.name = name;
|
|
5074
|
+
exports.version = version;
|
|
5075
|
+
//# sourceMappingURL=chunk-TPEJ4HAR.cjs.map
|
|
5076
|
+
//# sourceMappingURL=chunk-TPEJ4HAR.cjs.map
|