@storm-software/workspace-tools 1.71.1 → 1.72.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -70263,8 +70263,9 @@ var init_schema = __esm({
70263
70263
  "packages/config/src/schema.ts"() {
70264
70264
  init_lib();
70265
70265
  ColorConfigSchema = z4.object({
70266
+ dark: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d232a").describe("The dark background color of the workspace"),
70267
+ light: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace"),
70266
70268
  primary: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The primary color of the workspace"),
70267
- background: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d232a").describe("The background color of the workspace"),
70268
70269
  success: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace"),
70269
70270
  info: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The informational color of the workspace"),
70270
70271
  warning: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace"),
@@ -70299,7 +70300,7 @@ var init_schema = __esm({
70299
70300
  skipCache: z4.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
70300
70301
  cacheDirectory: z4.string().trim().default("node_modules/.cache/storm").describe("The directory used to store the workspace's cached file data"),
70301
70302
  buildDirectory: z4.string().trim().default("dist").describe("The build directory for the workspace"),
70302
- runtimeDirectory: z4.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
70303
+ outputDirectory: z4.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
70303
70304
  runtimeVersion: z4.string().trim().regex(
70304
70305
  /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
70305
70306
  ).default("1.0.0").describe("The global version of the Storm runtime"),
@@ -70362,7 +70363,8 @@ var init_get_default_config = __esm({
70362
70363
  init_find_workspace_root();
70363
70364
  DEFAULT_COLOR_CONFIG = {
70364
70365
  primary: "#1fb2a6",
70365
- background: "#1d232a",
70366
+ dark: "#1d232a",
70367
+ light: "#f4f4f5",
70366
70368
  success: "#087f5b",
70367
70369
  info: "#0ea5e9",
70368
70370
  warning: "#fcc419",
@@ -72107,7 +72109,7 @@ var init_logger = __esm({
72107
72109
  init_types2();
72108
72110
  init_get_log_level();
72109
72111
  init_chalk();
72110
- getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
72112
+ getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
72111
72113
  let _chalk = getChalk();
72112
72114
  const configLogLevel = config.logLevel ?? process.env?.STORM_LOG_LEVEL ?? LogLevelLabel.INFO;
72113
72115
  if (typeof logLevel === "number" && (logLevel >= getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(configLogLevel)) {
@@ -72141,7 +72143,7 @@ ${_chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")}
72141
72143
  return (message) => {
72142
72144
  console.warn(
72143
72145
  `
72144
- ${_chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")("> ")} ${_chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").whiteBright(" \u26A0 Warn ")} ${_chalk.hex(
72146
+ ${_chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")("> ")} ${_chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").whiteBright(" \u26A0 Warn ")} ${_chalk.hex(
72145
72147
  config?.colors?.warning ? config.colors.warning : "#fcc419"
72146
72148
  )(message)}
72147
72149
  `
@@ -72191,14 +72193,14 @@ ${_chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")("
72191
72193
  );
72192
72194
  };
72193
72195
  };
72194
- writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
72195
- writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
72196
- writeWarning = (config, message) => getLogFn(config, LogLevel.WARN)(message);
72197
- writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
72198
- writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
72199
- writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
72200
- writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
72201
- writeSystem = (config, message) => getLogFn(config, LogLevel.ALL)(message);
72196
+ writeFatal = (message, config) => getLogFn(LogLevel.FATAL, config)(message);
72197
+ writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);
72198
+ writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
72199
+ writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
72200
+ writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
72201
+ writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);
72202
+ writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
72203
+ writeSystem = (message, config) => getLogFn(LogLevel.ALL, config)(message);
72202
72204
  getStopwatch = (name) => {
72203
72205
  const start = process.hrtime();
72204
72206
  return () => {
@@ -72222,40 +72224,43 @@ var init_process_handler = __esm({
72222
72224
  "packages/config-tools/src/utilities/process-handler.ts"() {
72223
72225
  init_logger();
72224
72226
  exitWithError = (config) => {
72225
- writeFatal(config, "Exiting script with an error status...");
72227
+ writeFatal("Exiting script with an error status...", config);
72226
72228
  process.exit(1);
72227
72229
  };
72228
72230
  exitWithSuccess = (config) => {
72229
- writeSuccess(config, "Script completed successfully. Exiting...");
72231
+ writeSuccess("Script completed successfully. Exiting...", config);
72230
72232
  process.exit(0);
72231
72233
  };
72232
72234
  handleProcess = (config) => {
72233
72235
  writeTrace(
72234
- config,
72235
- `Using the following arguments to process the script: ${process.argv.join(", ")}`
72236
+ `Using the following arguments to process the script: ${process.argv.join(", ")}`,
72237
+ config
72236
72238
  );
72237
72239
  process.on("unhandledRejection", (error) => {
72238
- writeError(config, `An Unhandled Rejection occurred while running the program: ${error}`);
72240
+ writeError(
72241
+ `An Unhandled Rejection occurred while running the program: ${error}`,
72242
+ config
72243
+ );
72239
72244
  exitWithError(config);
72240
72245
  });
72241
72246
  process.on("uncaughtException", (error) => {
72242
72247
  writeError(
72243
- config,
72244
72248
  `An Uncaught Exception occurred while running the program: ${error.message}
72245
- Stacktrace: ${error.stack}`
72249
+ Stacktrace: ${error.stack}`,
72250
+ config
72246
72251
  );
72247
72252
  exitWithError(config);
72248
72253
  });
72249
72254
  process.on("SIGTERM", (signal) => {
72250
- writeError(config, `The program terminated with signal code: ${signal}`);
72255
+ writeError(`The program terminated with signal code: ${signal}`, config);
72251
72256
  exitWithError(config);
72252
72257
  });
72253
72258
  process.on("SIGINT", (signal) => {
72254
- writeError(config, `The program terminated with signal code: ${signal}`);
72259
+ writeError(`The program terminated with signal code: ${signal}`, config);
72255
72260
  exitWithError(config);
72256
72261
  });
72257
72262
  process.on("SIGHUP", (signal) => {
72258
- writeError(config, `The program terminated with signal code: ${signal}`);
72263
+ writeError(`The program terminated with signal code: ${signal}`, config);
72259
72264
  exitWithError(config);
72260
72265
  });
72261
72266
  };
@@ -72395,7 +72400,9 @@ var init_get_env = __esm({
72395
72400
  getExtensionEnv = (extensionName) => {
72396
72401
  const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
72397
72402
  return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
72398
- const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
72403
+ const name = key.replace(prefix, "").split("_").map(
72404
+ (i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
72405
+ ).join("");
72399
72406
  if (name) {
72400
72407
  ret[name] = process.env[key];
72401
72408
  }
@@ -72423,14 +72430,15 @@ var init_get_env = __esm({
72423
72430
  skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
72424
72431
  cacheDirectory: correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]),
72425
72432
  runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
72426
- runtimeDirectory: correctPaths(process.env[`${prefix}RUNTIME_DIRECTORY`]),
72433
+ outputDirectory: correctPaths(process.env[`${prefix}OUTPUT_DIRECTORY`]),
72427
72434
  env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
72428
72435
  ci: process.env[`${prefix}CI`] !== void 0 ? Boolean(
72429
72436
  process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION
72430
72437
  ) : void 0,
72431
72438
  colors: {
72432
72439
  primary: process.env[`${prefix}COLOR_PRIMARY`],
72433
- background: process.env[`${prefix}COLOR_BACKGROUND`],
72440
+ dark: process.env[`${prefix}COLOR_DARK`],
72441
+ light: process.env[`${prefix}COLOR_LIGHT`],
72434
72442
  success: process.env[`${prefix}COLOR_SUCCESS`],
72435
72443
  info: process.env[`${prefix}COLOR_INFO`],
72436
72444
  warning: process.env[`${prefix}COLOR_WARNING`],
@@ -72441,7 +72449,11 @@ var init_get_env = __esm({
72441
72449
  branch: process.env[`${prefix}BRANCH`],
72442
72450
  preid: process.env[`${prefix}PRE_ID`],
72443
72451
  externalPackagePatterns: process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] ? JSON.parse(process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`]) : [],
72444
- logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0
72452
+ logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
72453
+ Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
72454
+ ) ? getLogLevelLabel(
72455
+ Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
72456
+ ) : process.env[`${prefix}LOG_LEVEL`] : void 0
72445
72457
  };
72446
72458
  const serializedConfig = process.env[`${prefix}CONFIG`];
72447
72459
  if (serializedConfig) {
@@ -72536,10 +72548,14 @@ var init_set_env = __esm({
72536
72548
  process.env.NX_WORKSPACE_ROOT_PATH = correctPaths(config.workspaceRoot);
72537
72549
  }
72538
72550
  if (config.packageDirectory) {
72539
- process.env[`${prefix}PACKAGE_DIRECTORY`] = correctPaths(config.packageDirectory);
72551
+ process.env[`${prefix}PACKAGE_DIRECTORY`] = correctPaths(
72552
+ config.packageDirectory
72553
+ );
72540
72554
  }
72541
72555
  if (config.buildDirectory) {
72542
- process.env[`${prefix}BUILD_DIRECTORY`] = correctPaths(config.buildDirectory);
72556
+ process.env[`${prefix}BUILD_DIRECTORY`] = correctPaths(
72557
+ config.buildDirectory
72558
+ );
72543
72559
  }
72544
72560
  if (config.skipCache !== void 0) {
72545
72561
  process.env[`${prefix}SKIP_CACHE`] = String(config.skipCache);
@@ -72549,13 +72565,17 @@ var init_set_env = __esm({
72549
72565
  }
72550
72566
  }
72551
72567
  if (!config.skipCache && config.cacheDirectory) {
72552
- process.env[`${prefix}CACHE_DIRECTORY`] = correctPaths(config.cacheDirectory);
72568
+ process.env[`${prefix}CACHE_DIRECTORY`] = correctPaths(
72569
+ config.cacheDirectory
72570
+ );
72553
72571
  }
72554
72572
  if (config.runtimeVersion) {
72555
72573
  process.env[`${prefix}RUNTIME_VERSION`] = config.runtimeVersion;
72556
72574
  }
72557
- if (config.runtimeDirectory) {
72558
- process.env[`${prefix}RUNTIME_DIRECTORY`] = correctPaths(config.runtimeDirectory);
72575
+ if (config.outputDirectory) {
72576
+ process.env[`${prefix}OUTPUT_DIRECTORY`] = correctPaths(
72577
+ config.outputDirectory
72578
+ );
72559
72579
  }
72560
72580
  if (config.env) {
72561
72581
  process.env[`${prefix}ENV`] = config.env;
@@ -72570,8 +72590,11 @@ var init_set_env = __esm({
72570
72590
  if (config.colors.primary) {
72571
72591
  process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary;
72572
72592
  }
72573
- if (config.colors.background) {
72574
- process.env[`${prefix}COLOR_BACKGROUND`] = config.colors.background;
72593
+ if (config.colors.dark) {
72594
+ process.env[`${prefix}COLOR_DARK`] = config.colors.dark;
72595
+ }
72596
+ if (config.colors.light) {
72597
+ process.env[`${prefix}COLOR_LIGHT`] = config.colors.light;
72575
72598
  }
72576
72599
  if (config.colors.success) {
72577
72600
  process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success;
@@ -72652,10 +72675,7 @@ var init_create_storm_config = __esm({
72652
72675
  if (schema && extensionName) {
72653
72676
  result.extensions = {
72654
72677
  ...result.extensions,
72655
- [extensionName]: createConfigExtension(
72656
- extensionName,
72657
- schema
72658
- )
72678
+ [extensionName]: createConfigExtension(extensionName, schema)
72659
72679
  };
72660
72680
  }
72661
72681
  _static_cache = result;
@@ -72682,8 +72702,8 @@ var init_create_storm_config = __esm({
72682
72702
  const configFile = await getConfigFile(_workspaceRoot);
72683
72703
  if (!configFile) {
72684
72704
  writeWarning(
72685
- { logLevel: "all" },
72686
- "No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.config.js` file to the root of your workspace if it is not.\n"
72705
+ "No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.config.js` file to the root of your workspace if it is not.\n",
72706
+ { logLevel: "all" }
72687
72707
  );
72688
72708
  }
72689
72709
  config = StormConfigSchema.parse(
@@ -321848,8 +321868,8 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
321848
321868
  let options = _options;
321849
321869
  let config;
321850
321870
  try {
321851
- writeInfo2(config, `\u26A1 Running the ${name} executor...
321852
- `);
321871
+ writeInfo2(`\u26A1 Running the ${name} executor...
321872
+ `, config);
321853
321873
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
321854
321874
  throw new Error(
321855
321875
  "The Build process failed because the context is not valid. Please run this command from a workspace."
@@ -321861,34 +321881,36 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
321861
321881
  const projectName = context.projectsConfigurations.projects[context.projectName]?.name ?? context.projectName;
321862
321882
  if (!executorOptions.skipReadingConfig) {
321863
321883
  writeDebug2(
321864
- config,
321865
321884
  `Loading the Storm Config from environment variables and storm.config.js file...
321866
321885
  - workspaceRoot: ${workspaceRoot3}
321867
321886
  - projectRoot: ${projectRoot}
321868
321887
  - sourceRoot: ${sourceRoot}
321869
321888
  - projectName: ${projectName}
321870
- `
321889
+ `,
321890
+ config
321871
321891
  );
321872
321892
  config = await loadStormConfig2(workspaceRoot3);
321873
321893
  writeTrace2(
321874
- config,
321875
321894
  `Loaded Storm config into env:
321876
321895
  ${Object.keys(process.env).filter((key) => key.startsWith("STORM_")).map(
321877
321896
  (key) => ` - ${key}=${_isFunction(process.env[key]) ? "<function>" : JSON.stringify(process.env[key])}`
321878
- ).join("\n")}`
321897
+ ).join("\n")}`,
321898
+ config
321879
321899
  );
321880
321900
  }
321881
321901
  if (executorOptions?.hooks?.applyDefaultOptions) {
321882
- writeDebug2(config, "Running the applyDefaultOptions hook...");
321883
- options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
321884
- writeDebug2(config, "Completed the applyDefaultOptions hook");
321902
+ writeDebug2("Running the applyDefaultOptions hook...", config);
321903
+ options = await Promise.resolve(
321904
+ executorOptions.hooks.applyDefaultOptions(options, config)
321905
+ );
321906
+ writeDebug2("Completed the applyDefaultOptions hook", config);
321885
321907
  }
321886
321908
  writeTrace2(
321887
- config,
321888
321909
  `Executor schema options \u2699\uFE0F
321889
321910
  ${Object.keys(options).map(
321890
321911
  (key) => ` - ${key}=${_isFunction(options[key]) ? "<function>" : JSON.stringify(options[key])}`
321891
- ).join("\n")}`
321912
+ ).join("\n")}`,
321913
+ config
321892
321914
  );
321893
321915
  const tokenized = await applyWorkspaceTokens(
321894
321916
  options,
@@ -321904,36 +321926,40 @@ ${Object.keys(options).map(
321904
321926
  applyWorkspaceExecutorTokens
321905
321927
  );
321906
321928
  if (executorOptions?.hooks?.preProcess) {
321907
- writeDebug2(config, "Running the preProcess hook...");
321908
- await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
321909
- writeDebug2(config, "Completed the preProcess hook");
321929
+ writeDebug2("Running the preProcess hook...", config);
321930
+ await Promise.resolve(
321931
+ executorOptions.hooks.preProcess(tokenized, config)
321932
+ );
321933
+ writeDebug2("Completed the preProcess hook", config);
321910
321934
  }
321911
- const result = await Promise.resolve(executorFn(tokenized, context, config));
321935
+ const result = await Promise.resolve(
321936
+ executorFn(tokenized, context, config)
321937
+ );
321912
321938
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
321913
321939
  throw new Error(`The ${name} executor failed to run`, {
321914
321940
  cause: result?.error
321915
321941
  });
321916
321942
  }
321917
321943
  if (executorOptions?.hooks?.postProcess) {
321918
- writeDebug2(config, "Running the postProcess hook...");
321944
+ writeDebug2("Running the postProcess hook...", config);
321919
321945
  await Promise.resolve(executorOptions.hooks.postProcess(config));
321920
- writeDebug2(config, "Completed the postProcess hook");
321946
+ writeDebug2("Completed the postProcess hook", config);
321921
321947
  }
321922
- writeSuccess2(config, `Completed running the ${name} task executor!
321923
- `);
321948
+ writeSuccess2(`Completed running the ${name} task executor!
321949
+ `, config);
321924
321950
  return {
321925
321951
  success: true
321926
321952
  };
321927
321953
  } catch (error) {
321928
321954
  writeFatal2(
321929
- config,
321930
- "A fatal error occurred while running the executor - the process was forced to terminate"
321955
+ "A fatal error occurred while running the executor - the process was forced to terminate",
321956
+ config
321931
321957
  );
321932
321958
  writeError2(
321933
- config,
321934
321959
  `An exception was thrown in the executor's process
321935
321960
  - Details: ${error.message}
321936
- - Stacktrace: ${error.stack}`
321961
+ - Stacktrace: ${error.stack}`,
321962
+ config
321937
321963
  );
321938
321964
  return {
321939
321965
  success: false
@@ -321970,34 +321996,34 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
321970
321996
  let options = _options;
321971
321997
  let config;
321972
321998
  try {
321973
- writeInfo2(config, `\u26A1 Running the ${name} generator...
321999
+ writeInfo2(`\u26A1 Running the ${name} generator...
321974
322000
 
321975
- `);
322001
+ `, config);
321976
322002
  const workspaceRoot3 = findWorkspaceRoot2();
321977
322003
  if (!generatorOptions.skipReadingConfig) {
321978
322004
  writeDebug2(
321979
- config,
321980
322005
  `Loading the Storm Config from environment variables and storm.config.js file...
321981
- - workspaceRoot: ${workspaceRoot3}`
322006
+ - workspaceRoot: ${workspaceRoot3}`,
322007
+ config
321982
322008
  );
321983
322009
  config = await loadStormConfig2(workspaceRoot3);
321984
322010
  writeTrace2(
321985
- config,
321986
322011
  `Loaded Storm config into env:
321987
- ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`
322012
+ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,
322013
+ config
321988
322014
  );
321989
322015
  }
321990
322016
  if (generatorOptions?.hooks?.applyDefaultOptions) {
321991
- writeDebug2(config, "Running the applyDefaultOptions hook...");
322017
+ writeDebug2("Running the applyDefaultOptions hook...", config);
321992
322018
  options = await Promise.resolve(
321993
322019
  generatorOptions.hooks.applyDefaultOptions(options, config)
321994
322020
  );
321995
- writeDebug2(config, "Completed the applyDefaultOptions hook");
322021
+ writeDebug2("Completed the applyDefaultOptions hook", config);
321996
322022
  }
321997
322023
  writeTrace2(
321998
- config,
321999
322024
  `Generator schema options \u2699\uFE0F
322000
- ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`
322025
+ ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
322026
+ config
322001
322027
  );
322002
322028
  const tokenized = await applyWorkspaceTokens(
322003
322029
  options,
@@ -322005,37 +322031,41 @@ ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[ke
322005
322031
  applyWorkspaceBaseTokens
322006
322032
  );
322007
322033
  if (generatorOptions?.hooks?.preProcess) {
322008
- writeDebug2(config, "Running the preProcess hook...");
322009
- await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
322010
- writeDebug2(config, "Completed the preProcess hook");
322034
+ writeDebug2("Running the preProcess hook...", config);
322035
+ await Promise.resolve(
322036
+ generatorOptions.hooks.preProcess(tokenized, config)
322037
+ );
322038
+ writeDebug2("Completed the preProcess hook", config);
322011
322039
  }
322012
- const result = await Promise.resolve(generatorFn(tree, tokenized, config));
322040
+ const result = await Promise.resolve(
322041
+ generatorFn(tree, tokenized, config)
322042
+ );
322013
322043
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
322014
322044
  throw new Error(`The ${name} generator failed to run`, {
322015
322045
  cause: result?.error
322016
322046
  });
322017
322047
  }
322018
322048
  if (generatorOptions?.hooks?.postProcess) {
322019
- writeDebug2(config, "Running the postProcess hook...");
322049
+ writeDebug2("Running the postProcess hook...", config);
322020
322050
  await Promise.resolve(generatorOptions.hooks.postProcess(config));
322021
- writeDebug2(config, "Completed the postProcess hook");
322051
+ writeDebug2("Completed the postProcess hook", config);
322022
322052
  }
322023
- writeSuccess2(config, `Completed running the ${name} task executor!
322024
- `);
322053
+ writeSuccess2(`Completed running the ${name} task executor!
322054
+ `, config);
322025
322055
  return {
322026
322056
  ...result,
322027
322057
  success: true
322028
322058
  };
322029
322059
  } catch (error) {
322030
322060
  writeFatal2(
322031
- config,
322032
- "A fatal error occurred while running the generator - the process was forced to terminate"
322061
+ "A fatal error occurred while running the generator - the process was forced to terminate",
322062
+ config
322033
322063
  );
322034
322064
  writeError2(
322035
- config,
322036
322065
  `An exception was thrown in the generator's process
322037
322066
  - Details: ${error.message}
322038
- - Stacktrace: ${error.stack}`
322067
+ - Stacktrace: ${error.stack}`,
322068
+ config
322039
322069
  );
322040
322070
  return {
322041
322071
  success: false
@@ -322160,7 +322190,10 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
322160
322190
  if (!options.importPath) {
322161
322191
  options.importPath = options.name;
322162
322192
  }
322163
- const packageJsonPath = (0, import_devkit.joinPathFragments)(options.projectRoot, "package.json");
322193
+ const packageJsonPath = (0, import_devkit.joinPathFragments)(
322194
+ options.projectRoot,
322195
+ "package.json"
322196
+ );
322164
322197
  if (tree.exists(packageJsonPath)) {
322165
322198
  (0, import_devkit.updateJson)(tree, packageJsonPath, (json) => {
322166
322199
  if (!options.importPath) {
@@ -322217,7 +322250,11 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
322217
322250
  }));
322218
322251
  }
322219
322252
  (0, import_js.addTsConfigPath)(tree, options.importPath, [
322220
- (0, import_devkit.joinPathFragments)(options.projectRoot, "./src", `index.${options.js ? "js" : "ts"}`)
322253
+ (0, import_devkit.joinPathFragments)(
322254
+ options.projectRoot,
322255
+ "./src",
322256
+ `index.${options.js ? "js" : "ts"}`
322257
+ )
322221
322258
  ]);
322222
322259
  (0, import_js.addTsConfigPath)(tree, (0, import_devkit.joinPathFragments)(options.importPath, "/*"), [
322223
322260
  (0, import_devkit.joinPathFragments)(options.projectRoot, "./src", "/*")
@@ -322268,7 +322305,11 @@ async function addLint(tree, options) {
322268
322305
  tsConfigPaths: [(0, import_devkit.joinPathFragments)(options.projectRoot, "tsconfig.json")],
322269
322306
  unitTestRunner: options.unitTestRunner,
322270
322307
  eslintFilePatterns: [
322271
- mapLintPattern(options.projectRoot, options.js ? "js" : "ts", options.rootProject)
322308
+ mapLintPattern(
322309
+ options.projectRoot,
322310
+ options.js ? "js" : "ts",
322311
+ options.rootProject
322312
+ )
322272
322313
  ],
322273
322314
  setParserOptionsProject: options.setParserOptionsProject,
322274
322315
  rootProject: options.rootProject
@@ -322314,7 +322355,9 @@ async function addLint(tree, options) {
322314
322355
  ruleOptions = {};
322315
322356
  }
322316
322357
  if (options.bundler === "esbuild") {
322317
- ruleOptions.ignoredFiles = ["{projectRoot}/esbuild.config.{js,ts,mjs,mts}"];
322358
+ ruleOptions.ignoredFiles = [
322359
+ "{projectRoot}/esbuild.config.{js,ts,mjs,mts}"
322360
+ ];
322318
322361
  o2.rules["@nx/dependency-checks"] = [ruleSeverity, ruleOptions];
322319
322362
  }
322320
322363
  return o2;
@@ -322338,7 +322381,10 @@ function createProjectTsConfigJson(tree, options) {
322338
322381
  ...options?.tsConfigOptions ?? {},
322339
322382
  compilerOptions: {
322340
322383
  ...options.rootProject ? import_js.tsConfigBaseOptions : {},
322341
- outDir: (0, import_devkit.joinPathFragments)((0, import_devkit.offsetFromRoot)(options.projectRoot), "dist/out-tsc"),
322384
+ outDir: (0, import_devkit.joinPathFragments)(
322385
+ (0, import_devkit.offsetFromRoot)(options.projectRoot),
322386
+ "dist/out-tsc"
322387
+ ),
322342
322388
  noEmit: true,
322343
322389
  ...options?.tsConfigOptions?.compilerOptions ?? {}
322344
322390
  },
@@ -322356,7 +322402,11 @@ function createProjectTsConfigJson(tree, options) {
322356
322402
  "src/**/*.test.ts"
322357
322403
  ]
322358
322404
  };
322359
- (0, import_devkit.writeJson)(tree, (0, import_devkit.joinPathFragments)(options.projectRoot, "tsconfig.json"), tsconfig);
322405
+ (0, import_devkit.writeJson)(
322406
+ tree,
322407
+ (0, import_devkit.joinPathFragments)(options.projectRoot, "tsconfig.json"),
322408
+ tsconfig
322409
+ );
322360
322410
  }
322361
322411
  async function normalizeOptions(tree, options) {
322362
322412
  if (options.publishable) {
@@ -325566,14 +325616,14 @@ function createCliOptions(obj) {
325566
325616
  async function unbuildExecutorFn(options, context, config) {
325567
325617
  const { writeDebug: writeDebug2, writeInfo: writeInfo2, writeSuccess: writeSuccess2 } = await Promise.resolve().then(() => (init_src2(), src_exports));
325568
325618
  const { unbuild } = await import("@storm-software/build-tools");
325569
- writeInfo2(config, "\u{1F4E6} Running Storm Unbuild executor on the workspace");
325619
+ writeInfo2("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
325570
325620
  writeDebug2(
325571
- config,
325572
325621
  `\u2699\uFE0F Executor options:
325573
325622
  ${Object.keys(options).map(
325574
325623
  (key) => `${key}: ${!options[key] || _isPrimitive(options[key]) ? options[key] : _isFunction2(options[key]) ? "<function>" : JSON.stringify(options[key])}`
325575
325624
  ).join("\n")}
325576
- `
325625
+ `,
325626
+ config
325577
325627
  );
325578
325628
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
325579
325629
  throw new Error(
@@ -325586,7 +325636,7 @@ ${Object.keys(options).map(
325586
325636
  projectName: context.projectName,
325587
325637
  sourceRoot: context.projectsConfigurations.projects?.[context.projectName]?.sourceRoot
325588
325638
  });
325589
- writeSuccess2(config, "\u26A1 The Unbuild process has completed successfully");
325639
+ writeSuccess2("\u26A1 The Unbuild process has completed successfully", config);
325590
325640
  return {
325591
325641
  success: true
325592
325642
  };
@@ -325623,14 +325673,14 @@ var _isFunction2 = (value2) => {
325623
325673
  async function rolldownExecutorFn(options, context, config) {
325624
325674
  const { writeDebug: writeDebug2, writeInfo: writeInfo2, writeSuccess: writeSuccess2 } = await Promise.resolve().then(() => (init_src2(), src_exports));
325625
325675
  const { rolldown } = await import("@storm-software/build-tools");
325626
- writeInfo2(config, "\u{1F4E6} Running Storm build executor on the workspace");
325676
+ writeInfo2("\u{1F4E6} Running Storm build executor on the workspace", config);
325627
325677
  writeDebug2(
325628
- config,
325629
325678
  `\u2699\uFE0F Executor options:
325630
325679
  ${Object.keys(options).map(
325631
325680
  (key) => `${key}: ${!options[key] || _isPrimitive2(options[key]) ? options[key] : _isFunction3(options[key]) ? "<function>" : JSON.stringify(options[key])}`
325632
325681
  ).join("\n")}
325633
- `
325682
+ `,
325683
+ config
325634
325684
  );
325635
325685
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
325636
325686
  throw new Error(
@@ -325643,7 +325693,7 @@ ${Object.keys(options).map(
325643
325693
  projectName: context.projectName,
325644
325694
  sourceRoot: context.projectsConfigurations.projects?.[context.projectName]?.sourceRoot
325645
325695
  });
325646
- writeSuccess2(config, "\u26A1 The Build process has completed successfully");
325696
+ writeSuccess2("\u26A1 The Build process has completed successfully", config);
325647
325697
  return {
325648
325698
  success: true
325649
325699
  };
@@ -325684,14 +325734,14 @@ var import_build_tools = require("@storm-software/build-tools");
325684
325734
  var import_build_tools2 = require("@storm-software/build-tools");
325685
325735
  async function tsupExecutorFn(options, context, config) {
325686
325736
  const { writeDebug: writeDebug2, writeInfo: writeInfo2, writeSuccess: writeSuccess2 } = await Promise.resolve().then(() => (init_src2(), src_exports));
325687
- writeInfo2(config, "\u{1F4E6} Running Storm build executor on the workspace");
325737
+ writeInfo2("\u{1F4E6} Running Storm build executor on the workspace", config);
325688
325738
  writeDebug2(
325689
- config,
325690
325739
  `\u2699\uFE0F Executor options:
325691
325740
  ${Object.keys(options).map(
325692
325741
  (key) => `${key}: ${!options[key] || _isPrimitive3(options[key]) ? options[key] : _isFunction4(options[key]) ? "<function>" : JSON.stringify(options[key])}`
325693
325742
  ).join("\n")}
325694
- `
325743
+ `,
325744
+ config
325695
325745
  );
325696
325746
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
325697
325747
  throw new Error(
@@ -325704,17 +325754,21 @@ ${Object.keys(options).map(
325704
325754
  projectName: context.projectName,
325705
325755
  sourceRoot: context.projectsConfigurations.projects?.[context.projectName]?.sourceRoot
325706
325756
  });
325707
- writeSuccess2(config, "\u26A1 The Build process has completed successfully");
325757
+ writeSuccess2("\u26A1 The Build process has completed successfully", config);
325708
325758
  return {
325709
325759
  success: true
325710
325760
  };
325711
325761
  }
325712
- var executor_default3 = withRunExecutor("TypeScript Build using tsup", tsupExecutorFn, {
325713
- skipReadingConfig: false,
325714
- hooks: {
325715
- applyDefaultOptions: import_build_tools.applyDefaultOptions
325762
+ var executor_default3 = withRunExecutor(
325763
+ "TypeScript Build using tsup",
325764
+ tsupExecutorFn,
325765
+ {
325766
+ skipReadingConfig: false,
325767
+ hooks: {
325768
+ applyDefaultOptions: import_build_tools.applyDefaultOptions
325769
+ }
325716
325770
  }
325717
- });
325771
+ );
325718
325772
  var _isPrimitive3 = (value2) => {
325719
325773
  try {
325720
325774
  return value2 === void 0 || value2 === null || typeof value2 !== "object" && typeof value2 !== "function";
@@ -325863,7 +325917,7 @@ var import_TypiaProgrammer = __toESM(require_TypiaProgrammer());
325863
325917
  async function typiaExecutorFn(options, _4, config) {
325864
325918
  const { writeInfo: writeInfo2 } = await Promise.resolve().then(() => (init_src2(), src_exports));
325865
325919
  if (options.clean !== false) {
325866
- writeInfo2(config, `\u{1F9F9} Cleaning output path: ${options.outputPath}`);
325920
+ writeInfo2(`\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
325867
325921
  (0, import_fs_extra.removeSync)(options.outputPath);
325868
325922
  }
325869
325923
  await import_TypiaProgrammer.TypiaProgrammer.build({
@@ -327226,39 +327280,54 @@ async function presetGeneratorFn(tree, options) {
327226
327280
  });
327227
327281
  await (0, import_devkit10.formatFiles)(tree);
327228
327282
  let dependencies = {
327229
- "@nx/devkit": "^18.0.4",
327230
- "@nx/jest": "^18.0.4",
327231
- "@nx/js": "^18.0.4",
327232
- "@semantic-release/changelog": "^6.0.3",
327233
- "@semantic-release/commit-analyzer": "^11.1.0",
327234
- "@semantic-release/exec": "^6.0.3",
327235
- "@semantic-release/git": "^10.0.1",
327236
- "@semantic-release/github": "^9.2.2",
327237
- "@semantic-release/npm": "^11.0.1",
327238
- "@semantic-release/release-notes-generator": "^12.1.0",
327283
+ "@biomejs/biome": "1.6.4",
327284
+ "@commitlint/cli": "19.2.1",
327285
+ "@ls-lint/ls-lint": "2.2.3",
327286
+ "@ltd/j-toml": "1.38.0",
327287
+ "@nx/devkit": "18.2.3",
327288
+ "@nx/esbuild": "18.2.3",
327289
+ "@nx/eslint": "18.2.3",
327290
+ "@nx/eslint-plugin": "18.2.3",
327291
+ "@nx/js": "18.2.3",
327292
+ "@nx/plugin": "18.2.3",
327293
+ "@nx/workspace": "18.2.3",
327294
+ "@storm-software/config": "latest",
327295
+ "@storm-software/config-tools": "latest",
327239
327296
  "@storm-software/git-tools": "latest",
327240
327297
  "@storm-software/linting-tools": "latest",
327241
327298
  "@storm-software/testing-tools": "latest",
327242
327299
  "@storm-software/workspace-tools": "latest",
327243
- "@types/jest": "^29.5.8",
327244
- "@types/node": "20.8.10",
327245
- "@types/react": "^18.2.37",
327246
- "@types/react-dom": "^18.2.15",
327247
- jest: "^29.7.0",
327248
- "jest-environment-jsdom": "^29.7.0",
327249
- "jest-environment-node": "^29.7.0",
327250
- "lint-staged": "^15.0.2",
327251
- log4brains: "^1.0.1",
327252
- prettier: "^3.0.3",
327253
- "prettier-plugin-packagejson": "^2.4.6",
327254
- "prettier-plugin-prisma": "^5.0.0",
327255
- "semantic-release": "^22.0.7",
327256
- "ts-jest": "^29.1.1",
327257
- "ts-node": "^10.9.1",
327258
- tslib: "^2.6.2",
327259
- terser: "^5.24.0",
327260
- typescript: typescriptVersion,
327261
- verdaccio: "^5.27.0"
327300
+ "@swc-node/register": "1.9.0",
327301
+ "@swc/cli": "0.3.12",
327302
+ "@swc/core": "1.4.12",
327303
+ "@swc/helpers": "0.5.8",
327304
+ "@swc/wasm": "1.4.12",
327305
+ "@taplo/cli": "0.7.0",
327306
+ "@types/jest": "29.5.12",
327307
+ "@types/node": "20.12.5",
327308
+ "@typescript-eslint/eslint-plugin": "7.6.0",
327309
+ "@typescript-eslint/parser": "7.6.0",
327310
+ "conventional-changelog-conventionalcommits": "7.0.2",
327311
+ "esbuild": "0.20.2",
327312
+ "esbuild-register": "3.5.0",
327313
+ "eslint": "9.0.0",
327314
+ "eslint-config-prettier": "9.1.0",
327315
+ "jest": "29.7.0",
327316
+ "jest-environment-jsdom": "29.7.0",
327317
+ "jest-environment-node": "29.7.0",
327318
+ "lefthook": "1.6.8",
327319
+ "nx": "18.2.3",
327320
+ "prettier": "3.2.5",
327321
+ "prettier-plugin-prisma": "5.0.0",
327322
+ "prettier-plugin-tailwindcss": "0.5.13",
327323
+ "rimraf": "5.0.5",
327324
+ "ts-jest": "29.1.2",
327325
+ "ts-loader": "9.5.1",
327326
+ "ts-node": "10.9.2",
327327
+ "tsconfig-paths": "4.2.0",
327328
+ "tslib": "2.6.2",
327329
+ "typescript": typescriptVersion,
327330
+ "verdaccio": "5.30.3"
327262
327331
  };
327263
327332
  if (options.includeApps) {
327264
327333
  dependencies = {
@@ -327274,6 +327343,12 @@ async function presetGeneratorFn(tree, options) {
327274
327343
  "@nx/storybook": "latest"
327275
327344
  };
327276
327345
  }
327346
+ if (options.includeRust) {
327347
+ dependencies = {
327348
+ ...dependencies,
327349
+ "@monodon/rust": "1.4.0"
327350
+ };
327351
+ }
327277
327352
  if (options.nxCloud) {
327278
327353
  dependencies = {
327279
327354
  ...dependencies,
@@ -327370,9 +327445,9 @@ To fix this you will either need to add a package.json or Cargo.toml file at tha
327370
327445
  tree.exists(packageJsonPath) ? packageJsonPath : cargoTomlPath
327371
327446
  );
327372
327447
  const log = (msg) => {
327373
- writeInfo2(config, `${projectName}: ${msg}`);
327448
+ writeInfo2(`${projectName}: ${msg}`, config);
327374
327449
  };
327375
- writeInfo2(config, `Running release version for project: ${project.name}`);
327450
+ writeInfo2(`Running release version for project: ${project.name}`, config);
327376
327451
  let packageName;
327377
327452
  let currentVersionFromDisk;
327378
327453
  if (tree.exists(packageJsonPath)) {