@storm-software/config-tools 1.173.0 → 1.173.2

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 (127) hide show
  1. package/README.md +4 -2
  2. package/bin/config.cjs +4 -2
  3. package/bin/config.js +4 -2
  4. package/dist/{chunk-TGDG6POD.cjs → chunk-3FETUQ3K.cjs} +2 -2
  5. package/dist/{chunk-ROLVAV5Z.cjs → chunk-3SACUIVX.cjs} +8 -8
  6. package/dist/{chunk-BMDGKEGP.cjs → chunk-4G5FBDI6.cjs} +9 -9
  7. package/dist/chunk-4PX5UVAN.cjs +65 -0
  8. package/dist/{chunk-62YJAX4N.js → chunk-6ZPXQNSV.js} +6 -6
  9. package/dist/{chunk-XT2XO7TR.js → chunk-73L7WNYI.js} +3 -3
  10. package/dist/{chunk-DX767CQS.cjs → chunk-7STXZ7BN.cjs} +33 -33
  11. package/dist/{chunk-YTUBIKWS.js → chunk-AFZV7JXZ.js} +4 -4
  12. package/dist/{chunk-JRKB77S5.js → chunk-AUCRLLQF.js} +1 -1
  13. package/dist/{chunk-7BVMJTE2.cjs → chunk-BKUK5DV7.cjs} +9 -9
  14. package/dist/{chunk-WT2BVWII.js → chunk-BTRJGTBW.js} +3 -3
  15. package/dist/chunk-BZLWPMXE.js +40 -0
  16. package/dist/chunk-CMR737AZ.js +138 -0
  17. package/dist/chunk-CQBV3A23.cjs +55 -0
  18. package/dist/chunk-CS5NQ3OG.cjs +40 -0
  19. package/dist/{chunk-U74E4EM6.js → chunk-DBAAIFJN.js} +1 -1
  20. package/dist/{chunk-FO5MOLUY.cjs → chunk-FTTZBFXG.cjs} +20 -20
  21. package/dist/chunk-HDYKVRNJ.js +40 -0
  22. package/dist/{chunk-IETV2DPL.js → chunk-HYJVQZYZ.js} +1 -1
  23. package/dist/{chunk-XPPM3PBH.js → chunk-JB3OUBHN.js} +3 -3
  24. package/dist/{chunk-OUYYXBZX.js → chunk-JCPJSRHW.js} +10 -10
  25. package/dist/chunk-JLIGJTMV.js +55 -0
  26. package/dist/{chunk-T4ZMKMEG.cjs → chunk-JMI7BRL7.cjs} +3 -3
  27. package/dist/{chunk-4XRV4CVP.js → chunk-K4CDYUQR.js} +1 -1
  28. package/dist/chunk-KEVN7E43.cjs +138 -0
  29. package/dist/{chunk-4PAEA5KV.cjs → chunk-KH5SONKW.cjs} +4 -4
  30. package/dist/{chunk-CPWR3CZZ.cjs → chunk-KYNO2VMS.cjs} +15 -15
  31. package/dist/{chunk-OJP4XIBV.js → chunk-LM2UMGYA.js} +2 -2
  32. package/dist/chunk-N5TOHWQY.cjs +92 -0
  33. package/dist/chunk-P7SO3C2J.js +92 -0
  34. package/dist/{chunk-VLWSWYG7.js → chunk-PTHGOJU6.js} +2 -2
  35. package/dist/{chunk-AQ2NOVJF.cjs → chunk-QLJYCKMD.cjs} +2 -2
  36. package/dist/{chunk-AH2DDCPN.cjs → chunk-S2BDGENQ.cjs} +11 -11
  37. package/dist/{chunk-XHJCRUWP.js → chunk-SBTNBIMS.js} +2 -2
  38. package/dist/{chunk-4KZ3BMNG.js → chunk-SHD7ZUSQ.js} +2 -2
  39. package/dist/chunk-SMVSQFZ3.js +158 -0
  40. package/dist/chunk-SQTATREP.js +47 -0
  41. package/dist/chunk-TTH3ECOM.cjs +40 -0
  42. package/dist/{chunk-AEZINHEA.cjs → chunk-U436743U.cjs} +5 -5
  43. package/dist/chunk-UBEBZYFH.cjs +40 -0
  44. package/dist/chunk-VAPTNFV3.cjs +47 -0
  45. package/dist/chunk-WBQ4VS7E.cjs +23 -0
  46. package/dist/{chunk-42TCRG4H.js → chunk-WYQYWPLE.js} +1 -1
  47. package/dist/chunk-XPQXNNGZ.cjs +158 -0
  48. package/dist/config-file/get-config-file.cjs +21 -21
  49. package/dist/config-file/get-config-file.js +20 -20
  50. package/dist/config-file/index.cjs +22 -22
  51. package/dist/config-file/index.js +21 -21
  52. package/dist/create-storm-config.cjs +29 -29
  53. package/dist/create-storm-config.js +23 -23
  54. package/dist/env/get-env.cjs +5 -5
  55. package/dist/env/get-env.js +4 -4
  56. package/dist/env/index.cjs +7 -7
  57. package/dist/env/index.js +6 -6
  58. package/dist/env/set-env.cjs +5 -5
  59. package/dist/env/set-env.js +4 -4
  60. package/dist/get-config.cjs +25 -25
  61. package/dist/get-config.js +24 -24
  62. package/dist/index.cjs +27 -27
  63. package/dist/index.js +26 -26
  64. package/dist/logger/chalk.cjs +2 -2
  65. package/dist/logger/chalk.js +1 -1
  66. package/dist/logger/console-icons.cjs +4 -4
  67. package/dist/logger/console-icons.js +3 -3
  68. package/dist/logger/console.cjs +12 -12
  69. package/dist/logger/console.js +11 -11
  70. package/dist/logger/create-logger.cjs +13 -13
  71. package/dist/logger/create-logger.js +12 -12
  72. package/dist/logger/format-timestamp.cjs +2 -2
  73. package/dist/logger/format-timestamp.js +1 -1
  74. package/dist/logger/get-log-level.cjs +3 -3
  75. package/dist/logger/get-log-level.js +2 -2
  76. package/dist/logger/index.cjs +14 -14
  77. package/dist/logger/index.js +13 -13
  78. package/dist/logger/is-unicode-supported.cjs +2 -2
  79. package/dist/logger/is-unicode-supported.js +1 -1
  80. package/dist/types.cjs +2 -2
  81. package/dist/types.js +1 -1
  82. package/dist/utilities/apply-workspace-tokens.cjs +5 -5
  83. package/dist/utilities/apply-workspace-tokens.js +4 -4
  84. package/dist/utilities/correct-paths.cjs +2 -2
  85. package/dist/utilities/correct-paths.js +1 -1
  86. package/dist/utilities/file-path-utils.cjs +3 -3
  87. package/dist/utilities/file-path-utils.js +2 -2
  88. package/dist/utilities/find-up.cjs +2 -2
  89. package/dist/utilities/find-up.js +1 -1
  90. package/dist/utilities/find-workspace-root.cjs +4 -4
  91. package/dist/utilities/find-workspace-root.js +3 -3
  92. package/dist/utilities/get-default-config.cjs +5 -5
  93. package/dist/utilities/get-default-config.js +4 -4
  94. package/dist/utilities/index.cjs +20 -20
  95. package/dist/utilities/index.js +19 -19
  96. package/dist/utilities/process-handler.cjs +13 -13
  97. package/dist/utilities/process-handler.js +12 -12
  98. package/dist/utilities/run.cjs +2 -2
  99. package/dist/utilities/run.js +1 -1
  100. package/dist/utilities/toml.cjs +15 -15
  101. package/dist/utilities/toml.js +14 -14
  102. package/package.json +5 -13
  103. package/dist/chunk-26LV7S6Z.cjs +0 -40
  104. package/dist/chunk-7BZWQZUV.cjs +0 -65
  105. package/dist/chunk-PSHJQ2NP.cjs +0 -23
  106. /package/dist/{chunk-3EVEDCXL.js → chunk-2AVLCXLT.js} +0 -0
  107. /package/dist/{chunk-6D6DEG6Z.cjs → chunk-65SWKEHV.cjs} +0 -0
  108. /package/dist/{chunk-RWBPUJIZ.js → chunk-6JBGUE4A.js} +0 -0
  109. /package/dist/{chunk-64DXC5WM.js → chunk-6RVIJKY3.js} +0 -0
  110. /package/dist/{chunk-FRR2ZRWD.js → chunk-7IMLZPZF.js} +0 -0
  111. /package/dist/{chunk-6DTRKFZD.cjs → chunk-7PV6L7I7.cjs} +0 -0
  112. /package/dist/{chunk-QNDF3RQL.cjs → chunk-BN6MEGGY.cjs} +0 -0
  113. /package/dist/{chunk-NS5PJ2RM.cjs → chunk-CTYIEJ7C.cjs} +0 -0
  114. /package/dist/{chunk-XEZGYUS2.js → chunk-CZ4IE2QN.js} +0 -0
  115. /package/dist/{chunk-ZGLOKOL3.cjs → chunk-DQT6QJRQ.cjs} +0 -0
  116. /package/dist/{chunk-PLLCZVZO.cjs → chunk-DTGT4OI3.cjs} +0 -0
  117. /package/dist/{chunk-R6A4VPC4.js → chunk-G2MK47WL.js} +0 -0
  118. /package/dist/{chunk-C5OTFOQB.cjs → chunk-IRCFHYKZ.cjs} +0 -0
  119. /package/dist/{chunk-E4R6RI5D.cjs → chunk-IWD6YQKX.cjs} +0 -0
  120. /package/dist/{chunk-GSK6EGCB.js → chunk-L6UNTUC4.js} +0 -0
  121. /package/dist/{chunk-4JREL2GQ.cjs → chunk-M3REM2FU.cjs} +0 -0
  122. /package/dist/{chunk-RKGXITNB.cjs → chunk-N3UX6L7X.cjs} +0 -0
  123. /package/dist/{chunk-KT6HSF26.cjs → chunk-NAT5PWY2.cjs} +0 -0
  124. /package/dist/{chunk-T3MUE32G.js → chunk-P2KJ6EZO.js} +0 -0
  125. /package/dist/{chunk-3QAWRU2B.js → chunk-POXTJ6GF.js} +0 -0
  126. /package/dist/{chunk-SABD7NYM.js → chunk-RRKB32OH.js} +0 -0
  127. /package/dist/{chunk-XIA6NF6N.js → chunk-WWUHEYYM.js} +0 -0
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.172.9-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.173.0-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 -->
@@ -69,7 +69,9 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
69
69
  # Storm Configuration Tools
