@storm-software/config-tools 1.162.17 → 1.163.3

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/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-1.162.17-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-1.163.2-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
package/bin/config.cjs CHANGED
@@ -651,7 +651,7 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
651
651
  }
652
652
  }
653
653
  }
654
- if (!config) {
654
+ if (!config || Object.keys(config).length === 0) {
655
655
  return void 0;
656
656
  }
657
657
  config.configFile = configFile;
@@ -1123,7 +1123,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
1123
1123
  // src/create-storm-config.ts
1124
1124
  var _extension_cache = /* @__PURE__ */ new WeakMap();
1125
1125
  var _static_cache = void 0;
1126
- var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
1126
+ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
1127
1127
  let result;
1128
1128
  if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
1129
1129
  let _workspaceRoot = workspaceRoot;
@@ -1131,13 +1131,18 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
1131
1131
  _workspaceRoot = findWorkspaceRoot();
1132
1132
  }
1133
1133
  const configEnv = getConfigEnv();
1134
- const defaultConfig = await getDefaultConfig(_workspaceRoot);
1135
1134
  const configFile = await getConfigFile(_workspaceRoot);
1136
- if (!configFile && !skipLogs) {
1137
- writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
1138
- logLevel: "all"
1139
- });
1135
+ if (!configFile) {
1136
+ if (!skipLogs) {
1137
+ writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
1138
+ logLevel: "all"
1139
+ });
1140
+ }
1141
+ if (useDefault === false) {
1142
+ return void 0;
1143
+ }
1140
1144
  }
1145
+ const defaultConfig = await getDefaultConfig(_workspaceRoot);
1141
1146
  result = await import_schema.stormWorkspaceConfigSchema.parseAsync((0, import_defu2.default)(configEnv, configFile, defaultConfig));
1142
1147
  result.workspaceRoot ??= _workspaceRoot;
1143
1148
  } else {
@@ -1170,7 +1175,7 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
1170
1175
  return extension;
1171
1176
  }, "createConfigExtension");
1172
1177
  var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
1173
- const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
1178
+ const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
1174
1179
  setConfigEnv(config);
1175
1180
  if (!skipLogs && !config.skipConfigLogging) {
1176
1181
  writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
package/bin/config.js CHANGED
@@ -619,7 +619,7 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
619
619
  }
620
620
  }
621
621
  }
622
- if (!config) {
622
+ if (!config || Object.keys(config).length === 0) {
623
623
  return void 0;
624
624
  }
625
625
  config.configFile = configFile;
@@ -1091,7 +1091,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
1091
1091
  // src/create-storm-config.ts
1092
1092
  var _extension_cache = /* @__PURE__ */ new WeakMap();
1093
1093
  var _static_cache = void 0;
1094
- var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
1094
+ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
1095
1095
  let result;
1096
1096
  if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
1097
1097
  let _workspaceRoot = workspaceRoot;
@@ -1099,13 +1099,18 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
1099
1099
  _workspaceRoot = findWorkspaceRoot();
1100
1100
  }
1101
1101
  const configEnv = getConfigEnv();
1102
- const defaultConfig = await getDefaultConfig(_workspaceRoot);
1103
1102
  const configFile = await getConfigFile(_workspaceRoot);
1104
- if (!configFile && !skipLogs) {
1105
- writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
1106
- logLevel: "all"
1107
- });
1103
+ if (!configFile) {
1104
+ if (!skipLogs) {
1105
+ writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
1106
+ logLevel: "all"
1107
+ });
1108
+ }
1109
+ if (useDefault === false) {
1110
+ return void 0;
1111
+ }
1108
1112
  }
1113
+ const defaultConfig = await getDefaultConfig(_workspaceRoot);
1109
1114
  result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
1110
1115
  result.workspaceRoot ??= _workspaceRoot;
1111
1116
  } else {
@@ -1138,7 +1143,7 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
1138
1143
  return extension;
1139
1144
  }, "createConfigExtension");
1140
1145
  var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
1141
- const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
1146
+ const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
1142
1147
  setConfigEnv(config);
1143
1148
  if (!skipLogs && !config.skipConfigLogging) {
1144
1149
  writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
@@ -66,7 +66,7 @@ var getConfigFile = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
66
66
  }
67
67
  }
68
68
  }
69
- if (!config) {
69
+ if (!config || Object.keys(config).length === 0) {
70
70
  return void 0;
71
71
  }
72
72
  config.configFile = configFile;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getConfigFile
3
- } from "./chunk-BDMLGH55.js";
3
+ } from "./chunk-GYFE7GKG.js";
4
4
  import {
5
5
  formatLogMessage,
6
6
  writeTrace,
@@ -28,7 +28,7 @@ import { stormWorkspaceConfigSchema } from "@storm-software/config/schema";
28
28
  import defu from "defu";
29
29
  var _extension_cache = /* @__PURE__ */ new WeakMap();
30
30
  var _static_cache = void 0;
31
- var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
31
+ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
32
32
  let result;
33
33
  if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
34
34
  let _workspaceRoot = workspaceRoot;
@@ -36,13 +36,18 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
36
36
  _workspaceRoot = findWorkspaceRoot();
37
37
  }
38
38
  const configEnv = getConfigEnv();
39
- const defaultConfig = await getDefaultConfig(_workspaceRoot);
40
39
  const configFile = await getConfigFile(_workspaceRoot);
41
- if (!configFile && !skipLogs) {
42
- writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
43
- logLevel: "all"
44
- });
40
+ if (!configFile) {
41
+ if (!skipLogs) {
42
+ writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
43
+ logLevel: "all"
44
+ });
45
+ }
46
+ if (useDefault === false) {
47
+ return void 0;
48
+ }
45
49
  }
50
+ const defaultConfig = await getDefaultConfig(_workspaceRoot);
46
51
  result = await stormWorkspaceConfigSchema.parseAsync(defu(configEnv, configFile, defaultConfig));
47
52
  result.workspaceRoot ??= _workspaceRoot;
48
53
  } else {
@@ -75,7 +80,7 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
75
80
  return extension;
76
81
  }, "createConfigExtension");
77
82
  var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
78
- const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
83
+ const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
79
84
  setConfigEnv(config);
