@powerlines/engine 0.46.3 → 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.
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_base_context = require('../base-context-D7G_24-i.cjs');
3
3
  const require_engine_context = require('../engine-context-BuJQY312.cjs');
4
- const require_execution_context = require('../execution-context-xj0KA802.cjs');
4
+ const require_execution_context = require('../execution-context-Dxa103Qg.cjs');
5
5
 
6
6
  exports.PowerlinesBaseContext = require_base_context.PowerlinesBaseContext;
7
7
  exports.PowerlinesContext = require_execution_context.PowerlinesContext;
@@ -1,4 +1,4 @@
1
- import { n as PowerlinesContext, r as PowerlinesBaseContext, t as PowerlinesExecutionContext } from "../execution-context-CodQucFX.cjs";
1
+ import { n as PowerlinesContext, r as PowerlinesBaseContext, t as PowerlinesExecutionContext } from "../execution-context-CghMd-eP.cjs";
2
2
  import { EngineContext, EngineOptions, EnvironmentContextPlugin, EnvironmentResolvedConfig, ExecutionOptions, ExecutionState, HooksList, InferOverridableConfig, LogFn, LogLevelResolvedConfig, Logger, LoggerOptions, Plugin, PluginContext, ResolvedConfig, SelectHookResult, SelectHooksOptions, UserConfig } from "@powerlines/core";
3
3
  import { DeepPartial, RequiredKeys } from "@stryke/types/base";
4
4
  import { Unstable_ContextInternal, Unstable_EnvironmentContext, Unstable_PluginContext } from "@powerlines/core/types/_internal";
@@ -58,13 +58,13 @@ declare class PowerlinesEnvironmentContext<TResolvedConfig extends ResolvedConfi
58
58
  /**
59
59
  * Create a new context from the config.
60
60
  *
61
- * @param options - The resolved execution options.
61
+ * @param initialOptions - The resolved execution options.
62
62
  * @param config - The user configuration options.
63
63
  * @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.
64
64
  * @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.
65
65
  * @returns A promise that resolves to an instance of the PowerlinesEnvironmentContext class, initialized with the provided configuration and environment data.
66
66
  */