70
70
 
71
71
  A package containing various utilities to support custom workspace
72
- configurations
72
+ configurations and environment management for Storm Software projects, including
73
+ configuration file handling, environment variable management, and logging
74
+ utilities.
73
75
 
74
76
  Below is a list of the available configuration values that can be set through
75
77
  environment variables:
package/bin/config.cjs CHANGED
@@ -34,6 +34,7 @@ __export(config_exports, {
34
34
  viewAction: () => viewAction
35
35
  });
36
36
  module.exports = __toCommonJS(config_exports);
37
+ var import_chalk3 = __toESM(require("chalk"), 1);
37
38
  var import_commander = require("commander");
38
39
 
39
40
  // src/create-storm-config.ts
@@ -1327,13 +1328,14 @@ var getConfig = (workspaceRoot, skipLogs = false) => {
1327
1328
  };
1328
1329
 
1329
1330
  // bin/config.ts
1330
- var import_chalk3 = __toESM(require("chalk"), 1);
1331
1331
  function createProgram() {
1332
1332
  writeInfo("\u26A1 Running Storm Configuration Tools", { logLevel: "all" });
1333
1333
  const root = findWorkspaceRootSafe(process.cwd());
1334
1334
  process.env.STORM_WORKSPACE_ROOT ??= root;
1335
1335
  process.env.NX_WORKSPACE_ROOT_PATH ??= root;
1336
- root && process.chdir(root);
1336
+ if (root) {
1337
+ process.chdir(root);
1338
+ }
1337
1339
  const program = new import_commander.Command("storm-config");
1338
1340
  program.version("1.0.0", "-v --version", "display CLI version");
1339
1341
  const directory = new import_commander.Option(
package/bin/config.js CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // bin/config.ts
4
+ import chalk2 from "chalk";
4
5
  import { Command, Option } from "commander";
5
6
 
6
7
  // src/create-storm-config.ts
@@ -1302,13 +1303,14 @@ var getConfig = (workspaceRoot, skipLogs = false) => {
1302
1303
  };
1303
1304
 
1304
1305
  // bin/config.ts
1305
- import chalk2 from "chalk";
1306
1306
  function createProgram() {
1307
1307
  writeInfo("\u26A1 Running Storm Configuration Tools", { logLevel: "all" });
1308
1308
  const root = findWorkspaceRootSafe(process.cwd());
1309
1309
  process.env.STORM_WORKSPACE_ROOT ??= root;
1310
1310
  process.env.NX_WORKSPACE_ROOT_PATH ??= root;
1311
- root && process.chdir(root);
1311
+ if (root) {
1312
+ process.chdir(root);
1313
+ }
1312
1314
  const program = new Command("storm-config");
1313
1315
  program.version("1.0.0", "-v --version", "display CLI version");
1314
1316
  const directory = new Option(
@@ -1,13 +1,13 @@
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 _chunkDX767CQScjs = require('./chunk-DX767CQS.cjs');
3
+ var _chunkXPQXNNGZcjs = require('./chunk-XPQXNNGZ.cjs');
4
4
 
5
5
  // src/utilities/toml.ts
6
6
  var _jtoml = require('@ltd/j-toml'); var _jtoml2 = _interopRequireDefault(_jtoml);
7
7
  function parseCargoTomlWithTree(tree, projectRoot, projectName) {
8
8
  const cargoTomlString = _optionalChain([tree, 'access', _ => _.read, 'call', _2 => _2(`${projectRoot}/Cargo.toml`), 'optionalAccess', _3 => _3.toString, 'call', _4 => _4()]);
9
9
  if (!cargoTomlString) {
10
- _chunkDX767CQScjs.writeError.call(void 0, `Cannot find a Cargo.toml file in the ${projectName}`);
10
+ _chunkXPQXNNGZcjs.writeError.call(void 0, `Cannot find a Cargo.toml file in the ${projectName}`);
11
11
  throw new Error();
12
12
  }
13
13
  return parseCargoToml(cargoTomlString);
@@ -1,29 +1,29 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkFO5MOLUYcjs = require('./chunk-FO5MOLUY.cjs');
4
+ var _chunkKEVN7E43cjs = require('./chunk-KEVN7E43.cjs');
5
5
 
6
6
 
7
- var _chunkAEZINHEAcjs = require('./chunk-AEZINHEA.cjs');
7
+ var _chunkU436743Ucjs = require('./chunk-U436743U.cjs');
8
8
 
9
9
  // src/get-config.ts
10
10
  var getConfig = (workspaceRoot, skipLogs = false) => {
11
- return _chunkFO5MOLUYcjs.loadStormWorkspaceConfig.call(void 0, workspaceRoot, skipLogs);
11
+ return _chunkKEVN7E43cjs.loadStormWorkspaceConfig.call(void 0, workspaceRoot, skipLogs);
12
12
  };
13
- var getWorkspaceConfig = (skipLogs = false, options = {}) => {
13
+ var getWorkspaceConfig = (skipLogs = true, options = {}) => {
14
14
  let workspaceRoot = options.workspaceRoot;
15
15
  if (!workspaceRoot) {
16
- workspaceRoot = _chunkAEZINHEAcjs.findWorkspaceRoot.call(void 0, options.cwd);
16
+ workspaceRoot = _chunkU436743Ucjs.findWorkspaceRoot.call(void 0, options.cwd);
17
17
  }
18
18
  return getConfig(workspaceRoot, skipLogs);
19
19
  };
20
- var tryGetWorkspaceConfig = async (skipLogs = false, options = {}) => {
20
+ var tryGetWorkspaceConfig = async (skipLogs = true, options = {}) => {
21
21
  try {
22
22
  let workspaceRoot = options.workspaceRoot;
23
23
  if (!workspaceRoot) {
24
- workspaceRoot = _chunkAEZINHEAcjs.findWorkspaceRoot.call(void 0, options.cwd);
24
+ workspaceRoot = _chunkU436743Ucjs.findWorkspaceRoot.call(void 0, options.cwd);
25
25
  }
26
- return _chunkFO5MOLUYcjs.tryLoadStormWorkspaceConfig.call(void 0,
26
+ return _chunkKEVN7E43cjs.tryLoadStormWorkspaceConfig.call(void 0,
27
27
  workspaceRoot,
28
28
  skipLogs,
29
29
  options.useDefault
@@ -1,18 +1,18 @@
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 _chunkDX767CQScjs = require('./chunk-DX767CQS.cjs');
3
+ var _chunk7STXZ7BNcjs = require('./chunk-7STXZ7BN.cjs');
4
4
 
5
5
 
6
- var _chunkAEZINHEAcjs = require('./chunk-AEZINHEA.cjs');
6
+ var _chunkU436743Ucjs = require('./chunk-U436743U.cjs');
7
7
 
8
8
 
9
- var _chunk4JREL2GQcjs = require('./chunk-4JREL2GQ.cjs');
9
+ var _chunkM3REM2FUcjs = require('./chunk-M3REM2FU.cjs');
10
10
 
11
11
  // src/config-file/get-config-file.ts
12
12
  var _c12 = require('c12');
13
13
  var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
14
14
  var getConfigFileByName = async (fileName, filePath, options = {}) => {
15
- const workspacePath = filePath || _chunkAEZINHEAcjs.findWorkspaceRoot.call(void 0, filePath);
15
+ const workspacePath = filePath || _chunkU436743Ucjs.findWorkspaceRoot.call(void 0, filePath);
16
16
  const configs = await Promise.all([
17
17
  _c12.loadConfig.call(void 0, {
18
18
  cwd: workspacePath,
@@ -21,7 +21,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
21
21
  envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
22
22
  jitiOptions: {
23
23
  debug: false,
24
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk4JREL2GQcjs.joinPaths.call(void 0,
24
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkM3REM2FUcjs.joinPaths.call(void 0,
25
25
  process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
26
26
  "jiti"
27
27
  )
@@ -35,7 +35,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
35
35
  envName: _optionalChain([fileName, 'optionalAccess', _3 => _3.toUpperCase, 'call', _4 => _4()]),
36
36
  jitiOptions: {
37
37
  debug: false,
38
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk4JREL2GQcjs.joinPaths.call(void 0,
38
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkM3REM2FUcjs.joinPaths.call(void 0,
39
39
  process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
40
40
  "jiti"
41
41
  )
@@ -47,12 +47,12 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
47
47
  return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
48
48
  };
49
49
  var getConfigFile = async (filePath, additionalFileNames = []) => {
50
- const workspacePath = filePath ? filePath : _chunkAEZINHEAcjs.findWorkspaceRoot.call(void 0, filePath);
50
+ const workspacePath = filePath ? filePath : _chunkU436743Ucjs.findWorkspaceRoot.call(void 0, filePath);
51
51
  const result = await getConfigFileByName("storm-workspace", workspacePath);
52
52
  let config = result.config;
53
53
  const configFile = result.configFile;
54
54
  if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
55
- _chunkDX767CQScjs.writeTrace.call(void 0,
55
+ _chunk7STXZ7BNcjs.writeTrace.call(void 0,
56
56
  `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
57
57
  {
58
58
  logLevel: "all"
@@ -68,7 +68,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
68
68
  for (const result2 of results) {
69
69
  if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
70
70
  if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
71
- _chunkDX767CQScjs.writeTrace.call(void 0,
71
+ _chunk7STXZ7BNcjs.writeTrace.call(void 0,
72
72
  `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
73
73
  {
74
74
  logLevel: "all"
@@ -0,0 +1,65 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkIRCFHYKZcjs = require('./chunk-IRCFHYKZ.cjs');
5
+
6
+ // src/logger/get-log-level.ts
7
+ var getLogLevel = (label) => {
8
+ switch (label) {
9
+ case "all":
10
+ return _chunkIRCFHYKZcjs.LogLevel.ALL;
11
+ case "trace":
12
+ return _chunkIRCFHYKZcjs.LogLevel.TRACE;
13
+ case "debug":
14
+ return _chunkIRCFHYKZcjs.LogLevel.DEBUG;
15
+ case "info":
16
+ return _chunkIRCFHYKZcjs.LogLevel.INFO;
17
+ case "warn":
18
+ return _chunkIRCFHYKZcjs.LogLevel.WARN;
19
+ case "error":
20
+ return _chunkIRCFHYKZcjs.LogLevel.ERROR;
21
+ case "fatal":
22
+ return _chunkIRCFHYKZcjs.LogLevel.FATAL;
23
+ case "silent":
24
+ return _chunkIRCFHYKZcjs.LogLevel.SILENT;
25
+ default:
26
+ return _chunkIRCFHYKZcjs.LogLevel.INFO;
27
+ }
28
+ };
29
+ var getLogLevelLabel = (logLevel = _chunkIRCFHYKZcjs.LogLevel.INFO) => {
30
+ if (logLevel >= _chunkIRCFHYKZcjs.LogLevel.ALL) {
31
+ return _chunkIRCFHYKZcjs.LogLevelLabel.ALL;
32
+ }
33
+ if (logLevel >= _chunkIRCFHYKZcjs.LogLevel.TRACE) {
34
+ return _chunkIRCFHYKZcjs.LogLevelLabel.TRACE;
35
+ }
36
+ if (logLevel >= _chunkIRCFHYKZcjs.LogLevel.DEBUG) {
37
+ return _chunkIRCFHYKZcjs.LogLevelLabel.DEBUG;
38
+ }
39
+ if (logLevel >= _chunkIRCFHYKZcjs.LogLevel.INFO) {
40
+ return _chunkIRCFHYKZcjs.LogLevelLabel.INFO;
41
+ }
42
+ if (logLevel >= _chunkIRCFHYKZcjs.LogLevel.WARN) {
43
+ return _chunkIRCFHYKZcjs.LogLevelLabel.WARN;
44
+ }
45
+ if (logLevel >= _chunkIRCFHYKZcjs.LogLevel.ERROR) {
46
+ return _chunkIRCFHYKZcjs.LogLevelLabel.ERROR;
47
+ }
48
+ if (logLevel >= _chunkIRCFHYKZcjs.LogLevel.FATAL) {
49
+ return _chunkIRCFHYKZcjs.LogLevelLabel.FATAL;
50
+ }
51
+ if (logLevel <= _chunkIRCFHYKZcjs.LogLevel.SILENT) {
52
+ return _chunkIRCFHYKZcjs.LogLevelLabel.SILENT;
53
+ }
54
+ return _chunkIRCFHYKZcjs.LogLevelLabel.INFO;
55
+ };
56
+ var isVerbose = (label = _chunkIRCFHYKZcjs.LogLevelLabel.SILENT) => {
57
+ const logLevel = typeof label === "string" ? getLogLevel(label) : label;
58
+ return logLevel >= _chunkIRCFHYKZcjs.LogLevel.DEBUG;
59
+ };
60
+
61
+
62
+
63
+
64
+
65
+ exports.getLogLevel = getLogLevel; exports.getLogLevelLabel = getLogLevelLabel; exports.isVerbose = isVerbose;
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  getConfigFile
3
- } from "./chunk-XT2XO7TR.js";
3
+ } from "./chunk-73L7WNYI.js";
4
4
  import {
5
5
  formatLogMessage,
6
6
  writeTrace,
7
7
  writeWarning
8
- } from "./chunk-OUYYXBZX.js";
8
+ } from "./chunk-SMVSQFZ3.js";
9
9
  import {
10
10
  applyDefaultConfig,
11
11
  getPackageJsonConfig
12
- } from "./chunk-4KZ3BMNG.js";
12
+ } from "./chunk-SHD7ZUSQ.js";
13
13
  import {
14
14
  findWorkspaceRoot
15
- } from "./chunk-VLWSWYG7.js";
15
+ } from "./chunk-PTHGOJU6.js";
16
16
  import {
17
17
  setConfigEnv
18
- } from "./chunk-XPPM3PBH.js";
18
+ } from "./chunk-JB3OUBHN.js";
19
19
  import {
20
20
  getConfigEnv,
21
21
  getExtensionEnv
22
- } from "./chunk-XHJCRUWP.js";
22
+ } from "./chunk-SBTNBIMS.js";
23
23
 
24
24
  // src/create-storm-config.ts
25
25
  import { stormWorkspaceConfigSchema } from "@storm-software/config/schema";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  writeTrace
3
- } from "./chunk-OUYYXBZX.js";
3
+ } from "./chunk-SMVSQFZ3.js";
4
4
  import {
5
5
  findWorkspaceRoot
6
- } from "./chunk-VLWSWYG7.js";
6
+ } from "./chunk-PTHGOJU6.js";
7
7
  import {
8
8
  joinPaths
9
- } from "./chunk-FRR2ZRWD.js";
9
+ } from "./chunk-7IMLZPZF.js";
10
10
 
11
11
  // src/config-file/get-config-file.ts
12
12
  import { loadConfig } from "c12";
@@ -1,90 +1,90 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunk4PAEA5KVcjs = require('./chunk-4PAEA5KV.cjs');
3
+ var _chunkKH5SONKWcjs = require('./chunk-KH5SONKW.cjs');
4
4
 
5
5
 
6
- var _chunkNS5PJ2RMcjs = require('./chunk-NS5PJ2RM.cjs');
6
+ var _chunkBN6MEGGYcjs = require('./chunk-BN6MEGGY.cjs');
7
7
 
8
8
 
9
- var _chunkPSHJQ2NPcjs = require('./chunk-PSHJQ2NP.cjs');
9
+ var _chunk4PX5UVANcjs = require('./chunk-4PX5UVAN.cjs');
10
10
 
11
11
 
12
- var _chunkQNDF3RQLcjs = require('./chunk-QNDF3RQL.cjs');
12
+ var _chunkCTYIEJ7Ccjs = require('./chunk-CTYIEJ7C.cjs');
13
13
 
14
14
 
15
- var _chunk7BZWQZUVcjs = require('./chunk-7BZWQZUV.cjs');
15
+ var _chunkWBQ4VS7Ecjs = require('./chunk-WBQ4VS7E.cjs');
16
16
 
17
17
 
18
18
 
19
- var _chunkC5OTFOQBcjs = require('./chunk-C5OTFOQB.cjs');
19
+ var _chunkIRCFHYKZcjs = require('./chunk-IRCFHYKZ.cjs');
20
20
 
21
21
  // src/logger/console.ts
22
- var getLogFn = (logLevel = _chunkC5OTFOQBcjs.LogLevel.INFO, config = {}, _chalk = _chunkNS5PJ2RMcjs.getChalk.call(void 0, )) => {
23
- const colors = !_optionalChain([config, 'access', _2 => _2.colors, 'optionalAccess', _3 => _3.dark]) && !_optionalChain([config, 'access', _4 => _4.colors, 'optionalAccess', _5 => _5["base"]]) && !_optionalChain([config, 'access', _6 => _6.colors, 'optionalAccess', _7 => _7["base"], 'optionalAccess', _8 => _8.dark]) ? _chunk4PAEA5KVcjs.DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _9 => _9.colors, 'optionalAccess', _10 => _10.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12["base"], 'optionalAccess', _13 => _13.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _14 => _14.colors, 'optionalAccess', _15 => _15["base"]]) ? _optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17["base"]]) : _chunk4PAEA5KVcjs.DEFAULT_COLOR_CONFIG;
24
- const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || _chunkC5OTFOQBcjs.LogLevelLabel.INFO;
25
- if (logLevel > _chunk7BZWQZUVcjs.getLogLevel.call(void 0, configLogLevel) || logLevel <= _chunkC5OTFOQBcjs.LogLevel.SILENT || _chunk7BZWQZUVcjs.getLogLevel.call(void 0, configLogLevel) <= _chunkC5OTFOQBcjs.LogLevel.SILENT) {
22
+ var getLogFn = (logLevel = _chunkIRCFHYKZcjs.LogLevel.INFO, config = {}, _chalk = _chunkCTYIEJ7Ccjs.getChalk.call(void 0, )) => {
23
+ const colors = !_optionalChain([config, 'access', _2 => _2.colors, 'optionalAccess', _3 => _3.dark]) && !_optionalChain([config, 'access', _4 => _4.colors, 'optionalAccess', _5 => _5["base"]]) && !_optionalChain([config, 'access', _6 => _6.colors, 'optionalAccess', _7 => _7["base"], 'optionalAccess', _8 => _8.dark]) ? _chunkKH5SONKWcjs.DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _9 => _9.colors, 'optionalAccess', _10 => _10.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _11 => _11.colors, 'optionalAccess', _12 => _12["base"], 'optionalAccess', _13 => _13.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _14 => _14.colors, 'optionalAccess', _15 => _15["base"]]) ? _optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17["base"]]) : _chunkKH5SONKWcjs.DEFAULT_COLOR_CONFIG;
24
+ const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || _chunkIRCFHYKZcjs.LogLevelLabel.INFO;
25
+ if (logLevel > _chunk4PX5UVANcjs.getLogLevel.call(void 0, configLogLevel) || logLevel <= _chunkIRCFHYKZcjs.LogLevel.SILENT || _chunk4PX5UVANcjs.getLogLevel.call(void 0, configLogLevel) <= _chunkIRCFHYKZcjs.LogLevel.SILENT) {
26
26
  return (_) => {
27
27
  };
28
28
  }
29
- if (typeof logLevel === "number" && _chunkC5OTFOQBcjs.LogLevel.FATAL >= logLevel) {
29
+ if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.FATAL >= logLevel) {
30
30
  return (message) => {
31
31
  console.error(
32
32
  `
33
- ${_chalk.gray(_chunkQNDF3RQLcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${_chunkPSHJQ2NPcjs.CONSOLE_ICONS[_chunkC5OTFOQBcjs.LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
33
+ ${_chalk.gray(_chunkBN6MEGGYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${_chunkWBQ4VS7Ecjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
34
34
  `
35
35
  );
36
36
  };
37
37
  }
38
- if (typeof logLevel === "number" && _chunkC5OTFOQBcjs.LogLevel.ERROR >= logLevel) {
38
+ if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.ERROR >= logLevel) {
39
39
  return (message) => {
40
40
  console.error(
41
41
  `
42
- ${_chalk.gray(_chunkQNDF3RQLcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(`[${_chunkPSHJQ2NPcjs.CONSOLE_ICONS[_chunkC5OTFOQBcjs.LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
42
+ ${_chalk.gray(_chunkBN6MEGGYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(`[${_chunkWBQ4VS7Ecjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
43
43
  `
44
44
  );
45
45
  };
46
46
  }
47
- if (typeof logLevel === "number" && _chunkC5OTFOQBcjs.LogLevel.WARN >= logLevel) {
47
+ if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.WARN >= logLevel) {
48
48
  return (message) => {
49
49
  console.warn(
50
50
  `
51
- ${_chalk.gray(_chunkQNDF3RQLcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(`[${_chunkPSHJQ2NPcjs.CONSOLE_ICONS[_chunkC5OTFOQBcjs.LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
51
+ ${_chalk.gray(_chunkBN6MEGGYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(`[${_chunkWBQ4VS7Ecjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
52
52
  `
53
53
  );
54
54
  };
55
55
  }
56
- if (typeof logLevel === "number" && _chunkC5OTFOQBcjs.LogLevel.SUCCESS >= logLevel) {
56
+ if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.SUCCESS >= logLevel) {
57
57
  return (message) => {
58
58
  console.info(
59
59
  `
60
- ${_chalk.gray(_chunkQNDF3RQLcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(`[${_chunkPSHJQ2NPcjs.CONSOLE_ICONS[_chunkC5OTFOQBcjs.LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
60
+ ${_chalk.gray(_chunkBN6MEGGYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(`[${_chunkWBQ4VS7Ecjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
61
61
  `
62
62
  );
63
63
  };
64
64
  }
65
- if (typeof logLevel === "number" && _chunkC5OTFOQBcjs.LogLevel.INFO >= logLevel) {
65
+ if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.INFO >= logLevel) {
66
66
  return (message) => {
67
67
  console.info(
68
68
  `
69
- ${_chalk.gray(_chunkQNDF3RQLcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(`[${_chunkPSHJQ2NPcjs.CONSOLE_ICONS[_chunkC5OTFOQBcjs.LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
69
+ ${_chalk.gray(_chunkBN6MEGGYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(`[${_chunkWBQ4VS7Ecjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
70
70
  `
71
71
  );
72
72
  };
73
73
  }
74
- if (typeof logLevel === "number" && _chunkC5OTFOQBcjs.LogLevel.DEBUG >= logLevel) {
74
+ if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.DEBUG >= logLevel) {
75
75
  return (message) => {
76
76
  console.debug(
77
77
  `
78
- ${_chalk.gray(_chunkQNDF3RQLcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${_chunkPSHJQ2NPcjs.CONSOLE_ICONS[_chunkC5OTFOQBcjs.LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
78
+ ${_chalk.gray(_chunkBN6MEGGYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${_chunkWBQ4VS7Ecjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
79
79
  `
80
80
  );
81
81
  };
82
82
  }
83
- if (typeof logLevel === "number" && _chunkC5OTFOQBcjs.LogLevel.TRACE >= logLevel) {
83
+ if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.TRACE >= logLevel) {
84
84
  return (message) => {
85
85
  console.debug(
86
86
  `
87
- ${_chalk.gray(_chunkQNDF3RQLcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${_chunkPSHJQ2NPcjs.CONSOLE_ICONS[_chunkC5OTFOQBcjs.LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
87
+ ${_chalk.gray(_chunkBN6MEGGYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${_chunkWBQ4VS7Ecjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
88
88
  `
89
89
  );
90
90
  };
@@ -92,19 +92,19 @@ ${_chalk.gray(_chunkQNDF3RQLcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_n
92
92
  return (message) => {
93
93
  console.log(
94
94
  `
95
- ${_chalk.gray(_chunkQNDF3RQLcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${_chunkPSHJQ2NPcjs.CONSOLE_ICONS[_chunkC5OTFOQBcjs.LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
95
+ ${_chalk.gray(_chunkBN6MEGGYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${_chunkWBQ4VS7Ecjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
96
96
  `
97
97
  );
98
98
  };
99
99
  };
100
- var writeFatal = (message, config) => getLogFn(_chunkC5OTFOQBcjs.LogLevel.FATAL, config)(message);
101
- var writeError = (message, config) => getLogFn(_chunkC5OTFOQBcjs.LogLevel.ERROR, config)(message);
102
- var writeWarning = (message, config) => getLogFn(_chunkC5OTFOQBcjs.LogLevel.WARN, config)(message);
103
- var writeInfo = (message, config) => getLogFn(_chunkC5OTFOQBcjs.LogLevel.INFO, config)(message);
104
- var writeSuccess = (message, config) => getLogFn(_chunkC5OTFOQBcjs.LogLevel.SUCCESS, config)(message);
105
- var writeDebug = (message, config) => getLogFn(_chunkC5OTFOQBcjs.LogLevel.DEBUG, config)(message);
106
- var writeTrace = (message, config) => getLogFn(_chunkC5OTFOQBcjs.LogLevel.TRACE, config)(message);
107
- var writeSystem = (message, config) => getLogFn(_chunkC5OTFOQBcjs.LogLevel.ALL, config)(message);
100
+ var writeFatal = (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.FATAL, config)(message);
101
+ var writeError = (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.ERROR, config)(message);
102
+ var writeWarning = (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.WARN, config)(message);
103
+ var writeInfo = (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.INFO, config)(message);
104
+ var writeSuccess = (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.SUCCESS, config)(message);
105
+ var writeDebug = (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.DEBUG, config)(message);
106
+ var writeTrace = (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.TRACE, config)(message);
107
+ var writeSystem = (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.ALL, config)(message);
108
108
  var getStopwatch = (name) => {
109
109
  const start = process.hrtime();
110
110
  return () => {
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  loadStormWorkspaceConfig,
3
3
  tryLoadStormWorkspaceConfig
4
- } from "./chunk-62YJAX4N.js";
4
+ } from "./chunk-CMR737AZ.js";
5
5
  import {
6
6
  findWorkspaceRoot
7
- } from "./chunk-VLWSWYG7.js";
7
+ } from "./chunk-PTHGOJU6.js";
8
8
 
9
9
  // src/get-config.ts
10
10
  var getConfig = (workspaceRoot, skipLogs = false) => {
11
11
  return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
12
12
  };
13
- var getWorkspaceConfig = (skipLogs = false, options = {}) => {
13
+ var getWorkspaceConfig = (skipLogs = true, options = {}) => {
14
14
  let workspaceRoot = options.workspaceRoot;
15
15
  if (!workspaceRoot) {
16
16
  workspaceRoot = findWorkspaceRoot(options.cwd);
17
17
  }
18
18
  return getConfig(workspaceRoot, skipLogs);
19
19
  };
20
- var tryGetWorkspaceConfig = async (skipLogs = false, options = {}) => {
20
+ var tryGetWorkspaceConfig = async (skipLogs = true, options = {}) => {
21
21
  try {
22
22
  let workspaceRoot = options.workspaceRoot;
23
23
  if (!workspaceRoot) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeError
3
- } from "./chunk-OUYYXBZX.js";
3
+ } from "./chunk-SMVSQFZ3.js";
4
4
 
5
5
  // src/utilities/toml.ts
6
6
  import TOML from "@ltd/j-toml";
@@ -3,31 +3,31 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkDX767CQScjs = require('./chunk-DX767CQS.cjs');
6
+ var _chunkXPQXNNGZcjs = require('./chunk-XPQXNNGZ.cjs');
7
7
 
8
8
  // src/utilities/process-handler.ts
9
9
  var exitWithError = (config) => {
10
- _chunkDX767CQScjs.writeFatal.call(void 0, "Exiting script with an error status...", config);
10
+ _chunkXPQXNNGZcjs.writeFatal.call(void 0, "Exiting script with an error status...", config);
11
11
  process.exit(1);
12
12
  };
13
13
  var exitWithSuccess = (config) => {
14
- _chunkDX767CQScjs.writeSuccess.call(void 0, "Script completed successfully. Exiting...", config);
14
+ _chunkXPQXNNGZcjs.writeSuccess.call(void 0, "Script completed successfully. Exiting...", config);
15
15
  process.exit(0);
16
16
  };
17
17
  var handleProcess = (config) => {
18
- _chunkDX767CQScjs.writeTrace.call(void 0,
18
+ _chunkXPQXNNGZcjs.writeTrace.call(void 0,
19
19
  `Using the following arguments to process the script: ${process.argv.join(", ")}`,
20
20
  config
21
21
  );
22
22
  process.on("unhandledRejection", (error) => {
23
- _chunkDX767CQScjs.writeError.call(void 0,
23
+ _chunkXPQXNNGZcjs.writeError.call(void 0,
24
24
  `An Unhandled Rejection occurred while running the program: ${error}`,
25
25
  config
26
26
  );
27
27
  exitWithError(config);
28
28
  });
29
29
  process.on("uncaughtException", (error) => {
30
- _chunkDX767CQScjs.writeError.call(void 0,
30
+ _chunkXPQXNNGZcjs.writeError.call(void 0,
31
31
  `An Uncaught Exception occurred while running the program: ${error.message}
32
32
  Stacktrace: ${error.stack}`,
33
33
  config
@@ -35,15 +35,15 @@ Stacktrace: ${error.stack}`,
35
35
  exitWithError(config);
36
36
  });
37
37
  process.on("SIGTERM", (signal) => {
38
- _chunkDX767CQScjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
38
+ _chunkXPQXNNGZcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
39
39
  exitWithError(config);
40
40
  });
41
41
  process.on("SIGINT", (signal) => {
42
- _chunkDX767CQScjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
42
+ _chunkXPQXNNGZcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
43
43
  exitWithError(config);
44
44
  });
45
45
  process.on("SIGHUP", (signal) => {
46
- _chunkDX767CQScjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
46
+ _chunkXPQXNNGZcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
47
47
  exitWithError(config);
48
48
  });
49
49
  };
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  getLogFn,
3
3
  getStopwatch
4
- } from "./chunk-OUYYXBZX.js";
4
+ } from "./chunk-JCPJSRHW.js";
5
5
  import {
6
6
  findWorkspaceRoot
7
- } from "./chunk-VLWSWYG7.js";
7
+ } from "./chunk-PTHGOJU6.js";
8
8
  import {
9
9
  LogLevel
10
- } from "./chunk-3QAWRU2B.js";
10
+ } from "./chunk-POXTJ6GF.js";
11
11
 
12
12
  // src/logger/create-logger.ts
13
13
  import chalk from "chalk";
@@ -0,0 +1,40 @@
1
+ import {
2
+ getLogFn,
3
+ getStopwatch
4
+ } from "./chunk-SMVSQFZ3.js";
5
+ import {
6
+ findWorkspaceRoot
7
+ } from "./chunk-PTHGOJU6.js";
8
+ import {
9
+ LogLevel
10
+ } from "./chunk-POXTJ6GF.js";
11
+
12
+ // src/logger/create-logger.ts
13
+ import chalk from "chalk";
14
+ async function createLogger(config) {
15
+ const workspaceRoot = findWorkspaceRoot();
16
+ if (!workspaceRoot) {
17
+ throw new Error("Cannot find workspace root");
18
+ }
19
+ const writeFatal = getLogFn(LogLevel.FATAL, config, chalk);
20
+ const writeError = getLogFn(LogLevel.ERROR, config, chalk);
21
+ const writeWarning = getLogFn(LogLevel.WARN, config, chalk);
22
+ const writeInfo = getLogFn(LogLevel.INFO, config, chalk);
23
+ const writeSuccess = getLogFn(LogLevel.SUCCESS, config, chalk);
24
+ const writeDebug = getLogFn(LogLevel.DEBUG, config, chalk);
25
+ const writeTrace = getLogFn(LogLevel.DEBUG, config, chalk);
26
+ return {
27
+ fatal: writeFatal,
28
+ error: writeError,
29
+ warning: writeWarning,
30
+ info: writeInfo,
31
+ success: writeSuccess,
32
+ debug: writeDebug,
33
+ trace: writeTrace,
34
+ getStopwatch
35
+ };
36
+ }
37
+
38
+ export {
39
+ createLogger
40
+ };