80
85
  if (!skipLogs && !config.skipConfigLogging) {
81
86
  writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
@@ -83,9 +88,31 @@ ${formatLogMessage(config)}`, config);
83
88
  }
84
89
  return config;
85
90
  }, "loadStormWorkspaceConfig");
91
+ var tryLoadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = true, useDefault = false) => {
92
+ try {
93
+ const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, useDefault);
94
+ if (!config) {
95
+ return void 0;
96
+ }
97
+ setConfigEnv(config);
98
+ if (!skipLogs && !config.skipConfigLogging) {
99
+ writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
100
+ ${formatLogMessage(config)}`, config);
101
+ }
102
+ return config;
103
+ } catch (error) {
104
+ if (!skipLogs) {
105
+ writeWarning(`\u26A0\uFE0F Failed to load Storm Workspace configuration: ${error}`, {
106
+ logLevel: "all"
107
+ });
108
+ }
109
+ return void 0;
110
+ }
111
+ }, "tryLoadStormWorkspaceConfig");
86
112
 
87
113
  export {
88
114
  createStormWorkspaceConfig,
89
115
  createConfigExtension,
90
- loadStormWorkspaceConfig
116
+ loadStormWorkspaceConfig,
117
+ tryLoadStormWorkspaceConfig
91
118
  };
@@ -66,7 +66,7 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
66
66
  }
67
67
  }
68
68
  }
69
- if (!config) {
69
+ if (!config || Object.keys(config).length === 0) {
70
70
  return void 0;
71
71
  }
72
72
  config.configFile = configFile;
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkBRZ2YPOBcjs = require('./chunk-BRZ2YPOB.cjs');
3
+ var _chunk4AM2CTWOcjs = require('./chunk-4AM2CTWO.cjs');
4
4
 
5
5
 
6
6
 
@@ -28,7 +28,7 @@ var _schema = require('@storm-software/config/schema');
28
28
  var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
29
29
  var _extension_cache = /* @__PURE__ */ new WeakMap();
30
30
  var _static_cache = void 0;
31
- var createStormWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false) => {
31
+ var createStormWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
32
32
  let result;
33
33
  if (!_optionalChain([_static_cache, 'optionalAccess', _ => _.data]) || !_optionalChain([_static_cache, 'optionalAccess', _2 => _2.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
34
34
  let _workspaceRoot = workspaceRoot;
@@ -36,13 +36,18 @@ var createStormWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(v
36
36
  _workspaceRoot = _chunk6LIPH2JWcjs.findWorkspaceRoot.call(void 0, );
37
37
  }
38
38
  const configEnv = _chunkGBY7M6XXcjs.getConfigEnv.call(void 0, );
39
- const defaultConfig = await _chunkYSSMM2WQcjs.getDefaultConfig.call(void 0, _workspaceRoot);
40
- const configFile = await _chunkBRZ2YPOBcjs.getConfigFile.call(void 0, _workspaceRoot);
41
- if (!configFile && !skipLogs) {
42
- _chunkDLO4KL2Zcjs.writeWarning.call(void 0, "No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
43
- logLevel: "all"
44
- });
39
+ const configFile = await _chunk4AM2CTWOcjs.getConfigFile.call(void 0, _workspaceRoot);
40
+ if (!configFile) {
41
+ if (!skipLogs) {
42
+ _chunkDLO4KL2Zcjs.writeWarning.call(void 0, "No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
43
+ logLevel: "all"
44
+ });
45
+ }
46
+ if (useDefault === false) {
47
+ return void 0;
48
+ }
45
49
  }
50
+ const defaultConfig = await _chunkYSSMM2WQcjs.getDefaultConfig.call(void 0, _workspaceRoot);
46
51
  result = await _schema.stormWorkspaceConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
47
52
  result.workspaceRoot ??= _workspaceRoot;
48
53
  } else {
@@ -75,7 +80,7 @@ var createConfigExtension = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0
75
80
  return extension;
76
81
  }, "createConfigExtension");
77
82
  var loadStormWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (workspaceRoot, skipLogs = false) => {
78
- const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
83
+ const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
79
84
  _chunk2LQBYJT5cjs.setConfigEnv.call(void 0, config);
80
85
  if (!skipLogs && !config.skipConfigLogging) {
81
86
  _chunkDLO4KL2Zcjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
@@ -83,9 +88,31 @@ ${_chunkDLO4KL2Zcjs.formatLogMessage.call(void 0, config)}`, config);
83
88
  }
84
89
  return config;
85
90
  }, "loadStormWorkspaceConfig");
91
+ var tryLoadStormWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (workspaceRoot, skipLogs = true, useDefault = false) => {
92
+ try {
93
+ const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, useDefault);
94
+ if (!config) {
95
+ return void 0;
96
+ }
97
+ _chunk2LQBYJT5cjs.setConfigEnv.call(void 0, config);
98
+ if (!skipLogs && !config.skipConfigLogging) {
99
+ _chunkDLO4KL2Zcjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
100
+ ${_chunkDLO4KL2Zcjs.formatLogMessage.call(void 0, config)}`, config);
101
+ }
102
+ return config;
103
+ } catch (error) {
104
+ if (!skipLogs) {
105
+ _chunkDLO4KL2Zcjs.writeWarning.call(void 0, `\u26A0\uFE0F Failed to load Storm Workspace configuration: ${error}`, {
106
+ logLevel: "all"
107
+ });
108
+ }
109
+ return void 0;
110
+ }
111
+ }, "tryLoadStormWorkspaceConfig");
112
+
86
113
 
87
114
 
88
115
 
89
116
 
90
117
 
91
- exports.createStormWorkspaceConfig = createStormWorkspaceConfig; exports.createConfigExtension = createConfigExtension; exports.loadStormWorkspaceConfig = loadStormWorkspaceConfig;
118
+ exports.createStormWorkspaceConfig = createStormWorkspaceConfig; exports.createConfigExtension = createConfigExtension; exports.loadStormWorkspaceConfig = loadStormWorkspaceConfig; exports.tryLoadStormWorkspaceConfig = tryLoadStormWorkspaceConfig;
@@ -1,6 +1,7 @@
1
1
  import {
2
- loadStormWorkspaceConfig
3
- } from "./chunk-ELWLSF4O.js";
2
+ loadStormWorkspaceConfig,
3
+ tryLoadStormWorkspaceConfig
4
+ } from "./chunk-BC2QD5QZ.js";
4
5
  import {
5
6
  findWorkspaceRoot
6
7
  } from "./chunk-K6PUXRK3.js";
