@powerlines/engine 0.46.2 → 0.46.4

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.
@@ -82,7 +82,6 @@ let oxc_parser = require("oxc-parser");
82
82
  let undici = require("undici");
83
83
  require("@stryke/fs/remove-file");
84
84
  let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
85
- let _powerlines_core = require("@powerlines/core");
86
85
  let jest_worker = require("jest-worker");
87
86
  let _stryke_capnp = require("@stryke/capnp");
88
87
  _stryke_capnp = __toESM(_stryke_capnp, 1);
@@ -217,7 +216,7 @@ function formatWriteLogMessage(context, meta, message) {
217
216
  payload: {
218
217
  meta: {
219
218
  type: combinedMeta.type,
220
- category: combinedMeta.category || _powerlines_core.LogCategories.GENERAL,
219
+ category: combinedMeta.category || _powerlines_core_constants.LogCategories.GENERAL,
221
220
  logId: combinedMeta.logId || (0, _stryke_unique_id_uuid.uuid)(),
222
221
  timestamp: combinedMeta.timestamp ?? Date.now(),
223
222
  name: combinedMeta.name || context.config.name,
@@ -2477,7 +2476,8 @@ const UNRESOLVED_CONFIG_NAMES = [
2477
2476
  "initialConfig",
2478
2477
  "userConfig",
2479
2478
  "inlineConfig",
2480
- "pluginConfig"
2479
+ "pluginConfig",
2480
+ "environmentConfig"
2481
2481
  ];
2482
2482
  var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
2483
2483
  #checksum = null;
@@ -2544,6 +2544,10 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
2544
2544
  */
2545
2545
  pluginConfig = {};
2546
2546
  /**
2547
+ * The configuration options provided by the environment
2548
+ */
2549
+ environmentConfig = {};
2550
+ /**
2547
2551
  * The resolved entry type definitions for the project
2548
2552
  */
2549
2553
  get entry() {
@@ -3155,16 +3159,21 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
3155
3159
  return (0, _powerlines_core_plugin_utils.mergeConfig)({
3156
3160
  mode: this.initialOptions.mode,
3157
3161
  framework: this.initialOptions.framework,
3158
- initialOptions: this.initialOptions,
3159
- options: this.options,
3162
+ logLevel: this.initialOptions.logLevel,
3160
3163
  inlineConfig: this.inlineConfig,
3161
3164
  userConfig: this.userConfig,
3162
3165
  initialConfig: this.initialConfig,
3163
- pluginConfig: this.pluginConfig
3164
- }, getConfigProps(this.overriddenConfig), (0, _stryke_helpers_omit.omit)(this.options, ["mode", "framework"]), getConfigProps(this.inlineConfig), getConfigProps(this.userConfig), getConfigProps(this.initialConfig), getConfigProps(this.pluginConfig), {
3166
+ pluginConfig: this.pluginConfig,
3167
+ environmentConfig: this.environmentConfig
3168
+ }, getConfigProps(this.overriddenConfig), (0, _stryke_helpers_omit.omit)(this.options, [
3169
+ "name",
3170
+ "mode",
3171
+ "framework",
3172
+ "logLevel"
3173
+ ]), getConfigProps(this.inlineConfig), getConfigProps(this.userConfig), getConfigProps(this.initialConfig), getConfigProps(this.pluginConfig), {
3174
+ name: this.initialOptions.name,
3165
3175
  version: this.packageJson?.version,
3166
- description: this.packageJson?.description
3167
- }, {
3176
+ description: this.packageJson?.description,
3168
3177
  environments: {},
3169
3178
  resolve: {}
3170
3179
  });
@@ -3215,7 +3224,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
3215
3224
  const mergedConfig = this.mergeConfig();
3216
3225
  this.logger.trace({
3217
3226
  meta: { category: "config" },
3218
- message: `Pre-setup Powerlines configuration object: \n --- Pre-Resolved Config --- \n${this.logConfig(mergedConfig)} \n --- Initial Config --- \n${this.logConfig(this.initialConfig)} \n --- User Config --- \n${this.logConfig(this.userConfig)} \n --- Inline Config --- \n${this.logConfig(this.inlineConfig)} \n --- Plugin Config --- \n${this.logConfig(this.pluginConfig)}`
3227
+ message: `Pre-setup Powerlines configuration object: \n --- Merged Config --- \n\n${this.logConfig(mergedConfig)} \n\n --- Initial Options --- \n\n${this.logConfig(this.initialOptions)} \n\n --- Initial Config --- \n\n${this.logConfig(this.initialConfig)} \n\n --- User Config --- \n\n${this.logConfig(this.userConfig)} \n\n --- Inline Config --- \n\n${this.logConfig(this.inlineConfig)} \n\n --- Plugin Config --- \n\n${this.logConfig(this.pluginConfig)} \n\n --- Environment Config --- \n\n${this.logConfig(this.environmentConfig)} \n\n --- Overridden Config --- \n\n${this.logConfig(this.overriddenConfig)}`
3219
3228
  });
3220
3229
  mergedConfig.output = (0, defu.default)(mergedConfig.output ?? {}, {
3221
3230
  copy: { assets: [
@@ -3252,6 +3261,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
3252
3261
  if (!mergedConfig.logLevel) if (mergedConfig.mode === "development") mergedConfig.logLevel = _powerlines_core_constants.DEFAULT_DEVELOPMENT_LOG_LEVEL;
3253
3262
  else if (mergedConfig.mode === "test") mergedConfig.logLevel = _powerlines_core_constants.DEFAULT_TEST_LOG_LEVEL;
3254
3263
  else mergedConfig.logLevel = _powerlines_core_constants.DEFAULT_PRODUCTION_LOG_LEVEL;
3264
+ mergedConfig.logLevel = (0, _powerlines_core_plugin_utils.resolveLogLevel)(mergedConfig.logLevel);
3255
3265
  if (mergedConfig.tsconfig) mergedConfig.tsconfig = (0, _stryke_path_replace.replacePath)((0, _powerlines_core_plugin_utils.replacePathTokens)(this, mergedConfig.tsconfig), mergedConfig.cwd);
3256
3266
  else mergedConfig.tsconfig = getTsconfigFilePath(mergedConfig.cwd, mergedConfig.root);
3257
3267
  mergedConfig.output.format = (0, _stryke_helpers_get_unique.getUnique)((0, _stryke_convert_to_array.toArray)(mergedConfig.output?.format ?? (mergedConfig.projectType === "library" ? ["cjs", "esm"] : ["esm"])));
@@ -3286,15 +3296,22 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
3286
3296
  this.#configProxy = this.createConfigProxy();
3287
3297
  this.logger.debug({
3288
3298
  meta: { category: "config" },
3289
- message: `Resolved Powerlines configuration object: \n --- Resolved Config --- \n${this.logConfig(this.resolvedConfig)} \n --- Initial Config --- \n${this.logConfig(this.initialConfig)} \n --- User Config --- \n${this.logConfig(this.userConfig)} \n --- Inline Config --- \n${this.logConfig(this.inlineConfig)} \n --- Plugin Config --- \n${this.logConfig(this.pluginConfig)}`
3299
+ message: `Resolved Powerlines configuration object: \n${this.logConfig(this.resolvedConfig)}`
3290
3300
  });
3291
3301
  this.#fs ??= await VirtualFileSystem.create(this);
3292
3302
  }
3293
3303
  logConfig(config) {
3294
- return (0, _storm_software_config_tools_logger_console.formatLogMessage)({
3295
- ...(0, _stryke_helpers_omit.omit)(config, ["plugins"]),
3296
- plugins: config.plugins ? config.plugins.flatMap((plugin) => (0, _stryke_convert_to_array.toArray)(plugin)).map((plugin) => String((0, _stryke_type_checks_is_set_string.isSetString)(plugin) ? plugin : (0, _stryke_type_checks_is_promise.isPromise)(plugin) ? "<promise>" : (0, _stryke_type_checks_is_function.isFunction)(plugin) ? plugin.name || "<anonymous function>" : Array.isArray(plugin) ? plugin[0] || "<anonymous function plugin>" : "<unknown plugin>")) : void 0
3297
- });
3304
+ return JSON.stringify({
3305
+ ...(0, _stryke_helpers_omit.omit)(config, [
3306
+ "plugins",
3307
+ "initialConfig",
3308
+ "userConfig",
3309
+ "inlineConfig",
3310
+ "pluginConfig",
3311
+ "environmentConfig"
3312
+ ]),
3313
+ plugins: config.plugins ? config.plugins.flatMap((plugin) => (0, _stryke_convert_to_array.toArray)(plugin)).map((plugin) => String((0, _stryke_type_checks_is_set_string.isSetString)(plugin) ? plugin : (0, _stryke_type_checks_is_set_object.isSetObject)(plugin) && (0, _stryke_type_checks_is_set_string.isSetString)(plugin.name) ? plugin.name : Array.isArray(plugin) && (0, _stryke_type_checks_is_set_string.isSetString)(plugin[0]) ? plugin[0] : "<function-plugin>")) : []
3314
+ }, null, 2).replace(/"([^"]+)":/g, "$1:").replace(/: "([^"]+)"/g, ": $1");
3298
3315
  }
3299
3316
  createConfigProxy() {
3300
3317
  return new Proxy(this.resolvedConfig, {
@@ -3321,6 +3338,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
3321
3338
  if (key === "userConfig") return this.userConfig;
3322
3339
  if (key === "inlineConfig") return this.inlineConfig;
3323
3340
  if (key === "pluginConfig") return this.pluginConfig;
3341
+ if (key === "environmentConfig") return this.environmentConfig;
3324
3342
  }
3325
3343
  return Reflect.get(target, key, receiver);
3326
3344
  },
@@ -3590,14 +3608,14 @@ var PowerlinesEnvironmentContext = class PowerlinesEnvironmentContext extends Po
3590
3608
  /**
3591
3609
  * Create a new context from the config.
3592
3610
  *
3593
- * @param options - The resolved execution options.
3611
+ * @param initialOptions - The resolved execution options.
3594
3612
  * @param config - The user configuration options.
3595
3613
  * @param overriddenConfig - The configuration options that should override all other configuration sources, such as CLI flags or environment variables. This is used to ensure that certain configuration values take precedence over any other settings defined in the user configuration or environment configuration, allowing for dynamic overrides based on the execution context.
3596
3614
  * @param environment - The resolved environment configuration, which may include additional properties or modifications made during the configuration loading process. This is used to provide context about the environment in which the command is being executed, allowing for environment-specific behavior and configuration resolution.
3597
3615
  * @returns A promise that resolves to an instance of the PowerlinesEnvironmentContext class, initialized with the provided configuration and environment data.
3598
3616
  */
3599
- static async createEnvironment(options, config, overriddenConfig, environment) {
3600
- const context = new PowerlinesEnvironmentContext(options, config, overriddenConfig);
3617
+ static async createEnvironment(initialOptions, config, overriddenConfig, environment) {
3618
+ const context = new PowerlinesEnvironmentContext(initialOptions, config, overriddenConfig);
3601
3619
  await context.setEnvironmentConfig(environment);
3602
3620
  return context;
3603
3621
  }
@@ -3903,7 +3921,7 @@ var PowerlinesExecutionContext = class PowerlinesExecutionContext extends Powerl
3903
3921
  * @returns A new context instance with the updated environment.
3904
3922
  */
3905
3923
  async createEnvironment(environment) {
3906
- const context = await PowerlinesEnvironmentContext.createEnvironment((0, _stryke_helpers_deep_clone.deepClone)(this.options), (0, _stryke_helpers_deep_clone.deepClone)(this.config), (0, _stryke_helpers_deep_clone.deepClone)(this.overriddenConfig), (0, _stryke_helpers_deep_clone.deepClone)(environment));
3924
+ const context = await PowerlinesEnvironmentContext.createEnvironment((0, _stryke_helpers_deep_clone.deepClone)(this.initialOptions), (0, _stryke_helpers_deep_clone.deepClone)(this.config), (0, _stryke_helpers_deep_clone.deepClone)(this.overriddenConfig), (0, _stryke_helpers_deep_clone.deepClone)(environment));
3907
3925
  context.$$internal = this.$$internal;
3908
3926
  context.dependencies = (0, _stryke_helpers_deep_clone.deepClone)(this.dependencies);
3909
3927
  context.devDependencies = (0, _stryke_helpers_deep_clone.deepClone)(this.devDependencies);
@@ -4885,6 +4903,10 @@ var PowerlinesExecution = class PowerlinesExecution {
4885
4903
  merge: mergeConfigs
4886
4904
  });
4887
4905
  if (pluginConfig) await this.context.setPluginConfig(pluginConfig);
4906
+ else this.context.debug({
4907
+ meta: { category: "config" },
4908
+ message: "No plugin configuration was returned from the config hook."
4909
+ });
4888
4910
  timer();
4889
4911
  }
4890
4912
  /**
@@ -24,7 +24,7 @@ import { isError } from "@stryke/type-checks/is-error";
24
24
  import { isFunction } from "@stryke/type-checks/is-function";
25
25
  import { isNumber } from "@stryke/type-checks/is-number";
26
26
  import { isObject } from "@stryke/type-checks/is-object";
27
- import { isPromise, isPromiseLike } from "@stryke/type-checks/is-promise";
27
+ import { isPromiseLike } from "@stryke/type-checks/is-promise";
28
28
  import { isSet } from "@stryke/type-checks/is-set";
29
29
  import { isSetObject } from "@stryke/type-checks/is-set-object";
30
30
  import { isSetString } from "@stryke/type-checks/is-set-string";
@@ -32,7 +32,7 @@ import { isString } from "@stryke/type-checks/is-string";
32
32
  import chalk from "chalk";
33
33
  import defu, { defu as defu$1 } from "defu";
34
34
  import Handlebars from "handlebars";
35
- import { CACHE_HASH_LENGTH, DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_ENVIRONMENT, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL, GLOBAL_ENVIRONMENT, PLUGIN_NON_HOOK_FIELDS, ROOT_HASH_LENGTH } from "@powerlines/core/constants";
35
+ import { CACHE_HASH_LENGTH, DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_ENVIRONMENT, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL, GLOBAL_ENVIRONMENT, LogCategories, PLUGIN_NON_HOOK_FIELDS, ROOT_HASH_LENGTH } from "@powerlines/core/constants";
36
36
  import { readJsonFile, readJsonFileSync } from "@stryke/fs/json";
37
37
  import { deepClone } from "@stryke/helpers/deep-clone";
38
38
  import { joinPaths as joinPaths$1 } from "@stryke/path/join";
@@ -51,7 +51,6 @@ import { parse } from "oxc-parser";
51
51
  import { Agent, Response, interceptors, setGlobalDispatcher } from "undici";
52
52
  import "@stryke/fs/remove-file";
53
53
  import { kebabCase } from "@stryke/string-format/kebab-case";
54
- import { LogCategories } from "@powerlines/core";
55
54
  import { messageParent } from "jest-worker";
56
55
  import * as $ from "@stryke/capnp";
57
56
  import { readFileBuffer, readFileBufferSync, writeFileBuffer } from "@stryke/fs/buffer";
@@ -2444,7 +2443,8 @@ const UNRESOLVED_CONFIG_NAMES = [
2444
2443
  "initialConfig",
2445
2444
  "userConfig",
2446
2445
  "inlineConfig",
2447
- "pluginConfig"
2446
+ "pluginConfig",
2447
+ "environmentConfig"
2448
2448
  ];
2449
2449
  var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
2450
2450
  #checksum = null;
@@ -2511,6 +2511,10 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
2511
2511
  */
2512
2512
  pluginConfig = {};
2513
2513
  /**
2514
+ * The configuration options provided by the environment
2515
+ */
2516
+ environmentConfig = {};
2517
+ /**
2514
2518
  * The resolved entry type definitions for the project
2515
2519
  */
2516
2520
  get entry() {
@@ -3122,16 +3126,21 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
3122
3126
  return mergeConfig({
3123
3127
  mode: this.initialOptions.mode,
3124
3128
  framework: this.initialOptions.framework,
3125
- initialOptions: this.initialOptions,
3126
- options: this.options,
3129
+ logLevel: this.initialOptions.logLevel,
3127
3130
  inlineConfig: this.inlineConfig,
3128
3131
  userConfig: this.userConfig,
3129
3132
  initialConfig: this.initialConfig,
3130
- pluginConfig: this.pluginConfig
3131
- }, getConfigProps(this.overriddenConfig), omit(this.options, ["mode", "framework"]), getConfigProps(this.inlineConfig), getConfigProps(this.userConfig), getConfigProps(this.initialConfig), getConfigProps(this.pluginConfig), {
3133
+ pluginConfig: this.pluginConfig,
3134
+ environmentConfig: this.environmentConfig
3135
+ }, getConfigProps(this.overriddenConfig), omit(this.options, [
3136
+ "name",
3137
+ "mode",
3138
+ "framework",
3139
+ "logLevel"
3140
+ ]), getConfigProps(this.inlineConfig), getConfigProps(this.userConfig), getConfigProps(this.initialConfig), getConfigProps(this.pluginConfig), {
3141
+ name: this.initialOptions.name,
3132
3142
  version: this.packageJson?.version,
3133
- description: this.packageJson?.description
3134
- }, {
3143
+ description: this.packageJson?.description,
3135
3144
  environments: {},
3136
3145
  resolve: {}
3137
3146
  });
@@ -3182,7 +3191,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
3182
3191
  const mergedConfig = this.mergeConfig();
3183
3192
  this.logger.trace({
3184
3193
  meta: { category: "config" },
3185
- message: `Pre-setup Powerlines configuration object: \n --- Pre-Resolved Config --- \n${this.logConfig(mergedConfig)} \n --- Initial Config --- \n${this.logConfig(this.initialConfig)} \n --- User Config --- \n${this.logConfig(this.userConfig)} \n --- Inline Config --- \n${this.logConfig(this.inlineConfig)} \n --- Plugin Config --- \n${this.logConfig(this.pluginConfig)}`
3194
+ message: `Pre-setup Powerlines configuration object: \n --- Merged Config --- \n\n${this.logConfig(mergedConfig)} \n\n --- Initial Options --- \n\n${this.logConfig(this.initialOptions)} \n\n --- Initial Config --- \n\n${this.logConfig(this.initialConfig)} \n\n --- User Config --- \n\n${this.logConfig(this.userConfig)} \n\n --- Inline Config --- \n\n${this.logConfig(this.inlineConfig)} \n\n --- Plugin Config --- \n\n${this.logConfig(this.pluginConfig)} \n\n --- Environment Config --- \n\n${this.logConfig(this.environmentConfig)} \n\n --- Overridden Config --- \n\n${this.logConfig(this.overriddenConfig)}`
3186
3195
  });
3187
3196
  mergedConfig.output = defu(mergedConfig.output ?? {}, {
3188
3197
  copy: { assets: [
@@ -3219,6 +3228,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
3219
3228
  if (!mergedConfig.logLevel) if (mergedConfig.mode === "development") mergedConfig.logLevel = DEFAULT_DEVELOPMENT_LOG_LEVEL;
3220
3229
  else if (mergedConfig.mode === "test") mergedConfig.logLevel = DEFAULT_TEST_LOG_LEVEL;
3221
3230
  else mergedConfig.logLevel = DEFAULT_PRODUCTION_LOG_LEVEL;
3231
+ mergedConfig.logLevel = resolveLogLevel(mergedConfig.logLevel);
3222
3232
  if (mergedConfig.tsconfig) mergedConfig.tsconfig = replacePath(replacePathTokens(this, mergedConfig.tsconfig), mergedConfig.cwd);
3223
3233
  else mergedConfig.tsconfig = getTsconfigFilePath(mergedConfig.cwd, mergedConfig.root);
3224
3234
  mergedConfig.output.format = getUnique(toArray(mergedConfig.output?.format ?? (mergedConfig.projectType === "library" ? ["cjs", "esm"] : ["esm"])));
@@ -3253,15 +3263,22 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
3253
3263
  this.#configProxy = this.createConfigProxy();
3254
3264
  this.logger.debug({
3255
3265
  meta: { category: "config" },
3256
- message: `Resolved Powerlines configuration object: \n --- Resolved Config --- \n${this.logConfig(this.resolvedConfig)} \n --- Initial Config --- \n${this.logConfig(this.initialConfig)} \n --- User Config --- \n${this.logConfig(this.userConfig)} \n --- Inline Config --- \n${this.logConfig(this.inlineConfig)} \n --- Plugin Config --- \n${this.logConfig(this.pluginConfig)}`
3266
+ message: `Resolved Powerlines configuration object: \n${this.logConfig(this.resolvedConfig)}`
3257
3267
  });
3258
3268
  this.#fs ??= await VirtualFileSystem.create(this);
3259
3269
  }
3260
3270
  logConfig(config) {
3261
- return formatLogMessage({
3262
- ...omit(config, ["plugins"]),
3263
- plugins: config.plugins ? config.plugins.flatMap((plugin) => toArray(plugin)).map((plugin) => String(isSetString(plugin) ? plugin : isPromise(plugin) ? "<promise>" : isFunction(plugin) ? plugin.name || "<anonymous function>" : Array.isArray(plugin) ? plugin[0] || "<anonymous function plugin>" : "<unknown plugin>")) : void 0
3264
- });
3271
+ return JSON.stringify({
3272
+ ...omit(config, [
3273
+ "plugins",
3274
+ "initialConfig",
3275
+ "userConfig",
3276
+ "inlineConfig",
3277
+ "pluginConfig",
3278
+ "environmentConfig"
3279
+ ]),
3280
+ plugins: config.plugins ? config.plugins.flatMap((plugin) => toArray(plugin)).map((plugin) => String(isSetString(plugin) ? plugin : isSetObject(plugin) && isSetString(plugin.name) ? plugin.name : Array.isArray(plugin) && isSetString(plugin[0]) ? plugin[0] : "<function-plugin>")) : []
3281
+ }, null, 2).replace(/"([^"]+)":/g, "$1:").replace(/: "([^"]+)"/g, ": $1");
3265
3282
  }
3266
3283
  createConfigProxy() {
3267
3284
  return new Proxy(this.resolvedConfig, {
@@ -3288,6 +3305,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
3288
3305
  if (key === "userConfig") return this.userConfig;
3289
3306
  if (key === "inlineConfig") return this.inlineConfig;
3290
3307
  if (key === "pluginConfig") return this.pluginConfig;
3308
+ if (key === "environmentConfig") return this.environmentConfig;
3291
3309
  }
3292
3310
  return Reflect.get(target, key, receiver);
3293
3311
  },
@@ -3557,14 +3575,14 @@ var PowerlinesEnvironmentContext = class PowerlinesEnvironmentContext extends Po
3557
3575
  /**
3558
3576
  * Create a new context from the config.
3559
3577
  *
3560
- * @param options - The resolved execution options.
3578
+ * @param initialOptions - The resolved execution options.
3561
3579
  * @param config - The user configuration options.
3562
3580
  * @param overriddenConfig - The configuration options that should override all other configuration sources, such as CLI flags or environment variables. This is used to ensure that certain configuration values take precedence over any other settings defined in the user configuration or environment configuration, allowing for dynamic overrides based on the execution context.
3563
3581
  * @param environment - The resolved environment configuration, which may include additional properties or modifications made during the configuration loading process. This is used to provide context about the environment in which the command is being executed, allowing for environment-specific behavior and configuration resolution.
3564
3582
  * @returns A promise that resolves to an instance of the PowerlinesEnvironmentContext class, initialized with the provided configuration and environment data.
3565
3583
  */
3566
- static async createEnvironment(options, config, overriddenConfig, environment) {
3567
- const context = new PowerlinesEnvironmentContext(options, config, overriddenConfig);
3584
+ static async createEnvironment(initialOptions, config, overriddenConfig, environment) {
3585
+ const context = new PowerlinesEnvironmentContext(initialOptions, config, overriddenConfig);
3568
3586
  await context.setEnvironmentConfig(environment);
3569
3587
  return context;
3570
3588
  }
@@ -3870,7 +3888,7 @@ var PowerlinesExecutionContext = class PowerlinesExecutionContext extends Powerl
3870
3888
  * @returns A new context instance with the updated environment.
3871
3889
  */
3872
3890
  async createEnvironment(environment) {
3873
- const context = await PowerlinesEnvironmentContext.createEnvironment(deepClone(this.options), deepClone(this.config), deepClone(this.overriddenConfig), deepClone(environment));
3891
+ const context = await PowerlinesEnvironmentContext.createEnvironment(deepClone(this.initialOptions), deepClone(this.config), deepClone(this.overriddenConfig), deepClone(environment));
3874
3892
  context.$$internal = this.$$internal;
3875
3893
  context.dependencies = deepClone(this.dependencies);
3876
3894
  context.devDependencies = deepClone(this.devDependencies);
@@ -4852,6 +4870,10 @@ var PowerlinesExecution = class PowerlinesExecution {
4852
4870
  merge: mergeConfigs
4853
4871
  });
4854
4872
  if (pluginConfig) await this.context.setPluginConfig(pluginConfig);
4873
+ else this.context.debug({
4874
+ meta: { category: "config" },
4875
+ message: "No plugin configuration was returned from the config hook."
4876
+ });
4855
4877
  timer();
4856
4878
  }
4857
4879
  /**