@storm-software/workspace-tools 1.62.7 → 1.62.9

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.
@@ -227772,13 +227772,11 @@ __export(executor_exports, {
227772
227772
  typiaExecutorFn: () => typiaExecutorFn
227773
227773
  });
227774
227774
  module.exports = __toCommonJS(executor_exports);
227775
- var import_config_tools2 = require("@storm-software/config-tools");
227776
227775
  var import_fs_extra = __toESM(require_lib());
227777
227776
  var import_TypiaProgrammer = __toESM(require_TypiaProgrammer());
227778
227777
 
227779
227778
  // packages/workspace-tools/src/utils/apply-workspace-tokens.ts
227780
- var import_config_tools = require("@storm-software/config-tools");
227781
- var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
227779
+ var applyWorkspaceExecutorTokens = async (option, tokenizerOptions) => {
227782
227780
  let result = option;
227783
227781
  if (!result) {
227784
227782
  return result;
@@ -227821,30 +227819,33 @@ var applyWorkspaceExecutorTokens = (option, tokenizerOptions) => {
227821
227819
  result = result.replaceAll("{sourceRoot}", sourceRoot);
227822
227820
  }
227823
227821
  if (result.includes("{workspaceRoot}")) {
227822
+ const { findWorkspaceRoot } = await import("@storm-software/config-tools");
227824
227823
  result = result.replaceAll(
227825
227824
  "{workspaceRoot}",
227826
- tokenizerOptions.workspaceRoot ?? (0, import_config_tools.findWorkspaceRoot)()
227825
+ tokenizerOptions.workspaceRoot ?? findWorkspaceRoot()
227827
227826
  );
227828
227827
  }
227829
227828
  return result;
227830
227829
  };
227831
- var applyWorkspaceTokens = (options, config, tokenizerFn) => {
227832
- const result = options;
227833
- if (!result) {
227830
+ var applyWorkspaceTokens = async (options, config, tokenizerFn) => {
227831
+ if (!options) {
227834
227832
  return {};
227835
227833
  }
227836
- return Object.keys(options).reduce((ret, option) => {
227834
+ const result = {};
227835
+ for (const option of Object.keys(options)) {
227837
227836
  if (typeof options[option] === "string") {
227838
- ret[option] = tokenizerFn(options[option], config);
227837
+ result[option] = await Promise.resolve(tokenizerFn(options[option], config));
227839
227838
  } else if (Array.isArray(options[option])) {
227840
- ret[option] = options[option].map(
227841
- (item) => typeof item === "string" ? tokenizerFn(item, config) : item
227839
+ result[option] = await Promise.all(
227840
+ options[option].map(
227841
+ async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item
227842
+ )
227842
227843
  );
227843
227844
  } else if (typeof options[option] === "object") {
227844
- ret[option] = applyWorkspaceTokens(options[option], config, tokenizerFn);
227845
+ result[option] = await applyWorkspaceTokens(options[option], config, tokenizerFn);
227845
227846
  }
227846
- return ret;
227847
- }, {});
227847
+ }
227848
+ return result;
227848
227849
  };
227849
227850
 
227850
227851
  // packages/workspace-tools/src/base/base-executor.ts
@@ -227854,24 +227855,24 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
227854
227855
  writeDebug,
227855
227856
  writeError,
227856
227857
  writeFatal,
227857
- writeInfo: writeInfo2,
227858
+ writeInfo,
227858
227859
  writeSuccess,
227859
227860
  writeTrace,
227860
- findWorkspaceRoot: findWorkspaceRoot2,
227861
+ findWorkspaceRoot,
227861
227862
  loadStormConfig
227862
227863
  } = await import("@storm-software/config-tools");
227863
227864
  const stopwatch = getStopwatch(name);
227864
227865
  let options = _options;
227865
227866
  let config;
227866
227867
  try {
227867
- writeInfo2(config, `\u26A1 Running the ${name} executor...
227868
+ writeInfo(config, `\u26A1 Running the ${name} executor...
227868
227869
  `);
227869
227870
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
227870
227871
  throw new Error(
227871
227872
  "The Build process failed because the context is not valid. Please run this command from a workspace."
227872
227873
  );
227873
227874
  }
227874
- const workspaceRoot = findWorkspaceRoot2();
227875
+ const workspaceRoot = findWorkspaceRoot();
227875
227876
  const projectRoot = context.projectsConfigurations.projects[context.projectName]?.root ?? workspaceRoot;
227876
227877
  const sourceRoot = context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? workspaceRoot;
227877
227878
  const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
@@ -227906,7 +227907,7 @@ ${Object.keys(options).map(
227906
227907
  (key) => ` - ${key}=${_isFunction(options[key]) ? "<function>" : JSON.stringify(options[key])}`
227907
227908
  ).join("\n")}`
227908
227909
  );
227909
- const tokenized = applyWorkspaceTokens(
227910
+ const tokenized = await applyWorkspaceTokens(
227910
227911
  options,
227911
227912
  {
227912
227913
  config,
@@ -227968,8 +227969,9 @@ var _isFunction = (value) => {
227968
227969
 
227969
227970
  // packages/workspace-tools/src/executors/typia/executor.ts
227970
227971
  async function typiaExecutorFn(options, _, config) {
227972
+ const { writeInfo } = await import("@storm-software/config-tools");
227971
227973
  if (options.clean !== false) {
227972
- (0, import_config_tools2.writeInfo)(config, `\u{1F9F9} Cleaning output path: ${options.outputPath}`);
227974
+ writeInfo(config, `\u{1F9F9} Cleaning output path: ${options.outputPath}`);
227973
227975
  (0, import_fs_extra.removeSync)(options.outputPath);
227974
227976
  }
227975
227977
  await import_TypiaProgrammer.TypiaProgrammer.build({
@@ -391223,8 +391223,7 @@ module.exports = __toCommonJS(generator_exports);
391223
391223
  var import_devkit2 = __toESM(require_devkit());
391224
391224
 
391225
391225
  // packages/workspace-tools/src/utils/apply-workspace-tokens.ts
391226
- var import_config_tools = require("@storm-software/config-tools");
391227
- var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
391226
+ var applyWorkspaceGeneratorTokens = async (option, tokenizerOptions) => {
391228
391227
  let result = option;
391229
391228
  if (!result) {
391230
391229
  return result;
@@ -391240,30 +391239,33 @@ var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
391240
391239
  }
391241
391240
  }
391242
391241
  if (result.includes("{workspaceRoot}")) {
391242
+ const { findWorkspaceRoot } = await import("@storm-software/config-tools");
391243
391243
  result = result.replaceAll(
391244
391244
  "{workspaceRoot}",
391245
- tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? (0, import_config_tools.findWorkspaceRoot)()
391245
+ tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? findWorkspaceRoot()
391246
391246
  );
391247
391247
  }
391248
391248
  return result;
391249
391249
  };
391250
- var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
391251
- const result = options8;
391252
- if (!result) {
391250
+ var applyWorkspaceTokens = async (options8, config, tokenizerFn) => {
391251
+ if (!options8) {
391253
391252
  return {};
391254
391253
  }
391255
- return Object.keys(options8).reduce((ret, option) => {
391254
+ const result = {};
391255
+ for (const option of Object.keys(options8)) {
391256
391256
  if (typeof options8[option] === "string") {
391257
- ret[option] = tokenizerFn(options8[option], config);
391257
+ result[option] = await Promise.resolve(tokenizerFn(options8[option], config));
391258
391258
  } else if (Array.isArray(options8[option])) {
391259
- ret[option] = options8[option].map(
391260
- (item) => typeof item === "string" ? tokenizerFn(item, config) : item
391259
+ result[option] = await Promise.all(
391260
+ options8[option].map(
391261
+ async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item
391262
+ )
391261
391263
  );
391262
391264
  } else if (typeof options8[option] === "object") {
391263
- ret[option] = applyWorkspaceTokens(options8[option], config, tokenizerFn);
391265
+ result[option] = await applyWorkspaceTokens(options8[option], config, tokenizerFn);
391264
391266
  }
391265
- return ret;
391266
- }, {});
391267
+ }
391268
+ return result;
391267
391269
  };
391268
391270
 
391269
391271
  // packages/workspace-tools/src/base/base-generator.ts
@@ -391314,7 +391316,7 @@ ${Object.keys(process.env).map((key2) => ` - ${key2}=${JSON.stringify(process.en
391314
391316
  `Generator schema options \u2699\uFE0F
391315
391317
  ${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options8[key2])}`).join("\n")}`
391316
391318
  );
391317
- const tokenized = applyWorkspaceTokens(
391319
+ const tokenized = await applyWorkspaceTokens(
391318
391320
  options8,
391319
391321
  { workspaceRoot: tree.root, config },
391320
391322
  applyWorkspaceGeneratorTokens
@@ -176547,8 +176547,7 @@ var zodToJsonSchema = (schema2, options8) => {
176547
176547
  };
176548
176548
 
176549
176549
  // packages/workspace-tools/src/utils/apply-workspace-tokens.ts
176550
- var import_config_tools = require("@storm-software/config-tools");
176551
- var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
176550
+ var applyWorkspaceGeneratorTokens = async (option, tokenizerOptions) => {
176552
176551
  let result = option;
176553
176552
  if (!result) {
176554
176553
  return result;
@@ -176564,30 +176563,33 @@ var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
176564
176563
  }
176565
176564
  }
176566
176565
  if (result.includes("{workspaceRoot}")) {
176566
+ const { findWorkspaceRoot } = await import("@storm-software/config-tools");
176567
176567
  result = result.replaceAll(
176568
176568
  "{workspaceRoot}",
176569
- tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? (0, import_config_tools.findWorkspaceRoot)()
176569
+ tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? findWorkspaceRoot()
176570
176570
  );
176571
176571
  }
176572
176572
  return result;
176573
176573
  };
176574
- var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
176575
- const result = options8;
176576
- if (!result) {
176574
+ var applyWorkspaceTokens = async (options8, config, tokenizerFn) => {
176575
+ if (!options8) {
176577
176576
  return {};
176578
176577
  }
176579
- return Object.keys(options8).reduce((ret, option) => {
176578
+ const result = {};
176579
+ for (const option of Object.keys(options8)) {
176580
176580
  if (typeof options8[option] === "string") {
176581
- ret[option] = tokenizerFn(options8[option], config);
176581
+ result[option] = await Promise.resolve(tokenizerFn(options8[option], config));
176582
176582
  } else if (Array.isArray(options8[option])) {
176583
- ret[option] = options8[option].map(
176584
- (item) => typeof item === "string" ? tokenizerFn(item, config) : item
176583
+ result[option] = await Promise.all(
176584
+ options8[option].map(
176585
+ async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item
176586
+ )
176585
176587
  );
176586
176588
  } else if (typeof options8[option] === "object") {
176587
- ret[option] = applyWorkspaceTokens(options8[option], config, tokenizerFn);
176589
+ result[option] = await applyWorkspaceTokens(options8[option], config, tokenizerFn);
176588
176590
  }
176589
- return ret;
176590
- }, {});
176591
+ }
176592
+ return result;
176591
176593
  };
176592
176594
 
176593
176595
  // packages/workspace-tools/src/base/base-generator.ts
@@ -176638,7 +176640,7 @@ ${Object.keys(process.env).map((key2) => ` - ${key2}=${JSON.stringify(process.en
176638
176640
  `Generator schema options \u2699\uFE0F
176639
176641
  ${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options8[key2])}`).join("\n")}`
176640
176642
  );
176641
- const tokenized = applyWorkspaceTokens(
176643
+ const tokenized = await applyWorkspaceTokens(
176642
176644
  options8,
176643
176645
  { workspaceRoot: tree.root, config },
176644
176646
  applyWorkspaceGeneratorTokens
@@ -176686,14 +176688,16 @@ ${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options
176686
176688
 
176687
176689
  // packages/workspace-tools/src/utils/get-project-configurations.ts
176688
176690
  var import_retrieve_workspace_files = require("nx/src/project-graph/utils/retrieve-workspace-files");
176689
- var import_config_tools2 = require("@storm-software/config-tools");
176690
- var getProjectConfigurations = () => (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)((0, import_config_tools2.findWorkspaceRoot)());
176691
+ var getProjectConfigurations = async () => {
176692
+ const { findWorkspaceRoot } = await import("@storm-software/config-tools");
176693
+ return (0, import_retrieve_workspace_files.retrieveProjectConfigurationsWithoutPluginInference)(findWorkspaceRoot());
176694
+ };
176691
176695
 
176692
176696
  // packages/workspace-tools/src/generators/config-schema/generator.ts
176693
- var import_config_tools3 = require("@storm-software/config-tools");
176694
176697
  async function configSchemaGeneratorFn(tree, options8, config) {
176698
+ const { findWorkspaceRoot } = await import("@storm-software/config-tools");
176695
176699
  const projectConfigurations = getProjectConfigurations();
176696
- const workspaceRoot = config?.workspaceRoot ?? (0, import_config_tools3.findWorkspaceRoot)();
176700
+ const workspaceRoot = config?.workspaceRoot ?? findWorkspaceRoot();
176697
176701
  const modules = await Promise.all(
176698
176702
  Object.keys(projectConfigurations).map(async (key2) => {
176699
176703
  if (projectConfigurations[key2]?.config) {
@@ -391223,8 +391223,7 @@ module.exports = __toCommonJS(generator_exports);
391223
391223
  var import_devkit2 = __toESM(require_devkit());
391224
391224
 
391225
391225
  // packages/workspace-tools/src/utils/apply-workspace-tokens.ts
391226
- var import_config_tools = require("@storm-software/config-tools");
391227
- var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
391226
+ var applyWorkspaceGeneratorTokens = async (option, tokenizerOptions) => {
391228
391227
  let result = option;
391229
391228
  if (!result) {
391230
391229
  return result;
@@ -391240,30 +391239,33 @@ var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
391240
391239
  }
391241
391240
  }
391242
391241
  if (result.includes("{workspaceRoot}")) {
391242
+ const { findWorkspaceRoot } = await import("@storm-software/config-tools");
391243
391243
  result = result.replaceAll(
391244
391244
  "{workspaceRoot}",
391245
- tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? (0, import_config_tools.findWorkspaceRoot)()
391245
+ tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? findWorkspaceRoot()
391246
391246
  );
391247
391247
  }
391248
391248
  return result;
391249
391249
  };
391250
- var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
391251
- const result = options8;
391252
- if (!result) {
391250
+ var applyWorkspaceTokens = async (options8, config, tokenizerFn) => {
391251
+ if (!options8) {
391253
391252
  return {};
391254
391253
  }
391255
- return Object.keys(options8).reduce((ret, option) => {
391254
+ const result = {};
391255
+ for (const option of Object.keys(options8)) {
391256
391256
  if (typeof options8[option] === "string") {
391257
- ret[option] = tokenizerFn(options8[option], config);
391257
+ result[option] = await Promise.resolve(tokenizerFn(options8[option], config));
391258
391258
  } else if (Array.isArray(options8[option])) {
391259
- ret[option] = options8[option].map(
391260
- (item) => typeof item === "string" ? tokenizerFn(item, config) : item
391259
+ result[option] = await Promise.all(
391260
+ options8[option].map(
391261
+ async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item
391262
+ )
391261
391263
  );
391262
391264
  } else if (typeof options8[option] === "object") {
391263
- ret[option] = applyWorkspaceTokens(options8[option], config, tokenizerFn);
391265
+ result[option] = await applyWorkspaceTokens(options8[option], config, tokenizerFn);
391264
391266
  }
391265
- return ret;
391266
- }, {});
391267
+ }
391268
+ return result;
391267
391269
  };
391268
391270
 
391269
391271
  // packages/workspace-tools/src/base/base-generator.ts
@@ -391314,7 +391316,7 @@ ${Object.keys(process.env).map((key2) => ` - ${key2}=${JSON.stringify(process.en
391314
391316
  `Generator schema options \u2699\uFE0F
391315
391317
  ${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options8[key2])}`).join("\n")}`
391316
391318
  );
391317
- const tokenized = applyWorkspaceTokens(
391319
+ const tokenized = await applyWorkspaceTokens(
391318
391320
  options8,
391319
391321
  { workspaceRoot: tree.root, config },
391320
391322
  applyWorkspaceGeneratorTokens
@@ -391223,8 +391223,7 @@ module.exports = __toCommonJS(generator_exports);
391223
391223
  var import_devkit2 = __toESM(require_devkit());
391224
391224
 
391225
391225
  // packages/workspace-tools/src/utils/apply-workspace-tokens.ts
391226
- var import_config_tools = require("@storm-software/config-tools");
391227
- var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
391226
+ var applyWorkspaceGeneratorTokens = async (option, tokenizerOptions) => {
391228
391227
  let result = option;
391229
391228
  if (!result) {
391230
391229
  return result;
@@ -391240,30 +391239,33 @@ var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
391240
391239
  }
391241
391240
  }
391242
391241
  if (result.includes("{workspaceRoot}")) {
391242
+ const { findWorkspaceRoot } = await import("@storm-software/config-tools");
391243
391243
  result = result.replaceAll(
391244
391244
  "{workspaceRoot}",
391245
- tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? (0, import_config_tools.findWorkspaceRoot)()
391245
+ tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? findWorkspaceRoot()
391246
391246
  );
391247
391247
  }
391248
391248
  return result;
391249
391249
  };
391250
- var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
391251
- const result = options8;
391252
- if (!result) {
391250
+ var applyWorkspaceTokens = async (options8, config, tokenizerFn) => {
391251
+ if (!options8) {
391253
391252
  return {};
391254
391253
  }
391255
- return Object.keys(options8).reduce((ret, option) => {
391254
+ const result = {};
391255
+ for (const option of Object.keys(options8)) {
391256
391256
  if (typeof options8[option] === "string") {
391257
- ret[option] = tokenizerFn(options8[option], config);
391257
+ result[option] = await Promise.resolve(tokenizerFn(options8[option], config));
391258
391258
  } else if (Array.isArray(options8[option])) {
391259
- ret[option] = options8[option].map(
391260
- (item) => typeof item === "string" ? tokenizerFn(item, config) : item
391259
+ result[option] = await Promise.all(
391260
+ options8[option].map(
391261
+ async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item
391262
+ )
391261
391263
  );
391262
391264
  } else if (typeof options8[option] === "object") {
391263
- ret[option] = applyWorkspaceTokens(options8[option], config, tokenizerFn);
391265
+ result[option] = await applyWorkspaceTokens(options8[option], config, tokenizerFn);
391264
391266
  }
391265
- return ret;
391266
- }, {});
391267
+ }
391268
+ return result;
391267
391269
  };
391268
391270
 
391269
391271
  // packages/workspace-tools/src/base/base-generator.ts
@@ -391314,7 +391316,7 @@ ${Object.keys(process.env).map((key2) => ` - ${key2}=${JSON.stringify(process.en
391314
391316
  `Generator schema options \u2699\uFE0F
391315
391317
  ${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options8[key2])}`).join("\n")}`
391316
391318
  );
391317
- const tokenized = applyWorkspaceTokens(
391319
+ const tokenized = await applyWorkspaceTokens(
391318
391320
  options8,
391319
391321
  { workspaceRoot: tree.root, config },
391320
391322
  applyWorkspaceGeneratorTokens
@@ -171961,8 +171961,7 @@ var path13 = __toESM(require("node:path"));
171961
171961
  var import_devkit = __toESM(require_devkit());
171962
171962
 
171963
171963
  // packages/workspace-tools/src/utils/apply-workspace-tokens.ts
171964
- var import_config_tools = require("@storm-software/config-tools");
171965
- var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
171964
+ var applyWorkspaceGeneratorTokens = async (option, tokenizerOptions) => {
171966
171965
  let result = option;
171967
171966
  if (!result) {
171968
171967
  return result;
@@ -171978,30 +171977,33 @@ var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
171978
171977
  }
171979
171978
  }
171980
171979
  if (result.includes("{workspaceRoot}")) {
171980
+ const { findWorkspaceRoot } = await import("@storm-software/config-tools");
171981
171981
  result = result.replaceAll(
171982
171982
  "{workspaceRoot}",
171983
- tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? (0, import_config_tools.findWorkspaceRoot)()
171983
+ tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? findWorkspaceRoot()
171984
171984
  );
171985
171985
  }
171986
171986
  return result;
171987
171987
  };
171988
- var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
171989
- const result = options8;
171990
- if (!result) {
171988
+ var applyWorkspaceTokens = async (options8, config, tokenizerFn) => {
171989
+ if (!options8) {
171991
171990
  return {};
171992
171991
  }
171993
- return Object.keys(options8).reduce((ret, option) => {
171992
+ const result = {};
171993
+ for (const option of Object.keys(options8)) {
171994
171994
  if (typeof options8[option] === "string") {
171995
- ret[option] = tokenizerFn(options8[option], config);
171995
+ result[option] = await Promise.resolve(tokenizerFn(options8[option], config));
171996
171996
  } else if (Array.isArray(options8[option])) {
171997
- ret[option] = options8[option].map(
171998
- (item) => typeof item === "string" ? tokenizerFn(item, config) : item
171997
+ result[option] = await Promise.all(
171998
+ options8[option].map(
171999
+ async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item
172000
+ )
171999
172001
  );
172000
172002
  } else if (typeof options8[option] === "object") {
172001
- ret[option] = applyWorkspaceTokens(options8[option], config, tokenizerFn);
172003
+ result[option] = await applyWorkspaceTokens(options8[option], config, tokenizerFn);
172002
172004
  }
172003
- return ret;
172004
- }, {});
172005
+ }
172006
+ return result;
172005
172007
  };
172006
172008
 
172007
172009
  // packages/workspace-tools/src/base/base-generator.ts
@@ -172052,7 +172054,7 @@ ${Object.keys(process.env).map((key2) => ` - ${key2}=${JSON.stringify(process.en
172052
172054
  `Generator schema options \u2699\uFE0F
172053
172055
  ${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options8[key2])}`).join("\n")}`
172054
172056
  );
172055
- const tokenized = applyWorkspaceTokens(
172057
+ const tokenized = await applyWorkspaceTokens(
172056
172058
  options8,
172057
172059
  { workspaceRoot: tree.root, config },
172058
172060
  applyWorkspaceGeneratorTokens
@@ -174425,12 +174425,10 @@ var import_version = require("nx/src/command-line/release/version");
174425
174425
  var import_utils = require("nx/src/tasks-runner/utils");
174426
174426
  var import_semver = require("nx/src/command-line/release/utils/semver");
174427
174427
  var import_node_path = require("node:path");
174428
- var import_config_tools2 = require("@storm-software/config-tools");
174429
174428
  var import_update_lock_file = __toESM(require_update_lock_file());
174430
174429
 
174431
174430
  // packages/workspace-tools/src/utils/apply-workspace-tokens.ts
174432
- var import_config_tools = require("@storm-software/config-tools");
174433
- var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
174431
+ var applyWorkspaceGeneratorTokens = async (option, tokenizerOptions) => {
174434
174432
  let result = option;
174435
174433
  if (!result) {
174436
174434
  return result;
@@ -174446,30 +174444,33 @@ var applyWorkspaceGeneratorTokens = (option, tokenizerOptions) => {
174446
174444
  }
174447
174445
  }
174448
174446
  if (result.includes("{workspaceRoot}")) {
174447
+ const { findWorkspaceRoot } = await import("@storm-software/config-tools");
174449
174448
  result = result.replaceAll(
174450
174449
  "{workspaceRoot}",
174451
- tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? (0, import_config_tools.findWorkspaceRoot)()
174450
+ tokenizerOptions.workspaceRoot ?? tokenizerOptions.config?.workspaceRoot ?? findWorkspaceRoot()
174452
174451
  );
174453
174452
  }
174454
174453
  return result;
174455
174454
  };
174456
- var applyWorkspaceTokens = (options8, config, tokenizerFn) => {
174457
- const result = options8;
174458
- if (!result) {
174455
+ var applyWorkspaceTokens = async (options8, config, tokenizerFn) => {
174456
+ if (!options8) {
174459
174457
  return {};
174460
174458
  }
174461
- return Object.keys(options8).reduce((ret, option) => {
174459
+ const result = {};
174460
+ for (const option of Object.keys(options8)) {
174462
174461
  if (typeof options8[option] === "string") {
174463
- ret[option] = tokenizerFn(options8[option], config);
174462
+ result[option] = await Promise.resolve(tokenizerFn(options8[option], config));
174464
174463
  } else if (Array.isArray(options8[option])) {
174465
- ret[option] = options8[option].map(
174466
- (item) => typeof item === "string" ? tokenizerFn(item, config) : item
174464
+ result[option] = await Promise.all(
174465
+ options8[option].map(
174466
+ async (item) => typeof item === "string" ? await Promise.resolve(tokenizerFn(item, config)) : item
174467
+ )
174467
174468
  );
174468
174469
  } else if (typeof options8[option] === "object") {
174469
- ret[option] = applyWorkspaceTokens(options8[option], config, tokenizerFn);
174470
+ result[option] = await applyWorkspaceTokens(options8[option], config, tokenizerFn);
174470
174471
  }
174471
- return ret;
174472
- }, {});
174472
+ }
174473
+ return result;
174473
174474
  };
174474
174475
 
174475
174476
  // packages/workspace-tools/src/base/base-generator.ts
@@ -174481,7 +174482,7 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
174481
174482
  writeDebug,
174482
174483
  writeError,
174483
174484
  writeFatal,
174484
- writeInfo: writeInfo2,
174485
+ writeInfo,
174485
174486
  writeSuccess,
174486
174487
  writeTrace,
174487
174488
  findWorkspaceRootSafe,
@@ -174491,7 +174492,7 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
174491
174492
  let options8 = _options;
174492
174493
  let config;
174493
174494
  try {
174494
- writeInfo2(config, `\u26A1 Running the ${name} generator...
174495
+ writeInfo(config, `\u26A1 Running the ${name} generator...
174495
174496
 
174496
174497
  `);
174497
174498
  const workspaceRoot = findWorkspaceRootSafe();
@@ -174520,7 +174521,7 @@ ${Object.keys(process.env).map((key2) => ` - ${key2}=${JSON.stringify(process.en
174520
174521
  `Generator schema options \u2699\uFE0F
174521
174522
  ${Object.keys(options8 ?? {}).map((key2) => ` - ${key2}=${JSON.stringify(options8[key2])}`).join("\n")}`
174522
174523
  );
174523
- const tokenized = applyWorkspaceTokens(
174524
+ const tokenized = await applyWorkspaceTokens(
174524
174525
  options8,
174525
174526
  { workspaceRoot: tree.root, config },
174526
174527
  applyWorkspaceGeneratorTokens
@@ -174574,6 +174575,7 @@ var import_config = require("nx/src/command-line/release/config/config");
174574
174575
  var import_semver2 = __toESM(require_semver3());
174575
174576
  var import_resolve_local_package_dependencies = __toESM(require_resolve_local_package_dependencies());
174576
174577
  async function releaseVersionGeneratorFn(tree, options8, config) {
174578
+ const { writeInfo, findWorkspaceRoot } = await import("@storm-software/config-tools");
174577
174579
  const versionData = {};
174578
174580
  if (options8.specifier) {
174579
174581
  if (!(0, import_semver.isValidSemverSpecifier)(options8.specifier)) {
@@ -174596,7 +174598,7 @@ Valid values are: ${import_version.validReleaseVersionPrefixes.map((s) => `"${s}
174596
174598
  const projects = options8.projects;
174597
174599
  const createResolvePackageRoot = (customPackageRoot) => (projectNode) => {
174598
174600
  if (projectNode?.data?.root === config?.workspaceRoot || projectNode?.data?.root === ".") {
174599
- return config?.workspaceRoot ?? (0, import_config_tools2.findWorkspaceRoot)();
174601
+ return config?.workspaceRoot ?? findWorkspaceRoot();
174600
174602
  }
174601
174603
  if (!customPackageRoot) {
174602
174604
  return projectNode.data.root;
@@ -174621,11 +174623,11 @@ Valid values are: ${import_version.validReleaseVersionPrefixes.map((s) => `"${s}
174621
174623
  const packageRoot = projectNameToPackageRootMap.get(projectName);
174622
174624
  const packageJsonPath = (0, import_devkit.joinPathFragments)(packageRoot ?? "./", "package.json");
174623
174625
  const workspaceRelativePackageJsonPath = (0, import_node_path.relative)(
174624
- config?.workspaceRoot ?? (0, import_config_tools2.findWorkspaceRoot)(),
174626
+ config?.workspaceRoot ?? findWorkspaceRoot(),
174625
174627
  packageJsonPath
174626
174628
  );
174627
174629
  const log = (msg) => {
174628
- (0, import_config_tools2.writeInfo)(config, `${projectName}: ${msg}`);
174630
+ writeInfo(config, `${projectName}: ${msg}`);
174629
174631
  };
174630
174632
  if (!tree.exists(packageJsonPath)) {
174631
174633
  throw new Error(
@@ -174634,7 +174636,7 @@ Valid values are: ${import_version.validReleaseVersionPrefixes.map((s) => `"${s}
174634
174636
  To fix this you will either need to add a package.json file at that location, or configure "release" within your nx.json to exclude "${projectName}" from the current release group, or amend the packageRoot configuration to point to where the package.json should be.`
174635
174637
  );
174636
174638
  }
174637
- (0, import_config_tools2.writeInfo)(config, `Running release version for project: ${project.name}`);
174639
+ writeInfo(config, `Running release version for project: ${project.name}`);
174638
174640
  const projectPackageJson = (0, import_devkit.readJson)(tree, packageJsonPath);
174639
174641
  log(
174640
174642
  `\u{1F50D} Reading data for package "${projectPackageJson.name}" from ${workspaceRelativePackageJsonPath}`