@@ -19,8 +20,20 @@ var getWorkspaceConfig = /* @__PURE__ */ __name((skipLogs = false, options = {})
19
20
  }
20
21
  return getConfig(workspaceRoot, skipLogs);
21
22
  }, "getWorkspaceConfig");
23
+ var tryGetWorkspaceConfig = /* @__PURE__ */ __name(async (skipLogs = false, options = {}) => {
24
+ try {
25
+ let workspaceRoot = options.workspaceRoot;
26
+ if (!workspaceRoot) {
27
+ workspaceRoot = findWorkspaceRoot(options.cwd);
28
+ }
29
+ return tryLoadStormWorkspaceConfig(workspaceRoot, skipLogs, options.useDefault);
30
+ } catch {
31
+ return void 0;
32
+ }
33
+ }, "tryGetWorkspaceConfig");
22
34
 
23
35
  export {
24
36
  getConfig,
25
- getWorkspaceConfig
37
+ getWorkspaceConfig,
38
+ tryGetWorkspaceConfig
26
39
  };
@@ -1,6 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk32N55O6Lcjs = require('./chunk-32N55O6L.cjs');
3
+
4
+ var _chunkHFKBN5GEcjs = require('./chunk-HFKBN5GE.cjs');
4
5
 
5
6
 
6
7
  var _chunk6LIPH2JWcjs = require('./chunk-6LIPH2JW.cjs');
@@ -10,7 +11,7 @@ var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
10
11
 
11
12
  // src/get-config.ts
12
13
  var getConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (workspaceRoot, skipLogs = false) => {
13
- return _chunk32N55O6Lcjs.loadStormWorkspaceConfig.call(void 0, workspaceRoot, skipLogs);
14
+ return _chunkHFKBN5GEcjs.loadStormWorkspaceConfig.call(void 0, workspaceRoot, skipLogs);
14
15
  }, "getConfig");
15
16
  var getWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (skipLogs = false, options = {}) => {
16
17
  let workspaceRoot = options.workspaceRoot;
@@ -19,8 +20,20 @@ var getWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (
19
20
  }
20
21
  return getConfig(workspaceRoot, skipLogs);
21
22
  }, "getWorkspaceConfig");
23
+ var tryGetWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (skipLogs = false, options = {}) => {
24
+ try {
25
+ let workspaceRoot = options.workspaceRoot;
26
+ if (!workspaceRoot) {
27
+ workspaceRoot = _chunk6LIPH2JWcjs.findWorkspaceRoot.call(void 0, options.cwd);
28
+ }
29
+ return _chunkHFKBN5GEcjs.tryLoadStormWorkspaceConfig.call(void 0, workspaceRoot, skipLogs, options.useDefault);
30
+ } catch (e) {
31
+ return void 0;
32
+ }
33
+ }, "tryGetWorkspaceConfig");
34
+
22
35
 
23
36
 
24
37
 
25
38
 
26
- exports.getConfig = getConfig; exports.getWorkspaceConfig = getWorkspaceConfig;
39
+ exports.getConfig = getConfig; exports.getWorkspaceConfig = getWorkspaceConfig; exports.tryGetWorkspaceConfig = tryGetWorkspaceConfig;
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkBRZ2YPOBcjs = require('../chunk-BRZ2YPOB.cjs');
4
+ var _chunk4AM2CTWOcjs = require('../chunk-4AM2CTWO.cjs');
5
5
  require('../chunk-UNXQ2AR4.cjs');
6
6
  require('../chunk-SIU3CSEY.cjs');
7
7
  require('../chunk-CHA6766N.cjs');
@@ -22,4 +22,4 @@ require('../chunk-USNT2KNT.cjs');
22
22
 
23
23
 
24
24
 
25
- exports.getConfigFile = _chunkBRZ2YPOBcjs.getConfigFile; exports.getConfigFileByName = _chunkBRZ2YPOBcjs.getConfigFileByName;
25
+ exports.getConfigFile = _chunk4AM2CTWOcjs.getConfigFile; exports.getConfigFileByName = _chunk4AM2CTWOcjs.getConfigFileByName;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getConfigFile,
3
3
  getConfigFileByName
4
- } from "../chunk-BDMLGH55.js";
4
+ } from "../chunk-GYFE7GKG.js";
5
5
  import "../chunk-I6MMCLIA.js";
6
6
  import "../chunk-SFDIRWJY.js";
7
7
  import "../chunk-2HSUVM5I.js";
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkBRZ2YPOBcjs = require('../chunk-BRZ2YPOB.cjs');
5
+ var _chunk4AM2CTWOcjs = require('../chunk-4AM2CTWO.cjs');
6
6
  require('../chunk-UNXQ2AR4.cjs');
7
7
  require('../chunk-SIU3CSEY.cjs');
8
8
  require('../chunk-CHA6766N.cjs');
@@ -23,4 +23,4 @@ require('../chunk-USNT2KNT.cjs');
23
23
 
24
24
 
25
25
 
26
- exports.getConfigFile = _chunkBRZ2YPOBcjs.getConfigFile; exports.getConfigFileByName = _chunkBRZ2YPOBcjs.getConfigFileByName;
26
+ exports.getConfigFile = _chunk4AM2CTWOcjs.getConfigFile; exports.getConfigFileByName = _chunk4AM2CTWOcjs.getConfigFileByName;
@@ -2,7 +2,7 @@ import "../chunk-SABD7NYM.js";
2
2
  import {
3
3
  getConfigFile,
4
4
  getConfigFileByName
5
- } from "../chunk-BDMLGH55.js";
5
+ } from "../chunk-GYFE7GKG.js";
6
6
  import "../chunk-I6MMCLIA.js";
7
7
  import "../chunk-SFDIRWJY.js";
8
8
  import "../chunk-2HSUVM5I.js";
@@ -2,8 +2,9 @@
2
2
 
3
3
 
4
4
 
