@storm-software/config-tools 1.147.0 → 1.147.1

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.
Files changed (66) hide show
  1. package/README.md +1 -1
  2. package/bin/config.cjs +41 -24
  3. package/bin/config.js +41 -24
  4. package/dist/{chunk-5GDS63DU.js → chunk-23WUCNWX.js} +1 -1
  5. package/dist/{chunk-FI7WN47Y.cjs → chunk-2IKEUEGY.cjs} +7 -7
  6. package/dist/{chunk-UJPJQXGA.cjs → chunk-4DLP6LZY.cjs} +2 -2
  7. package/dist/{chunk-JHFMRUZ3.js → chunk-6OM23J4N.js} +1 -1
  8. package/dist/{chunk-WRGFZXJE.js → chunk-6T3V5XJK.js} +2 -1
  9. package/dist/{chunk-LXAJWZ37.cjs → chunk-7JBLPO7O.cjs} +10 -9
  10. package/dist/{chunk-5K6CXYFF.cjs → chunk-C4RHWKK6.cjs} +2 -2
  11. package/dist/{chunk-HDI7BCVL.js → chunk-CCO2PASC.js} +3 -2
  12. package/dist/{chunk-32ACHDIU.cjs → chunk-DD5UX56L.cjs} +3 -0
  13. package/dist/{chunk-CSIXX72P.js → chunk-FDJZUZKJ.js} +10 -10
  14. package/dist/{chunk-2V7MZG6O.cjs → chunk-GS25DBTT.cjs} +18 -18
  15. package/dist/{chunk-HFGQYKYH.js → chunk-GZFXEQPB.js} +2 -2
  16. package/dist/{chunk-P5GFKFI6.cjs → chunk-HKZSDZZ4.cjs} +2 -2
  17. package/dist/{chunk-MAMYTWWY.cjs → chunk-KNLWLA7O.cjs} +20 -13
  18. package/dist/{chunk-4E4DSFC4.js → chunk-OIEEXHKO.js} +20 -13
  19. package/dist/{chunk-2VKMRURF.js → chunk-P7Q327IR.js} +3 -0
  20. package/dist/{chunk-3ONZMUOD.js → chunk-Q7MMWMEN.js} +2 -2
  21. package/dist/{chunk-JXLUUN7Z.cjs → chunk-SVQE7WVB.cjs} +2 -1
  22. package/dist/{chunk-XYV3B7TT.cjs → chunk-SWX2MJHI.cjs} +5 -2
  23. package/dist/{chunk-ZQWK7Y2J.cjs → chunk-TZO4SYUO.cjs} +9 -9
  24. package/dist/{chunk-JCGZTN5H.js → chunk-UZ5SHCFX.js} +1 -1
  25. package/dist/{chunk-JVA7N2JV.js → chunk-WMWOH7LS.js} +9 -7
  26. package/dist/{chunk-QPSRWTSZ.cjs → chunk-XIVRONKM.cjs} +11 -11
  27. package/dist/{chunk-X7BEPYRX.js → chunk-XQPQRRG3.js} +5 -2
  28. package/dist/{chunk-MPQ5PFCS.cjs → chunk-XVIPFWZW.cjs} +12 -10
  29. package/dist/{chunk-MICZPWNF.js → chunk-ZU6V7IRV.js} +1 -1
  30. package/dist/config-file/get-config-file.cjs +9 -9
  31. package/dist/config-file/get-config-file.js +8 -8
  32. package/dist/config-file/index.cjs +9 -9
  33. package/dist/config-file/index.js +8 -8
  34. package/dist/create-storm-config.cjs +12 -12
  35. package/dist/create-storm-config.js +11 -11
  36. package/dist/env/get-env.cjs +3 -3
  37. package/dist/env/get-env.js +2 -2
  38. package/dist/env/index.cjs +4 -4
  39. package/dist/env/index.js +3 -3
  40. package/dist/env/set-env.cjs +2 -2
  41. package/dist/env/set-env.js +1 -1
  42. package/dist/get-config.cjs +13 -13
  43. package/dist/get-config.js +12 -12
  44. package/dist/index.cjs +14 -14
  45. package/dist/index.js +13 -13
  46. package/dist/logger/console.cjs +6 -6
  47. package/dist/logger/console.js +5 -5
  48. package/dist/logger/create-logger.cjs +7 -7
  49. package/dist/logger/create-logger.js +6 -6
  50. package/dist/logger/index.cjs +7 -7
  51. package/dist/logger/index.js +6 -6
  52. package/dist/utilities/apply-workspace-tokens.cjs +4 -4
  53. package/dist/utilities/apply-workspace-tokens.js +3 -3
  54. package/dist/utilities/find-up.cjs +2 -2
  55. package/dist/utilities/find-up.d.cts +1 -1
  56. package/dist/utilities/find-up.d.ts +1 -1
  57. package/dist/utilities/find-up.js +1 -1
  58. package/dist/utilities/find-workspace-root.cjs +3 -3
  59. package/dist/utilities/find-workspace-root.js +2 -2
  60. package/dist/utilities/get-default-config.cjs +5 -5
  61. package/dist/utilities/get-default-config.js +4 -4
  62. package/dist/utilities/index.cjs +8 -8
  63. package/dist/utilities/index.js +7 -7
  64. package/dist/utilities/process-handler.cjs +7 -7
  65. package/dist/utilities/process-handler.js +6 -6
  66. package/package.json +1 -1
