@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
|
@@ -72799,23 +72799,71 @@ var init_lib = __esm({
|
|
|
72799
72799
|
});
|
|
72800
72800
|
|
|
72801
72801
|
// packages/config/src/schema.ts
|
|
72802
|
-
var ColorConfigSchema, StormConfigSchema;
|
|
72802
|
+
var DarkColorSchema, LightColorSchema, PrimaryColorSchema, SecondaryColorSchema, TertiaryColorSchema, AccentColorSchema, SuccessColorSchema, InfoColorSchema, WarningColorSchema, ErrorColorSchema, FatalColorSchema, DarkThemeColorConfigSchema, LightThemeColorConfigSchema, MultiThemeColorConfigSchema, SingleThemeColorConfigSchema, ColorConfigSchema, ColorConfigMapSchema, StormConfigSchema;
|
|
72803
72803
|
var init_schema = __esm({
|
|
72804
72804
|
"packages/config/src/schema.ts"() {
|
|
72805
72805
|
init_lib();
|
|
72806
|
-
|
|
72807
|
-
|
|
72808
|
-
|
|
72809
|
-
|
|
72810
|
-
|
|
72811
|
-
|
|
72812
|
-
|
|
72813
|
-
|
|
72814
|
-
|
|
72815
|
-
|
|
72816
|
-
|
|
72817
|
-
|
|
72818
|
-
|
|
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
|
+
]);
|
|
72819
72867
|
StormConfigSchema = z2.object({
|
|
72820
72868
|
extends: z2.string().trim().optional().describe(
|
|
72821
72869
|
"The path to a base JSON file to use as a configuration preset file"
|
|
@@ -72866,7 +72914,7 @@ var init_schema = __esm({
|
|
|
72866
72914
|
configFile: z2.string().trim().nullable().default(null).describe(
|
|
72867
72915
|
"The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
72868
72916
|
),
|
|
72869
|
-
colors: ColorConfigSchema.describe(
|
|
72917
|
+
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
|
|
72870
72918
|
"Storm theme config values used for styling various package elements"
|
|
72871
72919
|
),
|
|
72872
72920
|
extensions: z2.record(z2.any()).optional().default({}).describe("Configuration of each used extension")
|
|
@@ -72877,8 +72925,22 @@ var init_schema = __esm({
|
|
|
72877
72925
|
});
|
|
72878
72926
|
|
|
72879
72927
|
// packages/config/src/types.ts
|
|
72928
|
+
var COLOR_KEYS;
|
|
72880
72929
|
var init_types = __esm({
|
|
72881
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
|
+
];
|
|
72882
72944
|
}
|
|
72883
72945
|
});
|
|
72884
72946
|
|
|
@@ -74656,8 +74718,10 @@ var init_logger = __esm({
|
|
|
74656
74718
|
init_types2();
|
|
74657
74719
|
init_get_log_level();
|
|
74658
74720
|
init_chalk();
|
|
74721
|
+
init_get_default_config();
|
|
74659
74722
|
getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
74660
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;
|
|
74661
74725
|
const configLogLevel = config.logLevel ?? process.env?.STORM_LOG_LEVEL ?? LogLevelLabel.INFO;
|
|
74662
74726
|
if (typeof logLevel === "number" && (logLevel >= getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(configLogLevel)) {
|
|
74663
74727
|
return (_6) => {
|
|
@@ -74667,9 +74731,7 @@ var init_logger = __esm({
|
|
|
74667
74731
|
return (message) => {
|
|
74668
74732
|
console.error(
|
|
74669
74733
|
`
|
|
74670
|
-
${_chalk.bold.hex(
|
|
74671
|
-
config?.colors?.error ? config.colors.error : "#1fb2a6"
|
|
74672
|
-
)(message)}
|
|
74734
|
+
${_chalk.bold.hex(colors.error)(">")} ${_chalk.bold.bgHex(colors.fatal).whiteBright(" \u{1F480} Fatal ")} ${_chalk.hex(colors.error)(message)}
|
|
74673
74735
|
|
|
74674
74736
|
`
|
|
74675
74737
|
);
|
|
@@ -74679,9 +74741,7 @@ ${_chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")}
|
|
|
74679
74741
|
return (message) => {
|
|
74680
74742
|
console.error(
|
|
74681
74743
|
`
|
|
74682
|
-
${_chalk.bold.hex(
|
|
74683
|
-
config?.colors?.error ? config.colors.error : "#7d1a1a"
|
|
74684
|
-
)(message)}
|
|
74744
|
+
${_chalk.bold.hex(colors.error)(">")} ${_chalk.bold.bgHex(colors.error).whiteBright(" \u2718 Error ")} ${_chalk.hex(colors.error)(message)}
|
|
74685
74745
|
`
|
|
74686
74746
|
);
|
|
74687
74747
|
};
|
|
@@ -74690,9 +74750,7 @@ ${_chalk.bold.hex(config?.colors?.error ? config.colors.error : "#7d1a1a")(">")}
|
|
|
74690
74750
|
return (message) => {
|
|
74691
74751
|
console.warn(
|
|
74692
74752
|
`
|
|
74693
|
-
${_chalk.bold.hex(
|
|
74694
|
-
config?.colors?.warning ? config.colors.warning : "#fcc419"
|
|
74695
|
-
)(message)}
|
|
74753
|
+
${_chalk.bold.hex(colors.warning)("> ")} ${_chalk.bold.bgHex(colors.warning).whiteBright(" \u26A0 Warn ")} ${_chalk.hex(colors.warning)(message)}
|
|
74696
74754
|
`
|
|
74697
74755
|
);
|
|
74698
74756
|
};
|
|
@@ -74701,9 +74759,7 @@ ${_chalk.bold.hex(config?.colors?.warning ? config.colors.warning : "#fcc419")("
|
|
|
74701
74759
|
return (message) => {
|
|
74702
74760
|
console.info(
|
|
74703
74761
|
`
|
|
74704
|
-
${_chalk.bold.hex(
|
|
74705
|
-
config?.colors?.success ? config.colors.success : "#087f5b"
|
|
74706
|
-
)(message)}
|
|
74762
|
+
${_chalk.bold.hex(colors.success)(">")} ${_chalk.bold.bgHex(colors.success).whiteBright(" \u2713 Success ")} ${_chalk.hex(colors.success)(message)}
|
|
74707
74763
|
`
|
|
74708
74764
|
);
|
|
74709
74765
|
};
|
|
@@ -74712,9 +74768,7 @@ ${_chalk.bold.hex(config?.colors?.success ? config.colors.success : "#087f5b")("
|
|
|
74712
74768
|
return (message) => {
|
|
74713
74769
|
console.info(
|
|
74714
74770
|
`
|
|
74715
|
-
${_chalk.bold.hex(
|
|
74716
|
-
config?.colors?.info ? config.colors.info : "#0ea5e9"
|
|
74717
|
-
)(message)}
|
|
74771
|
+
${_chalk.bold.hex(colors.info)(">")} ${_chalk.bold.bgHex(colors.info).whiteBright(" \u2139 Info ")} ${_chalk.hex(colors.info)(message)}
|
|
74718
74772
|
`
|
|
74719
74773
|
);
|
|
74720
74774
|
};
|
|
@@ -74723,9 +74777,7 @@ ${_chalk.bold.hex(config?.colors?.info ? config.colors.info : "#0ea5e9")(">")} $
|
|
|
74723
74777
|
return (message) => {
|
|
74724
74778
|
console.debug(
|
|
74725
74779
|
`
|
|
74726
|
-
${_chalk.bold.hex(
|
|
74727
|
-
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
74728
|
-
)(message)}
|
|
74780
|
+
${_chalk.bold.hex(colors.primary)(">")} ${_chalk.bold.bgHex(colors.primary).whiteBright(" \u{1F6E0} Debug ")} ${_chalk.hex(colors.primary)(message)}
|
|
74729
74781
|
`
|
|
74730
74782
|
);
|
|
74731
74783
|
};
|
|
@@ -74733,9 +74785,7 @@ ${_chalk.bold.hex(config?.colors?.primary ? config.colors.primary : "#1fb2a6")("
|
|
|
74733
74785
|
return (message) => {
|
|
74734
74786
|
console.log(
|
|
74735
74787
|
`
|
|
74736
|
-
${_chalk.bold.hex(
|
|
74737
|
-
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
74738
|
-
)(message)}
|
|
74788
|
+
${_chalk.bold.hex(colors.primary)(">")} ${_chalk.bold.bgHex(colors.primary).whiteBright(" \u2709 System ")} ${_chalk.hex(colors.primary)(message)}
|
|
74739
74789
|
`
|
|
74740
74790
|
);
|
|
74741
74791
|
};
|
|
@@ -74939,9 +74989,10 @@ var init_utilities = __esm({
|
|
|
74939
74989
|
});
|
|
74940
74990
|
|
|
74941
74991
|
// packages/config-tools/src/env/get-env.ts
|
|
74942
|
-
var getExtensionEnv, getConfigEnv;
|
|
74992
|
+
var getExtensionEnv, getConfigEnv, getThemeColorConfigEnv, getSingleThemeColorConfigEnv, getMultiThemeColorConfigEnv, getBaseThemeColorConfigEnv;
|
|
74943
74993
|
var init_get_env = __esm({
|
|
74944
74994
|
"packages/config-tools/src/env/get-env.ts"() {
|
|
74995
|
+
init_src();
|
|
74945
74996
|
init_utilities();
|
|
74946
74997
|
init_correct_paths();
|
|
74947
74998
|
getExtensionEnv = (extensionName) => {
|
|
@@ -74982,16 +75033,6 @@ var init_get_env = __esm({
|
|
|
74982
75033
|
ci: process.env[`${prefix}CI`] !== void 0 ? Boolean(
|
|
74983
75034
|
process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION
|
|
74984
75035
|
) : void 0,
|
|
74985
|
-
colors: {
|
|
74986
|
-
primary: process.env[`${prefix}COLOR_PRIMARY`],
|
|
74987
|
-
dark: process.env[`${prefix}COLOR_DARK`],
|
|
74988
|
-
light: process.env[`${prefix}COLOR_LIGHT`],
|
|
74989
|
-
success: process.env[`${prefix}COLOR_SUCCESS`],
|
|
74990
|
-
info: process.env[`${prefix}COLOR_INFO`],
|
|
74991
|
-
warning: process.env[`${prefix}COLOR_WARNING`],
|
|
74992
|
-
error: process.env[`${prefix}COLOR_ERROR`],
|
|
74993
|
-
fatal: process.env[`${prefix}COLOR_FATAL`]
|
|
74994
|
-
},
|
|
74995
75036
|
repository: process.env[`${prefix}REPOSITORY`],
|
|
74996
75037
|
branch: process.env[`${prefix}BRANCH`],
|
|
74997
75038
|
preid: process.env[`${prefix}PRE_ID`],
|
|
@@ -75002,6 +75043,18 @@ var init_get_env = __esm({
|
|
|
75002
75043
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
75003
75044
|
) : process.env[`${prefix}LOG_LEVEL`] : void 0
|
|
75004
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);
|
|
75005
75058
|
const serializedConfig = process.env[`${prefix}CONFIG`];
|
|
75006
75059
|
if (serializedConfig) {
|
|
75007
75060
|
const parsed = JSON.parse(serializedConfig);
|
|
@@ -75014,11 +75067,53 @@ var init_get_env = __esm({
|
|
|
75014
75067
|
}
|
|
75015
75068
|
return config;
|
|
75016
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
|
+
};
|
|
75017
75112
|
}
|
|
75018
75113
|
});
|
|
75019
75114
|
|
|
75020
75115
|
// packages/config-tools/src/env/set-env.ts
|
|
75021
|
-
var setExtensionEnv, setConfigEnv;
|
|
75116
|
+
var setExtensionEnv, setConfigEnv, setThemeColorConfigEnv, setSingleThemeColorConfigEnv, setMultiThemeColorConfigEnv, setBaseThemeColorConfigEnv;
|
|
75022
75117
|
var init_set_env = __esm({
|
|
75023
75118
|
"packages/config-tools/src/env/set-env.ts"() {
|
|
75024
75119
|
init_types2();
|
|
@@ -75134,29 +75229,15 @@ var init_set_env = __esm({
|
|
|
75134
75229
|
process.env.CI = String(config.ci);
|
|
75135
75230
|
process.env.CONTINUOUS_INTEGRATION = String(config.ci);
|
|
75136
75231
|
}
|
|
75137
|
-
if (config.colors.
|
|
75138
|
-
|
|
75139
|
-
|
|
75140
|
-
|
|
75141
|
-
|
|
75142
|
-
|
|
75143
|
-
|
|
75144
|
-
|
|
75145
|
-
|
|
75146
|
-
if (config.colors.success) {
|
|
75147
|
-
process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success;
|
|
75148
|
-
}
|
|
75149
|
-
if (config.colors.info) {
|
|
75150
|
-
process.env[`${prefix}COLOR_INFO`] = config.colors.info;
|
|
75151
|
-
}
|
|
75152
|
-
if (config.colors.warning) {
|
|
75153
|
-
process.env[`${prefix}COLOR_WARNING`] = config.colors.warning;
|
|
75154
|
-
}
|
|
75155
|
-
if (config.colors.error) {
|
|
75156
|
-
process.env[`${prefix}COLOR_ERROR`] = config.colors.error;
|
|
75157
|
-
}
|
|
75158
|
-
if (config.colors.fatal) {
|
|
75159
|
-
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
|
+
);
|
|
75160
75241
|
}
|
|
75161
75242
|
if (config.repository) {
|
|
75162
75243
|
process.env[`${prefix}REPOSITORY`] = config.repository;
|
|
@@ -75185,6 +75266,85 @@ var init_set_env = __esm({
|
|
|
75185
75266
|
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
75186
75267
|
}
|
|
75187
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
|
+
};
|
|
75188
75348
|
}
|
|
75189
75349
|
});
|
|
75190
75350
|
|