5
- var _chunk32N55O6Lcjs = require('./chunk-32N55O6L.cjs');
6
- require('./chunk-BRZ2YPOB.cjs');
5
+
6
+ var _chunkHFKBN5GEcjs = require('./chunk-HFKBN5GE.cjs');
7
+ require('./chunk-4AM2CTWO.cjs');
7
8
  require('./chunk-UNXQ2AR4.cjs');
8
9
  require('./chunk-SIU3CSEY.cjs');
9
10
  require('./chunk-CHA6766N.cjs');
@@ -27,4 +28,5 @@ require('./chunk-USNT2KNT.cjs');
27
28
 
28
29
 
29
30
 
30
- exports.createConfigExtension = _chunk32N55O6Lcjs.createConfigExtension; exports.createStormWorkspaceConfig = _chunk32N55O6Lcjs.createStormWorkspaceConfig; exports.loadStormWorkspaceConfig = _chunk32N55O6Lcjs.loadStormWorkspaceConfig;
31
+
32
+ exports.createConfigExtension = _chunkHFKBN5GEcjs.createConfigExtension; exports.createStormWorkspaceConfig = _chunkHFKBN5GEcjs.createStormWorkspaceConfig; exports.loadStormWorkspaceConfig = _chunkHFKBN5GEcjs.loadStormWorkspaceConfig; exports.tryLoadStormWorkspaceConfig = _chunkHFKBN5GEcjs.tryLoadStormWorkspaceConfig;
@@ -4,9 +4,14 @@ import { ZodTypeAny } from 'zod';
4
4
  /**
5
5
  * Get the config for the current Storm workspace
6
6
  *
7
+ * @param extensionName - The name of the config extension
8
+ * @param schema - The schema for the config extension
9
+ * @param workspaceRoot - The root directory of the workspace
10
+ * @param skipLogs - Skip writing logs to the console
11
+ * @param useDefault - Whether to use the default config if no config file is found
7
12
  * @returns The config for the current Storm workspace
8
13
  */
9
- declare const createStormWorkspaceConfig: <TExtensionName extends keyof StormWorkspaceConfig["extensions"] = keyof StormWorkspaceConfig["extensions"], TExtensionConfig = any, TExtensionSchema extends ZodTypeAny = ZodTypeAny>(extensionName?: TExtensionName, schema?: TExtensionSchema, workspaceRoot?: string, skipLogs?: boolean) => Promise<StormWorkspaceConfig<TExtensionName, TExtensionConfig>>;
14
+ declare const createStormWorkspaceConfig: <TExtensionName extends keyof StormWorkspaceConfig["extensions"] = keyof StormWorkspaceConfig["extensions"], TExtensionConfig = any, TExtensionSchema extends ZodTypeAny = ZodTypeAny, TUseDefault extends boolean | undefined = boolean | undefined, TResult = TUseDefault extends true ? StormWorkspaceConfig<TExtensionName, TExtensionConfig> : StormWorkspaceConfig<TExtensionName, TExtensionConfig> | undefined>(extensionName?: TExtensionName, schema?: TExtensionSchema, workspaceRoot?: string, skipLogs?: boolean, useDefault?: TUseDefault) => Promise<TResult>;
10
15
  /**
11
16
  * Get the config for a specific Storm config Extension
12
17
  *
@@ -17,7 +22,20 @@ declare const createStormWorkspaceConfig: <TExtensionName extends keyof StormWor
17
22
  declare const createConfigExtension: <TExtensionName extends keyof StormWorkspaceConfig["extensions"] = keyof StormWorkspaceConfig["extensions"], TExtensionConfig = any, TExtensionSchema extends ZodTypeAny = ZodTypeAny>(extensionName: TExtensionName, schema: TExtensionSchema) => TExtensionConfig;
18
23
  /**
19
24
  * Load the config file values for the current Storm workspace into environment variables
25
+ *
26
+ * @param workspaceRoot - The root directory of the workspace
27
+ * @param skipLogs - Skip writing logs to the console
28
+ * @returns The config for the current Storm workspace, throws an error if the config file could not be loaded
20
29
  */
21
30
  declare const loadStormWorkspaceConfig: (workspaceRoot?: string, skipLogs?: boolean) => Promise<StormWorkspaceConfig>;
31
+ /**
32
+ * Try to load the config file values for the current Storm workspace into environment variables
33
+ *
34
+ * @param workspaceRoot - The root directory of the workspace
35
+ * @param skipLogs - Skip writing logs to the console
36
+ * @param useDefault - Whether to use the default config if no config file is found
37
+ * @returns The config for the current Storm workspace, or undefined if the config file could not be loaded
38
+ */
39
+ declare const tryLoadStormWorkspaceConfig: (workspaceRoot?: string, skipLogs?: boolean, useDefault?: boolean) => Promise<StormWorkspaceConfig | undefined>;
22
40
 
23
- export { createConfigExtension, createStormWorkspaceConfig, loadStormWorkspaceConfig };
41
+ export { createConfigExtension, createStormWorkspaceConfig, loadStormWorkspaceConfig, tryLoadStormWorkspaceConfig };
@@ -4,9 +4,14 @@ import { ZodTypeAny } from 'zod';
4
4
  /**
5
5
  * Get the config for the current Storm workspace
6
6
  *
7
+ * @param extensionName - The name of the config extension
8
+ * @param schema - The schema for the config extension
9
+ * @param workspaceRoot - The root directory of the workspace
10
+ * @param skipLogs - Skip writing logs to the console
11
+ * @param useDefault - Whether to use the default config if no config file is found
7
12
  * @returns The config for the current Storm workspace
8
13
  */