67
- static createEnvironment<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(options: ExecutionOptions, config: TResolvedConfig, overriddenConfig: InferOverridableConfig<EnvironmentResolvedConfig<TResolvedConfig>>, environment: EnvironmentResolvedConfig<TResolvedConfig>["environment"]): Promise<PowerlinesEnvironmentContext<TResolvedConfig>>;
67
+ static createEnvironment<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(initialOptions: ExecutionOptions, config: TResolvedConfig, overriddenConfig: InferOverridableConfig<EnvironmentResolvedConfig<TResolvedConfig>>, environment: EnvironmentResolvedConfig<TResolvedConfig>["environment"]): Promise<PowerlinesEnvironmentContext<TResolvedConfig>>;
68
68
  /**
69
69
  * The configuration options provided by plugins added by the user (and other plugins)
70
70
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/context/engine-context.ts","../../src/context/environment-context.ts","../../src/context/plugin-context.ts"],"mappings":";;;;;;cA8Ba,uBAAA,SACH,qBAAA,YACG,aAAA;EAAA;;AAFb;;;;;SAYsB,iBAAA,CAClB,OAAA,EAAS,aAAA,EACT,aAAA,GAAe,WAAA,CAAY,UAAA,IAC1B,OAAA,CAAQ,uBAAA;EAAA;;;EAAA,SAUc,cAAA,EAAgB,aAAA;EAKD;;;EAAA,SAAf,aAAA,EAAe,WAAA,CAAY,UAAA;EAYxC;;;EAPI,OAAA,EAAS,YAAA,CACvB,IAAA,CAAK,aAAA;IAsCsB;;;IAhC3B,QAAA,EAAU,sBAAA;EAAA;EAxCY;;;;;;EAAA,UAyDf,WAAA,CACP,OAAA,EAAS,aAAA,EACT,aAAA,GAAe,WAAA,CAAY,UAAA;EA/CZ;;;;;;EAAA,UA4DQ,IAAA,CAAA,GAAI,OAAA;EA5CJ;;;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D3C,WAAA,CACP,OAAA,EAAS,gBAAA,EACT,MAAA,EAAQ,eAAA,EACR,gBAAA,EAAkB,sBAAA,CAChB,yBAAA,CAA0B,eAAA;EApPnB;;;;;EAAA,UAsQQ,WAAA,CAAA,GAAe,yBAAA,CAA0B,eAAA;AAAA;;;;;;ADrU9D;;;;;iBEagB,mBAAA,yBACU,cAAA,GAAiB,cAAA,CAAA,CAEzC,QAAA,UACA,MAAA,EAAQ,MAAA,CAAO,aAAA,CAAc,eAAA,IAC7B,WAAA,EAAa,4BAAA,CAA6B,eAAA,IACzC,sBAAA,CAAuB,eAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/context/engine-context.ts","../../src/context/environment-context.ts","../../src/context/plugin-context.ts"],"mappings":";;;;;;cA8Ba,uBAAA,SACH,qBAAA,YACG,aAAA;EAAA;;AAFb;;;;;SAYsB,iBAAA,CAClB,OAAA,EAAS,aAAA,EACT,aAAA,GAAe,WAAA,CAAY,UAAA,IAC1B,OAAA,CAAQ,uBAAA;EAAA;;;EAAA,SAUc,cAAA,EAAgB,aAAA;EAKD;;;EAAA,SAAf,aAAA,EAAe,WAAA,CAAY,UAAA;EAYxC;;;EAPI,OAAA,EAAS,YAAA,CACvB,IAAA,CAAK,aAAA;IAsCsB;;;IAhC3B,QAAA,EAAU,sBAAA;EAAA;EAxCY;;;;;;EAAA,UAyDf,WAAA,CACP,OAAA,EAAS,aAAA,EACT,aAAA,GAAe,WAAA,CAAY,UAAA;EA/CZ;;;;;;EAAA,UA4DQ,IAAA,CAAA,GAAI,OAAA;EA5CJ;;;;;EAAA,IAmFd,UAAA,CAAA,GAAc,cAAA;AAAA;;;cCnFd,4BAAA,yBACa,cAAA,GAAiB,cAAA,UAEjC,iBAAA,CAAkB,yBAAA,CAA0B,eAAA,cACzC,2BAAA,CAA4B,eAAA;EAAA;;ADlCzC;;;;;;;;SC4DsB,iBAAA,yBACM,cAAA,GAAiB,cAAA,CAAA,CAEzC,cAAA,EAAgB,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,CAEzC,QAAA,UACA,MAAA,EAAQ,MAAA,CAAO,aAAA,CAAc,eAAA,IAC7B,WAAA,EAAa,4BAAA,CAA6B,eAAA,IACzC,sBAAA,CAAuB,eAAA"}
@@ -1,4 +1,4 @@
1
- import { n as PowerlinesContext, r as PowerlinesBaseContext, t as PowerlinesExecutionContext } from "../execution-context-BpRfsnkE.mjs";
1
+ import { n as PowerlinesContext, r as PowerlinesBaseContext, t as PowerlinesExecutionContext } from "../execution-context-rKd-zSZy.mjs";
2
2
  import { EngineContext, EngineOptions, EnvironmentContextPlugin, EnvironmentResolvedConfig, ExecutionOptions, ExecutionState, HooksList, InferOverridableConfig, LogFn, LogLevelResolvedConfig, Logger, LoggerOptions, Plugin, PluginContext, ResolvedConfig, SelectHookResult, SelectHooksOptions, UserConfig } from "@powerlines/core";
3
3
  import { DeepPartial, RequiredKeys } from "@stryke/types/base";
4
4
  import { Unstable_ContextInternal, Unstable_EnvironmentContext, Unstable_PluginContext } from "@powerlines/core/types/_internal";
@@ -58,13 +58,13 @@ declare class PowerlinesEnvironmentContext<TResolvedConfig extends ResolvedConfi
58
58
  /**
59
59
  * Create a new context from the config.
60
60
  *
61
- * @param options - The resolved execution options.
61
+ * @param initialOptions - The resolved execution options.
62
62
  * @param config - The user configuration options.
63
63
  * @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.
64
64
  * @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.
65
65
  * @returns A promise that resolves to an instance of the PowerlinesEnvironmentContext class, initialized with the provided configuration and environment data.
66
66
  */
