@storm-software/workspace-tools 1.72.3 → 1.73.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.
@@ -3766,23 +3766,71 @@ var init_lib = __esm({
3766
3766
  });
3767
3767
 
3768
3768
  // packages/config/src/schema.ts
3769
- var ColorConfigSchema, StormConfigSchema;
3769
+ var DarkColorSchema, LightColorSchema, PrimaryColorSchema, SecondaryColorSchema, TertiaryColorSchema, AccentColorSchema, SuccessColorSchema, InfoColorSchema, WarningColorSchema, ErrorColorSchema, FatalColorSchema, DarkThemeColorConfigSchema, LightThemeColorConfigSchema, MultiThemeColorConfigSchema, SingleThemeColorConfigSchema, ColorConfigSchema, ColorConfigMapSchema, StormConfigSchema;
3770
3770
  var init_schema = __esm({
3771
3771
  "packages/config/src/schema.ts"() {
3772
3772
  init_lib();
3773
- ColorConfigSchema = z.object({
3774
- dark: z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d232a").describe("The dark background color of the workspace"),
3775
- light: z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace"),
3776
- primary: z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary color of the workspace"),
3777
- secondary: z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The secondary color of the workspace"),
3778
- tertiary: z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#ec5990").describe("The tertiary color of the workspace"),
3779
- accent: z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#6366f1").describe("The accent color of the workspace"),
3780
- success: z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace"),
3781
- info: z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The informational color of the workspace"),
3782
- warning: z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace"),
3783
- error: z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#990000").describe("The error color of the workspace"),
3784
- fatal: z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace")
3785
- }).describe("Colors used for various workspace elements");
3773
+ DarkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d232a").describe("The dark background color of the workspace");
3774
+ LightColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
3775
+ PrimaryColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary color of the workspace");
3776
+ SecondaryColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The secondary color of the workspace");
3777
+ TertiaryColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#ec5990").describe("The tertiary color of the workspace");
3778
+ AccentColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#6366f1").describe("The accent color of the workspace");
3779
+ SuccessColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace");
3780
+ InfoColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The informational color of the workspace");
3781
+ WarningColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace");
3782
+ ErrorColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#990000").describe("The error color of the workspace");
3783
+ FatalColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace");
3784
+ DarkThemeColorConfigSchema = z.object({
3785
+ foreground: LightColorSchema,
3786
+ background: DarkColorSchema,
3787
+ primary: PrimaryColorSchema,
3788
+ secondary: SecondaryColorSchema,
3789
+ tertiary: TertiaryColorSchema,
3790
+ accent: AccentColorSchema,
3791
+ success: SuccessColorSchema,
3792
+ info: InfoColorSchema,
3793
+ warning: WarningColorSchema,
3794
+ error: ErrorColorSchema,
3795
+ fatal: FatalColorSchema
3796
+ });
3797
+ LightThemeColorConfigSchema = z.object({
3798
+ foreground: DarkColorSchema,
3799
+ background: LightColorSchema,
3800
+ primary: PrimaryColorSchema,
3801
+ secondary: SecondaryColorSchema,
3802
+ tertiary: TertiaryColorSchema,
3803
+ accent: AccentColorSchema,
3804
+ success: SuccessColorSchema,
3805
+ info: InfoColorSchema,
3806
+ warning: WarningColorSchema,
3807
+ error: ErrorColorSchema,
3808
+ fatal: FatalColorSchema
3809
+ });
3810
+ MultiThemeColorConfigSchema = z.object({
3811
+ dark: DarkThemeColorConfigSchema,
3812
+ light: LightThemeColorConfigSchema
3813
+ });
3814
+ SingleThemeColorConfigSchema = z.object({
3815
+ dark: DarkColorSchema,
3816
+ light: LightColorSchema,
3817
+ primary: PrimaryColorSchema,
3818
+ secondary: SecondaryColorSchema,
3819
+ tertiary: TertiaryColorSchema,
3820
+ accent: AccentColorSchema,
3821
+ success: SuccessColorSchema,
3822
+ info: InfoColorSchema,
3823
+ warning: WarningColorSchema,
3824
+ error: ErrorColorSchema,
3825
+ fatal: FatalColorSchema
3826
+ });
3827
+ ColorConfigSchema = SingleThemeColorConfigSchema.or(
3828
+ MultiThemeColorConfigSchema
3829
+ ).describe("Colors used for various workspace elements");
3830
+ ColorConfigMapSchema = z.union([
3831
+ z.object({ "base": ColorConfigSchema }),
3832
+ z.record(z.string(), ColorConfigSchema)
3833
+ ]);
3786
3834
  StormConfigSchema = z.object({
3787
3835
  extends: z.string().trim().optional().describe(
3788
3836
  "The path to a base JSON file to use as a configuration preset file"
@@ -3833,7 +3881,7 @@ var init_schema = __esm({
3833
3881
  configFile: z.string().trim().nullable().default(null).describe(
3834
3882
  "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
3835
3883
  ),
3836
- colors: ColorConfigSchema.describe(
3884
+ colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
3837
3885
  "Storm theme config values used for styling various package elements"
3838
3886
  ),
3839
3887
  extensions: z.record(z.any()).optional().default({}).describe("Configuration of each used extension")
@@ -3844,8 +3892,22 @@ var init_schema = __esm({
3844
3892
  });
3845
3893
 
3846
3894
  // packages/config/src/types.ts
3895
+ var COLOR_KEYS;
3847
3896
  var init_types = __esm({
3848
3897
  "packages/config/src/types.ts"() {
3898
+ COLOR_KEYS = [
3899
+ "dark",
3900
+ "light",
3901
+ "primary",
3902
+ "secondary",
3903
+ "tertiary",
3904
+ "accent",
3905
+ "success",
3906
+ "info",
3907
+ "warning",
3908
+ "error",
3909
+ "fatal"
3910
+ ];
3849
3911
  }
3850
3912
  });
3851
3913
 
@@ -72457,8 +72519,10 @@ var init_logger = __esm({
72457
72519
  init_types2();
72458
72520
  init_get_log_level();
72459
72521
  init_chalk();
72522
+ init_get_default_config();
72460
72523
  getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
72461
72524
  let _chalk = getChalk();
72525
+ const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
72462
72526
  const configLogLevel = config.logLevel ?? process.env?.STORM_LOG_LEVEL ?? LogLevelLabel.INFO;
72463
72527
  if (typeof logLevel === "number" && (logLevel >= getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(configLogLevel)) {
72464
72528
  return (_6) => {
@@ -72468,9 +72532,7 @@ var init_logger = __esm({
72468
72532
  return (message) => {
72469
72533
  console.error(
72470
72534
  `
72471
- ${_chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")} ${_chalk.bold.bgHex(config?.colors?.fatal ? config.colors.fatal : "#7d1a1a").whiteBright(" \u{1F480} Fatal ")} ${_chalk.hex(
72472
- config?.colors?.error ? config.colors.error : "#1fb2a6"
72473
- )(message)}
72535
+ ${_chalk.bold.hex(colors.error)(">")} ${_chalk.bold.bgHex(colors.fatal).whiteBright(" \u{1F480} Fatal ")} ${_chalk.hex(colors.error)(message)}
72474
72536
 
72475
72537
  `
72476
72538
  );
@@ -72480,9 +72542,7 @@ ${_chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")}
72480
72542
  return (message) => {
72481
72543
  console.error(
72482
72544
  `
72483
- ${_chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")} ${_chalk.bold.bgHex(config?.colors?.error ? config.colors.error : "#7d1a1a").whiteBright(" \u2718 Error ")} ${_chalk.hex(
72484
- config?.colors?.error ? config.colors.error : "#7d1a1a"
72485
- )(message)}
72545
+ ${_chalk.bold.hex(colors.error)(">")} ${_chalk.bold.bgHex(colors.error).whiteBright(" \u2718 Error ")} ${_chalk.hex(colors.error)(message)}
72486
72546
  `
72487
72547
  );
72488
72548
  };
@@ -72491,9 +72551,7 @@ ${_chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")}
72491
72551
  return (message) => {
72492
72552
  console.warn(
72493
72553
  `
72494
- ${_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(
72495
- config?.colors?.warning ? config.colors.warning : "#fcc419"
72496
- )(message)}
72554
+ ${_chalk.bold.hex(colors.warning)("> ")} ${_chalk.bold.bgHex(colors.warning).whiteBright(" \u26A0 Warn ")} ${_chalk.hex(colors.warning)(message)}
72497
72555
  `
72498
72556
  );
72499
72557
  };
@@ -72502,9 +72560,7 @@ ${_chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")("
72502
72560
  return (message) => {
72503
72561
  console.info(
72504
72562
  `
72505
- ${_chalk.bold.hex(config?.colors?.success ? config.colors.success : "#087f5b")(">")} ${_chalk.bold.bgHex(config?.colors?.success ? config.colors.success : "#087f5b").whiteBright(" \u2713 Success ")} ${_chalk.hex(
72506
- config?.colors?.success ? config.colors.success : "#087f5b"
72507
- )(message)}
72563
+ ${_chalk.bold.hex(colors.success)(">")} ${_chalk.bold.bgHex(colors.success).whiteBright(" \u2713 Success ")} ${_chalk.hex(colors.success)(message)}
72508
72564
  `
72509
72565
  );
72510
72566
  };
@@ -72513,9 +72569,7 @@ ${_chalk.bold.hex(config?.colors?.success ? config.colors.success : "#087f5b")("
72513
72569
  return (message) => {
72514
72570
  console.info(
72515
72571
  `
72516
- ${_chalk.bold.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(">")} ${_chalk.bold.bgHex(config?.colors?.info ? config.colors.info : "#0ea5e9").whiteBright(" \u2139 Info ")} ${_chalk.hex(
72517
- config?.colors?.info ? config.colors.info : "#0ea5e9"
72518
- )(message)}
72572
+ ${_chalk.bold.hex(colors.info)(">")} ${_chalk.bold.bgHex(colors.info).whiteBright(" \u2139 Info ")} ${_chalk.hex(colors.info)(message)}
72519
72573
  `
72520
72574
  );
72521
72575
  };
@@ -72524,9 +72578,7 @@ ${_chalk.bold.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(">")} $
72524
72578
  return (message) => {
72525
72579
  console.debug(
72526
72580
  `
72527
- ${_chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(">")} ${_chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").whiteBright(" \u{1F6E0} Debug ")} ${_chalk.hex(
72528
- config?.colors?.primary ? config.colors.primary : "#1fb2a6"
72529
- )(message)}
72581
+ ${_chalk.bold.hex(colors.primary)(">")} ${_chalk.bold.bgHex(colors.primary).whiteBright(" \u{1F6E0} Debug ")} ${_chalk.hex(colors.primary)(message)}
72530
72582
  `
72531
72583
  );
72532
72584
  };
@@ -72534,9 +72586,7 @@ ${_chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")("
72534
72586
  return (message) => {
72535
72587
  console.log(
72536
72588
  `
72537
- ${_chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")(">")} ${_chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").whiteBright(" \u2709 System ")} ${_chalk.hex(
72538
- config?.colors?.primary ? config.colors.primary : "#1fb2a6"
72539
- )(message)}
72589
+ ${_chalk.bold.hex(colors.primary)(">")} ${_chalk.bold.bgHex(colors.primary).whiteBright(" \u2709 System ")} ${_chalk.hex(colors.primary)(message)}
72540
72590
  `
72541
72591
  );
72542
72592
  };
@@ -72740,9 +72790,10 @@ var init_utilities = __esm({
72740
72790
  });
72741
72791
 
72742
72792
  // packages/config-tools/src/env/get-env.ts
72743
- var getExtensionEnv, getConfigEnv;
72793
+ var getExtensionEnv, getConfigEnv, getThemeColorConfigEnv, getSingleThemeColorConfigEnv, getMultiThemeColorConfigEnv, getBaseThemeColorConfigEnv;
72744
72794
  var init_get_env = __esm({
72745
72795
  "packages/config-tools/src/env/get-env.ts"() {
72796
+ init_src();
72746
72797
  init_utilities();
72747
72798
  init_correct_paths();
72748
72799
  getExtensionEnv = (extensionName) => {
@@ -72783,16 +72834,6 @@ var init_get_env = __esm({
72783
72834
  ci: process.env[`${prefix}CI`] !== void 0 ? Boolean(
72784
72835
  process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION
72785
72836
  ) : void 0,
72786
- colors: {
72787
- primary: process.env[`${prefix}COLOR_PRIMARY`],
72788
- dark: process.env[`${prefix}COLOR_DARK`],
72789
- light: process.env[`${prefix}COLOR_LIGHT`],
72790
- success: process.env[`${prefix}COLOR_SUCCESS`],
72791
- info: process.env[`${prefix}COLOR_INFO`],
72792
- warning: process.env[`${prefix}COLOR_WARNING`],
72793
- error: process.env[`${prefix}COLOR_ERROR`],
72794
- fatal: process.env[`${prefix}COLOR_FATAL`]
72795
- },
72796
72837
  repository: process.env[`${prefix}REPOSITORY`],
72797
72838
  branch: process.env[`${prefix}BRANCH`],
72798
72839
  preid: process.env[`${prefix}PRE_ID`],
@@ -72803,6 +72844,18 @@ var init_get_env = __esm({
72803
72844
  Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
72804
72845
  ) : process.env[`${prefix}LOG_LEVEL`] : void 0
72805
72846
  };
72847
+ const themeNames = Object.keys(process.env).filter(
72848
+ (envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every(
72849
+ (colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
72850
+ )
72851
+ );
72852
+ config.colors = themeNames.length > 0 ? themeNames.reduce(
72853
+ (ret, themeName) => {
72854
+ ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
72855
+ return ret;
72856
+ },
72857
+ {}
72858
+ ) : getThemeColorConfigEnv(prefix);
72806
72859
  const serializedConfig = process.env[`${prefix}CONFIG`];
72807
72860
  if (serializedConfig) {
72808
72861
  const parsed = JSON.parse(serializedConfig);
@@ -72815,11 +72868,53 @@ var init_get_env = __esm({
72815
72868
  }
72816
72869
  return config;
72817
72870
  };
72871
+ getThemeColorConfigEnv = (prefix, theme) => {
72872
+ const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
72873
+ return process.env[`${prefix}${themeName}LIGHT_PRIMARY`] || process.env[`${prefix}${themeName}DARK_PRIMARY`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
72874
+ };
72875
+ getSingleThemeColorConfigEnv = (prefix) => {
72876
+ return {
72877
+ dark: process.env[`${prefix}DARK`],
72878
+ light: process.env[`${prefix}LIGHT`],
72879
+ primary: process.env[`${prefix}PRIMARY`],
72880
+ secondary: process.env[`${prefix}SECONDARY`],
72881
+ tertiary: process.env[`${prefix}TERTIARY`],
72882
+ accent: process.env[`${prefix}ACCENT`],
72883
+ success: process.env[`${prefix}SUCCESS`],
72884
+ info: process.env[`${prefix}INFO`],
72885
+ warning: process.env[`${prefix}WARNING`],
72886
+ error: process.env[`${prefix}ERROR`],
72887
+ fatal: process.env[`${prefix}FATAL`]
72888
+ };
72889
+ };
72890
+ getMultiThemeColorConfigEnv = (prefix) => {
72891
+ return {
72892
+ light: getBaseThemeColorConfigEnv(
72893
+ `${prefix}_LIGHT_`
72894
+ ),
72895
+ dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
72896
+ };
72897
+ };
72898
+ getBaseThemeColorConfigEnv = (prefix) => {
72899
+ return {
72900
+ foreground: process.env[`${prefix}FOREGROUND`],
72901
+ background: process.env[`${prefix}BACKGROUND`],
72902
+ primary: process.env[`${prefix}PRIMARY`],
72903
+ secondary: process.env[`${prefix}SECONDARY`],
72904
+ tertiary: process.env[`${prefix}TERTIARY`],
72905
+ accent: process.env[`${prefix}ACCENT`],
72906
+ success: process.env[`${prefix}SUCCESS`],
72907
+ info: process.env[`${prefix}INFO`],
72908
+ warning: process.env[`${prefix}WARNING`],
72909
+ error: process.env[`${prefix}ERROR`],
72910
+ fatal: process.env[`${prefix}FATAL`]
72911
+ };
72912
+ };
72818
72913
  }
72819
72914
  });
72820
72915
 
72821
72916
  // packages/config-tools/src/env/set-env.ts
72822
- var setExtensionEnv, setConfigEnv;
72917
+ var setExtensionEnv, setConfigEnv, setThemeColorConfigEnv, setSingleThemeColorConfigEnv, setMultiThemeColorConfigEnv, setBaseThemeColorConfigEnv;
72823
72918
  var init_set_env = __esm({
72824
72919
  "packages/config-tools/src/env/set-env.ts"() {
72825
72920
  init_types2();
@@ -72935,29 +73030,15 @@ var init_set_env = __esm({
72935
73030
  process.env.CI = String(config.ci);
72936
73031
  process.env.CONTINUOUS_INTEGRATION = String(config.ci);
72937
73032
  }
72938
- if (config.colors.primary) {
72939
- process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary;
72940
- }
72941
- if (config.colors.dark) {
72942
- process.env[`${prefix}COLOR_DARK`] = config.colors.dark;
72943
- }
72944
- if (config.colors.light) {
72945
- process.env[`${prefix}COLOR_LIGHT`] = config.colors.light;
72946
- }
72947
- if (config.colors.success) {
72948
- process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success;
72949
- }
72950
- if (config.colors.info) {
72951
- process.env[`${prefix}COLOR_INFO`] = config.colors.info;
72952
- }
72953
- if (config.colors.warning) {
72954
- process.env[`${prefix}COLOR_WARNING`] = config.colors.warning;
72955
- }
72956
- if (config.colors.error) {
72957
- process.env[`${prefix}COLOR_ERROR`] = config.colors.error;
72958
- }
72959
- if (config.colors.fatal) {
72960
- process.env[`${prefix}COLOR_FATAL`] = config.colors.fatal;
73033
+ if (config.colors?.base?.light || config.colors?.base?.dark) {
73034
+ for (const key of Object.keys(config.colors)) {
73035
+ setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
73036
+ }
73037
+ } else {
73038
+ setThemeColorConfigEnv(
73039
+ `${prefix}COLOR_`,
73040
+ config.colors
73041
+ );
72961
73042
  }
72962
73043
  if (config.repository) {
72963
73044
  process.env[`${prefix}REPOSITORY`] = config.repository;
@@ -72986,6 +73067,85 @@ var init_set_env = __esm({
72986
73067
  config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
72987
73068
  }
72988
73069
  };
73070
+ setThemeColorConfigEnv = (prefix, config) => {
73071
+ return config?.light?.primary || config?.dark?.primary ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
73072
+ };
73073
+ setSingleThemeColorConfigEnv = (prefix, config) => {
73074
+ if (config.dark) {
73075
+ process.env[`${prefix}DARK`] = config.dark;
73076
+ }
73077
+ if (config.light) {
73078
+ process.env[`${prefix}LIGHT`] = config.light;
73079
+ }
73080
+ if (config.primary) {
73081
+ process.env[`${prefix}PRIMARY`] = config.primary;
73082
+ }
73083
+ if (config.secondary) {
73084
+ process.env[`${prefix}SECONDARY`] = config.secondary;
73085
+ }
73086
+ if (config.tertiary) {
73087
+ process.env[`${prefix}TERTIARY`] = config.tertiary;
73088
+ }
73089
+ if (config.accent) {
73090
+ process.env[`${prefix}ACCENT`] = config.accent;
73091
+ }
73092
+ if (config.success) {
73093
+ process.env[`${prefix}SUCCESS`] = config.success;
73094
+ }
73095
+ if (config.info) {
73096
+ process.env[`${prefix}INFO`] = config.info;
73097
+ }
73098
+ if (config.warning) {
73099
+ process.env[`${prefix}WARNING`] = config.warning;
73100
+ }
73101
+ if (config.error) {
73102
+ process.env[`${prefix}ERROR`] = config.error;
73103
+ }
73104
+ if (config.fatal) {
73105
+ process.env[`${prefix}FATAL`] = config.fatal;
73106
+ }
73107
+ };
73108
+ setMultiThemeColorConfigEnv = (prefix, config) => {
73109
+ return {
73110
+ light: setBaseThemeColorConfigEnv(`${prefix}_LIGHT_`, config.light),
73111
+ dark: setBaseThemeColorConfigEnv(`${prefix}_DARK_`, config.dark)
73112
+ };
73113
+ };
73114
+ setBaseThemeColorConfigEnv = (prefix, config) => {
73115
+ if (config.foreground) {
73116
+ process.env[`${prefix}FOREGROUND`] = config.foreground;
73117
+ }
73118
+ if (config.background) {
73119
+ process.env[`${prefix}BACKGROUND`] = config.background;
73120
+ }
73121
+ if (config.primary) {
73122
+ process.env[`${prefix}PRIMARY`] = config.primary;
73123
+ }
73124
+ if (config.secondary) {
73125
+ process.env[`${prefix}SECONDARY`] = config.secondary;
73126
+ }
73127
+ if (config.tertiary) {
73128
+ process.env[`${prefix}TERTIARY`] = config.tertiary;
73129
+ }
73130
+ if (config.accent) {
73131
+ process.env[`${prefix}ACCENT`] = config.accent;
73132
+ }
73133
+ if (config.success) {
73134
+ process.env[`${prefix}SUCCESS`] = config.success;
73135
+ }
73136
+ if (config.info) {
73137
+ process.env[`${prefix}INFO`] = config.info;
73138
+ }
73139
+ if (config.warning) {
73140
+ process.env[`${prefix}WARNING`] = config.warning;
73141
+ }
73142
+ if (config.error) {
73143
+ process.env[`${prefix}ERROR`] = config.error;
73144
+ }
73145
+ if (config.fatal) {
73146
+ process.env[`${prefix}FATAL`] = config.fatal;
73147
+ }
73148
+ };
72989
73149
  }
72990
73150
  });
72991
73151