9
- declare const createStormWorkspaceConfig: <TExtensionName extends keyof StormWorkspaceConfig["extensions"] = keyof StormWorkspaceConfig["extensions"], TExtensionConfig = any, TExtensionSchema extends ZodTypeAny = ZodTypeAny>(extensionName?: TExtensionName, schema?: TExtensionSchema, workspaceRoot?: string, skipLogs?: boolean) => Promise<StormWorkspaceConfig<TExtensionName, TExtensionConfig>>;
14
+ declare const createStormWorkspaceConfig: <TExtensionName extends keyof StormWorkspaceConfig["extensions"] = keyof StormWorkspaceConfig["extensions"], TExtensionConfig = any, TExtensionSchema extends ZodTypeAny = ZodTypeAny, TUseDefault extends boolean | undefined = boolean | undefined, TResult = TUseDefault extends true ? StormWorkspaceConfig<TExtensionName, TExtensionConfig> : StormWorkspaceConfig<TExtensionName, TExtensionConfig> | undefined>(extensionName?: TExtensionName, schema?: TExtensionSchema, workspaceRoot?: string, skipLogs?: boolean, useDefault?: TUseDefault) => Promise<TResult>;
10
15
  /**
11
16
  * Get the config for a specific Storm config Extension
12
17
  *
@@ -17,7 +22,20 @@ declare const createStormWorkspaceConfig: <TExtensionName extends keyof StormWor
17
22
  declare const createConfigExtension: <TExtensionName extends keyof StormWorkspaceConfig["extensions"] = keyof StormWorkspaceConfig["extensions"], TExtensionConfig = any, TExtensionSchema extends ZodTypeAny = ZodTypeAny>(extensionName: TExtensionName, schema: TExtensionSchema) => TExtensionConfig;
18
23
  /**
19
24
  * Load the config file values for the current Storm workspace into environment variables
25
+ *
26
+ * @param workspaceRoot - The root directory of the workspace
27
+ * @param skipLogs - Skip writing logs to the console
28
+ * @returns The config for the current Storm workspace, throws an error if the config file could not be loaded
20
29
  */
21
30
  declare const loadStormWorkspaceConfig: (workspaceRoot?: string, skipLogs?: boolean) => Promise<StormWorkspaceConfig>;
31
+ /**
32
+ * Try to load the config file values for the current Storm workspace into environment variables
33
+ *
34
+ * @param workspaceRoot - The root directory of the workspace
35
+ * @param skipLogs - Skip writing logs to the console
36
+ * @param useDefault - Whether to use the default config if no config file is found
37
+ * @returns The config for the current Storm workspace, or undefined if the config file could not be loaded
38
+ */
39
+ declare const tryLoadStormWorkspaceConfig: (workspaceRoot?: string, skipLogs?: boolean, useDefault?: boolean) => Promise<StormWorkspaceConfig | undefined>;
22
40
 
23
- export { createConfigExtension, createStormWorkspaceConfig, loadStormWorkspaceConfig };
41
+ export { createConfigExtension, createStormWorkspaceConfig, loadStormWorkspaceConfig, tryLoadStormWorkspaceConfig };
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  createConfigExtension,
3
3
  createStormWorkspaceConfig,
4
- loadStormWorkspaceConfig
5
- } from "./chunk-ELWLSF4O.js";
6
- import "./chunk-BDMLGH55.js";
4
+ loadStormWorkspaceConfig,
5
+ tryLoadStormWorkspaceConfig
6
+ } from "./chunk-BC2QD5QZ.js";
7
+ import "./chunk-GYFE7GKG.js";
7
8
  import "./chunk-I6MMCLIA.js";
8
9
  import "./chunk-SFDIRWJY.js";
9
10
  import "./chunk-2HSUVM5I.js";
@@ -26,5 +27,6 @@ import "./chunk-SHUYVCID.js";
26
27
  export {
27
28
  createConfigExtension,
28
29
  createStormWorkspaceConfig,
29
- loadStormWorkspaceConfig
30
+ loadStormWorkspaceConfig,
31
+ tryLoadStormWorkspaceConfig
30
32
  };
@@ -1,9 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkSU4ISMF5cjs = require('./chunk-SU4ISMF5.cjs');
5
- require('./chunk-32N55O6L.cjs');
6
- require('./chunk-BRZ2YPOB.cjs');
4
+
5
+ var _chunkVKTQOXWOcjs = require('./chunk-VKTQOXWO.cjs');
6
+ require('./chunk-HFKBN5GE.cjs');
7
+ require('./chunk-4AM2CTWO.cjs');
7
8
  require('./chunk-UNXQ2AR4.cjs');
8
9
  require('./chunk-SIU3CSEY.cjs');
9
10
  require('./chunk-CHA6766N.cjs');
@@ -26,4 +27,5 @@ require('./chunk-USNT2KNT.cjs');
26
27
 
27
28
 
28
29
 
29
- exports.getConfig = _chunkSU4ISMF5cjs.getConfig; exports.getWorkspaceConfig = _chunkSU4ISMF5cjs.getWorkspaceConfig;
30
+
31
+ exports.getConfig = _chunkVKTQOXWOcjs.getConfig; exports.getWorkspaceConfig = _chunkVKTQOXWOcjs.getWorkspaceConfig; exports.tryGetWorkspaceConfig = _chunkVKTQOXWOcjs.tryGetWorkspaceConfig;
@@ -17,14 +17,28 @@ type GetWorkspaceConfigOptions = {
17
17
  * A directory inside the monorepo to start searching from
18
18
  */
19
19
  cwd?: string;
20
+ /**
21
+ * Use the default config if no config file is found
22
+ *
23
+ * @defaultValue true
24
+ */
25
+ useDefault?: boolean;
20
26
  };
21
27
  /**
22
28
  * Get the config for the current Storm workspace
23
29
  *
24
30
  * @param skipLogs - Skip writing logs to the console
25
31
  * @param options - Options for getting the workspace config
26
- * @returns The config for the current Storm workspace
32
+ * @returns The config for the current Storm workspace, or throws an error if the config file could not be loaded
27
33
  */
28
34
  declare const getWorkspaceConfig: (skipLogs?: boolean, options?: GetWorkspaceConfigOptions) => Promise<StormWorkspaceConfig>;
35
+ /**
36
+ * Try to get the config for the current Storm workspace
37
+ *
38
+ * @param skipLogs - Skip writing logs to the console
39
+ * @param options - Options for getting the workspace config
40
+ * @returns The config for the current Storm workspace, or undefined if the config file could not be loaded
41
+ */
42
+ declare const tryGetWorkspaceConfig: (skipLogs?: boolean, options?: GetWorkspaceConfigOptions) => Promise<StormWorkspaceConfig | undefined>;
29
43
 
30
- export { type GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig };
44
+ export { type GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig, tryGetWorkspaceConfig };
@@ -17,14 +17,28 @@ type GetWorkspaceConfigOptions = {
17
17
  * A directory inside the monorepo to start searching from
18
18
  */
19
19
  cwd?: string;
20
+ /**
21
+ * Use the default config if no config file is found
22
+ *
23
+ * @defaultValue true
24
+ */
25
+ useDefault?: boolean;
20
26
  };
