@storm-software/tsup 0.2.216 → 0.2.218

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/dist/index.cjs CHANGED
@@ -2705,7 +2705,7 @@ init_cjs_shims();
2705
2705
  // ../config-tools/dist/logger/console.js
2706
2706
  init_cjs_shims();
2707
2707
 
2708
- // ../config-tools/dist/chunk-ZG3KCER4.js
2708
+ // ../config-tools/dist/chunk-EN32U2DR.js
2709
2709
  init_cjs_shims();
2710
2710
 
2711
2711
  // ../config-tools/dist/chunk-5DQF4GNF.js
@@ -2749,54 +2749,14 @@ var DEFAULT_COLOR_CONFIG = {
2749
2749
  }
2750
2750
  };
2751
2751
 
2752
- // ../config-tools/dist/chunk-HVVJHTFS.js
2752
+ // ../config-tools/dist/chunk-JZAYHDV3.js
2753
2753
  init_cjs_shims();
2754
- var import_chalk = __toESM(require("chalk"), 1);
2755
- var chalkDefault = {
2756
- hex: (_3) => (message) => message,
2757
- bgHex: (_3) => ({
2758
- whiteBright: (message) => message,
2759
- white: (message) => message
2760
- }),
2761
- white: (message) => message,
2762
- whiteBright: (message) => message,
2763
- gray: (message) => message,
2764
- bold: {
2765
- hex: (_3) => (message) => message,
2766
- bgHex: (_3) => ({
2767
- whiteBright: (message) => message,
2768
- white: (message) => message
2769
- }),
2770
- whiteBright: (message) => message,
2771
- white: (message) => message
2772
- },
2773
- dim: {
2774
- hex: (_3) => (message) => message,
2775
- gray: (message) => message
2776
- }
2777
- };
2778
- var getChalk = () => {
2779
- let _chalk = import_chalk.default;
2780
- if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright || !_chalk?.white) {
2781
- _chalk = chalkDefault;
2782
- }
2783
- return _chalk;
2754
+ var formatTimestamp = (fullDateTime = false, date = /* @__PURE__ */ new Date()) => {
2755
+ return fullDateTime ? `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` : `${date.toLocaleTimeString()}`;
2784
2756
  };
2785
2757
 
2786
- // ../config-tools/dist/chunk-ZFNAUMQS.js
2787
- init_cjs_shims();
2788
-
2789
- // ../config-tools/dist/chunk-G2MK47WL.js
2758
+ // ../config-tools/dist/chunk-SXPH7ILL.js
2790
2759
  init_cjs_shims();
2791
- function isUnicodeSupported() {
2792
- if (process.platform !== "win32") {
2793
- return process.env.TERM !== "linux";
2794
- }
2795
- return Boolean(process.env.WT_SESSION) || // Windows Terminal
2796
- Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
2797
- process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
2798
- process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERM === "rxvt-unicode" || process.env.TERM === "rxvt-unicode-256color" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
2799
- }
2800
2760
 
2801
2761
  // ../config-tools/dist/chunk-RALMUN5C.js
2802
2762
  init_cjs_shims();
@@ -2825,28 +2785,7 @@ var LogLevelLabel = {
2825
2785
  ALL: "all"
2826
2786
  };
2827
2787
 
