@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.
- package/CHANGELOG.md +12 -0
- package/index.js +233 -73
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +231 -71
- package/src/executors/rolldown/executor.js +231 -71
- package/src/executors/tsup/executor.js +231 -71
- package/src/executors/tsup-browser/executor.js +231 -71
- package/src/executors/tsup-neutral/executor.js +231 -71
- package/src/executors/tsup-node/executor.js +231 -71
- package/src/executors/typia/executor.js +231 -71
- package/src/executors/unbuild/executor.js +231 -71
- package/src/generators/browser-library/generator.js +231 -71
- package/src/generators/config-schema/generator.js +231 -71
- package/src/generators/neutral-library/generator.js +231 -71
- package/src/generators/node-library/generator.js +231 -71
- package/src/generators/preset/generator.js +231 -71
- package/src/generators/release-version/generator.js +233 -73
- package/src/utils/index.js +231 -71
|
@@ -70600,23 +70600,71 @@ var init_lib = __esm({
|
|
|
70600
70600
|
});
|
|
70601
70601
|
|
|
70602
70602
|
// packages/config/src/schema.ts
|
|
70603
|
-
var ColorConfigSchema, StormConfigSchema;
|
|
70603
|
+
var DarkColorSchema, LightColorSchema, PrimaryColorSchema, SecondaryColorSchema, TertiaryColorSchema, AccentColorSchema, SuccessColorSchema, InfoColorSchema, WarningColorSchema, ErrorColorSchema, FatalColorSchema, DarkThemeColorConfigSchema, LightThemeColorConfigSchema, MultiThemeColorConfigSchema, SingleThemeColorConfigSchema, ColorConfigSchema, ColorConfigMapSchema, StormConfigSchema;
|
|
70604
70604
|
var init_schema = __esm({
|
|
70605
70605
|
"packages/config/src/schema.ts"() {
|
|
70606
70606
|
init_lib();
|
|
70607
|
-
|
|
70608
|
-
|
|
70609
|
-
|
|
70610
|
-
|
|
70611
|
-
|
|
70612
|
-
|
|
70613
|
-
|
|
70614
|
-
|
|
70615
|
-
|
|
70616
|
-
|
|
70617
|
-
|
|
70618
|
-
|
|
70619
|
-
|
|
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
|
+
]);
|
|
70620
70668
|
StormConfigSchema = z2.object({
|
|
70621
70669
|
extends: z2.string().trim().optional().describe(
|
|
70622
70670
|
"The path to a base JSON file to use as a configuration preset file"
|
|
@@ -70667,7 +70715,7 @@ var init_schema = __esm({
|
|
|
70667
70715
|
configFile: z2.string().trim().nullable().default(null).describe(
|
|
70668
70716
|
"The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
70669
70717
|
),
|
|
70670
|
-
colors: ColorConfigSchema.describe(
|
|
70718
|
+
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
|
|
70671
70719
|
"Storm theme config values used for styling various package elements"
|
|
70672
70720
|
),
|
|
70673
70721
|
extensions: z2.record(z2.any()).optional().default({}).describe("Configuration of each used extension")
|
|
@@ -70678,8 +70726,22 @@ var init_schema = __esm({
|
|
|
70678
70726
|
});
|
|
70679
70727
|
|
|
70680
70728
|
// packages/config/src/types.ts
|
|
70729
|
+
var COLOR_KEYS;
|
|
70681
70730
|
var init_types = __esm({
|
|
70682
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
|
+
];
|
|
70683
70745
|
}
|
|
70684
70746
|
});
|
|
70685
70747
|
|
|
@@ -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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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.
|
|
72939
|
-
|
|
72940
|
-
|
|
72941
|
-
|
|
72942
|
-
|
|
72943
|
-
|
|
72944
|
-
|
|
72945
|
-
|
|
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
|
|