21
27
  /**
22
28
  * Get the config for the current Storm workspace
23
29
  *
24
30
  * @param skipLogs - Skip writing logs to the console
25
31
  * @param options - Options for getting the workspace config
26
- * @returns The config for the current Storm workspace
32
+ * @returns The config for the current Storm workspace, or throws an error if the config file could not be loaded
27
33
  */
28
34
  declare const getWorkspaceConfig: (skipLogs?: boolean, options?: GetWorkspaceConfigOptions) => Promise<StormWorkspaceConfig>;
35
+ /**
36
+ * Try to get the config for the current Storm workspace
37
+ *
38
+ * @param skipLogs - Skip writing logs to the console
39
+ * @param options - Options for getting the workspace config
40
+ * @returns The config for the current Storm workspace, or undefined if the config file could not be loaded
41
+ */
42
+ declare const tryGetWorkspaceConfig: (skipLogs?: boolean, options?: GetWorkspaceConfigOptions) => Promise<StormWorkspaceConfig | undefined>;
29
43
 
30
- export { type GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig };
44
+ export { type GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig, tryGetWorkspaceConfig };
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  getConfig,
3
- getWorkspaceConfig
4
- } from "./chunk-DEXVJDLK.js";
5
- import "./chunk-ELWLSF4O.js";
6
- import "./chunk-BDMLGH55.js";
3
+ getWorkspaceConfig,
4
+ tryGetWorkspaceConfig
5
+ } from "./chunk-JT77N7TT.js";
6
+ import "./chunk-BC2QD5QZ.js";
7
+ import "./chunk-GYFE7GKG.js";
7
8
  import "./chunk-I6MMCLIA.js";
8
9
  import "./chunk-SFDIRWJY.js";
9
10
  import "./chunk-2HSUVM5I.js";
@@ -25,5 +26,6 @@ import "./chunk-3QAWRU2B.js";
25
26
  import "./chunk-SHUYVCID.js";
26
27
  export {
27
28
  getConfig,
28
- getWorkspaceConfig
29
+ getWorkspaceConfig,
30
+ tryGetWorkspaceConfig
29
31
  };
package/dist/index.cjs CHANGED
@@ -5,17 +5,19 @@ var _chunkZFRJR2OYcjs = require('./chunk-ZFRJR2OY.cjs');
5
5
 
6
6
 
7
7
 
8
- var _chunkSU4ISMF5cjs = require('./chunk-SU4ISMF5.cjs');
9
8
 
9
+ var _chunkVKTQOXWOcjs = require('./chunk-VKTQOXWO.cjs');
10
10
 
11
11
 
12
12
 
13
- var _chunk32N55O6Lcjs = require('./chunk-32N55O6L.cjs');
13
+
14
+
15
+ var _chunkHFKBN5GEcjs = require('./chunk-HFKBN5GE.cjs');
14
16
  require('./chunk-E4R6RI5D.cjs');
15
17
 
16
18
 
17
19
 
18
- var _chunkBRZ2YPOBcjs = require('./chunk-BRZ2YPOB.cjs');
20
+ var _chunk4AM2CTWOcjs = require('./chunk-4AM2CTWO.cjs');
19
21
  require('./chunk-UNXQ2AR4.cjs');
20
22
 
21
23
 
@@ -167,4 +169,6 @@ require('./chunk-USNT2KNT.cjs');
167
169
 
168
170
 
169
171
 
