@storm-software/linting-tools 1.26.0 → 1.26.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.26.1](https://github.com/storm-software/storm-ops/compare/linting-tools-v1.26.0...linting-tools-v1.26.1) (2024-01-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **git-tools:** Resolved logging issues with git hooks and tsup build ([daeec6e](https://github.com/storm-software/storm-ops/commit/daeec6efaad169b6947eedef1a07339c0b52409c))
7
+
8
+ # [1.26.0](https://github.com/storm-software/storm-ops/compare/linting-tools-v1.25.3...linting-tools-v1.26.0) (2024-01-15)
9
+
10
+
11
+ ### Features
12
+
13
+ * **workspace-tools:** Added logger functions to use in the repo's console CLI apps ([c38d262](https://github.com/storm-software/storm-ops/commit/c38d26271cfee4e8fd094526b431e098d186a667))
14
+
1
15
  ## [1.25.3](https://github.com/storm-software/storm-ops/compare/linting-tools-v1.25.2...linting-tools-v1.25.3) (2024-01-15)
2
16
 
3
17
 
package/README.md CHANGED
@@ -16,7 +16,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
16
16
 
17
17
  <h3 align="center">💻 Visit <a href="https://stormsoftware.org" target="_blank">stormsoftware.org</a> to stay up to date with this developer</h3><br />
18
18
 
19
- [![Version](https://img.shields.io/badge/version-1.24.1-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
19
+ [![Version](https://img.shields.io/badge/version-1.26.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
20
20
  [![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 docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/)&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)
21
21
 
22
22
  <h3 align="center" bold="true">⚠️ <b>Attention</b> ⚠️ This repository, and the apps, libraries, and tools contained within, is still in it's initial development phase. As a result, bugs and issues are expected with it's usage. When the main development phase completes, a proper release will be performed, the packages will be availible through NPM (and other distributions), and this message will be removed. However, in the meantime, please feel free to report any issues you may come across.</h3><br />
package/bin/cli.mjs CHANGED
@@ -1,20 +1,28 @@
1
1
  #!/usr/bin/env zx
2
2
 
3
- import { findWorkspaceRootSafe } from "../../config-tools/utilities/find-workspace-root.js";
3
+ import { writeFatal, writeSuccess } from "../../config-tools/utilities/logger.js";
4
+ import { prepareWorkspace } from "../../config-tools/utilities/prepare-workspace.js";
4
5
  import { createProgram } from "../cli/index.js";
5
6
 
7
+ const _STORM_CONFIG = await prepareWorkspace();
8
+
6
9
  try {
7
- const workspaceRoot = findWorkspaceRootSafe();
8
- cd(workspaceRoot);
10
+ // biome-ignore lint/correctness/noUndeclaredVariables: <explanation>
11
+ cd(_STORM_CONFIG.workspaceRoot);
9
12
 
13
+ // biome-ignore lint/correctness/noUndeclaredVariables: <explanation>
10
14
  await spinner("Executing code linting and fixing...", async () => {
11
15
  const program = createProgram();
12
16
  program.exitOverride();
13
17
 
14
18
  await program.parseAsync(process.argv.splice(1));
15
19
  });
20
+
21
+ writeSuccess(_STORM_CONFIG, "Code linting and fixing completed successfully!");
16
22
  } catch (e) {
17
- console.error(`Error: ${e.stderr}`);
18
- console.error(e);
23
+ writeFatal(
24
+ _STORM_CONFIG,
25
+ `A fatal error occurred while running the program: ${e.stderr} \nStacktrace: ${e.stack}`
26
+ );
19
27
  process.exit(1);
20
28
  }
package/biome/biome.json CHANGED
@@ -44,7 +44,21 @@
44
44
  },
45
45
  "nursery": {
46
46
  "useImportType": "error",
47
- "useExportType": "error"
47
+ "useExportType": "error",
48
+ "noDuplicateJsonKeys": "error",
49
+ "noMisleadingCharacterClass": "error",
50
+ "useAwait": "error",
51
+ "useConsistentArrayType": "error",
52
+ "useNodejsImportProtocol": "error",
53
+ "useShorthandFunctionType": "error",
54
+ "useImportRestrictions": "warn",
55
+ "useForOf": "error"
56
+ },
57
+ "correctness": {
58
+ "noUnusedVariables": "error",
59
+ "noUndeclaredVariables": "error",
60
+ "useHookAtTopLevel": "error",
61
+ "useExhaustiveDependencies": "warn"
48
62
  }
49
63
  }
50
64
  },
package/cli/index.js CHANGED
@@ -5622,7 +5622,7 @@ var require_util = __commonJS({
5622
5622
  return path37;
5623
5623
  }
5624
5624
  exports.normalize = normalize5;
5625
- function join7(aRoot, aPath) {
5625
+ function join8(aRoot, aPath) {
5626
5626
  if (aRoot === "") {
5627
5627
  aRoot = ".";
5628
5628
  }
@@ -5654,7 +5654,7 @@ var require_util = __commonJS({
5654
5654
  }
5655
5655
  return joined;
5656
5656
  }
5657
- exports.join = join7;
5657
+ exports.join = join8;
5658
5658
  exports.isAbsolute = function(aPath) {
5659
5659
  return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
5660
5660
  };
@@ -5827,7 +5827,7 @@ var require_util = __commonJS({
5827
5827
  parsed.path = parsed.path.substring(0, index2 + 1);
5828
5828
  }
5829
5829
  }
5830
- sourceURL = join7(urlGenerate(parsed), sourceURL);
5830
+ sourceURL = join8(urlGenerate(parsed), sourceURL);
5831
5831
  }
5832
5832
  return normalize5(sourceURL);
5833
5833
  }
@@ -209249,10 +209249,10 @@ var require_stringify2 = __commonJS({
209249
209249
  replacer = null;
209250
209250
  indent2 = EMPTY2;
209251
209251
  };
209252
- var join7 = (one, two, gap) => one ? two ? one + two.trim() + LF3 + gap : one.trimRight() + LF3 + gap : two ? two.trimRight() + LF3 + gap : EMPTY2;
209252
+ var join8 = (one, two, gap) => one ? two ? one + two.trim() + LF3 + gap : one.trimRight() + LF3 + gap : two ? two.trimRight() + LF3 + gap : EMPTY2;
209253
209253
  var join_content = (inside, value, gap) => {
209254
209254
  const comment = process_comments(value, PREFIX_BEFORE, gap + indent2, true);
209255
- return join7(comment, inside, gap);
209255
+ return join8(comment, inside, gap);
209256
209256
  };
209257
209257
  var array_stringify = (value, gap) => {
209258
209258
  const deeper_gap = gap + indent2;
@@ -209263,7 +209263,7 @@ var require_stringify2 = __commonJS({
209263
209263
  if (i !== 0) {
209264
209264
  inside += COMMA;
209265
209265
  }
209266
- const before = join7(
209266
+ const before = join8(
209267
209267
  after_comma,
209268
209268
  process_comments(value, BEFORE(i), deeper_gap),
209269
209269
  deeper_gap
@@ -209273,7 +209273,7 @@ var require_stringify2 = __commonJS({
209273
209273
  inside += process_comments(value, AFTER_VALUE(i), deeper_gap);
209274
209274
  after_comma = process_comments(value, AFTER(i), deeper_gap);
209275
209275
  }
209276
- inside += join7(
209276
+ inside += join8(
209277
209277
  after_comma,
209278
209278
  process_comments(value, PREFIX_AFTER, deeper_gap),
209279
209279
  deeper_gap
@@ -209298,7 +209298,7 @@ var require_stringify2 = __commonJS({
209298
209298
  inside += COMMA;
209299
209299
  }
209300
209300
  first3 = false;
209301
- const before = join7(
209301
+ const before = join8(
209302
209302
  after_comma,
209303
209303
  process_comments(value, BEFORE(key), deeper_gap),
209304
209304
  deeper_gap
@@ -209308,7 +209308,7 @@ var require_stringify2 = __commonJS({
209308
209308
  after_comma = process_comments(value, AFTER(key), deeper_gap);
209309
209309
  };
209310
209310
  keys3.forEach(iteratee);
209311
- inside += join7(
209311
+ inside += join8(
209312
209312
  after_comma,
209313
209313
  process_comments(value, PREFIX_AFTER, deeper_gap),
209314
209314
  deeper_gap
@@ -209691,7 +209691,7 @@ var require_readFile = __commonJS({
209691
209691
  value: true
209692
209692
  });
209693
209693
  exports.readFile = readFile4;
209694
- exports.readFileSync = readFileSync5;
209694
+ exports.readFileSync = readFileSync6;
209695
209695
  var _fs = _interopRequireDefault(__require("fs"));
209696
209696
  function _interopRequireDefault(obj) {
209697
209697
  return obj && obj.__esModule ? obj : { default: obj };
@@ -209719,7 +209719,7 @@ var require_readFile = __commonJS({
209719
209719
  throw error2;
209720
209720
  }
209721
209721
  }
209722
- function readFileSync5(filepath, options = {}) {
209722
+ function readFileSync6(filepath, options = {}) {
209723
209723
  const throwNotFound = options.throwNotFound === true;
209724
209724
  try {
209725
209725
  const content = _fs.default.readFileSync(filepath, "utf8");
@@ -224186,7 +224186,7 @@ var require_jsonfile = __commonJS({
224186
224186
  return obj;
224187
224187
  }
224188
224188
  var readFile4 = universalify.fromPromise(_readFile);
224189
- function readFileSync5(file, options = {}) {
224189
+ function readFileSync6(file, options = {}) {
224190
224190
  if (typeof options === "string") {
224191
224191
  options = { encoding: options };
224192
224192
  }
@@ -224218,7 +224218,7 @@ var require_jsonfile = __commonJS({
224218
224218
  }
224219
224219
  var jsonfile = {
224220
224220
  readFile: readFile4,
224221
- readFileSync: readFileSync5,
224221
+ readFileSync: readFileSync6,
224222
224222
  writeFile: writeFile2,
224223
224223
  writeFileSync
224224
224224
  };
@@ -233833,7 +233833,7 @@ var require_lib10 = __commonJS({
233833
233833
  // node_modules/.pnpm/npm-normalize-package-bin@3.0.1/node_modules/npm-normalize-package-bin/lib/index.js
233834
233834
  var require_lib11 = __commonJS({
233835
233835
  "node_modules/.pnpm/npm-normalize-package-bin@3.0.1/node_modules/npm-normalize-package-bin/lib/index.js"(exports, module) {
233836
- var { join: join7, basename: basename7 } = __require("path");
233836
+ var { join: join8, basename: basename7 } = __require("path");
233837
233837
  var normalize5 = (pkg) => !pkg.bin ? removeBin(pkg) : typeof pkg.bin === "string" ? normalizeString(pkg) : Array.isArray(pkg.bin) ? normalizeArray(pkg) : typeof pkg.bin === "object" ? normalizeObject(pkg) : removeBin(pkg);
233838
233838
  var normalizeString = (pkg) => {
233839
233839
  if (!pkg.name) {
@@ -233858,11 +233858,11 @@ var require_lib11 = __commonJS({
233858
233858
  const clean6 = {};
233859
233859
  let hasBins = false;
233860
233860
  Object.keys(orig).forEach((binKey) => {
233861
- const base2 = join7("/", basename7(binKey.replace(/\\|:/g, "/"))).slice(1);
233861
+ const base2 = join8("/", basename7(binKey.replace(/\\|:/g, "/"))).slice(1);
233862
233862
  if (typeof orig[binKey] !== "string" || !base2) {
233863
233863
  return;
233864
233864
  }
233865
- const binTarget = join7("/", orig[binKey].replace(/\\/g, "/")).replace(/\\/g, "/").slice(1);
233865
+ const binTarget = join8("/", orig[binKey].replace(/\\/g, "/")).replace(/\\/g, "/").slice(1);
233866
233866
  if (!binTarget) {
233867
233867
  return;
233868
233868
  }
@@ -233886,7 +233886,7 @@ var require_lib12 = __commonJS({
233886
233886
  var { readFile: readFile4, lstat: lstat2, readdir: readdir2 } = __require("fs/promises");
233887
233887
  var parse4 = require_lib10();
233888
233888
  var normalizePackageBin = require_lib11();
233889
- var { resolve: resolve14, dirname: dirname12, join: join7, relative: relative6 } = __require("path");
233889
+ var { resolve: resolve14, dirname: dirname12, join: join8, relative: relative6 } = __require("path");
233890
233890
  var rpj = (path37) => readFile4(path37, "utf8").then((data) => readBinDir(path37, normalize5(stripUnderscores(parse4(data))))).catch((er) => {
233891
233891
  er.path = path37;
233892
233892
  throw er;
@@ -233900,7 +233900,7 @@ var require_lib12 = __commonJS({
233900
233900
  return data;
233901
233901
  }
233902
233902
  const root = dirname12(path37);
233903
- const dir = join7(".", join7("/", m));
233903
+ const dir = join8(".", join8("/", m));
233904
233904
  data.bin = await walkBinDir(root, dir, {});
233905
233905
  return data;
233906
233906
  };
@@ -233917,7 +233917,7 @@ var require_lib12 = __commonJS({
233917
233917
  } else if (st.isFile()) {
233918
233918
  obj[entry] = relative6(root, f);
233919
233919
  } else if (st.isDirectory()) {
233920
- await walkBinDir(root, join7(dir, entry), obj);
233920
+ await walkBinDir(root, join8(dir, entry), obj);
233921
233921
  }
233922
233922
  }
233923
233923
  return obj;
@@ -236941,7 +236941,7 @@ var require_lib15 = __commonJS({
236941
236941
  var mapWorkspaces = require_lib13();
236942
236942
  var rpj = require_lib12();
236943
236943
  var log2 = require_lib14();
236944
- var { resolve: resolve14, dirname: dirname12, join: join7 } = __require("path");
236944
+ var { resolve: resolve14, dirname: dirname12, join: join8 } = __require("path");
236945
236945
  var { homedir: homedir2 } = __require("os");
236946
236946
  var {
236947
236947
  readFile: readFile4,
@@ -237027,7 +237027,7 @@ var require_lib15 = __commonJS({
237027
237027
  this.shorthands = shorthands;
237028
237028
  this.defaults = defaults3;
237029
237029
  this.npmPath = npmPath;
237030
- this.npmBin = join7(this.npmPath, "bin/npm-cli.js");
237030
+ this.npmBin = join8(this.npmPath, "bin/npm-cli.js");
237031
237031
  this.argv = argv2;
237032
237032
  this.env = env5;
237033
237033
  this.execPath = execPath;
@@ -237177,7 +237177,7 @@ var require_lib15 = __commonJS({
237177
237177
  prefix: this.globalPrefix
237178
237178
  };
237179
237179
  try {
237180
- defaultsObject["npm-version"] = __require(join7(this.npmPath, "package.json")).version;
237180
+ defaultsObject["npm-version"] = __require(join8(this.npmPath, "package.json")).version;
237181
237181
  } catch {
237182
237182
  }
237183
237183
  this.#loadObject(defaultsObject, "default", "default values");
@@ -237198,7 +237198,7 @@ var require_lib15 = __commonJS({
237198
237198
  } else {
237199
237199
  this.globalPrefix = dirname12(dirname12(this.execPath));
237200
237200
  if (this.env.DESTDIR) {
237201
- this.globalPrefix = join7(this.env.DESTDIR, this.globalPrefix);
237201
+ this.globalPrefix = join8(this.env.DESTDIR, this.globalPrefix);
237202
237202
  }
237203
237203
  }
237204
237204
  }
@@ -245390,7 +245390,7 @@ var require_buffer_list = __commonJS({
245390
245390
  }
245391
245391
  }, {
245392
245392
  key: "join",
245393
- value: function join7(s) {
245393
+ value: function join8(s) {
245394
245394
  if (this.length === 0)
245395
245395
  return "";
245396
245396
  var p = this.head;
@@ -252451,7 +252451,7 @@ var require_jsonfile3 = __commonJS({
252451
252451
  callback(null, obj);
252452
252452
  });
252453
252453
  }
252454
- function readFileSync5(file, options) {
252454
+ function readFileSync6(file, options) {
252455
252455
  options = options || {};
252456
252456
  if (typeof options === "string") {
252457
252457
  options = { encoding: options };
@@ -252519,7 +252519,7 @@ var require_jsonfile3 = __commonJS({
252519
252519
  }
252520
252520
  var jsonfile = {
252521
252521
  readFile: readFile4,
252522
- readFileSync: readFileSync5,
252522
+ readFileSync: readFileSync6,
252523
252523
  writeFile: writeFile2,
252524
252524
  writeFileSync
252525
252525
  };
@@ -269139,7 +269139,7 @@ var require_minimist = __commonJS({
269139
269139
  var require_rc = __commonJS({
269140
269140
  "node_modules/.pnpm/rc@1.2.8/node_modules/rc/index.js"(exports, module) {
269141
269141
  var cc = require_utils11();
269142
- var join7 = __require("path").join;
269142
+ var join8 = __require("path").join;
269143
269143
  var deepExtend = require_deep_extend();
269144
269144
  var etc = "/etc";
269145
269145
  var win = process.platform === "win32";
@@ -269165,15 +269165,15 @@ var require_rc = __commonJS({
269165
269165
  }
269166
269166
  if (!win)
269167
269167
  [
269168
- join7(etc, name, "config"),
269169
- join7(etc, name + "rc")
269168
+ join8(etc, name, "config"),
269169
+ join8(etc, name + "rc")
269170
269170
  ].forEach(addConfigFile);
269171
269171
  if (home)
269172
269172
  [
269173
- join7(home, ".config", name, "config"),
269174
- join7(home, ".config", name),
269175
- join7(home, "." + name, "config"),
269176
- join7(home, "." + name + "rc")
269173
+ join8(home, ".config", name, "config"),
269174
+ join8(home, ".config", name),
269175
+ join8(home, "." + name, "config"),
269176
+ join8(home, "." + name + "rc")
269177
269177
  ].forEach(addConfigFile);
269178
269178
  addConfigFile(cc.find("." + name + "rc"));
269179
269179
  if (env5.config)
@@ -272702,8 +272702,8 @@ var init_js_yaml = __esm({
272702
272702
  });
272703
272703
 
272704
272704
  // node_modules/.pnpm/check-dependency-version-consistency@4.1.0/node_modules/check-dependency-version-consistency/dist/lib/package.js
272705
- import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
272706
- import { join as join5, relative as relative5 } from "node:path";
272705
+ import { existsSync as existsSync4, readFileSync as readFileSync5 } from "node:fs";
272706
+ import { join as join6, relative as relative5 } from "node:path";
272707
272707
  var Package2;
272708
272708
  var init_package = __esm({
272709
272709
  "node_modules/.pnpm/check-dependency-version-consistency@4.1.0/node_modules/check-dependency-version-consistency/dist/lib/package.js"() {
@@ -272712,13 +272712,13 @@ var init_package = __esm({
272712
272712
  constructor(path37, pathWorkspace) {
272713
272713
  this.path = path37;
272714
272714
  this.pathWorkspace = pathWorkspace;
272715
- this.pathPackageJson = join5(path37, "package.json");
272716
- const packageJsonContents = readFileSync4(this.pathPackageJson, "utf8");
272715
+ this.pathPackageJson = join6(path37, "package.json");
272716
+ const packageJsonContents = readFileSync5(this.pathPackageJson, "utf8");
272717
272717
  this.packageJsonEndsInNewline = packageJsonContents.endsWith("\n");
272718
272718
  this.packageJson = JSON.parse(packageJsonContents);
272719
- const pnpmWorkspacePath = join5(path37, "pnpm-workspace.yaml");
272720
- if (existsSync3(pnpmWorkspacePath)) {
272721
- const pnpmWorkspaceContents = readFileSync4(pnpmWorkspacePath, "utf8");
272719
+ const pnpmWorkspacePath = join6(path37, "pnpm-workspace.yaml");
272720
+ if (existsSync4(pnpmWorkspacePath)) {
272721
+ const pnpmWorkspaceContents = readFileSync5(pnpmWorkspacePath, "utf8");
272722
272722
  const pnpmWorkspaceYaml = load2(pnpmWorkspaceContents);
272723
272723
  this.pnpmWorkspacePackages = pnpmWorkspaceYaml.packages;
272724
272724
  }
@@ -272758,8 +272758,8 @@ var init_package = __esm({
272758
272758
  return [];
272759
272759
  }
272760
272760
  static exists(path37) {
272761
- const packageJsonPath = join5(path37, "package.json");
272762
- return existsSync3(packageJsonPath);
272761
+ const packageJsonPath = join6(path37, "package.json");
272762
+ return existsSync4(packageJsonPath);
272763
272763
  }
272764
272764
  static some(packages, callback) {
272765
272765
  return packages.some((package_) => callback(package_));
@@ -273359,7 +273359,7 @@ var init_globby = __esm({
273359
273359
  });
273360
273360
 
273361
273361
  // node_modules/.pnpm/check-dependency-version-consistency@4.1.0/node_modules/check-dependency-version-consistency/dist/lib/workspace.js
273362
- import { join as join6 } from "node:path";
273362
+ import { join as join7 } from "node:path";
273363
273363
  function getPackages5(root, ignorePackages, ignorePackagePatterns, ignorePaths, ignorePathPatterns) {
273364
273364
  if (!Package2.exists(root)) {
273365
273365
  throw new Error("No package.json found at provided path.");
@@ -273418,7 +273418,7 @@ function expandWorkspaces(root, workspacePatterns) {
273418
273418
  function accumulatePackages(root, paths) {
273419
273419
  const results = [];
273420
273420
  for (const relativePath2 of paths) {
273421
- const path37 = join6(root, relativePath2);
273421
+ const path37 = join7(root, relativePath2);
273422
273422
  if (Package2.exists(path37)) {
273423
273423
  const package_ = new Package2(path37, root);
273424
273424
  results.push(
@@ -278217,6 +278217,65 @@ var init_lib2 = __esm({
278217
278217
 
278218
278218
  // packages/config-tools/src/config-file/get-config-file.ts
278219
278219
  var import_cosmiconfig = __toESM(require_dist(), 1);
278220
+ var _static_cache = void 0;
278221
+ var getConfigFileName = (fileName, filePath2) => (0, import_cosmiconfig.cosmiconfig)(fileName, { cache: true }).search(filePath2);
278222
+ var getConfigFile = async (filePath2) => {
278223
+ if (_static_cache) {
278224
+ return _static_cache;
278225
+ }
278226
+ let cosmiconfigResult = await getConfigFileName("storm", filePath2);
278227
+ if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
278228
+ cosmiconfigResult = await getConfigFileName("storm-software", filePath2);
278229
+ if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
278230
+ cosmiconfigResult = await getConfigFileName("storm-stack", filePath2);
278231
+ if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
278232
+ cosmiconfigResult = await getConfigFileName("storm-cloud", filePath2);
278233
+ if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
278234
+ cosmiconfigResult = await getConfigFileName("acidic", filePath2);
278235
+ if (!cosmiconfigResult || cosmiconfigResult.isEmpty) {
278236
+ cosmiconfigResult = await getConfigFileName("acid", filePath2);
278237
+ }
278238
+ }
278239
+ }
278240
+ }
278241
+ }
278242
+ if (!cosmiconfigResult || Object.keys(cosmiconfigResult).length === 0 || cosmiconfigResult.isEmpty || !cosmiconfigResult.filepath) {
278243
+ console.warn(
278244
+ "No Storm config file found in the current workspace. Please ensure this is the expected behavior - you can add a `storm.config.js` file to the root of your workspace if it is not."
278245
+ );
278246
+ return void 0;
278247
+ }
278248
+ const config2 = cosmiconfigResult.config ?? {};
278249
+ if (cosmiconfigResult.filepath) {
278250
+ config2.configFile = cosmiconfigResult.filepath;
278251
+ }
278252
+ config2.runtimeVersion = "0.0.1";
278253
+ _static_cache = config2;
278254
+ return config2;
278255
+ };
278256
+
278257
+ // packages/config-tools/src/types.ts
278258
+ var LogLevel = {
278259
+ SILENT: 0,
278260
+ FATAL: 10,
278261
+ ERROR: 20,
278262
+ WARN: 30,
278263
+ INFO: 40,
278264
+ SUCCESS: 45,
278265
+ DEBUG: 60,
278266
+ TRACE: 70,
278267
+ ALL: 100
278268
+ };
278269
+ var LogLevelLabel = {
278270
+ SILENT: "silent",
278271
+ FATAL: "fatal",
278272
+ ERROR: "error",
278273
+ WARN: "warn",
278274
+ INFO: "info",
278275
+ DEBUG: "debug",
278276
+ TRACE: "trace",
278277
+ ALL: "all"
278278
+ };
278220
278279
 
278221
278280
  // packages/config-tools/src/utilities/find-up.ts
278222
278281
  import { existsSync } from "fs";
@@ -278273,6 +278332,23 @@ function findWorkspaceRootSafe(pathInsideMonorepo) {
278273
278332
  }
278274
278333
  return findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles);
278275
278334
  }
278335
+ function findWorkspaceRoot(pathInsideMonorepo) {
278336
+ const result = findWorkspaceRootSafe(pathInsideMonorepo);
278337
+ if (!result) {
278338
+ throw new Error(
278339
+ `Cannot find workspace root upwards from known path. Files search list includes:
278340
+ ${rootFiles.join(
278341
+ "\n"
278342
+ )}
278343
+ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
278344
+ );
278345
+ }
278346
+ return result;
278347
+ }
278348
+
278349
+ // packages/config-tools/src/utilities/get-default-config.ts
278350
+ import { existsSync as existsSync2, readFileSync } from "fs";
278351
+ import { join as join2 } from "path";
278276
278352
 
278277
278353
  // node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs
278278
278354
  var util;
@@ -281934,9 +282010,396 @@ var DefaultStormConfig = {
281934
282010
  colors: { ...DefaultColorConfig },
281935
282011
  extensions: {}
281936
282012
  };
282013
+ var getDefaultConfig = (config2 = {}, root) => {
282014
+ let name = "storm-workspace";
282015
+ let namespace = "storm-software";
282016
+ let repository2 = "https://github.com/storm-software/storm-ops";
282017
+ let license = DefaultStormConfig.license;
282018
+ let homepage = DefaultStormConfig.homepage;
282019
+ const workspaceRoot = findWorkspaceRoot(root);
282020
+ if (existsSync2(join2(workspaceRoot, "package.json"))) {
282021
+ const file = readFileSync(join2(workspaceRoot, "package.json"), {
282022
+ encoding: "utf-8"
282023
+ });
282024
+ if (file) {
282025
+ const packageJson = JSON.parse(file);
282026
+ if (packageJson.name) {
282027
+ name = packageJson.name;
282028
+ }
282029
+ if (packageJson.namespace) {
282030
+ namespace = packageJson.namespace;
282031
+ }
282032
+ if (packageJson.repository?.url) {
282033
+ repository2 = packageJson.repository?.url;
282034
+ }
282035
+ if (packageJson.license) {
282036
+ license = packageJson.license;
282037
+ }
282038
+ if (packageJson.homepage) {
282039
+ homepage = packageJson.homepage;
282040
+ }
282041
+ }
282042
+ }
282043
+ return StormConfigSchema.parse({
282044
+ ...config2,
282045
+ ...DefaultStormConfig,
282046
+ colors: { ...config2.colors, ...DefaultColorConfig },
282047
+ workspaceRoot,
282048
+ name,
282049
+ namespace,
282050
+ repository: repository2,
282051
+ license: license ?? DefaultStormConfig.license,
282052
+ homepage: homepage ?? DefaultStormConfig.homepage,
282053
+ extensions: {
282054
+ ...config2.extensions
282055
+ }
282056
+ });
282057
+ };
282058
+
282059
+ // packages/config-tools/src/utilities/get-log-level.ts
282060
+ var getLogLevel = (label) => {
282061
+ switch (label) {
282062
+ case "all":
282063
+ return LogLevel.ALL;
282064
+ case "trace":
282065
+ return LogLevel.TRACE;
282066
+ case "debug":
282067
+ return LogLevel.DEBUG;
282068
+ case "info":
282069
+ return LogLevel.INFO;
282070
+ case "warn":
282071
+ return LogLevel.WARN;
282072
+ case "error":
282073
+ return LogLevel.ERROR;
282074
+ case "fatal":
282075
+ return LogLevel.FATAL;
282076
+ case "silent":
282077
+ return LogLevel.SILENT;
282078
+ default:
282079
+ return LogLevel.INFO;
282080
+ }
282081
+ };
282082
+ var getLogLevelLabel = (logLevel) => {
282083
+ if (logLevel >= LogLevel.ALL) {
282084
+ return LogLevelLabel.ALL;
282085
+ }
282086
+ if (logLevel >= LogLevel.TRACE) {
282087
+ return LogLevelLabel.TRACE;
282088
+ }
282089
+ if (logLevel >= LogLevel.DEBUG) {
282090
+ return LogLevelLabel.DEBUG;
282091
+ }
282092
+ if (logLevel >= LogLevel.INFO) {
282093
+ return LogLevelLabel.INFO;
282094
+ }
282095
+ if (logLevel >= LogLevel.WARN) {
282096
+ return LogLevelLabel.WARN;
282097
+ }
282098
+ if (logLevel >= LogLevel.ERROR) {
282099
+ return LogLevelLabel.ERROR;
282100
+ }
282101
+ if (logLevel >= LogLevel.FATAL) {
282102
+ return LogLevelLabel.FATAL;
282103
+ }
282104
+ if (logLevel <= LogLevel.SILENT) {
282105
+ return LogLevelLabel.SILENT;
282106
+ }
282107
+ return LogLevelLabel.INFO;
282108
+ };
281937
282109
 
281938
282110
  // packages/config-tools/src/utilities/logger.ts
281939
282111
  var chalk = __toESM(require_source(), 1);
282112
+ var getLogFn = (config2 = {}, logLevel = LogLevel.INFO) => {
282113
+ if (typeof logLevel === "number" && (logLevel >= getLogLevel(config2.logLevel ?? process.env?.STORM_LOG_LEVEL) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(config2.logLevel ?? process.env?.STORM_LOG_LEVEL)) {
282114
+ return (_) => {
282115
+ };
282116
+ }
282117
+ if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
282118
+ return (message) => {
282119
+ console.error(
282120
+ ` ${chalk.bold.bgHex(config2?.colors?.fatal ? config2.colors.fatal : "#1fb2a6").white("\n\n \u{1F480} Fatal ")} ${chalk.reset.hex(
282121
+ config2?.colors?.fatal ? config2.colors.fatal : "#1fb2a6"
282122
+ )(message)}
282123
+ `
282124
+ );
282125
+ };
282126
+ }
282127
+ if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
282128
+ return (message) => {
282129
+ console.error(
282130
+ ` ${chalk.bold.bgHex(config2?.colors?.error ? config2.colors.error : "#7d1a1a").white("\n\n \u{1F6D1} Error ")} ${chalk.reset.hex(
282131
+ config2?.colors?.error ? config2.colors.error : "#7d1a1a"
282132
+ )(message)}
282133
+ `
282134
+ );
282135
+ };
282136
+ }
282137
+ if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
282138
+ return (message) => {
282139
+ console.warn(
282140
+ ` ${chalk.bold.bgHex(config2?.colors?.warning ? config2.colors.warning : "#fcc419").white("\n\n \u26A0\uFE0F Warn ")} ${chalk.reset.hex(
282141
+ config2?.colors?.warning ? config2.colors.warning : "#fcc419"
282142
+ )(message)}
282143
+ `
282144
+ );
282145
+ };
282146
+ }
282147
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
282148
+ return (message) => {
282149
+ console.info(
282150
+ ` ${chalk.bold.bgHex(config2?.colors?.info ? config2.colors.info : "#0ea5e9").white("\n\n \u{1F4EC} Info ")} ${chalk.reset.hex(
282151
+ config2?.colors?.info ? config2.colors.info : "#0ea5e9"
282152
+ )(message)}
282153
+ `
282154
+ );
282155
+ };
282156
+ }
282157
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
282158
+ return (message) => {
282159
+ console.info(
282160
+ ` ${chalk.bold.bgHex(config2?.colors?.success ? config2.colors.success : "#087f5b").white("\n\n \u{1F389} Success ")} ${chalk.reset.hex(
282161
+ config2?.colors?.success ? config2.colors.success : "#087f5b"
282162
+ )(message)}
282163
+ `
282164
+ );
282165
+ };
282166
+ }
282167
+ if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
282168
+ return (message) => {
282169
+ console.debug(
282170
+ ` ${chalk.bold.bgHex(config2?.colors?.primary ? config2.colors.primary : "#1fb2a6").white("\n\n \u{1F9EA} Debug ")} ${chalk.reset.hex(
282171
+ config2?.colors?.primary ? config2.colors.primary : "#1fb2a6"
282172
+ )(message)}
282173
+ `
282174
+ );
282175
+ };
282176
+ }
282177
+ return (message) => {
282178
+ console.log(
282179
+ ` ${chalk.bold.bgHex(config2?.colors?.primary ? config2.colors.primary : "#1fb2a6").white("\n\n \u{1F4E2} System ")} ${chalk.bold.hex(
282180
+ config2?.colors?.primary ? config2.colors.primary : "#1fb2a6"
282181
+ )(message)}
282182
+ `
282183
+ );
282184
+ };
282185
+ };
282186
+ var writeFatal = (config2, message) => getLogFn(config2, LogLevel.FATAL)(message);
282187
+ var writeError = (config2, message) => getLogFn(config2, LogLevel.ERROR)(message);
282188
+ var writeInfo = (config2, message) => getLogFn(config2, LogLevel.INFO)(message);
282189
+ var writeSuccess = (config2, message) => getLogFn(config2, LogLevel.SUCCESS)(message);
282190
+ var writeDebug = (config2, message) => getLogFn(config2, LogLevel.DEBUG)(message);
282191
+ var writeTrace = (config2, message) => getLogFn(config2, LogLevel.TRACE)(message);
282192
+
282193
+ // packages/config-tools/src/env/set-env.ts
282194
+ var setExtensionEnv = (extensionName, extension) => {
282195
+ for (const key of Object.keys(extension ?? {})) {
282196
+ if (extension[key]) {
282197
+ const result = key?.replace(
282198
+ /([A-Z])+/g,
282199
+ (input) => input ? input[0].toUpperCase() + input.slice(1) : ""
282200
+ ).split(/(?=[A-Z])|[\.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
282201
+ let extensionKey;
282202
+ if (result.length === 0) {
282203
+ return;
282204
+ }
282205
+ if (result.length === 1) {
282206
+ extensionKey = result[0].toUpperCase();
282207
+ } else {
282208
+ extensionKey = result.reduce((ret, part) => {
282209
+ return `${ret}_${part.toLowerCase()}`;
282210
+ });
282211
+ }
282212
+ process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
282213
+ }
282214
+ }
282215
+ };
282216
+ var setConfigEnv = (config2) => {
282217
+ const prefix = "STORM_";
282218
+ if (config2.name) {
282219
+ process.env[`${prefix}NAME`] = config2.name;
282220
+ }
282221
+ if (config2.namespace) {
282222
+ process.env[`${prefix}NAMESPACE`] = config2.namespace;
282223
+ }
282224
+ if (config2.owner) {
282225
+ process.env[`${prefix}OWNER`] = config2.owner;
282226
+ }
282227
+ if (config2.worker) {
282228
+ process.env[`${prefix}WORKER`] = config2.worker;
282229
+ }
282230
+ if (config2.organization) {
282231
+ process.env[`${prefix}ORGANIZATION`] = config2.organization;
282232
+ }
282233
+ if (config2.packageManager) {
282234
+ process.env[`${prefix}PACKAGE_MANAGER`] = config2.packageManager;
282235
+ }
282236
+ if (config2.license) {
282237
+ process.env[`${prefix}LICENSE`] = config2.license;
282238
+ }
282239
+ if (config2.homepage) {
282240
+ process.env[`${prefix}HOMEPAGE`] = config2.homepage;
282241
+ }
282242
+ if (config2.timezone) {
282243
+ process.env[`${prefix}TIMEZONE`] = config2.timezone;
282244
+ process.env.TZ = config2.timezone;
282245
+ process.env.DEFAULT_TIMEZONE = config2.timezone;
282246
+ }
282247
+ if (config2.locale) {
282248
+ process.env[`${prefix}LOCALE`] = config2.locale;
282249
+ process.env.LOCALE = config2.locale;
282250
+ process.env.DEFAULT_LOCALE = config2.locale;
282251
+ process.env.LANG = config2.locale ? `${config2.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
282252
+ }
282253
+ if (config2.configFile) {
282254
+ process.env[`${prefix}CONFIG_FILE`] = config2.configFile;
282255
+ }
282256
+ if (config2.workspaceRoot) {
282257
+ process.env[`${prefix}WORKSPACE_ROOT`] = config2.workspaceRoot;
282258
+ process.env.NX_WORKSPACE_ROOT = config2.workspaceRoot;
282259
+ process.env.NX_WORKSPACE_ROOT_PATH = config2.workspaceRoot;
282260
+ }
282261
+ if (config2.packageDirectory) {
282262
+ process.env[`${prefix}PACKAGE_DIRECTORY`] = config2.packageDirectory;
282263
+ }
282264
+ if (config2.buildDirectory) {
282265
+ process.env[`${prefix}BUILD_DIRECTORY`] = config2.buildDirectory;
282266
+ }
282267
+ if (config2.runtimeVersion) {
282268
+ process.env[`${prefix}RUNTIME_VERSION`] = config2.runtimeVersion;
282269
+ }
282270
+ if (config2.runtimeDirectory) {
282271
+ process.env[`${prefix}RUNTIME_DIRECTORY`] = config2.runtimeDirectory;
282272
+ }
282273
+ if (config2.env) {
282274
+ process.env[`${prefix}ENV`] = config2.env;
282275
+ process.env.NODE_ENV = config2.env;
282276
+ process.env.ENVIRONMENT = config2.env;
282277
+ }
282278
+ if (config2.ci) {
282279
+ process.env[`${prefix}CI`] = String(config2.ci);
282280
+ process.env.CI = String(config2.ci);
282281
+ process.env.CONTINUOUS_INTEGRATION = String(config2.ci);
282282
+ }
282283
+ if (config2.colors.primary) {
282284
+ process.env[`${prefix}COLOR_PRIMARY`] = config2.colors.primary;
282285
+ }
282286
+ if (config2.colors.background) {
282287
+ process.env[`${prefix}COLOR_BACKGROUND`] = config2.colors.background;
282288
+ }
282289
+ if (config2.colors.success) {
282290
+ process.env[`${prefix}COLOR_SUCCESS`] = config2.colors.success;
282291
+ }
282292
+ if (config2.colors.info) {
282293
+ process.env[`${prefix}COLOR_INFO`] = config2.colors.info;
282294
+ }
282295
+ if (config2.colors.warning) {
282296
+ process.env[`${prefix}COLOR_WARNING`] = config2.colors.warning;
282297
+ }
282298
+ if (config2.colors.error) {
282299
+ process.env[`${prefix}COLOR_ERROR`] = config2.colors.error;
282300
+ }
282301
+ if (config2.colors.fatal) {
282302
+ process.env[`${prefix}COLOR_FATAL`] = config2.colors.fatal;
282303
+ }
282304
+ if (config2.repository) {
282305
+ process.env[`${prefix}REPOSITORY`] = config2.repository;
282306
+ }
282307
+ if (config2.branch) {
282308
+ process.env[`${prefix}BRANCH`] = config2.branch;
282309
+ }
282310
+ if (config2.preMajor) {
282311
+ process.env[`${prefix}PRE_MAJOR`] = String(config2.preMajor);
282312
+ }
282313
+ if (config2.logLevel) {
282314
+ process.env[`${prefix}LOG_LEVEL`] = String(config2.logLevel);
282315
+ process.env.LOG_LEVEL = String(config2.logLevel);
282316
+ process.env.NX_VERBOSE_LOGGING = String(
282317
+ getLogLevel(config2.logLevel) >= LogLevel.DEBUG ? true : false
282318
+ );
282319
+ process.env.RUST_BACKTRACE = getLogLevel(config2.logLevel) >= LogLevel.DEBUG ? "full" : "none";
282320
+ }
282321
+ process.env[`${prefix}CONFIG`] = JSON.stringify(config2);
282322
+ for (const key of Object.keys(config2.extensions ?? {})) {
282323
+ config2.extensions[key] && Object.keys(config2.extensions[key]) && setExtensionEnv(key, config2.extensions[key]);
282324
+ }
282325
+ };
282326
+
282327
+ // packages/config-tools/src/utilities/prepare-workspace.ts
282328
+ var prepareWorkspace = async () => {
282329
+ const _STORM_CONFIG2 = getDefaultConfig({
282330
+ ...await getConfigFile(),
282331
+ ...getConfigEnv()
282332
+ });
282333
+ setConfigEnv(_STORM_CONFIG2);
282334
+ return _STORM_CONFIG2;
282335
+ };
282336
+
282337
+ // packages/config-tools/src/env/get-env.ts
282338
+ var getExtensionEnv = (extensionName) => {
282339
+ const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
282340
+ return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
282341
+ const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
282342
+ if (name) {
282343
+ ret[name] = process.env[key];
282344
+ }
282345
+ return ret;
282346
+ }, {});
282347
+ };
282348
+ var getConfigEnv = () => {
282349
+ const prefix = "STORM_";
282350
+ let config2 = {
282351
+ name: process.env[`${prefix}NAME`],
282352
+ namespace: process.env[`${prefix}NAMESPACE`],
282353
+ owner: process.env[`${prefix}OWNER`],
282354
+ worker: process.env[`${prefix}WORKER`],
282355
+ organization: process.env[`${prefix}ORGANIZATION`],
282356
+ packageManager: process.env[`${prefix}PACKAGE_MANAGER`],
282357
+ license: process.env[`${prefix}LICENSE`],
282358
+ homepage: process.env[`${prefix}HOMEPAGE`],
282359
+ timezone: process.env[`${prefix}TIMEZONE`] ?? process.env.TZ,
282360
+ locale: process.env[`${prefix}LOCALE`] ?? process.env.LOCALE,
282361
+ configFile: process.env[`${prefix}CONFIG_FILE`],
282362
+ workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`],
282363
+ packageDirectory: process.env[`${prefix}PACKAGE_DIRECTORY`],
282364
+ buildDirectory: process.env[`${prefix}BUILD_DIRECTORY`],
282365
+ runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
282366
+ runtimeDirectory: process.env[`${prefix}RUNTIME_DIRECTORY`],
282367
+ env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
282368
+ ci: Boolean(process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION),
282369
+ colors: {
282370
+ primary: process.env[`${prefix}COLOR_PRIMARY`],
282371
+ background: process.env[`${prefix}COLOR_BACKGROUND`],
282372
+ success: process.env[`${prefix}COLOR_SUCCESS`],
282373
+ info: process.env[`${prefix}COLOR_INFO`],
282374
+ warning: process.env[`${prefix}COLOR_WARNING`],
282375
+ error: process.env[`${prefix}COLOR_ERROR`],
282376
+ fatal: process.env[`${prefix}COLOR_FATAL`]
282377
+ },
282378
+ repository: process.env[`${prefix}REPOSITORY`],
282379
+ branch: process.env[`${prefix}BRANCH`],
282380
+ preMajor: Boolean(process.env[`${prefix}PRE_MAJOR`]),
282381
+ logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : LogLevelLabel.INFO,
282382
+ extensions: {}
282383
+ };
282384
+ const serializedConfig = process.env[`${prefix}CONFIG`];
282385
+ if (serializedConfig) {
282386
+ const parsed = JSON.parse(serializedConfig);
282387
+ config2 = {
282388
+ ...config2,
282389
+ ...parsed,
282390
+ colors: { ...config2.colors, ...parsed.colors },
282391
+ extensions: { ...config2.extensions, ...parsed.extensions }
282392
+ };
282393
+ }
282394
+ const extensionPrefix = `${prefix}EXTENSION_`;
282395
+ return Object.keys(process.env).filter((key) => key.startsWith(extensionPrefix)).reduce((ret, key) => {
282396
+ const extensionName = key.substring(prefix.length, key.indexOf("_", prefix.length)).split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
282397
+ if (extensionName) {
282398
+ ret.extensions[extensionName] = getExtensionEnv(extensionName);
282399
+ }
282400
+ return ret;
282401
+ }, config2);
282402
+ };
281940
282403
 
281941
282404
  // node_modules/.pnpm/commander@11.1.0/node_modules/commander/esm.mjs
281942
282405
  var import_index = __toESM(require_commander(), 1);
@@ -283600,7 +284063,7 @@ var ErrorNotImplemented = class extends Error {
283600
284063
 
283601
284064
  // node_modules/.pnpm/cspell-io@7.3.9/node_modules/cspell-io/dist/esm/handlers/node/file.js
283602
284065
  import assert2 from "assert";
283603
- import { promises as fs, readFileSync, statSync } from "fs";
284066
+ import { promises as fs, readFileSync as readFileSync2, statSync } from "fs";
283604
284067
  import { fileURLToPath } from "url";
283605
284068
  import { gunzipSync, gzipSync } from "zlib";
283606
284069
 
@@ -283835,7 +284298,7 @@ function isGzFile(url) {
283835
284298
  return isGzFileRegExp.test(url.pathname);
283836
284299
  }
283837
284300
  var handleRequestFsReadBinaryFile = RequestFsReadBinaryFile.createRequestHandler(({ params }) => createResponse(fs.readFile(fileURLToPath(params.url)).then((content) => ({ url: params.url, content }))), void 0, "Node: Read Binary File.");
283838
- var handleRequestFsReadBinaryFileSync = RequestFsReadBinaryFileSync.createRequestHandler(({ params }) => createResponse({ url: params.url, content: readFileSync(fileURLToPath(params.url)) }), void 0, "Node: Sync Read Binary File.");
284301
+ var handleRequestFsReadBinaryFileSync = RequestFsReadBinaryFileSync.createRequestHandler(({ params }) => createResponse({ url: params.url, content: readFileSync2(fileURLToPath(params.url)) }), void 0, "Node: Sync Read Binary File.");
283839
284302
  var handleRequestFsReadFile = RequestFsReadFileText.createRequestHandler((req, _, dispatcher) => {
283840
284303
  const { url, encoding } = req.params;
283841
284304
  const res = dispatcher.dispatch(RequestFsReadBinaryFile.create({ url }));
@@ -322841,7 +323304,7 @@ import assert25 from "node:assert/strict";
322841
323304
  // node_modules/.pnpm/unist-util-inspect@8.0.0/node_modules/unist-util-inspect/lib/index.js
322842
323305
  var own11 = {}.hasOwnProperty;
322843
323306
  var bold2 = ansiColor(1, 22);
322844
- var dim = ansiColor(2, 22);
323307
+ var dim2 = ansiColor(2, 22);
322845
323308
  var yellow = ansiColor(33, 39);
322846
323309
  var green = ansiColor(32, 39);
322847
323310
  var colorExpression = /(?:(?:\u001B\[)|\u009B)(?:\d{1,3})?(?:(?:;\d{0,3})*)?[A-M|f-m]|\u001B[A-M]/g;
@@ -322872,11 +323335,11 @@ function inspectNodes(nodes, state) {
322872
323335
  let index2 = -1;
322873
323336
  while (++index2 < nodes.length) {
322874
323337
  result.push(
322875
- dim(
323338
+ dim2(
322876
323339
  (index2 < nodes.length - 1 ? "\u251C" : "\u2514") + "\u2500" + String(index2).padEnd(size)
322877
323340
  ) + " " + indent(
322878
323341
  inspectValue(nodes[index2], state),
322879
- (index2 < nodes.length - 1 ? dim("\u2502") : " ") + " ".repeat(size + 2),
323342
+ (index2 < nodes.length - 1 ? dim2("\u2502") : " ") + " ".repeat(size + 2),
322880
323343
  true
322881
323344
  )
322882
323345
  );
@@ -322905,12 +323368,12 @@ function inspectFields(object, state) {
322905
323368
  formatted = inspectNonTree(value);
322906
323369
  }
322907
323370
  result.push(
322908
- key + dim(":") + (/\s/.test(formatted.charAt(0)) ? "" : " ") + formatted
323371
+ key + dim2(":") + (/\s/.test(formatted.charAt(0)) ? "" : " ") + formatted
322909
323372
  );
322910
323373
  }
322911
323374
  return indent(
322912
323375
  result.join("\n"),
322913
- (isArrayUnknown(object.children) && object.children.length > 0 ? dim("\u2502") : " ") + " "
323376
+ (isArrayUnknown(object.children) && object.children.length > 0 ? dim2("\u2502") : " ") + " "
322914
323377
  );
322915
323378
  }
322916
323379
  function inspectTree(node, state) {
@@ -322941,12 +323404,12 @@ function formatNode(node, state) {
322941
323404
  result.push("<", kind, ">");
322942
323405
  }
322943
323406
  if (isArrayUnknown(map4.children)) {
322944
- result.push(dim("["), yellow(String(map4.children.length)), dim("]"));
323407
+ result.push(dim2("["), yellow(String(map4.children.length)), dim2("]"));
322945
323408
  } else if (typeof map4.value === "string") {
322946
323409
  result.push(" ", green(inspectNonTree(map4.value)));
322947
323410
  }
322948
323411
  if (position3) {
322949
- result.push(" ", dim("("), position3, dim(")"));
323412
+ result.push(" ", dim2("("), position3, dim2(")"));
322950
323413
  }
322951
323414
  return result.join("");
322952
323415
  }
@@ -324235,58 +324698,63 @@ async function runManypkg(manypkgType, manypkgArgs, manypkgFix = true) {
324235
324698
  }
324236
324699
 
324237
324700
  // packages/linting-tools/src/cli/index.ts
324701
+ var _STORM_CONFIG = await prepareWorkspace();
324238
324702
  function createProgram() {
324239
- console.log("\u26A1 Running Storm Linting Tools");
324240
- const root = findWorkspaceRootSafe();
324241
- process.env.STORM_WORKSPACE_ROOT ??= root;
324242
- process.env.NX_WORKSPACE_ROOT_PATH ??= root;
324243
- root && process.chdir(root);
324244
- const program2 = new Command("storm-lint");
324245
- program2.version("1.0.0", "-v --version", "display CLI version");
324246
- program2.description("\u26A1 Lint the Storm Workspace").showHelpAfterError().showSuggestionAfterError();
324247
- const cspellConfig = new Option("--cspell-config <file>", "CSpell config file path").default(
324248
- "@storm-software/linting-tools/cspell/config.js"
324249
- );
324250
- program2.command("cspell").description("Run spell-check lint for the workspace.").addOption(cspellConfig).action(cspellAction);
324251
- const alexConfig = new Option("--alex-config <file>", "Alex.js config file path").default(
324252
- "@storm-software/linting-tools/alex/.alexrc"
324253
- );
324254
- const alexIgnore = new Option("--alex-ignore <file>", "Alex.js Ignore file path").default(
324255
- "@storm-software/linting-tools/alex/.alexignore"
324256
- );
324257
- program2.command("alex").description("Run spell-check lint for the workspace.").addOption(alexConfig).addOption(alexIgnore).action(alexAction);
324258
- program2.command("deps-version").description("Run dependency version consistency lint for the workspace.").action(depsVersionAction);
324259
- program2.command("circular-deps").description("Run circular dependency lint for the workspace.").action(circularDepsAction);
324260
- const manypkgType = new Option("--manypkg-type <type>", "The manypkg command to run").default(
324261
- "check"
324262
- );
324263
- const manypkgArgs = new Option(
324264
- "--manypkg-args <args>",
324265
- "The args provided to the manypkg command"
324266
- ).default([]);
324267
- const manypkgFix = new Option(
324268
- "--manypkg-fix <args>",
324269
- "The args provided to the manypkg command"
324270
- ).default(true);
324271
- program2.command("manypkg").description("Run package lint with Manypkg for the workspace.").addOption(manypkgType).addOption(manypkgArgs).addOption(manypkgFix).action(manypkgAction);
324272
- const cspellSkip = new Option("--skip-cspell", "Should skip CSpell linting");
324273
- const alexSkip = new Option("--skip-alex", "Should skip Alex language linting");
324274
- const depsVersionSkip = new Option(
324275
- "--skip-deps-version",
324276
- "Should skip dependency version consistency linting"
324277
- );
324278
- const circularDepsSkip = new Option(
324279
- "--skip-circular-deps",
324280
- "Should skip circular dependency linting"
324281
- );
324282
- const manypkgSkip = new Option("--skip-manypkg", "Should skip Manypkg linting");
324283
- program2.command("all").description("Run all linters for the workspace.").addOption(cspellSkip).addOption(alexSkip).addOption(depsVersionSkip).addOption(circularDepsSkip).addOption(manypkgSkip).addOption(cspellConfig).addOption(alexConfig).addOption(alexIgnore).addOption(manypkgType).addOption(manypkgArgs).addOption(manypkgFix).action(allAction);
324284
- return program2;
324703
+ try {
324704
+ writeInfo(_STORM_CONFIG, "\u26A1 Running Storm Linting Tools");
324705
+ const root = findWorkspaceRootSafe();
324706
+ process.env.STORM_WORKSPACE_ROOT ??= root;
324707
+ process.env.NX_WORKSPACE_ROOT_PATH ??= root;
324708
+ root && process.chdir(root);
324709
+ const program2 = new Command("storm-lint");
324710
+ program2.version("1.0.0", "-v --version", "display CLI version");
324711
+ program2.description("\u26A1 Lint the Storm Workspace").showHelpAfterError().showSuggestionAfterError();
324712
+ const cspellConfig = new Option("--cspell-config <file>", "CSpell config file path").default(
324713
+ "@storm-software/linting-tools/cspell/config.js"
324714
+ );
324715
+ program2.command("cspell").description("Run spell-check lint for the workspace.").addOption(cspellConfig).action(cspellAction);
324716
+ const alexConfig = new Option("--alex-config <file>", "Alex.js config file path").default(
324717
+ "@storm-software/linting-tools/alex/.alexrc"
324718
+ );
324719
+ const alexIgnore = new Option("--alex-ignore <file>", "Alex.js Ignore file path").default(
324720
+ "@storm-software/linting-tools/alex/.alexignore"
324721
+ );
324722
+ program2.command("alex").description("Run spell-check lint for the workspace.").addOption(alexConfig).addOption(alexIgnore).action(alexAction);
324723
+ program2.command("deps-version").description("Run dependency version consistency lint for the workspace.").action(depsVersionAction);
324724
+ program2.command("circular-deps").description("Run circular dependency lint for the workspace.").action(circularDepsAction);
324725
+ const manypkgType = new Option("--manypkg-type <type>", "The manypkg command to run").default(
324726
+ "check"
324727
+ );
324728
+ const manypkgArgs = new Option(
324729
+ "--manypkg-args <args>",
324730
+ "The args provided to the manypkg command"
324731
+ ).default([]);
324732
+ const manypkgFix = new Option(
324733
+ "--manypkg-fix <args>",
324734
+ "The args provided to the manypkg command"
324735
+ ).default(true);
324736
+ program2.command("manypkg").description("Run package lint with Manypkg for the workspace.").addOption(manypkgType).addOption(manypkgArgs).addOption(manypkgFix).action(manypkgAction);
324737
+ const cspellSkip = new Option("--skip-cspell", "Should skip CSpell linting");
324738
+ const alexSkip = new Option("--skip-alex", "Should skip Alex language linting");
324739
+ const depsVersionSkip = new Option(
324740
+ "--skip-deps-version",
324741
+ "Should skip dependency version consistency linting"
324742
+ );
324743
+ const circularDepsSkip = new Option(
324744
+ "--skip-circular-deps",
324745
+ "Should skip circular dependency linting"
324746
+ );
324747
+ const manypkgSkip = new Option("--skip-manypkg", "Should skip Manypkg linting");
324748
+ program2.command("all").description("Run all linters for the workspace.").addOption(cspellSkip).addOption(alexSkip).addOption(depsVersionSkip).addOption(circularDepsSkip).addOption(manypkgSkip).addOption(cspellConfig).addOption(alexConfig).addOption(alexIgnore).addOption(manypkgType).addOption(manypkgArgs).addOption(manypkgFix).action(allAction);
324749
+ return program2;
324750
+ } catch (e) {
324751
+ writeFatal(_STORM_CONFIG, `A fatal error occurred while running the program: ${e.message}`);
324752
+ process.exit(1);
324753
+ }
324285
324754
  }
324286
324755
  async function allAction(cspellSkip, alexSkip, depsVersionSkip, circularDepsSkip, manypkgSkip, cspellConfig, alexConfig, alexIgnore, manypkgType, manypkgArgs, manypkgFix) {
324287
324756
  try {
324288
- console.log("\u26A1 Linting the Storm Workspace");
324289
- console.log(process.argv);
324757
+ writeInfo(_STORM_CONFIG, "\u26A1 Linting the Storm Workspace");
324290
324758
  const promises = [];
324291
324759
  if (!cspellSkip) {
324292
324760
  promises.push(cspellAction(cspellConfig));
@@ -324304,9 +324772,9 @@ async function allAction(cspellSkip, alexSkip, depsVersionSkip, circularDepsSkip
324304
324772
  promises.push(manypkgAction(manypkgType, manypkgArgs, manypkgFix));
324305
324773
  }
324306
324774
  await Promise.all(promises);
324307
- console.log("\u2705 Successfully linted the workspace");
324775
+ writeSuccess(_STORM_CONFIG, "Successfully linted the workspace \u2705");
324308
324776
  } catch (e) {
324309
- console.error(e);
324777
+ writeFatal(_STORM_CONFIG, `A fatal error occurred while linting the workspace: ${e.message}`);
324310
324778
  process.exit(1);
324311
324779
  }
324312
324780
  }
@@ -324327,10 +324795,10 @@ async function cspellAction(cspellConfig) {
324327
324795
  config: cspellConfig
324328
324796
  });
324329
324797
  if (result.errors) {
324330
- console.log("\u274C Spelling linting has failed");
324798
+ writeError(_STORM_CONFIG, "Spelling linting has failed \u274C");
324331
324799
  process.exit(1);
324332
324800
  }
324333
- console.log("\u2705 Spelling linting is complete");
324801
+ writeSuccess(_STORM_CONFIG, "Spelling linting is complete \u2705");
324334
324802
  } catch (e) {
324335
324803
  console.error(e);
324336
324804
  process.exit(1);
@@ -324338,59 +324806,71 @@ async function cspellAction(cspellConfig) {
324338
324806
  }
324339
324807
  async function alexAction(alexConfig, alexIgnore) {
324340
324808
  try {
324341
- console.log("\u26A1 Linting the workspace language with alexjs.com");
324809
+ writeInfo(_STORM_CONFIG, "\u26A1 Linting the workspace language with alexjs.com");
324342
324810
  if (await runAlex(alexConfig, alexIgnore)) {
324343
- console.error("\u274C Language linting has failed");
324811
+ writeError(_STORM_CONFIG, "Language linting has failed \u274C");
324344
324812
  process.exit(1);
324345
324813
  }
324346
- console.log("\u2705 Language linting is complete");
324814
+ writeSuccess(_STORM_CONFIG, "Language linting is complete \u2705");
324347
324815
  } catch (e) {
324348
- console.error(e);
324816
+ writeFatal(
324817
+ _STORM_CONFIG,
324818
+ `A fatal error occurred while language linting the workspace: ${e.message}`
324819
+ );
324349
324820
  process.exit(1);
324350
324821
  }
324351
324822
  }
324352
324823
  async function depsVersionAction() {
324353
324824
  try {
324354
- console.log("\u26A1 Linting the workspace dependency version consistency");
324825
+ writeInfo(_STORM_CONFIG, "\u26A1 Linting the workspace dependency version consistency");
324355
324826
  const { CDVC: CDVC2 } = await Promise.resolve().then(() => (init_lib2(), lib_exports2));
324356
324827
  const cdvc = new CDVC2(".", { fix: true });
324357
324828
  if (cdvc.hasMismatchingDependenciesFixable) {
324358
- console.log(cdvc.toFixedSummary());
324829
+ writeDebug(_STORM_CONFIG, cdvc.toFixedSummary());
324359
324830
  }
324360
324831
  if (cdvc.hasMismatchingDependenciesNotFixable) {
324361
- console.error("\u274C Dependency version consistency linting has failed");
324362
- console.error(cdvc.toMismatchSummary());
324832
+ writeError(_STORM_CONFIG, "Dependency version consistency linting has failed \u274C");
324833
+ writeError(_STORM_CONFIG, cdvc.toMismatchSummary());
324363
324834
  process.exit(1);
324364
324835
  }
324365
- console.log("\u2705 Dependency Version linting is complete");
324836
+ writeSuccess(_STORM_CONFIG, "Dependency Version linting is complete \u2705");
324366
324837
  } catch (e) {
324367
- console.error(e);
324838
+ writeFatal(
324839
+ _STORM_CONFIG,
324840
+ `A fatal error occurred while dependency Version linting the workspace: ${e.message}`
324841
+ );
324368
324842
  process.exit(1);
324369
324843
  }
324370
324844
  }
324371
324845
  async function circularDepsAction() {
324372
324846
  try {
324373
- console.log("\u26A1 Linting the workspace circular dependency");
324847
+ writeInfo(_STORM_CONFIG, "\u26A1 Linting the workspace circular dependency");
324374
324848
  const tree = await (0, import_dpdm.parseDependencyTree)("**/*.*", {
324375
324849
  tsconfig: "./tsconfig.base.json",
324376
324850
  transform: true,
324377
324851
  skipDynamicImports: false
324378
324852
  });
324379
324853
  const circulars = (0, import_dpdm.parseCircular)(tree);
324380
- console.log((0, import_dpdm.prettyCircular)(circulars));
324381
- console.log("\u2705 Circular dependency linting is complete");
324854
+ writeTrace(_STORM_CONFIG, (0, import_dpdm.prettyCircular)(circulars));
324855
+ writeSuccess(_STORM_CONFIG, "Circular dependency linting is complete \u2705");
324382
324856
  } catch (e) {
324383
- console.error(e);
324857
+ writeFatal(
324858
+ _STORM_CONFIG,
324859
+ `A fatal error occurred while circular dependency linting the workspace: ${e.message}`
324860
+ );
324384
324861
  process.exit(1);
324385
324862
  }
324386
324863
  }
324387
324864
  async function manypkgAction(manypkgType = "check", manypkgArgs, manypkgFix) {
324388
324865
  try {
324389
- console.log("\u26A1 Linting the workspace's packages with Manypkg");
324866
+ writeInfo(_STORM_CONFIG, "\u26A1 Linting the workspace's packages with Manypkg");
324390
324867
  await runManypkg(manypkgType, manypkgArgs, manypkgFix);
324391
- console.log("\u2705 Manypkg linting is complete");
324868
+ writeSuccess(_STORM_CONFIG, "Manypkg linting is complete \u2705");
324392
324869
  } catch (e) {
324393
- console.error(e);
324870
+ writeFatal(
324871
+ _STORM_CONFIG,
324872
+ `A fatal error occurred while manypkg linting the workspace: ${e.message}`
324873
+ );
324394
324874
  process.exit(1);
324395
324875
  }
324396
324876
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/linting-tools",
3
- "version": "1.26.0",
3
+ "version": "1.26.2",
4
4
  "private": false,
5
5
  "description": "⚡ A package containing various linting tools used to validate syntax, enforce design standards, and format code in a Storm workspace.",
6
6
  "keywords": [