2828
- // ../config-tools/dist/chunk-ZFNAUMQS.js
2829
- var useIcon = (c3, fallback) => isUnicodeSupported() ? c3 : fallback;
2830
- var CONSOLE_ICONS = {
2831
- [LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
2832
- [LogLevelLabel.FATAL]: useIcon("\u{1F571}", "\xD7"),
2833
- [LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
2834
- [LogLevelLabel.INFO]: useIcon("\u2139", "i"),
2835
- [LogLevelLabel.PERFORMANCE]: useIcon("\u23F1", "\u23F1"),
2836
- [LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
2837
- [LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
2838
- [LogLevelLabel.TRACE]: useIcon("\u2699", "T"),
2839
- [LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
2840
- };
2841
-
2842
- // ../config-tools/dist/chunk-JZAYHDV3.js
2843
- init_cjs_shims();
2844
- var formatTimestamp = (fullDateTime = false, date = /* @__PURE__ */ new Date()) => {
2845
- return fullDateTime ? `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` : `${date.toLocaleTimeString()}`;
2846
- };
2847
-
2848
2788
  // ../config-tools/dist/chunk-SXPH7ILL.js
2849
- init_cjs_shims();
2850
2789
  var getLogLevel = (label) => {
2851
2790
  switch (label) {
2852
2791
  case "all":
@@ -2902,7 +2841,70 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
2902
2841
  return LogLevelLabel.INFO;
2903
2842
  };
2904
2843
 
2905
- // ../config-tools/dist/chunk-ZG3KCER4.js
2844
+ // ../config-tools/dist/chunk-HVVJHTFS.js
2845
+ init_cjs_shims();
2846
+ var import_chalk = __toESM(require("chalk"), 1);
2847
+ var chalkDefault = {
2848
+ hex: (_3) => (message) => message,
2849
+ bgHex: (_3) => ({
2850
+ whiteBright: (message) => message,
2851
+ white: (message) => message
2852
+ }),
2853
+ white: (message) => message,
2854
+ whiteBright: (message) => message,
2855
+ gray: (message) => message,
2856
+ bold: {
2857
+ hex: (_3) => (message) => message,
2858
+ bgHex: (_3) => ({
2859
+ whiteBright: (message) => message,
2860
+ white: (message) => message
2861
+ }),
2862
+ whiteBright: (message) => message,
2863
+ white: (message) => message
2864
+ },
2865
+ dim: {
2866
+ hex: (_3) => (message) => message,
2867
+ gray: (message) => message
2868
+ }
2869
+ };
2870
+ var getChalk = () => {
2871
+ let _chalk = import_chalk.default;
2872
+ if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright || !_chalk?.white) {
2873
+ _chalk = chalkDefault;
2874
+ }
2875
+ return _chalk;
2876
+ };
2877
+
2878
+ // ../config-tools/dist/chunk-ZFNAUMQS.js
2879
+ init_cjs_shims();
2880
+
2881
+ // ../config-tools/dist/chunk-G2MK47WL.js
2882
+ init_cjs_shims();
2883
+ function isUnicodeSupported() {
2884
+ if (process.platform !== "win32") {
2885
+ return process.env.TERM !== "linux";
2886
+ }
2887
+ return Boolean(process.env.WT_SESSION) || // Windows Terminal
2888
+ Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
2889
+ process.env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
2890
+ process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERM === "rxvt-unicode" || process.env.TERM === "rxvt-unicode-256color" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
2891
+ }
2892
+
2893
+ // ../config-tools/dist/chunk-ZFNAUMQS.js
2894
+ var useIcon = (c3, fallback) => isUnicodeSupported() ? c3 : fallback;
2895
+ var CONSOLE_ICONS = {
2896
+ [LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
2897
+ [LogLevelLabel.FATAL]: useIcon("\u{1F571}", "\xD7"),
2898
+ [LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
2899
+ [LogLevelLabel.INFO]: useIcon("\u2139", "i"),
2900
+ [LogLevelLabel.PERFORMANCE]: useIcon("\u23F1", "\u23F1"),
2901
+ [LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
2902
+ [LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
2903
+ [LogLevelLabel.TRACE]: useIcon("\u2699", "T"),
2904
+ [LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
2905
+ };
2906
+
2907
+ // ../config-tools/dist/chunk-EN32U2DR.js
2906
2908
  var daysInYear = 365.2425;
2907
2909
  var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
2908
2910
  var minTime = -maxTime;
@@ -4541,40 +4543,14 @@ var import_path = require("path");
4541
4543
  // ../config-tools/dist/get-config.js
4542
4544
  init_cjs_shims();
4543
4545
 
4544
- // ../config-tools/dist/chunk-RL5DRDS6.js
4545
- init_cjs_shims();
4546
-
4547
- // ../config-tools/dist/chunk-6VD3CYGA.js
4548
- init_cjs_shims();
4549
-
4550
- // ../config-tools/dist/chunk-KVJGV2WN.js
4546
+ // ../config-tools/dist/chunk-L6MSRILP.js
4551
4547
  init_cjs_shims();
4552
4548
 
4553
- // ../config-tools/dist/chunk-LF3SAK2O.js
4549
+ // ../config-tools/dist/chunk-IASBTY6Z.js
4554
4550
  init_cjs_shims();
4555
4551
 
4556
- // ../config-tools/dist/chunk-RUKM6FCF.js
4552
+ // ../config-tools/dist/chunk-SDSQ2HHF.js
4557
4553
  init_cjs_shims();
4558
- var import_node_fs7 = require("fs");
4559
- var import_node_path4 = require("path");
4560
- var MAX_PATH_SEARCH_DEPTH = 30;
4561
- var depth = 0;
4562
- function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
4563
- const _startPath = startPath ?? process.cwd();
4564
- if (endDirectoryNames.some(
4565
- (endDirName) => (0, import_node_fs7.existsSync)((0, import_node_path4.join)(_startPath, endDirName))
4566
- )) {
4567
- return _startPath;
4568
- }
4569
- if (endFileNames.some((endFileName) => (0, import_node_fs7.existsSync)((0, import_node_path4.join)(_startPath, endFileName)))) {
4570
- return _startPath;
4571
- }
4572
- if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
4573
- const parent = (0, import_node_path4.join)(_startPath, "..");
4574
- return findFolderUp(parent, endFileNames, endDirectoryNames);
4575
- }
4576
- return void 0;
4577
- }
4578
4554
 
4579
4555
  // ../config-tools/dist/chunk-V3GMJ4TX.js
4580
4556
  init_cjs_shims();
@@ -4702,477 +4678,33 @@ var isAbsolute = function(p3) {
4702
4678
  return _IS_ABSOLUTE_RE.test(p3);
4703
4679
  };
4704
4680
 
4705
- // ../config-tools/dist/chunk-LF3SAK2O.js
4706
- var rootFiles = [
4707
- "storm-workspace.json",
4708
- "storm-workspace.yaml",
4709
- "storm-workspace.yml",
4710
- "storm-workspace.js",
4711
- "storm-workspace.ts",
4712
- ".storm-workspace.json",
4713
- ".storm-workspace.yaml",
4714
- ".storm-workspace.yml",
4715
- ".storm-workspace.js",
4716
- ".storm-workspace.ts",
4717
- "lerna.json",
4718
- "nx.json",
4719
- "turbo.json",
4720
- "npm-workspace.json",
4721
- "yarn-workspace.json",
4722
- "pnpm-workspace.json",
4723
- "npm-workspace.yaml",
4724
- "yarn-workspace.yaml",
4725
- "pnpm-workspace.yaml",
4726
- "npm-workspace.yml",
4727
- "yarn-workspace.yml",
4728
- "pnpm-workspace.yml",
4729
- "npm-lock.json",
4730
- "yarn-lock.json",
4731
- "pnpm-lock.json",
4732
- "npm-lock.yaml",
4733
- "yarn-lock.yaml",
4734
- "pnpm-lock.yaml",
4735
- "npm-lock.yml",
4736
- "yarn-lock.yml",
4737
- "pnpm-lock.yml",
4738
- "bun.lockb"
4739
- ];
4740
- var rootDirectories = [
4741
- ".storm-workspace",
4742
- ".nx",
4743
- ".git",
4744
- ".github",
4745
- ".vscode",
4746
- ".verdaccio"
4747
- ];
4748
- function findWorkspaceRootSafe(pathInsideMonorepo) {
4749
- if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
4750
- return correctPaths2(
4751
- process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
4752
- );
4681
+ // ../config-tools/dist/chunk-SDSQ2HHF.js
4682
+ var setExtensionEnv = (extensionName, extension) => {
4683
+ for (const key of Object.keys(extension ?? {})) {
4684
+ if (extension[key]) {
4685
+ const result = key?.replace(
4686
+ /([A-Z])+/g,
4687
+ (input) => input ? input[0]?.toUpperCase() + input.slice(1) : ""
4688
+ ).split(/(?=[A-Z])|[.\-\s_]/).map((x2) => x2.toLowerCase()) ?? [];
4689
+ let extensionKey;
4690
+ if (result.length === 0) {
4691
+ return;
4692
+ }
4693
+ if (result.length === 1) {
4694
+ extensionKey = result[0]?.toUpperCase() ?? "";
4695
+ } else {
4696
+ extensionKey = result.reduce((ret, part) => {
4697
+ return `${ret}_${part.toLowerCase()}`;
4698
+ });
4699
+ }
4700
+ process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
4701
+ }
4753
4702
  }
4754
- return correctPaths2(
4755
- findFolderUp(
4756
- pathInsideMonorepo ?? process.cwd(),
4757
- rootFiles,
4758
- rootDirectories
4759
- )
4760
- );
4761
- }
4762
- function findWorkspaceRoot2(pathInsideMonorepo) {
4763
- const result = findWorkspaceRootSafe(pathInsideMonorepo);
4764
- if (!result) {
4765
- throw new Error(
4766
- `Cannot find workspace root upwards from known path. Files search list includes:
4767
- ${rootFiles.join(
4768
- "\n"
4769
- )}
4770
- Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
4771
- );
4772
- }
4773
- return result;
4774
- }
4775
-
4776
- // ../config-tools/dist/chunk-KVJGV2WN.js
4777
- var import_c122 = require("c12");
4778
- var import_defu3 = __toESM(require("defu"), 1);
4779
- var getConfigFileByName = async (fileName, filePath, options2 = {}) => {
4780
- const workspacePath = filePath || findWorkspaceRoot2(filePath);
4781
- const configs = await Promise.all([
4782
- (0, import_c122.loadConfig)({
4783
- cwd: workspacePath,
4784
- packageJson: true,
4785
- name: fileName,
4786
- envName: fileName?.toUpperCase(),
4787
- jitiOptions: {
4788
- debug: false,
4789
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths2(
4790
- process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
4791
- "jiti"
4792
- )
4793
- },
4794
- ...options2
4795
- }),
4796
- (0, import_c122.loadConfig)({
4797
- cwd: workspacePath,
4798
- packageJson: true,
4799
- name: fileName,
4800
- envName: fileName?.toUpperCase(),
4801
- jitiOptions: {
4802
- debug: false,
4803
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths2(
4804
- process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
4805
- "jiti"
4806
- )
4807
- },
4808
- configFile: fileName,
4809
- ...options2
4810
- })
4811
- ]);
4812
- return (0, import_defu3.default)(configs[0] ?? {}, configs[1] ?? {});
4813
- };
4814
- var getConfigFile = async (filePath, additionalFileNames = []) => {
4815
- const workspacePath = filePath ? filePath : findWorkspaceRoot2(filePath);
4816
- const result = await getConfigFileByName("storm-workspace", workspacePath);
4817
- let config = result.config;
4818
- const configFile = result.configFile;
4819
- if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
4820
- writeTrace(
4821
- `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
4822
- {
4823
- logLevel: "all"
4824
- }
4825
- );
4826
- }
4827
- if (additionalFileNames && additionalFileNames.length > 0) {
4828
- const results = await Promise.all(
4829
- additionalFileNames.map(
4830
- (fileName) => getConfigFileByName(fileName, workspacePath)
4831
- )
4832
- );
4833
- for (const result2 of results) {
4834
- if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
4835
- if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
4836
- writeTrace(
4837
- `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
4838
- {
4839
- logLevel: "all"
4840
- }
4841
- );
4842
- }
4843
- config = (0, import_defu3.default)(result2.config ?? {}, config ?? {});
4844
- }
4845
- }
4846
- }
4847
- if (!config || Object.keys(config).length === 0) {
4848
- return void 0;
4849
- }
4850
- config.configFile = configFile;
4851
- return config;
4852
- };
4853
-
4854
- // ../config-tools/dist/chunk-RGET2UQV.js
4855
- init_cjs_shims();
4856
-
4857
- // ../config/dist/index.js
4858
- init_cjs_shims();
4859
-
4860
- // ../config/dist/chunk-5QIMO5EY.js
4861
- init_cjs_shims();
4862
-
4863
- // ../config/dist/chunk-HPWJK4AX.js
4864
- init_cjs_shims();
4865
-
4866
- // ../config/dist/chunk-TYDRIJER.js
4867
- init_cjs_shims();
4868
- var s = "https://docs.stormsoftware.com";
4869
- var r = "https://stormsoftware.com";
4870
- var t = "https://stormsoftware.com/contact";
4871
- var a = "https://stormsoftware.com/license";
4872
- var i = "Apache-2.0";
4873
- var o = "https://discord.gg/MQ6YVzakM5";
4874
- var e = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
4875
- var E = `
4876
- Storm Software is an open source software development organization with the mission is to make software development more accessible. Our ideal future is one where anyone can create software without years of prior development experience serving as a barrier to entry. We hope to achieve this via LLMs, Generative AI, and intuitive, high-level data modeling/programming languages.
4877
-
4878
- Join us on [Discord](${o}) to chat with the team, receive release notifications, ask questions, and get involved.
4879
-
4880
- If this sounds interesting, and you would like to help us in creating the next generation of development tools, please reach out on our [website](${t}) or join our [Slack](${e}) channel!
4881
- `;
4882
- var S = "tools/errors/codes.json";
4883
- var A = "The workspace's banner image";
4884
-
4885
- // ../config/dist/chunk-HPWJK4AX.js
4886
- var e2 = __toESM(require("zod/v4/mini"), 1);
4887
- var o2 = e2.registry();
4888
- var t2 = e2.string().check(e2.length(7), e2.toLowerCase(), e2.regex(/^#([0-9a-f]{3}){1,2}$/i), e2.trim());
4889
- o2.add(t2, { description: "A base schema for describing the format of colors" });
4890
- var a2 = e2._default(t2, "#151718");
4891
- o2.add(a2, { description: "The dark background color of the workspace" });
4892
- var c = e2._default(t2, "#cbd5e1");
4893
- o2.add(c, { description: "The light background color of the workspace" });
4894
- var i2 = e2._default(t2, "#1fb2a6");
4895
- o2.add(i2, { description: "The primary brand specific color of the workspace" });
4896
- var s2 = e2.optional(t2);
4897
- o2.add(s2, { description: "The alternate brand specific color of the workspace" });
4898
- var n = e2.optional(t2);
4899
- o2.add(n, { description: "The secondary brand specific color of the workspace" });
4900
- var d = e2._default(t2, "#3fa6ff");
4901
- o2.add(d, { description: "The color used to display hyperlink text" });
4902
- var p = e2._default(t2, "#818cf8");
4903
- o2.add(p, { description: "The second brand specific color of the workspace" });
4904
- var h = e2._default(t2, "#45b27e");
4905
- o2.add(h, { description: "The success color of the workspace" });
4906
- var l = e2._default(t2, "#38bdf8");
4907
- o2.add(l, { description: "The informational color of the workspace" });
4908
- var m = e2._default(t2, "#8afafc");
4909
- o2.add(m, { description: "The debug color of the workspace" });
4910
- var z2 = e2._default(t2, "#f3d371");
4911
- o2.add(z2, { description: "The warning color of the workspace" });
4912
- var g = e2._default(t2, "#d8314a");
4913
- o2.add(g, { description: "The danger color of the workspace" });
4914
- var f = e2.optional(t2);
4915
- o2.add(f, { description: "The fatal color of the workspace" });
4916
- var u = e2._default(t2, "#80fd74");
4917
- o2.add(u, { description: "The performance color of the workspace" });
4918
- var k = e2._default(t2, "#4ade80");
4919
- o2.add(k, { description: "The positive number color of the workspace" });
4920
- var w = e2._default(t2, "#ef4444");
4921
- o2.add(w, { description: "The negative number color of the workspace" });
4922
- var S2 = e2.optional(e2.array(t2));
4923
- o2.add(S2, { description: "The color stops for the base gradient color pattern used in the workspace" });
4924
- var Re = e2.object({ foreground: c, background: a2, brand: i2, alternate: s2, accent: n, link: d, help: p, success: h, info: l, debug: m, warning: z2, danger: g, fatal: f, performance: u, positive: k, negative: w, gradient: S2 });
4925
- var Ue = e2.object({ foreground: a2, background: c, brand: i2, alternate: s2, accent: n, link: d, help: p, success: h, info: l, debug: m, warning: z2, danger: g, fatal: f, performance: u, positive: k, negative: w, gradient: S2 });
4926
- var De = e2.object({ dark: Re, light: Ue });
4927
- var Be = e2.object({ dark: a2, light: c, brand: i2, alternate: s2, accent: n, link: d, help: p, success: h, info: l, debug: m, warning: z2, danger: g, fatal: f, performance: u, positive: k, negative: w, gradient: S2 });
4928
- var r2 = e2.optional(e2.url());
4929
- o2.add(r2, { description: "A remote registry URL used to publish distributable packages" });
4930
- var y = e2._default(e2.object({ github: r2, npm: r2, cargo: r2, cyclone: r2, container: r2 }), {});
4931
- o2.add(y, { description: "A list of remote registry URLs used by Storm Software" });
4932
- var b = e2.union([Be, De]);
4933
- o2.add(b, { description: "Colors used for various workspace elements" });
4934
- var C = e2.record(e2.union([e2.union([e2.literal("base"), e2.string()]), e2.string()]), b);
4935
- o2.add(C, { description: "Storm theme config values used for styling various package elements" });
4936
- var _ = e2.optional(e2.union([e2.string().check(e2.trim()), e2.array(e2.string().check(e2.trim()))]));
4937
- o2.add(_, { description: "The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration." });
4938
- var L = e2.string().check(e2.trim());
4939
- o2.add(L, { description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)" });
4940
- var j = e2.string().check(e2.trim());
4941
- o2.add(j, { description: "The email of the workspace bot" });
4942
- var A2 = e2.object({ name: L, email: j });
4943
- o2.add(A2, { description: "The workspace's bot user's config used to automated various operations tasks" });
4944
- var R = e2.optional(e2.string().check(e2.trim(), e2.url()));
4945
- o2.add(R, { description: "A URL to a banner image used to display the workspace's release" });
4946
- var U = e2._default(e2.string().check(e2.trim()), A);
4947
- o2.add(U, { description: "The alt text for the workspace's release banner image" });
4948
- var D = e2.object({ url: R, alt: U });
4949
- o2.add(D, { description: "The workspace's banner image used during the release process" });
4950
- var B = e2.optional(e2.string().check(e2.trim()));
4951
- o2.add(B, { description: "A header message appended to the start of the workspace's release notes" });
4952
- var F = e2.optional(e2.string().check(e2.trim()));
4953
- o2.add(F, { description: "A footer message appended to the end of the workspace's release notes" });
4954
- var N = e2.object({ banner: e2.union([D, e2.string().check(e2.trim(), e2.url())]), header: B, footer: F });
4955
- o2.add(N, { description: "The workspace's release config used during the release process" });
4956
- var E2 = e2.optional(e2.string().check(e2.trim()));
4957
- o2.add(E2, { description: "A Twitter/X account associated with the organization/project" });
4958
- var M = e2.optional(e2.string().check(e2.trim()));
4959
- o2.add(M, { description: "A Discord account associated with the organization/project" });
4960
- var O = e2.optional(e2.string().check(e2.trim()));
4961
- o2.add(O, { description: "A Telegram account associated with the organization/project" });
4962
- var I = e2.optional(e2.string().check(e2.trim()));
4963
- o2.add(I, { description: "A Slack account associated with the organization/project" });
4964
- var G = e2.optional(e2.string().check(e2.trim()));
4965
- o2.add(G, { description: "A Medium account associated with the organization/project" });
4966
- var H = e2.optional(e2.string().check(e2.trim()));
4967
- o2.add(H, { description: "A GitHub account associated with the organization/project" });
4968
- var J = e2.object({ twitter: E2, discord: M, telegram: O, slack: I, medium: G, github: H });
4969
- o2.add(J, { description: "The workspace's account config used to store various social media links" });
4970
- var W = e2.optional(e2.string().check(e2.trim()));
4971
- o2.add(W, { description: "The directory used to store the environment's cached file data" });
4972
- var P = e2.optional(e2.string().check(e2.trim()));
4973
- o2.add(P, { description: "The directory used to store the environment's data files" });
4974
- var $ = e2.optional(e2.string().check(e2.trim()));
4975
- o2.add($, { description: "The directory used to store the environment's configuration files" });
4976
- var V = e2.optional(e2.string().check(e2.trim()));
4977
- o2.add(V, { description: "The directory used to store the environment's temp files" });
4978
- var X = e2.optional(e2.string().check(e2.trim()));
4979
- o2.add(X, { description: "The directory used to store the environment's log files" });
4980
- var Y = e2._default(e2.string().check(e2.trim()), "dist");
4981
- o2.add(Y, { description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)" });
4982
- var q = e2.object({ cache: W, data: P, config: $, temp: V, log: X, build: Y });
4983
- o2.add(q, { description: "Various directories used by the workspace to store data, cache, and configuration files" });
4984
- var K = e2._default(e2.enum(["minimal", "monorepo"]), "monorepo");
4985
- o2.add(K, { description: "The variant of the workspace. This can be used to enable or disable certain features or configurations." });
4986
- var Q = e2._default(e2.string().check(e2.trim()), S);
4987
- o2.add(Q, { description: "The path to the workspace's error codes JSON file" });
4988
- var Z = e2.optional(e2.url());
4989
- o2.add(Z, { description: "A URL to a page that looks up the workspace's error messages given a specific error code" });
4990
- var ee = e2.object({ codesFile: Q, url: Z });
4991
- o2.add(ee, { description: "The workspace's error config used when creating error details during a system error" });
4992
- var oe = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
4993
- o2.add(oe, { description: "The name of the organization" });
4994
- var te = e2.optional(e2.string().check(e2.trim()));
4995
- o2.add(te, { description: "A description of the organization" });
4996
- var re = e2.optional(e2.url());
4997
- o2.add(re, { description: "A URL to the organization's logo image" });
4998
- var ae = e2.optional(e2.url());
4999
- o2.add(ae, { description: "A URL to the organization's icon image" });
5000
- var ce = e2.optional(e2.url());
5001
- o2.add(ce, { description: "A URL to a page that provides more information about the organization" });
5002
- var ie = e2.object({ name: oe, description: te, logo: re, icon: ae, url: ce });
5003
- o2.add(ie, { description: "The workspace's organization details" });
5004
- var se = e2._default(e2.string().check(e2.trim(), e2.toLowerCase()), "https://public.storm-cdn.com/schemas/storm-workspace.schema.json");
5005
- o2.add(se, { description: "The URL or file path to the JSON schema file that describes the Storm configuration file" });
5006
- var ne = e2.string().check(e2.trim(), e2.toLowerCase());
5007
- o2.add(ne, { description: "The name of the workspace/project/service/package/scope using this configuration" });
5008
- var de = e2.string().check(e2.trim(), e2.toLowerCase());
5009
- o2.add(de, { description: "The namespace of the workspace/project/service/package/scope using this configuration" });
5010
- var pe = e2.union([ie, e2.string().check(e2.trim(), e2.toLowerCase())]);
5011
- o2.add(pe, { description: "The organization of the workspace. This can be a string or an object containing the organization's details" });
5012
- var he = e2.string().check(e2.trim(), e2.toLowerCase());
5013
- o2.add(he, { description: "The repo URL of the workspace (i.e. the GitHub repository URL)" });
5014
- var le = e2._default(e2.string().check(e2.trim()), "Apache-2.0");
5015
- o2.add(le, { description: "The license type of the package" });
5016
- var me = e2.optional(e2.url());
5017
- o2.add(me, { description: "The homepage of the workspace" });
5018
- var ze = e2.optional(e2.url());
5019
- o2.add(ze, { description: "The documentation site for the workspace" });
5020
- var ge = e2.optional(e2.url());
5021
- o2.add(ge, { description: "The development portal site for the workspace" });
5022
- var fe = e2.optional(e2.url());
5023
- o2.add(fe, { description: "The licensing site for the workspace" });
5024
- var ue = e2.optional(e2.url());
5025
- o2.add(ue, { description: "The contact site for the workspace" });
5026
- var ke = e2.optional(e2.url());
5027
- o2.add(ke, { description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value" });
5028
- var we = e2._default(e2.string().check(e2.trim(), e2.toLowerCase()), "main");
5029
- o2.add(we, { description: "The branch of the workspace" });
5030
- var Se = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
5031
- o2.add(Se, { description: "A tag specifying the version pre-release identifier" });
5032
- var be = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
5033
- o2.add(be, { description: "The owner of the package" });
5034
- var xe = e2._default(e2.enum(["development", "test", "production"]).check(e2.trim(), e2.toLowerCase()), "production");
5035
- o2.add(xe, { description: "The current runtime environment mode for the package" });
5036
- var Te = e2.string().check(e2.trim(), e2.toLowerCase());
5037
- o2.add(Te, { description: "The root directory of the workspace" });
5038
- var ve = e2._default(e2.boolean(), false);
5039
- o2.add(ve, { description: "Should all known types of workspace caching be skipped?" });
5040
- var ye = e2._default(e2.enum(["npm", "yarn", "pnpm", "bun"]), "npm");
5041
- o2.add(ye, { description: "The JavaScript/TypeScript package manager used by the repository" });
5042
- var Ce = e2._default(e2.string().check(e2.trim()), "America/New_York");
5043
- o2.add(Ce, { description: "The default timezone of the workspace" });
5044
- var _e = e2._default(e2.string().check(e2.trim()), "en-US");
5045
- o2.add(_e, { description: "The default locale of the workspace" });
5046
- var Le = e2._default(e2.enum(["silent", "fatal", "error", "warn", "success", "info", "performance", "debug", "trace", "all"]), "info");
5047
- o2.add(Le, { description: "The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)." });
5048
- var je = e2._default(e2.boolean(), true);
5049
- o2.add(je, { description: "Should the logging of the current Storm Workspace configuration be skipped?" });
5050
- var Ae = e2._default(e2.nullable(e2.string().check(e2.trim())), null);
5051
- o2.add(Ae, { description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace." });
5052
- var x = e2._default(e2.record(e2.string(), e2.any()), {});
5053
- o2.add(x, { description: "Configuration of each used extension" });
5054
- var Ne = e2.object({ $schema: se, extends: _, name: ne, variant: K, namespace: de, organization: pe, repository: he, license: le, homepage: me, docs: ze, portal: ge, licensing: fe, contact: ue, support: ke, branch: we, preid: Se, owner: be, bot: A2, release: N, socials: J, error: ee, mode: xe, workspaceRoot: Te, skipCache: ve, directories: q, packageManager: ye, timezone: Ce, locale: _e, logLevel: Le, skipConfigLogging: je, registry: y, configFile: Ae, colors: e2.union([b, C]), extensions: x });
5055
- o2.add(x, { description: "Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo." });
5056
-
5057
- // ../config/dist/chunk-YKRE3MWC.js
5058
- init_cjs_shims();
5059
- var e3 = ["dark", "light", "base", "brand", "alternate", "accent", "link", "success", "help", "info", "warning", "danger", "fatal", "performance", "positive", "negative"];
5060
-
5061
- // ../config-tools/dist/chunk-RGET2UQV.js
5062
- var import_node_fs8 = require("fs");
5063
- var import_promises5 = require("fs/promises");
5064
- var import_node_path5 = require("path");
5065
- async function getPackageJsonConfig(root) {
5066
- let license = i;
5067
- let homepage = void 0;
5068
- let support = void 0;
5069
- let name = void 0;
5070
- let namespace = void 0;
5071
- let repository = void 0;
5072
- const workspaceRoot = findWorkspaceRoot2(root);
5073
- if ((0, import_node_fs8.existsSync)((0, import_node_path5.join)(workspaceRoot, "package.json"))) {
5074
- const file = await (0, import_promises5.readFile)(
5075
- joinPaths2(workspaceRoot, "package.json"),
5076
- "utf8"
5077
- );
5078
- if (file) {
5079
- const packageJson = JSON.parse(file);
5080
- if (packageJson.name) {
5081
- name = packageJson.name;
5082
- }
5083
- if (packageJson.namespace) {
5084
- namespace = packageJson.namespace;
5085
- }
5086
- if (packageJson.repository) {
5087
- if (typeof packageJson.repository === "string") {
5088
- repository = packageJson.repository;
5089
- } else if (packageJson.repository.url) {
5090
- repository = packageJson.repository.url;
5091
- }
5092
- }
5093
- if (packageJson.license) {
5094
- license = packageJson.license;
5095
- }
5096
- if (packageJson.homepage) {
5097
- homepage = packageJson.homepage;
5098
- }
5099
- if (packageJson.bugs) {
5100
- if (typeof packageJson.bugs === "string") {
5101
- support = packageJson.bugs;
5102
- } else if (packageJson.bugs.url) {
5103
- support = packageJson.bugs.url;
5104
- }
5105
- }
5106
- }
5107
- }
5108
- return {
5109
- workspaceRoot,
5110
- name,
5111
- namespace,
5112
- repository,
5113
- license,
5114
- homepage,
5115
- support
5116
- };
5117
- }
5118
- function applyDefaultConfig(config) {
5119
- if (!config.support && config.contact) {
5120
- config.support = config.contact;
5121
- }
5122
- if (!config.contact && config.support) {
5123
- config.contact = config.support;
5124
- }
5125
- if (config.homepage) {
5126
- if (!config.docs) {
5127
- config.docs = `${config.homepage}/docs`;
5128
- }
5129
- if (!config.license) {
5130
- config.license = `${config.homepage}/license`;
5131
- }
5132
- if (!config.support) {
5133
- config.support = `${config.homepage}/support`;
5134
- }
5135
- if (!config.contact) {
5136
- config.contact = `${config.homepage}/contact`;
5137
- }
5138
- if (!config.error?.codesFile || !config?.error?.url) {
5139
- config.error ??= { codesFile: S };
5140
- if (config.homepage) {
5141
- config.error.url ??= `${config.homepage}/errors`;
5142
- }
5143
- }
5144
- }
5145
- return config;
5146
- }
5147
-
5148
- // ../config-tools/dist/chunk-SDSQ2HHF.js
5149
- init_cjs_shims();
5150
- var setExtensionEnv = (extensionName, extension) => {
5151
- for (const key of Object.keys(extension ?? {})) {
5152
- if (extension[key]) {
5153
- const result = key?.replace(
5154
- /([A-Z])+/g,
5155
- (input) => input ? input[0]?.toUpperCase() + input.slice(1) : ""
5156
- ).split(/(?=[A-Z])|[.\-\s_]/).map((x2) => x2.toLowerCase()) ?? [];
5157
- let extensionKey;
5158
- if (result.length === 0) {
5159
- return;
5160
- }
5161
- if (result.length === 1) {
5162
- extensionKey = result[0]?.toUpperCase() ?? "";
5163
- } else {
5164
- extensionKey = result.reduce((ret, part) => {
5165
- return `${ret}_${part.toLowerCase()}`;
5166
- });
5167
- }
5168
- process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
5169
- }
5170
- }
5171
- };
5172
- var setConfigEnv = (config) => {
5173
- const prefix = "STORM_";
5174
- if (config.extends) {
5175
- process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
4703
+ };
4704
+ var setConfigEnv = (config) => {
4705
+ const prefix = "STORM_";
4706
+ if (config.extends) {
4707
+ process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
5176
4708
  }
5177
4709
  if (config.name) {
5178
4710
  process.env[`${prefix}NAME`] = config.name;
@@ -5527,8 +5059,214 @@ var setBaseThemeColorsEnv = (prefix, config) => {
5527
5059
  }
5528
5060
  };
5529
5061
 
5530
- // ../config-tools/dist/chunk-A5JXMY6X.js
5062
+ // ../config-tools/dist/chunk-A5JXMY6X.js
5063
+ init_cjs_shims();
5064
+
5065
+ // ../config/dist/index.js
5066
+ init_cjs_shims();
5067
+
5068
+ // ../config/dist/chunk-5QIMO5EY.js
5069
+ init_cjs_shims();
5070
+
5071
+ // ../config/dist/chunk-HPWJK4AX.js
5072
+ init_cjs_shims();
5073
+
5074
+ // ../config/dist/chunk-TYDRIJER.js
5075
+ init_cjs_shims();
5076
+ var s = "https://docs.stormsoftware.com";
5077
+ var r = "https://stormsoftware.com";
5078
+ var t = "https://stormsoftware.com/contact";
5079
+ var a = "https://stormsoftware.com/license";
5080
+ var i = "Apache-2.0";
5081
+ var o = "https://discord.gg/MQ6YVzakM5";
5082
+ var e = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
5083
+ var E = `
5084
+ Storm Software is an open source software development organization with the mission is to make software development more accessible. Our ideal future is one where anyone can create software without years of prior development experience serving as a barrier to entry. We hope to achieve this via LLMs, Generative AI, and intuitive, high-level data modeling/programming languages.
5085
+
5086
+ Join us on [Discord](${o}) to chat with the team, receive release notifications, ask questions, and get involved.
5087
+
5088
+ If this sounds interesting, and you would like to help us in creating the next generation of development tools, please reach out on our [website](${t}) or join our [Slack](${e}) channel!
5089
+ `;
5090
+ var S = "tools/errors/codes.json";
5091
+ var A = "The workspace's banner image";
5092
+
5093
+ // ../config/dist/chunk-HPWJK4AX.js
5094
+ var e2 = __toESM(require("zod/v4/mini"), 1);
5095
+ var o2 = e2.registry();
5096
+ var t2 = e2.string().check(e2.length(7), e2.toLowerCase(), e2.regex(/^#([0-9a-f]{3}){1,2}$/i), e2.trim());
5097
+ o2.add(t2, { description: "A base schema for describing the format of colors" });
5098
+ var a2 = e2._default(t2, "#151718");
5099
+ o2.add(a2, { description: "The dark background color of the workspace" });
5100
+ var c = e2._default(t2, "#cbd5e1");
5101
+ o2.add(c, { description: "The light background color of the workspace" });
5102
+ var i2 = e2._default(t2, "#1fb2a6");
5103
+ o2.add(i2, { description: "The primary brand specific color of the workspace" });
5104
+ var s2 = e2.optional(t2);
5105
+ o2.add(s2, { description: "The alternate brand specific color of the workspace" });
5106
+ var n = e2.optional(t2);
5107
+ o2.add(n, { description: "The secondary brand specific color of the workspace" });
5108
+ var d = e2._default(t2, "#3fa6ff");
5109
+ o2.add(d, { description: "The color used to display hyperlink text" });
5110
+ var p = e2._default(t2, "#818cf8");
5111
+ o2.add(p, { description: "The second brand specific color of the workspace" });
5112
+ var h = e2._default(t2, "#45b27e");
5113
+ o2.add(h, { description: "The success color of the workspace" });
5114
+ var l = e2._default(t2, "#38bdf8");
5115
+ o2.add(l, { description: "The informational color of the workspace" });
5116
+ var m = e2._default(t2, "#8afafc");
5117
+ o2.add(m, { description: "The debug color of the workspace" });
5118
+ var z2 = e2._default(t2, "#f3d371");
5119
+ o2.add(z2, { description: "The warning color of the workspace" });
5120
+ var g = e2._default(t2, "#d8314a");
5121
+ o2.add(g, { description: "The danger color of the workspace" });
5122
+ var f = e2.optional(t2);
5123
+ o2.add(f, { description: "The fatal color of the workspace" });
5124
+ var u = e2._default(t2, "#80fd74");
5125
+ o2.add(u, { description: "The performance color of the workspace" });
5126
+ var k = e2._default(t2, "#4ade80");
5127
+ o2.add(k, { description: "The positive number color of the workspace" });
5128
+ var w = e2._default(t2, "#ef4444");
5129
+ o2.add(w, { description: "The negative number color of the workspace" });
5130
+ var S2 = e2.optional(e2.array(t2));
5131
+ o2.add(S2, { description: "The color stops for the base gradient color pattern used in the workspace" });
5132
+ var Re = e2.object({ foreground: c, background: a2, brand: i2, alternate: s2, accent: n, link: d, help: p, success: h, info: l, debug: m, warning: z2, danger: g, fatal: f, performance: u, positive: k, negative: w, gradient: S2 });
5133
+ var Ue = e2.object({ foreground: a2, background: c, brand: i2, alternate: s2, accent: n, link: d, help: p, success: h, info: l, debug: m, warning: z2, danger: g, fatal: f, performance: u, positive: k, negative: w, gradient: S2 });
5134
+ var De = e2.object({ dark: Re, light: Ue });
5135
+ var Be = e2.object({ dark: a2, light: c, brand: i2, alternate: s2, accent: n, link: d, help: p, success: h, info: l, debug: m, warning: z2, danger: g, fatal: f, performance: u, positive: k, negative: w, gradient: S2 });
5136
+ var r2 = e2.optional(e2.url());
5137
+ o2.add(r2, { description: "A remote registry URL used to publish distributable packages" });
5138
+ var y = e2._default(e2.object({ github: r2, npm: r2, cargo: r2, cyclone: r2, container: r2 }), {});
5139
+ o2.add(y, { description: "A list of remote registry URLs used by Storm Software" });
5140
+ var b = e2.union([Be, De]);
5141
+ o2.add(b, { description: "Colors used for various workspace elements" });
5142
+ var C = e2.record(e2.union([e2.union([e2.literal("base"), e2.string()]), e2.string()]), b);
5143
+ o2.add(C, { description: "Storm theme config values used for styling various package elements" });
5144
+ var _ = e2.optional(e2.union([e2.string().check(e2.trim()), e2.array(e2.string().check(e2.trim()))]));
5145
+ o2.add(_, { description: "The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration." });
5146
+ var L = e2.string().check(e2.trim());
5147
+ o2.add(L, { description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)" });
5148
+ var j = e2.string().check(e2.trim());
5149
+ o2.add(j, { description: "The email of the workspace bot" });
5150
+ var A2 = e2.object({ name: L, email: j });
5151
+ o2.add(A2, { description: "The workspace's bot user's config used to automated various operations tasks" });
5152
+ var R = e2.optional(e2.string().check(e2.trim(), e2.url()));
5153
+ o2.add(R, { description: "A URL to a banner image used to display the workspace's release" });
5154
+ var U = e2._default(e2.string().check(e2.trim()), A);
5155
+ o2.add(U, { description: "The alt text for the workspace's release banner image" });
5156
+ var D = e2.object({ url: R, alt: U });
5157
+ o2.add(D, { description: "The workspace's banner image used during the release process" });
5158
+ var B = e2.optional(e2.string().check(e2.trim()));
5159
+ o2.add(B, { description: "A header message appended to the start of the workspace's release notes" });
5160
+ var F = e2.optional(e2.string().check(e2.trim()));
5161
+ o2.add(F, { description: "A footer message appended to the end of the workspace's release notes" });
5162
+ var N = e2.object({ banner: e2.union([D, e2.string().check(e2.trim(), e2.url())]), header: B, footer: F });
5163
+ o2.add(N, { description: "The workspace's release config used during the release process" });
5164
+ var E2 = e2.optional(e2.string().check(e2.trim()));
5165
+ o2.add(E2, { description: "A Twitter/X account associated with the organization/project" });
5166
+ var M = e2.optional(e2.string().check(e2.trim()));
5167
+ o2.add(M, { description: "A Discord account associated with the organization/project" });
5168
+ var O = e2.optional(e2.string().check(e2.trim()));
5169
+ o2.add(O, { description: "A Telegram account associated with the organization/project" });
5170
+ var I = e2.optional(e2.string().check(e2.trim()));
5171
+ o2.add(I, { description: "A Slack account associated with the organization/project" });
5172
+ var G = e2.optional(e2.string().check(e2.trim()));
5173
+ o2.add(G, { description: "A Medium account associated with the organization/project" });
5174
+ var H = e2.optional(e2.string().check(e2.trim()));
5175
+ o2.add(H, { description: "A GitHub account associated with the organization/project" });
5176
+ var J = e2.object({ twitter: E2, discord: M, telegram: O, slack: I, medium: G, github: H });
5177
+ o2.add(J, { description: "The workspace's account config used to store various social media links" });
5178
+ var W = e2.optional(e2.string().check(e2.trim()));
5179
+ o2.add(W, { description: "The directory used to store the environment's cached file data" });
5180
+ var P = e2.optional(e2.string().check(e2.trim()));
5181
+ o2.add(P, { description: "The directory used to store the environment's data files" });
5182
+ var $ = e2.optional(e2.string().check(e2.trim()));
5183
+ o2.add($, { description: "The directory used to store the environment's configuration files" });
5184
+ var V = e2.optional(e2.string().check(e2.trim()));
5185
+ o2.add(V, { description: "The directory used to store the environment's temp files" });
5186
+ var X = e2.optional(e2.string().check(e2.trim()));
5187
+ o2.add(X, { description: "The directory used to store the environment's log files" });
5188
+ var Y = e2._default(e2.string().check(e2.trim()), "dist");
5189
+ o2.add(Y, { description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)" });
5190
+ var q = e2.object({ cache: W, data: P, config: $, temp: V, log: X, build: Y });
5191
+ o2.add(q, { description: "Various directories used by the workspace to store data, cache, and configuration files" });
5192
+ var K = e2._default(e2.enum(["minimal", "monorepo"]), "monorepo");
5193
+ o2.add(K, { description: "The variant of the workspace. This can be used to enable or disable certain features or configurations." });
5194
+ var Q = e2._default(e2.string().check(e2.trim()), S);
5195
+ o2.add(Q, { description: "The path to the workspace's error codes JSON file" });
5196
+ var Z = e2.optional(e2.url());
5197
+ o2.add(Z, { description: "A URL to a page that looks up the workspace's error messages given a specific error code" });
5198
+ var ee = e2.object({ codesFile: Q, url: Z });
5199
+ o2.add(ee, { description: "The workspace's error config used when creating error details during a system error" });
5200
+ var oe = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
5201
+ o2.add(oe, { description: "The name of the organization" });
5202
+ var te = e2.optional(e2.string().check(e2.trim()));
5203
+ o2.add(te, { description: "A description of the organization" });
5204
+ var re = e2.optional(e2.url());
5205
+ o2.add(re, { description: "A URL to the organization's logo image" });
5206
+ var ae = e2.optional(e2.url());
5207
+ o2.add(ae, { description: "A URL to the organization's icon image" });
5208
+ var ce = e2.optional(e2.url());
5209
+ o2.add(ce, { description: "A URL to a page that provides more information about the organization" });
5210
+ var ie = e2.object({ name: oe, description: te, logo: re, icon: ae, url: ce });
5211
+ o2.add(ie, { description: "The workspace's organization details" });
5212
+ var se = e2._default(e2.string().check(e2.trim(), e2.toLowerCase()), "https://public.storm-cdn.com/schemas/storm-workspace.schema.json");
5213
+ o2.add(se, { description: "The URL or file path to the JSON schema file that describes the Storm configuration file" });
5214
+ var ne = e2.string().check(e2.trim(), e2.toLowerCase());
5215
+ o2.add(ne, { description: "The name of the workspace/project/service/package/scope using this configuration" });
5216
+ var de = e2.string().check(e2.trim(), e2.toLowerCase());
5217
+ o2.add(de, { description: "The namespace of the workspace/project/service/package/scope using this configuration" });
5218
+ var pe = e2.union([ie, e2.string().check(e2.trim(), e2.toLowerCase())]);
5219
+ o2.add(pe, { description: "The organization of the workspace. This can be a string or an object containing the organization's details" });
5220
+ var he = e2.string().check(e2.trim(), e2.toLowerCase());
5221
+ o2.add(he, { description: "The repo URL of the workspace (i.e. the GitHub repository URL)" });
5222
+ var le = e2._default(e2.string().check(e2.trim()), "Apache-2.0");
5223
+ o2.add(le, { description: "The license type of the package" });
5224
+ var me = e2.optional(e2.url());
5225
+ o2.add(me, { description: "The homepage of the workspace" });
5226
+ var ze = e2.optional(e2.url());
5227
+ o2.add(ze, { description: "The documentation site for the workspace" });
5228
+ var ge = e2.optional(e2.url());
5229
+ o2.add(ge, { description: "The development portal site for the workspace" });
5230
+ var fe = e2.optional(e2.url());
5231
+ o2.add(fe, { description: "The licensing site for the workspace" });
5232
+ var ue = e2.optional(e2.url());
5233
+ o2.add(ue, { description: "The contact site for the workspace" });
5234
+ var ke = e2.optional(e2.url());
5235
+ o2.add(ke, { description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value" });
5236
+ var we = e2._default(e2.string().check(e2.trim(), e2.toLowerCase()), "main");
5237
+ o2.add(we, { description: "The branch of the workspace" });
5238
+ var Se = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
5239
+ o2.add(Se, { description: "A tag specifying the version pre-release identifier" });
5240
+ var be = e2.optional(e2.string().check(e2.trim(), e2.toLowerCase()));
5241
+ o2.add(be, { description: "The owner of the package" });
5242
+ var xe = e2._default(e2.enum(["development", "test", "production"]).check(e2.trim(), e2.toLowerCase()), "production");
5243
+ o2.add(xe, { description: "The current runtime environment mode for the package" });
5244
+ var Te = e2.string().check(e2.trim(), e2.toLowerCase());
5245
+ o2.add(Te, { description: "The root directory of the workspace" });
5246
+ var ve = e2._default(e2.boolean(), false);
5247
+ o2.add(ve, { description: "Should all known types of workspace caching be skipped?" });
5248
+ var ye = e2._default(e2.enum(["npm", "yarn", "pnpm", "bun"]), "npm");
5249
+ o2.add(ye, { description: "The JavaScript/TypeScript package manager used by the repository" });
5250
+ var Ce = e2._default(e2.string().check(e2.trim()), "America/New_York");
5251
+ o2.add(Ce, { description: "The default timezone of the workspace" });
5252
+ var _e = e2._default(e2.string().check(e2.trim()), "en-US");
5253
+ o2.add(_e, { description: "The default locale of the workspace" });
5254
+ var Le = e2._default(e2.enum(["silent", "fatal", "error", "warn", "success", "info", "performance", "debug", "trace", "all"]), "info");
5255
+ o2.add(Le, { description: "The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)." });
5256
+ var je = e2._default(e2.boolean(), true);
5257
+ o2.add(je, { description: "Should the logging of the current Storm Workspace configuration be skipped?" });
5258
+ var Ae = e2._default(e2.nullable(e2.string().check(e2.trim())), null);
5259
+ o2.add(Ae, { description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace." });
5260
+ var x = e2._default(e2.record(e2.string(), e2.any()), {});
5261
+ o2.add(x, { description: "Configuration of each used extension" });
5262
+ var Ne = e2.object({ $schema: se, extends: _, name: ne, variant: K, namespace: de, organization: pe, repository: he, license: le, homepage: me, docs: ze, portal: ge, licensing: fe, contact: ue, support: ke, branch: we, preid: Se, owner: be, bot: A2, release: N, socials: J, error: ee, mode: xe, workspaceRoot: Te, skipCache: ve, directories: q, packageManager: ye, timezone: Ce, locale: _e, logLevel: Le, skipConfigLogging: je, registry: y, configFile: Ae, colors: e2.union([b, C]), extensions: x });
5263
+ o2.add(x, { description: "Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo." });
5264
+
5265
+ // ../config/dist/chunk-YKRE3MWC.js
5531
5266
  init_cjs_shims();
5267
+ var e3 = ["dark", "light", "base", "brand", "alternate", "accent", "link", "success", "help", "info", "warning", "danger", "fatal", "performance", "positive", "negative"];
5268
+
5269
+ // ../config-tools/dist/chunk-A5JXMY6X.js
5532
5270
  var getExtensionEnv = (extensionName) => {
5533
5271
  const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
5534
5272
  return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
@@ -5646,108 +5384,374 @@ var getConfigEnv = () => {
5646
5384
  config.docs = `${config.homepage}/docs`;
5647
5385
  }
5648
5386
  }
5649
- if (config.licensing === a) {
5650
- if (config.homepage === r) {
5651
- config.licensing = `${r}/projects/${config.name}/licensing`;
5652
- } else {
5653
- config.licensing = `${config.homepage}/docs`;
5387
+ if (config.licensing === a) {
5388
+ if (config.homepage === r) {
5389
+ config.licensing = `${r}/projects/${config.name}/licensing`;
5390
+ } else {
5391
+ config.licensing = `${config.homepage}/docs`;
5392
+ }
5393
+ }
5394
+ const serializedConfig = process.env[`${prefix}WORKSPACE_CONFIG`];
5395
+ if (serializedConfig) {
5396
+ const parsed = JSON.parse(serializedConfig);
5397
+ config = {
5398
+ ...config,
5399
+ ...parsed,
5400
+ colors: { ...config.colors, ...parsed.colors },
5401
+ extensions: { ...config.extensions, ...parsed.extensions }
5402
+ };
5403
+ }
5404
+ return config;
5405
+ };
5406
+ var getThemeColorsEnv = (prefix, theme) => {
5407
+ const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
5408
+ return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
5409
+ };
5410
+ var getSingleThemeColorsEnv = (prefix) => {
5411
+ const gradient = [];
5412
+ if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
5413
+ gradient.push(
5414
+ process.env[`${prefix}GRADIENT_START`],
5415
+ process.env[`${prefix}GRADIENT_END`]
5416
+ );
5417
+ } else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
5418
+ let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
5419
+ while (process.env[`${prefix}GRADIENT_${index}`]) {
5420
+ gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
5421
+ index++;
5422
+ }
5423
+ }
5424
+ return {
5425
+ dark: process.env[`${prefix}DARK`],
5426
+ light: process.env[`${prefix}LIGHT`],
5427
+ brand: process.env[`${prefix}BRAND`],
5428
+ alternate: process.env[`${prefix}ALTERNATE`],
5429
+ accent: process.env[`${prefix}ACCENT`],
5430
+ link: process.env[`${prefix}LINK`],
5431
+ help: process.env[`${prefix}HELP`],
5432
+ success: process.env[`${prefix}SUCCESS`],
5433
+ info: process.env[`${prefix}INFO`],
5434
+ debug: process.env[`${prefix}DEBUG`],
5435
+ warning: process.env[`${prefix}WARNING`],
5436
+ danger: process.env[`${prefix}DANGER`],
5437
+ fatal: process.env[`${prefix}FATAL`],
5438
+ performance: process.env[`${prefix}PERFORMANCE`],
5439
+ positive: process.env[`${prefix}POSITIVE`],
5440
+ negative: process.env[`${prefix}NEGATIVE`],
5441
+ gradient
5442
+ };
5443
+ };
5444
+ var getMultiThemeColorsEnv = (prefix) => {
5445
+ return {
5446
+ light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
5447
+ dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
5448
+ };
5449
+ };
5450
+ var getBaseThemeColorsEnv = (prefix) => {
5451
+ const gradient = [];
5452
+ if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
5453
+ gradient.push(
5454
+ process.env[`${prefix}GRADIENT_START`],
5455
+ process.env[`${prefix}GRADIENT_END`]
5456
+ );
5457
+ } else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
5458
+ let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
5459
+ while (process.env[`${prefix}GRADIENT_${index}`]) {
5460
+ gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
5461
+ index++;
5462
+ }
5463
+ }
5464
+ return {
5465
+ foreground: process.env[`${prefix}FOREGROUND`],
5466
+ background: process.env[`${prefix}BACKGROUND`],
5467
+ brand: process.env[`${prefix}BRAND`],
5468
+ alternate: process.env[`${prefix}ALTERNATE`],
5469
+ accent: process.env[`${prefix}ACCENT`],
5470
+ link: process.env[`${prefix}LINK`],
5471
+ help: process.env[`${prefix}HELP`],
5472
+ success: process.env[`${prefix}SUCCESS`],
5473
+ info: process.env[`${prefix}INFO`],
5474
+ debug: process.env[`${prefix}DEBUG`],
5475
+ warning: process.env[`${prefix}WARNING`],
5476
+ danger: process.env[`${prefix}DANGER`],
5477
+ fatal: process.env[`${prefix}FATAL`],
5478
+ performance: process.env[`${prefix}PERFORMANCE`],
5479
+ positive: process.env[`${prefix}POSITIVE`],
5480
+ negative: process.env[`${prefix}NEGATIVE`],
5481
+ gradient
5482
+ };
5483
+ };
5484
+
5485
+ // ../config-tools/dist/chunk-7UEOVCKZ.js
5486
+ init_cjs_shims();
5487
+
5488
+ // ../config-tools/dist/chunk-LF3SAK2O.js
5489
+ init_cjs_shims();
5490
+
5491
+ // ../config-tools/dist/chunk-RUKM6FCF.js
5492
+ init_cjs_shims();
5493
+ var import_node_fs7 = require("fs");
5494
+ var import_node_path4 = require("path");
5495
+ var MAX_PATH_SEARCH_DEPTH = 30;
5496
+ var depth = 0;
5497
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
5498
+ const _startPath = startPath ?? process.cwd();
5499
+ if (endDirectoryNames.some(
5500
+ (endDirName) => (0, import_node_fs7.existsSync)((0, import_node_path4.join)(_startPath, endDirName))
5501
+ )) {
5502
+ return _startPath;
5503
+ }
5504
+ if (endFileNames.some((endFileName) => (0, import_node_fs7.existsSync)((0, import_node_path4.join)(_startPath, endFileName)))) {
5505
+ return _startPath;
5506
+ }
5507
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
5508
+ const parent = (0, import_node_path4.join)(_startPath, "..");
5509
+ return findFolderUp(parent, endFileNames, endDirectoryNames);
5510
+ }
5511
+ return void 0;
5512
+ }
5513
+
5514
+ // ../config-tools/dist/chunk-LF3SAK2O.js
5515
+ var rootFiles = [
5516
+ "storm-workspace.json",
5517
+ "storm-workspace.yaml",
5518
+ "storm-workspace.yml",
5519
+ "storm-workspace.js",
5520
+ "storm-workspace.ts",
5521
+ ".storm-workspace.json",
5522
+ ".storm-workspace.yaml",
5523
+ ".storm-workspace.yml",
5524
+ ".storm-workspace.js",
5525
+ ".storm-workspace.ts",
5526
+ "lerna.json",
5527
+ "nx.json",
5528
+ "turbo.json",
5529
+ "npm-workspace.json",
5530
+ "yarn-workspace.json",
5531
+ "pnpm-workspace.json",
5532
+ "npm-workspace.yaml",
5533
+ "yarn-workspace.yaml",
5534
+ "pnpm-workspace.yaml",
5535
+ "npm-workspace.yml",
5536
+ "yarn-workspace.yml",
5537
+ "pnpm-workspace.yml",
5538
+ "npm-lock.json",
5539
+ "yarn-lock.json",
5540
+ "pnpm-lock.json",
5541
+ "npm-lock.yaml",
5542
+ "yarn-lock.yaml",
5543
+ "pnpm-lock.yaml",
5544
+ "npm-lock.yml",
5545
+ "yarn-lock.yml",
5546
+ "pnpm-lock.yml",
5547
+ "bun.lockb"
5548
+ ];
5549
+ var rootDirectories = [
5550
+ ".storm-workspace",
5551
+ ".nx",
5552
+ ".git",
5553
+ ".github",
5554
+ ".vscode",
5555
+ ".verdaccio"
5556
+ ];
5557
+ function findWorkspaceRootSafe(pathInsideMonorepo) {
5558
+ if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
5559
+ return correctPaths2(
5560
+ process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
5561
+ );
5562
+ }
5563
+ return correctPaths2(
5564
+ findFolderUp(
5565
+ pathInsideMonorepo ?? process.cwd(),
5566
+ rootFiles,
5567
+ rootDirectories
5568
+ )
5569
+ );
5570
+ }
5571
+ function findWorkspaceRoot2(pathInsideMonorepo) {
5572
+ const result = findWorkspaceRootSafe(pathInsideMonorepo);
5573
+ if (!result) {
5574
+ throw new Error(
5575
+ `Cannot find workspace root upwards from known path. Files search list includes:
5576
+ ${rootFiles.join(
5577
+ "\n"
5578
+ )}
5579
+ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
5580
+ );
5581
+ }
5582
+ return result;
5583
+ }
5584
+
5585
+ // ../config-tools/dist/chunk-7UEOVCKZ.js
5586
+ var import_c122 = require("c12");
5587
+ var import_defu3 = __toESM(require("defu"), 1);
5588
+ var getConfigFileByName = async (fileName, filePath, options2 = {}) => {
5589
+ const workspacePath = filePath || findWorkspaceRoot2(filePath);
5590
+ const configs = await Promise.all([
5591
+ (0, import_c122.loadConfig)({
5592
+ cwd: workspacePath,
5593
+ packageJson: true,
5594
+ name: fileName,
5595
+ envName: fileName?.toUpperCase(),
5596
+ jitiOptions: {
5597
+ debug: false,
5598
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths2(
5599
+ process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
5600
+ "jiti"
5601
+ )
5602
+ },
5603
+ ...options2
5604
+ }),
5605
+ (0, import_c122.loadConfig)({
5606
+ cwd: workspacePath,
5607
+ packageJson: true,
5608
+ name: fileName,
5609
+ envName: fileName?.toUpperCase(),
5610
+ jitiOptions: {
5611
+ debug: false,
5612
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths2(
5613
+ process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
5614
+ "jiti"
5615
+ )
5616
+ },
5617
+ configFile: fileName,
5618
+ ...options2
5619
+ })
5620
+ ]);
5621
+ return (0, import_defu3.default)(configs[0] ?? {}, configs[1] ?? {});
5622
+ };
5623
+ var getConfigFile = async (filePath, additionalFileNames = []) => {
5624
+ const workspacePath = filePath ? filePath : findWorkspaceRoot2(filePath);
5625
+ const result = await getConfigFileByName("storm-workspace", workspacePath);
5626
+ let config = result.config;
5627
+ const configFile = result.configFile;
5628
+ if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
5629
+ writeTrace(
5630
+ `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
5631
+ {
5632
+ logLevel: "all"
5633
+ }
5634
+ );
5635
+ }
5636
+ if (additionalFileNames && additionalFileNames.length > 0) {
5637
+ const results = await Promise.all(
5638
+ additionalFileNames.map(
5639
+ (fileName) => getConfigFileByName(fileName, workspacePath)
5640
+ )
5641
+ );
5642
+ for (const result2 of results) {
5643
+ if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
5644
+ if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
5645
+ writeTrace(
5646
+ `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
5647
+ {
5648
+ logLevel: "all"
5649
+ }
5650
+ );
5651
+ }
5652
+ config = (0, import_defu3.default)(result2.config ?? {}, config ?? {});
5653
+ }
5654
5654
  }
5655
5655
  }
5656
- const serializedConfig = process.env[`${prefix}WORKSPACE_CONFIG`];
5657
- if (serializedConfig) {
5658
- const parsed = JSON.parse(serializedConfig);
5659
- config = {
5660
- ...config,
5661
- ...parsed,
5662
- colors: { ...config.colors, ...parsed.colors },
5663
- extensions: { ...config.extensions, ...parsed.extensions }
5664
- };
5656
+ if (!config || Object.keys(config).length === 0) {
5657
+ return void 0;
5665
5658
  }
5659
+ config.configFile = configFile;
5666
5660
  return config;
5667
5661
  };
5668
- var getThemeColorsEnv = (prefix, theme) => {
5669
- const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
5670
- return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
5671
- };
5672
- var getSingleThemeColorsEnv = (prefix) => {
5673
- const gradient = [];
5674
- if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
5675
- gradient.push(
5676
- process.env[`${prefix}GRADIENT_START`],
5677
- process.env[`${prefix}GRADIENT_END`]
5662
+
5663
+ // ../config-tools/dist/chunk-RGET2UQV.js
5664
+ init_cjs_shims();
5665
+ var import_node_fs8 = require("fs");
5666
+ var import_promises5 = require("fs/promises");
5667
+ var import_node_path5 = require("path");
5668
+ async function getPackageJsonConfig(root) {
5669
+ let license = i;
5670
+ let homepage = void 0;
5671
+ let support = void 0;
5672
+ let name = void 0;
5673
+ let namespace = void 0;
5674
+ let repository = void 0;
5675
+ const workspaceRoot = findWorkspaceRoot2(root);
5676
+ if ((0, import_node_fs8.existsSync)((0, import_node_path5.join)(workspaceRoot, "package.json"))) {
5677
+ const file = await (0, import_promises5.readFile)(
5678
+ joinPaths2(workspaceRoot, "package.json"),
5679
+ "utf8"
5678
5680
  );
5679
- } else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
5680
- let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
5681
- while (process.env[`${prefix}GRADIENT_${index}`]) {
5682
- gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
5683
- index++;
5681
+ if (file) {
5682
+ const packageJson = JSON.parse(file);
5683
+ if (packageJson.name) {
5684
+ name = packageJson.name;
5685
+ }
5686
+ if (packageJson.namespace) {
5687
+ namespace = packageJson.namespace;
5688
+ }
5689
+ if (packageJson.repository) {
5690
+ if (typeof packageJson.repository === "string") {
5691
+ repository = packageJson.repository;
5692
+ } else if (packageJson.repository.url) {
5693
+ repository = packageJson.repository.url;
5694
+ }
5695
+ }
5696
+ if (packageJson.license) {
5697
+ license = packageJson.license;
5698
+ }
5699
+ if (packageJson.homepage) {
5700
+ homepage = packageJson.homepage;
5701
+ }
5702
+ if (packageJson.bugs) {
5703
+ if (typeof packageJson.bugs === "string") {
5704
+ support = packageJson.bugs;
5705
+ } else if (packageJson.bugs.url) {
5706
+ support = packageJson.bugs.url;
5707
+ }
5708
+ }
5684
5709
  }
5685
5710
  }
5686
5711
  return {
5687
- dark: process.env[`${prefix}DARK`],
5688
- light: process.env[`${prefix}LIGHT`],
5689
- brand: process.env[`${prefix}BRAND`],
5690
- alternate: process.env[`${prefix}ALTERNATE`],
5691
- accent: process.env[`${prefix}ACCENT`],
5692
- link: process.env[`${prefix}LINK`],
5693
- help: process.env[`${prefix}HELP`],
5694
- success: process.env[`${prefix}SUCCESS`],
5695
- info: process.env[`${prefix}INFO`],
5696
- debug: process.env[`${prefix}DEBUG`],
5697
- warning: process.env[`${prefix}WARNING`],
5698
- danger: process.env[`${prefix}DANGER`],
5699
- fatal: process.env[`${prefix}FATAL`],
5700
- performance: process.env[`${prefix}PERFORMANCE`],
5701
- positive: process.env[`${prefix}POSITIVE`],
5702
- negative: process.env[`${prefix}NEGATIVE`],
5703
- gradient
5704
- };
5705
- };
5706
- var getMultiThemeColorsEnv = (prefix) => {
5707
- return {
5708
- light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
5709
- dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
5712
+ workspaceRoot,
5713
+ name,
5714
+ namespace,
5715
+ repository,
5716
+ license,
5717
+ homepage,
5718
+ support
5710
5719
  };
5711
- };
5712
- var getBaseThemeColorsEnv = (prefix) => {
5713
- const gradient = [];
5714
- if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
5715
- gradient.push(
5716
- process.env[`${prefix}GRADIENT_START`],
5717
- process.env[`${prefix}GRADIENT_END`]
5718
- );
5719
- } else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
5720
- let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
5721
- while (process.env[`${prefix}GRADIENT_${index}`]) {
5722
- gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
5723
- index++;
5720
+ }
5721
+ function applyDefaultConfig(config) {
5722
+ if (!config.support && config.contact) {
5723
+ config.support = config.contact;
5724
+ }
5725
+ if (!config.contact && config.support) {
5726
+ config.contact = config.support;
5727
+ }
5728
+ if (config.homepage) {
5729
+ if (!config.docs) {
5730
+ config.docs = `${config.homepage}/docs`;
5731
+ }
5732
+ if (!config.license) {
5733
+ config.license = `${config.homepage}/license`;
5734
+ }
5735
+ if (!config.support) {
5736
+ config.support = `${config.homepage}/support`;
5737
+ }
5738
+ if (!config.contact) {
5739
+ config.contact = `${config.homepage}/contact`;
5740
+ }
5741
+ if (!config.error?.codesFile || !config?.error?.url) {
5742
+ config.error ??= { codesFile: S };
5743
+ if (config.homepage) {
5744
+ config.error.url ??= `${config.homepage}/errors`;
5745
+ }
5724
5746
  }
5725
5747
  }
5726
- return {
5727
- foreground: process.env[`${prefix}FOREGROUND`],
5728
- background: process.env[`${prefix}BACKGROUND`],
5729
- brand: process.env[`${prefix}BRAND`],
5730
- alternate: process.env[`${prefix}ALTERNATE`],
5731
- accent: process.env[`${prefix}ACCENT`],
5732
- link: process.env[`${prefix}LINK`],
5733
- help: process.env[`${prefix}HELP`],
5734
- success: process.env[`${prefix}SUCCESS`],
5735
- info: process.env[`${prefix}INFO`],
5736
- debug: process.env[`${prefix}DEBUG`],
5737
- warning: process.env[`${prefix}WARNING`],
5738
- danger: process.env[`${prefix}DANGER`],
5739
- fatal: process.env[`${prefix}FATAL`],
5740
- performance: process.env[`${prefix}PERFORMANCE`],
5741
- positive: process.env[`${prefix}POSITIVE`],
5742
- negative: process.env[`${prefix}NEGATIVE`],
5743
- gradient
5744
- };
5745
- };
5748
+ return config;
5749
+ }
5746
5750
 
5747
5751
  // ../config/dist/schema.js
5748
5752
  init_cjs_shims();
5749
5753
 
5750
- // ../config-tools/dist/chunk-6VD3CYGA.js
5754
+ // ../config-tools/dist/chunk-IASBTY6Z.js
5751
5755
  var import_defu4 = __toESM(require("defu"), 1);
5752
5756
  var import_node_fs9 = require("fs");
5753
5757
  var _extension_cache = /* @__PURE__ */ new WeakMap();
@@ -5848,7 +5852,7 @@ ${formatLogMessage(config)}`,
5848
5852
  return config;
5849
5853
  };
5850
5854
 
5851
- // ../config-tools/dist/chunk-RL5DRDS6.js
5855
+ // ../config-tools/dist/chunk-L6MSRILP.js
5852
5856
  function getConfig(workspaceRoot, skipLogs = false) {
5853
5857
  return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
5854
5858
  }