@@ -1,27 +1,27 @@
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 _chunkMPQ5PFCScjs = require('./chunk-MPQ5PFCS.cjs');
3
+ var _chunkXVIPFWZWcjs = require('./chunk-XVIPFWZW.cjs');
4
4
 
5
5
 
6
6
 
7
7
 
8
- var _chunk5K6CXYFFcjs = require('./chunk-5K6CXYFF.cjs');
8
+ var _chunkC4RHWKK6cjs = require('./chunk-C4RHWKK6.cjs');
9
9
 
10
10
 
11
- var _chunkFI7WN47Ycjs = require('./chunk-FI7WN47Y.cjs');
11
+ var _chunk2IKEUEGYcjs = require('./chunk-2IKEUEGY.cjs');
12
12
 
13
13
 
14
- var _chunkMAMYTWWYcjs = require('./chunk-MAMYTWWY.cjs');
14
+ var _chunkKNLWLA7Ocjs = require('./chunk-KNLWLA7O.cjs');
15
15
 
16
16
 
17
- var _chunk32ACHDIUcjs = require('./chunk-32ACHDIU.cjs');
17
+ var _chunkDD5UX56Lcjs = require('./chunk-DD5UX56L.cjs');
18
18
 
19
19
 
20
20
 
21
- var _chunkLXAJWZ37cjs = require('./chunk-LXAJWZ37.cjs');
21
+ var _chunk7JBLPO7Ocjs = require('./chunk-7JBLPO7O.cjs');
22
22
 
23
23
 
24
- var _chunkJXLUUN7Zcjs = require('./chunk-JXLUUN7Z.cjs');
24
+ var _chunkSVQE7WVBcjs = require('./chunk-SVQE7WVB.cjs');
25
25
 
26
26
 
27
27
  var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
