@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.
@@ -2272,9 +2272,13 @@ var init_find_up = __esm({
2272
2272
  // packages/config-tools/src/utilities/find-workspace-root.ts
2273
2273
  function findWorkspaceRootSafe(pathInsideMonorepo) {
2274
2274
  if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
2275
- return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
2275
+ return correctPaths(
2276
+ process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
2277
+ );
2276
2278
  }
2277
- return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles));
2279
+ return correctPaths(
2280
+ findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles)
2281
+ );
2278
2282
  }
2279
2283
  function findWorkspaceRoot(pathInsideMonorepo) {
2280
2284
  const result = findWorkspaceRootSafe(pathInsideMonorepo);
@@ -2296,8 +2300,11 @@ var init_find_workspace_root = __esm({
2296
2300
  init_find_up();
2297
2301
  rootFiles = [
2298
2302
  "storm.json",
2299
- "storm.config.js",
2300
- "storm.config.ts",
2303
+ "storm.json",
2304
+ "storm.yaml",
2305
+ "storm.yml",
2306
+ "storm.js",
2307
+ "storm.ts",
2301
2308
  ".storm.json",
2302
2309
  ".storm.yaml",
2303
2310
  ".storm.yml",
@@ -72792,23 +72799,71 @@ var init_lib = __esm({
72792
72799
  });
72793
72800
 
72794
72801
  // packages/config/src/schema.ts
72795
- var ColorConfigSchema, StormConfigSchema;
72802
+ var DarkColorSchema, LightColorSchema, PrimaryColorSchema, SecondaryColorSchema, TertiaryColorSchema, AccentColorSchema, SuccessColorSchema, InfoColorSchema, WarningColorSchema, ErrorColorSchema, FatalColorSchema, DarkThemeColorConfigSchema, LightThemeColorConfigSchema, MultiThemeColorConfigSchema, SingleThemeColorConfigSchema, ColorConfigSchema, ColorConfigMapSchema, StormConfigSchema;
72796
72803
  var init_schema = __esm({
72797
72804
  "packages/config/src/schema.ts"() {
72798
72805
  init_lib();
72799
- ColorConfigSchema = z2.object({
72800
- 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"),
72801
- 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"),
72802
- primary: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary color of the workspace"),
72803
- secondary: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The secondary color of the workspace"),
72804
- tertiary: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#ec5990").describe("The tertiary color of the workspace"),
72805
- accent: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#6366f1").describe("The accent color of the workspace"),
72806
- success: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace"),
72807
- info: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The informational color of the workspace"),
72808
- warning: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace"),
72809
- error: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#990000").describe("The error color of the workspace"),
72810
- fatal: z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace")
72811
- }).describe("Colors used for various workspace elements");
72806
+ 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");
72807
+ 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");
72808
+ PrimaryColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary color of the workspace");
72809
+ SecondaryColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The secondary color of the workspace");
72810
+ TertiaryColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#ec5990").describe("The tertiary color of the workspace");
72811
+ AccentColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#6366f1").describe("The accent color of the workspace");
72812
+ SuccessColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace");
72813
+ InfoColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The informational color of the workspace");
72814
+ WarningColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace");
72815
+ ErrorColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#990000").describe("The error color of the workspace");
72816
+ FatalColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace");
72817
+ DarkThemeColorConfigSchema = z2.object({
72818
+ foreground: LightColorSchema,
72819
+ background: DarkColorSchema,
72820
+ primary: PrimaryColorSchema,
72821
+ secondary: SecondaryColorSchema,
72822
+ tertiary: TertiaryColorSchema,
72823
+ accent: AccentColorSchema,
72824
+ success: SuccessColorSchema,
72825
+ info: InfoColorSchema,
72826
+ warning: WarningColorSchema,
72827
+ error: ErrorColorSchema,
72828
+ fatal: FatalColorSchema
72829
+ });
72830
+ LightThemeColorConfigSchema = z2.object({
72831
+ foreground: DarkColorSchema,
72832
+ background: LightColorSchema,
72833
+ primary: PrimaryColorSchema,
72834
+ secondary: SecondaryColorSchema,
72835
+ tertiary: TertiaryColorSchema,
72836
+ accent: AccentColorSchema,
72837
+ success: SuccessColorSchema,
72838
+ info: InfoColorSchema,
72839
+ warning: WarningColorSchema,
72840
+ error: ErrorColorSchema,
72841
+ fatal: FatalColorSchema
72842
+ });
72843
+ MultiThemeColorConfigSchema = z2.object({
72844
+ dark: DarkThemeColorConfigSchema,
72845
+ light: LightThemeColorConfigSchema
72846
+ });
72847
+ SingleThemeColorConfigSchema = z2.object({
72848
+ dark: DarkColorSchema,
72849
+ light: LightColorSchema,
72850
+ primary: PrimaryColorSchema,
72851
+ secondary: SecondaryColorSchema,
72852
+ tertiary: TertiaryColorSchema,
72853
+ accent: AccentColorSchema,
72854
+ success: SuccessColorSchema,
72855
+ info: InfoColorSchema,
72856
+ warning: WarningColorSchema,
72857
+ error: ErrorColorSchema,
72858
+ fatal: FatalColorSchema
72859
+ });
72860
+ ColorConfigSchema = SingleThemeColorConfigSchema.or(
72861
+ MultiThemeColorConfigSchema
72862
+ ).describe("Colors used for various workspace elements");
72863
+ ColorConfigMapSchema = z2.union([
72864
+ z2.object({ "base": ColorConfigSchema }),
72865
+ z2.record(z2.string(), ColorConfigSchema)
72866
+ ]);
72812
72867
  StormConfigSchema = z2.object({
72813
72868
  extends: z2.string().trim().optional().describe(
72814
72869
  "The path to a base JSON file to use as a configuration preset file"
@@ -72859,7 +72914,7 @@ var init_schema = __esm({
72859
72914
  configFile: z2.string().trim().nullable().default(null).describe(
72860
72915
  "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
72861
72916
  ),
72862
- colors: ColorConfigSchema.describe(
72917
+ colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
72863
72918
  "Storm theme config values used for styling various package elements"
72864
72919
  ),
72865
72920
  extensions: z2.record(z2.any()).optional().default({}).describe("Configuration of each used extension")
@@ -72870,8 +72925,22 @@ var init_schema = __esm({
72870
72925
  });
72871
72926
 
72872
72927
  // packages/config/src/types.ts
72928
+ var COLOR_KEYS;
72873
72929
  var init_types = __esm({
72874
72930
  "packages/config/src/types.ts"() {
72931
+ COLOR_KEYS = [
72932
+ "dark",
72933
+ "light",
72934
+ "primary",
72935
+ "secondary",
72936
+ "tertiary",
72937
+ "accent",
72938
+ "success",
72939
+ "info",
72940
+ "warning",
72941
+ "error",
72942
+ "fatal"
72943
+ ];
72875
72944
  }
72876
72945
  });
72877
72946
 
@@ -74649,8 +74718,10 @@ var init_logger = __esm({
74649
74718
  init_types2();
74650
74719
  init_get_log_level();
74651
74720
  init_chalk();
74721
+ init_get_default_config();
74652
74722
  getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
74653
74723
  let _chalk = getChalk();
74724
+ 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;
74654
74725
  const configLogLevel = config.logLevel ?? process.env?.STORM_LOG_LEVEL ?? LogLevelLabel.INFO;
74655
74726
  if (typeof logLevel === "number" && (logLevel >= getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(configLogLevel)) {
74656
74727
  return (_6) => {
@@ -74660,9 +74731,7 @@ var init_logger = __esm({
74660
74731
  return (message) => {
74661
74732
  console.error(
74662
74733
  `
74663
- ${_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(
74664
- config?.colors?.error ? config.colors.error : "#1fb2a6"
74665
- )(message)}
74734
+ ${_chalk.bold.hex(colors.error)(">")} ${_chalk.bold.bgHex(colors.fatal).whiteBright(" \u{1F480} Fatal ")} ${_chalk.hex(colors.error)(message)}
74666
74735
 
74667
74736
  `
74668
74737
  );
@@ -74672,9 +74741,7 @@ ${_chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")}
74672
74741
  return (message) => {
74673
74742
  console.error(
74674
74743
  `
74675
- ${_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(
74676
- config?.colors?.error ? config.colors.error : "#7d1a1a"
74677
- )(message)}
74744
+ ${_chalk.bold.hex(colors.error)(">")} ${_chalk.bold.bgHex(colors.error).whiteBright(" \u2718 Error ")} ${_chalk.hex(colors.error)(message)}
74678
74745
  `
74679
74746
  );
74680
74747
  };
@@ -74683,9 +74750,7 @@ ${_chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")}
74683
74750
  return (message) => {
74684
74751
  console.warn(
74685
74752
  `
74686
- ${_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(
74687
- config?.colors?.warning ? config.colors.warning : "#fcc419"
74688
- )(message)}
74753
+ ${_chalk.bold.hex(colors.warning)("> ")} ${_chalk.bold.bgHex(colors.warning).whiteBright(" \u26A0 Warn ")} ${_chalk.hex(colors.warning)(message)}
74689
74754
  `
74690
74755
  );
74691
74756
  };
@@ -74694,9 +74759,7 @@ ${_chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")("
74694
74759
  return (message) => {
74695
74760
  console.info(
74696
74761
  `
74697
- ${_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(
74698
- config?.colors?.success ? config.colors.success : "#087f5b"
74699
- )(message)}
74762
+ ${_chalk.bold.hex(colors.success)(">")} ${_chalk.bold.bgHex(colors.success).whiteBright(" \u2713 Success ")} ${_chalk.hex(colors.success)(message)}
74700
74763
  `
74701
74764
  );
74702
74765
  };
@@ -74705,9 +74768,7 @@ ${_chalk.bold.hex(config?.colors?.success ? config.colors.success : "#087f5b")("
74705
74768
  return (message) => {
74706
74769
  console.info(
74707
74770
  `
74708
- ${_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(
74709
- config?.colors?.info ? config.colors.info : "#0ea5e9"
74710
- )(message)}
74771
+ ${_chalk.bold.hex(colors.info)(">")} ${_chalk.bold.bgHex(colors.info).whiteBright(" \u2139 Info ")} ${_chalk.hex(colors.info)(message)}
74711
74772
  `
74712
74773
  );
74713
74774
  };
@@ -74716,9 +74777,7 @@ ${_chalk.bold.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(">")} $
74716
74777
  return (message) => {
74717
74778
  console.debug(
74718
74779
  `
74719
- ${_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(
74720
- config?.colors?.primary ? config.colors.primary : "#1fb2a6"
74721
- )(message)}
74780
+ ${_chalk.bold.hex(colors.primary)(">")} ${_chalk.bold.bgHex(colors.primary).whiteBright(" \u{1F6E0} Debug ")} ${_chalk.hex(colors.primary)(message)}
74722
74781
  `
74723
74782
  );
74724
74783
  };
@@ -74726,9 +74785,7 @@ ${_chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")("
74726
74785
  return (message) => {
74727
74786
  console.log(
74728
74787
  `
74729
- ${_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(
74730
- config?.colors?.primary ? config.colors.primary : "#1fb2a6"
74731
- )(message)}
74788
+ ${_chalk.bold.hex(colors.primary)(">")} ${_chalk.bold.bgHex(colors.primary).whiteBright(" \u2709 System ")} ${_chalk.hex(colors.primary)(message)}
74732
74789
  `
74733
74790
  );
74734
74791
  };
@@ -74932,9 +74989,10 @@ var init_utilities = __esm({
74932
74989
  });
74933
74990
 
74934
74991
  // packages/config-tools/src/env/get-env.ts
74935
- var getExtensionEnv, getConfigEnv;
74992
+ var getExtensionEnv, getConfigEnv, getThemeColorConfigEnv, getSingleThemeColorConfigEnv, getMultiThemeColorConfigEnv, getBaseThemeColorConfigEnv;
74936
74993
  var init_get_env = __esm({
74937
74994
  "packages/config-tools/src/env/get-env.ts"() {
74995
+ init_src();
74938
74996
  init_utilities();
74939
74997
  init_correct_paths();
74940
74998
  getExtensionEnv = (extensionName) => {
@@ -74975,16 +75033,6 @@ var init_get_env = __esm({
74975
75033
  ci: process.env[`${prefix}CI`] !== void 0 ? Boolean(
74976
75034
  process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION
74977
75035
  ) : void 0,
74978
- colors: {
74979
- primary: process.env[`${prefix}COLOR_PRIMARY`],
74980
- dark: process.env[`${prefix}COLOR_DARK`],
74981
- light: process.env[`${prefix}COLOR_LIGHT`],
74982
- success: process.env[`${prefix}COLOR_SUCCESS`],
74983
- info: process.env[`${prefix}COLOR_INFO`],
74984
- warning: process.env[`${prefix}COLOR_WARNING`],
74985
- error: process.env[`${prefix}COLOR_ERROR`],
74986
- fatal: process.env[`${prefix}COLOR_FATAL`]
74987
- },
74988
75036
  repository: process.env[`${prefix}REPOSITORY`],
74989
75037
  branch: process.env[`${prefix}BRANCH`],
74990
75038
  preid: process.env[`${prefix}PRE_ID`],
@@ -74995,6 +75043,18 @@ var init_get_env = __esm({
74995
75043
  Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
74996
75044
  ) : process.env[`${prefix}LOG_LEVEL`] : void 0
74997
75045
  };
75046
+ const themeNames = Object.keys(process.env).filter(
75047
+ (envKey) => envKey.startsWith(`${prefix}COLOR_`) && COLOR_KEYS.every(
75048
+ (colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
75049
+ )
75050
+ );
75051
+ config.colors = themeNames.length > 0 ? themeNames.reduce(
75052
+ (ret, themeName) => {
75053
+ ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
75054
+ return ret;
75055
+ },
75056
+ {}
75057
+ ) : getThemeColorConfigEnv(prefix);
74998
75058
  const serializedConfig = process.env[`${prefix}CONFIG`];
74999
75059
  if (serializedConfig) {
75000
75060
  const parsed = JSON.parse(serializedConfig);
@@ -75007,11 +75067,53 @@ var init_get_env = __esm({
75007
75067
  }
75008
75068
  return config;
75009
75069
  };
75070
+ getThemeColorConfigEnv = (prefix, theme) => {
75071
+ const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
75072
+ return process.env[`${prefix}${themeName}LIGHT_PRIMARY`] || process.env[`${prefix}${themeName}DARK_PRIMARY`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
75073
+ };
75074
+ getSingleThemeColorConfigEnv = (prefix) => {
75075
+ return {
75076
+ dark: process.env[`${prefix}DARK`],
75077
+ light: process.env[`${prefix}LIGHT`],
75078
+ primary: process.env[`${prefix}PRIMARY`],
75079
+ secondary: process.env[`${prefix}SECONDARY`],
75080
+ tertiary: process.env[`${prefix}TERTIARY`],
75081
+ accent: process.env[`${prefix}ACCENT`],
75082
+ success: process.env[`${prefix}SUCCESS`],
75083
+ info: process.env[`${prefix}INFO`],
75084
+ warning: process.env[`${prefix}WARNING`],
75085
+ error: process.env[`${prefix}ERROR`],
75086
+ fatal: process.env[`${prefix}FATAL`]
75087
+ };
75088
+ };
75089
+ getMultiThemeColorConfigEnv = (prefix) => {
75090
+ return {
75091
+ light: getBaseThemeColorConfigEnv(
75092
+ `${prefix}_LIGHT_`
75093
+ ),
75094
+ dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
75095
+ };
75096
+ };
75097
+ getBaseThemeColorConfigEnv = (prefix) => {
75098
+ return {
75099
+ foreground: process.env[`${prefix}FOREGROUND`],
75100
+ background: process.env[`${prefix}BACKGROUND`],
75101
+ primary: process.env[`${prefix}PRIMARY`],
75102
+ secondary: process.env[`${prefix}SECONDARY`],
75103
+ tertiary: process.env[`${prefix}TERTIARY`],
75104
+ accent: process.env[`${prefix}ACCENT`],
75105
+ success: process.env[`${prefix}SUCCESS`],
75106
+ info: process.env[`${prefix}INFO`],
75107
+ warning: process.env[`${prefix}WARNING`],
75108
+ error: process.env[`${prefix}ERROR`],
75109
+ fatal: process.env[`${prefix}FATAL`]
75110
+ };
75111
+ };
75010
75112
  }
75011
75113
  });
75012
75114
 
75013
75115
  // packages/config-tools/src/env/set-env.ts
75014
- var setExtensionEnv, setConfigEnv;
75116
+ var setExtensionEnv, setConfigEnv, setThemeColorConfigEnv, setSingleThemeColorConfigEnv, setMultiThemeColorConfigEnv, setBaseThemeColorConfigEnv;
75015
75117
  var init_set_env = __esm({
75016
75118
  "packages/config-tools/src/env/set-env.ts"() {
75017
75119
  init_types2();
@@ -75127,29 +75229,15 @@ var init_set_env = __esm({
75127
75229
  process.env.CI = String(config.ci);
75128
75230
  process.env.CONTINUOUS_INTEGRATION = String(config.ci);
75129
75231
  }
75130
- if (config.colors.primary) {
75131
- process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary;
75132
- }
75133
- if (config.colors.dark) {
75134
- process.env[`${prefix}COLOR_DARK`] = config.colors.dark;
75135
- }
75136
- if (config.colors.light) {
75137
- process.env[`${prefix}COLOR_LIGHT`] = config.colors.light;
75138
- }
75139
- if (config.colors.success) {
75140
- process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success;
75141
- }
75142
- if (config.colors.info) {
75143
- process.env[`${prefix}COLOR_INFO`] = config.colors.info;
75144
- }
75145
- if (config.colors.warning) {
75146
- process.env[`${prefix}COLOR_WARNING`] = config.colors.warning;
75147
- }
75148
- if (config.colors.error) {
75149
- process.env[`${prefix}COLOR_ERROR`] = config.colors.error;
75150
- }
75151
- if (config.colors.fatal) {
75152
- process.env[`${prefix}COLOR_FATAL`] = config.colors.fatal;
75232
+ if (config.colors?.base?.light || config.colors?.base?.dark) {
75233
+ for (const key of Object.keys(config.colors)) {
75234
+ setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
75235
+ }
75236
+ } else {
75237
+ setThemeColorConfigEnv(
75238
+ `${prefix}COLOR_`,
75239
+ config.colors
75240
+ );
75153
75241
  }
75154
75242
  if (config.repository) {
75155
75243
  process.env[`${prefix}REPOSITORY`] = config.repository;
@@ -75178,6 +75266,85 @@ var init_set_env = __esm({
75178
75266
  config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
75179
75267
  }
75180
75268
  };
75269
+ setThemeColorConfigEnv = (prefix, config) => {
75270
+ return config?.light?.primary || config?.dark?.primary ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
75271
+ };
75272
+ setSingleThemeColorConfigEnv = (prefix, config) => {
75273
+ if (config.dark) {
75274
+ process.env[`${prefix}DARK`] = config.dark;
75275
+ }
75276
+ if (config.light) {
75277
+ process.env[`${prefix}LIGHT`] = config.light;
75278
+ }
75279
+ if (config.primary) {
75280
+ process.env[`${prefix}PRIMARY`] = config.primary;
75281
+ }
75282
+ if (config.secondary) {
75283
+ process.env[`${prefix}SECONDARY`] = config.secondary;
75284
+ }
75285
+ if (config.tertiary) {
75286
+ process.env[`${prefix}TERTIARY`] = config.tertiary;
75287
+ }
75288
+ if (config.accent) {
75289
+ process.env[`${prefix}ACCENT`] = config.accent;
75290
+ }
75291
+ if (config.success) {
75292
+ process.env[`${prefix}SUCCESS`] = config.success;
75293
+ }
75294
+ if (config.info) {
75295
+ process.env[`${prefix}INFO`] = config.info;
75296
+ }
75297
+ if (config.warning) {
75298
+ process.env[`${prefix}WARNING`] = config.warning;
75299
+ }
75300
+ if (config.error) {
75301
+ process.env[`${prefix}ERROR`] = config.error;
75302
+ }
75303
+ if (config.fatal) {
75304
+ process.env[`${prefix}FATAL`] = config.fatal;
75305
+ }
75306
+ };
75307
+ setMultiThemeColorConfigEnv = (prefix, config) => {
75308
+ return {
75309
+ light: setBaseThemeColorConfigEnv(`${prefix}_LIGHT_`, config.light),
75310
+ dark: setBaseThemeColorConfigEnv(`${prefix}_DARK_`, config.dark)
75311
+ };
75312
+ };
75313
+ setBaseThemeColorConfigEnv = (prefix, config) => {
75314
+ if (config.foreground) {
75315
+ process.env[`${prefix}FOREGROUND`] = config.foreground;
75316
+ }
75317
+ if (config.background) {
75318
+ process.env[`${prefix}BACKGROUND`] = config.background;
75319
+ }
75320
+ if (config.primary) {
75321
+ process.env[`${prefix}PRIMARY`] = config.primary;
75322
+ }
75323
+ if (config.secondary) {
75324
+ process.env[`${prefix}SECONDARY`] = config.secondary;
75325
+ }
75326
+ if (config.tertiary) {
75327
+ process.env[`${prefix}TERTIARY`] = config.tertiary;
75328
+ }
75329
+ if (config.accent) {
75330
+ process.env[`${prefix}ACCENT`] = config.accent;
75331
+ }
75332
+ if (config.success) {
75333
+ process.env[`${prefix}SUCCESS`] = config.success;
75334
+ }
75335
+ if (config.info) {
75336
+ process.env[`${prefix}INFO`] = config.info;
75337
+ }
75338
+ if (config.warning) {
75339
+ process.env[`${prefix}WARNING`] = config.warning;
75340
+ }
75341
+ if (config.error) {
75342
+ process.env[`${prefix}ERROR`] = config.error;
75343
+ }
75344
+ if (config.fatal) {
75345
+ process.env[`${prefix}FATAL`] = config.fatal;
75346
+ }
75347
+ };
75181
75348
  }
75182
75349
  });
75183
75350
 
@@ -305425,8 +305592,14 @@ ${Object.keys(options).map(
305425
305592
  );
305426
305593
  writeDebug2("Completed the preProcess hook", config);
305427
305594
  }
305595
+ const ret = executorFn(tokenized, context, config);
305596
+ if (_isFunction(ret?.next)) {
305597
+ const asyncGen = ret;
305598
+ for await (const iter of asyncGen) {
305599
+ }
305600
+ }
305428
305601
  const result = await Promise.resolve(
305429
- executorFn(tokenized, context, config)
305602
+ ret
305430
305603
  );
305431
305604
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
305432
305605
  throw new Error(`The ${name} executor failed to run`, {