@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.
@@ -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-Uid7ycTD.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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AqD3C,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,EAAg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AA,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,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,aAAA,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-pt2zvro6.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() {
@@ -1966,16 +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
- options: this.options,
1971
+ logLevel: this.initialOptions.logLevel,
1971
1972
  inlineConfig: this.inlineConfig,
1972
1973
  userConfig: this.userConfig,
1973
1974
  initialConfig: this.initialConfig,
1974
- pluginConfig: this.pluginConfig
1975
- }, getConfigProps(this.overriddenConfig), omit(this.options, ["mode", "framework"]), getConfigProps(this.inlineConfig), getConfigProps(this.userConfig), getConfigProps(this.initialConfig), getConfigProps(this.pluginConfig), {
1975
+ pluginConfig: this.pluginConfig,
1976
+ environmentConfig: this.environmentConfig
1977
+ }, getConfigProps(this.overriddenConfig), omit(this.options, [
1978
+ "name",
1979
+ "mode",
1980
+ "framework",
1981
+ "logLevel"
1982
+ ]), getConfigProps(this.inlineConfig), getConfigProps(this.userConfig), getConfigProps(this.initialConfig), getConfigProps(this.pluginConfig), {
1983
+ name: this.initialOptions.name,
1976
1984
  version: this.packageJson?.version,
1977
- description: this.packageJson?.description
1978
- }, {
1985
+ description: this.packageJson?.description,
1979
1986
  environments: {},
1980
1987
  resolve: {}
1981
1988
  });
@@ -2026,7 +2033,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
2026
2033
  const mergedConfig = this.mergeConfig();
2027
2034
  this.logger.trace({
2028
2035
  meta: { category: "config" },
2029
- 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)}`
2030
2037
  });
2031
2038
  mergedConfig.output = defu(mergedConfig.output ?? {}, {
2032
2039
  copy: { assets: [
@@ -2063,6 +2070,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
2063
2070
  if (!mergedConfig.logLevel) if (mergedConfig.mode === "development") mergedConfig.logLevel = DEFAULT_DEVELOPMENT_LOG_LEVEL;
2064
2071
  else if (mergedConfig.mode === "test") mergedConfig.logLevel = DEFAULT_TEST_LOG_LEVEL;
2065
2072
  else mergedConfig.logLevel = DEFAULT_PRODUCTION_LOG_LEVEL;
2073
+ mergedConfig.logLevel = resolveLogLevel(mergedConfig.logLevel);
2066
2074
  if (mergedConfig.tsconfig) mergedConfig.tsconfig = replacePath(replacePathTokens(this, mergedConfig.tsconfig), mergedConfig.cwd);
2067
2075
  else mergedConfig.tsconfig = getTsconfigFilePath(mergedConfig.cwd, mergedConfig.root);
2068
2076
  mergedConfig.output.format = getUnique(toArray(mergedConfig.output?.format ?? (mergedConfig.projectType === "library" ? ["cjs", "esm"] : ["esm"])));
@@ -2097,15 +2105,22 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
2097
2105
  this.#configProxy = this.createConfigProxy();
2098
2106
  this.logger.debug({
2099
2107
  meta: { category: "config" },
2100
- 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)}`
2101
2109
  });
2102
2110
  this.#fs ??= await VirtualFileSystem.create(this);
2103
2111
  }
2104
2112
  logConfig(config) {
2105
- return formatLogMessage({
2106
- ...omit(config, ["plugins"]),
2107
- 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
2108
- });
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");
2109
2124
  }
2110
2125
  createConfigProxy() {
2111
2126
  return new Proxy(this.resolvedConfig, {
@@ -2132,6 +2147,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
2132
2147
  if (key === "userConfig") return this.userConfig;
2133
2148
  if (key === "inlineConfig") return this.inlineConfig;
2134
2149
  if (key === "pluginConfig") return this.pluginConfig;
2150
+ if (key === "environmentConfig") return this.environmentConfig;
2135
2151
  }
2136
2152
  return Reflect.get(target, key, receiver);
2137
2153
  },
@@ -2401,14 +2417,14 @@ var PowerlinesEnvironmentContext = class PowerlinesEnvironmentContext extends Po
2401
2417
  /**
2402
2418
  * Create a new context from the config.
2403
2419
  *
2404
- * @param options - The resolved execution options.
2420
+ * @param initialOptions - The resolved execution options.
2405
2421
  * @param config - The user configuration options.
2406
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.
2407
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.
2408
2424
  * @returns A promise that resolves to an instance of the PowerlinesEnvironmentContext class, initialized with the provided configuration and environment data.
2409
2425
  */
2410
- static async createEnvironment(options, config, overriddenConfig, environment) {
2411
- const context = new PowerlinesEnvironmentContext(options, config, overriddenConfig);
2426
+ static async createEnvironment(initialOptions, config, overriddenConfig, environment) {
2427
+ const context = new PowerlinesEnvironmentContext(initialOptions, config, overriddenConfig);
2412
2428
  await context.setEnvironmentConfig(environment);
2413
2429
  return context;
2414
2430
  }
@@ -2714,7 +2730,7 @@ var PowerlinesExecutionContext = class PowerlinesExecutionContext extends Powerl
2714
2730
  * @returns A new context instance with the updated environment.
2715
2731
  */
2716
2732
  async createEnvironment(environment) {
2717
- 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));
2718
2734
  context.$$internal = this.$$internal;
2719
2735
  context.dependencies = deepClone(this.dependencies);
2720
2736
  context.devDependencies = deepClone(this.devDependencies);
@@ -2833,4 +2849,4 @@ var PowerlinesExecutionContext = class PowerlinesExecutionContext extends Powerl
2833
2849
 
2834
2850
  //#endregion
2835
2851
  export { mergeConfigs as a, callHook as i, PowerlinesEnvironmentContext as n, PowerlinesContext as o, createPluginContext as r, writeMetaFile as s, PowerlinesExecutionContext as t };
2836
- //# sourceMappingURL=execution-context-pt2zvro6.mjs.map
2852
+ //# sourceMappingURL=execution-context-Bb5pfsyN.mjs.map