@powerlines/engine 0.47.1 → 0.47.3
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/_internal/worker.cjs +16 -4
- package/dist/_internal/worker.mjs +16 -4
- package/dist/_internal/worker.mjs.map +1 -1
- package/dist/api.cjs +16 -4
- package/dist/api.d.cts.map +1 -1
- package/dist/api.d.mts.map +1 -1
- package/dist/api.mjs +16 -4
- package/dist/api.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -4914,10 +4914,16 @@ var PowerlinesExecution = class PowerlinesExecution {
|
|
|
4914
4914
|
*/
|
|
4915
4915
|
async getEnvironments() {
|
|
4916
4916
|
if (!this.context.config.environments || Object.keys(this.context.config.environments).length <= 1) {
|
|
4917
|
-
this.context.debug(
|
|
4917
|
+
this.context.debug({
|
|
4918
|
+
meta: { category: "config" },
|
|
4919
|
+
message: "No environments are configured for this Powerlines project. Using the default environment."
|
|
4920
|
+
});
|
|
4918
4921
|
return [await this.context.getEnvironment()];
|
|
4919
4922
|
}
|
|
4920
|
-
this.context.debug(
|
|
4923
|
+
this.context.debug({
|
|
4924
|
+
meta: { category: "config" },
|
|
4925
|
+
message: `Found ${Object.keys(this.context.config.environments).length} configured environment(s) for this Powerlines project.`
|
|
4926
|
+
});
|
|
4921
4927
|
return (await Promise.all(Object.entries(this.context.config.environments).map(async ([name, config]) => {
|
|
4922
4928
|
if (!await this.context.getEnvironmentSafe(name)) {
|
|
4923
4929
|
const resolvedEnvironment = await this.callHook("configEnvironment", { environment: name }, name, config);
|
|
@@ -4985,10 +4991,16 @@ var PowerlinesExecution = class PowerlinesExecution {
|
|
|
4985
4991
|
if (!plugins) throw new Error(`The plugin configuration ${JSON.stringify(awaited)} is invalid. This configuration must point to a valid Powerlines plugin module.`);
|
|
4986
4992
|
if (plugins.length > 0 && !plugins.every(_powerlines_core_plugin_utils.isPlugin)) throw new Error(`The plugin option ${JSON.stringify(plugins)} does not export a valid module. This configuration must point to a valid Powerlines plugin module.`);
|
|
4987
4993
|
const result = [];
|
|
4988
|
-
for (const plugin of plugins) if ((0, _powerlines_core_plugin_utils.isDuplicate)(plugin, this.context.plugins)) this.context.trace(
|
|
4994
|
+
for (const plugin of plugins) if ((0, _powerlines_core_plugin_utils.isDuplicate)(plugin, this.context.plugins)) this.context.trace({
|
|
4995
|
+
meta: { category: "plugins" },
|
|
4996
|
+
message: `Duplicate ${chalk.default.bold.cyanBright(plugin.name)} plugin dependency detected - Skipping initialization.`
|
|
4997
|
+
});
|
|
4989
4998
|
else {
|
|
4990
4999
|
result.push(plugin);
|
|
4991
|
-
this.context.trace(
|
|
5000
|
+
this.context.trace({
|
|
5001
|
+
meta: { category: "plugins" },
|
|
5002
|
+
message: `Initializing the ${chalk.default.bold.cyanBright(plugin.name)} plugin...`
|
|
5003
|
+
});
|
|
4992
5004
|
}
|
|
4993
5005
|
return result;
|
|
4994
5006
|
}
|
|
@@ -4881,10 +4881,16 @@ var PowerlinesExecution = class PowerlinesExecution {
|
|
|
4881
4881
|
*/
|
|
4882
4882
|
async getEnvironments() {
|
|
4883
4883
|
if (!this.context.config.environments || Object.keys(this.context.config.environments).length <= 1) {
|
|
4884
|
-
this.context.debug(
|
|
4884
|
+
this.context.debug({
|
|
4885
|
+
meta: { category: "config" },
|
|
4886
|
+
message: "No environments are configured for this Powerlines project. Using the default environment."
|
|
4887
|
+
});
|
|
4885
4888
|
return [await this.context.getEnvironment()];
|
|
4886
4889
|
}
|
|
4887
|
-
this.context.debug(
|
|
4890
|
+
this.context.debug({
|
|
4891
|
+
meta: { category: "config" },
|
|
4892
|
+
message: `Found ${Object.keys(this.context.config.environments).length} configured environment(s) for this Powerlines project.`
|
|
4893
|
+
});
|
|
4888
4894
|
return (await Promise.all(Object.entries(this.context.config.environments).map(async ([name, config]) => {
|
|
4889
4895
|
if (!await this.context.getEnvironmentSafe(name)) {
|
|
4890
4896
|
const resolvedEnvironment = await this.callHook("configEnvironment", { environment: name }, name, config);
|
|
@@ -4952,10 +4958,16 @@ var PowerlinesExecution = class PowerlinesExecution {
|
|
|
4952
4958
|
if (!plugins) throw new Error(`The plugin configuration ${JSON.stringify(awaited)} is invalid. This configuration must point to a valid Powerlines plugin module.`);
|
|
4953
4959
|
if (plugins.length > 0 && !plugins.every(isPlugin)) throw new Error(`The plugin option ${JSON.stringify(plugins)} does not export a valid module. This configuration must point to a valid Powerlines plugin module.`);
|
|
4954
4960
|
const result = [];
|
|
4955
|
-
for (const plugin of plugins) if (isDuplicate(plugin, this.context.plugins)) this.context.trace(
|
|
4961
|
+
for (const plugin of plugins) if (isDuplicate(plugin, this.context.plugins)) this.context.trace({
|
|
4962
|
+
meta: { category: "plugins" },
|
|
4963
|
+
message: `Duplicate ${chalk.bold.cyanBright(plugin.name)} plugin dependency detected - Skipping initialization.`
|
|
4964
|
+
});
|
|
4956
4965
|
else {
|
|
4957
4966
|
result.push(plugin);
|
|
4958
|
-
this.context.trace(
|
|
4967
|
+
this.context.trace({
|
|
4968
|
+
meta: { category: "plugins" },
|
|
4969
|
+
message: `Initializing the ${chalk.bold.cyanBright(plugin.name)} plugin...`
|
|
4970
|
+
});
|
|
4959
4971
|
}
|
|
4960
4972
|
return result;
|
|
4961
4973
|
}
|