67
- static createEnvironment<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(options: ExecutionOptions, config: TResolvedConfig, overriddenConfig: InferOverridableConfig<EnvironmentResolvedConfig<TResolvedConfig>>, environment: EnvironmentResolvedConfig<TResolvedConfig>["environment"]): Promise<PowerlinesEnvironmentContext<TResolvedConfig>>;
67
+ static createEnvironment<TResolvedConfig extends ResolvedConfig = ResolvedConfig>(initialOptions: ExecutionOptions, config: TResolvedConfig, overriddenConfig: InferOverridableConfig<EnvironmentResolvedConfig<TResolvedConfig>>, environment: EnvironmentResolvedConfig<TResolvedConfig>["environment"]): Promise<PowerlinesEnvironmentContext<TResolvedConfig>>;
68
68
  /**
69
69
  * The configuration options provided by plugins added by the user (and other plugins)
70
70
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/context/engine-context.ts","../../src/context/environment-context.ts","../../src/context/plugin-context.ts"],"mappings":";;;;;;cA8Ba,uBAAA,SACH,qBAAA,YACG,aAAA;EAAA;;AAFb;;;;;SAYsB,iBAAA,CAClB,OAAA,EAAS,aAAA,EACT,aAAA,GAAe,WAAA,CAAY,UAAA,IAC1B,OAAA,CAAQ,uBAAA;EAAA;;;EAAA,SAUc,cAAA,EAAgB,aAAA;EAKD;;;EAAA,SAAf,aAAA,EAAe,WAAA,CAAY,UAAA;EAYxC;;;EAPI,OAAA,EAAS,YAAA,CACvB,IAAA,CAAK,aAAA;IAsCsB;;;IAhC3B,QAAA,EAAU,sBAAA;EAAA;EAxCY;;;;;;EAAA,UAyDf,WAAA,CACP,OAAA,EAAS,aAAA,EACT,aAAA,GAAe,WAAA,CAAY,UAAA;EA/CZ;;;;;;EAAA,UA4DQ,IAAA,CAAA,GAAI,OAAA;EA5CJ;;;;;EAAA,IAmFd,UAAA,CAAA,GAAc,cAAA;AAAA;;;cCnFd,4BAAA,yBACa,cAAA,GAAiB,cAAA,UAEjC,iBAAA,CAAkB,yBAAA,CAA0B,eAAA,cACzC,2BAAA,CAA4B,eAAA;EAAA;;ADlCzC;;;;;;;;SC4DsB,iBAAA,yBACM,cAAA,GAAiB,cAAA,CAAA,CAEzC,OAAA,EAAS,gBAAA,EACT,MAAA,EAAQ,eAAA,EACR,gBAAA,EA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AAA,CAAc,eAAA,IAC7B,WAAA,EAAa,4BAAA,CAA6B,eAAA,IACzC,sBAAA,CAAuB,eAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/context/engine-context.ts","../../src/context/environment-context.ts","../../src/context/plugin-context.ts"],"mappings":";;;;;;cA8Ba,uBAAA,SACH,qBAAA,YACG,aAAA;EAAA;;AAFb;;;;;SAYsB,iBAAA,CAClB,OAAA,EAAS,aAAA,EACT,aAAA,GAAe,WAAA,CAAY,UAAA,IAC1B,OAAA,CAAQ,uBAAA;EAAA;;;EAAA,SAUc,cAAA,EAAgB,aAAA;EAKD;;;EAAA,SAAf,aAAA,EAAe,WAAA,CAAY,UAAA;EAYxC;;;EAPI,OAAA,EAAS,YAAA,CACvB,IAAA,CAAK,aAAA;IAsCsB;;;IAhC3B,QAAA,EAAU,sBAAA;EAAA;EAxCY;;;;;;EAAA,UAyDf,WAAA,CACP,OAAA,EAAS,aAAA,EACT,aAAA,GAAe,WAAA,CAAY,UAAA;EA/CZ;;;;;;EAAA,UA4DQ,IAAA,CAAA,GAAI,OAAA;EA5CJ;;;;;EAAA,IAmFd,UAAA,CAAA,GAAc,cAAA;AAAA;;;cCnFd,4BAAA,yBACa,cAAA,GAAiB,cAAA,UAEjC,iBAAA,CAAkB,yBAAA,CAA0B,eAAA,cACzC,2BAAA,CAA4B,eAAA;EAAA;;ADlCzC;;;;;;;;SC4DsB,iBAAA,yBACM,cAAA,GAAiB,cAAA,CAAA,CAEzC,cAAA,EAAgB,gBAAA,EAChB,MAAA,EAAQ,eAAA,EACR,gBAAA,EAAkB,sBAAA,CAChB,yBAAA,CAA0B,eAAA,IAE5B,WAAA,EAAa,yBAAA,CAA0B,eAAA,mBACtC,OAAA,CAAQ,4BAAA,CAA6B,eAAA;EDvCY;;;EAAA,UCqDjC,iBAAA,EAAmB,yBAAA,CAA0B,eAAA;EDhDvC;;;ECsDlB,OAAA,EAAS,wBAAA,CAAyB,eAAA;ED5BxB;;;;;;;;EAAA,ICsCN,UAAA,CAAA,GAAc,wBAAA,CAAyB,eAAA;;;;;;;;;MAYvC,UAAA,CAAW,KAAA,EAAO,wBAAA,CAAyB,eAAA;EDtF7B;;;EAAA,IC6Fd,EAAA,CAAA;EDxFyC;;;EAAA,IC+FzC,KAAA,CAAA,GAAS,MAAA,SAElB,SAAA,CAAU,aAAA,CAAc,eAAA;ED3FnB;;;;;;EAAA,UCsGS,oBAAA,CACd,MAAA,EAAQ,yBAAA,CAA0B,eAAA,mBACjC,OAAA;ED/E0B;;;;;;;ECgGb,YAAA,CAAa,OAAA,EAAS,aAAA,EAAe,KAAA,GAAQ,KAAA,GAAQ,MAAA;;;;AA/HvE;;;EA+IkB,YAAA,CAAa,OAAA,EAAS,aAAA,GAAgB,MAAA;EAOzC,SAAA,CACX,MAAA,EAAQ,MAAA,CAAO,aAAA,CAAc,eAAA,KAC5B,OAAA;EArJiD;;;EAsN7C,WAAA,qBAAA,CACL,GAAA,EAAK,IAAA,EACL,OAAA,GAAU,kBAAA,GACT,gBAAA,CAAiB,aAAA,CAAc,eAAA,GAAkB,IAAA;EAAA,UAqD3C,WAAA,CACP,OAAA,EAAS,gBAAA,EACT,MAAA,EAAQ,eAAA,EACR,gBAAA,EAAkB,sBAAA,CAChB,yBAAA,CAA0B,eAAA;EApPZ;;;;;EAAA,UAsQC,WAAA,CAAA,GAAe,yBAAA,CAA0B,eAAA;AAAA;;;;;;ADrU9D;;;;;iBEagB,mBAAA,yBACU,cAAA,GAAiB,cAAA,CAAA,CAEzC,QAAA,UACA,MAAA,EAAQ,MAAA,CAAO,aAAA,CAAc,eAAA,IAC7B,WAAA,EAAa,4BAAA,CAA6B,eAAA,IACzC,sBAAA,CAAuB,eAAA"}
@@ -1,5 +1,5 @@
1
1
  import { t as PowerlinesBaseContext } from "../base-context-DU0NRHDt.mjs";
2
2
  import { t as PowerlinesEngineContext } from "../engine-context-BvDfqfY7.mjs";
3
- import { n as PowerlinesEnvironmentContext, o as PowerlinesContext, r as createPluginContext, t as PowerlinesExecutionContext } from "../execution-context-Cu_xPYxI.mjs";
3
+ import { n as PowerlinesEnvironmentContext, o as PowerlinesContext, r as createPluginContext, t as PowerlinesExecutionContext } from "../execution-context-Bb5pfsyN.mjs";
4
4
 
5
5
  export { PowerlinesBaseContext, PowerlinesContext, PowerlinesEngineContext, PowerlinesEnvironmentContext, PowerlinesExecutionContext, createPluginContext };
@@ -2,7 +2,7 @@ import { t as PowerlinesBaseContext } from "./base-context-DU0NRHDt.mjs";
2
2
  import { a as FileSystem } from "./fs-D1nIP45P.mjs";
3
3
  import { n as FileSystemStorageAdapter, t as VirtualStorageAdapter } from "./virtual-CYGZHTDd.mjs";
4
4
  import { i as getTsconfigFilePath } from "./tsconfig-MeFEs21S.mjs";
5
- 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";
5
+ 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";
6
6
  import { toArray } from "@stryke/convert/to-array";
7
7
  import { getResolutionCombinations, resolve, resolveSync } from "@stryke/fs/resolve";
8
8
  import { joinPaths } from "@stryke/path/join";
@@ -22,7 +22,6 @@ import chalk from "chalk";
22
22
  import defu, { defu as defu$1 } from "defu";
23
23
  import { joinPaths as joinPaths$1 } from "@stryke/path/join-paths";
24
24
  import { format } from "@powerlines/core/lib/utilities/format";
25
- import { formatLogMessage } from "@storm-software/config-tools/logger/console";
26
25
  import { existsSync } from "@stryke/fs/exists";
27
26
  import { getUnique, getUniqueBy } from "@stryke/helpers/get-unique";
28
27
  import { omit } from "@stryke/helpers/omit";
@@ -31,7 +30,6 @@ import { isParentPath } from "@stryke/path/is-parent-path";
31
30
  import { titleCase } from "@stryke/string-format/title-case";
32
31
  import { isFunction } from "@stryke/type-checks/is-function";
33
32
  import { isObject } from "@stryke/type-checks/is-object";
34
- import { isPromise } from "@stryke/type-checks/is-promise";
35
33
  import { readJsonFile } from "@stryke/fs/json";
36
34
  import { deepClone } from "@stryke/helpers/deep-clone";
37
35
  import { getUniqueInputs, isTypeDefinition, resolveInputsSync } from "@powerlines/core/lib/entry";
@@ -46,7 +44,6 @@ import { create } from "flat-cache";
46
44
  import { parse } from "oxc-parser";
47
45
  import { Agent, Response, interceptors, setGlobalDispatcher } from "undici";
48
46
  import "@stryke/fs/remove-file";
49
- import { LogCategories } from "@powerlines/core";
50
47
  import * as capnp from "@stryke/capnp";
51
48
  import { readFileBuffer, readFileBufferSync, writeFileBuffer } from "@stryke/fs/buffer";
52
49
  import { correctPath, stripStars } from "@stryke/path/correct-path";
@@ -1288,7 +1285,8 @@ const UNRESOLVED_CONFIG_NAMES = [
1288
1285
  "initialConfig",
1289
1286
  "userConfig",
1290
1287
  "inlineConfig",
1291
- "pluginConfig"
1288
+ "pluginConfig",
1289
+ "environmentConfig"
1292
1290
  ];
1293
1291
  var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
1294
1292
  #checksum = null;
@@ -1355,6 +1353,10 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
1355
1353
  */
