@powerlines/engine 0.43.29 → 0.43.31

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.
Files changed (39) hide show
  1. package/dist/_internal/worker.cjs +112 -42
  2. package/dist/_internal/worker.mjs +112 -42
  3. package/dist/_internal/worker.mjs.map +1 -1
  4. package/dist/api.cjs +9 -7
  5. package/dist/api.d.cts.map +1 -1
  6. package/dist/api.d.mts.map +1 -1
  7. package/dist/api.mjs +9 -7
  8. package/dist/api.mjs.map +1 -1
  9. package/dist/{base-context-B9AROf66.cjs → base-context-CPoqO4io.cjs} +9 -8
  10. package/dist/{base-context-D8a2XGIK.mjs → base-context-SmQ6OfXm.mjs} +10 -9
  11. package/dist/base-context-SmQ6OfXm.mjs.map +1 -0
  12. package/dist/context/index.cjs +3 -3
  13. package/dist/context/index.d.cts +37 -20
  14. package/dist/context/index.d.cts.map +1 -1
  15. package/dist/context/index.d.mts +37 -20
  16. package/dist/context/index.d.mts.map +1 -1
  17. package/dist/context/index.mjs +3 -3
  18. package/dist/{engine-context-qCVw66U_.cjs → engine-context-CEu21ZZf.cjs} +36 -10
  19. package/dist/{engine-context-DsA9XGVb.mjs → engine-context-D7CWyTsr.mjs} +36 -11
  20. package/dist/engine-context-D7CWyTsr.mjs.map +1 -0
  21. package/dist/{execution-context-CBJxP2B2.mjs → execution-context-C_7IC8er.mjs} +110 -40
  22. package/dist/execution-context-C_7IC8er.mjs.map +1 -0
  23. package/dist/{execution-context-CprxWvYn.cjs → execution-context-DsT6s1du.cjs} +108 -38
  24. package/dist/index.cjs +135 -54
  25. package/dist/index.d.cts.map +1 -1
  26. package/dist/index.d.mts.map +1 -1
  27. package/dist/index.mjs +135 -54
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/storage/index.cjs +1 -1
  30. package/dist/storage/index.d.mts +1 -1
  31. package/dist/storage/index.mjs +1 -1
  32. package/dist/typescript/index.d.mts +1 -1
  33. package/dist/{virtual-BNdKVkRw.cjs → virtual-1hYa9zCy.cjs} +1 -1
  34. package/dist/{virtual-gIlTc3Lj.mjs → virtual-CUgOdyIa.mjs} +2 -2
  35. package/dist/{virtual-gIlTc3Lj.mjs.map → virtual-CUgOdyIa.mjs.map} +1 -1
  36. package/package.json +3 -3
  37. package/dist/base-context-D8a2XGIK.mjs.map +0 -1
  38. package/dist/engine-context-DsA9XGVb.mjs.map +0 -1
  39. package/dist/execution-context-CBJxP2B2.mjs.map +0 -1
@@ -1,16 +1,21 @@
1
1
  const require_chunk = require('./chunk-C0xms8kb.cjs');
2
- const require_base_context = require('./base-context-B9AROf66.cjs');
2
+ const require_base_context = require('./base-context-CPoqO4io.cjs');
3
3
  const require_fs = require('./fs-XogSgMqT.cjs');
4
- const require_virtual = require('./virtual-BNdKVkRw.cjs');
4
+ const require_virtual = require('./virtual-1hYa9zCy.cjs');
5
5
  const require_tsconfig = require('./tsconfig-DeyWQC2N.cjs');
6
6
  let _powerlines_core_constants = require("@powerlines/core/constants");
7
7
  let _stryke_fs_resolve = require("@stryke/fs/resolve");
8
8
  let _stryke_path_join = require("@stryke/path/join");
9
9
  let _storm_software_config_tools_types = require("@storm-software/config-tools/types");
10
10
  let _stryke_type_checks_is_set = require("@stryke/type-checks/is-set");
11
+ let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
11
12
  let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
13
+ let _stryke_convert_to_array = require("@stryke/convert/to-array");
14
+ let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
15
+ let _stryke_unique_id_uuid = require("@stryke/unique-id/uuid");
12
16
  let _powerlines_core_lib_logger = require("@powerlines/core/lib/logger");
13
17
  let _stryke_path_is_equal = require("@stryke/path/is-equal");
18
+ let _stryke_path_replace = require("@stryke/path/replace");
14
19
  let _stryke_type_checks_is_null = require("@stryke/type-checks/is-null");
15
20
  let chalk = require("chalk");
16
21
  chalk = require_chunk.__toESM(chalk, 1);
@@ -18,20 +23,17 @@ let defu = require("defu");
18
23
  defu = require_chunk.__toESM(defu, 1);
19
24
  let _stryke_path_join_paths = require("@stryke/path/join-paths");
20
25
  let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
21
- let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
22
26
  let _powerlines_core_lib_utilities_format = require("@powerlines/core/lib/utilities/format");
23
27
  let _powerlines_core_plugin_utils = require("@powerlines/core/plugin-utils");
24
- let _stryke_convert_to_array = require("@stryke/convert/to-array");
25
28
  let _stryke_fs_exists = require("@stryke/fs/exists");
