@storm-software/config-tools 1.41.5 → 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 +24 -0
- package/index.cjs +136 -149
- package/index.js +137 -150
- package/meta.cjs.json +1 -1
- package/meta.esm.json +1 -1
- package/package.json +1 -1
- package/utilities/logger.cjs +36 -35
- package/utilities/logger.js +36 -35
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/config-tools",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.43.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "⚡The Storm-Ops monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.",
|
|
6
6
|
"repository": {
|
package/utilities/logger.cjs
CHANGED
|
@@ -5582,23 +5582,19 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
5582
5582
|
});
|
|
5583
5583
|
|
|
5584
5584
|
// packages/config/src/schema.ts
|
|
5585
|
-
var DarkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#
|
|
5585
|
+
var DarkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#22272E").describe("The dark background color of the workspace");
|
|
5586
5586
|
var 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");
|
|
5587
|
-
var
|
|
5588
|
-
var
|
|
5589
|
-
var TertiaryColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#ec5990").describe("The tertiary color of the workspace");
|
|
5590
|
-
var AccentColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#6366f1").describe("The accent color of the workspace");
|
|
5587
|
+
var BrandColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The first brand specific color of the workspace");
|
|
5588
|
+
var AccentColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#8256D0").describe("The second brand specific color of the workspace");
|
|
5591
5589
|
var SuccessColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace");
|
|
5592
|
-
var InfoColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#
|
|
5590
|
+
var InfoColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#316DCA").describe("The informational color of the workspace");
|
|
5593
5591
|
var WarningColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace");
|
|
5594
|
-
var ErrorColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#
|
|
5595
|
-
var FatalColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).
|
|
5592
|
+
var ErrorColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#a40e26").describe("The error color of the workspace");
|
|
5593
|
+
var FatalColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The fatal color of the workspace");
|
|
5596
5594
|
var DarkThemeColorConfigSchema = z.object({
|
|
5597
5595
|
foreground: LightColorSchema,
|
|
5598
5596
|
background: DarkColorSchema,
|
|
5599
|
-
|
|
5600
|
-
secondary: SecondaryColorSchema,
|
|
5601
|
-
tertiary: TertiaryColorSchema,
|
|
5597
|
+
brand: BrandColorSchema,
|
|
5602
5598
|
accent: AccentColorSchema,
|
|
5603
5599
|
success: SuccessColorSchema,
|
|
5604
5600
|
info: InfoColorSchema,
|
|
@@ -5609,9 +5605,7 @@ var DarkThemeColorConfigSchema = z.object({
|
|
|
5609
5605
|
var LightThemeColorConfigSchema = z.object({
|
|
5610
5606
|
foreground: DarkColorSchema,
|
|
5611
5607
|
background: LightColorSchema,
|
|
5612
|
-
|
|
5613
|
-
secondary: SecondaryColorSchema,
|
|
5614
|
-
tertiary: TertiaryColorSchema,
|
|
5608
|
+
brand: BrandColorSchema,
|
|
5615
5609
|
accent: AccentColorSchema,
|
|
5616
5610
|
success: SuccessColorSchema,
|
|
5617
5611
|
info: InfoColorSchema,
|
|
@@ -5626,9 +5620,7 @@ var MultiThemeColorConfigSchema = z.object({
|
|
|
5626
5620
|
var SingleThemeColorConfigSchema = z.object({
|
|
5627
5621
|
dark: DarkColorSchema,
|
|
5628
5622
|
light: LightColorSchema,
|
|
5629
|
-
|
|
5630
|
-
secondary: SecondaryColorSchema,
|
|
5631
|
-
tertiary: TertiaryColorSchema,
|
|
5623
|
+
brand: BrandColorSchema,
|
|
5632
5624
|
accent: AccentColorSchema,
|
|
5633
5625
|
success: SuccessColorSchema,
|
|
5634
5626
|
info: InfoColorSchema,
|
|
@@ -5675,7 +5667,7 @@ var StormConfigSchema = z.object({
|
|
|
5675
5667
|
runtimeVersion: z.string().trim().regex(
|
|
5676
5668
|
/^(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-]+)*))?$/
|
|
5677
5669
|
).default("1.0.0").describe("The global version of the Storm runtime"),
|
|
5678
|
-
packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("
|
|
5670
|
+
packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("pnpm").describe("The package manager used by the repository"),
|
|
5679
5671
|
timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
5680
5672
|
locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
5681
5673
|
logLevel: z.enum([
|
|
@@ -5703,17 +5695,26 @@ var StormConfigSchema = z.object({
|
|
|
5703
5695
|
|
|
5704
5696
|
// packages/config-tools/src/utilities/get-default-config.ts
|
|
5705
5697
|
var DEFAULT_COLOR_CONFIG = {
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5698
|
+
light: {
|
|
5699
|
+
background: "#f4f4f5",
|
|
5700
|
+
foreground: "#1d232a",
|
|
5701
|
+
brand: "#1fb2a6",
|
|
5702
|
+
accent: "#8250df",
|
|
5703
|
+
success: "#087f5b",
|
|
5704
|
+
info: "#0550ae",
|
|
5705
|
+
warning: "#e3b341",
|
|
5706
|
+
error: "#a40e26"
|
|
5707
|
+
},
|
|
5708
|
+
dark: {
|
|
5709
|
+
background: "#22272E",
|
|
5710
|
+
foreground: "#fcfcf5",
|
|
5711
|
+
brand: "#1fb2a6",
|
|
5712
|
+
accent: "#8256D0",
|
|
5713
|
+
success: "#087f5b",
|
|
5714
|
+
info: "#316DCA",
|
|
5715
|
+
warning: "#F3D371",
|
|
5716
|
+
error: "#d1242f"
|
|
5717
|
+
}
|
|
5717
5718
|
};
|
|
5718
5719
|
var DEFAULT_STORM_CONFIG = {
|
|
5719
5720
|
name: "storm",
|
|
@@ -5751,7 +5752,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
5751
5752
|
return (message) => {
|
|
5752
5753
|
console.error(
|
|
5753
5754
|
`
|
|
5754
|
-
${_chalk.bold.hex(colors.error ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#
|
|
5755
|
+
${_chalk.bold.hex(colors.error ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#7d1a1a").whiteBright(
|
|
5755
5756
|
" \u{1F480} Fatal "
|
|
5756
5757
|
)} ${_chalk.hex(colors.error ?? "#f85149")(formatLogMessage(message))}
|
|
5757
5758
|
`
|
|
@@ -5806,9 +5807,9 @@ ${_chalk.bold.hex(colors.info ?? "#58a6ff")(">")} ${_chalk.bold.bgHex(colors.inf
|
|
|
5806
5807
|
return (message) => {
|
|
5807
5808
|
console.debug(
|
|
5808
5809
|
`
|
|
5809
|
-
${_chalk.bold.hex(colors.
|
|
5810
|
+
${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
|
|
5810
5811
|
" \u{1F6E0} Debug "
|
|
5811
|
-
)} ${_chalk.hex(colors.
|
|
5812
|
+
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
5812
5813
|
`
|
|
5813
5814
|
);
|
|
5814
5815
|
};
|
|
@@ -5816,9 +5817,9 @@ ${_chalk.bold.hex(colors.primary ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.
|
|
|
5816
5817
|
return (message) => {
|
|
5817
5818
|
console.log(
|
|
5818
5819
|
`
|
|
5819
|
-
${_chalk.bold.hex(colors.
|
|
5820
|
+
${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
|
|
5820
5821
|
" \u2709 System "
|
|
5821
|
-
)} ${_chalk.hex(colors.
|
|
5822
|
+
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
5822
5823
|
`
|
|
5823
5824
|
);
|
|
5824
5825
|
};
|
|
@@ -5846,7 +5847,7 @@ var getStopwatch = (name) => {
|
|
|
5846
5847
|
};
|
|
5847
5848
|
};
|
|
5848
5849
|
var formatLogMessage = (message, prefix = "-") => {
|
|
5849
|
-
return typeof message === "string" ? message : typeof message === "object" ? `
|
|
5850
|
+
return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : typeof message === "object" ? `
|
|
5850
5851
|
${Object.keys(message).map(
|
|
5851
5852
|
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(message[key], `${prefix}-`) : message[key]}`
|
|
5852
5853
|
).join("\n")}` : message;
|
package/utilities/logger.js
CHANGED
|
@@ -5567,23 +5567,19 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
5567
5567
|
});
|
|
5568
5568
|
|
|
5569
5569
|
// packages/config/src/schema.ts
|
|
5570
|
-
var DarkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#
|
|
5570
|
+
var DarkColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#22272E").describe("The dark background color of the workspace");
|
|
5571
5571
|
var 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");
|
|
5572
|
-
var
|
|
5573
|
-
var
|
|
5574
|
-
var TertiaryColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#ec5990").describe("The tertiary color of the workspace");
|
|
5575
|
-
var AccentColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#6366f1").describe("The accent color of the workspace");
|
|
5572
|
+
var BrandColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#1fb2a6").describe("The first brand specific color of the workspace");
|
|
5573
|
+
var AccentColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#8256D0").describe("The second brand specific color of the workspace");
|
|
5576
5574
|
var SuccessColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#087f5b").describe("The success color of the workspace");
|
|
5577
|
-
var InfoColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#
|
|
5575
|
+
var InfoColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#316DCA").describe("The informational color of the workspace");
|
|
5578
5576
|
var WarningColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#fcc419").describe("The warning color of the workspace");
|
|
5579
|
-
var ErrorColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#
|
|
5580
|
-
var FatalColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).
|
|
5577
|
+
var ErrorColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).default("#a40e26").describe("The error color of the workspace");
|
|
5578
|
+
var FatalColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The fatal color of the workspace");
|
|
5581
5579
|
var DarkThemeColorConfigSchema = z.object({
|
|
5582
5580
|
foreground: LightColorSchema,
|
|
5583
5581
|
background: DarkColorSchema,
|
|
5584
|
-
|
|
5585
|
-
secondary: SecondaryColorSchema,
|
|
5586
|
-
tertiary: TertiaryColorSchema,
|
|
5582
|
+
brand: BrandColorSchema,
|
|
5587
5583
|
accent: AccentColorSchema,
|
|
5588
5584
|
success: SuccessColorSchema,
|
|
5589
5585
|
info: InfoColorSchema,
|
|
@@ -5594,9 +5590,7 @@ var DarkThemeColorConfigSchema = z.object({
|
|
|
5594
5590
|
var LightThemeColorConfigSchema = z.object({
|
|
5595
5591
|
foreground: DarkColorSchema,
|
|
5596
5592
|
background: LightColorSchema,
|
|
5597
|
-
|
|
5598
|
-
secondary: SecondaryColorSchema,
|
|
5599
|
-
tertiary: TertiaryColorSchema,
|
|
5593
|
+
brand: BrandColorSchema,
|
|
5600
5594
|
accent: AccentColorSchema,
|
|
5601
5595
|
success: SuccessColorSchema,
|
|
5602
5596
|
info: InfoColorSchema,
|
|
@@ -5611,9 +5605,7 @@ var MultiThemeColorConfigSchema = z.object({
|
|
|
5611
5605
|
var SingleThemeColorConfigSchema = z.object({
|
|
5612
5606
|
dark: DarkColorSchema,
|
|
5613
5607
|
light: LightColorSchema,
|
|
5614
|
-
|
|
5615
|
-
secondary: SecondaryColorSchema,
|
|
5616
|
-
tertiary: TertiaryColorSchema,
|
|
5608
|
+
brand: BrandColorSchema,
|
|
5617
5609
|
accent: AccentColorSchema,
|
|
5618
5610
|
success: SuccessColorSchema,
|
|
5619
5611
|
info: InfoColorSchema,
|
|
@@ -5660,7 +5652,7 @@ var StormConfigSchema = z.object({
|
|
|
5660
5652
|
runtimeVersion: z.string().trim().regex(
|
|
5661
5653
|
/^(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-]+)*))?$/
|
|
5662
5654
|
).default("1.0.0").describe("The global version of the Storm runtime"),
|
|
5663
|
-
packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("
|
|
5655
|
+
packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("pnpm").describe("The package manager used by the repository"),
|
|
5664
5656
|
timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
5665
5657
|
locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
5666
5658
|
logLevel: z.enum([
|
|
@@ -5688,17 +5680,26 @@ var StormConfigSchema = z.object({
|
|
|
5688
5680
|
|
|
5689
5681
|
// packages/config-tools/src/utilities/get-default-config.ts
|
|
5690
5682
|
var DEFAULT_COLOR_CONFIG = {
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5683
|
+
light: {
|
|
5684
|
+
background: "#f4f4f5",
|
|
5685
|
+
foreground: "#1d232a",
|
|
5686
|
+
brand: "#1fb2a6",
|
|
5687
|
+
accent: "#8250df",
|
|
5688
|
+
success: "#087f5b",
|
|
5689
|
+
info: "#0550ae",
|
|
5690
|
+
warning: "#e3b341",
|
|
5691
|
+
error: "#a40e26"
|
|
5692
|
+
},
|
|
5693
|
+
dark: {
|
|
5694
|
+
background: "#22272E",
|
|
5695
|
+
foreground: "#fcfcf5",
|
|
5696
|
+
brand: "#1fb2a6",
|
|
5697
|
+
accent: "#8256D0",
|
|
5698
|
+
success: "#087f5b",
|
|
5699
|
+
info: "#316DCA",
|
|
5700
|
+
warning: "#F3D371",
|
|
5701
|
+
error: "#d1242f"
|
|
5702
|
+
}
|
|
5702
5703
|
};
|
|
5703
5704
|
var DEFAULT_STORM_CONFIG = {
|
|
5704
5705
|
name: "storm",
|
|
@@ -5736,7 +5737,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
|
|
|
5736
5737
|
return (message) => {
|
|
5737
5738
|
console.error(
|
|
5738
5739
|
`
|
|
5739
|
-
${_chalk.bold.hex(colors.error ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#
|
|
5740
|
+
${_chalk.bold.hex(colors.error ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#7d1a1a").whiteBright(
|
|
5740
5741
|
" \u{1F480} Fatal "
|
|
5741
5742
|
)} ${_chalk.hex(colors.error ?? "#f85149")(formatLogMessage(message))}
|
|
5742
5743
|
`
|
|
@@ -5791,9 +5792,9 @@ ${_chalk.bold.hex(colors.info ?? "#58a6ff")(">")} ${_chalk.bold.bgHex(colors.inf
|
|
|
5791
5792
|
return (message) => {
|
|
5792
5793
|
console.debug(
|
|
5793
5794
|
`
|
|
5794
|
-
${_chalk.bold.hex(colors.
|
|
5795
|
+
${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
|
|
5795
5796
|
" \u{1F6E0} Debug "
|
|
5796
|
-
)} ${_chalk.hex(colors.
|
|
5797
|
+
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
5797
5798
|
`
|
|
5798
5799
|
);
|
|
5799
5800
|
};
|
|
@@ -5801,9 +5802,9 @@ ${_chalk.bold.hex(colors.primary ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.
|
|
|
5801
5802
|
return (message) => {
|
|
5802
5803
|
console.log(
|
|
5803
5804
|
`
|
|
5804
|
-
${_chalk.bold.hex(colors.
|
|
5805
|
+
${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
|
|
5805
5806
|
" \u2709 System "
|
|
5806
|
-
)} ${_chalk.hex(colors.
|
|
5807
|
+
)} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
|
|
5807
5808
|
`
|
|
5808
5809
|
);
|
|
5809
5810
|
};
|
|
@@ -5831,7 +5832,7 @@ var getStopwatch = (name) => {
|
|
|
5831
5832
|
};
|
|
5832
5833
|
};
|
|
5833
5834
|
var formatLogMessage = (message, prefix = "-") => {
|
|
5834
|
-
return typeof message === "string" ? message : typeof message === "object" ? `
|
|
5835
|
+
return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : typeof message === "object" ? `
|
|
5835
5836
|
${Object.keys(message).map(
|
|
5836
5837
|
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(message[key], `${prefix}-`) : message[key]}`
|
|
5837
5838
|
).join("\n")}` : message;
|