@@ -35,17 +35,17 @@ var createStormConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, as
35
35
  if (!_optionalChain([_static_cache, 'optionalAccess', _ => _.data]) || !_optionalChain([_static_cache, 'optionalAccess', _2 => _2.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
36
36
  let _workspaceRoot = workspaceRoot;
37
37
  if (!_workspaceRoot) {
38
- _workspaceRoot = _chunkMAMYTWWYcjs.findWorkspaceRoot.call(void 0, );
38
+ _workspaceRoot = _chunkKNLWLA7Ocjs.findWorkspaceRoot.call(void 0, );
39
39
  }
40
- const configEnv = _chunkLXAJWZ37cjs.getConfigEnv.call(void 0, );
41
- const defaultConfig = await _chunkFI7WN47Ycjs.getDefaultConfig.call(void 0, _workspaceRoot);
42
- const configFile = await _chunkMPQ5PFCScjs.getConfigFile.call(void 0, _workspaceRoot);
40
+ const configEnv = _chunk7JBLPO7Ocjs.getConfigEnv.call(void 0, );
41
+ const defaultConfig = await _chunk2IKEUEGYcjs.getDefaultConfig.call(void 0, _workspaceRoot);
42
+ const configFile = await _chunkXVIPFWZWcjs.getConfigFile.call(void 0, _workspaceRoot);
43
43
  if (!configFile && !skipLogs) {
44
- _chunk5K6CXYFFcjs.writeWarning.call(void 0, "No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.json` file to the root of your workspace if it is not.\n", {
44
+ _chunkC4RHWKK6cjs.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", {
45
45
  logLevel: "all"
46
46
  });
47
47
  }
48
- result = await _chunkJXLUUN7Zcjs.StormConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
48
+ result = await _chunkSVQE7WVBcjs.StormConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
49
49
  result.workspaceRoot ??= _workspaceRoot;
50
50
  } else {
51
51
  result = _static_cache.data;
@@ -69,7 +69,7 @@ var createConfigExtension = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0
69
69
  if (_extension_cache.has(extension_cache_key)) {
70
70
  return _extension_cache.get(extension_cache_key);
71
71
  }
72
- let extension = _chunkLXAJWZ37cjs.getExtensionEnv.call(void 0, extensionName);
72
+ let extension = _chunk7JBLPO7Ocjs.getExtensionEnv.call(void 0, extensionName);
73
73
  if (schema) {
74
74
  extension = schema.parse(extension);
75
75
  }
@@ -78,10 +78,10 @@ var createConfigExtension = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0
78
78
  }, "createConfigExtension");
79
79
  var loadStormConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (workspaceRoot, skipLogs = false) => {
80
80
  const config = await createStormConfig(void 0, void 0, workspaceRoot, skipLogs);
81
- _chunk32ACHDIUcjs.setConfigEnv.call(void 0, config);
82
- if (!skipLogs) {
83
- _chunk5K6CXYFFcjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm configuration:
84
- ${_chunk5K6CXYFFcjs.formatLogMessage.call(void 0, config)}`, config);
81
+ _chunkDD5UX56Lcjs.setConfigEnv.call(void 0, config);
82
+ if (!skipLogs && !config.skipConfigLogging) {
83
+ _chunkC4RHWKK6cjs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
84
+ ${_chunkC4RHWKK6cjs.formatLogMessage.call(void 0, config)}`, config);
85
85
  }
86
86
  return config;
87
87
  }, "loadStormConfig");
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  findWorkspaceRoot
3
- } from "./chunk-4E4DSFC4.js";
3
+ } from "./chunk-OIEEXHKO.js";
4
4
  import {
5
5
  STORM_DEFAULT_HOMEPAGE,
6
6
  STORM_DEFAULT_LICENSE
7
- } from "./chunk-WRGFZXJE.js";
7
+ } from "./chunk-6T3V5XJK.js";
8
8
  import {
9
9
  joinPaths
10
10
  } from "./chunk-MLUBD3PU.js";
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk2V7MZG6Ocjs = require('./chunk-2V7MZG6O.cjs');
3
+ var _chunkGS25DBTTcjs = require('./chunk-GS25DBTT.cjs');
4
4
 
5
5
 
6
6
  var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
7
7
 
8
8
  // src/get-config.ts
9
9
  var getConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (workspaceRoot, skipLogs = false) => {
10
- return _chunk2V7MZG6Ocjs.loadStormConfig.call(void 0, workspaceRoot, skipLogs);
10
+ return _chunkGS25DBTTcjs.loadStormConfig.call(void 0, workspaceRoot, skipLogs);
11
11
  }, "getConfig");
12
12
  var getWorkspaceConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (skipLogs = false) => {
13
13
  return getConfig(void 0, skipLogs);
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunkXYV3B7TTcjs = require('./chunk-XYV3B7TT.cjs');
3
+ var _chunkSWX2MJHIcjs = require('./chunk-SWX2MJHI.cjs');
4
4
 
5
5
 
6
6
  var _chunkHESFC24Zcjs = require('./chunk-HESFC24Z.cjs');
@@ -10,17 +10,17 @@ var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
10
10
 
11
11
  // src/utilities/find-workspace-root.ts
12
12
  var rootFiles = [
13
- "storm.json",
14
- "storm.json",
15
- "storm.yaml",
16
- "storm.yml",
17
- "storm.js",
18
- "storm.ts",
19
- ".storm.json",
20
- ".storm.yaml",
21
- ".storm.yml",
22
- ".storm.js",
23
- ".storm.ts",
13
+ "storm-workspace.json",
14
+ "storm-workspace.json",
15
+ "storm-workspace.yaml",
16
+ "storm-workspace.yml",
17
+ "storm-workspace.js",
18
+ "storm-workspace.ts",
19
+ ".storm-workspace.json",
20
+ ".storm-workspace.yaml",
21
+ ".storm-workspace.yml",
22
+ ".storm-workspace.js",
23
+ ".storm-workspace.ts",
24
24
  "lerna.json",
25
25
  "nx.json",
26
26
  "turbo.json",
@@ -44,11 +44,18 @@ var rootFiles = [
44
44
  "pnpm-lock.yml",
45
45
  "bun.lockb"
46
46
  ];
47
+ var rootDirectories = [
48
+ ".storm-workspace",
49
+ ".nx",
50
+ ".github",
51
+ ".vscode",
52
+ ".verdaccio"
53
+ ];
47
54
  function findWorkspaceRootSafe(pathInsideMonorepo) {
48
55
  if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
49
56
  return _chunkHESFC24Zcjs.correctPaths.call(void 0, _nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH)));
50
57
  }