26
29
  let _stryke_helpers_get_unique = require("@stryke/helpers/get-unique");
27
30
  let _stryke_helpers_omit = require("@stryke/helpers/omit");
28
31
  let _stryke_path_append = require("@stryke/path/append");
29
32
  let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
30
33
  let _stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
31
- let _stryke_path_replace = require("@stryke/path/replace");
32
34
  let _stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
33
35
  let _stryke_type_checks_is_object = require("@stryke/type-checks/is-object");
34
- let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
36
+ let _powerlines_core = require("@powerlines/core");
35
37
  let _stryke_fs_json = require("@stryke/fs/json");
36
38
  let _stryke_helpers_deep_clone = require("@stryke/helpers/deep-clone");
37
39
  let _powerlines_core_lib_entry = require("@powerlines/core/lib/entry");
@@ -40,7 +42,6 @@ let _stryke_hash = require("@stryke/hash");
40
42
  let _stryke_hash_node = require("@stryke/hash/node");
41
43
  let _stryke_http_fetch = require("@stryke/http/fetch");
42
44
  let _stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
43
- let _stryke_unique_id_uuid = require("@stryke/unique-id/uuid");
44
45
  let bundle_require = require("bundle-require");
45
46
  let compatx = require("compatx");
46
47
  let flat_cache = require("flat-cache");
@@ -63,6 +64,7 @@ let _stryke_helpers_get_field = require("@stryke/helpers/get-field");
63
64
  //#region src/_internal/helpers/environment.ts
64
65
  function createEnvironment(name, config = {}) {
65
66
  return (0, defu.default)(config.environments?.[name] ?? {}, {
67
+ environmentId: (0, _stryke_unique_id_uuid.uuid)(),
66
68
  name,
67
69
  title: config.title ?? (0, _stryke_string_format_title_case.titleCase)(config.name),
68
70
  ssr: false,
@@ -642,7 +644,7 @@ var VirtualFileSystem = class VirtualFileSystem {
642
644
  return ret;
643
645
  }, {});
644
646
  }
645
- this.#log = (0, _powerlines_core_lib_logger.extendLog)(this.#context.log, "file-system");
647
+ this.#log = context.extendLog("VFS");
646
648
  }
647
649
  /**
648
650
  * Asynchronously checks if a file exists in the virtual file system (VFS).
@@ -1534,22 +1536,10 @@ var PowerlinesContext = class PowerlinesContext extends require_base_context.Pow
1534
1536
  * @returns A promise that resolves to the cloned context.
1535
1537
  */
1536
1538
  async clone() {
1537
- const clone = await PowerlinesContext.fromOptions(this.config);
1539
+ const clone = await PowerlinesContext.fromOptions(this.options);
1538
1540
  return this.copyTo(clone);
1539
1541
  }
1540
1542
  /**
1541
- * Create a new logger instance
1542
- *
1543
- * @param name - The name to use for the logger instance
1544
- * @returns A logger function
1545
- */
1546
- createLog(name = null) {
1547
- return (0, _powerlines_core_lib_logger.createLog)(name, {
1548
- ...this.config,
1549
- logLevel: (0, _stryke_type_checks_is_null.isNull)(this.logLevel) ? "silent" : this.logLevel
1550
- });
1551
- }
1552
- /**
1553
1543
  * A function to perform HTTP fetch requests
1554
1544
  *
1555
1545
  * @remarks
@@ -1925,6 +1915,7 @@ var PowerlinesContext = class PowerlinesContext extends require_base_context.Pow
1925
1915
  for (const [key, value] of Object.entries(this)) if (!SKIP_CLONING_PROPS.includes(key)) if ((0, _stryke_type_checks_is_object.isObject)(value) || Array.isArray(value)) context[key] = (0, _stryke_helpers_deep_clone.deepClone)(value);
1926
1916
  else context[key] = value;
1927
1917
  context.inputOptions = (0, _stryke_helpers_deep_clone.deepClone)(this.inputOptions);
1918
+ context.options = (0, _stryke_helpers_deep_clone.deepClone)(this.options);
1928
1919
  context.dependencies = (0, _stryke_helpers_deep_clone.deepClone)(this.dependencies);
1929
1920
  context.devDependencies = (0, _stryke_helpers_deep_clone.deepClone)(this.devDependencies);
1930
1921
  context.persistedMeta = this.persistedMeta ? (0, _stryke_helpers_deep_clone.deepClone)(this.persistedMeta) : void 0;
@@ -1946,7 +1937,7 @@ var PowerlinesContext = class PowerlinesContext extends require_base_context.Pow
1946
1937
  */
1947
1938
  async init(options = {}) {
1948
1939
  await super.init(options);
1949
- this.options.configIndex = options.configIndex ?? this.options.configIndex ?? 0;
1940
+ this.options.executionIndex = options.executionIndex ?? this.options.executionIndex ?? 0;
1950
1941
  const projectJsonPath = (0, _stryke_path_join.joinPaths)(this.options.cwd, this.options.root, "project.json");
1951
1942
  if ((0, _stryke_fs_exists.existsSync)(projectJsonPath)) this.projectJson = await (0, _stryke_fs_json.readJsonFile)(projectJsonPath);
1952
1943
  const packageJsonPath = (0, _stryke_path_join.joinPaths)(this.options.cwd, this.options.root, "package.json");
@@ -1955,7 +1946,7 @@ var PowerlinesContext = class PowerlinesContext extends require_base_context.Pow
1955
1946
  this.options.organization ??= (0, _stryke_type_checks_is_set_object.isSetObject)(this.packageJson?.author) ? (0, _stryke_string_format_kebab_case.kebabCase)(this.packageJson?.author?.name) : (0, _stryke_string_format_kebab_case.kebabCase)(this.packageJson?.author);
1956
1947
  }
