@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.
package/index.js CHANGED
@@ -1974,14 +1974,14 @@ var require_templates = __commonJS({
1974
1974
  }
1975
1975
  return results;
1976
1976
  }
1977
- function buildStyle(chalk3, styles) {
1977
+ function buildStyle(chalk4, 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 = chalk3;
1984
+ let current = chalk4;
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 = (chalk3, tmp) => {
1999
+ module2.exports = (chalk4, 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(chalk3, styles)(str));
2009
+ chunks.push(styles.length === 0 ? str : buildStyle(chalk4, 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(chalk3, styles)(chunk.join("")));
2015
+ chunks.push(buildStyle(chalk4, 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 chalk3 = {};
2053
- applyOptions(chalk3, options);
2054
- chalk3.template = function() {
2052
+ const chalk4 = {};
2053
+ applyOptions(chalk4, options);
2054
+ chalk4.template = function() {
2055
2055
  const args = [].slice.call(arguments);
2056
- return chalkTag.apply(null, [chalk3.template].concat(args));
2056
+ return chalkTag.apply(null, [chalk4.template].concat(args));
2057
2057
  };
2058
- Object.setPrototypeOf(chalk3, Chalk.prototype);
2059
- Object.setPrototypeOf(chalk3.template, chalk3);
2060
- chalk3.template.constructor = Chalk;
2061
- return chalk3.template;
2058
+ Object.setPrototypeOf(chalk4, Chalk.prototype);
2059
+ Object.setPrototypeOf(chalk4.template, chalk4);
2060
+ chalk4.template.constructor = Chalk;
2061
+ return chalk4.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(chalk3, strings) {
2180
+ function chalkTag(chalk4, 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(chalk3, parts.join(""));
2190
+ return template(chalk4, 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(chalk3) {
2236
+ function getDefs(chalk4) {
2237
2237
  return {
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
2238
+ keyword: chalk4.cyan,
2239
+ capitalized: chalk4.yellow,
2240
+ jsxIdentifier: chalk4.yellow,
2241
+ punctuator: chalk4.yellow,
2242
+ number: chalk4.magenta,
2243
+ string: chalk4.green,
2244
+ regex: chalk4.magenta,
2245
+ comment: chalk4.grey,
2246
+ invalid: chalk4.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(chalk3) {
2377
+ function getDefs(chalk4) {
2378
2378
  return {
2379
- gutter: chalk3.grey,
2380
- marker: chalk3.red.bold,
2381
- message: chalk3.red.bold
2379
+ gutter: chalk4.grey,
2380
+ marker: chalk4.red.bold,
2381
+ message: chalk4.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 chalk3 = getChalk(opts.forceColor);
2444
- const defs = getDefs(chalk3);
2443
+ const chalk4 = getChalk(opts.forceColor);
2444
+ const defs = getDefs(chalk4);
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 chalk3.reset(frame);
2483
+ return chalk4.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(chalk3, styles) {
7797
+ function buildStyle(chalk4, 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 = chalk3;
7804
+ let current = chalk4;
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 = (chalk3, temporary) => {
7816
+ module2.exports = (chalk4, 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(chalk3, styles)(string));
7826
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk4, 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(chalk3, styles)(chunk.join("")));
7832
+ chunks.push(buildStyle(chalk4, 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 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 = () => {
7880
+ const chalk5 = {};
7881
+ applyOptions(chalk5, options);
7882
+ chalk5.template = (...arguments_) => chalkTag(chalk5.template, ...arguments_);
7883
+ Object.setPrototypeOf(chalk5, Chalk.prototype);
7884
+ Object.setPrototypeOf(chalk5.template, chalk5);
7885
+ chalk5.template.constructor = () => {
7886
7886
  throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
7887
7887
  };
7888
- chalk4.template.Instance = ChalkClass;
7889
- return chalk4.template;
7888
+ chalk5.template.Instance = ChalkClass;
7889
+ return chalk5.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 = (chalk4, ...strings) => {
8000
+ var chalkTag = (chalk5, ...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(chalk4, parts.join(""));
8016
+ return template(chalk5, parts.join(""));
8017
8017
  };
8018
8018
  Object.defineProperties(Chalk.prototype, styles);
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;
8019
+ var chalk4 = Chalk();
8020
+ chalk4.supportsColor = stdoutColor;
8021
+ chalk4.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
8022
+ chalk4.stderr.supportsColor = stderrColor;
8023
+ module2.exports = chalk4;
8024
8024
  }
8025
8025
  });
8026
8026
 
@@ -24150,14 +24150,14 @@ var require_share = __commonJS({
24150
24150
  resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();
24151
24151
  resetConnection = void 0;
24152
24152
  };
24153
- var reset = function() {
24153
+ var reset2 = function() {
24154
24154
  cancelReset();
24155
24155
  connection = subject = void 0;
24156
24156
  hasCompleted = hasErrored = false;
24157
24157
  };
24158
24158
  var resetAndUnsubscribe = function() {
24159
24159
  var conn = connection;
24160
- reset();
24160
+ reset2();
24161
24161
  conn === null || conn === void 0 ? void 0 : conn.unsubscribe();
24162
24162
  };
24163
24163
  return lift_1.operate(function(source, subscriber) {
@@ -24181,13 +24181,13 @@ var require_share = __commonJS({
24181
24181
  error: function(err) {
24182
24182
  hasErrored = true;
24183
24183
  cancelReset();
24184
- resetConnection = handleReset(reset, resetOnError, err);
24184
+ resetConnection = handleReset(reset2, resetOnError, err);
24185
24185
  dest.error(err);
24186
24186
  },
24187
24187
  complete: function() {
24188
24188
  hasCompleted = true;
24189
24189
  cancelReset();
24190
- resetConnection = handleReset(reset, resetOnComplete);
24190
+ resetConnection = handleReset(reset2, resetOnComplete);
24191
24191
  dest.complete();
24192
24192
  }
24193
24193
  });
@@ -24197,13 +24197,13 @@ var require_share = __commonJS({
24197
24197
  };
24198
24198
  }
24199
24199
  exports.share = share;
24200
- function handleReset(reset, on) {
24200
+ function handleReset(reset2, on) {
24201
24201
  var args = [];
24202
24202
  for (var _i = 2; _i < arguments.length; _i++) {
24203
24203
  args[_i - 2] = arguments[_i];
24204
24204
  }
24205
24205
  if (on === true) {
24206
- reset();
24206
+ reset2();
24207
24207
  return;
24208
24208
  }
24209
24209
  if (on === false) {
@@ -24212,7 +24212,7 @@ var require_share = __commonJS({
24212
24212
  var onSubscriber = new Subscriber_1.SafeSubscriber({
24213
24213
  next: function() {
24214
24214
  onSubscriber.unsubscribe();
24215
- reset();
24215
+ reset2();
24216
24216
  }
24217
24217
  });
24218
24218
  return innerFrom_1.innerFrom(on.apply(void 0, __spreadArray2([], __read2(args)))).subscribe(onSubscriber);
@@ -28102,7 +28102,7 @@ var require_array = __commonJS({
28102
28102
  parent.enabled = choices.every((ch) => ch.enabled === true);
28103
28103
  parent = parent.parent;
28104
28104
  }
28105
- reset(this, this.choices);
28105
+ reset2(this, this.choices);
28106
28106
  this.emit("toggle", choice, this);
28107
28107
  return choice;
28108
28108
  }
@@ -28400,7 +28400,7 @@ var require_array = __commonJS({
28400
28400
  }
28401
28401
  }
28402
28402
  get choices() {
28403
- return reset(this, this.state.choices || []);
28403
+ return reset2(this, this.state.choices || []);
28404
28404
  }
28405
28405
  set visible(visible) {
28406
28406
  this.state.visible = visible;
@@ -28448,7 +28448,7 @@ var require_array = __commonJS({
28448
28448
  return this.multiple ? this.enabled : this.focused;
28449
28449
  }
28450
28450
  };
28451
- function reset(prompt, choices) {
28451
+ function reset2(prompt, choices) {
28452
28452
  if (choices instanceof Promise)
28453
28453
  return choices;
28454
28454
  if (typeof choices === "function") {
@@ -31283,20 +31283,20 @@ var require_highlight = __commonJS({
31283
31283
  Object.defineProperty(exports, "__esModule", { value: true });
31284
31284
  exports.highlight = void 0;
31285
31285
  var jsTokens = require_js_tokens();
31286
- var chalk3 = require_source();
31286
+ var chalk4 = require_source();
31287
31287
  var identifiers_1 = require_identifiers2();
31288
- function getDefs(chalk4) {
31288
+ function getDefs(chalk5) {
31289
31289
  return {
31290
- keyword: chalk4.cyan,
31291
- capitalized: chalk4.yellow,
31292
- jsx_tag: chalk4.yellow,
31293
- punctuator: chalk4.yellow,
31290
+ keyword: chalk5.cyan,
31291
+ capitalized: chalk5.yellow,
31292
+ jsx_tag: chalk5.yellow,
31293
+ punctuator: chalk5.yellow,
31294
31294
  // bracket: intentionally omitted.
31295
- number: chalk4.magenta,
31296
- string: chalk4.green,
31297
- regex: chalk4.magenta,
31298
- comment: chalk4.grey,
31299
- invalid: chalk4.white.bgRed.bold
31295
+ number: chalk5.magenta,
31296
+ string: chalk5.green,
31297
+ regex: chalk5.magenta,
31298
+ comment: chalk5.grey,
31299
+ invalid: chalk5.white.bgRed.bold
31300
31300
  };
31301
31301
  }
31302
31302
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -31336,7 +31336,7 @@ var require_highlight = __commonJS({
31336
31336
  });
31337
31337
  }
31338
31338
  function highlight(code) {
31339
- const defs = getDefs(chalk3);
31339
+ const defs = getDefs(chalk4);
31340
31340
  return highlightTokens(defs, code);
31341
31341
  }
31342
31342
  exports.highlight = highlight;
@@ -31449,7 +31449,7 @@ var require_run_type_check = __commonJS({
31449
31449
  "use strict";
31450
31450
  Object.defineProperty(exports, "__esModule", { value: true });
31451
31451
  exports.getFormattedDiagnostic = exports.runTypeCheck = exports.runTypeCheckWatch = void 0;
31452
- var chalk3 = require_source();
31452
+ var chalk4 = require_source();
31453
31453
  var path3 = require("path");
31454
31454
  var code_frames_1 = require("nx/src/utils/code-frames");
31455
31455
  var highlight_1 = require_highlight();
@@ -31529,17 +31529,17 @@ var require_run_type_check = __commonJS({
31529
31529
  const category = diagnostic.category;
31530
31530
  switch (category) {
31531
31531
  case ts2.DiagnosticCategory.Warning: {
31532
- message += `${chalk3.yellow.bold("warning")} ${chalk3.gray(`TS${diagnostic.code}`)}: `;
31532
+ message += `${chalk4.yellow.bold("warning")} ${chalk4.gray(`TS${diagnostic.code}`)}: `;
31533
31533
  break;
31534
31534
  }
31535
31535
  case ts2.DiagnosticCategory.Error: {
31536
- message += `${chalk3.red.bold("error")} ${chalk3.gray(`TS${diagnostic.code}`)}: `;
31536
+ message += `${chalk4.red.bold("error")} ${chalk4.gray(`TS${diagnostic.code}`)}: `;
31537
31537
  break;
31538
31538
  }
31539
31539
  case ts2.DiagnosticCategory.Suggestion:
31540
31540
  case ts2.DiagnosticCategory.Message:
31541
31541
  default: {
31542
- message += `${chalk3.cyan.bold(category === 2 ? "suggestion" : "info")}: `;
31542
+ message += `${chalk4.cyan.bold(category === 2 ? "suggestion" : "info")}: `;
31543
31543
  break;
31544
31544
  }
31545
31545
  }
@@ -31549,7 +31549,7 @@ var require_run_type_check = __commonJS({
31549
31549
  const line = pos.line + 1;
31550
31550
  const column = pos.character + 1;
31551
31551
  const fileName = path3.relative(workspaceRoot, diagnostic.file.fileName);
31552
- message = `${chalk3.underline.blue(`${fileName}:${line}:${column}`)} - ` + message;
31552
+ message = `${chalk4.underline.blue(`${fileName}:${line}:${column}`)} - ` + message;
31553
31553
  const code = diagnostic.file.getFullText(diagnostic.file.getSourceFile());
31554
31554
  message += "\n" + (0, code_frames_1.codeFrameColumns)(code, {
31555
31555
  start: { line, column }
@@ -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: bold3,
46894
46894
  dim: dim3,
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
  },
@@ -126395,6 +126395,7 @@ var LogLevel = {
126395
126395
  ERROR: 20,
126396
126396
  WARN: 30,
126397
126397
  INFO: 40,
126398
+ SUCCESS: 45,
126398
126399
  DEBUG: 60,
126399
126400
  TRACE: 70,
126400
126401
  ALL: 100
@@ -130192,6 +130193,8 @@ var getDefaultConfig = (config = {}, root) => {
130192
130193
  // packages/config-tools/src/utilities/get-log-level.ts
130193
130194
  var getLogLevel = (label) => {
130194
130195
  switch (label) {
130196
+ case "all":
130197
+ return LogLevel.ALL;
130195
130198
  case "trace":
130196
130199
  return LogLevel.TRACE;
130197
130200
  case "debug":
@@ -130211,6 +130214,9 @@ var getLogLevel = (label) => {
130211
130214
  }
130212
130215
  };
130213
130216
  var getLogLevelLabel = (logLevel) => {
130217
+ if (logLevel >= LogLevel.ALL) {
130218
+ return LogLevelLabel.ALL;
130219
+ }
130214
130220
  if (logLevel >= LogLevel.TRACE) {
130215
130221
  return LogLevelLabel.TRACE;
130216
130222
  }
@@ -130235,6 +130241,89 @@ var getLogLevelLabel = (logLevel) => {
130235
130241
  return LogLevelLabel.INFO;
130236
130242
  };
130237
130243
 
130244
+ // packages/config-tools/src/utilities/logger.ts
130245
+ var chalk = __toESM(require_source(), 1);
130246
+ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
130247
+ 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)) {
130248
+ return (message) => {
130249
+ };
130250
+ }
130251
+ if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
130252
+ return (message) => {
130253
+ console.error(
130254
+ ` ${chalk.bold.bgHex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6").inverse("\n\n \u{1F480} Fatal ")} ${chalk.reset.hex(
130255
+ config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
130256
+ )(message)}
130257
+ `
130258
+ );
130259
+ };
130260
+ }
130261
+ if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
130262
+ return (message) => {
130263
+ console.error(
130264
+ ` ${chalk.bold.bgHex(config?.colors?.error ? config.colors.error : "#7d1a1a").inverse("\n\n \u{1F6D1} Error ")} ${chalk.reset.hex(
130265
+ config?.colors?.error ? config.colors.error : "#7d1a1a"
130266
+ )(message)}
130267
+ `
130268
+ );
130269
+ };
130270
+ }
130271
+ if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
130272
+ return (message) => {
130273
+ console.warn(
130274
+ ` ${chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").inverse("\n\n \u26A0\uFE0F Warn ")} ${chalk.reset.hex(
130275
+ config?.colors?.warning ? config.colors.warning : "#fcc419"
130276
+ )(message)}
130277
+ `
130278
+ );
130279
+ };
130280
+ }
130281
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
130282
+ return (message) => {
130283
+ console.info(
130284
+ ` ${chalk.bold.bgHex(config?.colors?.info ? config.colors.info : "#0ea5e9").inverse("\n\n \u{1F4EC} Info ")} ${chalk.reset.hex(
130285
+ config?.colors?.info ? config.colors.info : "#0ea5e9"
130286
+ )(message)}
130287
+ `
130288
+ );
130289
+ };
130290
+ }
130291
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
130292
+ return (message) => {
130293
+ console.info(
130294
+ ` ${chalk.bold.bgHex(config?.colors?.success ? config.colors.success : "#087f5b").inverse("\n\n \u{1F389} Success ")} ${chalk.reset.hex(
130295
+ config?.colors?.success ? config.colors.success : "#087f5b"
130296
+ )(message)}
130297
+ `
130298
+ );
130299
+ };
130300
+ }
130301
+ if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
130302
+ return (message) => {
130303
+ console.debug(
130304
+ ` ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").inverse("\n\n \u{1F9EA} Debug ")} ${chalk.reset.hex(
130305
+ config?.colors?.primary ? config.colors.primary : "#1fb2a6"
130306
+ )(message)}
130307
+ `
130308
+ );
130309
+ };
130310
+ }
130311
+ return (message) => {
130312
+ console.log(
130313
+ ` ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").inverse("\n\n \u{1F4E2} System ")} ${chalk.bold.hex(
130314
+ config?.colors?.primary ? config.colors.primary : "#1fb2a6"
130315
+ )(message)}
130316
+ `
130317
+ );
130318
+ };
130319
+ };
130320
+ var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
130321
+ var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
130322
+ var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
130323
+ var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
130324
+ var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
130325
+ var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
130326
+
130238
130327
  // packages/config-tools/src/env/get-env.ts
130239
130328
  var getExtensionEnv = (extensionName) => {
130240
130329
  const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
@@ -130437,7 +130526,7 @@ var setConfigEnv = (config) => {
130437
130526
  };
130438
130527
 
130439
130528
  // packages/workspace-tools/src/base/base-executor.ts
130440
- var chalk = __toESM(require_source());
130529
+ var chalk2 = __toESM(require_source());
130441
130530
 
130442
130531
  // packages/workspace-tools/src/utils/get-workspace-root.ts
130443
130532
  var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
@@ -130554,10 +130643,10 @@ var applyWorkspaceTokens = (options, config, tokenizerFn) => {
130554
130643
  var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
130555
130644
  const startTime = Date.now();
130556
130645
  let options = _options;
130646
+ let config;
130557
130647
  try {
130558
- console.info(chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} executor...
130559
-
130560
- `));
130648
+ writeInfo(config, `\u26A1 Running the ${name} executor...
130649
+ `);
130561
130650
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
130562
130651
  throw new Error(
130563
130652
  "The Build process failed because the context is not valid. Please run this command from a workspace."
@@ -130567,35 +130656,37 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
130567
130656
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
130568
130657
  const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot;
130569
130658
  const projectName = context.projectsConfigurations.projects[context.projectName].name;
130570
- let config;
130571
130659
  if (!executorOptions.skipReadingConfig) {
130572
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.info(
130573
- chalk.dim(`Loading the Storm config...
130574
- - workspaceRoot: ${workspaceRoot}
130575
- - projectRoot: ${projectRoot}
130576
- - sourceRoot: ${sourceRoot}
130577
- - projectName: ${projectName}
130578
- `)
130660
+ writeDebug(
130661
+ config,
130662
+ `Loading the Storm Config from environment variables and storm.config.js file...
130663
+ - workspaceRoot: ${workspaceRoot}
130664
+ - projectRoot: ${projectRoot}
130665
+ - sourceRoot: ${sourceRoot}
130666
+ - projectName: ${projectName}
130667
+ `
130579
130668
  );
130580
130669
  config = getDefaultConfig({
130581
130670
  ...await getConfigFile(),
130582
130671
  ...getConfigEnv()
130583
130672
  });
130584
130673
  setConfigEnv(config);
130585
- getLogLevel(config.logLevel) >= LogLevel.DEBUG && console.info(
130586
- chalk.dim(
130587
- `Loaded Storm config into env:
130588
- ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\n")}
130589
- `
130590
- )
130674
+ writeTrace(
130675
+ config,
130676
+ `Loaded Storm config into env:
130677
+ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`
130591
130678
  );
130592
130679
  }
130593
130680
  if (executorOptions?.hooks?.applyDefaultOptions) {
130594
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the applyDefaultOptions hook..."));
130681
+ writeDebug(config, "Running the applyDefaultOptions hook...");
130595
130682
  options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
130596
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the applyDefaultOptions hook..."));
130683
+ writeDebug(config, "Completed the applyDefaultOptions hook");
130597
130684
  }
130598
- getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(chalk.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Executor schema options: \n"), options);
130685
+ writeTrace(
130686
+ config,
130687
+ `Executor schema options \u2699\uFE0F
130688
+ ${Object.keys(options).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`
130689
+ );
130599
130690
  const tokenized = applyWorkspaceTokens(
130600
130691
  options,
130601
130692
  {
@@ -130610,9 +130701,9 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
130610
130701
  applyWorkspaceExecutorTokens
130611
130702
  );
130612
130703
  if (executorOptions?.hooks?.preProcess) {
130613
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the preProcess hook..."));
130704
+ writeDebug(config, "Running the preProcess hook...");
130614
130705
  await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
130615
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the preProcess hook..."));
130706
+ writeDebug(config, "Completed the preProcess hook");
130616
130707
  }
130617
130708
  const result = await Promise.resolve(executorFn(tokenized, context, config));
130618
130709
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
@@ -130621,31 +130712,32 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
130621
130712
  });
130622
130713
  }
130623
130714
  if (executorOptions?.hooks?.postProcess) {
130624
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the postProcess hook..."));
130715
+ writeDebug(config, "Running the postProcess hook...");
130625
130716
  await Promise.resolve(executorOptions.hooks.postProcess(config));
130626
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the postProcess hook..."));
130717
+ writeDebug(config, "Completed the postProcess hook");
130627
130718
  }
130628
- console.info(
130629
- chalk.bold.hex("#087f5b")(`
130630
-
130631
- \u{1F389} Successfully completed running the ${name} executor!
130632
-
130633
- `)
130634
- );
130719
+ writeSuccess(config, `Completed running the ${name} task executor!
130720
+ `);
130635
130721
  return {
130636
130722
  success: true
130637
130723
  };
130638
130724
  } catch (error) {
130639
- console.error(
130640
- chalk.bold.hex("#7d1a1a")("\u274C An error occurred while running the executor\n\n"),
130641
- error
130725
+ writeFatal(
130726
+ config,
130727
+ "A fatal error occurred while running the executor - the process was forced to terminate"
130728
+ );
130729
+ writeError(
130730
+ config,
130731
+ `An exception was thrown in the executor's process
130732
+ - Details: ${error.message}
130733
+ - Stacktrace: ${error.stack}`
130642
130734
  );
130643
130735
  return {
130644
130736
  success: false
130645
130737
  };
130646
130738
  } finally {
130647
130739
  console.info(
130648
- chalk.dim(
130740
+ chalk2.dim(
130649
130741
  `\u23F1\uFE0F The${name ? ` ${name}` : ""} generator took ${Date.now() - startTime}ms to complete`
130650
130742
  )
130651
130743
  );
@@ -130653,14 +130745,14 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
130653
130745
  };
130654
130746
 
130655
130747
  // packages/workspace-tools/src/base/base-generator.ts
130656
- var chalk2 = __toESM(require_source());
130748
+ var chalk3 = __toESM(require_source());
130657
130749
  var withRunGenerator = (name, generatorFn, generatorOptions = {
130658
130750
  skipReadingConfig: false
130659
130751
  }) => async (tree, _options) => {
130660
130752
  const startTime = Date.now();
130661
130753
  let options = _options;
130662
130754
  try {
130663
- console.info(chalk2.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} generator...
130755
+ console.info(chalk3.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} generator...
130664
130756
 
130665
130757
  `));
130666
130758
  let config;
@@ -130671,29 +130763,29 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
130671
130763
  });
130672
130764
  setConfigEnv(config);
130673
130765
  getLogLevel(config.logLevel) >= LogLevel.DEBUG && console.debug(
130674
- chalk2.dim(
130766
+ chalk3.dim(
130675
130767
  `Loaded Storm config into env:
130676
130768
  ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\n")}`
130677
130769
  )
130678
130770
  );
130679
130771
  }
130680
130772
  if (generatorOptions?.hooks?.applyDefaultOptions) {
130681
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Running the applyDefaultOptions hook..."));
130773
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk3.dim("Running the applyDefaultOptions hook..."));
130682
130774
  options = await Promise.resolve(
130683
130775
  generatorOptions.hooks.applyDefaultOptions(options, config)
130684
130776
  );
130685
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Completed the applyDefaultOptions hook..."));
130777
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk3.dim("Completed the applyDefaultOptions hook..."));
130686
130778
  }
130687
- getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(chalk2.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Generator schema options: \n"), options);
130779
+ getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(chalk3.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Generator schema options: \n"), options);
130688
130780
  const tokenized = applyWorkspaceTokens(
130689
130781
  options,
130690
130782
  { workspaceRoot: tree.root, config },
130691
130783
  applyWorkspaceGeneratorTokens
130692
130784
  );
130693
130785
  if (generatorOptions?.hooks?.preProcess) {
130694
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Running the preProcess hook..."));
130786
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk3.dim("Running the preProcess hook..."));
130695
130787
  await Promise.resolve(generatorOptions.hooks.preProcess(options, config));
130696
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Completed the preProcess hook..."));
130788
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk3.dim("Completed the preProcess hook..."));
130697
130789
  }
130698
130790
  const result = await Promise.resolve(generatorFn(tree, tokenized, config));
130699
130791
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
@@ -130702,12 +130794,12 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
130702
130794
  });
130703
130795
  }
130704
130796
  if (generatorOptions?.hooks?.postProcess) {
130705
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Running the postProcess hook..."));
130797
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk3.dim("Running the postProcess hook..."));
130706
130798
  await Promise.resolve(generatorOptions.hooks.postProcess(config));
130707
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Completed the postProcess hook..."));
130799
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk3.dim("Completed the postProcess hook..."));
130708
130800
  }
130709
130801
  console.info(
130710
- chalk2.bold.hex("#087f5b")(`
130802
+ chalk3.bold.hex("#087f5b")(`
130711
130803
 
130712
130804
  \u{1F389} Successfully completed running the ${name} generator!`)
130713
130805
  );
@@ -130716,7 +130808,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
130716
130808
  };
130717
130809
  } catch (error) {
130718
130810
  console.error(
130719
- chalk2.bold.hex("#7d1a1a")("\u274C An error occurred while running the generator\n\n"),
130811
+ chalk3.bold.hex("#7d1a1a")("\u274C An error occurred while running the generator\n\n"),
130720
130812
  error
130721
130813
  );
130722
130814
  console.error(error);
@@ -130725,7 +130817,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
130725
130817
  };
130726
130818
  } finally {
130727
130819
  console.info(
130728
- chalk2.hex("#0ea5e9").italic(
130820
+ chalk3.hex("#0ea5e9").italic(
130729
130821
  `\u23F1\uFE0F The${name ? ` ${name}` : ""} generator took ${Date.now() - startTime}ms to complete`
130730
130822
  )
130731
130823
  );