@storm-software/workspace-tools 1.42.4 → 1.43.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.
@@ -1974,14 +1974,14 @@ var require_templates = __commonJS({
1974
1974
  }
1975
1975
  return results;
1976
1976
  }
1977
- function buildStyle(chalk2, styles) {
1977
+ function buildStyle(chalk3, styles) {
1978
1978
  const enabled = {};
1979
1979
  for (const layer of styles) {
1980
1980
  for (const style of layer.styles) {
1981
1981
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
1982
1982
  }
1983
1983
  }
1984
- let current = chalk2;
1984
+ let current = chalk3;
1985
1985
  for (const styleName of Object.keys(enabled)) {
1986
1986
  if (Array.isArray(enabled[styleName])) {
1987
1987
  if (!(styleName in current)) {
@@ -1996,7 +1996,7 @@ var require_templates = __commonJS({
1996
1996
  }
1997
1997
  return current;
1998
1998
  }
1999
- module2.exports = (chalk2, tmp) => {
1999
+ module2.exports = (chalk3, tmp) => {
2000
2000
  const styles = [];
2001
2001
  const chunks = [];
2002
2002
  let chunk = [];
@@ -2006,13 +2006,13 @@ var require_templates = __commonJS({
2006
2006
  } else if (style) {
2007
2007
  const str = chunk.join("");
2008
2008
  chunk = [];
2009
- chunks.push(styles.length === 0 ? str : buildStyle(chalk2, styles)(str));
2009
+ chunks.push(styles.length === 0 ? str : buildStyle(chalk3, styles)(str));
2010
2010
  styles.push({ inverse, styles: parseStyle(style) });
2011
2011
  } else if (close) {
2012
2012
  if (styles.length === 0) {
2013
2013
  throw new Error("Found extraneous } in Chalk template literal");
2014
2014
  }
2015
- chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
2015
+ chunks.push(buildStyle(chalk3, styles)(chunk.join("")));
2016
2016
  chunk = [];
2017
2017
  styles.pop();
2018
2018
  } else {
@@ -2049,16 +2049,16 @@ var require_chalk = __commonJS({
2049
2049
  }
2050
2050
  function Chalk(options) {
2051
2051
  if (!this || !(this instanceof Chalk) || this.template) {
2052
- const chalk2 = {};
2053
- applyOptions(chalk2, options);
2054
- chalk2.template = function() {
2052
+ const chalk3 = {};
2053
+ applyOptions(chalk3, options);
2054
+ chalk3.template = function() {
2055
2055
  const args = [].slice.call(arguments);
2056
- return chalkTag.apply(null, [chalk2.template].concat(args));
2056
+ return chalkTag.apply(null, [chalk3.template].concat(args));
2057
2057
  };
2058
- Object.setPrototypeOf(chalk2, Chalk.prototype);
2059
- Object.setPrototypeOf(chalk2.template, chalk2);
2060
- chalk2.template.constructor = Chalk;
2061
- return chalk2.template;
2058
+ Object.setPrototypeOf(chalk3, Chalk.prototype);
2059
+ Object.setPrototypeOf(chalk3.template, chalk3);
2060
+ chalk3.template.constructor = Chalk;
2061
+ return chalk3.template;
2062
2062
  }
2063
2063
  applyOptions(this, options);
2064
2064
  }
@@ -2177,7 +2177,7 @@ var require_chalk = __commonJS({
2177
2177
  ansiStyles.dim.open = originalDim;
2178
2178
  return str;
2179
2179
  }
2180
- function chalkTag(chalk2, strings) {
2180
+ function chalkTag(chalk3, strings) {
2181
2181
  if (!Array.isArray(strings)) {
2182
2182
  return [].slice.call(arguments, 1).join(" ");
2183
2183
  }
@@ -2187,7 +2187,7 @@ var require_chalk = __commonJS({
2187
2187
  parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
2188
2188
  parts.push(String(strings.raw[i]));
2189
2189
  }
2190
- return template(chalk2, parts.join(""));
2190
+ return template(chalk3, parts.join(""));
2191
2191
  }
2192
2192
  Object.defineProperties(Chalk.prototype, styles);
2193
2193
  module2.exports = Chalk();
@@ -2233,17 +2233,17 @@ var require_lib2 = __commonJS({
2233
2233
  return n.default = e, t && t.set(e, n), n;
2234
2234
  }
2235
2235
  var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
2236
- function getDefs(chalk2) {
2236
+ function getDefs(chalk3) {
2237
2237
  return {
2238
- keyword: chalk2.cyan,
2239
- capitalized: chalk2.yellow,
2240
- jsxIdentifier: chalk2.yellow,
2241
- punctuator: chalk2.yellow,
2242
- number: chalk2.magenta,
2243
- string: chalk2.green,
2244
- regex: chalk2.magenta,
2245
- comment: chalk2.grey,
2246
- invalid: chalk2.white.bgRed.bold
2238
+ keyword: chalk3.cyan,
2239
+ capitalized: chalk3.yellow,
2240
+ jsxIdentifier: chalk3.yellow,
2241
+ punctuator: chalk3.yellow,
2242
+ number: chalk3.magenta,
2243
+ string: chalk3.green,
2244
+ regex: chalk3.magenta,
2245
+ comment: chalk3.grey,
2246
+ invalid: chalk3.white.bgRed.bold
2247
2247
  };
2248
2248
  }
2249
2249
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -2374,11 +2374,11 @@ var require_lib3 = __commonJS({
2374
2374
  return _chalk.default;
2375
2375
  }
2376
2376
  var deprecationWarningShown = false;
2377
- function getDefs(chalk2) {
2377
+ function getDefs(chalk3) {
2378
2378
  return {
2379
- gutter: chalk2.grey,
2380
- marker: chalk2.red.bold,
2381
- message: chalk2.red.bold
2379
+ gutter: chalk3.grey,
2380
+ marker: chalk3.red.bold,
2381
+ message: chalk3.red.bold
2382
2382
  };
2383
2383
  }
2384
2384
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -2440,8 +2440,8 @@ var require_lib3 = __commonJS({
2440
2440
  }
2441
2441
  function codeFrameColumns(rawLines, loc, opts = {}) {
2442
2442
  const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
2443
- const chalk2 = getChalk(opts.forceColor);
2444
- const defs = getDefs(chalk2);
2443
+ const chalk3 = getChalk(opts.forceColor);
2444
+ const defs = getDefs(chalk3);
2445
2445
  const maybeHighlight = (chalkFn, string) => {
2446
2446
  return highlighted ? chalkFn(string) : string;
2447
2447
  };
@@ -2480,7 +2480,7 @@ var require_lib3 = __commonJS({
2480
2480
  ${frame}`;
2481
2481
  }
2482
2482
  if (highlighted) {
2483
- return chalk2.reset(frame);
2483
+ return chalk3.reset(frame);
2484
2484
  } else {
2485
2485
  return frame;
2486
2486
  }
@@ -7794,14 +7794,14 @@ var require_templates2 = __commonJS({
7794
7794
  }
7795
7795
  return results;
7796
7796
  }
7797
- function buildStyle(chalk2, styles) {
7797
+ function buildStyle(chalk3, styles) {
7798
7798
  const enabled = {};
7799
7799
  for (const layer of styles) {
7800
7800
  for (const style of layer.styles) {
7801
7801
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
7802
7802
  }
7803
7803
  }
7804
- let current = chalk2;
7804
+ let current = chalk3;
7805
7805
  for (const [styleName, styles2] of Object.entries(enabled)) {
7806
7806
  if (!Array.isArray(styles2)) {
7807
7807
  continue;
@@ -7813,7 +7813,7 @@ var require_templates2 = __commonJS({
7813
7813
  }
7814
7814
  return current;
7815
7815
  }
7816
- module2.exports = (chalk2, temporary) => {
7816
+ module2.exports = (chalk3, temporary) => {
7817
7817
  const styles = [];
7818
7818
  const chunks = [];
7819
7819
  let chunk = [];
@@ -7823,13 +7823,13 @@ var require_templates2 = __commonJS({
7823
7823
  } else if (style) {
7824
7824
  const string = chunk.join("");
7825
7825
  chunk = [];
7826
- chunks.push(styles.length === 0 ? string : buildStyle(chalk2, styles)(string));
7826
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk3, styles)(string));
7827
7827
  styles.push({ inverse, styles: parseStyle(style) });
7828
7828
  } else if (close) {
7829
7829
  if (styles.length === 0) {
7830
7830
  throw new Error("Found extraneous } in Chalk template literal");
7831
7831
  }
7832
- chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
7832
+ chunks.push(buildStyle(chalk3, styles)(chunk.join("")));
7833
7833
  chunk = [];
7834
7834
  styles.pop();
7835
7835
  } else {
@@ -7877,16 +7877,16 @@ var require_source = __commonJS({
7877
7877
  }
7878
7878
  };
7879
7879
  var chalkFactory = (options) => {
7880
- const chalk3 = {};
7881
- applyOptions(chalk3, options);
7882
- chalk3.template = (...arguments_) => chalkTag(chalk3.template, ...arguments_);
7883
- Object.setPrototypeOf(chalk3, Chalk.prototype);
7884
- Object.setPrototypeOf(chalk3.template, chalk3);
7885
- chalk3.template.constructor = () => {
7880
+ const chalk4 = {};
7881
+ applyOptions(chalk4, options);
7882
+ chalk4.template = (...arguments_) => chalkTag(chalk4.template, ...arguments_);
7883
+ Object.setPrototypeOf(chalk4, Chalk.prototype);
7884
+ Object.setPrototypeOf(chalk4.template, chalk4);
7885
+ chalk4.template.constructor = () => {
7886
7886
  throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
7887
7887
  };
7888
- chalk3.template.Instance = ChalkClass;
7889
- return chalk3.template;
7888
+ chalk4.template.Instance = ChalkClass;
7889
+ return chalk4.template;
7890
7890
  };
7891
7891
  function Chalk(options) {
7892
7892
  return chalkFactory(options);
@@ -7997,7 +7997,7 @@ var require_source = __commonJS({
7997
7997
  return openAll + string + closeAll;
7998
7998
  };
7999
7999
  var template;
8000
- var chalkTag = (chalk3, ...strings) => {
8000
+ var chalkTag = (chalk4, ...strings) => {
8001
8001
  const [firstString] = strings;
8002
8002
  if (!isArray(firstString) || !isArray(firstString.raw)) {
8003
8003
  return strings.join(" ");
@@ -8013,14 +8013,14 @@ var require_source = __commonJS({
8013
8013
  if (template === void 0) {
8014
8014
  template = require_templates2();
8015
8015
  }
8016
- return template(chalk3, parts.join(""));
8016
+ return template(chalk4, parts.join(""));
8017
8017
  };
8018
8018
  Object.defineProperties(Chalk.prototype, styles);
8019
- var chalk2 = Chalk();
8020
- chalk2.supportsColor = stdoutColor;
8021
- chalk2.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
8022
- chalk2.stderr.supportsColor = stderrColor;
8023
- module2.exports = chalk2;
8019
+ var chalk3 = Chalk();
8020
+ chalk3.supportsColor = stdoutColor;
8021
+ chalk3.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
8022
+ chalk3.stderr.supportsColor = stderrColor;
8023
+ module2.exports = chalk3;
8024
8024
  }
8025
8025
  });
8026
8026
 
@@ -24382,14 +24382,14 @@ var require_share = __commonJS({
24382
24382
  resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();
24383
24383
  resetConnection = void 0;
24384
24384
  };
24385
- var reset = function() {
24385
+ var reset2 = function() {
24386
24386
  cancelReset();
24387
24387
  connection = subject = void 0;
24388
24388
  hasCompleted = hasErrored = false;
24389
24389
  };
24390
24390
  var resetAndUnsubscribe = function() {
24391
24391
  var conn = connection;
24392
- reset();
24392
+ reset2();
24393
24393
  conn === null || conn === void 0 ? void 0 : conn.unsubscribe();
24394
24394
  };
24395
24395
  return lift_1.operate(function(source, subscriber) {
@@ -24413,13 +24413,13 @@ var require_share = __commonJS({
24413
24413
  error: function(err) {
24414
24414
  hasErrored = true;
24415
24415
  cancelReset();
24416
- resetConnection = handleReset(reset, resetOnError, err);
24416
+ resetConnection = handleReset(reset2, resetOnError, err);
24417
24417
  dest.error(err);
24418
24418
  },
24419
24419
  complete: function() {
24420
24420
  hasCompleted = true;
24421
24421
  cancelReset();
24422
- resetConnection = handleReset(reset, resetOnComplete);
24422
+ resetConnection = handleReset(reset2, resetOnComplete);
24423
24423
  dest.complete();
24424
24424
  }
24425
24425
  });
@@ -24429,13 +24429,13 @@ var require_share = __commonJS({
24429
24429
  };
24430
24430
  }
24431
24431
  exports.share = share;
24432
- function handleReset(reset, on) {
24432
+ function handleReset(reset2, on) {
24433
24433
  var args = [];
24434
24434
  for (var _i = 2; _i < arguments.length; _i++) {
24435
24435
  args[_i - 2] = arguments[_i];
24436
24436
  }
24437
24437
  if (on === true) {
24438
- reset();
24438
+ reset2();
24439
24439
  return;
24440
24440
  }
24441
24441
  if (on === false) {
@@ -24444,7 +24444,7 @@ var require_share = __commonJS({
24444
24444
  var onSubscriber = new Subscriber_1.SafeSubscriber({
24445
24445
  next: function() {
24446
24446
  onSubscriber.unsubscribe();
24447
- reset();
24447
+ reset2();
24448
24448
  }
24449
24449
  });
24450
24450
  return innerFrom_1.innerFrom(on.apply(void 0, __spreadArray2([], __read2(args)))).subscribe(onSubscriber);
@@ -26729,20 +26729,20 @@ var require_highlight = __commonJS({
26729
26729
  Object.defineProperty(exports, "__esModule", { value: true });
26730
26730
  exports.highlight = void 0;
26731
26731
  var jsTokens = require_js_tokens();
26732
- var chalk2 = require_source();
26732
+ var chalk3 = require_source();
26733
26733
  var identifiers_1 = require_identifiers2();
26734
- function getDefs(chalk3) {
26734
+ function getDefs(chalk4) {
26735
26735
  return {
26736
- keyword: chalk3.cyan,
26737
- capitalized: chalk3.yellow,
26738
- jsx_tag: chalk3.yellow,
26739
- punctuator: chalk3.yellow,
26736
+ keyword: chalk4.cyan,
26737
+ capitalized: chalk4.yellow,
26738
+ jsx_tag: chalk4.yellow,
26739
+ punctuator: chalk4.yellow,
26740
26740
  // bracket: intentionally omitted.
26741
- number: chalk3.magenta,
26742
- string: chalk3.green,
26743
- regex: chalk3.magenta,
26744
- comment: chalk3.grey,
26745
- invalid: chalk3.white.bgRed.bold
26741
+ number: chalk4.magenta,
26742
+ string: chalk4.green,
26743
+ regex: chalk4.magenta,
26744
+ comment: chalk4.grey,
26745
+ invalid: chalk4.white.bgRed.bold
26746
26746
  };
26747
26747
  }
26748
26748
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -26782,7 +26782,7 @@ var require_highlight = __commonJS({
26782
26782
  });
26783
26783
  }
26784
26784
  function highlight(code) {
26785
- const defs = getDefs(chalk2);
26785
+ const defs = getDefs(chalk3);
26786
26786
  return highlightTokens(defs, code);
26787
26787
  }
26788
26788
  exports.highlight = highlight;
@@ -26895,7 +26895,7 @@ var require_run_type_check = __commonJS({
26895
26895
  "use strict";
26896
26896
  Object.defineProperty(exports, "__esModule", { value: true });
26897
26897
  exports.getFormattedDiagnostic = exports.runTypeCheck = exports.runTypeCheckWatch = void 0;
26898
- var chalk2 = require_source();
26898
+ var chalk3 = require_source();
26899
26899
  var path2 = require("path");
26900
26900
  var code_frames_1 = require("nx/src/utils/code-frames");
26901
26901
  var highlight_1 = require_highlight();
@@ -26975,17 +26975,17 @@ var require_run_type_check = __commonJS({
26975
26975
  const category = diagnostic.category;
26976
26976
  switch (category) {
26977
26977
  case ts2.DiagnosticCategory.Warning: {
26978
- message += `${chalk2.yellow.bold("warning")} ${chalk2.gray(`TS${diagnostic.code}`)}: `;
26978
+ message += `${chalk3.yellow.bold("warning")} ${chalk3.gray(`TS${diagnostic.code}`)}: `;
26979
26979
  break;
26980
26980
  }
26981
26981
  case ts2.DiagnosticCategory.Error: {
26982
- message += `${chalk2.red.bold("error")} ${chalk2.gray(`TS${diagnostic.code}`)}: `;
26982
+ message += `${chalk3.red.bold("error")} ${chalk3.gray(`TS${diagnostic.code}`)}: `;
26983
26983
  break;
26984
26984
  }
26985
26985
  case ts2.DiagnosticCategory.Suggestion:
26986
26986
  case ts2.DiagnosticCategory.Message:
26987
26987
  default: {
26988
- message += `${chalk2.cyan.bold(category === 2 ? "suggestion" : "info")}: `;
26988
+ message += `${chalk3.cyan.bold(category === 2 ? "suggestion" : "info")}: `;
26989
26989
  break;
26990
26990
  }
26991
26991
  }
@@ -26995,7 +26995,7 @@ var require_run_type_check = __commonJS({
26995
26995
  const line = pos.line + 1;
26996
26996
  const column = pos.character + 1;
26997
26997
  const fileName = path2.relative(workspaceRoot, diagnostic.file.fileName);
26998
- message = `${chalk2.underline.blue(`${fileName}:${line}:${column}`)} - ` + message;
26998
+ message = `${chalk3.underline.blue(`${fileName}:${line}:${column}`)} - ` + message;
26999
26999
  const code = diagnostic.file.getFullText(diagnostic.file.getSourceFile());
27000
27000
  message += "\n" + (0, code_frames_1.codeFrameColumns)(code, {
27001
27001
  start: { line, column }
@@ -38620,7 +38620,7 @@ var require_array2 = __commonJS({
38620
38620
  parent.enabled = choices.every((ch) => ch.enabled === true);
38621
38621
  parent = parent.parent;
38622
38622
  }
38623
- reset(this, this.choices);
38623
+ reset2(this, this.choices);
38624
38624
  this.emit("toggle", choice, this);
38625
38625
  return choice;
38626
38626
  }
@@ -38918,7 +38918,7 @@ var require_array2 = __commonJS({
38918
38918
  }
38919
38919
  }
38920
38920
  get choices() {
38921
- return reset(this, this.state.choices || []);
38921
+ return reset2(this, this.state.choices || []);
38922
38922
  }
38923
38923
  set visible(visible) {
38924
38924
  this.state.visible = visible;
@@ -38966,7 +38966,7 @@ var require_array2 = __commonJS({
38966
38966
  return this.multiple ? this.enabled : this.focused;
38967
38967
  }
38968
38968
  };
38969
- function reset(prompt, choices) {
38969
+ function reset2(prompt, choices) {
38970
38970
  if (choices instanceof Promise)
38971
38971
  return choices;
38972
38972
  if (typeof choices === "function") {
@@ -46812,7 +46812,7 @@ var require_chunk_UIX4URMV = __commonJS({
46812
46812
  magentaBright: () => magentaBright,
46813
46813
  red: () => red,
46814
46814
  redBright: () => redBright,
46815
- reset: () => reset,
46815
+ reset: () => reset2,
46816
46816
  strikethrough: () => strikethrough,
46817
46817
  underline: () => underline,
46818
46818
  white: () => white,
@@ -46889,7 +46889,7 @@ var require_chunk_UIX4URMV = __commonJS({
46889
46889
  {}
46890
46890
  );
46891
46891
  var {
46892
- reset,
46892
+ reset: reset2,
46893
46893
  bold: bold2,
46894
46894
  dim: dim2,
46895
46895
  italic,
@@ -78733,7 +78733,7 @@ var require_rollup = __commonJS({
78733
78733
  {}
78734
78734
  );
78735
78735
  var {
78736
- reset,
78736
+ reset: reset2,
78737
78737
  bold: bold$1,
78738
78738
  dim: dim$1,
78739
78739
  italic,
@@ -93603,19 +93603,19 @@ ${outro}`;
93603
93603
  function keep(key, value) {
93604
93604
  if (++num > limit) {
93605
93605
  prev = curr;
93606
- reset2(1);
93606
+ reset3(1);
93607
93607
  ++num;
93608
93608
  }
93609
93609
  curr[key] = value;
93610
93610
  }
93611
- function reset2(isPartial) {
93611
+ function reset3(isPartial) {
93612
93612
  num = 0;
93613
93613
  curr = /* @__PURE__ */ Object.create(null);
93614
93614
  isPartial || (prev = /* @__PURE__ */ Object.create(null));
93615
93615
  }
93616
- reset2();
93616
+ reset3();
93617
93617
  return {
93618
- clear: reset2,
93618
+ clear: reset3,
93619
93619
  has: function(key) {
93620
93620
  return curr[key] !== void 0 || prev[key] !== void 0;
93621
93621
  },
@@ -126346,6 +126346,7 @@ var LogLevel = {
126346
126346
  ERROR: 20,
126347
126347
  WARN: 30,
126348
126348
  INFO: 40,
126349
+ SUCCESS: 45,
126349
126350
  DEBUG: 60,
126350
126351
  TRACE: 70,
126351
126352
  ALL: 100
@@ -130143,6 +130144,8 @@ var getDefaultConfig = (config = {}, root) => {
130143
130144
  // packages/config-tools/src/utilities/get-log-level.ts
130144
130145
  var getLogLevel = (label) => {
130145
130146
  switch (label) {
130147
+ case "all":
130148
+ return LogLevel.ALL;
130146
130149
  case "trace":
130147
130150
  return LogLevel.TRACE;
130148
130151
  case "debug":
@@ -130162,6 +130165,9 @@ var getLogLevel = (label) => {
130162
130165
  }
130163
130166
  };
130164
130167
  var getLogLevelLabel = (logLevel) => {
130168
+ if (logLevel >= LogLevel.ALL) {
130169
+ return LogLevelLabel.ALL;
130170
+ }
130165
130171
  if (logLevel >= LogLevel.TRACE) {
130166
130172
  return LogLevelLabel.TRACE;
130167
130173
  }
@@ -130186,6 +130192,89 @@ var getLogLevelLabel = (logLevel) => {
130186
130192
  return LogLevelLabel.INFO;
130187
130193
  };
130188
130194
 
130195
+ // packages/config-tools/src/utilities/logger.ts
130196
+ var chalk = __toESM(require_source(), 1);
130197
+ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
130198
+ if (typeof logLevel === "number" && (logLevel >= getLogLevel(config.logLevel ?? process.env?.STORM_LOG_LEVEL) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(config.logLevel ?? process.env?.STORM_LOG_LEVEL)) {
130199
+ return (message) => {
130200
+ };
130201
+ }
130202
+ if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
130203
+ return (message) => {
130204
+ console.error(
130205
+ ` ${chalk.bold.bgHex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6").inverse("\n\n \u{1F480} Fatal ")} ${chalk.reset.hex(
130206
+ config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
130207
+ )(message)}
130208
+ `
130209
+ );
130210
+ };
130211
+ }
130212
+ if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
130213
+ return (message) => {
130214
+ console.error(
130215
+ ` ${chalk.bold.bgHex(config?.colors?.error ? config.colors.error : "#7d1a1a").inverse("\n\n \u{1F6D1} Error ")} ${chalk.reset.hex(
130216
+ config?.colors?.error ? config.colors.error : "#7d1a1a"
130217
+ )(message)}
130218
+ `
130219
+ );
130220
+ };
130221
+ }
130222
+ if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
130223
+ return (message) => {
130224
+ console.warn(
130225
+ ` ${chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").inverse("\n\n \u26A0\uFE0F Warn ")} ${chalk.reset.hex(
130226
+ config?.colors?.warning ? config.colors.warning : "#fcc419"
130227
+ )(message)}
130228
+ `
130229
+ );
130230
+ };
130231
+ }
130232
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
130233
+ return (message) => {
130234
+ console.info(
130235
+ ` ${chalk.bold.bgHex(config?.colors?.info ? config.colors.info : "#0ea5e9").inverse("\n\n \u{1F4EC} Info ")} ${chalk.reset.hex(
130236
+ config?.colors?.info ? config.colors.info : "#0ea5e9"
130237
+ )(message)}
130238
+ `
130239
+ );
130240
+ };
130241
+ }
130242
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
130243
+ return (message) => {
130244
+ console.info(
130245
+ ` ${chalk.bold.bgHex(config?.colors?.success ? config.colors.success : "#087f5b").inverse("\n\n \u{1F389} Success ")} ${chalk.reset.hex(
130246
+ config?.colors?.success ? config.colors.success : "#087f5b"
130247
+ )(message)}
130248
+ `
130249
+ );
130250
+ };
130251
+ }
130252
+ if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
130253
+ return (message) => {
130254
+ console.debug(
130255
+ ` ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").inverse("\n\n \u{1F9EA} Debug ")} ${chalk.reset.hex(
130256
+ config?.colors?.primary ? config.colors.primary : "#1fb2a6"
130257
+ )(message)}
130258
+ `
130259
+ );
130260
+ };
130261
+ }
130262
+ return (message) => {
130263
+ console.log(
130264
+ ` ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").inverse("\n\n \u{1F4E2} System ")} ${chalk.bold.hex(
130265
+ config?.colors?.primary ? config.colors.primary : "#1fb2a6"
130266
+ )(message)}
130267
+ `
130268
+ );
130269
+ };
130270
+ };
130271
+ var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
130272
+ var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
130273
+ var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
130274
+ var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
130275
+ var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
130276
+ var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
130277
+
130189
130278
  // packages/config-tools/src/env/get-env.ts
130190
130279
  var getExtensionEnv = (extensionName) => {
130191
130280
  const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
@@ -130388,7 +130477,7 @@ var setConfigEnv = (config) => {
130388
130477
  };
130389
130478
 
130390
130479
  // packages/workspace-tools/src/base/base-executor.ts
130391
- var chalk = __toESM(require_source());
130480
+ var chalk2 = __toESM(require_source());
130392
130481
 
130393
130482
  // packages/workspace-tools/src/utils/get-workspace-root.ts
130394
130483
  var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
@@ -130479,10 +130568,10 @@ var applyWorkspaceTokens = (options, config, tokenizerFn) => {
130479
130568
  var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
130480
130569
  const startTime = Date.now();
130481
130570
  let options = _options;
130571
+ let config;
130482
130572
  try {
130483
- console.info(chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} executor...
130484
-
130485
- `));
130573
+ writeInfo(config, `\u26A1 Running the ${name} executor...
130574
+ `);
130486
130575
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
130487
130576
  throw new Error(
130488
130577
  "The Build process failed because the context is not valid. Please run this command from a workspace."
@@ -130492,35 +130581,37 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
130492
130581
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
130493
130582
  const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot;
130494
130583
  const projectName = context.projectsConfigurations.projects[context.projectName].name;
130495
- let config;
130496
130584
  if (!executorOptions.skipReadingConfig) {
130497
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.info(
130498
- chalk.dim(`Loading the Storm config...
130499
- - workspaceRoot: ${workspaceRoot}
130500
- - projectRoot: ${projectRoot}
130501
- - sourceRoot: ${sourceRoot}
130502
- - projectName: ${projectName}
130503
- `)
130585
+ writeDebug(
130586
+ config,
130587
+ `Loading the Storm Config from environment variables and storm.config.js file...
130588
+ - workspaceRoot: ${workspaceRoot}
130589
+ - projectRoot: ${projectRoot}
130590
+ - sourceRoot: ${sourceRoot}
130591
+ - projectName: ${projectName}
130592
+ `
130504
130593
  );
130505
130594
  config = getDefaultConfig({
130506
130595
  ...await getConfigFile(),
130507
130596
  ...getConfigEnv()
130508
130597
  });
130509
130598
  setConfigEnv(config);
130510
- getLogLevel(config.logLevel) >= LogLevel.DEBUG && console.info(
130511
- chalk.dim(
130512
- `Loaded Storm config into env:
130513
- ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\n")}
130514
- `
130515
- )
130599
+ writeTrace(
130600
+ config,
130601
+ `Loaded Storm config into env:
130602
+ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`
130516
130603
  );
130517
130604
  }
130518
130605
  if (executorOptions?.hooks?.applyDefaultOptions) {
130519
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the applyDefaultOptions hook..."));
130606
+ writeDebug(config, "Running the applyDefaultOptions hook...");
130520
130607
  options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
130521
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the applyDefaultOptions hook..."));
130608
+ writeDebug(config, "Completed the applyDefaultOptions hook");
130522
130609
  }
130523
- getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(chalk.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Executor schema options: \n"), options);
130610
+ writeTrace(
130611
+ config,
130612
+ `Executor schema options \u2699\uFE0F
130613
+ ${Object.keys(options).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`
130614
+ );
130524
130615
  const tokenized = applyWorkspaceTokens(
130525
130616
  options,
130526
130617
  {
@@ -130535,9 +130626,9 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
130535
130626
  applyWorkspaceExecutorTokens
130536
130627
  );
130537
130628
  if (executorOptions?.hooks?.preProcess) {
130538
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the preProcess hook..."));
130629
+ writeDebug(config, "Running the preProcess hook...");
130539
130630
  await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
130540
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the preProcess hook..."));
130631
+ writeDebug(config, "Completed the preProcess hook");
130541
130632
  }
130542
130633
  const result = await Promise.resolve(executorFn(tokenized, context, config));
130543
130634
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
@@ -130546,31 +130637,32 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
130546
130637
  });
130547
130638
  }
130548
130639
  if (executorOptions?.hooks?.postProcess) {
130549
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the postProcess hook..."));
130640
+ writeDebug(config, "Running the postProcess hook...");
130550
130641
  await Promise.resolve(executorOptions.hooks.postProcess(config));
130551
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the postProcess hook..."));
130642
+ writeDebug(config, "Completed the postProcess hook");
130552
130643
  }
130553
- console.info(
130554
- chalk.bold.hex("#087f5b")(`
130555
-
130556
- \u{1F389} Successfully completed running the ${name} executor!
130557
-
130558
- `)
130559
- );
130644
+ writeSuccess(config, `Completed running the ${name} task executor!
130645
+ `);
130560
130646
  return {
130561
130647
  success: true
130562
130648
  };
130563
130649
  } catch (error) {
130564
- console.error(
130565
- chalk.bold.hex("#7d1a1a")("\u274C An error occurred while running the executor\n\n"),
130566
- error
130650
+ writeFatal(
130651
+ config,
130652
+ "A fatal error occurred while running the executor - the process was forced to terminate"
130653
+ );
130654
+ writeError(
130655
+ config,
130656
+ `An exception was thrown in the executor's process
130657
+ - Details: ${error.message}
130658
+ - Stacktrace: ${error.stack}`
130567
130659
  );
130568
130660
  return {
130569
130661
  success: false
130570
130662
  };
130571
130663
  } finally {
130572
130664
  console.info(
130573
- chalk.dim(
130665
+ chalk2.dim(
130574
130666
  `\u23F1\uFE0F The${name ? ` ${name}` : ""} generator took ${Date.now() - startTime}ms to complete`
130575
130667
  )
130576
130668
  );