1957
1948
  this.#checksum = await this.generateChecksum((0, _stryke_path_join.joinPaths)(this.options.cwd, this.options.root));
1958
- const userConfig = this.configFile.config ? Array.isArray(this.configFile.config) && this.configFile.config.length > this.options.configIndex ? this.configFile.config[this.options.configIndex] : this.configFile.config : {};
1949
+ const userConfig = this.configFile.config ? Array.isArray(this.configFile.config) && this.configFile.config.length > this.options.executionIndex ? this.configFile.config[this.options.executionIndex] : this.configFile.config : {};
1959
1950
  this.resolvedConfig = {
1960
1951
  ...this.options,
1961
1952
  ...userConfig,
@@ -1986,7 +1977,7 @@ var PowerlinesContext = class PowerlinesContext extends require_base_context.Pow
1986
1977
  if (this.config.userConfig.resolve?.noExternal) this.config.userConfig.resolve.noExternal = (0, _stryke_helpers_get_unique.getUnique)(this.config.userConfig.resolve.noExternal);
1987
1978
  if (this.config.resolve.external) this.config.resolve.external = (0, _stryke_helpers_get_unique.getUnique)(this.config.resolve.external);
1988
1979
  if (this.config.resolve.noExternal) this.config.resolve.noExternal = (0, _stryke_helpers_get_unique.getUnique)(this.config.resolve.noExternal);
1989
- this.config.plugins = (this.config.plugins ?? []).filter(Boolean).reduce((ret, plugin) => {
1980
+ this.config.plugins = (this.config.plugins ?? []).flatMap((plugin) => (0, _stryke_convert_to_array.toArray)(plugin)).filter(Boolean).reduce((ret, plugin) => {
1990
1981
  if ((0, _powerlines_core_plugin_utils.isPlugin)(plugin) && (0, _powerlines_core_plugin_utils.isDuplicate)(plugin, ret.filter((p) => (0, _powerlines_core_plugin_utils.isPlugin)(p)))) return ret;
1991
1982
  ret.push(plugin);
1992
1983
  return ret;
@@ -2018,7 +2009,7 @@ var PowerlinesContext = class PowerlinesContext extends require_base_context.Pow
2018
2009
  if (!this.config.root.replace(/^\.\/?/, "")) this.config.output.copy.path = this.config.output.copy.path ? (0, _stryke_path_append.appendPath)((0, _powerlines_core_plugin_utils.replacePathTokens)(this, this.config.output.copy.path), this.config.cwd) : this.config.output.path;
2019
2010
  else this.config.output.copy.path = (0, _stryke_path_append.appendPath)((0, _powerlines_core_plugin_utils.replacePathTokens)(this, this.config.output.copy.path || (0, _stryke_path_join.joinPaths)("dist", this.config.root)), this.config.cwd);
2020
2011
  }
2021
- if (this.config.output.dts !== false && this.config.output.types !== false) this.config.output.types = (0, _stryke_path_append.appendPath)((0, _powerlines_core_plugin_utils.replacePathTokens)(this, this.config.output.types || (0, _stryke_path_join.joinPaths)(this.config.root, `${this.config.framework ?? "powerlines"}.d.ts`)), this.config.cwd);
2012
+ if (this.config.output.dts !== false && this.config.output.types !== false) this.config.output.types = (0, _stryke_path_append.appendPath)((0, _powerlines_core_plugin_utils.replacePathTokens)(this, this.config.userConfig?.output?.types || this.config.inlineConfig?.output?.types || this.config.pluginConfig?.output?.types || (0, _stryke_path_join.joinPaths)(this.config.root, `${this.config.framework ?? "powerlines"}.d.ts`)), this.config.cwd);
2022
2013
  if (this.config.output.copy && this.config.output.copy.path && this.config.output.copy.assets && Array.isArray(this.config.output.copy.assets)) this.config.output.copy.assets = (0, _stryke_helpers_get_unique.getUniqueBy)(this.config.output.copy.assets.map((asset) => {
2023
2014
  return {
2024
2015
  glob: (0, _stryke_type_checks_is_set_object.isSetObject)(asset) ? asset.glob : asset,
@@ -2180,15 +2171,16 @@ function extractHooks(context, hooks, plugin, key, parentKey) {
2180
2171
  /**
2181
2172
  * Create a Proxy-based PluginContext
2182
2173
  *
2174
+ * @param pluginId - The unique identifier of the plugin
2183
2175
  * @param plugin - The plugin instance
2184
2176
  * @param environment - The environment context
2185
2177
  * @returns The proxied plugin context
2186
2178
  */
2187
- function createPluginContext(plugin, environment) {
2179
+ function createPluginContext(pluginId, plugin, environment) {
2188
2180
  const normalizeMessage = (message) => {
2189
2181
  return (0, _stryke_type_checks_is_string.isString)(message) ? message : message.message;
2190
2182
  };
2191
- const log = environment.extendLog(plugin.name.replaceAll(":", " - "));
2183
+ const log = environment.extendLog(pluginId, plugin.name.replaceAll(":", " - "));
2192
2184
  const callHookFn = async (hook, options, ...args) => {
2193
2185
  return environment.$$internal.api.callHook(hook, {
2194
2186
  sequential: true,
@@ -2206,6 +2198,7 @@ function createPluginContext(plugin, environment) {
2206
2198
  callHook: callHookFn,
2207
2199
  meta
2208
2200
  };
2201
+ if (prop === "id") return pluginId;
2209
2202
  if (prop === "log" || prop === "logger") return log;
2210
2203
  if (prop === "fatal") return (message) => {
2211
2204
  log(_storm_software_config_tools_types.LogLevelLabel.FATAL, normalizeMessage(message));
@@ -2230,6 +2223,7 @@ function createPluginContext(plugin, environment) {
2230
2223
  set(_, prop, value) {
2231
2224
  if ([
2232
2225
  "$$internal",
2226
+ "id",
2233
2227
  "environment",
2234
2228
  "config",
2235
2229
  "log",
@@ -2281,17 +2275,10 @@ var PowerlinesEnvironmentContext = class PowerlinesEnvironmentContext extends Po
2281
2275
  */
2282
2276
  plugins = [];
2283
2277
  /**
2284
- * Create a new logger instance
2285
- *
2286
- * @param name - The name to use for the logger instance
2287
- * @returns A logger function
2278
+ * The unique identifier of the environment associated with this context, which can be used for logging and other purposes to distinguish between different environments in the same process.
2288
2279
  */
2289
- createLog(name = null) {
2290
- return (0, _powerlines_core_lib_logger.createLog)(name, {
2291
- ...this.config,
2292
- logLevel: (0, _stryke_type_checks_is_null.isNull)(this.config.logLevel) ? "silent" : this.config.logLevel,
2293
- environment: this.environment?.name
2294
- });
2280
+ get id() {
2281
+ return this.environment.environmentId;
2295
2282
  }
2296
2283
  /**
2297
2284
  * The hooks registered by plugins in this environment
@@ -2300,6 +2287,54 @@ var PowerlinesEnvironmentContext = class PowerlinesEnvironmentContext extends Po
2300
2287
  return this.#hooks;
2301
2288
  }
2302
2289
  /**
2290
+ * Create a new logger instance
2291
+ *
2292
+ * @param source - The source name to use for the logger instance, which can be used to identify the origin of log messages in the logs for better traceability. This is typically the name of the plugin or module that is creating the logger instance.
2293
+ * @returns A logger function
2294
+ */
2295
+ createLog(source = null) {
2296
+ return (level, ...args) => {
2297
+ process.send?.({
2298
+ id: (0, _stryke_unique_id_uuid.uuid)(),
2299
+ type: "write-log",
2300
+ executionId: this.options.executionId,
2301
+ executionIndex: this.options.executionIndex,
2302
+ timestamp: Date.now(),
2303
+ payload: {
2304
+ level,
2305
+ source,
2306
+ environment: this.environment?.name,
2307
+ args
2308
+ }
2309
+ });
2310
+ };
2311
+ }
2312
+ /**
2313
+ * Extend the current logger instance with a new name
2314
+ *
2315
+ * @param source - The name of the source to use for the extended logger instance
2316
+ * @param plugin - An optional plugin name to use for the extended logger instance, which can be used to identify the origin of log messages in the logs for better traceability. This is typically the name of the plugin or module that is creating the logger instance.
2317
+ * @returns A logger function
2318
+ */
2319
+ extendLog(source, plugin) {
2320
+ return (level, ...args) => {
2321
+ process.send?.({
2322
+ id: (0, _stryke_unique_id_uuid.uuid)(),
2323
+ type: "write-log",
2324
+ executionId: this.options.executionId,
2325
+ executionIndex: this.options.executionIndex,
2326
+ timestamp: Date.now(),
2327
+ payload: {
2328
+ level,
2329
+ source,
2330
+ plugin,
2331
+ environment: this.environment?.name,
2332
+ args
2333
+ }
2334
+ });
2335
+ };
2336
+ }
2337
+ /**
2303
2338
  * Creates a clone of the current context with the same configuration and workspace settings. This can be useful for running multiple builds in parallel or for creating isolated contexts for different parts of the build process.
2304
2339
  *
2305
2340
  * @remarks
@@ -2329,8 +2364,10 @@ var PowerlinesEnvironmentContext = class PowerlinesEnvironmentContext extends Po
2329
2364
  if ((0, _powerlines_core_plugin_utils.isPluginConfig)(result)) return this.$$internal.addPlugin(result);
2330
2365
  resolvedPlugin = (0, _powerlines_core_plugin_utils.isPlugin)(result) ? result : plugin;
2331
2366
  }
2332
- const context = createPluginContext(resolvedPlugin, this);
2367
+ const pluginId = (0, _stryke_unique_id_uuid.uuid)();
2368
+ const context = createPluginContext(pluginId, resolvedPlugin, this);
2333
2369
  this.plugins.push({
2370
+ pluginId,
2334
2371
  plugin: resolvedPlugin,
2335
2372
  context
2336
2373
  });
@@ -2456,6 +2493,12 @@ var PowerlinesExecutionContext = class PowerlinesExecutionContext extends Powerl
2456
2493
  for (const environment of Object.values(this.environments)) environment.$$internal = super.$$internal;
2457
2494
  }
2458
2495
  /**
2496
+ * The unique identifier of the execution context, which can be used for logging and other purposes to distinguish between different executions in the same process.
2497
+ */
2498
+ get id() {
2499
+ return this.options.executionId;
2500
+ }
2501
+ /**
2459
2502
  * A record of all environments by name
2460
2503
  */
2461
2504
  get environments() {
@@ -2473,6 +2516,33 @@ var PowerlinesExecutionContext = class PowerlinesExecutionContext extends Powerl
2473
2516
  super(options);
2474
2517
  }
2475
2518
  /**
2519
+ * Create a new logger instance
2520
+ *
2521
+ * @param source - The source name to use for the logger instance, which can be used to identify the origin of log messages in the logs for better traceability. This is typically the name of the plugin or module that is creating the logger instance.
2522
+ * @returns A logger function
2523
+ */
2524
+ createLog(source = null) {
2525
+ const logger = (0, _powerlines_core.createLog)(source, {
2526
+ ...this.config,
2527
+ logLevel: (0, _stryke_type_checks_is_null.isNull)(this.config.logLevel) ? "silent" : this.config.logLevel
2528
+ });
2529
+ return (level, ...args) => {
2530
+ logger(level, ...args);
2531
+ process.send?.({
2532
+ id: (0, _stryke_unique_id_uuid.uuid)(),
2533
+ type: "write-log",
2534
+ executionId: this.id,
2535
+ executionIndex: this.options.executionIndex,
2536
+ timestamp: Date.now(),
2537
+ payload: {
2538
+ source,
2539
+ level,
2540
+ args
2541
+ }
2542
+ });
2543
+ };
2544
+ }
2545
+ /**
2476
2546
  * Creates a clone of the current context with the same configuration and workspace settings. This can be useful for running multiple builds in parallel or for creating isolated contexts for different parts of the build process.
2477
2547
  *
2478
2548
  * @remarks
package/dist/index.cjs CHANGED
@@ -1,25 +1,69 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_chunk = require('./chunk-C0xms8kb.cjs');
3
- const require_engine_context = require('./engine-context-qCVw66U_.cjs');
3
+ const require_engine_context = require('./engine-context-CEu21ZZf.cjs');
4
4
  let _powerlines_core_constants = require("@powerlines/core/constants");
5
- let _stryke_async_node = require("@stryke/async/node");
6
5
  let _stryke_fs_resolve = require("@stryke/fs/resolve");
7
6
  let _stryke_path_join = require("@stryke/path/join");
8
7
  let _storm_software_config_tools_types = require("@storm-software/config-tools/types");
9
8
  let _stryke_type_checks_is_set = require("@stryke/type-checks/is-set");
9
+ let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
10
10
  let _stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
11
+ let date_fns_formatDuration = require("date-fns/formatDuration");
11
12
  let jest_worker = require("jest-worker");
13
+ let node_os = require("node:os");
12
14
  let node_stream = require("node:stream");
13
15
  let node_util = require("node:util");
16
+ let _stryke_convert_to_array = require("@stryke/convert/to-array");
17
+ let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
14
18
 
19
+ //#region src/_internal/ipc/helpers.ts
20
+ function parseIpcMessage(data) {
21
+ let message;
22
+ if ((0, _stryke_type_checks_is_set_object.isSetObject)(data)) message = data;
23
+ else if ((0, _stryke_type_checks_is_string.isString)(data)) try {
24
+ const parsed = JSON.parse(data);
25
+ if ((0, _stryke_type_checks_is_set_object.isSetObject)(parsed)) message = parsed;
26
+ } catch {}
27
+ if (message && (0, _stryke_type_checks_is_set_string.isSetString)(message.id) && (0, _stryke_type_checks_is_set_string.isSetString)(message.type) && (0, _stryke_type_checks_is_set_string.isSetString)(message.executionId) && Number.isInteger(message.executionIndex) && !Number.isNaN(message.timestamp)) return message;
28
+ }
29
+ function parseWriteLogMessagePayload(data) {
30
+ if ((0, _stryke_type_checks_is_set_string.isSetString)(data?.level) && data?.args) return {
31
+ level: data.level,
32
+ source: (0, _stryke_type_checks_is_set.isSet)(data.source) ? String(data.source) : void 0,
33
+ environment: (0, _stryke_type_checks_is_set.isSet)(data.environment) ? String(data.environment) : void 0,
34
+ plugin: (0, _stryke_type_checks_is_set.isSet)(data.plugin) ? String(data.plugin) : void 0,
35
+ args: (0, _stryke_convert_to_array.toArray)(data.args).filter(Boolean)
36
+ };
37
+ throw new Error("Invalid \"write-log\" message payload.");
38
+ }
39
+ function parseUpdateCommandMessagePayload(data) {
40
+ if ((0, _stryke_type_checks_is_set_string.isSetString)(data?.command)) return { command: data.command };
41
+ throw new Error("Invalid \"update-command\" message payload.");
42
+ }
43
+ function parseUpdateHookMessagePayload(data) {
44
+ if ((0, _stryke_type_checks_is_set_string.isSetString)(data?.hook) && [
45
+ "pre",
46
+ "post",
47
+ "normal"
48
+ ].includes(data.order)) return {
49
+ hook: data.hook,
50
+ order: data.order
51
+ };
52
+ throw new Error("Invalid \"update-hook\" message payload.");
53
+ }
54
+ function parseUpdatePluginMessagePayload(data) {
55
+ if ((0, _stryke_type_checks_is_set_string.isSetString)(data?.plugin)) return { plugin: data.plugin };
56
+ throw new Error("Invalid \"update-plugin\" message payload.");
57
+ }
58
+
59
+ //#endregion
15
60
  //#region src/_internal/helpers/worker.ts
16
61
  const RESTARTED = Symbol("powerlines-worker:restarted");
17
62
  /**
18
63
  * Formats the debug address into a string.
19
64
  */
20
65
  const formatDebugAddress = ({ host, port }) => {
21
- if (host) return `${host}:${port}`;
22
- return `${port}`;
66
+ return host ? `${host}:${port}` : `${port}`;
23
67
  };
24
68
  /**
25
69
  * Node.js CLI flags that are not allowed in NODE_OPTIONS and must be
@@ -213,6 +257,22 @@ var Worker = class {
213
257
  delete nodeOptions.max_old_space_size;
214
258
  }
215
259
  const { nodeOptions: formattedNodeOptions, execArgv } = formatNodeOptions(nodeOptions);
260
+ const onHanging = () => {
261
+ const worker = this.#worker;
262
+ if (!worker) return;
263
+ const resolve = resolveRestartPromise;
264
+ createWorker();
265
+ logger(_storm_software_config_tools_types.LogLevelLabel.WARN, `Sending SIGTERM signal to static worker due to timeout${timeout ? ` of ${(0, date_fns_formatDuration.formatDuration)({ seconds: timeout / 1e3 })}` : ""}. Subsequent errors may be a result of the worker exiting.`);
266
+ worker.end().then(() => {
267
+ resolve(RESTARTED);
268
+ });
269
+ };
270
+ let hangingTimer = false;
271
+ const onActivity = () => {
272
+ if (hangingTimer) clearTimeout(hangingTimer);
273
+ if (this.options.onActivity) this.options.onActivity();
274
+ hangingTimer = activeTasks > 0 && setTimeout(onHanging, timeout);
275
+ };
216
276
  const createWorker = () => {
217
277
  const workerEnv = {
218
278
  ...process.env,
@@ -224,13 +284,14 @@ var Worker = class {
224
284
  if (!workerEnv.NO_COLOR && !workerEnv.CI && workerEnv.TERM !== "dumb" && (process.stdout.isTTY || process.stderr?.isTTY)) workerEnv.FORCE_COLOR = "1";
225
285
  }
226
286
  this.#worker = new jest_worker.Worker(workerPath, {
287
+ maxRetries: 0,
288
+ numWorkers: (0, node_os.cpus)().length ?? 3,
227
289
  ...rest,
228
290
  forkOptions: {
229
291
  ...rest.forkOptions,
230
292
  execArgv: [...execArgv, ...rest.forkOptions?.execArgv ?? []],
231
293
  env: workerEnv
232
- },
233
- maxRetries: 0
294
+ }
234
295
  });
235
296
  restartPromise = new Promise((resolve) => {
236
297
  resolveRestartPromise = resolve;
@@ -251,8 +312,47 @@ var Worker = class {
251
312
  process.exit(code ?? 1);
252
313
  }
253
314
  });
254
- worker._child?.on("message", ([, data]) => {
255
- if (data && typeof data === "object" && "type" in data && data.type === "activity") onActivity();
315
+ worker._child?.on("message", (data) => {
316
+ if ((0, _stryke_type_checks_is_set_object.isSetObject)(data) && data.type === "activity") onActivity();
317
+ else {
318
+ const message = parseIpcMessage(data);
319
+ if (message) {
320
+ logger(_storm_software_config_tools_types.LogLevelLabel.TRACE, `Received IPC message from worker: ${JSON.stringify(message)}`);
321
+ switch (message.type) {
322
+ case "write-log":
323
+ if (options.onWriteLog) Promise.resolve(options.onWriteLog({
324
+ ...message,
325
+ type: "write-log",
326
+ payload: parseWriteLogMessagePayload(message.payload)
327
+ }));
328
+ break;
329
+ case "update-command":
330
+ if (options.onUpdateCommand) Promise.resolve(options.onUpdateCommand({
331
+ ...message,
332
+ type: "update-command",
333
+ payload: parseUpdateCommandMessagePayload(message.payload)
334
+ }));
335
+ break;
336
+ case "update-hook":
337
+ if (options.onUpdateHook) Promise.resolve(options.onUpdateHook({
338
+ ...message,
339
+ type: "update-hook",
340
+ payload: parseUpdateHookMessagePayload(message.payload)
341
+ }));
342
+ break;
343
+ case "update-plugin":
344
+ if (options.onUpdatePlugin) Promise.resolve(options.onUpdatePlugin({
345
+ ...message,
346
+ type: "update-plugin",
347
+ payload: parseUpdatePluginMessagePayload(message.payload)
348
+ }));
349
+ break;
350
+ case "activity":
351
+ case void 0:
352
+ default: break;
353
+ }
354
+ }
355
+ }
256
356
  });
257
357
  }
258
358
  let aborted = false;
@@ -272,22 +372,6 @@ var Worker = class {
272
372
  this.#worker.getStderr().pipe(process.stderr);
273
373
  };
274
374
  createWorker();
275
- const onHanging = () => {
276
- const worker = this.#worker;
277
- if (!worker) return;
278
- const resolve = resolveRestartPromise;
279
- createWorker();
280
- logger(_storm_software_config_tools_types.LogLevelLabel.WARN, `Sending SIGTERM signal to static worker due to timeout${timeout ? ` of ${timeout / 1e3} seconds` : ""}. Subsequent errors may be a result of the worker exiting.`);
281
- worker.end().then(() => {
282
- resolve(RESTARTED);
283
- });
284
- };
285
- let hangingTimer = false;
286
- const onActivity = () => {
287
- if (hangingTimer) clearTimeout(hangingTimer);
288
- if (this.options.onActivity) this.options.onActivity();
289
- hangingTimer = activeTasks > 0 && setTimeout(onHanging, timeout);
290
- };
291
375
  for (const method of rest.exposedMethods) {
292
376
  if (method.startsWith("_")) continue;
293
377
  this[method] = timeout ? async (...args) => {
@@ -345,10 +429,6 @@ var PowerlinesEngine = class PowerlinesEngine {
345
429
  */
346
430
  #worker;
347
431
  /**
348
- * The queue for managing concurrent execution of Powerlines commands, ensuring that commands are executed in a controlled manner to prevent resource exhaustion and ensure optimal performance.
349
- */
350
- #queue = new _stryke_async_node.PQueue();
351
- /**
352
432
  * Create a new Powerlines Engine instance
353
433
  *
354
434
  * @param options - The options to initialize the context with
@@ -359,6 +439,7 @@ var PowerlinesEngine = class PowerlinesEngine {
359
439
  const packagePath = await (0, _stryke_fs_resolve.resolvePackage)("@powerlines/engine");
360
440
  if (!packagePath) throw new Error("Could not resolve `@powerlines/engine` package location.");
361
441
  api.#worker = new Worker((0, _stryke_path_join.joinPaths)(packagePath, "./_internal/worker.mjs"), {
442
+ enableSourceMaps: options.mode === "development",
362
443
  exposedMethods: _powerlines_core_constants.POWERLINES_API_FUNCTIONS,
363
444
  logger: api.context.createLog(null)
364
445
  });
@@ -391,8 +472,8 @@ var PowerlinesEngine = class PowerlinesEngine {
391
472
  this.context.info(" 🏗️ Generating typescript declarations for the Powerlines project");
392
473
  this.context.debug(" Aggregating configuration options for the Powerlines project");
393
474
  inlineConfig.command ??= "types";
394
- await Promise.all(this.#context.executions.map(async (options) => this.#worker.types({
395
- options,
475
+ await Promise.all(this.#context.executions.map(async (execution) => this.#worker.types({
476
+ options: execution.options,
396
477
  config: inlineConfig
397
478
  })));
398
479
  this.context.debug("✔ Powerlines types generation has completed successfully");
@@ -411,10 +492,10 @@ var PowerlinesEngine = class PowerlinesEngine {
411
492
  this.context.info(" 🏗️ Preparing the Powerlines project");
412
493
  this.context.debug("Aggregating configuration options for the Powerlines project");
413
494
  inlineConfig.command ??= "prepare";
414
- await Promise.all(this.#context.executions.map(async (options) => this.#queue.add(async () => this.#worker.prepare({
415
- options,
495
+ await Promise.all(this.#context.executions.map(async (execution) => this.#worker.prepare({
496
+ options: execution.options,
416
497
  config: inlineConfig
417
- }))));
498
+ })));
418
499
  this.context.debug("✔ Powerlines preparation has completed successfully");
419
500
  timer();
420
501
  }
@@ -431,10 +512,10 @@ var PowerlinesEngine = class PowerlinesEngine {
431
512
  const timer = this.context.timer("New");
432
513
  this.context.info(" 🆕 Creating a new Powerlines project");
433
514
  inlineConfig.command ??= "new";
434
- await Promise.all(this.#context.executions.map(async (options) => this.#queue.add(async () => this.#worker.new({
435
- options,
515
+ await Promise.all(this.#context.executions.map(async (execution) => this.#worker.new({
516
+ options: execution.options,
436
517
  config: inlineConfig
437
- }))));
518
+ })));
438
519
  this.context.debug("✔ Powerlines new command completed successfully");
439
520
  timer();
440
521
  }
@@ -451,10 +532,10 @@ var PowerlinesEngine = class PowerlinesEngine {
451
532
  const timer = this.context.timer("Clean");
452
533
  this.context.info(" 🧹 Cleaning the previous Powerlines artifacts");
453
534
  inlineConfig.command ??= "clean";
454
- await Promise.all(this.#context.executions.map(async (options) => this.#queue.add(async () => this.#worker.clean({
455
- options,
535
+ await Promise.all(this.#context.executions.map(async (execution) => this.#worker.clean({
536
+ options: execution.options,
456
537
  config: inlineConfig
457
- }))));
538
+ })));
458
539
  this.context.debug("✔ Powerlines cleaning completed successfully");
459
540
  timer();
460
541
  }
@@ -468,10 +549,10 @@ var PowerlinesEngine = class PowerlinesEngine {
468
549
  const timer = this.context.timer("Lint");
469
550
  this.context.info(" 📝 Linting the Powerlines project");
470
551
  inlineConfig.command ??= "lint";
471
- await Promise.all(this.#context.executions.map(async (options) => this.#queue.add(async () => this.#worker.lint({
472
- options,
552
+ await Promise.all(this.#context.executions.map(async (execution) => this.#worker.lint({
553
+ options: execution.options,
473
554
  config: inlineConfig
474
- }))));
555
+ })));
475
556
  this.context.debug("✔ Powerlines linting completed successfully");
476
557
  timer();
477
558
  }
@@ -488,10 +569,10 @@ var PowerlinesEngine = class PowerlinesEngine {
488
569
  const timer = this.context.timer("Test");
489
570
  this.context.info(" 🧪 Running tests for the Powerlines project");
490
571
  inlineConfig.command ??= "test";
491
- await Promise.all(this.#context.executions.map(async (options) => this.#queue.add(async () => this.#worker.test({
492
- options,
572
+ await Promise.all(this.#context.executions.map(async (execution) => this.#worker.test({
573
+ options: execution.options,
493
574
  config: inlineConfig
494
- }))));
575
+ })));
495
576
  this.context.debug("✔ Powerlines testing completed successfully");
496
577
  timer();
497
578
  }
@@ -507,10 +588,10 @@ var PowerlinesEngine = class PowerlinesEngine {
507
588
  async build(inlineConfig = { command: "build" }) {
508
589
  const timer = this.context.timer("Build");
509
590
  this.context.info(" 📦 Building the Powerlines project");
510
- await Promise.all(this.#context.executions.map(async (options) => this.#queue.add(async () => this.#worker.build({
511
- options,
591
+ await Promise.all(this.#context.executions.map(async (execution) => this.#worker.build({
592
+ options: execution.options,
512
593
  config: inlineConfig
513
- }))));
594
+ })));
514
595
  this.context.debug("✔ Powerlines build completed successfully");
515
596
  timer();
516
597
  }
@@ -524,10 +605,10 @@ var PowerlinesEngine = class PowerlinesEngine {
524
605
  const timer = this.context.timer("Docs");
525
606
  this.context.info(" 📓 Generating documentation for the Powerlines project");
526
607
  inlineConfig.command ??= "docs";
527
- await Promise.all(this.#context.executions.map(async (options) => this.#queue.add(async () => this.#worker.docs({
528
- options,
608
+ await Promise.all(this.#context.executions.map(async (execution) => this.#worker.docs({
609
+ options: execution.options,
529
610
  config: inlineConfig
530
- }))));
611
+ })));
531
612
  this.context.debug("✔ Powerlines documentation generation completed successfully");
532
613
  timer();
533
614
  }
@@ -543,10 +624,10 @@ var PowerlinesEngine = class PowerlinesEngine {
543
624
  const timer = this.context.timer("Deploy");
544
625
  this.context.info(" 🚀 Deploying the Powerlines project");
545
626
  inlineConfig.command ??= "deploy";
546
- await Promise.all(this.#context.executions.map(async (options) => this.#queue.add(async () => this.#worker.deploy({
547
- options,
627
+ await Promise.all(this.#context.executions.map(async (execution) => this.#worker.deploy({
628
+ options: execution.options,
548
629
  config: inlineConfig
549
- }))));
630
+ })));
550
631
  this.context.debug("✔ Powerlines deploy completed successfully");
551
632
  timer();
552
633
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;AAiDA;;;;;;cAAa,gBAAA,YAA4B,MAAA,EAAQ,eAAA;EAAA;EAsEtC;;;;;;EAAA,OAhDW,WAAA,CAClB,OAAA,EAAS,aAAA,GACR,OAAA,CAAQ,gBAAA;EAwFY;;;EAAA,IAjEZ,OAAA,CAAA,GAAW,aAAA;EAkEJ;;;;;EAAA,UAzDT,WAAA,CAAa,OAAA,EAAS,aAAA;EA2Db;;;;;;;;EA/CL,KAAA,CACX,YAAA,GAAc,WAAA,CACZ,IAAA,CAAK,iBAAA,8BAIN,OAAA;EA4Ce;;;;;;;;EATL,OAAA,CACX,YAAA,GACI,WAAA,CAAY,IAAA,CAAK,mBAAA,8BACjB,WAAA,CAAY,IAAA,CAAK,iBAAA,8BACjB,WAAA,CAAY,IAAA,CAAK,eAAA,8BACjB,WAAA,CAAY,IAAA,CAAK,iBAAA,8BACjB,WAAA,CAAY,IAAA,CAAK,iBAAA,8BACjB,WAAA,CAAY,IAAA,CAAK,gBAAA,8BACjB,WAAA,CAAY,IAAA,CAAK,gBAAA,8BACjB,WAAA,CAAY,IAAA,CAAK,kBAAA,8BAEpB,O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