170
- exports.CONSOLE_ICONS = _chunkKBPYCUVGcjs.CONSOLE_ICONS; exports.DEFAULT_COLOR_CONFIG = _chunkYSSMM2WQcjs.DEFAULT_COLOR_CONFIG; exports.LARGE_BUFFER = _chunkCHA6766Ncjs.LARGE_BUFFER; exports.LogLevel = _chunkC5OTFOQBcjs.LogLevel; exports.LogLevelLabel = _chunkC5OTFOQBcjs.LogLevelLabel; exports.applyWorkspaceBaseTokens = _chunkWZSBZDAUcjs.applyWorkspaceBaseTokens; exports.applyWorkspaceProjectTokens = _chunkWZSBZDAUcjs.applyWorkspaceProjectTokens; exports.applyWorkspaceTokens = _chunkWZSBZDAUcjs.applyWorkspaceTokens; exports.basename = _chunkE5AUC34Gcjs.basename; exports.correctPaths = _chunkE5AUC34Gcjs.correctPaths; exports.createConfigExtension = _chunk32N55O6Lcjs.createConfigExtension; exports.createLogger = _chunkZFRJR2OYcjs.createLogger; exports.createStormWorkspaceConfig = _chunk32N55O6Lcjs.createStormWorkspaceConfig; exports.dirname = _chunkE5AUC34Gcjs.dirname; exports.exitWithError = _chunkSIU3CSEYcjs.exitWithError; exports.exitWithSuccess = _chunkSIU3CSEYcjs.exitWithSuccess; exports.extname = _chunkE5AUC34Gcjs.extname; exports.findFileName = _chunkVULQ4N4Zcjs.findFileName; exports.findWorkspaceRoot = _chunk6LIPH2JWcjs.findWorkspaceRoot; exports.findWorkspaceRootSafe = _chunk6LIPH2JWcjs.findWorkspaceRootSafe; exports.format = _chunkE5AUC34Gcjs.format; exports.formatLogMessage = _chunkDLO4KL2Zcjs.formatLogMessage; exports.formatTimestamp = _chunkIGUYFX5Bcjs.formatTimestamp; exports.getChalk = _chunkVICC23NVcjs.getChalk; exports.getConfig = _chunkSU4ISMF5cjs.getConfig; exports.getConfigEnv = _chunkGBY7M6XXcjs.getConfigEnv; exports.getConfigFile = _chunkBRZ2YPOBcjs.getConfigFile; exports.getConfigFileByName = _chunkBRZ2YPOBcjs.getConfigFileByName; exports.getDefaultConfig = _chunkYSSMM2WQcjs.getDefaultConfig; exports.getExtensionEnv = _chunkGBY7M6XXcjs.getExtensionEnv; exports.getLogFn = _chunkDLO4KL2Zcjs.getLogFn; exports.getLogLevel = _chunk7HCO3WBNcjs.getLogLevel; exports.getLogLevelLabel = _chunk7HCO3WBNcjs.getLogLevelLabel; exports.getStopwatch = _chunkDLO4KL2Zcjs.getStopwatch; exports.getWorkspaceConfig = _chunkSU4ISMF5cjs.getWorkspaceConfig; exports.handleProcess = _chunkSIU3CSEYcjs.handleProcess; exports.isAbsolute = _chunkE5AUC34Gcjs.isAbsolute; exports.isUnicodeSupported = _chunkOSY5X2AIcjs.isUnicodeSupported; exports.isVerbose = _chunk7HCO3WBNcjs.isVerbose; exports.joinPaths = _chunkE5AUC34Gcjs.joinPaths; exports.loadStormWorkspaceConfig = _chunk32N55O6Lcjs.loadStormWorkspaceConfig; exports.normalizeString = _chunkE5AUC34Gcjs.normalizeString; exports.normalizeWindowsPath = _chunkE5AUC34Gcjs.normalizeWindowsPath; exports.parse = _chunkE5AUC34Gcjs.parse; exports.relative = _chunkE5AUC34Gcjs.relative; exports.removeExtension = _chunkVULQ4N4Zcjs.removeExtension; exports.resolve = _chunkE5AUC34Gcjs.resolve; exports.run = _chunkCHA6766Ncjs.run; exports.runAsync = _chunkCHA6766Ncjs.runAsync; exports.sep = _chunkE5AUC34Gcjs.sep; exports.setConfigEnv = _chunk2LQBYJT5cjs.setConfigEnv; exports.setExtensionEnv = _chunk2LQBYJT5cjs.setExtensionEnv; exports.toNamespacedPath = _chunkE5AUC34Gcjs.toNamespacedPath; exports.writeDebug = _chunkDLO4KL2Zcjs.writeDebug; exports.writeError = _chunkDLO4KL2Zcjs.writeError; exports.writeFatal = _chunkDLO4KL2Zcjs.writeFatal; exports.writeInfo = _chunkDLO4KL2Zcjs.writeInfo; exports.writeSuccess = _chunkDLO4KL2Zcjs.writeSuccess; exports.writeSystem = _chunkDLO4KL2Zcjs.writeSystem; exports.writeTrace = _chunkDLO4KL2Zcjs.writeTrace; exports.writeWarning = _chunkDLO4KL2Zcjs.writeWarning;
172
+
173
+
174
+ exports.CONSOLE_ICONS = _chunkKBPYCUVGcjs.CONSOLE_ICONS; exports.DEFAULT_COLOR_CONFIG = _chunkYSSMM2WQcjs.DEFAULT_COLOR_CONFIG; exports.LARGE_BUFFER = _chunkCHA6766Ncjs.LARGE_BUFFER; exports.LogLevel = _chunkC5OTFOQBcjs.LogLevel; exports.LogLevelLabel = _chunkC5OTFOQBcjs.LogLevelLabel; exports.applyWorkspaceBaseTokens = _chunkWZSBZDAUcjs.applyWorkspaceBaseTokens; exports.applyWorkspaceProjectTokens = _chunkWZSBZDAUcjs.applyWorkspaceProjectTokens; exports.applyWorkspaceTokens = _chunkWZSBZDAUcjs.applyWorkspaceTokens; exports.basename = _chunkE5AUC34Gcjs.basename; exports.correctPaths = _chunkE5AUC34Gcjs.correctPaths; exports.createConfigExtension = _chunkHFKBN5GEcjs.createConfigExtension; exports.createLogger = _chunkZFRJR2OYcjs.createLogger; exports.createStormWorkspaceConfig = _chunkHFKBN5GEcjs.createStormWorkspaceConfig; exports.dirname = _chunkE5AUC34Gcjs.dirname; exports.exitWithError = _chunkSIU3CSEYcjs.exitWithError; exports.exitWithSuccess = _chunkSIU3CSEYcjs.exitWithSuccess; exports.extname = _chunkE5AUC34Gcjs.extname; exports.findFileName = _chunkVULQ4N4Zcjs.findFileName; exports.findWorkspaceRoot = _chunk6LIPH2JWcjs.findWorkspaceRoot; exports.findWorkspaceRootSafe = _chunk6LIPH2JWcjs.findWorkspaceRootSafe; exports.format = _chunkE5AUC34Gcjs.format; exports.formatLogMessage = _chunkDLO4KL2Zcjs.formatLogMessage; exports.formatTimestamp = _chunkIGUYFX5Bcjs.formatTimestamp; exports.getChalk = _chunkVICC23NVcjs.getChalk; exports.getConfig = _chunkVKTQOXWOcjs.getConfig; exports.getConfigEnv = _chunkGBY7M6XXcjs.getConfigEnv; exports.getConfigFile = _chunk4AM2CTWOcjs.getConfigFile; exports.getConfigFileByName = _chunk4AM2CTWOcjs.getConfigFileByName; exports.getDefaultConfig = _chunkYSSMM2WQcjs.getDefaultConfig; exports.getExtensionEnv = _chunkGBY7M6XXcjs.getExtensionEnv; exports.getLogFn = _chunkDLO4KL2Zcjs.getLogFn; exports.getLogLevel = _chunk7HCO3WBNcjs.getLogLevel; exports.getLogLevelLabel = _chunk7HCO3WBNcjs.getLogLevelLabel; exports.getStopwatch = _chunkDLO4KL2Zcjs.getStopwatch; exports.getWorkspaceConfig = _chunkVKTQOXWOcjs.getWorkspaceConfig; exports.handleProcess = _chunkSIU3CSEYcjs.handleProcess; exports.isAbsolute = _chunkE5AUC34Gcjs.isAbsolute; exports.isUnicodeSupported = _chunkOSY5X2AIcjs.isUnicodeSupported; exports.isVerbose = _chunk7HCO3WBNcjs.isVerbose; exports.joinPaths = _chunkE5AUC34Gcjs.joinPaths; exports.loadStormWorkspaceConfig = _chunkHFKBN5GEcjs.loadStormWorkspaceConfig; exports.normalizeString = _chunkE5AUC34Gcjs.normalizeString; exports.normalizeWindowsPath = _chunkE5AUC34Gcjs.normalizeWindowsPath; exports.parse = _chunkE5AUC34Gcjs.parse; exports.relative = _chunkE5AUC34Gcjs.relative; exports.removeExtension = _chunkVULQ4N4Zcjs.removeExtension; exports.resolve = _chunkE5AUC34Gcjs.resolve; exports.run = _chunkCHA6766Ncjs.run; exports.runAsync = _chunkCHA6766Ncjs.runAsync; exports.sep = _chunkE5AUC34Gcjs.sep; exports.setConfigEnv = _chunk2LQBYJT5cjs.setConfigEnv; exports.setExtensionEnv = _chunk2LQBYJT5cjs.setExtensionEnv; exports.toNamespacedPath = _chunkE5AUC34Gcjs.toNamespacedPath; exports.tryGetWorkspaceConfig = _chunkVKTQOXWOcjs.tryGetWorkspaceConfig; exports.tryLoadStormWorkspaceConfig = _chunkHFKBN5GEcjs.tryLoadStormWorkspaceConfig; exports.writeDebug = _chunkDLO4KL2Zcjs.writeDebug; exports.writeError = _chunkDLO4KL2Zcjs.writeError; exports.writeFatal = _chunkDLO4KL2Zcjs.writeFatal; exports.writeInfo = _chunkDLO4KL2Zcjs.writeInfo; exports.writeSuccess = _chunkDLO4KL2Zcjs.writeSuccess; exports.writeSystem = _chunkDLO4KL2Zcjs.writeSystem; exports.writeTrace = _chunkDLO4KL2Zcjs.writeTrace; exports.writeWarning = _chunkDLO4KL2Zcjs.writeWarning;
package/dist/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { getConfigFile, getConfigFileByName } from './config-file/get-config-file.cjs';
2
- export { createConfigExtension, createStormWorkspaceConfig, loadStormWorkspaceConfig } from './create-storm-config.cjs';
2
+ export { createConfigExtension, createStormWorkspaceConfig, loadStormWorkspaceConfig, tryLoadStormWorkspaceConfig } from './create-storm-config.cjs';
3
3
  export { getConfigEnv, getExtensionEnv } from './env/get-env.cjs';
