@powerlines/engine 0.46.5 → 0.46.6
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 +8 -39
- package/dist/_internal/worker.mjs +9 -40
- package/dist/_internal/worker.mjs.map +1 -1
- package/dist/api.cjs +2 -15
- package/dist/api.d.cts +1 -1
- package/dist/api.d.cts.map +1 -1
- package/dist/api.d.mts +1 -1
- package/dist/api.d.mts.map +1 -1
- package/dist/api.mjs +3 -16
- package/dist/api.mjs.map +1 -1
- package/dist/context/index.cjs +1 -1
- package/dist/context/index.d.cts +1 -1
- package/dist/context/index.d.cts.map +1 -1
- package/dist/context/index.d.mts +1 -1
- package/dist/context/index.d.mts.map +1 -1
- package/dist/context/index.mjs +1 -1
- package/dist/{execution-context-Lj_23Ps4.cjs → execution-context-9aXwcpL6.cjs} +7 -25
- package/dist/{execution-context-D-djno_x.mjs → execution-context-DUtt6PWE.mjs} +9 -27
- package/dist/execution-context-DUtt6PWE.mjs.map +1 -0
- package/dist/{execution-context-CghMd-eP.d.cts → execution-context-Da_wozne.d.mts} +5 -6
- package/dist/{execution-context-rKd-zSZy.d.mts.map → execution-context-Da_wozne.d.mts.map} +1 -1
- package/dist/{execution-context-rKd-zSZy.d.mts → execution-context-NyDjVZ6T.d.cts} +5 -6
- package/dist/{execution-context-CghMd-eP.d.cts.map → execution-context-NyDjVZ6T.d.cts.map} +1 -1
- package/package.json +5 -3
- package/dist/execution-context-D-djno_x.mjs.map +0 -1
package/dist/context/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_base_context = require('../base-context-CbFlRUd-.cjs');
|
|
3
3
|
const require_engine_context = require('../engine-context-D-rpz-J2.cjs');
|
|
4
|
-
const require_execution_context = require('../execution-context-
|
|
4
|
+
const require_execution_context = require('../execution-context-9aXwcpL6.cjs');
|
|
5
5
|
|
|
6
6
|
exports.PowerlinesBaseContext = require_base_context.PowerlinesBaseContext;
|
|
7
7
|
exports.PowerlinesContext = require_execution_context.PowerlinesContext;
|
package/dist/context/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as PowerlinesContext, r as PowerlinesBaseContext, t as PowerlinesExecutionContext } from "../execution-context-
|
|
1
|
+
import { n as PowerlinesContext, r as PowerlinesBaseContext, t as PowerlinesExecutionContext } from "../execution-context-NyDjVZ6T.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";
|
|
@@ -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;;;;;EAAA,IAmFd,UAAA,CAAA,GAAc,cAAA;AAAA;;;
|
|
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;;;cClFd,4BAAA,yBACa,cAAA,GAAiB,cAAA,UAEjC,iBAAA,CAAkB,yBAAA,CAA0B,eAAA,cACzC,2BAAA,CAA4B,eAAA;EAAA;;ADnCzC;;;;;;;;SC6DsB,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;EDxCY;;;EAAA,UCsDjC,iBAAA,EAAmB,yBAAA,CAA0B,eAAA;EDjDvC;;;ECuDlB,OAAA,EAAS,wBAAA,CAAyB,eAAA;ED7BxB;;;;;;;;EAAA,ICuCN,UAAA,CAAA,GAAc,wBAAA,CAAyB,eAAA;;;;;;;;;MAYvC,UAAA,CAAW,KAAA,EAAO,wBAAA,CAAyB,eAAA;EDvF7B;;;EAAA,IC8Fd,EAAA,CAAA;EDzFyC;;;EAAA,ICgGzC,KAAA,CAAA,GAAS,MAAA,SAElB,SAAA,CAAU,aAAA,CAAc,eAAA;ED5FnB;;;;;;EAAA,UCuGS,oBAAA,CACd,MAAA,EAAQ,yBAAA,CAA0B,eAAA,mBACjC,OAAA;EDhF0B;;;;;;;ECiGb,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;;;;;;ADtU9D;;;;;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"}
|
package/dist/context/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as PowerlinesContext, r as PowerlinesBaseContext, t as PowerlinesExecutionContext } from "../execution-context-
|
|
1
|
+
import { n as PowerlinesContext, r as PowerlinesBaseContext, t as PowerlinesExecutionContext } from "../execution-context-Da_wozne.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";
|
|
@@ -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;;;
|
|
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;;;cClFd,4BAAA,yBACa,cAAA,GAAiB,cAAA,UAEjC,iBAAA,CAAkB,yBAAA,CAA0B,eAAA,cACzC,2BAAA,CAA4B,eAAA;EAAA;;ADnCzC;;;;;;;;SC6DsB,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;EDxCY;;;EAAA,UCsDjC,iBAAA,EAAmB,yBAAA,CAA0B,eAAA;EDjDvC;;;ECuDlB,OAAA,EAAS,wBAAA,CAAyB,eAAA;ED7BxB;;;;;;;;EAAA,ICuCN,UAAA,CAAA,GAAc,wBAAA,CAAyB,eAAA;;;;;;;;;MAYvC,UAAA,CAAW,KAAA,EAAO,wBAAA,CAAyB,eAAA;EDvF7B;;;EAAA,IC8Fd,EAAA,CAAA;EDzFyC;;;EAAA,ICgGzC,KAAA,CAAA,GAAS,MAAA,SAElB,SAAA,CAAU,aAAA,CAAc,eAAA;ED5FnB;;;;;;EAAA,UCuGS,oBAAA,CACd,MAAA,EAAQ,yBAAA,CAA0B,eAAA,mBACjC,OAAA;EDhF0B;;;;;;;ECiGb,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;;;;;;ADtU9D;;;;;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"}
|
package/dist/context/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as PowerlinesBaseContext } from "../base-context-Ce9PuQ9z.mjs";
|
|
2
2
|
import { t as PowerlinesEngineContext } from "../engine-context-CEbC9dHR.mjs";
|
|
3
|
-
import { n as PowerlinesEnvironmentContext, o as PowerlinesContext, r as createPluginContext, t as PowerlinesExecutionContext } from "../execution-context-
|
|
3
|
+
import { n as PowerlinesEnvironmentContext, o as PowerlinesContext, r as createPluginContext, t as PowerlinesExecutionContext } from "../execution-context-DUtt6PWE.mjs";
|
|
4
4
|
|
|
5
5
|
export { PowerlinesBaseContext, PowerlinesContext, PowerlinesEngineContext, PowerlinesEnvironmentContext, PowerlinesExecutionContext, createPluginContext };
|
|
@@ -42,7 +42,6 @@ let _stryke_hash = require("@stryke/hash");
|
|
|
42
42
|
let _stryke_hash_node = require("@stryke/hash/node");
|
|
43
43
|
let _stryke_http_fetch = require("@stryke/http/fetch");
|
|
44
44
|
let _stryke_path_is_equal = require("@stryke/path/is-equal");
|
|
45
|
-
let _stryke_type_checks_is_regexp = require("@stryke/type-checks/is-regexp");
|
|
46
45
|
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
47
46
|
let bundle_require = require("bundle-require");
|
|
48
47
|
let compatx = require("compatx");
|
|
@@ -58,6 +57,7 @@ let _stryke_path_glob_to_regex = require("@stryke/path/glob-to-regex");
|
|
|
58
57
|
let _stryke_path_is_type = require("@stryke/path/is-type");
|
|
59
58
|
let _stryke_path_slash = require("@stryke/path/slash");
|
|
60
59
|
let _stryke_string_format_pretty_bytes = require("@stryke/string-format/pretty-bytes");
|
|
60
|
+
let _stryke_type_checks_is_regexp = require("@stryke/type-checks/is-regexp");
|
|
61
61
|
let node_buffer = require("node:buffer");
|
|
62
62
|
let node_url = require("node:url");
|
|
63
63
|
let _stryke_helpers_get_field = require("@stryke/helpers/get-field");
|
|
@@ -1946,7 +1946,7 @@ var PowerlinesContext = class PowerlinesContext extends require_base_context.Pow
|
|
|
1946
1946
|
async setInlineConfig(config) {
|
|
1947
1947
|
this.logger.debug({
|
|
1948
1948
|
meta: { category: "config" },
|
|
1949
|
-
message: `Updating inline configuration object: \n${
|
|
1949
|
+
message: `Updating inline configuration object: \n${(0, _powerlines_core_plugin_utils.formatConfig)(config)}`
|
|
1950
1950
|
});
|
|
1951
1951
|
this.inlineConfig = config;
|
|
1952
1952
|
await this.resolveConfig();
|
|
@@ -1960,7 +1960,7 @@ var PowerlinesContext = class PowerlinesContext extends require_base_context.Pow
|
|
|
1960
1960
|
async setPluginConfig(config) {
|
|
1961
1961
|
this.logger.debug({
|
|
1962
1962
|
meta: { category: "config" },
|
|
1963
|
-
message: `Updating plugin configuration object: \n${
|
|
1963
|
+
message: `Updating plugin configuration object: \n${(0, _powerlines_core_plugin_utils.formatConfig)(config)}`
|
|
1964
1964
|
});
|
|
1965
1965
|
this.pluginConfig = config;
|
|
1966
1966
|
await this.resolveConfig();
|
|
@@ -2002,7 +2002,7 @@ var PowerlinesContext = class PowerlinesContext extends require_base_context.Pow
|
|
|
2002
2002
|
async setUserConfig(config) {
|
|
2003
2003
|
this.logger.debug({
|
|
2004
2004
|
meta: { category: "config" },
|
|
2005
|
-
message: `Updating user configuration object: \n${
|
|
2005
|
+
message: `Updating user configuration object: \n${(0, _powerlines_core_plugin_utils.formatConfig)(config)}`
|
|
2006
2006
|
});
|
|
2007
2007
|
this.userConfig = config;
|
|
2008
2008
|
await this.resolveConfig();
|
|
@@ -2039,7 +2039,7 @@ var PowerlinesContext = class PowerlinesContext extends require_base_context.Pow
|
|
|
2039
2039
|
const mergedConfig = this.mergeConfig();
|
|
2040
2040
|
this.logger.trace({
|
|
2041
2041
|
meta: { category: "config" },
|
|
2042
|
-
message: `Pre-setup Powerlines configuration object: \n --- Merged Config --- \n${
|
|
2042
|
+
message: `Pre-setup Powerlines configuration object: \n --- Merged Config --- \n${(0, _powerlines_core_plugin_utils.formatConfig)(mergedConfig)} \n\n --- Initial Options --- \n${(0, _powerlines_core_plugin_utils.formatConfig)(this.initialOptions)} \n\n --- Initial Config --- \n${(0, _powerlines_core_plugin_utils.formatConfig)(this.initialConfig)} \n\n --- User Config --- \n${(0, _powerlines_core_plugin_utils.formatConfig)(this.userConfig)} \n\n --- Inline Config --- \n${(0, _powerlines_core_plugin_utils.formatConfig)(this.inlineConfig)} \n\n --- Plugin Config --- \n${(0, _powerlines_core_plugin_utils.formatConfig)(this.pluginConfig)} \n\n --- Environment Config --- \n${(0, _powerlines_core_plugin_utils.formatConfig)(this.environmentConfig)} \n\n --- Overridden Config --- \n${(0, _powerlines_core_plugin_utils.formatConfig)(this.overriddenConfig)}`
|
|
2043
2043
|
});
|
|
2044
2044
|
mergedConfig.output = (0, defu.default)(mergedConfig.output ?? {}, {
|
|
2045
2045
|
copy: { assets: [
|
|
@@ -2114,28 +2114,10 @@ var PowerlinesContext = class PowerlinesContext extends require_base_context.Pow
|
|
|
2114
2114
|
this.#configProxy = this.createConfigProxy();
|
|
2115
2115
|
this.logger.info({
|
|
2116
2116
|
meta: { category: "config" },
|
|
2117
|
-
message: `Resolved Powerlines configuration object: \n${
|
|
2117
|
+
message: `Resolved Powerlines configuration object: \n${(0, _powerlines_core_plugin_utils.formatConfig)(this.resolvedConfig)}`
|
|
2118
2118
|
});
|
|
2119
2119
|
this.#fs ??= await VirtualFileSystem.create(this);
|
|
2120
2120
|
}
|
|
2121
|
-
logConfig(config) {
|
|
2122
|
-
return JSON.stringify(Object.fromEntries(Object.entries({
|
|
2123
|
-
...(0, _stryke_helpers_omit.omit)(config, [
|
|
2124
|
-
"plugins",
|
|
2125
|
-
"initialConfig",
|
|
2126
|
-
"userConfig",
|
|
2127
|
-
"inlineConfig",
|
|
2128
|
-
"pluginConfig",
|
|
2129
|
-
"environmentConfig"
|
|
2130
|
-
]),
|
|
2131
|
-
resolve: {
|
|
2132
|
-
...config.resolve,
|
|
2133
|
-
external: (config.resolve?.external ?? []).filter(Boolean).map((external) => (0, _stryke_type_checks_is_set_string.isSetString)(external) ? external : (0, _stryke_type_checks_is_regexp.isRegExp)(external) ? external.source : "<unknown-external>"),
|
|
2134
|
-
noExternal: (config.resolve?.noExternal ?? []).filter(Boolean).map((noExternal) => (0, _stryke_type_checks_is_set_string.isSetString)(noExternal) ? noExternal : (0, _stryke_type_checks_is_regexp.isRegExp)(noExternal) ? noExternal.source : "<unknown-no-external>")
|
|
2135
|
-
},
|
|
2136
|
-
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>")) : []
|
|
2137
|
-
}).sort(([key1], [key2]) => key1.localeCompare(key2))), null, 4).replace(/"([^"]+)":/g, "$1:").replace(/,$/g, "");
|
|
2138
|
-
}
|
|
2139
2121
|
createConfigProxy() {
|
|
2140
2122
|
return new Proxy(this.resolvedConfig, {
|
|
2141
2123
|
/**
|
|
@@ -2493,7 +2475,7 @@ var PowerlinesEnvironmentContext = class PowerlinesEnvironmentContext extends Po
|
|
|
2493
2475
|
async setEnvironmentConfig(config) {
|
|
2494
2476
|
this.logger.debug({
|
|
2495
2477
|
meta: { category: "config" },
|
|
2496
|
-
message: `Updating environment configuration object: \n${
|
|
2478
|
+
message: `Updating environment configuration object: \n${(0, _powerlines_core_plugin_utils.formatConfig)(config)}`
|
|
2497
2479
|
});
|
|
2498
2480
|
this.environmentConfig = config;
|
|
2499
2481
|
await this.resolveConfig();
|
|
@@ -12,7 +12,7 @@ import { isString } from "@stryke/type-checks/is-string";
|
|
|
12
12
|
import { messageParent } from "jest-worker";
|
|
13
13
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
14
14
|
import { uuid } from "@stryke/unique-id/uuid";
|
|
15
|
-
import { addPluginHook, createLogger, dedupeHooklist, getPackageJsonOrganization, isDuplicate, isPlugin, isPluginConfig, isPluginHook, isPluginHookField, mergeConfig, replacePathTokens, resolveLogLevel, withCustomLogger, withLogFn } from "@powerlines/core/plugin-utils";
|
|
15
|
+
import { addPluginHook, createLogger, dedupeHooklist, formatConfig, getPackageJsonOrganization, isDuplicate, isPlugin, isPluginConfig, isPluginHook, isPluginHookField, mergeConfig, replacePathTokens, resolveLogLevel, withCustomLogger, withLogFn } from "@powerlines/core/plugin-utils";
|
|
16
16
|
import { colorText } from "@powerlines/core/plugin-utils/logging";
|
|
17
17
|
import { getEnvPaths } from "@stryke/env/get-env-paths";
|
|
18
18
|
import { appendPath } from "@stryke/path/append";
|
|
@@ -39,7 +39,6 @@ import { murmurhash } from "@stryke/hash";
|
|
|
39
39
|
import { hashDirectory } from "@stryke/hash/node";
|
|
40
40
|
import { fetchRequest } from "@stryke/http/fetch";
|
|
41
41
|
import { isEqual } from "@stryke/path/is-equal";
|
|
42
|
-
import { isRegExp } from "@stryke/type-checks/is-regexp";
|
|
43
42
|
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
44
43
|
import { match, tsconfigPathsToRegExp } from "bundle-require";
|
|
45
44
|
import { resolveCompatibilityDates } from "compatx";
|
|
@@ -54,6 +53,7 @@ import { globToRegex } from "@stryke/path/glob-to-regex";
|
|
|
54
53
|
import { isAbsolutePath } from "@stryke/path/is-type";
|
|
55
54
|
import { slash } from "@stryke/path/slash";
|
|
56
55
|
import { prettyBytes } from "@stryke/string-format/pretty-bytes";
|
|
56
|
+
import { isRegExp } from "@stryke/type-checks/is-regexp";
|
|
57
57
|
import { Blob } from "node:buffer";
|
|
58
58
|
import { fileURLToPath } from "node:url";
|
|
59
59
|
import { getField } from "@stryke/helpers/get-field";
|
|
@@ -1942,7 +1942,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
|
|
|
1942
1942
|
async setInlineConfig(config) {
|
|
1943
1943
|
this.logger.debug({
|
|
1944
1944
|
meta: { category: "config" },
|
|
1945
|
-
message: `Updating inline configuration object: \n${
|
|
1945
|
+
message: `Updating inline configuration object: \n${formatConfig(config)}`
|
|
1946
1946
|
});
|
|
1947
1947
|
this.inlineConfig = config;
|
|
1948
1948
|
await this.resolveConfig();
|
|
@@ -1956,7 +1956,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
|
|
|
1956
1956
|
async setPluginConfig(config) {
|
|
1957
1957
|
this.logger.debug({
|
|
1958
1958
|
meta: { category: "config" },
|
|
1959
|
-
message: `Updating plugin configuration object: \n${
|
|
1959
|
+
message: `Updating plugin configuration object: \n${formatConfig(config)}`
|
|
1960
1960
|
});
|
|
1961
1961
|
this.pluginConfig = config;
|
|
1962
1962
|
await this.resolveConfig();
|
|
@@ -1998,7 +1998,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
|
|
|
1998
1998
|
async setUserConfig(config) {
|
|
1999
1999
|
this.logger.debug({
|
|
2000
2000
|
meta: { category: "config" },
|
|
2001
|
-
message: `Updating user configuration object: \n${
|
|
2001
|
+
message: `Updating user configuration object: \n${formatConfig(config)}`
|
|
2002
2002
|
});
|
|
2003
2003
|
this.userConfig = config;
|
|
2004
2004
|
await this.resolveConfig();
|
|
@@ -2035,7 +2035,7 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
|
|
|
2035
2035
|
const mergedConfig = this.mergeConfig();
|
|
2036
2036
|
this.logger.trace({
|
|
2037
2037
|
meta: { category: "config" },
|
|
2038
|
-
message: `Pre-setup Powerlines configuration object: \n --- Merged Config --- \n${
|
|
2038
|
+
message: `Pre-setup Powerlines configuration object: \n --- Merged Config --- \n${formatConfig(mergedConfig)} \n\n --- Initial Options --- \n${formatConfig(this.initialOptions)} \n\n --- Initial Config --- \n${formatConfig(this.initialConfig)} \n\n --- User Config --- \n${formatConfig(this.userConfig)} \n\n --- Inline Config --- \n${formatConfig(this.inlineConfig)} \n\n --- Plugin Config --- \n${formatConfig(this.pluginConfig)} \n\n --- Environment Config --- \n${formatConfig(this.environmentConfig)} \n\n --- Overridden Config --- \n${formatConfig(this.overriddenConfig)}`
|
|
2039
2039
|
});
|
|
2040
2040
|
mergedConfig.output = defu(mergedConfig.output ?? {}, {
|
|
2041
2041
|
copy: { assets: [
|
|
@@ -2110,28 +2110,10 @@ var PowerlinesContext = class PowerlinesContext extends PowerlinesBaseContext {
|
|
|
2110
2110
|
this.#configProxy = this.createConfigProxy();
|
|
2111
2111
|
this.logger.info({
|
|
2112
2112
|
meta: { category: "config" },
|
|
2113
|
-
message: `Resolved Powerlines configuration object: \n${
|
|
2113
|
+
message: `Resolved Powerlines configuration object: \n${formatConfig(this.resolvedConfig)}`
|
|
2114
2114
|
});
|
|
2115
2115
|
this.#fs ??= await VirtualFileSystem.create(this);
|
|
2116
2116
|
}
|
|
2117
|
-
logConfig(config) {
|
|
2118
|
-
return JSON.stringify(Object.fromEntries(Object.entries({
|
|
2119
|
-
...omit(config, [
|
|
2120
|
-
"plugins",
|
|
2121
|
-
"initialConfig",
|
|
2122
|
-
"userConfig",
|
|
2123
|
-
"inlineConfig",
|
|
2124
|
-
"pluginConfig",
|
|
2125
|
-
"environmentConfig"
|
|
2126
|
-
]),
|
|
2127
|
-
resolve: {
|
|
2128
|
-
...config.resolve,
|
|
2129
|
-
external: (config.resolve?.external ?? []).filter(Boolean).map((external) => isSetString(external) ? external : isRegExp(external) ? external.source : "<unknown-external>"),
|
|
2130
|
-
noExternal: (config.resolve?.noExternal ?? []).filter(Boolean).map((noExternal) => isSetString(noExternal) ? noExternal : isRegExp(noExternal) ? noExternal.source : "<unknown-no-external>")
|
|
2131
|
-
},
|
|
2132
|
-
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>")) : []
|
|
2133
|
-
}).sort(([key1], [key2]) => key1.localeCompare(key2))), null, 4).replace(/"([^"]+)":/g, "$1:").replace(/,$/g, "");
|
|
2134
|
-
}
|
|
2135
2117
|
createConfigProxy() {
|
|
2136
2118
|
return new Proxy(this.resolvedConfig, {
|
|
2137
2119
|
/**
|
|
@@ -2489,7 +2471,7 @@ var PowerlinesEnvironmentContext = class PowerlinesEnvironmentContext extends Po
|
|
|
2489
2471
|
async setEnvironmentConfig(config) {
|
|
2490
2472
|
this.logger.debug({
|
|
2491
2473
|
meta: { category: "config" },
|
|
2492
|
-
message: `Updating environment configuration object: \n${
|
|
2474
|
+
message: `Updating environment configuration object: \n${formatConfig(config)}`
|
|
2493
2475
|
});
|
|
2494
2476
|
this.environmentConfig = config;
|
|
2495
2477
|
await this.resolveConfig();
|
|
@@ -2859,4 +2841,4 @@ var PowerlinesExecutionContext = class PowerlinesExecutionContext extends Powerl
|
|
|
2859
2841
|
|
|
2860
2842
|
//#endregion
|
|
2861
2843
|
export { mergeConfigs as a, callHook as i, PowerlinesEnvironmentContext as n, PowerlinesContext as o, createPluginContext as r, writeMetaFile as s, PowerlinesExecutionContext as t };
|
|
2862
|
-
//# sourceMappingURL=execution-context-
|
|
2844
|
+
//# sourceMappingURL=execution-context-DUtt6PWE.mjs.map
|