@storm-software/workspace-tools 1.62.6 → 1.62.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.
@@ -4479,20 +4479,20 @@ var require_typescript = __commonJS({
4479
4479
  })();
4480
4480
  }
4481
4481
  });
4482
- var LogLevel4, Debug;
4482
+ var LogLevel, Debug;
4483
4483
  var init_debug = __esm2({
4484
4484
  "src/compiler/debug.ts"() {
4485
4485
  "use strict";
4486
4486
  init_ts2();
4487
4487
  init_ts2();
4488
- LogLevel4 = /* @__PURE__ */ ((LogLevel32) => {
4489
- LogLevel32[LogLevel32["Off"] = 0] = "Off";
4490
- LogLevel32[LogLevel32["Error"] = 1] = "Error";
4491
- LogLevel32[LogLevel32["Warning"] = 2] = "Warning";
4492
- LogLevel32[LogLevel32["Info"] = 3] = "Info";
4493
- LogLevel32[LogLevel32["Verbose"] = 4] = "Verbose";
4494
- return LogLevel32;
4495
- })(LogLevel4 || {});
4488
+ LogLevel = /* @__PURE__ */ ((LogLevel3) => {
4489
+ LogLevel3[LogLevel3["Off"] = 0] = "Off";
4490
+ LogLevel3[LogLevel3["Error"] = 1] = "Error";
4491
+ LogLevel3[LogLevel3["Warning"] = 2] = "Warning";
4492
+ LogLevel3[LogLevel3["Info"] = 3] = "Info";
4493
+ LogLevel3[LogLevel3["Verbose"] = 4] = "Verbose";
4494
+ return LogLevel3;
4495
+ })(LogLevel || {});
4496
4496
  ((Debug2) => {
4497
4497
  let currentAssertionLevel = 0;
4498
4498
  Debug2.currentLogLevel = 2;
@@ -187061,12 +187061,12 @@ ${options8.prefix}` : "\n" : options8.prefix
187061
187061
  "src/server/utilitiesPublic.ts"() {
187062
187062
  "use strict";
187063
187063
  init_ts7();
187064
- LogLevel22 = /* @__PURE__ */ ((LogLevel32) => {
187065
- LogLevel32[LogLevel32["terse"] = 0] = "terse";
187066
- LogLevel32[LogLevel32["normal"] = 1] = "normal";
187067
- LogLevel32[LogLevel32["requestTime"] = 2] = "requestTime";
187068
- LogLevel32[LogLevel32["verbose"] = 3] = "verbose";
187069
- return LogLevel32;
187064
+ LogLevel22 = /* @__PURE__ */ ((LogLevel3) => {
187065
+ LogLevel3[LogLevel3["terse"] = 0] = "terse";
187066
+ LogLevel3[LogLevel3["normal"] = 1] = "normal";
187067
+ LogLevel3[LogLevel3["requestTime"] = 2] = "requestTime";
187068
+ LogLevel3[LogLevel3["verbose"] = 3] = "verbose";
187069
+ return LogLevel3;
187070
187070
  })(LogLevel22 || {});
187071
187071
  emptyArray22 = createSortedArray22();
187072
187072
  Msg2 = /* @__PURE__ */ ((Msg22) => {
@@ -198597,7 +198597,7 @@ ${e3.message}`;
198597
198597
  LanguageVariant: () => LanguageVariant,
198598
198598
  LexicalEnvironmentFlags: () => LexicalEnvironmentFlags,
198599
198599
  ListFormat: () => ListFormat,
198600
- LogLevel: () => LogLevel4,
198600
+ LogLevel: () => LogLevel,
198601
198601
  MemberOverrideStatus: () => MemberOverrideStatus,
198602
198602
  ModifierFlags: () => ModifierFlags,
198603
198603
  ModuleDetectionKind: () => ModuleDetectionKind,
@@ -201001,7 +201001,7 @@ ${e3.message}`;
201001
201001
  LanguageVariant: () => LanguageVariant,
201002
201002
  LexicalEnvironmentFlags: () => LexicalEnvironmentFlags,
201003
201003
  ListFormat: () => ListFormat,
201004
- LogLevel: () => LogLevel4,
201004
+ LogLevel: () => LogLevel,
201005
201005
  MemberOverrideStatus: () => MemberOverrideStatus,
201006
201006
  ModifierFlags: () => ModifierFlags,
201007
201007
  ModuleDetectionKind: () => ModuleDetectionKind,
@@ -448946,9 +448946,6 @@ __export(executor_exports, {
448946
448946
  });
448947
448947
  module.exports = __toCommonJS(executor_exports);
448948
448948
 
448949
- // packages/workspace-tools/src/base/base-executor.ts
448950
- var import_config_tools2 = require("@storm-software/config-tools");
448951
-
448952
448949
  // packages/workspace-tools/src/utils/apply-workspace-tokens.ts
448953
448950
  var import_config_tools = require("@storm-software/config-tools");
448954
448951
  var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
@@ -449022,23 +449019,34 @@ var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
449022
449019
 
449023
449020
  // packages/workspace-tools/src/base/base-executor.ts
449024
449021
  var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
449025
- const stopwatch = (0, import_config_tools2.getStopwatch)(name);
449022
+ const {
449023
+ getStopwatch,
449024
+ writeDebug,
449025
+ writeError,
449026
+ writeFatal,
449027
+ writeInfo,
449028
+ writeSuccess,
449029
+ writeTrace,
449030
+ findWorkspaceRoot: findWorkspaceRoot3,
449031
+ loadStormConfig
449032
+ } = await import("@storm-software/config-tools");
449033
+ const stopwatch = getStopwatch(name);
449026
449034
  let options8 = _options;
449027
449035
  let config;
449028
449036
  try {
449029
- (0, import_config_tools2.writeInfo)(config, `\u26A1 Running the ${name} executor...
449037
+ writeInfo(config, `\u26A1 Running the ${name} executor...
449030
449038
  `);
449031
449039
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
449032
449040
  throw new Error(
449033
449041
  "The Build process failed because the context is not valid. Please run this command from a workspace."
449034
449042
  );
449035
449043
  }
449036
- const workspaceRoot = (0, import_config_tools2.findWorkspaceRoot)();
449044
+ const workspaceRoot = findWorkspaceRoot3();
449037
449045
  const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
449038
449046
  const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
449039
449047
  const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
449040
449048
  if (!executorOptions.skipReadingConfig) {
449041
- (0, import_config_tools2.writeDebug)(
449049
+ writeDebug(
449042
449050
  config,
449043
449051
  `Loading the Storm Config from environment variables and storm.config.js file...
449044
449052
  - workspaceRoot: ${workspaceRoot}
@@ -449047,8 +449055,8 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
449047
449055
  - projectName: ${projectName}
449048
449056
  `
449049
449057
  );
449050
- config = await (0, import_config_tools2.loadStormConfig)(workspaceRoot);
449051
- (0, import_config_tools2.writeTrace)(
449058
+ config = await loadStormConfig(workspaceRoot);
449059
+ writeTrace(
449052
449060
  config,
449053
449061
  `Loaded Storm config into env:
449054
449062
  ${Object.keys(process.env).filter((key2) => key2.startsWith("STORM_")).map(
@@ -449057,11 +449065,11 @@ ${Object.keys(process.env).filter((key2) => key2.startsWith("STORM_")).map(
449057
449065
  );
449058
449066
  }
449059
449067
  if (executorOptions?.hooks?.applyDefaultOptions) {
449060
- (0, import_config_tools2.writeDebug)(config, "Running the applyDefaultOptions hook...");
449068
+ writeDebug(config, "Running the applyDefaultOptions hook...");
449061
449069
  options8 = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options8, config));
449062
- (0, import_config_tools2.writeDebug)(config, "Completed the applyDefaultOptions hook");
449070
+ writeDebug(config, "Completed the applyDefaultOptions hook");
449063
449071
  }
449064
- (0, import_config_tools2.writeTrace)(
449072
+ writeTrace(
449065
449073
  config,
449066
449074
  `Executor schema options \u2699\uFE0F
449067
449075
  ${Object.keys(options8).map(
@@ -449082,9 +449090,9 @@ ${Object.keys(options8).map(
449082
449090
  applyWorkspaceExecutorTokens
449083
449091
  );
449084
449092
  if (executorOptions?.hooks?.preProcess) {
449085
- (0, import_config_tools2.writeDebug)(config, "Running the preProcess hook...");
449093
+ writeDebug(config, "Running the preProcess hook...");
449086
449094
  await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
449087
- (0, import_config_tools2.writeDebug)(config, "Completed the preProcess hook");
449095
+ writeDebug(config, "Completed the preProcess hook");
449088
449096
  }
449089
449097
  const result = await Promise.resolve(executorFn(tokenized, context, config));
449090
449098
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
@@ -449093,21 +449101,21 @@ ${Object.keys(options8).map(
449093
449101
  });
449094
449102
  }
449095
449103
  if (executorOptions?.hooks?.postProcess) {
449096
- (0, import_config_tools2.writeDebug)(config, "Running the postProcess hook...");
449104
+ writeDebug(config, "Running the postProcess hook...");
449097
449105
  await Promise.resolve(executorOptions.hooks.postProcess(config));
449098
- (0, import_config_tools2.writeDebug)(config, "Completed the postProcess hook");
449106
+ writeDebug(config, "Completed the postProcess hook");
449099
449107
  }
449100
- (0, import_config_tools2.writeSuccess)(config, `Completed running the ${name} task executor!
449108
+ writeSuccess(config, `Completed running the ${name} task executor!
449101
449109
  `);
449102
449110
  return {
449103
449111
  success: true
449104
449112
  };
449105
449113
  } catch (error) {
449106
- (0, import_config_tools2.writeFatal)(
449114
+ writeFatal(
449107
449115
  config,
449108
449116
  "A fatal error occurred while running the executor - the process was forced to terminate"
449109
449117
  );
449110
- (0, import_config_tools2.writeError)(
449118
+ writeError(
449111
449119
  config,
449112
449120
  `An exception was thrown in the executor's process
449113
449121
  - Details: ${error.message}
@@ -449164,7 +449172,6 @@ var import_esbuild_decorators = __toESM(require_src());
449164
449172
  var import_devkit2 = __toESM(require_devkit());
449165
449173
  var import_get_custom_transformers_factory = __toESM(require_get_custom_transformers_factory());
449166
449174
  var import_normalize_options = __toESM(require_normalize_options());
449167
- var import_config_tools3 = require("@storm-software/config-tools");
449168
449175
 
449169
449176
  // node_modules/.pnpm/esbuild-plugin-define@0.4.0_esbuild@0.19.12/node_modules/esbuild-plugin-define/dist/mjs/utils.js
449170
449177
  var makeKey = (...inputs) => inputs.filter((input) => !!input).join(".");
@@ -449365,7 +449372,8 @@ var applyDefaultOptions = (options8) => {
449365
449372
  return options8;
449366
449373
  };
449367
449374
  var runTsupBuild = async (context, config, options8) => {
449368
- const workspaceRoot = config?.workspaceRoot ?? (0, import_config_tools3.findWorkspaceRoot)();
449375
+ const { LogLevel, getLogLevel, writeInfo, writeWarning, findWorkspaceRoot: findWorkspaceRoot3 } = await import("@storm-software/config-tools");
449376
+ const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot3();
449369
449377
  const stormEnv = Object.keys(options8.env ?? {}).filter((key2) => key2.startsWith("STORM_")).reduce((ret, key2) => {
449370
449378
  ret[key2] = options8.env?.[key2];
449371
449379
  return ret;
@@ -449424,7 +449432,7 @@ ${options8.banner}
449424
449432
  outputPath: options8.outputPath
449425
449433
  };
449426
449434
  if (options8.getConfig) {
449427
- (0, import_config_tools3.writeInfo)(config, "\u26A1 Running the Build process");
449435
+ writeInfo(config, "\u26A1 Running the Build process");
449428
449436
  const getConfigFns = [options8.getConfig];
449429
449437
  const tsupConfig = (0, import_tsup.defineConfig)(
449430
449438
  getConfigFns.map(
@@ -449437,8 +449445,8 @@ ${options8.banner}
449437
449445
  } else {
449438
449446
  await build(tsupConfig, config);
449439
449447
  }
449440
- } else if ((0, import_config_tools3.getLogLevel)(config?.logLevel ?? "debug") >= import_config_tools3.LogLevel.WARN) {
449441
- (0, import_config_tools3.writeWarning)(
449448
+ } else if (getLogLevel(config?.logLevel ?? "debug") >= LogLevel.WARN) {
449449
+ writeWarning(
449442
449450
  config,
449443
449451
  "The Build process did not run because no `getConfig` parameter was provided"
449444
449452
  );
@@ -449473,6 +449481,7 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options8) {
449473
449481
  return tsConfig;
449474
449482
  }
449475
449483
  var build = async (options8, config) => {
449484
+ const { writeDebug } = await import("@storm-software/config-tools");
449476
449485
  if (Array.isArray(options8)) {
449477
449486
  await Promise.all(options8.map((buildOptions) => build(buildOptions, config)));
449478
449487
  } else {
@@ -449480,7 +449489,7 @@ var build = async (options8, config) => {
449480
449489
  if (_isFunction2(tsupOptions)) {
449481
449490
  tsupOptions = await Promise.resolve(tsupOptions({}));
449482
449491
  }
449483
- (0, import_config_tools3.writeDebug)(
449492
+ writeDebug(
449484
449493
  config,
449485
449494
  `\u2699\uFE0F Tsup Build options:
449486
449495
  ${!_isFunction2(tsupOptions) ? Object.keys(tsupOptions).map(
@@ -449522,7 +449531,6 @@ var createTypeScriptCompilationOptions = (normalizedOptions, projectName) => {
449522
449531
  var import_node_fs = require("node:fs");
449523
449532
  var import_devkit3 = __toESM(require_devkit());
449524
449533
  var import_js = __toESM(require_src6());
449525
- var import_config_tools5 = require("@storm-software/config-tools");
449526
449534
  var import_fs_extra = __toESM(require_lib5());
449527
449535
 
449528
449536
  // node_modules/.pnpm/minimatch@9.0.3/node_modules/minimatch/dist/mjs/index.js
@@ -455704,8 +455712,8 @@ var import_fileutils = require("nx/src/utils/fileutils.js");
455704
455712
 
455705
455713
  // packages/workspace-tools/src/utils/get-project-configurations.ts
455706
455714
  var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
455707
- var import_config_tools4 = require("@storm-software/config-tools");
455708
- var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)((0, import_config_tools4.findWorkspaceRoot)());
455715
+ var import_config_tools2 = require("@storm-software/config-tools");
455716
+ var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)((0, import_config_tools2.findWorkspaceRoot)());
455709
455717
 
455710
455718
  // packages/workspace-tools/src/utils/get-project-deps.ts
455711
455719
  function getExtraDependencies(projectName, graph) {
@@ -455742,8 +455750,18 @@ function getExtraDependencies(projectName, graph) {
455742
455750
 
455743
455751
  // packages/workspace-tools/src/executors/tsup/executor.ts
455744
455752
  async function tsupExecutorFn(options8, context, config) {
455745
- (0, import_config_tools5.writeInfo)(config, "\u{1F4E6} Running Storm build executor on the workspace");
455746
- (0, import_config_tools5.getLogLevel)(config?.logLevel) >= import_config_tools5.LogLevel.TRACE && (0, import_config_tools5.writeDebug)(
455753
+ const {
455754
+ LogLevel,
455755
+ getLogLevel,
455756
+ writeDebug,
455757
+ writeInfo,
455758
+ writeSuccess,
455759
+ writeTrace,
455760
+ writeWarning,
455761
+ findWorkspaceRoot: findWorkspaceRoot3
455762
+ } = await import("@storm-software/config-tools");
455763
+ writeInfo(config, "\u{1F4E6} Running Storm build executor on the workspace");
455764
+ writeDebug(
455747
455765
  config,
455748
455766
  `\u2699\uFE0F Executor options:
455749
455767
  ${Object.keys(options8).map(
@@ -455756,11 +455774,11 @@ ${Object.keys(options8).map(
455756
455774
  "The Build process failed because the context is not valid. Please run this command from a workspace."
455757
455775
  );
455758
455776
  }
455759
- const workspaceRoot = (0, import_config_tools5.findWorkspaceRoot)();
455777
+ const workspaceRoot = findWorkspaceRoot3();
455760
455778
  const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
455761
455779
  const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
455762
455780
  if (options8.clean !== false) {
455763
- (0, import_config_tools5.writeInfo)(config, `\u{1F9F9} Cleaning output path: ${options8.outputPath}`);
455781
+ writeInfo(config, `\u{1F9F9} Cleaning output path: ${options8.outputPath}`);
455764
455782
  (0, import_fs_extra.removeSync)(options8.outputPath);
455765
455783
  }
455766
455784
  const assets = Array.from(options8.assets);
@@ -455829,13 +455847,13 @@ ${Object.keys(options8).map(
455829
455847
  const implicitDependencies = context.projectsConfigurations.projects[context.projectName]?.implicitDependencies;
455830
455848
  const internalDependencies = [];
455831
455849
  const projectConfigs = await Promise.resolve(getProjectConfigurations());
455832
- if ((0, import_config_tools5.getLogLevel)(config?.logLevel) >= import_config_tools5.LogLevel.TRACE) {
455833
- (0, import_config_tools5.writeDebug)(config, "Project Configs:");
455850
+ if (getLogLevel(config?.logLevel) >= LogLevel.TRACE) {
455851
+ writeDebug(config, "Project Configs:");
455834
455852
  console.log(projectConfigs);
455835
455853
  }
455836
455854
  if (implicitDependencies && implicitDependencies.length > 0) {
455837
455855
  options8.external = implicitDependencies.reduce((ret, key2) => {
455838
- (0, import_config_tools5.writeDebug)(config, `\u26A1 Adding implicit dependency: ${key2}`);
455856
+ writeDebug(config, `\u26A1 Adding implicit dependency: ${key2}`);
455839
455857
  const projectConfig = projectConfigs[key2];
455840
455858
  if (projectConfig?.targets?.build) {
455841
455859
  const projectPackageJson = (0, import_devkit3.readJsonFile)(projectConfig.targets?.build.options.project);
@@ -455860,7 +455878,7 @@ ${Object.keys(options8).map(
455860
455878
  externalDependencies.push(thirdPartyDependency);
455861
455879
  }
455862
455880
  }
455863
- (0, import_config_tools5.writeTrace)(
455881
+ writeTrace(
455864
455882
  config,
455865
455883
  `Building with the following dependencies marked as external:
455866
455884
  ${externalDependencies.map((dep) => {
@@ -455887,7 +455905,7 @@ ${externalDependencies.map((dep) => {
455887
455905
  while (propertyKey.startsWith("/")) {
455888
455906
  propertyKey = propertyKey.substring(1);
455889
455907
  }
455890
- (0, import_config_tools5.writeDebug)(
455908
+ writeDebug(
455891
455909
  config,
455892
455910
  `Trying to add entry point ${propertyKey} at "${(0, import_devkit3.joinPathFragments)(
455893
455911
  filePath.path,
@@ -456007,10 +456025,10 @@ ${externalDependencies.map((dep) => {
456007
456025
  packageJson.repository ??= workspacePackageJson.repository;
456008
456026
  packageJson.repository.directory ??= projectRoot ? projectRoot : (0, import_devkit3.joinPathFragments)("packages", context.projectName);
456009
456027
  const packageJsonPath = (0, import_devkit3.joinPathFragments)(context.root, options8.outputPath, "package.json");
456010
- (0, import_config_tools5.writeDebug)(config, `\u26A1 Writing package.json file to: ${packageJsonPath}`);
456028
+ writeDebug(config, `\u26A1 Writing package.json file to: ${packageJsonPath}`);
456011
456029
  (0, import_node_fs.writeFileSync)(packageJsonPath, JSON.stringify(packageJson));
456012
456030
  } else {
456013
- (0, import_config_tools5.writeWarning)(config, "Skipping writing to package.json file");
456031
+ writeWarning(config, "Skipping writing to package.json file");
456014
456032
  }
456015
456033
  if (options8.includeSrc === true) {
456016
456034
  const files = globSync([
@@ -456046,7 +456064,7 @@ ${(0, import_node_fs.readFileSync)(file, "utf-8")}`,
456046
456064
  )
456047
456065
  )
456048
456066
  );
456049
- (0, import_config_tools5.writeSuccess)(config, "\u26A1 The Build process has completed successfully");
456067
+ writeSuccess(config, "\u26A1 The Build process has completed successfully");
456050
456068
  return {
456051
456069
  success: true
456052
456070
  };
@@ -227772,13 +227772,10 @@ __export(executor_exports, {
227772
227772
  typiaExecutorFn: () => typiaExecutorFn
227773
227773
  });
227774
227774
  module.exports = __toCommonJS(executor_exports);
227775
- var import_config_tools3 = require("@storm-software/config-tools");
227775
+ var import_config_tools2 = require("@storm-software/config-tools");
227776
227776
  var import_fs_extra = __toESM(require_lib());
227777
227777
  var import_TypiaProgrammer = __toESM(require_TypiaProgrammer());
227778
227778
 
227779
- // packages/workspace-tools/src/base/base-executor.ts
227780
- var import_config_tools2 = require("@storm-software/config-tools");
227781
-
227782
227779
  // packages/workspace-tools/src/utils/apply-workspace-tokens.ts
227783
227780
  var import_config_tools = require("@storm-software/config-tools");
227784
227781
  var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
@@ -227852,23 +227849,34 @@ var applyWorkspaceTokens = (options, config, tokenizerFn) => {
227852
227849
 
227853
227850
  // packages/workspace-tools/src/base/base-executor.ts
227854
227851
  var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
227855
- const stopwatch = (0, import_config_tools2.getStopwatch)(name);
227852
+ const {
227853
+ getStopwatch,
227854
+ writeDebug,
227855
+ writeError,
227856
+ writeFatal,
227857
+ writeInfo: writeInfo2,
227858
+ writeSuccess,
227859
+ writeTrace,
227860
+ findWorkspaceRoot: findWorkspaceRoot2,
227861
+ loadStormConfig
227862
+ } = await import("@storm-software/config-tools");
227863
+ const stopwatch = getStopwatch(name);
227856
227864
  let options = _options;
227857
227865
  let config;
227858
227866
  try {
227859
- (0, import_config_tools2.writeInfo)(config, `\u26A1 Running the ${name} executor...
227867
+ writeInfo2(config, `\u26A1 Running the ${name} executor...
227860
227868
  `);
227861
227869
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
227862
227870
  throw new Error(
227863
227871
  "The Build process failed because the context is not valid. Please run this command from a workspace."
227864
227872
  );
227865
227873
  }
227866
- const workspaceRoot = (0, import_config_tools2.findWorkspaceRoot)();
227874
+ const workspaceRoot = findWorkspaceRoot2();
227867
227875
  const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
227868
227876
  const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
227869
227877
  const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
227870
227878
  if (!executorOptions.skipReadingConfig) {
227871
- (0, import_config_tools2.writeDebug)(
227879
+ writeDebug(
227872
227880
  config,
227873
227881
  `Loading the Storm Config from environment variables and storm.config.js file...
227874
227882
  - workspaceRoot: ${workspaceRoot}
@@ -227877,8 +227885,8 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
227877
227885
  - projectName: ${projectName}
227878
227886
  `
227879
227887
  );
227880
- config = await (0, import_config_tools2.loadStormConfig)(workspaceRoot);
227881
- (0, import_config_tools2.writeTrace)(
227888
+ config = await loadStormConfig(workspaceRoot);
227889
+ writeTrace(
227882
227890
  config,
227883
227891
  `Loaded Storm config into env:
227884
227892
  ${Object.keys(process.env).filter((key) => key.startsWith("STORM_")).map(
@@ -227887,11 +227895,11 @@ ${Object.keys(process.env).filter((key) => key.startsWith("STORM_")).map(
227887
227895
  );
227888
227896
  }
227889
227897
  if (executorOptions?.hooks?.applyDefaultOptions) {
227890
- (0, import_config_tools2.writeDebug)(config, "Running the applyDefaultOptions hook...");
227898
+ writeDebug(config, "Running the applyDefaultOptions hook...");
227891
227899
  options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
227892
- (0, import_config_tools2.writeDebug)(config, "Completed the applyDefaultOptions hook");
227900
+ writeDebug(config, "Completed the applyDefaultOptions hook");
227893
227901
  }
227894
- (0, import_config_tools2.writeTrace)(
227902
+ writeTrace(
227895
227903
  config,
227896
227904
  `Executor schema options \u2699\uFE0F
227897
227905
  ${Object.keys(options).map(
@@ -227912,9 +227920,9 @@ ${Object.keys(options).map(
227912
227920
  applyWorkspaceExecutorTokens
227913
227921
  );
227914
227922
  if (executorOptions?.hooks?.preProcess) {
227915
- (0, import_config_tools2.writeDebug)(config, "Running the preProcess hook...");
227923
+ writeDebug(config, "Running the preProcess hook...");
227916
227924
  await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
227917
- (0, import_config_tools2.writeDebug)(config, "Completed the preProcess hook");
227925
+ writeDebug(config, "Completed the preProcess hook");
227918
227926
  }
227919
227927
  const result = await Promise.resolve(executorFn(tokenized, context, config));
227920
227928
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
@@ -227923,21 +227931,21 @@ ${Object.keys(options).map(
227923
227931
  });
227924
227932
  }
227925
227933
  if (executorOptions?.hooks?.postProcess) {
227926
- (0, import_config_tools2.writeDebug)(config, "Running the postProcess hook...");
227934
+ writeDebug(config, "Running the postProcess hook...");
227927
227935
  await Promise.resolve(executorOptions.hooks.postProcess(config));
227928
- (0, import_config_tools2.writeDebug)(config, "Completed the postProcess hook");
227936
+ writeDebug(config, "Completed the postProcess hook");
227929
227937
  }
227930
- (0, import_config_tools2.writeSuccess)(config, `Completed running the ${name} task executor!
227938
+ writeSuccess(config, `Completed running the ${name} task executor!
227931
227939
  `);
227932
227940
  return {
227933
227941
  success: true
227934
227942
  };
227935
227943
  } catch (error) {
227936
- (0, import_config_tools2.writeFatal)(
227944
+ writeFatal(
227937
227945
  config,
227938
227946
  "A fatal error occurred while running the executor - the process was forced to terminate"
227939
227947
  );
227940
- (0, import_config_tools2.writeError)(
227948
+ writeError(
227941
227949
  config,
227942
227950
  `An exception was thrown in the executor's process
227943
227951
  - Details: ${error.message}
@@ -227961,7 +227969,7 @@ var _isFunction = (value) => {
227961
227969
  // packages/workspace-tools/src/executors/typia/executor.ts
227962
227970
  async function typiaExecutorFn(options, _, config) {
227963
227971
  if (options.clean !== false) {
227964
- (0, import_config_tools3.writeInfo)(config, `\u{1F9F9} Cleaning output path: ${options.outputPath}`);
227972
+ (0, import_config_tools2.writeInfo)(config, `\u{1F9F9} Cleaning output path: ${options.outputPath}`);
227965
227973
  (0, import_fs_extra.removeSync)(options.outputPath);
227966
227974
  }
227967
227975
  await import_TypiaProgrammer.TypiaProgrammer.build({
@@ -391222,9 +391222,6 @@ __export(generator_exports, {
391222
391222
  module.exports = __toCommonJS(generator_exports);
391223
391223
  var import_devkit2 = __toESM(require_devkit());
391224
391224
 
391225
- // packages/workspace-tools/src/base/base-generator.ts
391226
- var import_config_tools2 = require("@storm-software/config-tools");
391227
-
391228
391225
  // packages/workspace-tools/src/utils/apply-workspace-tokens.ts
391229
391226
  var import_config_tools = require("@storm-software/config-tools");
391230
391227
  var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
@@ -391270,39 +391267,49 @@ var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
391270
391267
  };
391271
391268
 
391272
391269
  // packages/workspace-tools/src/base/base-generator.ts
391273
- var import_config_tools3 = require("@storm-software/config-tools");
391274
391270
  var withRunGenerator = (name, generatorFn, generatorOptions = {
391275
391271
  skipReadingConfig: false
391276
391272
  }) => async (tree, _options) => {
391277
- const stopwatch = (0, import_config_tools2.getStopwatch)(name);
391273
+ const {
391274
+ getStopwatch,
391275
+ writeDebug,
391276
+ writeError,
391277
+ writeFatal,
391278
+ writeInfo,
391279
+ writeSuccess,
391280
+ writeTrace,
391281
+ findWorkspaceRootSafe,
391282
+ loadStormConfig
391283
+ } = await import("@storm-software/config-tools");
391284
+ const stopwatch = getStopwatch(name);
391278
391285
  let options8 = _options;
391279
391286
  let config;
391280
391287
  try {
391281
- (0, import_config_tools2.writeInfo)(config, `\u26A1 Running the ${name} generator...
391288
+ writeInfo(config, `\u26A1 Running the ${name} generator...
391282
391289
 
391283
391290
  `);
391284
- const workspaceRoot = (0, import_config_tools3.findWorkspaceRootSafe)();
391291
+ const workspaceRoot = findWorkspaceRootSafe();
391285
391292
  if (!generatorOptions.skipReadingConfig) {
391286
- (0, import_config_tools2.writeDebug)(
391293
+ writeDebug(
391287
391294
  config,
391288
391295
  `Loading the Storm Config from environment variables and storm.config.js file...
391289
391296
  - workspaceRoot: ${workspaceRoot}`
391290
391297
  );
391291
- config = await (0, import_config_tools3.loadStormConfig)(workspaceRoot);
391292
- (0, import_config_tools2.writeTrace)(
391298
+ config = await loadStormConfig(workspaceRoot);
391299
+ writeTrace(
391293
391300
  config,
391294
391301
  `Loaded Storm config into env:
391295
391302
  ${Object.keys(process.env).map((key2) => ` - ${key2}=${JSON.stringify(process.env[key2])}`).join("\n")}`
391296
391303
  );
391297
391304
  }
391298
391305
  if (generatorOptions?.hooks?.applyDefaultOptions) {
391299
- (0, import_config_tools2.writeDebug)(config, "Running the applyDefaultOptions hook...");
391306
+ writeDebug(config, "Running the applyDefaultOptions hook...");
391300
391307
  options8 = await Promise.resolve(
391301
391308
  generatorOptions.hooks.applyDefaultOptions(options8, config)
391302
391309
  );
391303
- (0, import_config_tools2.writeDebug)(config, "Completed the applyDefaultOptions hook");
391310
+ writeDebug(config, "Completed the applyDefaultOptions hook");
391304
391311
  }
391305
- (0, import_config_tools2.writeTrace)(
391312
+ writeTrace(
391306
391313
  config,
391307
391314
  `Generator schema options \u2699\uFE0F
391308
391315
  ${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options8[key2])}`).join("\n")}`
@@ -391313,9 +391320,9 @@ ${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options
391313
391320
  applyWorkspaceGeneratorTokens
391314
391321
  );
391315
391322
  if (generatorOptions?.hooks?.preProcess) {
391316
- (0, import_config_tools2.writeDebug)(config, "Running the preProcess hook...");
391323
+ writeDebug(config, "Running the preProcess hook...");
391317
391324
  await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
391318
- (0, import_config_tools2.writeDebug)(config, "Completed the preProcess hook");
391325
+ writeDebug(config, "Completed the preProcess hook");
391319
391326
  }
391320
391327
  const result = await Promise.resolve(generatorFn(tree, tokenized, config));
391321
391328
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
@@ -391324,22 +391331,22 @@ ${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options
391324
391331
  });
391325
391332
  }
391326
391333
  if (generatorOptions?.hooks?.postProcess) {
391327
- (0, import_config_tools2.writeDebug)(config, "Running the postProcess hook...");
391334
+ writeDebug(config, "Running the postProcess hook...");
391328
391335
  await Promise.resolve(generatorOptions.hooks.postProcess(config));
391329
- (0, import_config_tools2.writeDebug)(config, "Completed the postProcess hook");
391336
+ writeDebug(config, "Completed the postProcess hook");
391330
391337
  }
391331
- (0, import_config_tools2.writeSuccess)(config, `Completed running the ${name} task executor!
391338
+ writeSuccess(config, `Completed running the ${name} task executor!
391332
391339
  `);
391333
391340
  return {
391334
391341
  ...result,
391335
391342
  success: true
391336
391343
  };
391337
391344
  } catch (error) {
391338
- (0, import_config_tools2.writeFatal)(
391345
+ writeFatal(
391339
391346
  config,
391340
391347
  "A fatal error occurred while running the generator - the process was forced to terminate"
391341
391348
  );
391342
- (0, import_config_tools2.writeError)(
391349
+ writeError(
391343
391350
  config,
391344
391351
  `An exception was thrown in the generator's process
391345
391352
  - Details: ${error.message}