@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.
- package/CHANGELOG.md +26 -13
- package/README.md +9 -3
- package/config/nx.json +19 -68
- package/declarations.d.ts +29 -7
- package/index.js +376 -212
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +366 -202
- package/src/executors/rolldown/executor.js +249 -76
- package/src/executors/tsup/executor.js +249 -76
- package/src/executors/tsup-browser/executor.js +249 -76
- package/src/executors/tsup-neutral/executor.js +249 -76
- package/src/executors/tsup-node/executor.js +249 -76
- package/src/executors/typia/executor.js +249 -76
- package/src/executors/unbuild/executor.js +249 -76
- package/src/generators/browser-library/generator.js +359 -201
- package/src/generators/config-schema/generator.js +242 -75
- package/src/generators/neutral-library/generator.js +359 -201
- package/src/generators/node-library/generator.js +359 -201
- package/src/generators/preset/generator.js +242 -75
- package/src/generators/release-version/generator.js +252 -85
- package/src/utils/index.js +242 -75
|
@@ -3766,23 +3766,71 @@ var init_lib = __esm({
|
|
|
3766
3766
|
});
|
|
3767
3767
|
|
|
3768
3768
|
// packages/config/src/schema.ts
|
|
3769
|
-
var ColorConfigSchema, StormConfigSchema;
|
|
3769
|
+
var DarkColorSchema, LightColorSchema, PrimaryColorSchema, SecondaryColorSchema, TertiaryColorSchema, AccentColorSchema, SuccessColorSchema, InfoColorSchema, WarningColorSchema, ErrorColorSchema, FatalColorSchema, DarkThemeColorConfigSchema, LightThemeColorConfigSchema, MultiThemeColorConfigSchema, SingleThemeColorConfigSchema, ColorConfigSchema, ColorConfigMapSchema, StormConfigSchema;
|
|
3770
3770
|
var init_schema = __esm({
|
|
3771
3771
|
"packages/config/src/schema.ts"() {
|
|
3772
3772
|
init_lib();
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3773
|
+
DarkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1d232a").describe("The dark background color of the workspace");
|
|
3774
|
+
LightColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#f4f4f5").describe("The light background color of the workspace");
|
|
3775
|
+
PrimaryColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The primary color of the workspace");
|
|
3776
|
+
SecondaryColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The secondary color of the workspace");
|
|
3777
|
+
TertiaryColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#ec5990").describe("The tertiary color of the workspace");
|
|
3778
|
+
AccentColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#6366f1").describe("The accent color of the workspace");
|
|
3779
|
+
SuccessColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace");
|
|
3780
|
+
InfoColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#0ea5e9").describe("The informational color of the workspace");
|
|
3781
|
+
WarningColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace");
|
|
3782
|
+
ErrorColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#990000").describe("The error color of the workspace");
|
|
3783
|
+
FatalColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#7d1a1a").describe("The fatal color of the workspace");
|
|
3784
|
+
DarkThemeColorConfigSchema = z.object({
|
|
3785
|
+
foreground: LightColorSchema,
|
|
3786
|
+
background: DarkColorSchema,
|
|
3787
|
+
primary: PrimaryColorSchema,
|
|
3788
|
+
secondary: SecondaryColorSchema,
|
|
3789
|
+
tertiary: TertiaryColorSchema,
|
|
3790
|
+
accent: AccentColorSchema,
|
|
3791
|
+
success: SuccessColorSchema,
|
|
3792
|
+
info: InfoColorSchema,
|
|
3793
|
+
warning: WarningColorSchema,
|
|
3794
|
+
error: ErrorColorSchema,
|
|
3795
|
+
fatal: FatalColorSchema
|
|
3796
|
+
});
|
|
3797
|
+
LightThemeColorConfigSchema = z.object({
|
|
3798
|
+
foreground: DarkColorSchema,
|
|
3799
|
+
background: LightColorSchema,
|
|
3800
|
+
primary: PrimaryColorSchema,
|
|
3801
|
+
secondary: SecondaryColorSchema,
|
|
3802
|
+
tertiary: TertiaryColorSchema,
|
|
3803
|
+
accent: AccentColorSchema,
|
|
3804
|
+
success: SuccessColorSchema,
|
|
3805
|
+
info: InfoColorSchema,
|
|
3806
|
+
warning: WarningColorSchema,
|
|
3807
|
+
error: ErrorColorSchema,
|
|
3808
|
+
fatal: FatalColorSchema
|
|
3809
|
+
});
|
|
3810
|
+
MultiThemeColorConfigSchema = z.object({
|
|
3811
|
+
dark: DarkThemeColorConfigSchema,
|
|
3812
|
+
light: LightThemeColorConfigSchema
|
|
3813
|
+
});
|
|
3814
|
+
SingleThemeColorConfigSchema = z.object({
|
|
3815
|
+
dark: DarkColorSchema,
|
|
3816
|
+
light: LightColorSchema,
|
|
3817
|
+
primary: PrimaryColorSchema,
|
|
3818
|
+
secondary: SecondaryColorSchema,
|
|
3819
|
+
tertiary: TertiaryColorSchema,
|
|
3820
|
+
accent: AccentColorSchema,
|
|
3821
|
+
success: SuccessColorSchema,
|
|
3822
|
+
info: InfoColorSchema,
|
|
3823
|
+
warning: WarningColorSchema,
|
|
3824
|
+
error: ErrorColorSchema,
|
|
3825
|
+
fatal: FatalColorSchema
|
|
3826
|
+
});
|
|
3827
|
+
ColorConfigSchema = SingleThemeColorConfigSchema.or(
|
|
3828
|
+
MultiThemeColorConfigSchema
|
|
3829
|
+
).describe("Colors used for various workspace elements");
|
|
3830
|
+
ColorConfigMapSchema = z.union([
|
|
3831
|
+
z.object({ "base": ColorConfigSchema }),
|
|
3832
|
+
z.record(z.string(), ColorConfigSchema)
|
|
3833
|
+
]);
|
|
3786
3834
|
StormConfigSchema = z.object({
|
|
3787
3835
|
extends: z.string().trim().optional().describe(
|
|
3788
3836
|
"The path to a base JSON file to use as a configuration preset file"
|
|
@@ -3833,7 +3881,7 @@ var init_schema = __esm({
|
|
|
3833
3881
|
configFile: z.string().trim().nullable().default(null).describe(
|
|
3834
3882
|
"The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
3835
3883
|
),
|
|
3836
|
-
colors: ColorConfigSchema.describe(
|
|
3884
|
+
colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
|
|
3837
3885
|
"Storm theme config values used for styling various package elements"
|
|
3838
3886
|
),
|
|
3839
3887
|
extensions: z.record(z.any()).optional().default({}).describe("Configuration of each used extension")
|
|
@@ -3844,8 +3892,22 @@ var init_schema = __esm({
|
|
|
3844
3892
|
});
|
|
3845
3893
|
|
|
3846
3894
|
// packages/config/src/types.ts
|
|
3895
|
+
var COLOR_KEYS;
|
|
3847
3896
|
var init_types = __esm({
|
|
3848
3897
|
"packages/config/src/types.ts"() {
|
|
3898
|
+
COLOR_KEYS = [
|
|
3899
|
+
"dark",
|
|
3900
|
+
"light",
|
|
3901
|
+
"primary",
|
|
3902
|
+
"secondary",
|
|
3903
|
+
"tertiary",
|
|
3904
|
+
"accent",
|
|
3905
|
+
"success",
|
|
3906
|
+
"info",
|
|
3907
|
+
"warning",
|
|
3908
|
+
"error",
|
|
3909
|
+
"fatal"
|
|
3910
|
+
];
|
|
3849
3911
|
}
|
|
3850
3912
|
});
|
|
3851
3913
|
|
|
@@ -3905,9 +3967,13 @@ var init_find_up = __esm({
|
|
|
3905
3967
|
// packages/config-tools/src/utilities/find-workspace-root.ts
|
|
3906
3968
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
3907
3969
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
3908
|
-
return correctPaths(
|
|
3970
|
+
return correctPaths(
|
|
3971
|
+
process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
|
|
3972
|
+
);
|
|
3909
3973
|
}
|
|
3910
|
-
return correctPaths(
|
|
3974
|
+
return correctPaths(
|
|
3975
|
+
findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles)
|
|
3976
|
+
);
|
|
3911
3977
|
}
|
|
3912
3978
|
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
3913
3979
|
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
@@ -3929,8 +3995,11 @@ var init_find_workspace_root = __esm({
|
|
|
3929
3995
|
init_find_up();
|
|
3930
3996
|
rootFiles = [
|
|
3931
3997
|
"storm.json",
|
|
3932
|
-
"storm.
|
|
3933
|
-
"storm.
|
|
3998
|
+
"storm.json",
|
|
3999
|
+
"storm.yaml",
|
|
4000
|
+
"storm.yml",
|
|
4001
|
+
"storm.js",
|
|
4002
|
+
"storm.ts",
|
|
3934
4003
|
".storm.json",
|
|
3935
4004
|
".storm.yaml",
|
|
3936
4005
|
".storm.yml",
|
|
@@ -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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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.
|
|
72932
|
-
|
|
72933
|
-
|
|
72934
|
-
|
|
72935
|
-
|
|
72936
|
-
|
|
72937
|
-
|
|
72938
|
-
|
|
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
|
|