@storm-software/config-tools 1.42.0 → 1.44.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/config-tools",
3
- "version": "1.42.0",
3
+ "version": "1.44.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": {
@@ -5584,9 +5584,8 @@ var z = /* @__PURE__ */ Object.freeze({
5584
5584
  // packages/config/src/schema.ts
5585
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 Brand1ColorSchema = 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 Brand2ColorSchema = 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");
5589
- var Brand3ColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The third brand specific 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");
5590
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");
5591
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");
5592
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");
@@ -5595,9 +5594,8 @@ var FatalColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,
5595
5594
  var DarkThemeColorConfigSchema = z.object({
5596
5595
  foreground: LightColorSchema,
5597
5596
  background: DarkColorSchema,
5598
- brand1: Brand1ColorSchema,
5599
- brand2: Brand2ColorSchema,
5600
- brand3: Brand3ColorSchema,
5597
+ brand: BrandColorSchema,
5598
+ accent: AccentColorSchema,
5601
5599
  success: SuccessColorSchema,
5602
5600
  info: InfoColorSchema,
5603
5601
  warning: WarningColorSchema,
@@ -5607,9 +5605,8 @@ var DarkThemeColorConfigSchema = z.object({
5607
5605
  var LightThemeColorConfigSchema = z.object({
5608
5606
  foreground: DarkColorSchema,
5609
5607
  background: LightColorSchema,
5610
- brand1: Brand1ColorSchema,
5611
- brand2: Brand2ColorSchema,
5612
- brand3: Brand3ColorSchema,
5608
+ brand: BrandColorSchema,
5609
+ accent: AccentColorSchema,
5613
5610
  success: SuccessColorSchema,
5614
5611
  info: InfoColorSchema,
5615
5612
  warning: WarningColorSchema,
@@ -5623,9 +5620,8 @@ var MultiThemeColorConfigSchema = z.object({
5623
5620
  var SingleThemeColorConfigSchema = z.object({
5624
5621
  dark: DarkColorSchema,
5625
5622
  light: LightColorSchema,
5626
- brand1: Brand1ColorSchema,
5627
- brand2: Brand2ColorSchema,
5628
- brand3: Brand3ColorSchema,
5623
+ brand: BrandColorSchema,
5624
+ accent: AccentColorSchema,
5629
5625
  success: SuccessColorSchema,
5630
5626
  info: InfoColorSchema,
5631
5627
  warning: WarningColorSchema,
@@ -5671,7 +5667,7 @@ var StormConfigSchema = z.object({
5671
5667
  runtimeVersion: z.string().trim().regex(
5672
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-]+)*))?$/
5673
5669
  ).default("1.0.0").describe("The global version of the Storm runtime"),
5674
- packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe("The package manager used by the repository"),
5670
+ packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("pnpm").describe("The package manager used by the repository"),
5675
5671
  timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
5676
5672
  locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
5677
5673
  logLevel: z.enum([
@@ -5699,16 +5695,26 @@ var StormConfigSchema = z.object({
5699
5695
 
5700
5696
  // packages/config-tools/src/utilities/get-default-config.ts
5701
5697
  var DEFAULT_COLOR_CONFIG = {
5702
- dark: "#1d232a",
5703
- light: "#f4f4f5",
5704
- brand1: "#1fb2a6",
5705
- brand2: "#6366f1",
5706
- brand3: "#ec5990",
5707
- success: "#087f5b",
5708
- info: "#0ea5e9",
5709
- warning: "#fcc419",
5710
- error: "#990000",
5711
- fatal: "#7d1a1a"
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
+ }
5712
5718
  };
5713
5719
  var DEFAULT_STORM_CONFIG = {
5714
5720
  name: "storm",
@@ -5746,7 +5752,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
5746
5752
  return (message) => {
5747
5753
  console.error(
5748
5754
  `
5749
- ${_chalk.bold.hex(colors.error ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#b62324").whiteBright(
5755
+ ${_chalk.bold.hex(colors.error ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#7d1a1a").whiteBright(
5750
5756
  " \u{1F480} Fatal "
5751
5757
  )} ${_chalk.hex(colors.error ?? "#f85149")(formatLogMessage(message))}
5752
5758
  `
@@ -5801,9 +5807,9 @@ ${_chalk.bold.hex(colors.info ?? "#58a6ff")(">")} ${_chalk.bold.bgHex(colors.inf
5801
5807
  return (message) => {
5802
5808
  console.debug(
5803
5809
  `
5804
- ${_chalk.bold.hex(colors.brand1 ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand1 ?? "#1fb2a6").whiteBright(
5810
+ ${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
5805
5811
  " \u{1F6E0} Debug "
5806
- )} ${_chalk.hex(colors.brand1 ?? "#1fb2a6")(formatLogMessage(message))}
5812
+ )} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
5807
5813
  `
5808
5814
  );
5809
5815
  };
@@ -5811,9 +5817,9 @@ ${_chalk.bold.hex(colors.brand1 ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.b
5811
5817
  return (message) => {
5812
5818
  console.log(
5813
5819
  `
5814
- ${_chalk.bold.hex(colors.brand1 ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand1 ?? "#1fb2a6").whiteBright(
5820
+ ${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
5815
5821
  " \u2709 System "
5816
- )} ${_chalk.hex(colors.brand1 ?? "#1fb2a6")(formatLogMessage(message))}
5822
+ )} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
5817
5823
  `
5818
5824
  );
5819
5825
  };
@@ -5841,7 +5847,7 @@ var getStopwatch = (name) => {
5841
5847
  };
5842
5848
  };
5843
5849
  var formatLogMessage = (message, prefix = "-") => {
5844
- 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" ? `
5845
5851
  ${Object.keys(message).map(
5846
5852
  (key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(message[key], `${prefix}-`) : message[key]}`
5847
5853
  ).join("\n")}` : message;
@@ -5569,9 +5569,8 @@ var z = /* @__PURE__ */ Object.freeze({
5569
5569
  // packages/config/src/schema.ts
5570
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 Brand1ColorSchema = 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 Brand2ColorSchema = 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");
5574
- var Brand3ColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7).optional().describe("The third brand specific 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");
5575
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");
5576
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");
5577
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");
@@ -5580,9 +5579,8 @@ var FatalColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,
5580
5579
  var DarkThemeColorConfigSchema = z.object({
5581
5580
  foreground: LightColorSchema,
5582
5581
  background: DarkColorSchema,
5583
- brand1: Brand1ColorSchema,
5584
- brand2: Brand2ColorSchema,
5585
- brand3: Brand3ColorSchema,
5582
+ brand: BrandColorSchema,
5583
+ accent: AccentColorSchema,
5586
5584
  success: SuccessColorSchema,
5587
5585
  info: InfoColorSchema,
5588
5586
  warning: WarningColorSchema,
@@ -5592,9 +5590,8 @@ var DarkThemeColorConfigSchema = z.object({
5592
5590
  var LightThemeColorConfigSchema = z.object({
5593
5591
  foreground: DarkColorSchema,
5594
5592
  background: LightColorSchema,
5595
- brand1: Brand1ColorSchema,
5596
- brand2: Brand2ColorSchema,
5597
- brand3: Brand3ColorSchema,
5593
+ brand: BrandColorSchema,
5594
+ accent: AccentColorSchema,
5598
5595
  success: SuccessColorSchema,
5599
5596
  info: InfoColorSchema,
5600
5597
  warning: WarningColorSchema,
@@ -5608,9 +5605,8 @@ var MultiThemeColorConfigSchema = z.object({
5608
5605
  var SingleThemeColorConfigSchema = z.object({
5609
5606
  dark: DarkColorSchema,
5610
5607
  light: LightColorSchema,
5611
- brand1: Brand1ColorSchema,
5612
- brand2: Brand2ColorSchema,
5613
- brand3: Brand3ColorSchema,
5608
+ brand: BrandColorSchema,
5609
+ accent: AccentColorSchema,
5614
5610
  success: SuccessColorSchema,
5615
5611
  info: InfoColorSchema,
5616
5612
  warning: WarningColorSchema,
@@ -5656,7 +5652,7 @@ var StormConfigSchema = z.object({
5656
5652
  runtimeVersion: z.string().trim().regex(
5657
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-]+)*))?$/
5658
5654
  ).default("1.0.0").describe("The global version of the Storm runtime"),
5659
- packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe("The package manager used by the repository"),
5655
+ packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("pnpm").describe("The package manager used by the repository"),
5660
5656
  timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
5661
5657
  locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
5662
5658
  logLevel: z.enum([
@@ -5684,16 +5680,26 @@ var StormConfigSchema = z.object({
5684
5680
 
5685
5681
  // packages/config-tools/src/utilities/get-default-config.ts
5686
5682
  var DEFAULT_COLOR_CONFIG = {
5687
- dark: "#1d232a",
5688
- light: "#f4f4f5",
5689
- brand1: "#1fb2a6",
5690
- brand2: "#6366f1",
5691
- brand3: "#ec5990",
5692
- success: "#087f5b",
5693
- info: "#0ea5e9",
5694
- warning: "#fcc419",
5695
- error: "#990000",
5696
- fatal: "#7d1a1a"
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
+ }
5697
5703
  };
5698
5704
  var DEFAULT_STORM_CONFIG = {
5699
5705
  name: "storm",
@@ -5731,7 +5737,7 @@ var getLogFn = (logLevel = LogLevel.INFO, config = {}) => {
5731
5737
  return (message) => {
5732
5738
  console.error(
5733
5739
  `
5734
- ${_chalk.bold.hex(colors.error ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#b62324").whiteBright(
5740
+ ${_chalk.bold.hex(colors.error ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#7d1a1a").whiteBright(
5735
5741
  " \u{1F480} Fatal "
5736
5742
  )} ${_chalk.hex(colors.error ?? "#f85149")(formatLogMessage(message))}
5737
5743
  `
@@ -5786,9 +5792,9 @@ ${_chalk.bold.hex(colors.info ?? "#58a6ff")(">")} ${_chalk.bold.bgHex(colors.inf
5786
5792
  return (message) => {
5787
5793
  console.debug(
5788
5794
  `
5789
- ${_chalk.bold.hex(colors.brand1 ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand1 ?? "#1fb2a6").whiteBright(
5795
+ ${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
5790
5796
  " \u{1F6E0} Debug "
5791
- )} ${_chalk.hex(colors.brand1 ?? "#1fb2a6")(formatLogMessage(message))}
5797
+ )} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
5792
5798
  `
5793
5799
  );
5794
5800
  };
@@ -5796,9 +5802,9 @@ ${_chalk.bold.hex(colors.brand1 ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.b
5796
5802
  return (message) => {
5797
5803
  console.log(
5798
5804
  `
5799
- ${_chalk.bold.hex(colors.brand1 ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand1 ?? "#1fb2a6").whiteBright(
5805
+ ${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(
5800
5806
  " \u2709 System "
5801
- )} ${_chalk.hex(colors.brand1 ?? "#1fb2a6")(formatLogMessage(message))}
5807
+ )} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
5802
5808
  `
5803
5809
  );
5804
5810
  };
@@ -5826,7 +5832,7 @@ var getStopwatch = (name) => {
5826
5832
  };
5827
5833
  };
5828
5834
  var formatLogMessage = (message, prefix = "-") => {
5829
- 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" ? `
5830
5836
  ${Object.keys(message).map(
5831
5837
  (key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(message[key], `${prefix}-`) : message[key]}`
5832
5838
  ).join("\n")}` : message;