@storm-software/linting-tools 1.103.5 → 1.104.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-1.103.5-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.103.6-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
package/bin/lint.cjs CHANGED
@@ -44,6 +44,7 @@ var LogLevelLabel = {
44
44
  FATAL: "fatal",
45
45
  ERROR: "error",
46
46
  WARN: "warn",
47
+ SUCCESS: "success",
47
48
  INFO: "info",
48
49
  DEBUG: "debug",
49
50
  TRACE: "trace",
@@ -188,6 +189,7 @@ var StormConfigSchema = import_zod.default.object({
188
189
  "fatal",
189
190
  "error",
190
191
  "warn",
192
+ "success",
191
193
  "info",
192
194
  "debug",
193
195
  "trace",
@@ -391,12 +393,17 @@ var chalkDefault = {
391
393
  whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
392
394
  }), "bgHex"),
393
395
  whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright"),
396
+ gray: /* @__PURE__ */ __name((message) => message, "gray"),
394
397
  bold: {
395
398
  hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
396
399
  bgHex: /* @__PURE__ */ __name((_) => ({
397
400
  whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
398
401
  }), "bgHex"),
399
402
  whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
403
+ },
404
+ dim: {
405
+ hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
406
+ gray: /* @__PURE__ */ __name((message) => message, "gray")
400
407
  }
401
408
  };
