@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.
@@ -16390,14 +16390,14 @@ var require_share = __commonJS({
16390
16390
  resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();
16391
16391
  resetConnection = void 0;
16392
16392
  };
16393
- var reset = function() {
16393
+ var reset2 = function() {
16394
16394
  cancelReset();
16395
16395
  connection = subject = void 0;
16396
16396
  hasCompleted = hasErrored = false;
16397
16397
  };
16398
16398
  var resetAndUnsubscribe = function() {
16399
16399
  var conn = connection;
16400
- reset();
16400
+ reset2();
16401
16401
  conn === null || conn === void 0 ? void 0 : conn.unsubscribe();
16402
16402
  };
16403
16403
  return lift_1.operate(function(source, subscriber) {
@@ -16421,13 +16421,13 @@ var require_share = __commonJS({
16421
16421
  error: function(err) {
16422
16422
  hasErrored = true;
16423
16423
  cancelReset();
16424
- resetConnection = handleReset(reset, resetOnError, err);
16424
+ resetConnection = handleReset(reset2, resetOnError, err);
16425
16425
  dest.error(err);
16426
16426
  },
16427
16427
  complete: function() {
16428
16428
  hasCompleted = true;
16429
16429
  cancelReset();
16430
- resetConnection = handleReset(reset, resetOnComplete);
16430
+ resetConnection = handleReset(reset2, resetOnComplete);
16431
16431
  dest.complete();
16432
16432
  }
16433
16433
  });
@@ -16437,13 +16437,13 @@ var require_share = __commonJS({
16437
16437
  };
16438
16438
  }
16439
16439
  exports.share = share;
16440
- function handleReset(reset, on) {
16440
+ function handleReset(reset2, on) {
16441
16441
  var args = [];
16442
16442
  for (var _i = 2; _i < arguments.length; _i++) {
16443
16443
  args[_i - 2] = arguments[_i];
16444
16444
  }
16445
16445
  if (on === true) {
16446
- reset();
16446
+ reset2();
16447
16447
  return;
16448
16448
  }
16449
16449
  if (on === false) {
@@ -16452,7 +16452,7 @@ var require_share = __commonJS({
16452
16452
  var onSubscriber = new Subscriber_1.SafeSubscriber({
16453
16453
  next: function() {
16454
16454
  onSubscriber.unsubscribe();
16455
- reset();
16455
+ reset2();
16456
16456
  }
16457
16457
  });
16458
16458
  return innerFrom_1.innerFrom(on.apply(void 0, __spreadArray2([], __read2(args)))).subscribe(onSubscriber);
@@ -19993,14 +19993,14 @@ var require_templates = __commonJS({
19993
19993
  }
19994
19994
  return results;
19995
19995
  }
19996
- function buildStyle(chalk2, styles) {
19996
+ function buildStyle(chalk3, styles) {
19997
19997
  const enabled = {};
19998
19998
  for (const layer of styles) {
19999
19999
  for (const style of layer.styles) {
20000
20000
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
20001
20001
  }
20002
20002
  }
20003
- let current = chalk2;
20003
+ let current = chalk3;
20004
20004
  for (const [styleName, styles2] of Object.entries(enabled)) {
20005
20005
  if (!Array.isArray(styles2)) {
20006
20006
  continue;
@@ -20012,7 +20012,7 @@ var require_templates = __commonJS({
20012
20012
  }
20013
20013
  return current;
20014
20014
  }
20015
- module2.exports = (chalk2, temporary) => {
20015
+ module2.exports = (chalk3, temporary) => {
20016
20016
  const styles = [];
20017
20017
  const chunks = [];
20018
20018
  let chunk = [];
@@ -20022,13 +20022,13 @@ var require_templates = __commonJS({
20022
20022
  } else if (style) {
20023
20023
  const string = chunk.join("");
20024
20024
  chunk = [];
20025
- chunks.push(styles.length === 0 ? string : buildStyle(chalk2, styles)(string));
20025
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk3, styles)(string));
20026
20026
  styles.push({ inverse, styles: parseStyle(style) });
20027
20027
  } else if (close) {
20028
20028
  if (styles.length === 0) {
20029
20029
  throw new Error("Found extraneous } in Chalk template literal");
20030
20030
  }
20031
- chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
20031
+ chunks.push(buildStyle(chalk3, styles)(chunk.join("")));
20032
20032
  chunk = [];
20033
20033
  styles.pop();
20034
20034
  } else {
@@ -20076,16 +20076,16 @@ var require_source = __commonJS({
20076
20076
  }
20077
20077
  };
20078
20078
  var chalkFactory = (options) => {
20079
- const chalk3 = {};
20080
- applyOptions(chalk3, options);
20081
- chalk3.template = (...arguments_) => chalkTag(chalk3.template, ...arguments_);
20082
- Object.setPrototypeOf(chalk3, Chalk.prototype);
20083
- Object.setPrototypeOf(chalk3.template, chalk3);
20084
- chalk3.template.constructor = () => {
20079
+ const chalk4 = {};
20080
+ applyOptions(chalk4, options);
20081
+ chalk4.template = (...arguments_) => chalkTag(chalk4.template, ...arguments_);
20082
+ Object.setPrototypeOf(chalk4, Chalk.prototype);
20083
+ Object.setPrototypeOf(chalk4.template, chalk4);
20084
+ chalk4.template.constructor = () => {
20085
20085
  throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
20086
20086
  };
20087
- chalk3.template.Instance = ChalkClass;
20088
- return chalk3.template;
20087
+ chalk4.template.Instance = ChalkClass;
20088
+ return chalk4.template;
20089
20089
  };
20090
20090
  function Chalk(options) {
20091
20091
  return chalkFactory(options);
@@ -20196,7 +20196,7 @@ var require_source = __commonJS({
20196
20196
  return openAll + string + closeAll;
20197
20197
  };
20198
20198
  var template;
20199
- var chalkTag = (chalk3, ...strings) => {
20199
+ var chalkTag = (chalk4, ...strings) => {
20200
20200
  const [firstString] = strings;
20201
20201
  if (!isArray(firstString) || !isArray(firstString.raw)) {
20202
20202
  return strings.join(" ");
@@ -20212,14 +20212,14 @@ var require_source = __commonJS({
20212
20212
  if (template === void 0) {
20213
20213
  template = require_templates();
20214
20214
  }
20215
- return template(chalk3, parts.join(""));
20215
+ return template(chalk4, parts.join(""));
20216
20216
  };
20217
20217
  Object.defineProperties(Chalk.prototype, styles);
20218
- var chalk2 = Chalk();
20219
- chalk2.supportsColor = stdoutColor;
20220
- chalk2.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
20221
- chalk2.stderr.supportsColor = stderrColor;
20222
- module2.exports = chalk2;
20218
+ var chalk3 = Chalk();
20219
+ chalk3.supportsColor = stdoutColor;
20220
+ chalk3.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
20221
+ chalk3.stderr.supportsColor = stderrColor;
20222
+ module2.exports = chalk3;
20223
20223
  }
20224
20224
  });
20225
20225
 
@@ -20314,20 +20314,20 @@ var require_highlight = __commonJS({
20314
20314
  Object.defineProperty(exports, "__esModule", { value: true });
20315
20315
  exports.highlight = void 0;
20316
20316
  var jsTokens = require_js_tokens();
20317
- var chalk2 = require_source();
20317
+ var chalk3 = require_source();
20318
20318
  var identifiers_1 = require_identifiers2();
20319
- function getDefs(chalk3) {
20319
+ function getDefs(chalk4) {
20320
20320
  return {
20321
- keyword: chalk3.cyan,
20322
- capitalized: chalk3.yellow,
20323
- jsx_tag: chalk3.yellow,
20324
- punctuator: chalk3.yellow,
20321
+ keyword: chalk4.cyan,
20322
+ capitalized: chalk4.yellow,
20323
+ jsx_tag: chalk4.yellow,
20324
+ punctuator: chalk4.yellow,
20325
20325
  // bracket: intentionally omitted.
20326
- number: chalk3.magenta,
20327
- string: chalk3.green,
20328
- regex: chalk3.magenta,
20329
- comment: chalk3.grey,
20330
- invalid: chalk3.white.bgRed.bold
20326
+ number: chalk4.magenta,
20327
+ string: chalk4.green,
20328
+ regex: chalk4.magenta,
20329
+ comment: chalk4.grey,
20330
+ invalid: chalk4.white.bgRed.bold
20331
20331
  };
20332
20332
  }
20333
20333
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -20367,7 +20367,7 @@ var require_highlight = __commonJS({
20367
20367
  });
20368
20368
  }
20369
20369
  function highlight(code) {
20370
- const defs = getDefs(chalk2);
20370
+ const defs = getDefs(chalk3);
20371
20371
  return highlightTokens(defs, code);
20372
20372
  }
20373
20373
  exports.highlight = highlight;
@@ -20480,7 +20480,7 @@ var require_run_type_check = __commonJS({
20480
20480
  "use strict";
20481
20481
  Object.defineProperty(exports, "__esModule", { value: true });
20482
20482
  exports.getFormattedDiagnostic = exports.runTypeCheck = exports.runTypeCheckWatch = void 0;
20483
- var chalk2 = require_source();
20483
+ var chalk3 = require_source();
20484
20484
  var path2 = require("path");
20485
20485
  var code_frames_1 = require("nx/src/utils/code-frames");
20486
20486
  var highlight_1 = require_highlight();
@@ -20560,17 +20560,17 @@ var require_run_type_check = __commonJS({
20560
20560
  const category = diagnostic.category;
20561
20561
  switch (category) {
20562
20562
  case ts2.DiagnosticCategory.Warning: {
20563
- message += `${chalk2.yellow.bold("warning")} ${chalk2.gray(`TS${diagnostic.code}`)}: `;
20563
+ message += `${chalk3.yellow.bold("warning")} ${chalk3.gray(`TS${diagnostic.code}`)}: `;
20564
20564
  break;
20565
20565
  }
20566
20566
  case ts2.DiagnosticCategory.Error: {
20567
- message += `${chalk2.red.bold("error")} ${chalk2.gray(`TS${diagnostic.code}`)}: `;
20567
+ message += `${chalk3.red.bold("error")} ${chalk3.gray(`TS${diagnostic.code}`)}: `;
20568
20568
  break;
20569
20569
  }
20570
20570
  case ts2.DiagnosticCategory.Suggestion:
20571
20571
  case ts2.DiagnosticCategory.Message:
20572
20572
  default: {
20573
- message += `${chalk2.cyan.bold(category === 2 ? "suggestion" : "info")}: `;
20573
+ message += `${chalk3.cyan.bold(category === 2 ? "suggestion" : "info")}: `;
20574
20574
  break;
20575
20575
  }
20576
20576
  }
@@ -20580,7 +20580,7 @@ var require_run_type_check = __commonJS({
20580
20580
  const line = pos.line + 1;
20581
20581
  const column = pos.character + 1;
20582
20582
  const fileName = path2.relative(workspaceRoot, diagnostic.file.fileName);
20583
- message = `${chalk2.underline.blue(`${fileName}:${line}:${column}`)} - ` + message;
20583
+ message = `${chalk3.underline.blue(`${fileName}:${line}:${column}`)} - ` + message;
20584
20584
  const code = diagnostic.file.getFullText(diagnostic.file.getSourceFile());
20585
20585
  message += "\n" + (0, code_frames_1.codeFrameColumns)(code, {
20586
20586
  start: { line, column }
@@ -32205,7 +32205,7 @@ var require_array2 = __commonJS({
32205
32205
  parent.enabled = choices.every((ch) => ch.enabled === true);
32206
32206
  parent = parent.parent;
32207
32207
  }
32208
- reset(this, this.choices);
32208
+ reset2(this, this.choices);
32209
32209
  this.emit("toggle", choice, this);
32210
32210
  return choice;
32211
32211
  }
@@ -32503,7 +32503,7 @@ var require_array2 = __commonJS({
32503
32503
  }
32504
32504
  }
32505
32505
  get choices() {
32506
- return reset(this, this.state.choices || []);
32506
+ return reset2(this, this.state.choices || []);
32507
32507
  }
32508
32508
  set visible(visible) {
32509
32509
  this.state.visible = visible;
@@ -32551,7 +32551,7 @@ var require_array2 = __commonJS({
32551
32551
  return this.multiple ? this.enabled : this.focused;
32552
32552
  }
32553
32553
  };
32554
- function reset(prompt, choices) {
32554
+ function reset2(prompt, choices) {
32555
32555
  if (choices instanceof Promise)
32556
32556
  return choices;
32557
32557
  if (typeof choices === "function") {
@@ -40168,14 +40168,14 @@ var require_templates2 = __commonJS({
40168
40168
  }
40169
40169
  return results;
40170
40170
  }
40171
- function buildStyle(chalk2, styles) {
40171
+ function buildStyle(chalk3, styles) {
40172
40172
  const enabled = {};
40173
40173
  for (const layer of styles) {
40174
40174
  for (const style of layer.styles) {
40175
40175
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
40176
40176
  }
40177
40177
  }
40178
- let current = chalk2;
40178
+ let current = chalk3;
40179
40179
  for (const styleName of Object.keys(enabled)) {
40180
40180
  if (Array.isArray(enabled[styleName])) {
40181
40181
  if (!(styleName in current)) {
@@ -40190,7 +40190,7 @@ var require_templates2 = __commonJS({
40190
40190
  }
40191
40191
  return current;
40192
40192
  }
40193
- module2.exports = (chalk2, tmp) => {
40193
+ module2.exports = (chalk3, tmp) => {
40194
40194
  const styles = [];
40195
40195
  const chunks = [];
40196
40196
  let chunk = [];
@@ -40200,13 +40200,13 @@ var require_templates2 = __commonJS({
40200
40200
  } else if (style) {
40201
40201
  const str = chunk.join("");
40202
40202
  chunk = [];
40203
- chunks.push(styles.length === 0 ? str : buildStyle(chalk2, styles)(str));
40203
+ chunks.push(styles.length === 0 ? str : buildStyle(chalk3, styles)(str));
40204
40204
  styles.push({ inverse, styles: parseStyle(style) });
40205
40205
  } else if (close) {
40206
40206
  if (styles.length === 0) {
40207
40207
  throw new Error("Found extraneous } in Chalk template literal");
40208
40208
  }
40209
- chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
40209
+ chunks.push(buildStyle(chalk3, styles)(chunk.join("")));
40210
40210
  chunk = [];
40211
40211
  styles.pop();
40212
40212
  } else {
@@ -40243,16 +40243,16 @@ var require_chalk = __commonJS({
40243
40243
  }
40244
40244
  function Chalk(options) {
40245
40245
  if (!this || !(this instanceof Chalk) || this.template) {
40246
- const chalk2 = {};
40247
- applyOptions(chalk2, options);
40248
- chalk2.template = function() {
40246
+ const chalk3 = {};
40247
+ applyOptions(chalk3, options);
40248
+ chalk3.template = function() {
40249
40249
  const args = [].slice.call(arguments);
40250
- return chalkTag.apply(null, [chalk2.template].concat(args));
40250
+ return chalkTag.apply(null, [chalk3.template].concat(args));
40251
40251
  };
40252
- Object.setPrototypeOf(chalk2, Chalk.prototype);
40253
- Object.setPrototypeOf(chalk2.template, chalk2);
40254
- chalk2.template.constructor = Chalk;
40255
- return chalk2.template;
40252
+ Object.setPrototypeOf(chalk3, Chalk.prototype);
40253
+ Object.setPrototypeOf(chalk3.template, chalk3);
40254
+ chalk3.template.constructor = Chalk;
40255
+ return chalk3.template;
40256
40256
  }
40257
40257
  applyOptions(this, options);
40258
40258
  }
@@ -40371,7 +40371,7 @@ var require_chalk = __commonJS({
40371
40371
  ansiStyles.dim.open = originalDim;
40372
40372
  return str;
40373
40373
  }
40374
- function chalkTag(chalk2, strings) {
40374
+ function chalkTag(chalk3, strings) {
40375
40375
  if (!Array.isArray(strings)) {
40376
40376
  return [].slice.call(arguments, 1).join(" ");
40377
40377
  }
@@ -40381,7 +40381,7 @@ var require_chalk = __commonJS({
40381
40381
  parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
40382
40382
  parts.push(String(strings.raw[i]));
40383
40383
  }
40384
- return template(chalk2, parts.join(""));
40384
+ return template(chalk3, parts.join(""));
40385
40385
  }
40386
40386
  Object.defineProperties(Chalk.prototype, styles);
40387
40387
  module2.exports = Chalk();
@@ -40427,17 +40427,17 @@ var require_lib4 = __commonJS({
40427
40427
  return n.default = e, t && t.set(e, n), n;
40428
40428
  }
40429
40429
  var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
40430
- function getDefs(chalk2) {
40430
+ function getDefs(chalk3) {
40431
40431
  return {
40432
- keyword: chalk2.cyan,
40433
- capitalized: chalk2.yellow,
40434
- jsxIdentifier: chalk2.yellow,
40435
- punctuator: chalk2.yellow,
40436
- number: chalk2.magenta,
40437
- string: chalk2.green,
40438
- regex: chalk2.magenta,
40439
- comment: chalk2.grey,
40440
- invalid: chalk2.white.bgRed.bold
40432
+ keyword: chalk3.cyan,
40433
+ capitalized: chalk3.yellow,
40434
+ jsxIdentifier: chalk3.yellow,
40435
+ punctuator: chalk3.yellow,
40436
+ number: chalk3.magenta,
40437
+ string: chalk3.green,
40438
+ regex: chalk3.magenta,
40439
+ comment: chalk3.grey,
40440
+ invalid: chalk3.white.bgRed.bold
40441
40441
  };
40442
40442
  }
40443
40443
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -40568,11 +40568,11 @@ var require_lib5 = __commonJS({
40568
40568
  return _chalk.default;
40569
40569
  }
40570
40570
  var deprecationWarningShown = false;
40571
- function getDefs(chalk2) {
40571
+ function getDefs(chalk3) {
40572
40572
  return {
40573
- gutter: chalk2.grey,
40574
- marker: chalk2.red.bold,
40575
- message: chalk2.red.bold
40573
+ gutter: chalk3.grey,
40574
+ marker: chalk3.red.bold,
40575
+ message: chalk3.red.bold
40576
40576
  };
40577
40577
  }
40578
40578
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -40634,8 +40634,8 @@ var require_lib5 = __commonJS({
40634
40634
  }
40635
40635
  function codeFrameColumns(rawLines, loc, opts = {}) {
40636
40636
  const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
40637
- const chalk2 = getChalk(opts.forceColor);
40638
- const defs = getDefs(chalk2);
40637
+ const chalk3 = getChalk(opts.forceColor);
40638
+ const defs = getDefs(chalk3);
40639
40639
  const maybeHighlight = (chalkFn, string) => {
40640
40640
  return highlighted ? chalkFn(string) : string;
40641
40641
  };
@@ -40674,7 +40674,7 @@ var require_lib5 = __commonJS({
40674
40674
  ${frame}`;
40675
40675
  }
40676
40676
  if (highlighted) {
40677
- return chalk2.reset(frame);
40677
+ return chalk3.reset(frame);
40678
40678
  } else {
40679
40679
  return frame;
40680
40680
  }
@@ -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
  },
@@ -126354,6 +126354,7 @@ var LogLevel = {
126354
126354
  ERROR: 20,
126355
126355
  WARN: 30,
126356
126356
  INFO: 40,
126357
+ SUCCESS: 45,
126357
126358
  DEBUG: 60,
126358
126359
  TRACE: 70,
126359
126360
  ALL: 100
@@ -130151,6 +130152,8 @@ var getDefaultConfig = (config = {}, root) => {
130151
130152
  // packages/config-tools/src/utilities/get-log-level.ts
130152
130153
  var getLogLevel = (label) => {
130153
130154
  switch (label) {
130155
+ case "all":
130156
+ return LogLevel.ALL;
130154
130157
  case "trace":
130155
130158
  return LogLevel.TRACE;
130156
130159
  case "debug":
@@ -130170,6 +130173,9 @@ var getLogLevel = (label) => {
130170
130173
  }
130171
130174
  };
130172
130175
  var getLogLevelLabel = (logLevel) => {
130176
+ if (logLevel >= LogLevel.ALL) {
130177
+ return LogLevelLabel.ALL;
130178
+ }
130173
130179
  if (logLevel >= LogLevel.TRACE) {
130174
130180
  return LogLevelLabel.TRACE;
130175
130181
  }
@@ -130194,6 +130200,89 @@ var getLogLevelLabel = (logLevel) => {
130194
130200
  return LogLevelLabel.INFO;
130195
130201
  };
130196
130202
 
130203
+ // packages/config-tools/src/utilities/logger.ts
130204
+ var chalk = __toESM(require_source(), 1);
130205
+ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
130206
+ 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)) {
130207
+ return (message) => {
130208
+ };
130209
+ }
130210
+ if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
130211
+ return (message) => {
130212
+ console.error(
130213
+ ` ${chalk.bold.bgHex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6").inverse("\n\n \u{1F480} Fatal ")} ${chalk.reset.hex(
130214
+ config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
130215
+ )(message)}
130216
+ `
130217
+ );
130218
+ };
130219
+ }
130220
+ if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
130221
+ return (message) => {
130222
+ console.error(
130223
+ ` ${chalk.bold.bgHex(config?.colors?.error ? config.colors.error : "#7d1a1a").inverse("\n\n \u{1F6D1} Error ")} ${chalk.reset.hex(
130224
+ config?.colors?.error ? config.colors.error : "#7d1a1a"
130225
+ )(message)}
130226
+ `
130227
+ );
130228
+ };
130229
+ }
130230
+ if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
130231
+ return (message) => {
130232
+ console.warn(
130233
+ ` ${chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").inverse("\n\n \u26A0\uFE0F Warn ")} ${chalk.reset.hex(
130234
+ config?.colors?.warning ? config.colors.warning : "#fcc419"
130235
+ )(message)}
130236
+ `
130237
+ );
130238
+ };
130239
+ }
130240
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
130241
+ return (message) => {
130242
+ console.info(
130243
+ ` ${chalk.bold.bgHex(config?.colors?.info ? config.colors.info : "#0ea5e9").inverse("\n\n \u{1F4EC} Info ")} ${chalk.reset.hex(
130244
+ config?.colors?.info ? config.colors.info : "#0ea5e9"
130245
+ )(message)}
130246
+ `
130247
+ );
130248
+ };
130249
+ }
130250
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
130251
+ return (message) => {
130252
+ console.info(
130253
+ ` ${chalk.bold.bgHex(config?.colors?.success ? config.colors.success : "#087f5b").inverse("\n\n \u{1F389} Success ")} ${chalk.reset.hex(
130254
+ config?.colors?.success ? config.colors.success : "#087f5b"
130255
+ )(message)}
130256
+ `
130257
+ );
130258
+ };
130259
+ }
130260
+ if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
130261
+ return (message) => {
130262
+ console.debug(
130263
+ ` ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").inverse("\n\n \u{1F9EA} Debug ")} ${chalk.reset.hex(
130264
+ config?.colors?.primary ? config.colors.primary : "#1fb2a6"
130265
+ )(message)}
130266
+ `
130267
+ );
130268
+ };
130269
+ }
130270
+ return (message) => {
130271
+ console.log(
130272
+ ` ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").inverse("\n\n \u{1F4E2} System ")} ${chalk.bold.hex(
130273
+ config?.colors?.primary ? config.colors.primary : "#1fb2a6"
130274
+ )(message)}
130275
+ `
130276
+ );
130277
+ };
130278
+ };
130279
+ var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
130280
+ var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
130281
+ var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
130282
+ var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
130283
+ var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
130284
+ var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
130285
+
130197
130286
  // packages/config-tools/src/env/get-env.ts
130198
130287
  var getExtensionEnv = (extensionName) => {
130199
130288
  const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
@@ -136621,7 +136710,7 @@ var import_tsup = __toESM(require_dist6());
136621
136710
  var ts = __toESM(require("typescript"));
136622
136711
 
136623
136712
  // packages/workspace-tools/src/base/base-executor.ts
136624
- var chalk = __toESM(require_source());
136713
+ var chalk2 = __toESM(require_source());
136625
136714
 
136626
136715
  // packages/workspace-tools/src/utils/get-workspace-root.ts
136627
136716
  var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
@@ -136712,10 +136801,10 @@ var applyWorkspaceTokens = (options, config, tokenizerFn) => {
136712
136801
  var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
136713
136802
  const startTime = Date.now();
136714
136803
  let options = _options;
136804
+ let config;
136715
136805
  try {
136716
- console.info(chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} executor...
136717
-
136718
- `));
136806
+ writeInfo(config, `\u26A1 Running the ${name} executor...
136807
+ `);
136719
136808
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
136720
136809
  throw new Error(
136721
136810
  "The Build process failed because the context is not valid. Please run this command from a workspace."
@@ -136725,35 +136814,37 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
136725
136814
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
136726
136815
  const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot;
136727
136816
  const projectName = context.projectsConfigurations.projects[context.projectName].name;
136728
- let config;
136729
136817
  if (!executorOptions.skipReadingConfig) {
136730
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.info(
136731
- chalk.dim(`Loading the Storm config...
136732
- - workspaceRoot: ${workspaceRoot}
136733
- - projectRoot: ${projectRoot}
136734
- - sourceRoot: ${sourceRoot}
136735
- - projectName: ${projectName}
136736
- `)
136818
+ writeDebug(
136819
+ config,
136820
+ `Loading the Storm Config from environment variables and storm.config.js file...
136821
+ - workspaceRoot: ${workspaceRoot}
136822
+ - projectRoot: ${projectRoot}
136823
+ - sourceRoot: ${sourceRoot}
136824
+ - projectName: ${projectName}
136825
+ `
136737
136826
  );
136738
136827
  config = getDefaultConfig({
136739
136828
  ...await getConfigFile(),
136740
136829
  ...getConfigEnv()
136741
136830
  });
136742
136831
  setConfigEnv(config);
136743
- getLogLevel(config.logLevel) >= LogLevel.DEBUG && console.info(
136744
- chalk.dim(
136745
- `Loaded Storm config into env:
136746
- ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\n")}
136747
- `
136748
- )
136832
+ writeTrace(
136833
+ config,
136834
+ `Loaded Storm config into env:
136835
+ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`
136749
136836
  );
136750
136837
  }
136751
136838
  if (executorOptions?.hooks?.applyDefaultOptions) {
136752
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the applyDefaultOptions hook..."));
136839
+ writeDebug(config, "Running the applyDefaultOptions hook...");
136753
136840
  options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
136754
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the applyDefaultOptions hook..."));
136841
+ writeDebug(config, "Completed the applyDefaultOptions hook");
136755
136842
  }
136756
- getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(chalk.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Executor schema options: \n"), options);
136843
+ writeTrace(
136844
+ config,
136845
+ `Executor schema options \u2699\uFE0F
136846
+ ${Object.keys(options).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`
136847
+ );
136757
136848
  const tokenized = applyWorkspaceTokens(
136758
136849
  options,
136759
136850
  {
@@ -136768,9 +136859,9 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
136768
136859
  applyWorkspaceExecutorTokens
136769
136860
  );
136770
136861
  if (executorOptions?.hooks?.preProcess) {
136771
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the preProcess hook..."));
136862
+ writeDebug(config, "Running the preProcess hook...");
136772
136863
  await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
136773
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the preProcess hook..."));
136864
+ writeDebug(config, "Completed the preProcess hook");
136774
136865
  }
136775
136866
  const result = await Promise.resolve(executorFn(tokenized, context, config));
136776
136867
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
@@ -136779,31 +136870,32 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
136779
136870
  });
136780
136871
  }
136781
136872
  if (executorOptions?.hooks?.postProcess) {
136782
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the postProcess hook..."));
136873
+ writeDebug(config, "Running the postProcess hook...");
136783
136874
  await Promise.resolve(executorOptions.hooks.postProcess(config));
136784
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the postProcess hook..."));
136875
+ writeDebug(config, "Completed the postProcess hook");
136785
136876
  }
136786
- console.info(
136787
- chalk.bold.hex("#087f5b")(`
136788
-
136789
- \u{1F389} Successfully completed running the ${name} executor!
136790
-
136791
- `)
136792
- );
136877
+ writeSuccess(config, `Completed running the ${name} task executor!
136878
+ `);
136793
136879
  return {
136794
136880
  success: true
136795
136881
  };
136796
136882
  } catch (error) {
136797
- console.error(
136798
- chalk.bold.hex("#7d1a1a")("\u274C An error occurred while running the executor\n\n"),
136799
- error
136883
+ writeFatal(
136884
+ config,
136885
+ "A fatal error occurred while running the executor - the process was forced to terminate"
136886
+ );
136887
+ writeError(
136888
+ config,
136889
+ `An exception was thrown in the executor's process
136890
+ - Details: ${error.message}
136891
+ - Stacktrace: ${error.stack}`
136800
136892
  );
136801
136893
  return {
136802
136894
  success: false
136803
136895
  };
136804
136896
  } finally {
136805
136897
  console.info(
136806
- chalk.dim(
136898
+ chalk2.dim(
136807
136899
  `\u23F1\uFE0F The${name ? ` ${name}` : ""} generator took ${Date.now() - startTime}ms to complete`
136808
136900
  )
136809
136901
  );