@powerlines/engine 0.44.6 → 0.44.8

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.
@@ -1432,10 +1432,7 @@ var VirtualFileSystem = class VirtualFileSystem {
1432
1432
  return ret;
1433
1433
  }, {});
1434
1434
  }
1435
- this.#logger = context.extendLogger({
1436
- source: "VFS",
1437
- category: "fs"
1438
- });
1435
+ this.#logger = context.extendLogger({ category: "fs" });
1439
1436
  }
1440
1437
  /**
1441
1438
  * Asynchronously checks if a file exists in the virtual file system (VFS).
@@ -3289,7 +3286,7 @@ function mergeConfigs(currentResult, previousResults) {
3289
3286
  async function callHook(context, key, options, ...args) {
3290
3287
  const hooks = context.selectHooks(key, options);
3291
3288
  if (hooks.length > 0) {
3292
- context.extendLogger({ category: "hooks" }).debug(` 🧩 Calling ${hooks.length} ${chalk.default.bold.cyanBright(`${key}${options?.order ? ` (${options.order})` : ""}`)} plugin hook${hooks.length > 1 ? "s" : ""}:\n${hooks.map((hook, index) => ` ${index + 1}. ${(0, _powerlines_core_plugin_utils_logging.colorText)(hook.plugin.name)}`).join("\n")}`);
3289
+ context.extendLogger({ category: "hooks" }).debug(`🧩 Calling ${hooks.length} ${chalk.default.bold.cyanBright(`${key}${options?.order ? ` (${options.order})` : ""}`)} plugin hook${hooks.length > 1 ? "s" : ""}:\n${hooks.map((hook, index) => ` ${index + 1}. ${(0, _powerlines_core_plugin_utils_logging.colorText)(hook.plugin.name)}`).join("\n")}`);
3293
3290
  const invokeHook = async (hook, hookArgs) => {
3294
3291
  return Reflect.apply(hook.handler, hook.context, hookArgs);
3295
3292
  };
@@ -4589,8 +4586,14 @@ ${formatTypes(code)}
4589
4586
  };
4590
4587
  const timer = api.context.timer("Initialization");
4591
4588
  for (const plugin of api.context.config.plugins.flatMap((p) => (0, _stryke_convert_to_array.toArray)(p)) ?? []) await api.addPlugin(plugin);
4592
- if (api.context.plugins.length === 0) api.context.warn("No Powerlines plugins were specified in the options. Please ensure this is correct, as it is generally not recommended.");
4593
- else api.context.info(`Loaded ${api.context.plugins.length} ${(0, _stryke_string_format_title_case.titleCase)(api.context.config.framework)} plugin${api.context.plugins.length > 1 ? "s" : ""}: \n${api.context.plugins.map((plugin, index) => ` ${index + 1}. ${(0, _powerlines_core_plugin_utils_logging.colorText)(plugin.name)}`).join("\n")}`);
4589
+ if (api.context.plugins.length === 0) api.context.warn({
4590
+ meta: { category: "plugins" },
4591
+ message: "No Powerlines plugins were specified in the options. Please ensure this is correct, as it is generally not recommended."
4592
+ });
4593
+ else api.context.info({
4594
+ meta: { category: "plugins" },
4595
+ message: `Loaded ${api.context.plugins.length} ${(0, _stryke_string_format_title_case.titleCase)(api.context.config.framework)} plugin${api.context.plugins.length > 1 ? "s" : ""}: \n${api.context.plugins.map((plugin, index) => ` ${index + 1}. ${(0, _powerlines_core_plugin_utils_logging.colorText)(plugin.name)}`).join("\n")}`
4596
+ });
4594
4597
  const pluginConfig = await api.callHook("config", {
4595
4598
  environment: await api.context.getEnvironment(),
4596
4599
  sequential: true,
@@ -4920,7 +4923,10 @@ ${formatTypes(code)}
4920
4923
  const result = await this.#initPlugin(config);
4921
4924
  if (!result) return;
4922
4925
  for (const plugin of result) {
4923
- this.context.debug(`Successfully initialized the ${chalk.default.bold.cyanBright(plugin.name)} plugin`);
4926
+ this.context.debug({
4927
+ meta: { category: "plugins" },
4928
+ message: `Successfully initialized the ${chalk.default.bold.cyanBright(plugin.name)} plugin`
4929
+ });
4924
4930
  await this.context.addPlugin(plugin);
4925
4931
  }
4926
4932
  }
@@ -1399,10 +1399,7 @@ var VirtualFileSystem = class VirtualFileSystem {
1399
1399
  return ret;
1400
1400
  }, {});
1401
1401
  }
1402
- this.#logger = context.extendLogger({
1403
- source: "VFS",
1404
- category: "fs"
1405
- });
1402
+ this.#logger = context.extendLogger({ category: "fs" });
1406
1403
  }
1407
1404
  /**
1408
1405
  * Asynchronously checks if a file exists in the virtual file system (VFS).
@@ -3256,7 +3253,7 @@ function mergeConfigs(currentResult, previousResults) {
3256
3253
  async function callHook(context, key, options, ...args) {
3257
3254
  const hooks = context.selectHooks(key, options);
3258
3255
  if (hooks.length > 0) {
3259
- context.extendLogger({ category: "hooks" }).debug(` 🧩 Calling ${hooks.length} ${chalk.bold.cyanBright(`${key}${options?.order ? ` (${options.order})` : ""}`)} plugin hook${hooks.length > 1 ? "s" : ""}:\n${hooks.map((hook, index) => ` ${index + 1}. ${colorText(hook.plugin.name)}`).join("\n")}`);
3256
+ context.extendLogger({ category: "hooks" }).debug(`🧩 Calling ${hooks.length} ${chalk.bold.cyanBright(`${key}${options?.order ? ` (${options.order})` : ""}`)} plugin hook${hooks.length > 1 ? "s" : ""}:\n${hooks.map((hook, index) => ` ${index + 1}. ${colorText(hook.plugin.name)}`).join("\n")}`);
3260
3257
  const invokeHook = async (hook, hookArgs) => {
3261
3258
  return Reflect.apply(hook.handler, hook.context, hookArgs);
3262
3259
  };
@@ -4556,8 +4553,14 @@ ${formatTypes(code)}
4556
4553
  };
4557
4554
  const timer = api.context.timer("Initialization");
4558
4555
  for (const plugin of api.context.config.plugins.flatMap((p) => toArray(p)) ?? []) await api.addPlugin(plugin);
4559
- if (api.context.plugins.length === 0) api.context.warn("No Powerlines plugins were specified in the options. Please ensure this is correct, as it is generally not recommended.");
4560
- else api.context.info(`Loaded ${api.context.plugins.length} ${titleCase(api.context.config.framework)} plugin${api.context.plugins.length > 1 ? "s" : ""}: \n${api.context.plugins.map((plugin, index) => ` ${index + 1}. ${colorText(plugin.name)}`).join("\n")}`);
4556
+ if (api.context.plugins.length === 0) api.context.warn({
4557
+ meta: { category: "plugins" },
4558
+ message: "No Powerlines plugins were specified in the options. Please ensure this is correct, as it is generally not recommended."
4559
+ });
4560
+ else api.context.info({
4561
+ meta: { category: "plugins" },
4562
+ message: `Loaded ${api.context.plugins.length} ${titleCase(api.context.config.framework)} plugin${api.context.plugins.length > 1 ? "s" : ""}: \n${api.context.plugins.map((plugin, index) => ` ${index + 1}. ${colorText(plugin.name)}`).join("\n")}`
4563
+ });
4561
4564
  const pluginConfig = await api.callHook("config", {
4562
4565
  environment: await api.context.getEnvironment(),
4563
4566
  sequential: true,
@@ -4887,7 +4890,10 @@ ${formatTypes(code)}
4887
4890
  const result = await this.#initPlugin(config);
4888
4891
  if (!result) return;
4889
4892
  for (const plugin of result) {
4890
- this.context.debug(`Successfully initialized the ${chalk.bold.cyanBright(plugin.name)} plugin`);
4893
+ this.context.debug({
4894
+ meta: { category: "plugins" },
4895
+ message: `Successfully initialized the ${chalk.bold.cyanBright(plugin.name)} plugin`
4896
+ });
4891
4897
  await this.context.addPlugin(plugin);
4892
4898
  }
4893
4899
  }