402
409
  var getChalk = /* @__PURE__ */ __name(() => {
@@ -407,6 +414,39 @@ var getChalk = /* @__PURE__ */ __name(() => {
407
414
  return _chalk;
408
415
  }, "getChalk");
409
416
 
417
+ // ../config-tools/src/logger/is-unicode-supported.ts
418
+ var import_node_process = __toESM(require("process"));
419
+ function isUnicodeSupported() {
420
+ const { env } = import_node_process.default;
421
+ const { TERM, TERM_PROGRAM } = env;
422
+ if (import_node_process.default.platform !== "win32") {
423
+ return TERM !== "linux";
424
+ }
425
+ return Boolean(env.WT_SESSION) || // Windows Terminal
426
+ Boolean(env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
427
+ env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
428
+ TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
429
+ }
430
+ __name(isUnicodeSupported, "isUnicodeSupported");
431
+
432
+ // ../config-tools/src/logger/console-icons.ts
433
+ var useIcon = /* @__PURE__ */ __name((c, fallback) => isUnicodeSupported() ? c : fallback, "useIcon");
434
+ var CONSOLE_ICONS = {
435
+ [LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
436
+ [LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
437
+ [LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
438
+ [LogLevelLabel.INFO]: useIcon("\u2139", "i"),
439
+ [LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
440
+ [LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
441
+ [LogLevelLabel.TRACE]: useIcon("\u{1F6E0}", "T"),
442
+ [LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
443
+ };
444
+
445
+ // ../config-tools/src/logger/format-timestamp.ts
446
+ var formatTimestamp = /* @__PURE__ */ __name((date = /* @__PURE__ */ new Date()) => {
447
+ return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
448
+ }, "formatTimestamp");
449
+
410
450
  // ../config-tools/src/logger/get-log-level.ts
411
451
  var getLogLevel = /* @__PURE__ */ __name((label) => {
412
452
  switch (label) {
@@ -469,42 +509,49 @@ var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}) =>
469
509
  }
470
510
  if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
471
511
  return (message) => {
472
- console.error(`${_chalk.bold.hex(colors.fatal ?? "#7d1a1a")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#7d1a1a").whiteBright(" \u{1F480} Fatal ")} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(formatLogMessage(message))}
512
+ console.error(`
513
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
473
514
  `);
474
515
  };
475
516
  }
476
517
  if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
477
518
  return (message) => {
478
- console.error(`${_chalk.bold.hex(colors.danger ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.danger ?? "#f85149").whiteBright(" \u2718 Error ")} ${_chalk.hex(colors.danger ?? "#f85149")(formatLogMessage(message))}
519
+ console.error(`
520
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
479
521
  `);
480
522
  };
481
523
  }
482
524
  if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
483
525
  return (message) => {
484
- console.warn(`${_chalk.bold.hex(colors.warning ?? "#e3b341")(">")} ${_chalk.bold.bgHex(colors.warning ?? "#e3b341").whiteBright(" \u26A0 Warn ")} ${_chalk.hex(colors.warning ?? "#e3b341")(formatLogMessage(message))}
526
+ console.warn(`
527
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
485
528
  `);
486
529
  };
487
530
  }
488
531
  if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel || typeof logLevel === "string" && LogLevel.SUCCESS >= getLogLevel(logLevel)) {
489
532
  return (message) => {
490
- console.info(`${_chalk.bold.hex(colors.success ?? "#56d364")(">")} ${_chalk.bold.bgHex(colors.success ?? "#56d364").whiteBright(" \u2713 Success ")} ${_chalk.hex(colors.success ?? "#56d364")(formatLogMessage(message))}
533
+ console.info(`
534
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
491
535
  `);
492
536
  };
493
537
  }
494
538
  if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
495
539
  return (message) => {
496
- console.info(`${_chalk.bold.hex(colors.info ?? "#58a6ff")(">")} ${_chalk.bold.bgHex(colors.info ?? "#58a6ff").whiteBright(" \u2139 Info ")} ${_chalk.hex(colors.info ?? "#58a6ff")(formatLogMessage(message))}
540
+ console.info(`
541
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
497
542
  `);
498
543
  };
499
544
  }
500
545
  if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel || typeof logLevel === "string" && LogLevel.TRACE >= getLogLevel(logLevel)) {
501
546
  return (message) => {
502
- console.debug(`${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(" \u{1F6E0} Debug ")} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
547
+ console.debug(`
548
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
503
549
  `);
504
550
  };
505
551
  }
506
552
  return (message) => {
507
- console.log(`${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(" \u2709 System ")} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
553
+ console.log(`
554
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
508
555
  `);
509
556
  };
510
557
  }, "getLogFn");
@@ -578,26 +625,26 @@ Stacktrace: ${error.stack}`, config);
578
625
  // ../config-tools/src/config-file/get-config-file.ts
579
626
  var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, options = {}) => {
580
627
  const workspacePath = filePath || findWorkspaceRoot(filePath);
581
- let config = (0, import_c12.loadConfig)({
628
+ let config = await (0, import_c12.loadConfig)({
582
629
  cwd: workspacePath,
583
630
  packageJson: true,
584
631
  name: fileName,
585
632
  envName: fileName?.toUpperCase(),
586
633
  jitiOptions: {
587
634
  debug: false,
588
- cache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache", "storm")
635
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
589
636
  },
590
637
  ...options
591
638
  });
592
639
  if (!config || Object.keys(config).length === 0) {
593
- config = (0, import_c12.loadConfig)({
640
+ config = await (0, import_c12.loadConfig)({
594
641
  cwd: workspacePath,
595
642
  packageJson: true,
596
643
  name: fileName,
597
644
  envName: fileName?.toUpperCase(),
598
645
  jitiOptions: {
599
646
  debug: false,
600
- cache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache", "storm")
647
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
601
648
  },
602
649
  configFile: fileName,
603
650
  ...options
@@ -1609,7 +1656,9 @@ void (async () => {
1609
1656
  writeSuccess("\u{1F389} Code linting and fixing completed successfully!", config);
1610
1657
  exitWithSuccess(config);
1611
1658
  } catch (error) {
1612
- writeFatal(`A fatal error occurred while linting the workspace: ${error.message}`, config);
1659
+ writeFatal(`A fatal error occurred while running the Storm Lint tool:
1660
+ ${error?.message ? error.message : JSON.stringify(error)}${error?.stack ? `
1661
+ Stack Trace: ${error.stack}` : ""}`, config);
1613
1662
  exitWithError(config);
1614
1663
  process.exit(1);
1615
1664
  }
package/bin/lint.js CHANGED
@@ -23,6 +23,7 @@ var LogLevelLabel = {
23
23
  FATAL: "fatal",
24
24
  ERROR: "error",
25
25
  WARN: "warn",
26
+ SUCCESS: "success",
26
27
  INFO: "info",
27
28
  DEBUG: "debug",
28
29
  TRACE: "trace",
@@ -167,6 +168,7 @@ var StormConfigSchema = z.object({
167
168
  "fatal",
168
169
  "error",
169
170
  "warn",
171
+ "success",
170
172
  "info",
171
173
  "debug",
172
174
  "trace",
@@ -370,12 +372,17 @@ var chalkDefault = {
370
372
  whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
371
373
  }), "bgHex"),
372
374
  whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright"),
375
+ gray: /* @__PURE__ */ __name((message) => message, "gray"),
373
376
  bold: {
374
377
  hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
375
378
  bgHex: /* @__PURE__ */ __name((_) => ({
376
379
  whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
377
380
  }), "bgHex"),
378
381
  whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
382
+ },
383
+ dim: {
384
+ hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
385
+ gray: /* @__PURE__ */ __name((message) => message, "gray")
379
386
  }
380
387
  };
381
388
  var getChalk = /* @__PURE__ */ __name(() => {
@@ -386,6 +393,39 @@ var getChalk = /* @__PURE__ */ __name(() => {
386
393
  return _chalk;
387
394
  }, "getChalk");
388
395
 
396
+ // ../config-tools/src/logger/is-unicode-supported.ts
397
+ import process2 from "node:process";
398
+ function isUnicodeSupported() {
399
+ const { env } = process2;
400
+ const { TERM, TERM_PROGRAM } = env;
401
+ if (process2.platform !== "win32") {
402
+ return TERM !== "linux";
403
+ }
404
+ return Boolean(env.WT_SESSION) || // Windows Terminal
405
+ Boolean(env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
406
+ env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
407
+ TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
408
+ }
409
+ __name(isUnicodeSupported, "isUnicodeSupported");
410
+
411
+ // ../config-tools/src/logger/console-icons.ts
412
+ var useIcon = /* @__PURE__ */ __name((c, fallback) => isUnicodeSupported() ? c : fallback, "useIcon");
413
+ var CONSOLE_ICONS = {
414
+ [LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
415
+ [LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
416
+ [LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
417
+ [LogLevelLabel.INFO]: useIcon("\u2139", "i"),
418
+ [LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
419
+ [LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
420
+ [LogLevelLabel.TRACE]: useIcon("\u{1F6E0}", "T"),
421
+ [LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
422
+ };
423
+
424
+ // ../config-tools/src/logger/format-timestamp.ts
425
+ var formatTimestamp = /* @__PURE__ */ __name((date = /* @__PURE__ */ new Date()) => {
426
+ return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
427
+ }, "formatTimestamp");
428
+
389
429
  // ../config-tools/src/logger/get-log-level.ts
390
430
  var getLogLevel = /* @__PURE__ */ __name((label) => {
391
431
  switch (label) {
@@ -448,42 +488,49 @@ var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}) =>
448
488
  }
449
489
  if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
450
490
  return (message) => {
451
- console.error(`${_chalk.bold.hex(colors.fatal ?? "#7d1a1a")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#7d1a1a").whiteBright(" \u{1F480} Fatal ")} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(formatLogMessage(message))}
491
+ console.error(`
492
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
452
493
  `);
453
494
  };
454
495
  }
455
496
  if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
456
497
  return (message) => {
457
- console.error(`${_chalk.bold.hex(colors.danger ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.danger ?? "#f85149").whiteBright(" \u2718 Error ")} ${_chalk.hex(colors.danger ?? "#f85149")(formatLogMessage(message))}
498
+ console.error(`
499
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
458
500
  `);
459
501
  };
460
502
  }
461
503
  if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
462
504
  return (message) => {
463
- console.warn(`${_chalk.bold.hex(colors.warning ?? "#e3b341")(">")} ${_chalk.bold.bgHex(colors.warning ?? "#e3b341").whiteBright(" \u26A0 Warn ")} ${_chalk.hex(colors.warning ?? "#e3b341")(formatLogMessage(message))}
505
+ console.warn(`
506
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
464
507
  `);
465
508
  };
466
509
  }
467
510
  if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel || typeof logLevel === "string" && LogLevel.SUCCESS >= getLogLevel(logLevel)) {
468
511
  return (message) => {
469
- console.info(`${_chalk.bold.hex(colors.success ?? "#56d364")(">")} ${_chalk.bold.bgHex(colors.success ?? "#56d364").whiteBright(" \u2713 Success ")} ${_chalk.hex(colors.success ?? "#56d364")(formatLogMessage(message))}
512
+ console.info(`
513
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
470
514
  `);
471
515
  };
472
516
  }
473
517
  if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
474
518
  return (message) => {
475
- console.info(`${_chalk.bold.hex(colors.info ?? "#58a6ff")(">")} ${_chalk.bold.bgHex(colors.info ?? "#58a6ff").whiteBright(" \u2139 Info ")} ${_chalk.hex(colors.info ?? "#58a6ff")(formatLogMessage(message))}
519
+ console.info(`
520
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
476
521
  `);
477
522
  };
478
523
  }
479
524
  if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel || typeof logLevel === "string" && LogLevel.TRACE >= getLogLevel(logLevel)) {
480
525
  return (message) => {
481
- console.debug(`${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(" \u{1F6E0} Debug ")} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
526
+ console.debug(`
527
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
482
528
  `);
483
529
  };
484
530
  }
485
531
  return (message) => {
486
- console.log(`${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(" \u2709 System ")} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
532
+ console.log(`
533
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
487
534
  `);
488
535
  };
489
536
  }, "getLogFn");
@@ -557,26 +604,26 @@ Stacktrace: ${error.stack}`, config);
557
604
  // ../config-tools/src/config-file/get-config-file.ts
558
605
  var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, options = {}) => {
559
606
  const workspacePath = filePath || findWorkspaceRoot(filePath);
560
- let config = loadConfig({
607
+ let config = await loadConfig({
561
608
  cwd: workspacePath,
562
609
  packageJson: true,
563
610
  name: fileName,
564
611
  envName: fileName?.toUpperCase(),
565
612
  jitiOptions: {
566
613
  debug: false,
567
- cache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache", "storm")
614
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
568
615
  },
569
616
  ...options
570
617
  });
571
618
  if (!config || Object.keys(config).length === 0) {
572
- config = loadConfig({
619
+ config = await loadConfig({
573
620
  cwd: workspacePath,
574
621
  packageJson: true,
575
622
  name: fileName,
576
623
  envName: fileName?.toUpperCase(),
577
624
  jitiOptions: {
578
625
  debug: false,
579
- cache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache", "storm")
626
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
580
627
  },
581
628
  configFile: fileName,
582
629
  ...options
@@ -1588,7 +1635,9 @@ void (async () => {
1588
1635
  writeSuccess("\u{1F389} Code linting and fixing completed successfully!", config);
1589
1636
  exitWithSuccess(config);
1590
1637
  } catch (error) {
1591
- writeFatal(`A fatal error occurred while linting the workspace: ${error.message}`, config);
1638
+ writeFatal(`A fatal error occurred while running the Storm Lint tool:
1639
+ ${error?.message ? error.message : JSON.stringify(error)}${error?.stack ? `
1640
+ Stack Trace: ${error.stack}` : ""}`, config);
1592
1641
  exitWithError(config);
1593
1642
  process.exit(1);
1594
1643
  }
package/dist/index.cjs CHANGED
@@ -22,6 +22,7 @@ var LogLevelLabel = {
22
22
  FATAL: "fatal",
23
23
  ERROR: "error",
24
24
  WARN: "warn",
25
+ SUCCESS: "success",
25
26
  INFO: "info",
26
27
  DEBUG: "debug",
27
28
  TRACE: "trace",
@@ -166,6 +167,7 @@ var StormConfigSchema = _zod2.default.object({
166
167
  "fatal",
167
168
  "error",
168
169
  "warn",
170
+ "success",
169
171
  "info",
170
172
  "debug",
171
173
  "trace",
@@ -369,12 +371,17 @@ var chalkDefault = {
369
371
  whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
370
372
  }), "bgHex"),
371
373
  whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright"),
374
+ gray: /* @__PURE__ */ __name((message) => message, "gray"),
372
375
  bold: {
373
376
  hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
374
377
  bgHex: /* @__PURE__ */ __name((_) => ({
375
378
  whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
376
379
  }), "bgHex"),
377
380
  whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
381
+ },
382
+ dim: {
383
+ hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
384
+ gray: /* @__PURE__ */ __name((message) => message, "gray")
378
385
  }
379
386
  };
380
387
  var getChalk = /* @__PURE__ */ __name(() => {
@@ -385,6 +392,39 @@ var getChalk = /* @__PURE__ */ __name(() => {
385
392
  return _chalk;
386
393
  }, "getChalk");
387
394
 
395
+ // ../config-tools/src/logger/is-unicode-supported.ts
396
+ var _process = require('process'); var _process2 = _interopRequireDefault(_process);
397
+ function isUnicodeSupported() {
398
+ const { env } = _process2.default;
399
+ const { TERM, TERM_PROGRAM } = env;
400
+ if (_process2.default.platform !== "win32") {
401
+ return TERM !== "linux";
402
+ }
403
+ return Boolean(env.WT_SESSION) || // Windows Terminal
404
+ Boolean(env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
405
+ env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
406
+ TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
407
+ }
408
+ __name(isUnicodeSupported, "isUnicodeSupported");
409
+
410
+ // ../config-tools/src/logger/console-icons.ts
411
+ var useIcon = /* @__PURE__ */ __name((c, fallback) => isUnicodeSupported() ? c : fallback, "useIcon");
412
+ var CONSOLE_ICONS = {
413
+ [LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
414
+ [LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
415
+ [LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
416
+ [LogLevelLabel.INFO]: useIcon("\u2139", "i"),
417
+ [LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
418
+ [LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
419
+ [LogLevelLabel.TRACE]: useIcon("\u{1F6E0}", "T"),
420
+ [LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
421
+ };
422
+
423
+ // ../config-tools/src/logger/format-timestamp.ts
424
+ var formatTimestamp = /* @__PURE__ */ __name((date = /* @__PURE__ */ new Date()) => {
425
+ return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
426
+ }, "formatTimestamp");
427
+
388
428
  // ../config-tools/src/logger/get-log-level.ts
389
429
  var getLogLevel = /* @__PURE__ */ __name((label) => {
390
430
  switch (label) {
@@ -447,42 +487,49 @@ var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}) =>
447
487
  }
448
488
  if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
449
489
  return (message) => {
450
- console.error(`${_chalk.bold.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(">")} ${_chalk.bold.bgHex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a"))).whiteBright(" \u{1F480} Fatal ")} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(formatLogMessage(message))}
490
+ console.error(`
491
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.fatal, () => ( "#7d1a1a")))(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
451
492
  `);
452
493
  };
453
494
  }
454
495
  if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
455
496
  return (message) => {
456
- console.error(`${_chalk.bold.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(">")} ${_chalk.bold.bgHex(_nullishCoalesce(colors.danger, () => ( "#f85149"))).whiteBright(" \u2718 Error ")} ${_chalk.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(formatLogMessage(message))}
497
+ console.error(`
498
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.danger, () => ( "#f85149")))(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
457
499
  `);
458
500
  };
459
501
  }
460
502
  if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
461
503
  return (message) => {
462
- console.warn(`${_chalk.bold.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(">")} ${_chalk.bold.bgHex(_nullishCoalesce(colors.warning, () => ( "#e3b341"))).whiteBright(" \u26A0 Warn ")} ${_chalk.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(formatLogMessage(message))}
504
+ console.warn(`
505
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.warning, () => ( "#e3b341")))(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
463
506
  `);
464
507
  };
465
508
  }
466
509
  if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel || typeof logLevel === "string" && LogLevel.SUCCESS >= getLogLevel(logLevel)) {
467
510
  return (message) => {
468
- console.info(`${_chalk.bold.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(">")} ${_chalk.bold.bgHex(_nullishCoalesce(colors.success, () => ( "#56d364"))).whiteBright(" \u2713 Success ")} ${_chalk.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(formatLogMessage(message))}
511
+ console.info(`
512
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.success, () => ( "#56d364")))(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
469
513
  `);
470
514
  };
471
515
  }
472
516
  if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
473
517
  return (message) => {
474
- console.info(`${_chalk.bold.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(">")} ${_chalk.bold.bgHex(_nullishCoalesce(colors.info, () => ( "#58a6ff"))).whiteBright(" \u2139 Info ")} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(formatLogMessage(message))}
518
+ console.info(`
519
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.info, () => ( "#58a6ff")))(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
475
520
  `);
476
521
  };
477
522
  }
478
523
  if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel || typeof logLevel === "string" && LogLevel.TRACE >= getLogLevel(logLevel)) {
479
524
  return (message) => {
480
- console.debug(`${_chalk.bold.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(">")} ${_chalk.bold.bgHex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6"))).whiteBright(" \u{1F6E0} Debug ")} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(formatLogMessage(message))}
525
+ console.debug(`
526
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
481
527
  `);
482
528
  };
483
529
  }
484
530
  return (message) => {
485
- console.log(`${_chalk.bold.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(">")} ${_chalk.bold.bgHex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6"))).whiteBright(" \u2709 System ")} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(formatLogMessage(message))}
531
+ console.log(`
532
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(_nullishCoalesce(colors.brand, () => ( "#1fb2a6")))(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
486
533
  `);
487
534
  };
488
535
  }, "getLogFn");
@@ -522,26 +569,26 @@ var _isFunction = /* @__PURE__ */ __name((value) => {
522
569
  // ../config-tools/src/config-file/get-config-file.ts
523
570
  var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, options = {}) => {
524
571
  const workspacePath = filePath || findWorkspaceRoot(filePath);
525
- let config = _c12.loadConfig.call(void 0, {
572
+ let config = await _c12.loadConfig.call(void 0, {
526
573
  cwd: workspacePath,
527
574
  packageJson: true,
528
575
  name: fileName,
529
576
  envName: _optionalChain([fileName, 'optionalAccess', _30 => _30.toUpperCase, 'call', _31 => _31()]),
530
577
  jitiOptions: {
531
578
  debug: false,
532
- cache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache", "storm")
579
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
533
580
  },
534
581
  ...options
535
582
  });
536
583
  if (!config || Object.keys(config).length === 0) {
537
- config = _c12.loadConfig.call(void 0, {
584
+ config = await _c12.loadConfig.call(void 0, {
538
585
  cwd: workspacePath,
539
586
  packageJson: true,
540
587
  name: fileName,
541
588
  envName: _optionalChain([fileName, 'optionalAccess', _32 => _32.toUpperCase, 'call', _33 => _33()]),
542
589
  jitiOptions: {
543
590
  debug: false,
544
- cache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache", "storm")
591
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
545
592
  },
546
593
  configFile: fileName,
547
594
  ...options
package/dist/index.d.cts CHANGED
@@ -57,7 +57,7 @@ declare const StormConfigSchema: z.ZodObject<{
57
57
  packageManager: z.ZodDefault<z.ZodEnum<["npm", "yarn", "pnpm", "bun"]>>;
58
58
  timezone: z.ZodDefault<z.ZodString>;
59
59
  locale: z.ZodDefault<z.ZodString>;
60
- logLevel: z.ZodDefault<z.ZodEnum<["silent", "fatal", "error", "warn", "info", "debug", "trace", "all"]>>;
60
+ logLevel: z.ZodDefault<z.ZodEnum<["silent", "fatal", "error", "warn", "success", "info", "debug", "trace", "all"]>>;
61
61
  registry: z.ZodDefault<z.ZodObject<{
62
62
  github: z.ZodOptional<z.ZodString>;
63
63
  npm: z.ZodOptional<z.ZodString>;
@@ -821,7 +821,7 @@ declare const StormConfigSchema: z.ZodObject<{
821
821
  packageManager: "npm" | "yarn" | "pnpm" | "bun";
822
822
  timezone: string;
823
823
  locale: string;
824
- logLevel: "info" | "fatal" | "silent" | "error" | "warn" | "debug" | "trace" | "all";
824
+ logLevel: "success" | "info" | "fatal" | "silent" | "error" | "warn" | "debug" | "trace" | "all";
825
825
  registry: {
826
826
  github?: string | undefined;
827
827
  npm?: string | undefined;
@@ -1164,7 +1164,7 @@ declare const StormConfigSchema: z.ZodObject<{
1164
1164
  packageManager?: "npm" | "yarn" | "pnpm" | "bun" | undefined;
1165
1165
  timezone?: string | undefined;
1166
1166
  locale?: string | undefined;
1167
- logLevel?: "info" | "fatal" | "silent" | "error" | "warn" | "debug" | "trace" | "all" | undefined;
1167
+ logLevel?: "success" | "info" | "fatal" | "silent" | "error" | "warn" | "debug" | "trace" | "all" | undefined;
1168
1168
  registry?: {
1169
1169
  github?: string | undefined;
1170
1170
  npm?: string | undefined;
package/dist/index.d.ts CHANGED
@@ -57,7 +57,7 @@ declare const StormConfigSchema: z.ZodObject<{
57
57
  packageManager: z.ZodDefault<z.ZodEnum<["npm", "yarn", "pnpm", "bun"]>>;
58
58
  timezone: z.ZodDefault<z.ZodString>;
59
59
  locale: z.ZodDefault<z.ZodString>;
60
- logLevel: z.ZodDefault<z.ZodEnum<["silent", "fatal", "error", "warn", "info", "debug", "trace", "all"]>>;
60
+ logLevel: z.ZodDefault<z.ZodEnum<["silent", "fatal", "error", "warn", "success", "info", "debug", "trace", "all"]>>;
61
61
  registry: z.ZodDefault<z.ZodObject<{
62
62
  github: z.ZodOptional<z.ZodString>;
63
63
  npm: z.ZodOptional<z.ZodString>;
@@ -821,7 +821,7 @@ declare const StormConfigSchema: z.ZodObject<{
821
821
  packageManager: "npm" | "yarn" | "pnpm" | "bun";
822
822
  timezone: string;
823
823
  locale: string;
824
- logLevel: "info" | "fatal" | "silent" | "error" | "warn" | "debug" | "trace" | "all";
824
+ logLevel: "success" | "info" | "fatal" | "silent" | "error" | "warn" | "debug" | "trace" | "all";
825
825
  registry: {
826
826
  github?: string | undefined;
827
827
  npm?: string | undefined;
@@ -1164,7 +1164,7 @@ declare const StormConfigSchema: z.ZodObject<{
1164
1164
  packageManager?: "npm" | "yarn" | "pnpm" | "bun" | undefined;
1165
1165
  timezone?: string | undefined;
1166
1166
  locale?: string | undefined;
1167
- logLevel?: "info" | "fatal" | "silent" | "error" | "warn" | "debug" | "trace" | "all" | undefined;
1167
+ logLevel?: "success" | "info" | "fatal" | "silent" | "error" | "warn" | "debug" | "trace" | "all" | undefined;
1168
1168
  registry?: {
1169
1169
  github?: string | undefined;
1170
1170
  npm?: string | undefined;
package/dist/index.js CHANGED
@@ -22,6 +22,7 @@ var LogLevelLabel = {
22
22
  FATAL: "fatal",
23
23
  ERROR: "error",
24
24
  WARN: "warn",
25
+ SUCCESS: "success",
25
26
  INFO: "info",
26
27
  DEBUG: "debug",
27
28
  TRACE: "trace",
@@ -166,6 +167,7 @@ var StormConfigSchema = z.object({
166
167
  "fatal",
167
168
  "error",
168
169
  "warn",
170
+ "success",
169
171
  "info",
170
172
  "debug",
171
173
  "trace",
@@ -369,12 +371,17 @@ var chalkDefault = {
369
371
  whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
370
372
  }), "bgHex"),
371
373
  whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright"),
374
+ gray: /* @__PURE__ */ __name((message) => message, "gray"),
372
375
  bold: {
373
376
  hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
374
377
  bgHex: /* @__PURE__ */ __name((_) => ({
375
378
  whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
376
379
  }), "bgHex"),
377
380
  whiteBright: /* @__PURE__ */ __name((message) => message, "whiteBright")
381
+ },
382
+ dim: {
383
+ hex: /* @__PURE__ */ __name((_) => (message) => message, "hex"),
384
+ gray: /* @__PURE__ */ __name((message) => message, "gray")
378
385
  }
379
386
  };
380
387
  var getChalk = /* @__PURE__ */ __name(() => {
@@ -385,6 +392,39 @@ var getChalk = /* @__PURE__ */ __name(() => {
385
392
  return _chalk;
386
393
  }, "getChalk");
387
394
 
395
+ // ../config-tools/src/logger/is-unicode-supported.ts
396
+ import process2 from "node:process";
397
+ function isUnicodeSupported() {
398
+ const { env } = process2;
399
+ const { TERM, TERM_PROGRAM } = env;
400
+ if (process2.platform !== "win32") {
401
+ return TERM !== "linux";
402
+ }
403
+ return Boolean(env.WT_SESSION) || // Windows Terminal
404
+ Boolean(env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
405
+ env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
406
+ TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
407
+ }
408
+ __name(isUnicodeSupported, "isUnicodeSupported");
409
+
410
+ // ../config-tools/src/logger/console-icons.ts
411
+ var useIcon = /* @__PURE__ */ __name((c, fallback) => isUnicodeSupported() ? c : fallback, "useIcon");
412
+ var CONSOLE_ICONS = {
413
+ [LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
414
+ [LogLevelLabel.FATAL]: useIcon("\u{1F480}", "\xD7"),
415
+ [LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
416
+ [LogLevelLabel.INFO]: useIcon("\u2139", "i"),
417
+ [LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
418
+ [LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
419
+ [LogLevelLabel.TRACE]: useIcon("\u{1F6E0}", "T"),
420
+ [LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
421
+ };
422
+
423
+ // ../config-tools/src/logger/format-timestamp.ts
424
+ var formatTimestamp = /* @__PURE__ */ __name((date = /* @__PURE__ */ new Date()) => {
425
+ return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
426
+ }, "formatTimestamp");
427
+
388
428
  // ../config-tools/src/logger/get-log-level.ts
389
429
  var getLogLevel = /* @__PURE__ */ __name((label) => {
390
430
  switch (label) {
@@ -447,42 +487,49 @@ var getLogFn = /* @__PURE__ */ __name((logLevel = LogLevel.INFO, config = {}) =>
447
487
  }
448
488
  if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
449
489
  return (message) => {
450
- console.error(`${_chalk.bold.hex(colors.fatal ?? "#7d1a1a")(">")} ${_chalk.bold.bgHex(colors.fatal ?? "#7d1a1a").whiteBright(" \u{1F480} Fatal ")} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(formatLogMessage(message))}
490
+ console.error(`
491
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? "#7d1a1a")(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
451
492
  `);
452
493
  };
453
494
  }
454
495
  if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
455
496
  return (message) => {
456
- console.error(`${_chalk.bold.hex(colors.danger ?? "#f85149")(">")} ${_chalk.bold.bgHex(colors.danger ?? "#f85149").whiteBright(" \u2718 Error ")} ${_chalk.hex(colors.danger ?? "#f85149")(formatLogMessage(message))}
497
+ console.error(`
498
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? "#f85149")(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
457
499
  `);
458
500
  };
459
501
  }
460
502
  if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
461
503
  return (message) => {
462
- console.warn(`${_chalk.bold.hex(colors.warning ?? "#e3b341")(">")} ${_chalk.bold.bgHex(colors.warning ?? "#e3b341").whiteBright(" \u26A0 Warn ")} ${_chalk.hex(colors.warning ?? "#e3b341")(formatLogMessage(message))}
504
+ console.warn(`
505
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? "#e3b341")(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
463
506
  `);
464
507
  };
465
508
  }
466
509
  if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel || typeof logLevel === "string" && LogLevel.SUCCESS >= getLogLevel(logLevel)) {
467
510
  return (message) => {
468
- console.info(`${_chalk.bold.hex(colors.success ?? "#56d364")(">")} ${_chalk.bold.bgHex(colors.success ?? "#56d364").whiteBright(" \u2713 Success ")} ${_chalk.hex(colors.success ?? "#56d364")(formatLogMessage(message))}
511
+ console.info(`
512
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? "#56d364")(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
469
513
  `);
470
514
  };
471
515
  }
472
516
  if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
473
517
  return (message) => {
474
- console.info(`${_chalk.bold.hex(colors.info ?? "#58a6ff")(">")} ${_chalk.bold.bgHex(colors.info ?? "#58a6ff").whiteBright(" \u2139 Info ")} ${_chalk.hex(colors.info ?? "#58a6ff")(formatLogMessage(message))}
518
+ console.info(`
519
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? "#58a6ff")(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
475
520
  `);
476
521
  };
477
522
  }
478
523
  if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel || typeof logLevel === "string" && LogLevel.TRACE >= getLogLevel(logLevel)) {
479
524
  return (message) => {
480
- console.debug(`${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(" \u{1F6E0} Debug ")} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
525
+ console.debug(`
526
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
481
527
  `);
482
528
  };
483
529
  }
484
530
  return (message) => {
485
- console.log(`${_chalk.bold.hex(colors.brand ?? "#1fb2a6")(">")} ${_chalk.bold.bgHex(colors.brand ?? "#1fb2a6").whiteBright(" \u2709 System ")} ${_chalk.hex(colors.brand ?? "#1fb2a6")(formatLogMessage(message))}
531
+ console.log(`
532
+ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? "#1fb2a6")(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System]`)} ${_chalk.bold.whiteBright(formatLogMessage(message))}
486
533
  `);
487
534
  };
488
535
  }, "getLogFn");
@@ -522,26 +569,26 @@ var _isFunction = /* @__PURE__ */ __name((value) => {
522
569
  // ../config-tools/src/config-file/get-config-file.ts
523
570
  var getConfigFileByName = /* @__PURE__ */ __name(async (fileName, filePath, options = {}) => {
524
571
  const workspacePath = filePath || findWorkspaceRoot(filePath);
525
- let config = loadConfig({
572
+ let config = await loadConfig({
526
573
  cwd: workspacePath,
527
574
  packageJson: true,
528
575
  name: fileName,
529
576
  envName: fileName?.toUpperCase(),
530
577
  jitiOptions: {
531
578
  debug: false,
532
- cache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache", "storm")
579
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
533
580
  },
534
581
  ...options
535
582
  });
536
583
  if (!config || Object.keys(config).length === 0) {
537
- config = loadConfig({
584
+ config = await loadConfig({
538
585
  cwd: workspacePath,
539
586
  packageJson: true,
540
587
  name: fileName,
541
588
  envName: fileName?.toUpperCase(),
542
589
  jitiOptions: {
543
590
  debug: false,
544
- cache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache", "storm")
591
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "config")
545
592
  },
546
593
  configFile: fileName,
547
594
  ...options
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@storm-software/linting-tools","version":"1.103.5","type":"module","description":"⚡ A package containing various linting tools used to validate syntax, enforce design standards, and format code in a Storm workspace.","repository":{"type":"github","url":"https://github.com/storm-software/storm-ops","directory":"packages/linting-tools"},"homepage":"https://stormsoftware.com","bugs":"https://github.com/storm-software/storm-ops/issues","author":{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"},"maintainers":[{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"},{"name":"Pat Sullivan","email":"admin@stormsoftware.com","url":"https://patsullivan.org"}],"contributors":[{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"}],"funding":{"type":"github","url":"https://github.com/sponsors/storm-software"},"license":"Apache-2.0","private":false,"packageManager":"pnpm@9.15.2","engines":{"node":">=22.4.0","pnpm":">=9.15.2"},"bin":{"storm-lint":"./bin/lint.cjs","storm-lint-esm":"./bin/lint.js","storm-lint-cjs":"./bin/lint.cjs"},"main":"./dist/index.cjs","module":"./dist/index.js","exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"default":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./index":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"default":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./biome/*":"./biome/*","./ls-lint/*":"./ls-lint/*","./syncpack/*":"./syncpack/*","./cspell/*":"./cspell/*","./alex/*":"./alex/*","./taplo/*":"./taplo/*","./zizmor/*":"./zizmor/*","./dependency-cruiser/*":"./dependency-cruiser/*"},"types":"./dist/index.d.ts","files":["alex/**/*","bin/**/*","biome/**/*","cspell/**/*","dist/**/*","ls-lint/**/*","syncpack/**/*","taplo/**/*","zizmor/**/*"],"keywords":["storm-software","monorepo","storm-ops","sullivanpj","manypkg","ls-lint","cspell","biome","alex","taplo","syncpack","zizmor"],"peerDependencies":{"@storm-software/cspell":"workspace:*"},"peerDependenciesMeta":{"@storm-software/cspell":{"optional":false}},"dependencies":{"@angular-devkit/architect":"0.1900.6","@manypkg/cli":"0.21.4","@manypkg/get-packages":"2.2.1","alex":"11.0.1","check-dependency-version-consistency":"4.1.0","commander":"^12.1.0","dpdm":"3.14.0","fast-glob":"3.3.2","fs-extra":"11.2.0","octokit":"4.0.2","p-limit":"5.0.0","rehype-parse":"9.0.0","rehype-retext":"4.0.0","remark-frontmatter":"5.0.0","remark-gfm":"4.0.0","remark-mdx":"3.0.1","remark-parse":"11.0.0","remark-retext":"6.0.0","retext-english":"5.0.0","retext-equality":"7.1.0","retext-profanities":"8.0.0","spawndamnit":"2.0.0","tsconfig-paths":"4.2.0","unified":"11.0.5","unified-engine":"11.2.1","vfile-reporter":"8.1.1"},"devDependencies":{"@storm-software/cspell":"0.4.3","@types/node":"^22.10.2","cspell":"8.8.4","tsup":"8.3.5"},"publishConfig":{"access":"public"}}
1
+ {"name":"@storm-software/linting-tools","version":"1.104.0","type":"module","description":"⚡ A package containing various linting tools used to validate syntax, enforce design standards, and format code in a Storm workspace.","repository":{"type":"github","url":"https://github.com/storm-software/storm-ops","directory":"packages/linting-tools"},"homepage":"https://stormsoftware.com","bugs":"https://github.com/storm-software/storm-ops/issues","author":{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"},"maintainers":[{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"},{"name":"Pat Sullivan","email":"admin@stormsoftware.com","url":"https://patsullivan.org"}],"contributors":[{"name":"Storm Software","email":"contact@stormsoftware.com","url":"https://stormsoftware.com"}],"funding":{"type":"github","url":"https://github.com/sponsors/storm-software"},"license":"Apache-2.0","private":false,"packageManager":"pnpm@9.15.2","engines":{"node":">=22.4.0","pnpm":">=9.15.2"},"bin":{"storm-lint":"./bin/lint.cjs","storm-lint-esm":"./bin/lint.js","storm-lint-cjs":"./bin/lint.cjs"},"main":"./dist/index.cjs","module":"./dist/index.js","exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"default":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./index":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"default":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./biome/*":"./biome/*","./ls-lint/*":"./ls-lint/*","./syncpack/*":"./syncpack/*","./cspell/*":"./cspell/*","./alex/*":"./alex/*","./taplo/*":"./taplo/*","./zizmor/*":"./zizmor/*","./dependency-cruiser/*":"./dependency-cruiser/*"},"types":"./dist/index.d.ts","files":["alex/**/*","bin/**/*","biome/**/*","cspell/**/*","dist/**/*","ls-lint/**/*","syncpack/**/*","taplo/**/*","zizmor/**/*"],"keywords":["storm-software","monorepo","storm-ops","sullivanpj","manypkg","ls-lint","cspell","biome","alex","taplo","syncpack","zizmor"],"peerDependencies":{"@storm-software/cspell":"workspace:*"},"peerDependenciesMeta":{"@storm-software/cspell":{"optional":false}},"dependencies":{"@angular-devkit/architect":"0.1900.6","@manypkg/cli":"0.21.4","@manypkg/get-packages":"2.2.1","alex":"11.0.1","check-dependency-version-consistency":"4.1.0","commander":"^12.1.0","dpdm":"3.14.0","fast-glob":"3.3.2","fs-extra":"11.2.0","octokit":"4.0.2","p-limit":"5.0.0","rehype-parse":"9.0.0","rehype-retext":"4.0.0","remark-frontmatter":"5.0.0","remark-gfm":"4.0.0","remark-mdx":"3.0.1","remark-parse":"11.0.0","remark-retext":"6.0.0","retext-english":"5.0.0","retext-equality":"7.1.0","retext-profanities":"8.0.0","spawndamnit":"2.0.0","tsconfig-paths":"4.2.0","unified":"11.0.5","unified-engine":"11.2.1","vfile-reporter":"8.1.1"},"devDependencies":{"@storm-software/cspell":"0.6.0","@types/node":"^22.10.2","cspell":"8.8.4","tsup":"8.3.5"},"publishConfig":{"access":"public"}}