@storm-software/config-tools 1.42.0 → 1.43.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.cjs +51 -54
- package/index.js +51 -54
- package/meta.cjs.json +1 -1
- package/meta.esm.json +1 -1
- package/package.json +1 -1
- package/utilities/logger.cjs +35 -29
- package/utilities/logger.js +35 -29
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 1.43.0 (2024-05-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### 🚀 Features
|
|
5
|
+
|
|
6
|
+
- **config:** Update the structure of the theme color names ([4c087334](https://github.com/storm-software/storm-ops/commit/4c087334))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ❤️ Thank You
|
|
10
|
+
|
|
11
|
+
- Patrick Sullivan
|
|
12
|
+
|
|
1
13
|
## 1.42.0 (2024-05-04)
|
|
2
14
|
|
|
3
15
|
|
package/index.cjs
CHANGED
|
@@ -72300,9 +72300,8 @@ var z2 = /* @__PURE__ */ Object.freeze({
|
|
|
72300
72300
|
// packages/config/src/schema.ts
|
|
72301
72301
|
var DarkColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#22272E").describe("The dark background color of the workspace");
|
|
72302
72302
|
var 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");
|
|
72303
|
-
var
|
|
72304
|
-
var
|
|
72305
|
-
var Brand3ColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The third brand specific color of the workspace");
|
|
72303
|
+
var BrandColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The first brand specific color of the workspace");
|
|
72304
|
+
var AccentColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#8256D0").describe("The second brand specific color of the workspace");
|
|
72306
72305
|
var SuccessColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace");
|
|
72307
72306
|
var InfoColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#316DCA").describe("The informational color of the workspace");
|
|
72308
72307
|
var WarningColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace");
|
|
@@ -72311,9 +72310,8 @@ var FatalColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1
|
|
|
72311
72310
|
var DarkThemeColorConfigSchema = z2.object({
|
|
72312
72311
|
foreground: LightColorSchema,
|
|
72313
72312
|
background: DarkColorSchema,
|
|
72314
|
-
|
|
72315
|
-
|
|
72316
|
-
brand3: Brand3ColorSchema,
|
|
72313
|
+
brand: BrandColorSchema,
|
|
72314
|
+
accent: AccentColorSchema,
|
|
72317
72315
|
success: SuccessColorSchema,
|
|
72318
72316
|
info: InfoColorSchema,
|
|
72319
72317
|
warning: WarningColorSchema,
|
|
@@ -72323,9 +72321,8 @@ var DarkThemeColorConfigSchema = z2.object({
|
|
|
72323
72321
|
var LightThemeColorConfigSchema = z2.object({
|
|
72324
72322
|
foreground: DarkColorSchema,
|
|
72325
72323
|
background: LightColorSchema,
|
|
72326
|
-
|
|
72327
|
-
|
|
72328
|
-
brand3: Brand3ColorSchema,
|
|
72324
|
+
brand: BrandColorSchema,
|
|
72325
|
+
accent: AccentColorSchema,
|
|
72329
72326
|
success: SuccessColorSchema,
|
|
72330
72327
|
info: InfoColorSchema,
|
|
72331
72328
|
warning: WarningColorSchema,
|
|
@@ -72339,9 +72336,8 @@ var MultiThemeColorConfigSchema = z2.object({
|
|
|
72339
72336
|
var SingleThemeColorConfigSchema = z2.object({
|
|
72340
72337
|
dark: DarkColorSchema,
|
|
72341
72338
|
light: LightColorSchema,
|
|
72342
|
-
|
|
72343
|
-
|
|
72344
|
-
brand3: Brand3ColorSchema,
|
|
72339
|
+
brand: BrandColorSchema,
|
|
72340
|
+
accent: AccentColorSchema,
|
|
72345
72341
|
success: SuccessColorSchema,
|
|
72346
72342
|
info: InfoColorSchema,
|
|
72347
72343
|
warning: WarningColorSchema,
|
|
@@ -72387,7 +72383,7 @@ var StormConfigSchema = z2.object({
|
|
|
72387
72383
|
runtimeVersion: z2.string().trim().regex(
|
|
72388
72384
|
/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
|
|
72389
72385
|
).default("1.0.0").describe("The global version of the Storm runtime"),
|
|
72390
|
-
packageManager: z2.enum(["npm", "yarn", "pnpm", "bun"]).default("
|
|
72386
|
+
packageManager: z2.enum(["npm", "yarn", "pnpm", "bun"]).default("pnpm").describe("The package manager used by the repository"),
|
|
72391
72387
|
timezone: z2.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
72392
72388
|
locale: z2.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
72393
72389
|
logLevel: z2.enum([
|
|
@@ -72417,9 +72413,8 @@ var StormConfigSchema = z2.object({
|
|
|
72417
72413
|
var COLOR_KEYS = [
|
|
72418
72414
|
"dark",
|
|
72419
72415
|
"light",
|
|
72420
|
-
"
|
|
72421
|
-
"
|
|
72422
|
-
"brand3",
|
|
72416
|
+
"brand",
|
|
72417
|
+
"accent",
|
|
72423
72418
|
"success",
|
|
72424
72419
|
"info",
|
|
72425
72420
|
"warning",
|
|
@@ -72429,16 +72424,26 @@ var COLOR_KEYS = [
|
|
|
72429
72424
|
|
|
72430
72425
|
// packages/config-tools/src/utilities/get-default-config.ts
|
|
72431
72426
|
var DEFAULT_COLOR_CONFIG = {
|
|
72432
|
-
|
|
72433
|
-
|
|
72434
|
-
|
|
72435
|
-
|
|
72436
|
-
|
|
72437
|
-
|
|
72438
|
-
|
|
72439
|
-
|
|
72440
|
-
|
|
72441
|
-
|
|
72427
|
+
light: {
|
|
72428
|
+
background: "#f4f4f5",
|
|
72429
|
+
foreground: "#1d232a",
|
|
72430
|
+
brand: "#1fb2a6",
|
|
72431
|
+
accent: "#8250df",
|
|
72432
|
+
success: "#087f5b",
|
|
72433
|
+
info: "#0550ae",
|
|
72434
|
+
warning: "#e3b341",
|
|
72435
|
+
error: "#a40e26"
|
|
72436
|
+
},
|
|
72437
|
+
dark: {
|
|
72438
|
+
background: "#22272E",
|
|
72439
|
+
foreground: "#fcfcf5",
|
|
72440
|
+
brand: "#1fb2a6",
|
|
72441
|
+
accent: "#8256D0",
|
|
72442
|
+
success: "#087f5b",
|
|
72443
|
+
info: "#316DCA",
|
|
72444
|
+
warning: "#F3D371",
|
|
72445
|
+
error: "#d1242f"
|
|
72446
|
+
}
|
|
72442
72447
|
};
|
|
72443
72448
|
var DEFAULT_STORM_CONFIG = {
|
|
72444
72449
|
name: "storm",
|
|
@@ -72626,7 +72631,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
72626
72631
|
return (message) => {
|
|
72627
72632
|
console.error(
|
|
72628
72633
|
`
|
|
72629
|
-
${_chalk.bold.hex(colors.error ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#
|
|
72634
|
+
${_chalk.bold.hex(colors.error ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#7d1a1a").whiteBright(
|
|
72630
72635
|
" \u{1F480} Fatal "
|
|
72631
72636
|
)} ${_chalk.hex(colors.error ?? "#f85149")(formatLogMessage(message))}
|
|
72632
72637
|
`
|
|
@@ -72681,9 +72686,9 @@ ${_chalk.bold.hex(colors.info ?? "#58a6ff")(">")} ${_chalk.bold.bgHex(colors.inf
|
|
|
72681
72686
|
return (message) => {
|
|
72682
72687
|
console.debug(
|
|
72683
72688
|
`
|
|
72684
|
-
${_chalk.bold.hex(colors.
|
|
72689
|
+
${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
|
|
72685
72690
|
" \u{1F6E0} Debug "
|
|
72686
|
-
)} ${_chalk.hex(colors.
|
|
72691
|
+
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
72687
72692
|
`
|
|
72688
72693
|
);
|
|
72689
72694
|
};
|
|
@@ -72691,9 +72696,9 @@ ${_chalk.bold.hex(colors.brand1 ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.b
|
|
|
72691
72696
|
return (message) => {
|
|
72692
72697
|
console.log(
|
|
72693
72698
|
`
|
|
72694
|
-
${_chalk.bold.hex(colors.
|
|
72699
|
+
${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
|
|
72695
72700
|
" \u2709 System "
|
|
72696
|
-
)} ${_chalk.hex(colors.
|
|
72701
|
+
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
72697
72702
|
`
|
|
72698
72703
|
);
|
|
72699
72704
|
};
|
|
@@ -72721,7 +72726,7 @@ var getStopwatch = (name) => {
|
|
|
72721
72726
|
};
|
|
72722
72727
|
};
|
|
72723
72728
|
var formatLogMessage = (message, prefix = "-") => {
|
|
72724
|
-
return typeof message === "string" ? message : typeof message === "object" ? `
|
|
72729
|
+
return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : typeof message === "object" ? `
|
|
72725
72730
|
${Object.keys(message).map(
|
|
72726
72731
|
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(message[key], `${prefix}-`) : message[key]}`
|
|
72727
72732
|
).join("\n")}` : message;
|
|
@@ -73016,15 +73021,14 @@ var getConfigEnv = () => {
|
|
|
73016
73021
|
};
|
|
73017
73022
|
var getThemeColorConfigEnv = (prefix, theme) => {
|
|
73018
73023
|
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
73019
|
-
return process.env[`${prefix}${themeName}
|
|
73024
|
+
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
|
|
73020
73025
|
};
|
|
73021
73026
|
var getSingleThemeColorConfigEnv = (prefix) => {
|
|
73022
73027
|
return {
|
|
73023
73028
|
dark: process.env[`${prefix}DARK`],
|
|
73024
73029
|
light: process.env[`${prefix}LIGHT`],
|
|
73025
|
-
|
|
73026
|
-
|
|
73027
|
-
brand3: process.env[`${prefix}BRAND3`],
|
|
73030
|
+
brand: process.env[`${prefix}BRAND`],
|
|
73031
|
+
accent: process.env[`${prefix}ACCENT`],
|
|
73028
73032
|
success: process.env[`${prefix}SUCCESS`],
|
|
73029
73033
|
info: process.env[`${prefix}INFO`],
|
|
73030
73034
|
warning: process.env[`${prefix}WARNING`],
|
|
@@ -73044,9 +73048,8 @@ var getBaseThemeColorConfigEnv = (prefix) => {
|
|
|
73044
73048
|
return {
|
|
73045
73049
|
foreground: process.env[`${prefix}FOREGROUND`],
|
|
73046
73050
|
background: process.env[`${prefix}BACKGROUND`],
|
|
73047
|
-
|
|
73048
|
-
|
|
73049
|
-
brand3: process.env[`${prefix}BRAND3`],
|
|
73051
|
+
brand: process.env[`${prefix}BRAND`],
|
|
73052
|
+
accent: process.env[`${prefix}ACCENT`],
|
|
73050
73053
|
success: process.env[`${prefix}SUCCESS`],
|
|
73051
73054
|
info: process.env[`${prefix}INFO`],
|
|
73052
73055
|
warning: process.env[`${prefix}WARNING`],
|
|
@@ -73204,7 +73207,7 @@ var setConfigEnv = (config) => {
|
|
|
73204
73207
|
}
|
|
73205
73208
|
};
|
|
73206
73209
|
var setThemeColorConfigEnv = (prefix, config) => {
|
|
73207
|
-
return config?.light?.
|
|
73210
|
+
return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
|
|
73208
73211
|
};
|
|
73209
73212
|
var setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
73210
73213
|
if (config.dark) {
|
|
@@ -73213,14 +73216,11 @@ var setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
|
73213
73216
|
if (config.light) {
|
|
73214
73217
|
process.env[`${prefix}LIGHT`] = config.light;
|
|
73215
73218
|
}
|
|
73216
|
-
if (config.
|
|
73217
|
-
process.env[`${prefix}
|
|
73219
|
+
if (config.brand) {
|
|
73220
|
+
process.env[`${prefix}BRAND`] = config.brand;
|
|
73218
73221
|
}
|
|
73219
|
-
if (config.
|
|
73220
|
-
process.env[`${prefix}
|
|
73221
|
-
}
|
|
73222
|
-
if (config.brand3) {
|
|
73223
|
-
process.env[`${prefix}BRAND3`] = config.brand3;
|
|
73222
|
+
if (config.accent) {
|
|
73223
|
+
process.env[`${prefix}ACCENT`] = config.accent;
|
|
73224
73224
|
}
|
|
73225
73225
|
if (config.success) {
|
|
73226
73226
|
process.env[`${prefix}SUCCESS`] = config.success;
|
|
@@ -73251,14 +73251,11 @@ var setBaseThemeColorConfigEnv = (prefix, config) => {
|
|
|
73251
73251
|
if (config.background) {
|
|
73252
73252
|
process.env[`${prefix}BACKGROUND`] = config.background;
|
|
73253
73253
|
}
|
|
73254
|
-
if (config.
|
|
73255
|
-
process.env[`${prefix}
|
|
73256
|
-
}
|
|
73257
|
-
if (config.brand2) {
|
|
73258
|
-
process.env[`${prefix}BRAND2`] = config.brand2;
|
|
73254
|
+
if (config.brand) {
|
|
73255
|
+
process.env[`${prefix}BRAND`] = config.brand;
|
|
73259
73256
|
}
|
|
73260
|
-
if (config.
|
|
73261
|
-
process.env[`${prefix}
|
|
73257
|
+
if (config.accent) {
|
|
73258
|
+
process.env[`${prefix}ACCENT`] = config.accent;
|
|
73262
73259
|
}
|
|
73263
73260
|
if (config.success) {
|
|
73264
73261
|
process.env[`${prefix}SUCCESS`] = config.success;
|
package/index.js
CHANGED
|
@@ -72258,9 +72258,8 @@ var z2 = /* @__PURE__ */ Object.freeze({
|
|
|
72258
72258
|
// packages/config/src/schema.ts
|
|
72259
72259
|
var DarkColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#22272E").describe("The dark background color of the workspace");
|
|
72260
72260
|
var 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");
|
|
72261
|
-
var
|
|
72262
|
-
var
|
|
72263
|
-
var Brand3ColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The third brand specific color of the workspace");
|
|
72261
|
+
var BrandColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The first brand specific color of the workspace");
|
|
72262
|
+
var AccentColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#8256D0").describe("The second brand specific color of the workspace");
|
|
72264
72263
|
var SuccessColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace");
|
|
72265
72264
|
var InfoColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#316DCA").describe("The informational color of the workspace");
|
|
72266
72265
|
var WarningColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace");
|
|
@@ -72269,9 +72268,8 @@ var FatalColorSchema = z2.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1
|
|
|
72269
72268
|
var DarkThemeColorConfigSchema = z2.object({
|
|
72270
72269
|
foreground: LightColorSchema,
|
|
72271
72270
|
background: DarkColorSchema,
|
|
72272
|
-
|
|
72273
|
-
|
|
72274
|
-
brand3: Brand3ColorSchema,
|
|
72271
|
+
brand: BrandColorSchema,
|
|
72272
|
+
accent: AccentColorSchema,
|
|
72275
72273
|
success: SuccessColorSchema,
|
|
72276
72274
|
info: InfoColorSchema,
|
|
72277
72275
|
warning: WarningColorSchema,
|
|
@@ -72281,9 +72279,8 @@ var DarkThemeColorConfigSchema = z2.object({
|
|
|
72281
72279
|
var LightThemeColorConfigSchema = z2.object({
|
|
72282
72280
|
foreground: DarkColorSchema,
|
|
72283
72281
|
background: LightColorSchema,
|
|
72284
|
-
|
|
72285
|
-
|
|
72286
|
-
brand3: Brand3ColorSchema,
|
|
72282
|
+
brand: BrandColorSchema,
|
|
72283
|
+
accent: AccentColorSchema,
|
|
72287
72284
|
success: SuccessColorSchema,
|
|
72288
72285
|
info: InfoColorSchema,
|
|
72289
72286
|
warning: WarningColorSchema,
|
|
@@ -72297,9 +72294,8 @@ var MultiThemeColorConfigSchema = z2.object({
|
|
|
72297
72294
|
var SingleThemeColorConfigSchema = z2.object({
|
|
72298
72295
|
dark: DarkColorSchema,
|
|
72299
72296
|
light: LightColorSchema,
|
|
72300
|
-
|
|
72301
|
-
|
|
72302
|
-
brand3: Brand3ColorSchema,
|
|
72297
|
+
brand: BrandColorSchema,
|
|
72298
|
+
accent: AccentColorSchema,
|
|
72303
72299
|
success: SuccessColorSchema,
|
|
72304
72300
|
info: InfoColorSchema,
|
|
72305
72301
|
warning: WarningColorSchema,
|
|
@@ -72345,7 +72341,7 @@ var StormConfigSchema = z2.object({
|
|
|
72345
72341
|
runtimeVersion: z2.string().trim().regex(
|
|
72346
72342
|
/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
|
|
72347
72343
|
).default("1.0.0").describe("The global version of the Storm runtime"),
|
|
72348
|
-
packageManager: z2.enum(["npm", "yarn", "pnpm", "bun"]).default("
|
|
72344
|
+
packageManager: z2.enum(["npm", "yarn", "pnpm", "bun"]).default("pnpm").describe("The package manager used by the repository"),
|
|
72349
72345
|
timezone: z2.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
72350
72346
|
locale: z2.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
72351
72347
|
logLevel: z2.enum([
|
|
@@ -72375,9 +72371,8 @@ var StormConfigSchema = z2.object({
|
|
|
72375
72371
|
var COLOR_KEYS = [
|
|
72376
72372
|
"dark",
|
|
72377
72373
|
"light",
|
|
72378
|
-
"
|
|
72379
|
-
"
|
|
72380
|
-
"brand3",
|
|
72374
|
+
"brand",
|
|
72375
|
+
"accent",
|
|
72381
72376
|
"success",
|
|
72382
72377
|
"info",
|
|
72383
72378
|
"warning",
|
|
@@ -72387,16 +72382,26 @@ var COLOR_KEYS = [
|
|
|
72387
72382
|
|
|
72388
72383
|
// packages/config-tools/src/utilities/get-default-config.ts
|
|
72389
72384
|
var DEFAULT_COLOR_CONFIG = {
|
|
72390
|
-
|
|
72391
|
-
|
|
72392
|
-
|
|
72393
|
-
|
|
72394
|
-
|
|
72395
|
-
|
|
72396
|
-
|
|
72397
|
-
|
|
72398
|
-
|
|
72399
|
-
|
|
72385
|
+
light: {
|
|
72386
|
+
background: "#f4f4f5",
|
|
72387
|
+
foreground: "#1d232a",
|
|
72388
|
+
brand: "#1fb2a6",
|
|
72389
|
+
accent: "#8250df",
|
|
72390
|
+
success: "#087f5b",
|
|
72391
|
+
info: "#0550ae",
|
|
72392
|
+
warning: "#e3b341",
|
|
72393
|
+
error: "#a40e26"
|
|
72394
|
+
},
|
|
72395
|
+
dark: {
|
|
72396
|
+
background: "#22272E",
|
|
72397
|
+
foreground: "#fcfcf5",
|
|
72398
|
+
brand: "#1fb2a6",
|
|
72399
|
+
accent: "#8256D0",
|
|
72400
|
+
success: "#087f5b",
|
|
72401
|
+
info: "#316DCA",
|
|
72402
|
+
warning: "#F3D371",
|
|
72403
|
+
error: "#d1242f"
|
|
72404
|
+
}
|
|
72400
72405
|
};
|
|
72401
72406
|
var DEFAULT_STORM_CONFIG = {
|
|
72402
72407
|
name: "storm",
|
|
@@ -72584,7 +72589,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
72584
72589
|
return (message) => {
|
|
72585
72590
|
console.error(
|
|
72586
72591
|
`
|
|
72587
|
-
${_chalk.bold.hex(colors.error ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#
|
|
72592
|
+
${_chalk.bold.hex(colors.error ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#7d1a1a").whiteBright(
|
|
72588
72593
|
" \u{1F480} Fatal "
|
|
72589
72594
|
)} ${_chalk.hex(colors.error ?? "#f85149")(formatLogMessage(message))}
|
|
72590
72595
|
`
|
|
@@ -72639,9 +72644,9 @@ ${_chalk.bold.hex(colors.info ?? "#58a6ff")(">")} ${_chalk.bold.bgHex(colors.inf
|
|
|
72639
72644
|
return (message) => {
|
|
72640
72645
|
console.debug(
|
|
72641
72646
|
`
|
|
72642
|
-
${_chalk.bold.hex(colors.
|
|
72647
|
+
${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
|
|
72643
72648
|
" \u{1F6E0} Debug "
|
|
72644
|
-
)} ${_chalk.hex(colors.
|
|
72649
|
+
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
72645
72650
|
`
|
|
72646
72651
|
);
|
|
72647
72652
|
};
|
|
@@ -72649,9 +72654,9 @@ ${_chalk.bold.hex(colors.brand1 ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.b
|
|
|
72649
72654
|
return (message) => {
|
|
72650
72655
|
console.log(
|
|
72651
72656
|
`
|
|
72652
|
-
${_chalk.bold.hex(colors.
|
|
72657
|
+
${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
|
|
72653
72658
|
" \u2709 System "
|
|
72654
|
-
)} ${_chalk.hex(colors.
|
|
72659
|
+
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
72655
72660
|
`
|
|
72656
72661
|
);
|
|
72657
72662
|
};
|
|
@@ -72679,7 +72684,7 @@ var getStopwatch = (name) => {
|
|
|
72679
72684
|
};
|
|
72680
72685
|
};
|
|
72681
72686
|
var formatLogMessage = (message, prefix = "-") => {
|
|
72682
|
-
return typeof message === "string" ? message : typeof message === "object" ? `
|
|
72687
|
+
return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : typeof message === "object" ? `
|
|
72683
72688
|
${Object.keys(message).map(
|
|
72684
72689
|
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(message[key], `${prefix}-`) : message[key]}`
|
|
72685
72690
|
).join("\n")}` : message;
|
|
@@ -72974,15 +72979,14 @@ var getConfigEnv = () => {
|
|
|
72974
72979
|
};
|
|
72975
72980
|
var getThemeColorConfigEnv = (prefix, theme) => {
|
|
72976
72981
|
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
72977
|
-
return process.env[`${prefix}${themeName}
|
|
72982
|
+
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
|
|
72978
72983
|
};
|
|
72979
72984
|
var getSingleThemeColorConfigEnv = (prefix) => {
|
|
72980
72985
|
return {
|
|
72981
72986
|
dark: process.env[`${prefix}DARK`],
|
|
72982
72987
|
light: process.env[`${prefix}LIGHT`],
|
|
72983
|
-
|
|
72984
|
-
|
|
72985
|
-
brand3: process.env[`${prefix}BRAND3`],
|
|
72988
|
+
brand: process.env[`${prefix}BRAND`],
|
|
72989
|
+
accent: process.env[`${prefix}ACCENT`],
|
|
72986
72990
|
success: process.env[`${prefix}SUCCESS`],
|
|
72987
72991
|
info: process.env[`${prefix}INFO`],
|
|
72988
72992
|
warning: process.env[`${prefix}WARNING`],
|
|
@@ -73002,9 +73006,8 @@ var getBaseThemeColorConfigEnv = (prefix) => {
|
|
|
73002
73006
|
return {
|
|
73003
73007
|
foreground: process.env[`${prefix}FOREGROUND`],
|
|
73004
73008
|
background: process.env[`${prefix}BACKGROUND`],
|
|
73005
|
-
|
|
73006
|
-
|
|
73007
|
-
brand3: process.env[`${prefix}BRAND3`],
|
|
73009
|
+
brand: process.env[`${prefix}BRAND`],
|
|
73010
|
+
accent: process.env[`${prefix}ACCENT`],
|
|
73008
73011
|
success: process.env[`${prefix}SUCCESS`],
|
|
73009
73012
|
info: process.env[`${prefix}INFO`],
|
|
73010
73013
|
warning: process.env[`${prefix}WARNING`],
|
|
@@ -73162,7 +73165,7 @@ var setConfigEnv = (config) => {
|
|
|
73162
73165
|
}
|
|
73163
73166
|
};
|
|
73164
73167
|
var setThemeColorConfigEnv = (prefix, config) => {
|
|
73165
|
-
return config?.light?.
|
|
73168
|
+
return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
|
|
73166
73169
|
};
|
|
73167
73170
|
var setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
73168
73171
|
if (config.dark) {
|
|
@@ -73171,14 +73174,11 @@ var setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
|
73171
73174
|
if (config.light) {
|
|
73172
73175
|
process.env[`${prefix}LIGHT`] = config.light;
|
|
73173
73176
|
}
|
|
73174
|
-
if (config.
|
|
73175
|
-
process.env[`${prefix}
|
|
73177
|
+
if (config.brand) {
|
|
73178
|
+
process.env[`${prefix}BRAND`] = config.brand;
|
|
73176
73179
|
}
|
|
73177
|
-
if (config.
|
|
73178
|
-
process.env[`${prefix}
|
|
73179
|
-
}
|
|
73180
|
-
if (config.brand3) {
|
|
73181
|
-
process.env[`${prefix}BRAND3`] = config.brand3;
|
|
73180
|
+
if (config.accent) {
|
|
73181
|
+
process.env[`${prefix}ACCENT`] = config.accent;
|
|
73182
73182
|
}
|
|
73183
73183
|
if (config.success) {
|
|
73184
73184
|
process.env[`${prefix}SUCCESS`] = config.success;
|
|
@@ -73209,14 +73209,11 @@ var setBaseThemeColorConfigEnv = (prefix, config) => {
|
|
|
73209
73209
|
if (config.background) {
|
|
73210
73210
|
process.env[`${prefix}BACKGROUND`] = config.background;
|
|
73211
73211
|
}
|
|
73212
|
-
if (config.
|
|
73213
|
-
process.env[`${prefix}
|
|
73214
|
-
}
|
|
73215
|
-
if (config.brand2) {
|
|
73216
|
-
process.env[`${prefix}BRAND2`] = config.brand2;
|
|
73212
|
+
if (config.brand) {
|
|
73213
|
+
process.env[`${prefix}BRAND`] = config.brand;
|
|
73217
73214
|
}
|
|
73218
|
-
if (config.
|
|
73219
|
-
process.env[`${prefix}
|
|
73215
|
+
if (config.accent) {
|
|
73216
|
+
process.env[`${prefix}ACCENT`] = config.accent;
|
|
73220
73217
|
}
|
|
73221
73218
|
if (config.success) {
|
|
73222
73219
|
process.env[`${prefix}SUCCESS`] = config.success;
|