4
4
  export { setConfigEnv, setExtensionEnv } from './env/set-env.cjs';
5
- export { GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig } from './get-config.cjs';
5
+ export { GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig, tryGetWorkspaceConfig } from './get-config.cjs';
6
6
  export { GetChalkReturn, getChalk } from './logger/chalk.cjs';
7
7
  export { FormatLogMessageOptions, formatLogMessage, getLogFn, getStopwatch, writeDebug, writeError, writeFatal, writeInfo, writeSuccess, writeSystem, writeTrace, writeWarning } from './logger/console.cjs';
8
8
  export { CONSOLE_ICONS } from './logger/console-icons.cjs';
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { getConfigFile, getConfigFileByName } from './config-file/get-config-file.js';
2
- export { createConfigExtension, createStormWorkspaceConfig, loadStormWorkspaceConfig } from './create-storm-config.js';
2
+ export { createConfigExtension, createStormWorkspaceConfig, loadStormWorkspaceConfig, tryLoadStormWorkspaceConfig } from './create-storm-config.js';
3
3
  export { getConfigEnv, getExtensionEnv } from './env/get-env.js';
4
4
  export { setConfigEnv, setExtensionEnv } from './env/set-env.js';
5
- export { GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig } from './get-config.js';
5
+ export { GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig, tryGetWorkspaceConfig } from './get-config.js';
6
6
  export { GetChalkReturn, getChalk } from './logger/chalk.js';
7
7
  export { FormatLogMessageOptions, formatLogMessage, getLogFn, getStopwatch, writeDebug, writeError, writeFatal, writeInfo, writeSuccess, writeSystem, writeTrace, writeWarning } from './logger/console.js';
8
8
  export { CONSOLE_ICONS } from './logger/console-icons.js';
package/dist/index.js CHANGED
@@ -4,18 +4,20 @@ import {
4
4
  } from "./chunk-OB4WNEXN.js";
5
5
  import {
6
6
  getConfig,
7
- getWorkspaceConfig
8
- } from "./chunk-DEXVJDLK.js";
7
+ getWorkspaceConfig,
8
+ tryGetWorkspaceConfig
9
+ } from "./chunk-JT77N7TT.js";
9
10
  import {
10
11
  createConfigExtension,
11
12
  createStormWorkspaceConfig,
12
- loadStormWorkspaceConfig
13
- } from "./chunk-ELWLSF4O.js";
13
+ loadStormWorkspaceConfig,
14
+ tryLoadStormWorkspaceConfig
15
+ } from "./chunk-BC2QD5QZ.js";
14
16
  import "./chunk-SABD7NYM.js";
15
17
  import {
16
18
  getConfigFile,
17
19
  getConfigFileByName
18
- } from "./chunk-BDMLGH55.js";
20
+ } from "./chunk-GYFE7GKG.js";
19
21
  import "./chunk-I6MMCLIA.js";
20
22
  import {
21
23
  exitWithError,
@@ -159,6 +161,8 @@ export {
159
161
  setConfigEnv,
160
162
  setExtensionEnv,
161
163
  toNamespacedPath,
164
+ tryGetWorkspaceConfig,
165
+ tryLoadStormWorkspaceConfig,
162
166
  writeDebug,
163
167
  writeError,
164
168
  writeFatal,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/config-tools",
3
- "version": "1.162.17",
3
+ "version": "1.163.3",
4
4
  "type": "module",
5
5
  "description": "⚡The Storm-Ops monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.",
6
6
  "repository": {
@@ -229,7 +229,7 @@
229
229
  "sqlite": "^5.1.1",
230
230
  "zod": "^3.24.0"
231
231
  },
232
- "devDependencies": { "@types/node": "^22.10.2", "tsup": "8.3.5" },
232
+ "devDependencies": { "@types/node": "^22.10.2", "tsup": "8.4.0" },
233
233
  "publishConfig": { "access": "public" },
234
234
  "sideEffects": false
235
235
  }