1356
1354
  pluginConfig = {};
1357
1355
  /**
1356
+ * The configuration options provided by the environment
1357
+ */
1358
+ environmentConfig = {};
1359
+ /**
1358
1360
  * The resolved entry type definitions for the project
1359
1361
  */
1360
1362
  get entry() {
@@ -1936,7 +1938,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
1936
1938
  * @returns A promise that resolves when the inline configuration values have been set.
1937
1939
  */
1938
1940
  async setInlineConfig(config) {
1939
- this.logger.trace({
1941
+ this.logger.debug({
1940
1942
  meta: { category: "config" },
1941
1943
  message: `Updating inline configuration object: \n${this.logConfig(config)}`
1942
1944
  });
@@ -1950,7 +1952,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
1950
1952
  * @returns A promise that resolves when the plugin configuration values have been set.
1951
1953
  */
1952
1954
  async setPluginConfig(config) {
1953
- this.logger.trace({
1955
+ this.logger.debug({
1954
1956
  meta: { category: "config" },
1955
1957
  message: `Updating plugin configuration object: \n${this.logConfig(config)}`
1956
1958
  });
@@ -1966,21 +1968,21 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
1966
1968
  return mergeConfig({
1967
1969
  mode: this.initialOptions.mode,
1968
1970
  framework: this.initialOptions.framework,
1969
- initialOptions: this.initialOptions,
1970
1971
  logLevel: this.initialOptions.logLevel,
1971
- options: this.options,
1972
1972
  inlineConfig: this.inlineConfig,
1973
1973
  userConfig: this.userConfig,
1974
1974
  initialConfig: this.initialConfig,
1975
- pluginConfig: this.pluginConfig
1975
+ pluginConfig: this.pluginConfig,
1976
+ environmentConfig: this.environmentConfig
1976
1977
  }, getConfigProps(this.overriddenConfig), omit(this.options, [
1978
+ "name",
1977
1979
  "mode",
1978
1980
  "framework",
1979
1981
  "logLevel"
1980
1982
  ]), getConfigProps(this.inlineConfig), getConfigProps(this.userConfig), getConfigProps(this.initialConfig), getConfigProps(this.pluginConfig), {
1983
+ name: this.initialOptions.name,
1981
1984
  version: this.packageJson?.version,
1982
- description: this.packageJson?.description
1983
- }, {
1985
+ description: this.packageJson?.description,
1984
1986
  environments: {},
1985
1987
  resolve: {}
1986
1988
  });
@@ -1992,7 +1994,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
1992
1994
  * @returns A promise that resolves when the user configuration values have been set.
1993
1995
  */
1994
1996
  async setUserConfig(config) {
1995
- this.logger.trace({
1997
+ this.logger.debug({
1996
1998
  meta: { category: "config" },
1997
1999
  message: `Updating user configuration object: \n${this.logConfig(config)}`
1998
2000
  });
@@ -2031,7 +2033,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
2031
2033
  const mergedConfig = this.mergeConfig();
2032
2034
  this.logger.trace({
2033
2035
  meta: { category: "config" },
2034
- 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)}`
2036
+ 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)}`
2035
2037
  });
2036
2038
  mergedConfig.output = defu(mergedConfig.output ?? {}, {
2037
2039
  copy: { assets: [
@@ -2103,15 +2105,22 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
2103
2105
  this.#configProxy = this.createConfigProxy();
2104
2106
  this.logger.debug({
2105
2107
  meta: { category: "config" },
2106
- 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)}`
2108
+ message: `Resolved Powerlines configuration object: \n${this.logConfig(this.resolvedConfig)}`
2107
2109
  });
2108
2110
  this.#fs ??= await VirtualFileSystem.create(this);
2109
2111
  }
2110
2112
  logConfig(config) {
2111
- return formatLogMessage({
2112
- ...omit(config, ["plugins"]),
2113
- 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
2114
- });
2113
+ return JSON.stringify({
2114
+ ...omit(config, [
2115
+ "plugins",
2116
+ "initialConfig",
2117
+ "userConfig",
2118
+ "inlineConfig",
2119
+ "pluginConfig",
2120
+ "environmentConfig"
2121
+ ]),
2122
+ 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>")) : []
2123
+ }, null, 2).replace(/"([^"]+)":/g, "$1:").replace(/: "([^"]+)"/g, ": $1");
2115
2124
  }
2116
2125
  createConfigProxy() {
2117
2126
  return new Proxy(this.resolvedConfig, {
@@ -2138,6 +2147,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
2138
2147
  if (key === "userConfig") return this.userConfig;
2139
2148
  if (key === "inlineConfig") return this.inlineConfig;
2140
2149
  if (key === "pluginConfig") return this.pluginConfig;
2150
+ if (key === "environmentConfig") return this.environmentConfig;
2141
2151
  }
2142
2152
  return Reflect.get(target, key, receiver);
2143
2153
  },
@@ -2407,14 +2417,14 @@ var PowerlinesEnvironmentContext = class PowerlinesEnvironmentContext extends Po
2407
2417
  /**
2408
2418
  * Create a new context from the config.
2409
2419
  *
2410
- * @param options - The resolved execution options.
2420
+ * @param initialOptions - The resolved execution options.
2411
2421
  * @param config - The user configuration options.
2412
2422
  * @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.
2413
2423
  * @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.
2414
2424
  * @returns A promise that resolves to an instance of the PowerlinesEnvironmentContext class, initialized with the provided configuration and environment data.
2415
2425
  */
2416
- static async createEnvironment(options, config, overriddenConfig, environment) {
2417
- const context = new PowerlinesEnvironmentContext(options, config, overriddenConfig);
2426
+ static async createEnvironment(initialOptions, config, overriddenConfig, environment) {
2427
+ const context = new PowerlinesEnvironmentContext(initialOptions, config, overriddenConfig);
2418
2428
  await context.setEnvironmentConfig(environment);
2419
2429
  return context;
2420
2430
  }
@@ -2467,7 +2477,7 @@ var PowerlinesEnvironmentContext = class PowerlinesEnvironmentContext extends Po
2467
2477
  * @returns A promise that resolves when the environment configuration values have been set.
2468
2478
  */
2469
2479
  async setEnvironmentConfig(config) {
2470
- this.logger.trace({
2480
+ this.logger.debug({
2471
2481
  meta: { category: "config" },
2472
2482
  message: `Updating environment configuration object: \n${this.logConfig(config)}`
2473
2483
  });
@@ -2720,7 +2730,7 @@ var PowerlinesExecutionContext = class PowerlinesExecutionContext extends Powerl
2720
2730
  * @returns A new context instance with the updated environment.
2721
2731
  */
2722
2732
  async createEnvironment(environment) {
2723
- const context = await PowerlinesEnvironmentContext.createEnvironment(deepClone(this.options), deepClone(this.config), deepClone(this.overriddenConfig), deepClone(environment));
2733
+ const context = await PowerlinesEnvironmentContext.createEnvironment(deepClone(this.initialOptions), deepClone(this.config), deepClone(this.overriddenConfig), deepClone(environment));
2724
2734
  context.$$internal = this.$$internal;
2725
2735
  context.dependencies = deepClone(this.dependencies);
2726
2736
  context.devDependencies = deepClone(this.devDependencies);
@@ -2839,4 +2849,4 @@ var PowerlinesExecutionContext = class PowerlinesExecutionContext extends Powerl
2839
2849
 
2840
2850
  //#endregion
2841
2851
  export { mergeConfigs as a, callHook as i, PowerlinesEnvironmentContext as n, PowerlinesContext as o, createPluginContext as r, writeMetaFile as s, PowerlinesExecutionContext as t };
2842
- //# sourceMappingURL=execution-context-Cu_xPYxI.mjs.map
2852
+ //# sourceMappingURL=execution-context-Bb5pfsyN.mjs.map