51
- return _chunkHESFC24Zcjs.correctPaths.call(void 0, _chunkXYV3B7TTcjs.findFolderUp.call(void 0, _nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles));
58
+ return _chunkHESFC24Zcjs.correctPaths.call(void 0, _chunkSWX2MJHIcjs.findFolderUp.call(void 0, _nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles, rootDirectories));
52
59
  }
53
60
  _chunkUSNT2KNTcjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
54
61
  function findWorkspaceRoot(pathInsideMonorepo) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  findFolderUp
3
- } from "./chunk-X7BEPYRX.js";
3
+ } from "./chunk-XQPQRRG3.js";
4
4
  import {
5
5
  correctPaths
6
6
  } from "./chunk-MLUBD3PU.js";
@@ -10,17 +10,17 @@ import {
10
10
 
11
11
  // src/utilities/find-workspace-root.ts
12
12
  var rootFiles = [
13
- "storm.json",
14
- "storm.json",
15
- "storm.yaml",
16
- "storm.yml",
17
- "storm.js",
18
- "storm.ts",
19
- ".storm.json",
20
- ".storm.yaml",
21
- ".storm.yml",
22
- ".storm.js",
23
- ".storm.ts",
13
+ "storm-workspace.json",
14
+ "storm-workspace.json",
15
+ "storm-workspace.yaml",
16
+ "storm-workspace.yml",
17
+ "storm-workspace.js",
18
+ "storm-workspace.ts",
19
+ ".storm-workspace.json",
20
+ ".storm-workspace.yaml",
21
+ ".storm-workspace.yml",
22
+ ".storm-workspace.js",
23
+ ".storm-workspace.ts",
24
24
  "lerna.json",
25
25
  "nx.json",
26
26
  "turbo.json",
@@ -44,11 +44,18 @@ var rootFiles = [
44
44
  "pnpm-lock.yml",
45
45
  "bun.lockb"
46
46
  ];
47
+ var rootDirectories = [
48
+ ".storm-workspace",
49
+ ".nx",
50
+ ".github",
51
+ ".vscode",
52
+ ".verdaccio"
53
+ ];
47
54
  function findWorkspaceRootSafe(pathInsideMonorepo) {
48
55
  if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
49
56
  return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
50
57
  }
51
- return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles));
58
+ return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
52
59
  }
53
60
  __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
54
61
  function findWorkspaceRoot(pathInsideMonorepo) {
@@ -160,6 +160,9 @@ var setConfigEnv = /* @__PURE__ */ __name((config) => {
160
160
  process.env.NX_VERBOSE_LOGGING = String(getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false);
161
161
  process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
162
162
  }
163
+ if (config.skipConfigLogging !== void 0) {
164
+ process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
165
+ }
163
166
  process.env[`${prefix}CONFIG`] = JSON.stringify(config);
164
167
  for (const key of Object.keys(config.extensions ?? {})) {
165
168
  config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getLogFn,
3
3
  getStopwatch
4
- } from "./chunk-5GDS63DU.js";
4
+ } from "./chunk-23WUCNWX.js";
5
5
  import {
6
6
  findWorkspaceRoot
7
- } from "./chunk-4E4DSFC4.js";
7
+ } from "./chunk-OIEEXHKO.js";
8
8
  import {
9
9
  LogLevel
10
10
  } from "./chunk-POXTJ6GF.js";
@@ -102,7 +102,7 @@ var WorkspaceDirectoryConfigSchema = _zod2.default.object({
102
102
  build: _zod2.default.string().trim().default("dist").describe("The directory used to store the workspace's distributable files after a build (relative to the workspace root)")
103
103
  }).describe("Various directories used by the workspace to store data, cache, and configuration files");
