@storm-software/workspace-tools 1.72.2 → 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.
@@ -73,9 +73,13 @@ var init_find_up = __esm({
73
73
  // packages/config-tools/src/utilities/find-workspace-root.ts
74
74
  function findWorkspaceRootSafe(pathInsideMonorepo) {
75
75
  if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
76
- return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
76
+ return correctPaths(
77
+ process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
78
+ );
77
79
  }
78
- return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles));
80
+ return correctPaths(
81
+ findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles)
82
+ );
79
83
  }
80
84
  function findWorkspaceRoot(pathInsideMonorepo) {
81
85
  const result = findWorkspaceRootSafe(pathInsideMonorepo);
@@ -97,8 +101,11 @@ var init_find_workspace_root = __esm({
97
101
  init_find_up();
98
102
  rootFiles = [
99
103
  "storm.json",
100
- "storm.config.js",
101
- "storm.config.ts",
104
+ "storm.json",
105
+ "storm.yaml",
106
+ "storm.yml",
107
+ "storm.js",
108
+ "storm.ts",
102
109
  ".storm.json",
103
110
  ".storm.yaml",
104
111
  ".storm.yml",
@@ -70593,23 +70600,71 @@ var init_lib = __esm({
70593
70600
  });
70594
70601
 
70595
70602
  // packages/config/src/schema.ts
70596
- var ColorConfigSchema, StormConfigSchema;
70603
+ var DarkColorSchema, LightColorSchema, PrimaryColorSchema, SecondaryColorSchema, TertiaryColorSchema, AccentColorSchema, SuccessColorSchema, InfoColorSchema, WarningColorSchema, ErrorColorSchema, FatalColorSchema, DarkThemeColorConfigSchema, LightThemeColorConfigSchema, MultiThemeColorConfigSchema, SingleThemeColorConfigSchema, ColorConfigSchema, ColorConfigMapSchema, StormConfigSchema;
70597
70604
  var init_schema = __esm({
70598
70605
  "packages/config/src/schema.ts"() {
70599
70606
  init_lib();
70600
- ColorConfigSchema = z2.object({
70601
- dark: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d232a").describe("The dark background color of the workspace"),
70602
- light: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace"),
70603
- primary: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary color of the workspace"),
70604
- secondary: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The secondary color of the workspace"),
70605
- tertiary: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#ec5990").describe("The tertiary color of the workspace"),
70606
- accent: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#6366f1").describe("The accent color of the workspace"),
70607
- success: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace"),
70608
- info: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The informational color of the workspace"),
70609
- warning: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace"),
70610
- error: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#990000").describe("The error color of the workspace"),
70611
- fatal: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace")
70612
- }).describe("Colors used for various workspace elements");
70607
+ DarkColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d232a").describe("The dark background color of the workspace");
70608
+ LightColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
70609
+ PrimaryColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary color of the workspace");
70610
+ SecondaryColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The secondary color of the workspace");
70611
+ TertiaryColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#ec5990").describe("The tertiary color of the workspace");
70612
+ AccentColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#6366f1").describe("The accent color of the workspace");
70613
+ SuccessColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace");
70614
+ InfoColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The informational color of the workspace");
70615
+ WarningColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace");
70616
+ ErrorColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#990000").describe("The error color of the workspace");
70617
+ FatalColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace");
70618
+ DarkThemeColorConfigSchema = z2.object({
70619
+ foreground: LightColorSchema,
70620
+ background: DarkColorSchema,
70621
+ primary: PrimaryColorSchema,
70622
+ secondary: SecondaryColorSchema,
70623
+ tertiary: TertiaryColorSchema,
70624
+ accent: AccentColorSchema,
70625
+ success: SuccessColorSchema,
70626
+ info: InfoColorSchema,
70627
+ warning: WarningColorSchema,
70628
+ error: ErrorColorSchema,
70629
+ fatal: FatalColorSchema
70630
+ });
70631
+ LightThemeColorConfigSchema = z2.object({
70632
+ foreground: DarkColorSchema,
70633
+ background: LightColorSchema,
70634
+ primary: PrimaryColorSchema,
70635
+ secondary: SecondaryColorSchema,
70636
+ tertiary: TertiaryColorSchema,
70637
+ accent: AccentColorSchema,
70638
+ success: SuccessColorSchema,
70639
+ info: InfoColorSchema,
70640
+ warning: WarningColorSchema,
70641
+ error: ErrorColorSchema,
70642
+ fatal: FatalColorSchema
70643
+ });
70644
+ MultiThemeColorConfigSchema = z2.object({
70645
+ dark: DarkThemeColorConfigSchema,
70646
+ light: LightThemeColorConfigSchema
70647
+ });
70648
+ SingleThemeColorConfigSchema = z2.object({
70649
+ dark: DarkColorSchema,
70650
+ light: LightColorSchema,
70651
+ primary: PrimaryColorSchema,
70652
+ secondary: SecondaryColorSchema,
70653
+ tertiary: TertiaryColorSchema,
70654
+ accent: AccentColorSchema,
70655
+ success: SuccessColorSchema,
70656
+ info: InfoColorSchema,
70657
+ warning: WarningColorSchema,
70658
+ error: ErrorColorSchema,
70659
+ fatal: FatalColorSchema
70660
+ });
70661
+ ColorConfigSchema = SingleThemeColorConfigSchema.or(
70662
+ MultiThemeColorConfigSchema
70663
+ ).describe("Colors used for various workspace elements");
70664
+ ColorConfigMapSchema = z2.union([
70665
+ z2.object({ "base": ColorConfigSchema }),
70666
+ z2.record(z2.string(), ColorConfigSchema)
70667
+ ]);
70613
70668
  StormConfigSchema = z2.object({
70614
70669
  extends: z2.string().trim().optional().describe(
70615
70670
  "The path to a base JSON file to use as a configuration preset file"
@@ -70660,7 +70715,7 @@ var init_schema = __esm({
70660
70715
  configFile: z2.string().trim().nullable().default(null).describe(
70661
70716
  "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
70662
70717
  ),
70663
- colors: ColorConfigSchema.describe(
70718
+ colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
70664
70719
  "Storm theme config values used for styling various package elements"
70665
70720
  ),
70666
70721
  extensions: z2.record(z2.any()).optional().default({}).describe("Configuration of each used extension")
@@ -70671,8 +70726,22 @@ var init_schema = __esm({
70671
70726
  });
70672
70727
 
70673
70728
  // packages/config/src/types.ts
70729
+ var COLOR_KEYS;
70674
70730
  var init_types = __esm({
70675
70731
  "packages/config/src/types.ts"() {
70732
+ COLOR_KEYS = [
70733
+ "dark",
70734
+ "light",
70735
+ "primary",
70736
+ "secondary",
70737
+ "tertiary",
70738
+ "accent",
70739
+ "success",
70740
+ "info",
70741
+ "warning",
70742
+ "error",
70743
+ "fatal"
70744
+ ];
70676
70745
  }
70677
70746
  });
70678
70747
 
@@ -72450,8 +72519,10 @@ var init_logger = __esm({
72450
72519
  init_types2();
72451
72520
  init_get_log_level();
72452
72521
  init_chalk();
72522
+ init_get_default_config();
72453
72523
  getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
72454
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;
72455
72526
  const configLogLevel = config.logLevel ?? process.env?.STORM_LOG_LEVEL ?? LogLevelLabel.INFO;
72456
72527
  if (typeof logLevel === "number" && (logLevel >= getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(configLogLevel)) {
72457
72528
  return (_6) => {
@@ -72461,9 +72532,7 @@ var init_logger = __esm({
72461
72532
  return (message) => {
72462
72533
  console.error(
72463
72534
  `
72464
- ${_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(
72465
- config?.colors?.error ? config.colors.error : "#1fb2a6"
72466
- )(message)}
72535
+ ${_chalk.bold.hex(colors.error)(">")} ${_chalk.bold.bgHex(colors.fatal).whiteBright(" \u{1F480} Fatal ")} ${_chalk.hex(colors.error)(message)}
72467
72536
 
72468
72537
  `
72469
72538
  );
@@ -72473,9 +72542,7 @@ ${_chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")}
72473
72542
  return (message) => {
72474
72543
  console.error(
72475
72544
  `
72476
- ${_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(
72477
- config?.colors?.error ? config.colors.error : "#7d1a1a"
72478
- )(message)}
72545
+ ${_chalk.bold.hex(colors.error)(">")} ${_chalk.bold.bgHex(colors.error).whiteBright(" \u2718 Error ")} ${_chalk.hex(colors.error)(message)}
72479
72546
  `
72480
72547
  );
72481
72548
  };
@@ -72484,9 +72551,7 @@ ${_chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")}
72484
72551
  return (message) => {
72485
72552
  console.warn(
72486
72553
  `
72487
- ${_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(
72488
- config?.colors?.warning ? config.colors.warning : "#fcc419"
72489
- )(message)}
72554
+ ${_chalk.bold.hex(colors.warning)("> ")} ${_chalk.bold.bgHex(colors.warning).whiteBright(" \u26A0 Warn ")} ${_chalk.hex(colors.warning)(message)}
72490
72555
  `
72491
72556
  );
72492
72557
  };
@@ -72495,9 +72560,7 @@ ${_chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")("
72495
72560
  return (message) => {
72496
72561
  console.info(
72497
72562
  `
72498
- ${_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(
72499
- config?.colors?.success ? config.colors.success : "#087f5b"
72500
- )(message)}
72563
+ ${_chalk.bold.hex(colors.success)(">")} ${_chalk.bold.bgHex(colors.success).whiteBright(" \u2713 Success ")} ${_chalk.hex(colors.success)(message)}
72501
72564
  `
72502
72565
  );
72503
72566
  };
@@ -72506,9 +72569,7 @@ ${_chalk.bold.hex(config?.colors?.success ? config.colors.success : "#087f5b")("
72506
72569
  return (message) => {
72507
72570
  console.info(
72508
72571
  `
72509
- ${_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(
72510
- config?.colors?.info ? config.colors.info : "#0ea5e9"
72511
- )(message)}
72572
+ ${_chalk.bold.hex(colors.info)(">")} ${_chalk.bold.bgHex(colors.info).whiteBright(" \u2139 Info ")} ${_chalk.hex(colors.info)(message)}
72512
72573
  `
72513
72574
  );
72514
72575
  };
@@ -72517,9 +72578,7 @@ ${_chalk.bold.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(">")} $
72517
72578
  return (message) => {
72518
72579
  console.debug(
72519
72580
  `
72520
- ${_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(
72521
- config?.colors?.primary ? config.colors.primary : "#1fb2a6"
72522
- )(message)}
72581
+ ${_chalk.bold.hex(colors.primary)(">")} ${_chalk.bold.bgHex(colors.primary).whiteBright(" \u{1F6E0} Debug ")} ${_chalk.hex(colors.primary)(message)}
72523
72582
  `
72524
72583
  );
72525
72584
  };
@@ -72527,9 +72586,7 @@ ${_chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")("
72527
72586
  return (message) => {
72528
72587
  console.log(
72529
72588
  `
72530
- ${_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(
72531
- config?.colors?.primary ? config.colors.primary : "#1fb2a6"
72532
- )(message)}
72589
+ ${_chalk.bold.hex(colors.primary)(">")} ${_chalk.bold.bgHex(colors.primary).whiteBright(" \u2709 System ")} ${_chalk.hex(colors.primary)(message)}
72533
72590
  `
72534
72591
  );
72535
72592
  };
@@ -72733,9 +72790,10 @@ var init_utilities = __esm({
72733
72790
  });
72734
72791
 
72735
72792
  // packages/config-tools/src/env/get-env.ts
72736
- var getExtensionEnv, getConfigEnv;
72793
+ var getExtensionEnv, getConfigEnv, getThemeColorConfigEnv, getSingleThemeColorConfigEnv, getMultiThemeColorConfigEnv, getBaseThemeColorConfigEnv;
72737
72794
  var init_get_env = __esm({
72738
72795
  "packages/config-tools/src/env/get-env.ts"() {
72796
+ init_src();
72739
72797
  init_utilities();
72740
72798
  init_correct_paths();
72741
72799
  getExtensionEnv = (extensionName) => {
@@ -72776,16 +72834,6 @@ var init_get_env = __esm({
72776
72834
  ci: process.env[`${prefix}CI`] !== void 0 ? Boolean(
72777
72835
  process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION
72778
72836
  ) : void 0,
72779
- colors: {
72780
- primary: process.env[`${prefix}COLOR_PRIMARY`],
72781
- dark: process.env[`${prefix}COLOR_DARK`],
72782
- light: process.env[`${prefix}COLOR_LIGHT`],
72783
- success: process.env[`${prefix}COLOR_SUCCESS`],
72784
- info: process.env[`${prefix}COLOR_INFO`],
72785
- warning: process.env[`${prefix}COLOR_WARNING`],
72786
- error: process.env[`${prefix}COLOR_ERROR`],
72787
- fatal: process.env[`${prefix}COLOR_FATAL`]
72788
- },
72789
72837
  repository: process.env[`${prefix}REPOSITORY`],
72790
72838
  branch: process.env[`${prefix}BRANCH`],
72791
72839
  preid: process.env[`${prefix}PRE_ID`],
@@ -72796,6 +72844,18 @@ var init_get_env = __esm({
72796
72844
  Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
72797
72845
  ) : process.env[`${prefix}LOG_LEVEL`] : void 0
72798
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);
72799
72859
  const serializedConfig = process.env[`${prefix}CONFIG`];
72800
72860
  if (serializedConfig) {
72801
72861
  const parsed = JSON.parse(serializedConfig);
@@ -72808,11 +72868,53 @@ var init_get_env = __esm({
72808
72868
  }
72809
72869
  return config;
72810
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
+ };
72811
72913
  }
72812
72914
  });
72813
72915
 
72814
72916
  // packages/config-tools/src/env/set-env.ts
72815
- var setExtensionEnv, setConfigEnv;
72917
+ var setExtensionEnv, setConfigEnv, setThemeColorConfigEnv, setSingleThemeColorConfigEnv, setMultiThemeColorConfigEnv, setBaseThemeColorConfigEnv;
72816
72918
  var init_set_env = __esm({
72817
72919
  "packages/config-tools/src/env/set-env.ts"() {
72818
72920
  init_types2();
@@ -72928,29 +73030,15 @@ var init_set_env = __esm({
72928
73030
  process.env.CI = String(config.ci);
72929
73031
  process.env.CONTINUOUS_INTEGRATION = String(config.ci);
72930
73032
  }
72931
- if (config.colors.primary) {
72932
- process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary;
72933
- }
72934
- if (config.colors.dark) {
72935
- process.env[`${prefix}COLOR_DARK`] = config.colors.dark;
72936
- }
72937
- if (config.colors.light) {
72938
- process.env[`${prefix}COLOR_LIGHT`] = config.colors.light;
72939
- }
72940
- if (config.colors.success) {
72941
- process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success;
72942
- }
72943
- if (config.colors.info) {
72944
- process.env[`${prefix}COLOR_INFO`] = config.colors.info;
72945
- }
72946
- if (config.colors.warning) {
72947
- process.env[`${prefix}COLOR_WARNING`] = config.colors.warning;
72948
- }
72949
- if (config.colors.error) {
72950
- process.env[`${prefix}COLOR_ERROR`] = config.colors.error;
72951
- }
72952
- if (config.colors.fatal) {
72953
- 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
+ );
72954
73042
  }
72955
73043
  if (config.repository) {
72956
73044
  process.env[`${prefix}REPOSITORY`] = config.repository;
@@ -72979,6 +73067,85 @@ var init_set_env = __esm({
72979
73067
  config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
72980
73068
  }
72981
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
+ };
72982
73149
  }
72983
73150
  });
72984
73151
 
@@ -73268,8 +73435,14 @@ ${Object.keys(options).map(
73268
73435
  );
73269
73436
  writeDebug2("Completed the preProcess hook", config);
73270
73437
  }
73438
+ const ret = executorFn(tokenized, context, config);
73439
+ if (_isFunction(ret?.next)) {
73440
+ const asyncGen = ret;
73441
+ for await (const iter of asyncGen) {
73442
+ }
73443
+ }
73271
73444
  const result = await Promise.resolve(
73272
- executorFn(tokenized, context, config)
73445
+ ret
73273
73446
  );
73274
73447
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
73275
73448
  throw new Error(`The ${name} executor failed to run`, {