@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.
@@ -72423,8 +72423,9 @@ var init_schema = __esm({
72423
72423
  "packages/config/src/schema.ts"() {
72424
72424
  init_lib();
72425
72425
  ColorConfigSchema = z4.object({
72426
+ 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"),
72427
+ 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"),
72426
72428
  primary: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The primary color of the workspace"),
72427
- background: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d232a").describe("The background color of the workspace"),
72428
72429
  success: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace"),
72429
72430
  info: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The informational color of the workspace"),
72430
72431
  warning: z4.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace"),
@@ -72459,7 +72460,7 @@ var init_schema = __esm({
72459
72460
  skipCache: z4.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
72460
72461
  cacheDirectory: z4.string().trim().default("node_modules/.cache/storm").describe("The directory used to store the workspace's cached file data"),
72461
72462
  buildDirectory: z4.string().trim().default("dist").describe("The build directory for the workspace"),
72462
- runtimeDirectory: z4.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
72463
+ outputDirectory: z4.string().trim().default("node_modules/.storm").describe("The runtime directory of Storm"),
72463
72464
  runtimeVersion: z4.string().trim().regex(
72464
72465
  /^(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-]+)*))?$/
72465
72466
  ).default("1.0.0").describe("The global version of the Storm runtime"),
@@ -72522,7 +72523,8 @@ var init_get_default_config = __esm({
72522
72523
  init_find_workspace_root();
72523
72524
  DEFAULT_COLOR_CONFIG = {
72524
72525
  primary: "#1fb2a6",
72525
- background: "#1d232a",
72526
+ dark: "#1d232a",
72527
+ light: "#f4f4f5",
72526
72528
  success: "#087f5b",
72527
72529
  info: "#0ea5e9",
72528
72530
  warning: "#fcc419",
@@ -74267,7 +74269,7 @@ var init_logger = __esm({
74267
74269
  init_types2();
74268
74270
  init_get_log_level();
74269
74271
  init_chalk();
74270
- getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
74272
+ getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
74271
74273
  let _chalk = getChalk();
74272
74274
  const configLogLevel = config.logLevel ?? process.env?.STORM_LOG_LEVEL ?? LogLevelLabel.INFO;
74273
74275
  if (typeof logLevel === "number" && (logLevel >= getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(configLogLevel)) {
@@ -74301,7 +74303,7 @@ ${_chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")}
74301
74303
  return (message) => {
74302
74304
  console.warn(
74303
74305
  `
74304
- ${_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(
74306
+ ${_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(
74305
74307
  config?.colors?.warning ? config.colors.warning : "#fcc419"
74306
74308
  )(message)}
74307
74309
  `
@@ -74351,14 +74353,14 @@ ${_chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")("
74351
74353
  );
74352
74354
  };
74353
74355
  };
74354
- writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
74355
- writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
74356
- writeWarning = (config, message) => getLogFn(config, LogLevel.WARN)(message);
74357
- writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
74358
- writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
74359
- writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
74360
- writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
74361
- writeSystem = (config, message) => getLogFn(config, LogLevel.ALL)(message);
74356
+ writeFatal = (message, config) => getLogFn(LogLevel.FATAL, config)(message);
74357
+ writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);
74358
+ writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
74359
+ writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
74360
+ writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
74361
+ writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);
74362
+ writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
74363
+ writeSystem = (message, config) => getLogFn(LogLevel.ALL, config)(message);
74362
74364
  getStopwatch = (name) => {
74363
74365
  const start = process.hrtime();
74364
74366
  return () => {
@@ -74382,40 +74384,43 @@ var init_process_handler = __esm({
74382
74384
  "packages/config-tools/src/utilities/process-handler.ts"() {
74383
74385
  init_logger();
74384
74386
  exitWithError = (config) => {
74385
- writeFatal(config, "Exiting script with an error status...");
74387
+ writeFatal("Exiting script with an error status...", config);
74386
74388
  process.exit(1);
74387
74389
  };
74388
74390
  exitWithSuccess = (config) => {
74389
- writeSuccess(config, "Script completed successfully. Exiting...");
74391
+ writeSuccess("Script completed successfully. Exiting...", config);
74390
74392
  process.exit(0);
74391
74393
  };
74392
74394
  handleProcess = (config) => {
74393
74395
  writeTrace(
74394
- config,
74395
- `Using the following arguments to process the script: ${process.argv.join(", ")}`
74396
+ `Using the following arguments to process the script: ${process.argv.join(", ")}`,
74397
+ config
74396
74398
  );
74397
74399
  process.on("unhandledRejection", (error) => {
74398
- writeError(config, `An Unhandled Rejection occurred while running the program: ${error}`);
74400
+ writeError(
74401
+ `An Unhandled Rejection occurred while running the program: ${error}`,
74402
+ config
74403
+ );
74399
74404
  exitWithError(config);
74400
74405
  });
74401
74406
  process.on("uncaughtException", (error) => {
74402
74407
  writeError(
74403
- config,
74404
74408
  `An Uncaught Exception occurred while running the program: ${error.message}
74405
- Stacktrace: ${error.stack}`
74409
+ Stacktrace: ${error.stack}`,
74410
+ config
74406
74411
  );
74407
74412
  exitWithError(config);
74408
74413
  });
74409
74414
  process.on("SIGTERM", (signal) => {
74410
- writeError(config, `The program terminated with signal code: ${signal}`);
74415
+ writeError(`The program terminated with signal code: ${signal}`, config);
74411
74416
  exitWithError(config);
74412
74417
  });
74413
74418
  process.on("SIGINT", (signal) => {
74414
- writeError(config, `The program terminated with signal code: ${signal}`);
74419
+ writeError(`The program terminated with signal code: ${signal}`, config);
74415
74420
  exitWithError(config);
74416
74421
  });
74417
74422
  process.on("SIGHUP", (signal) => {
74418
- writeError(config, `The program terminated with signal code: ${signal}`);
74423
+ writeError(`The program terminated with signal code: ${signal}`, config);
74419
74424
  exitWithError(config);
74420
74425
  });
74421
74426
  };
@@ -74555,7 +74560,9 @@ var init_get_env = __esm({
74555
74560
  getExtensionEnv = (extensionName) => {
74556
74561
  const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
74557
74562
  return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
74558
- const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
74563
+ const name = key.replace(prefix, "").split("_").map(
74564
+ (i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
74565
+ ).join("");
74559
74566
  if (name) {
74560
74567
  ret[name] = process.env[key];
74561
74568
  }
@@ -74583,14 +74590,15 @@ var init_get_env = __esm({
74583
74590
  skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
74584
74591
  cacheDirectory: correctPaths(process.env[`${prefix}CACHE_DIRECTORY`]),
74585
74592
  runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
74586
- runtimeDirectory: correctPaths(process.env[`${prefix}RUNTIME_DIRECTORY`]),
74593
+ outputDirectory: correctPaths(process.env[`${prefix}OUTPUT_DIRECTORY`]),
74587
74594
  env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
74588
74595
  ci: process.env[`${prefix}CI`] !== void 0 ? Boolean(
74589
74596
  process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION
74590
74597
  ) : void 0,
74591
74598
  colors: {
74592
74599
  primary: process.env[`${prefix}COLOR_PRIMARY`],
74593
- background: process.env[`${prefix}COLOR_BACKGROUND`],
74600
+ dark: process.env[`${prefix}COLOR_DARK`],
74601
+ light: process.env[`${prefix}COLOR_LIGHT`],
74594
74602
  success: process.env[`${prefix}COLOR_SUCCESS`],
74595
74603
  info: process.env[`${prefix}COLOR_INFO`],
74596
74604
  warning: process.env[`${prefix}COLOR_WARNING`],
@@ -74601,7 +74609,11 @@ var init_get_env = __esm({
74601
74609
  branch: process.env[`${prefix}BRANCH`],
74602
74610
  preid: process.env[`${prefix}PRE_ID`],
74603
74611
  externalPackagePatterns: process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] ? JSON.parse(process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`]) : [],
74604
- 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
74612
+ logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
74613
+ Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
74614
+ ) ? getLogLevelLabel(
74615
+ Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
74616
+ ) : process.env[`${prefix}LOG_LEVEL`] : void 0
74605
74617
  };
74606
74618
  const serializedConfig = process.env[`${prefix}CONFIG`];
74607
74619
  if (serializedConfig) {
@@ -74696,10 +74708,14 @@ var init_set_env = __esm({
74696
74708
  process.env.NX_WORKSPACE_ROOT_PATH = correctPaths(config.workspaceRoot);
74697
74709
  }
74698
74710
  if (config.packageDirectory) {
74699
- process.env[`${prefix}PACKAGE_DIRECTORY`] = correctPaths(config.packageDirectory);
74711
+ process.env[`${prefix}PACKAGE_DIRECTORY`] = correctPaths(
74712
+ config.packageDirectory
74713
+ );
74700
74714
  }
74701
74715
  if (config.buildDirectory) {
74702
- process.env[`${prefix}BUILD_DIRECTORY`] = correctPaths(config.buildDirectory);
74716
+ process.env[`${prefix}BUILD_DIRECTORY`] = correctPaths(
74717
+ config.buildDirectory
74718
+ );
74703
74719
  }
74704
74720
  if (config.skipCache !== void 0) {
74705
74721
  process.env[`${prefix}SKIP_CACHE`] = String(config.skipCache);
@@ -74709,13 +74725,17 @@ var init_set_env = __esm({
74709
74725
  }
74710
74726
  }
74711
74727
  if (!config.skipCache && config.cacheDirectory) {
74712
- process.env[`${prefix}CACHE_DIRECTORY`] = correctPaths(config.cacheDirectory);
74728
+ process.env[`${prefix}CACHE_DIRECTORY`] = correctPaths(
74729
+ config.cacheDirectory
74730
+ );
74713
74731
  }
74714
74732
  if (config.runtimeVersion) {
74715
74733
  process.env[`${prefix}RUNTIME_VERSION`] = config.runtimeVersion;
74716
74734
  }
74717
- if (config.runtimeDirectory) {
74718
- process.env[`${prefix}RUNTIME_DIRECTORY`] = correctPaths(config.runtimeDirectory);
74735
+ if (config.outputDirectory) {
74736
+ process.env[`${prefix}OUTPUT_DIRECTORY`] = correctPaths(
74737
+ config.outputDirectory
74738
+ );
74719
74739
  }
74720
74740
  if (config.env) {
74721
74741
  process.env[`${prefix}ENV`] = config.env;
@@ -74730,8 +74750,11 @@ var init_set_env = __esm({
74730
74750
  if (config.colors.primary) {
74731
74751
  process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary;
74732
74752
  }
74733
- if (config.colors.background) {
74734
- process.env[`${prefix}COLOR_BACKGROUND`] = config.colors.background;
74753
+ if (config.colors.dark) {
74754
+ process.env[`${prefix}COLOR_DARK`] = config.colors.dark;
74755
+ }
74756
+ if (config.colors.light) {
74757
+ process.env[`${prefix}COLOR_LIGHT`] = config.colors.light;
74735
74758
  }
74736
74759
  if (config.colors.success) {
74737
74760
  process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success;
@@ -74812,10 +74835,7 @@ var init_create_storm_config = __esm({
74812
74835
  if (schema && extensionName) {
74813
74836
  result.extensions = {
74814
74837
  ...result.extensions,
74815
- [extensionName]: createConfigExtension(
74816
- extensionName,
74817
- schema
74818
- )
74838
+ [extensionName]: createConfigExtension(extensionName, schema)
74819
74839
  };
74820
74840
  }
74821
74841
  _static_cache = result;
@@ -74842,8 +74862,8 @@ var init_create_storm_config = __esm({
74842
74862
  const configFile = await getConfigFile(_workspaceRoot);
74843
74863
  if (!configFile) {
74844
74864
  writeWarning(
74845
- { logLevel: "all" },
74846
- "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"
74865
+ "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",
74866
+ { logLevel: "all" }
74847
74867
  );
74848
74868
  }
74849
74869
  config = StormConfigSchema.parse(
@@ -77371,34 +77391,34 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
77371
77391
  let options = _options;
77372
77392
  let config;
77373
77393
  try {
77374
- writeInfo2(config, `\u26A1 Running the ${name} generator...
77394
+ writeInfo2(`\u26A1 Running the ${name} generator...
77375
77395
 
77376
- `);
77396
+ `, config);
77377
77397
  const workspaceRoot = findWorkspaceRoot2();
77378
77398
  if (!generatorOptions.skipReadingConfig) {
77379
77399
  writeDebug2(
77380
- config,
77381
77400
  `Loading the Storm Config from environment variables and storm.config.js file...
77382
- - workspaceRoot: ${workspaceRoot}`
77401
+ - workspaceRoot: ${workspaceRoot}`,
77402
+ config
77383
77403
  );
77384
77404
  config = await loadStormConfig2(workspaceRoot);
77385
77405
  writeTrace2(
77386
- config,
77387
77406
  `Loaded Storm config into env:
77388
- ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`
77407
+ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`,
77408
+ config
77389
77409
  );
77390
77410
  }
77391
77411
  if (generatorOptions?.hooks?.applyDefaultOptions) {
77392
- writeDebug2(config, "Running the applyDefaultOptions hook...");
77412
+ writeDebug2("Running the applyDefaultOptions hook...", config);
77393
77413
  options = await Promise.resolve(
77394
77414
  generatorOptions.hooks.applyDefaultOptions(options, config)
77395
77415
  );
77396
- writeDebug2(config, "Completed the applyDefaultOptions hook");
77416
+ writeDebug2("Completed the applyDefaultOptions hook", config);
77397
77417
  }
77398
77418
  writeTrace2(
77399
- config,
77400
77419
  `Generator schema options \u2699\uFE0F
77401
- ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`
77420
+ ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
77421
+ config
77402
77422
  );
77403
77423
  const tokenized = await applyWorkspaceTokens(
77404
77424
  options,
@@ -77406,37 +77426,41 @@ ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[ke
77406
77426
  applyWorkspaceBaseTokens
77407
77427
  );
77408
77428
  if (generatorOptions?.hooks?.preProcess) {
77409
- writeDebug2(config, "Running the preProcess hook...");
77410
- await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
77411
- writeDebug2(config, "Completed the preProcess hook");
77429
+ writeDebug2("Running the preProcess hook...", config);
77430
+ await Promise.resolve(
77431
+ generatorOptions.hooks.preProcess(tokenized, config)
77432
+ );
77433
+ writeDebug2("Completed the preProcess hook", config);
77412
77434
  }
77413
- const result = await Promise.resolve(generatorFn(tree, tokenized, config));
77435
+ const result = await Promise.resolve(
77436
+ generatorFn(tree, tokenized, config)
77437
+ );
77414
77438
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
77415
77439
  throw new Error(`The ${name} generator failed to run`, {
77416
77440
  cause: result?.error
77417
77441
  });
77418
77442
  }
77419
77443
  if (generatorOptions?.hooks?.postProcess) {
77420
- writeDebug2(config, "Running the postProcess hook...");
77444
+ writeDebug2("Running the postProcess hook...", config);
77421
77445
  await Promise.resolve(generatorOptions.hooks.postProcess(config));
77422
- writeDebug2(config, "Completed the postProcess hook");
77446
+ writeDebug2("Completed the postProcess hook", config);
77423
77447
  }
77424
- writeSuccess2(config, `Completed running the ${name} task executor!
77425
- `);
77448
+ writeSuccess2(`Completed running the ${name} task executor!
77449
+ `, config);
77426
77450
  return {
77427
77451
  ...result,
77428
77452
  success: true
77429
77453
  };
77430
77454
  } catch (error) {
77431
77455
  writeFatal2(
77432
- config,
77433
- "A fatal error occurred while running the generator - the process was forced to terminate"
77456
+ "A fatal error occurred while running the generator - the process was forced to terminate",
77457
+ config
77434
77458
  );
77435
77459
  writeError2(
77436
- config,
77437
77460
  `An exception was thrown in the generator's process
77438
77461
  - Details: ${error.message}
77439
- - Stacktrace: ${error.stack}`
77462
+ - Stacktrace: ${error.stack}`,
77463
+ config
77440
77464
  );
77441
77465
  return {
77442
77466
  success: false
@@ -80429,9 +80453,9 @@ To fix this you will either need to add a package.json or Cargo.toml file at tha
80429
80453
  tree.exists(packageJsonPath) ? packageJsonPath : cargoTomlPath
80430
80454
  );
80431
80455
  const log = (msg) => {
80432
- writeInfo2(config, `${projectName}: ${msg}`);
80456
+ writeInfo2(`${projectName}: ${msg}`, config);
80433
80457
  };
80434
- writeInfo2(config, `Running release version for project: ${project.name}`);
80458
+ writeInfo2(`Running release version for project: ${project.name}`, config);
80435
80459
  let packageName;
80436
80460
  let currentVersionFromDisk;
80437
80461
  if (tree.exists(packageJsonPath)) {
@@ -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(