104
104
  var StormConfigSchema = _zod2.default.object({
105
- $schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
105
+ $schema: _zod2.default.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm-workspace.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
106
106
  extends: ExtendsSchema.optional(),
107
107
  name: _zod2.default.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
108
108
  namespace: _zod2.default.string().trim().toLowerCase().optional().describe("The namespace of the package"),
@@ -144,6 +144,7 @@ var StormConfigSchema = _zod2.default.object({
144
144
  "trace",
145
145
  "all"
146
146
  ]).default("info").describe("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`)."),
147
+ skipConfigLogging: _zod2.default.boolean().optional().describe("Should the logging of the current Storm Workspace configuration be skipped?"),
147
148
  registry: RegistryConfigSchema,
148
149
  configFile: _zod2.default.string().trim().nullable().default(null).describe("The filepath of the Storm config. When this field is null, no config file was found in the current workspace."),
149
150
  colors: ColorConfigSchema.or(ColorConfigMapSchema).describe("Storm theme config values used for styling various package elements"),
@@ -7,14 +7,17 @@ var _fs = require('fs');
7
7
  var _path = require('path');
8
8
  var MAX_PATH_SEARCH_DEPTH = 30;
9
9
  var depth = 0;
10
- function findFolderUp(startPath, endFileNames) {
10
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
11
11
  const _startPath = _nullishCoalesce(startPath, () => ( process.cwd()));
12
+ if (endDirectoryNames.some((endDirName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endDirName)))) {
13
+ return _startPath;
14
+ }
12
15
  if (endFileNames.some((endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName)))) {
13
16
  return _startPath;
14
17
  }
15
18
  if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
16
19
  const parent = _path.join.call(void 0, _startPath, "..");
17
- return findFolderUp(parent, endFileNames);
20
+ return findFolderUp(parent, endFileNames, endDirectoryNames);
18
21
  }
19
22
  return void 0;
20
23
  }
@@ -3,41 +3,41 @@
3
3
 
4
4
 
5
5
 
6
- var _chunk5K6CXYFFcjs = require('./chunk-5K6CXYFF.cjs');
6
+ var _chunkC4RHWKK6cjs = require('./chunk-C4RHWKK6.cjs');
7
7
 
8
8
 
9
9
  var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
10
10
 
11
11
  // src/utilities/process-handler.ts
12
12
  var exitWithError = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config) => {
13
- _chunk5K6CXYFFcjs.writeFatal.call(void 0, "Exiting script with an error status...", config);
13
+ _chunkC4RHWKK6cjs.writeFatal.call(void 0, "Exiting script with an error status...", config);
14
14
  process.exit(1);
15
15
  }, "exitWithError");
16
16
  var exitWithSuccess = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config) => {
17
- _chunk5K6CXYFFcjs.writeSuccess.call(void 0, "Script completed successfully. Exiting...", config);
17
+ _chunkC4RHWKK6cjs.writeSuccess.call(void 0, "Script completed successfully. Exiting...", config);
18
18
  process.exit(0);
19
19
  }, "exitWithSuccess");
20
20
  var handleProcess = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config) => {
21
- _chunk5K6CXYFFcjs.writeTrace.call(void 0, `Using the following arguments to process the script: ${process.argv.join(", ")}`, config);
21
+ _chunkC4RHWKK6cjs.writeTrace.call(void 0, `Using the following arguments to process the script: ${process.argv.join(", ")}`, config);
22
22
  process.on("unhandledRejection", (error) => {
23
- _chunk5K6CXYFFcjs.writeError.call(void 0, `An Unhandled Rejection occurred while running the program: ${error}`, config);
23
+ _chunkC4RHWKK6cjs.writeError.call(void 0, `An Unhandled Rejection occurred while running the program: ${error}`, config);
24
24
  exitWithError(config);
25
25
  });
26
26
  process.on("uncaughtException", (error) => {
27
- _chunk5K6CXYFFcjs.writeError.call(void 0, `An Uncaught Exception occurred while running the program: ${error.message}
27
+ _chunkC4RHWKK6cjs.writeError.call(void 0, `An Uncaught Exception occurred while running the program: ${error.message}
28
28
  Stacktrace: ${error.stack}`, config);
29
29
  exitWithError(config);
30
30
  });
31
31
  process.on("SIGTERM", (signal) => {
32
- _chunk5K6CXYFFcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
32
+ _chunkC4RHWKK6cjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
33
33
  exitWithError(config);
34
34
  });
35
35
  process.on("SIGINT", (signal) => {
36
- _chunk5K6CXYFFcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
36
+ _chunkC4RHWKK6cjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
37
37
  exitWithError(config);
38
38
  });
39
39
  process.on("SIGHUP", (signal) => {
40
- _chunk5K6CXYFFcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
40
+ _chunkC4RHWKK6cjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
41
41
  exitWithError(config);
42
42
  });
43
43
  }, "handleProcess");
@@ -3,7 +3,7 @@ import {
3
3
  writeFatal,
4
4
  writeSuccess,
5
5
  writeTrace
6
- } from "./chunk-5GDS63DU.js";
6
+ } from "./chunk-23WUCNWX.js";
7
7
  import {
8
8
  __name
9
9
  } from "./chunk-SHUYVCID.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  writeTrace
3
- } from "./chunk-5GDS63DU.js";
3
+ } from "./chunk-23WUCNWX.js";
4
4
  import {
5
5
  findWorkspaceRoot
6
- } from "./chunk-4E4DSFC4.js";
6
+ } from "./chunk-OIEEXHKO.js";
7
7
  import {
8
8
  joinPaths
9
9
  } from "./chunk-MLUBD3PU.js";
@@ -45,10 +45,10 @@ var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, opti
45
45
  }, "getConfigFileByName");
46
46
  var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames = []) => {
47
47
  const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
48
- const result = await getConfigFileByName("storm", workspacePath);
48
+ const result = await getConfigFileByName("storm-workspace", workspacePath);
49
49
  let config = result.config;
50
50
  const configFile = result.configFile;
51
- if (config && configFile && Object.keys(config).length > 0) {
51
+ if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
52
52
  writeTrace(`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
53
53
  logLevel: "all"
54
54
  });
@@ -57,9 +57,11 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
57
57
  const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
58
58
  for (const result2 of results) {
59
59
  if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
60
- writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
61
- logLevel: "all"
62
- });
60
+ if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
61
+ writeTrace(`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
62
+ logLevel: "all"
63
+ });
64
+ }
63
65
  config = defu(result2.config ?? {}, config ?? {});
64
66
  }
65
67
  }
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
3
 
4
- var _chunk5K6CXYFFcjs = require('./chunk-5K6CXYFF.cjs');
4
+ var _chunkC4RHWKK6cjs = require('./chunk-C4RHWKK6.cjs');
5
5
 
6
6
 
7
- var _chunkMAMYTWWYcjs = require('./chunk-MAMYTWWY.cjs');
7
+ var _chunkKNLWLA7Ocjs = require('./chunk-KNLWLA7O.cjs');
8
8
 
9
9
 
10
10
  var _chunkIRCFHYKZcjs = require('./chunk-IRCFHYKZ.cjs');
@@ -15,17 +15,17 @@ var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
15
15
  // src/logger/create-logger.ts
16
16
  var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
17
17
  async function createLogger(config) {
18
- const workspaceRoot = _chunkMAMYTWWYcjs.findWorkspaceRoot.call(void 0, );
18
+ const workspaceRoot = _chunkKNLWLA7Ocjs.findWorkspaceRoot.call(void 0, );
19
19
  if (!workspaceRoot) {
20
20
  throw new Error("Cannot find workspace root");
21
21
  }
22
- const writeFatal = _chunk5K6CXYFFcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.FATAL, config, _chalk2.default);
23
- const writeError = _chunk5K6CXYFFcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.ERROR, config, _chalk2.default);
24
- const writeWarning = _chunk5K6CXYFFcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.WARN, config, _chalk2.default);
25
- const writeInfo = _chunk5K6CXYFFcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.INFO, config, _chalk2.default);
26
- const writeSuccess = _chunk5K6CXYFFcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.SUCCESS, config, _chalk2.default);
27
- const writeDebug = _chunk5K6CXYFFcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.DEBUG, config, _chalk2.default);
28
- const writeTrace = _chunk5K6CXYFFcjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.DEBUG, config, _chalk2.default);
22
+ const writeFatal = _chunkC4RHWKK6cjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.FATAL, config, _chalk2.default);
23
+ const writeError = _chunkC4RHWKK6cjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.ERROR, config, _chalk2.default);
24
+ const writeWarning = _chunkC4RHWKK6cjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.WARN, config, _chalk2.default);
25
+ const writeInfo = _chunkC4RHWKK6cjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.INFO, config, _chalk2.default);
26
+ const writeSuccess = _chunkC4RHWKK6cjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.SUCCESS, config, _chalk2.default);
27
+ const writeDebug = _chunkC4RHWKK6cjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.DEBUG, config, _chalk2.default);
28
+ const writeTrace = _chunkC4RHWKK6cjs.getLogFn.call(void 0, _chunkIRCFHYKZcjs.LogLevel.DEBUG, config, _chalk2.default);
29
29
  return {
30
30
  fatal: writeFatal,
31
31
  error: writeError,
@@ -34,7 +34,7 @@ async function createLogger(config) {
34
34
  success: writeSuccess,
35
35
  debug: writeDebug,
36
36
  trace: writeTrace,
37
- getStopwatch: _chunk5K6CXYFFcjs.getStopwatch
37
+ getStopwatch: _chunkC4RHWKK6cjs.getStopwatch
38
38
  };
39
39
  }
40
40
  _chunkUSNT2KNTcjs.__name.call(void 0, createLogger, "createLogger");
@@ -7,14 +7,17 @@ import { existsSync } from "node:fs";
7
7
  import { join } from "node:path";
8
8
  var MAX_PATH_SEARCH_DEPTH = 30;
9
9
  var depth = 0;
10
- function findFolderUp(startPath, endFileNames) {
10
+ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
11
11
  const _startPath = startPath ?? process.cwd();
12
+ if (endDirectoryNames.some((endDirName) => existsSync(join(_startPath, endDirName)))) {
13
+ return _startPath;
14
+ }
12
15
  if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
13
16
  return _startPath;
14
17
  }
15
18
  if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
16
19
  const parent = join(_startPath, "..");
17
- return findFolderUp(parent, endFileNames);
20
+ return findFolderUp(parent, endFileNames, endDirectoryNames);
18
21
  }
19
22
  return void 0;
20
23
  }
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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 _chunk5K6CXYFFcjs = require('./chunk-5K6CXYFF.cjs');
3
+ var _chunkC4RHWKK6cjs = require('./chunk-C4RHWKK6.cjs');
4
4
 
5
5
 
6
- var _chunkMAMYTWWYcjs = require('./chunk-MAMYTWWY.cjs');
6
+ var _chunkKNLWLA7Ocjs = require('./chunk-KNLWLA7O.cjs');
7
7
 
8
8
 
9
9
  var _chunkHESFC24Zcjs = require('./chunk-HESFC24Z.cjs');
@@ -15,7 +15,7 @@ var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
15
15
  var _c12 = require('c12');
16
16
  var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
17
17
  var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
18
- const workspacePath = filePath || _chunkMAMYTWWYcjs.findWorkspaceRoot.call(void 0, filePath);
18
+ const workspacePath = filePath || _chunkKNLWLA7Ocjs.findWorkspaceRoot.call(void 0, filePath);
19
19
  const configs = await Promise.all([
20
20
  _c12.loadConfig.call(void 0, {
21
21
  cwd: workspacePath,
@@ -44,12 +44,12 @@ var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
44
44
  return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
45
45
  }, "getConfigFileByName");
46
46
  var getConfigFile = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
47
- const workspacePath = filePath ? filePath : _chunkMAMYTWWYcjs.findWorkspaceRoot.call(void 0, filePath);
48
- const result = await getConfigFileByName("storm", workspacePath);
47
+ const workspacePath = filePath ? filePath : _chunkKNLWLA7Ocjs.findWorkspaceRoot.call(void 0, filePath);
48
+ const result = await getConfigFileByName("storm-workspace", workspacePath);
49
49
  let config = result.config;
50
50
  const configFile = result.configFile;
51
- if (config && configFile && Object.keys(config).length > 0) {
52
- _chunk5K6CXYFFcjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
51
+ if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
52
+ _chunkC4RHWKK6cjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
53
53
  logLevel: "all"
54
54
  });
55
55
  }
@@ -57,9 +57,11 @@ var getConfigFile = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
57
57
  const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
58
58
  for (const result2 of results) {
59
59
  if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
60
- _chunk5K6CXYFFcjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
61
- logLevel: "all"
62
- });
60
+ if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
61
+ _chunkC4RHWKK6cjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
62
+ logLevel: "all"
63
+ });
64
+ }
63
65
  config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
64
66
  }
65
67
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadStormConfig
3
- } from "./chunk-CSIXX72P.js";
3
+ } from "./chunk-FDJZUZKJ.js";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-SHUYVCID.js";
@@ -1,21 +1,21 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkMPQ5PFCScjs = require('../chunk-MPQ5PFCS.cjs');
4
+ var _chunkXVIPFWZWcjs = require('../chunk-XVIPFWZW.cjs');
5
5
  require('../chunk-DD3HX2NX.cjs');
6
- require('../chunk-ZQWK7Y2J.cjs');
6
+ require('../chunk-TZO4SYUO.cjs');
7
7
  require('../chunk-XDBACKKN.cjs');
8
- require('../chunk-UJPJQXGA.cjs');
8
+ require('../chunk-4DLP6LZY.cjs');
9
9
  require('../chunk-XAJB3BSF.cjs');
10
- require('../chunk-5K6CXYFF.cjs');
11
- require('../chunk-FI7WN47Y.cjs');
12
- require('../chunk-MAMYTWWY.cjs');
13
- require('../chunk-XYV3B7TT.cjs');
10
+ require('../chunk-C4RHWKK6.cjs');
11
+ require('../chunk-2IKEUEGY.cjs');
12
+ require('../chunk-KNLWLA7O.cjs');
13
+ require('../chunk-SWX2MJHI.cjs');
14
14
  require('../chunk-SLGVSUEV.cjs');
15
15
  require('../chunk-XY2LDOQ4.cjs');
16
16
  require('../chunk-RVM5N5ZI.cjs');
17
17
  require('../chunk-7NSHGJWY.cjs');
18
- require('../chunk-JXLUUN7Z.cjs');
18
+ require('../chunk-SVQE7WVB.cjs');
19
19
  require('../chunk-HESFC24Z.cjs');
20
20
  require('../chunk-3NWKPYIG.cjs');
21
21
  require('../chunk-IRCFHYKZ.cjs');
@@ -23,4 +23,4 @@ require('../chunk-USNT2KNT.cjs');
23
23
 
24
24
 
25
25
 
26
- exports.getConfigFile = _chunkMPQ5PFCScjs.getConfigFile; exports.getConfigFileByName = _chunkMPQ5PFCScjs.getConfigFileByName;
26
+ exports.getConfigFile = _chunkXVIPFWZWcjs.getConfigFile; exports.getConfigFileByName = _chunkXVIPFWZWcjs.getConfigFileByName;
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  getConfigFile,
3
3
  getConfigFileByName
4
- } from "../chunk-JVA7N2JV.js";
4
+ } from "../chunk-WMWOH7LS.js";
5
5
  import "../chunk-NJVL3GF4.js";
6
- import "../chunk-JCGZTN5H.js";
6
+ import "../chunk-UZ5SHCFX.js";
7
7
  import "../chunk-BHZFTVXN.js";
8
- import "../chunk-JHFMRUZ3.js";
8
+ import "../chunk-6OM23J4N.js";
9
9
  import "../chunk-HSCCBYAV.js";
10
- import "../chunk-5GDS63DU.js";
11
- import "../chunk-HFGQYKYH.js";
12
- import "../chunk-4E4DSFC4.js";
13
- import "../chunk-X7BEPYRX.js";
10
+ import "../chunk-23WUCNWX.js";
11
+ import "../chunk-GZFXEQPB.js";
12
+ import "../chunk-OIEEXHKO.js";
13
+ import "../chunk-XQPQRRG3.js";
14
14
  import "../chunk-ZA4IO7YJ.js";
15
15
  import "../chunk-IUT7Y2UY.js";
16
16
  import "../chunk-QBS3OCHH.js";
17
17
  import "../chunk-PR7RQHRE.js";
18
- import "../chunk-WRGFZXJE.js";
18
+ import "../chunk-6T3V5XJK.js";
19
19
  import "../chunk-MLUBD3PU.js";
20
20
  import "../chunk-HI33NNPB.js";
21
21
  import "../chunk-POXTJ6GF.js";
@@ -2,21 +2,21 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkMPQ5PFCScjs = require('../chunk-MPQ5PFCS.cjs');
5
+ var _chunkXVIPFWZWcjs = require('../chunk-XVIPFWZW.cjs');
6
6
  require('../chunk-DD3HX2NX.cjs');
7
- require('../chunk-ZQWK7Y2J.cjs');
7
+ require('../chunk-TZO4SYUO.cjs');
8
8
  require('../chunk-XDBACKKN.cjs');
9
- require('../chunk-UJPJQXGA.cjs');
9
+ require('../chunk-4DLP6LZY.cjs');
10
10
  require('../chunk-XAJB3BSF.cjs');
11
- require('../chunk-5K6CXYFF.cjs');
12
- require('../chunk-FI7WN47Y.cjs');
13
- require('../chunk-MAMYTWWY.cjs');
14
- require('../chunk-XYV3B7TT.cjs');
11
+ require('../chunk-C4RHWKK6.cjs');
12
+ require('../chunk-2IKEUEGY.cjs');
13
+ require('../chunk-KNLWLA7O.cjs');
14
+ require('../chunk-SWX2MJHI.cjs');
15
15
  require('../chunk-SLGVSUEV.cjs');
16
16
  require('../chunk-XY2LDOQ4.cjs');
17
17
  require('../chunk-RVM5N5ZI.cjs');
18
18
  require('../chunk-7NSHGJWY.cjs');
19
- require('../chunk-JXLUUN7Z.cjs');
19
+ require('../chunk-SVQE7WVB.cjs');
20
20
  require('../chunk-HESFC24Z.cjs');
21
21
  require('../chunk-3NWKPYIG.cjs');
22
22
  require('../chunk-IRCFHYKZ.cjs');
@@ -24,4 +24,4 @@ require('../chunk-USNT2KNT.cjs');
24
24
 
25
25
 
26
26
 
27
- exports.getConfigFile = _chunkMPQ5PFCScjs.getConfigFile; exports.getConfigFileByName = _chunkMPQ5PFCScjs.getConfigFileByName;
27
+ exports.getConfigFile = _chunkXVIPFWZWcjs.getConfigFile; exports.getConfigFileByName = _chunkXVIPFWZWcjs.getConfigFileByName;