@storm-software/workspace-tools 1.42.3 → 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,
@@ -65095,7 +65095,7 @@ var require_Options_gen_types = __commonJS({
65095
65095
  compiledFilename: "string"
65096
65096
  });
65097
65097
  exports.SourceMapOptions = SourceMapOptions;
65098
- var Options2 = t.iface([], {
65098
+ var Options = t.iface([], {
65099
65099
  transforms: t.array("Transform"),
65100
65100
  disableESTransforms: t.opt("boolean"),
65101
65101
  jsxRuntime: t.opt(t.union(t.lit("classic"), t.lit("automatic"), t.lit("preserve"))),
@@ -65111,7 +65111,7 @@ var require_Options_gen_types = __commonJS({
65111
65111
  sourceMapOptions: t.opt("SourceMapOptions"),
65112
65112
  filePath: t.opt("string")
65113
65113
  });
65114
- exports.Options = Options2;
65114
+ exports.Options = Options;
65115
65115
  var exportedTypeSuite = {
65116
65116
  Transform: exports.Transform,
65117
65117
  SourceMapOptions: exports.SourceMapOptions,
@@ -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,8 +126354,10 @@ var LogLevel = {
126354
126354
  ERROR: 20,
126355
126355
  WARN: 30,
126356
126356
  INFO: 40,
126357
+ SUCCESS: 45,
126357
126358
  DEBUG: 60,
126358
- TRACE: 70
126359
+ TRACE: 70,
126360
+ ALL: 100
126359
126361
  };
126360
126362
  var LogLevelLabel = {
126361
126363
  SILENT: "silent",
@@ -126364,7 +126366,8 @@ var LogLevelLabel = {
126364
126366
  WARN: "warn",
126365
126367
  INFO: "info",
126366
126368
  DEBUG: "debug",
126367
- TRACE: "trace"
126369
+ TRACE: "trace",
126370
+ ALL: "all"
126368
126371
  };
126369
126372
 
126370
126373
  // packages/config-tools/src/utilities/find-up.ts
@@ -126373,15 +126376,15 @@ var import_path = require("path");
126373
126376
  var MAX_PATH_SEARCH_DEPTH = 30;
126374
126377
  var depth = 0;
126375
126378
  function findFolderUp(startPath, endFileNames) {
126376
- startPath = startPath ?? process.cwd();
126377
- if (endFileNames.some((endFileName) => (0, import_fs.existsSync)((0, import_path.join)(startPath, endFileName)))) {
126378
- return startPath;
126379
- } else if (startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
126380
- const parent = (0, import_path.join)(startPath, "..");
126379
+ const _startPath = startPath ?? process.cwd();
126380
+ if (endFileNames.some((endFileName) => (0, import_fs.existsSync)((0, import_path.join)(_startPath, endFileName)))) {
126381
+ return _startPath;
126382
+ }
126383
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
126384
+ const parent = (0, import_path.join)(_startPath, "..");
126381
126385
  return findFolderUp(parent, endFileNames);
126382
- } else {
126383
- return void 0;
126384
126386
  }
126387
+ return void 0;
126385
126388
  }
126386
126389
 
126387
126390
  // packages/config-tools/src/utilities/find-workspace-root.ts
@@ -130038,17 +130041,13 @@ var StormConfigSchema = objectType({
130038
130041
  license: stringType().trim().default("Apache License 2.0").describe("The root directory of the package"),
130039
130042
  homepage: stringType().trim().url().default("https://stormsoftware.org").describe("The homepage of the workspace"),
130040
130043
  branch: stringType().trim().default("main").describe("The branch of the workspace"),
130041
- preMajor: booleanType().default(false).describe(
130042
- "An indicator specifying if the package is still in it's pre-major version"
130043
- ),
130044
+ preMajor: booleanType().default(false).describe("An indicator specifying if the package is still in it's pre-major version"),
130044
130045
  owner: stringType().trim().default("@storm-software/development").describe("The owner of the package"),
130045
130046
  worker: stringType().trim().default("stormie-bot").describe(
130046
130047
  "The worker of the package (this is the bot that will be used to perform various tasks)"
130047
130048
  ),
130048
130049
  env: enumType(["development", "staging", "production"]).default("production").describe("The current runtime environment of the package"),
130049
- ci: booleanType().default(true).describe(
130050
- "An indicator specifying if the current environment is a CI environment"
130051
- ),
130050
+ ci: booleanType().default(true).describe("An indicator specifying if the current environment is a CI environment"),
130052
130051
  workspaceRoot: stringType().trim().optional().describe("The root directory of the workspace"),
130053
130052
  packageDirectory: stringType().trim().optional().describe("The root directory of the package"),
130054
130053
  buildDirectory: stringType().trim().default("dist").describe("The build directory for the workspace"),
@@ -130059,7 +130058,7 @@ var StormConfigSchema = objectType({
130059
130058
  packageManager: enumType(["npm", "yarn", "pnpm", "bun"]).default("npm").describe("The package manager used by the repository"),
130060
130059
  timezone: stringType().trim().default("America/New_York").describe("The default timezone of the workspace"),
130061
130060
  locale: stringType().trim().default("en-US").describe("The default locale of the workspace"),
130062
- logLevel: enumType(["silent", "fatal", "error", "warn", "info", "debug", "trace"]).default("debug").describe(
130061
+ logLevel: enumType(["silent", "fatal", "error", "warn", "info", "debug", "trace", "all"]).default("debug").describe(
130063
130062
  "The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
130064
130063
  ),
130065
130064
  configFile: stringType().trim().nullable().default(null).describe(
@@ -130117,11 +130116,21 @@ var getDefaultConfig = (config = {}, root) => {
130117
130116
  });
130118
130117
  if (file) {
130119
130118
  const packageJson = JSON.parse(file);
130120
- packageJson.name && (name = packageJson.name);
130121
- packageJson.namespace && (namespace = packageJson.namespace);
130122
- packageJson.repository?.url && (repository = packageJson.repository?.url);
130123
- packageJson.license && (license = packageJson.license);
130124
- packageJson.homepage && (homepage = packageJson.homepage);
130119
+ if (packageJson.name) {
130120
+ name = packageJson.name;
130121
+ }
130122
+ if (packageJson.namespace) {
130123
+ namespace = packageJson.namespace;
130124
+ }
130125
+ if (packageJson.repository?.url) {
130126
+ repository = packageJson.repository?.url;
130127
+ }
130128
+ if (packageJson.license) {
130129
+ license = packageJson.license;
130130
+ }
130131
+ if (packageJson.homepage) {
130132
+ homepage = packageJson.homepage;
130133
+ }
130125
130134
  }
130126
130135
  }
130127
130136
  return StormConfigSchema.parse({
@@ -130143,6 +130152,8 @@ var getDefaultConfig = (config = {}, root) => {
130143
130152
  // packages/config-tools/src/utilities/get-log-level.ts
130144
130153
  var getLogLevel = (label) => {
130145
130154
  switch (label) {
130155
+ case "all":
130156
+ return LogLevel.ALL;
130146
130157
  case "trace":
130147
130158
  return LogLevel.TRACE;
130148
130159
  case "debug":
@@ -130162,38 +130173,129 @@ var getLogLevel = (label) => {
130162
130173
  }
130163
130174
  };
130164
130175
  var getLogLevelLabel = (logLevel) => {
130176
+ if (logLevel >= LogLevel.ALL) {
130177
+ return LogLevelLabel.ALL;
130178
+ }
130165
130179
  if (logLevel >= LogLevel.TRACE) {
130166
130180
  return LogLevelLabel.TRACE;
130167
- } else if (logLevel >= LogLevel.DEBUG) {
130181
+ }
130182
+ if (logLevel >= LogLevel.DEBUG) {
130168
130183
  return LogLevelLabel.DEBUG;
130169
- } else if (logLevel >= LogLevel.INFO) {
130184
+ }
130185
+ if (logLevel >= LogLevel.INFO) {
130170
130186
  return LogLevelLabel.INFO;
130171
- } else if (logLevel >= LogLevel.WARN) {
130187
+ }
130188
+ if (logLevel >= LogLevel.WARN) {
130172
130189
  return LogLevelLabel.WARN;
130173
- } else if (logLevel >= LogLevel.ERROR) {
130190
+ }
130191
+ if (logLevel >= LogLevel.ERROR) {
130174
130192
  return LogLevelLabel.ERROR;
130175
- } else if (logLevel >= LogLevel.FATAL) {
130193
+ }
130194
+ if (logLevel >= LogLevel.FATAL) {
130176
130195
  return LogLevelLabel.FATAL;
130177
- } else if (logLevel <= LogLevel.SILENT) {
130196
+ }
130197
+ if (logLevel <= LogLevel.SILENT) {
130178
130198
  return LogLevelLabel.SILENT;
130179
- } else {
130180
- return LogLevelLabel.INFO;
130181
130199
  }
130200
+ return LogLevelLabel.INFO;
130182
130201
  };
130183
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
+
130184
130286
  // packages/config-tools/src/env/get-env.ts
130185
130287
  var getExtensionEnv = (extensionName) => {
130186
130288
  const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
130187
130289
  return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
130188
- const name = key.replace(prefix, "").split("_").map(
130189
- (i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
130190
- ).join("");
130191
- name && (ret[name] = process.env[key]);
130290
+ const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
130291
+ if (name) {
130292
+ ret[name] = process.env[key];
130293
+ }
130192
130294
  return ret;
130193
130295
  }, {});
130194
130296
  };
130195
130297
  var getConfigEnv = () => {
130196
- const prefix = `STORM_`;
130298
+ const prefix = "STORM_";
130197
130299
  let config = {
130198
130300
  name: process.env[`${prefix}NAME`],
130199
130301
  namespace: process.env[`${prefix}NAMESPACE`],
@@ -130212,9 +130314,7 @@ var getConfigEnv = () => {
130212
130314
  runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
130213
130315
  runtimeDirectory: process.env[`${prefix}RUNTIME_DIRECTORY`],
130214
130316
  env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
130215
- ci: Boolean(
130216
- process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION
130217
- ),
130317
+ ci: Boolean(process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION),
130218
130318
  colors: {
130219
130319
  primary: process.env[`${prefix}COLOR_PRIMARY`],
130220
130320
  background: process.env[`${prefix}COLOR_BACKGROUND`],
@@ -130227,9 +130327,7 @@ var getConfigEnv = () => {
130227
130327
  repository: process.env[`${prefix}REPOSITORY`],
130228
130328
  branch: process.env[`${prefix}BRANCH`],
130229
130329
  preMajor: Boolean(process.env[`${prefix}PRE_MAJOR`]),
130230
- logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? Number.isSafeInteger(
130231
- Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
130232
- ) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : LogLevelLabel.INFO,
130330
+ logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : LogLevelLabel.INFO,
130233
130331
  extensions: {}
130234
130332
  };
130235
130333
  const serializedConfig = process.env[`${prefix}CONFIG`];
@@ -130244,26 +130342,27 @@ var getConfigEnv = () => {
130244
130342
  }
130245
130343
  const extensionPrefix = `${prefix}EXTENSION_`;
130246
130344
  return Object.keys(process.env).filter((key) => key.startsWith(extensionPrefix)).reduce((ret, key) => {
130247
- const extensionName = key.substring(prefix.length, key.indexOf("_", prefix.length)).split("_").map(
130248
- (i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
130249
- ).join("");
130250
- extensionName && (ret.extensions[extensionName] = getExtensionEnv(extensionName));
130345
+ const extensionName = key.substring(prefix.length, key.indexOf("_", prefix.length)).split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
130346
+ if (extensionName) {
130347
+ ret.extensions[extensionName] = getExtensionEnv(extensionName);
130348
+ }
130251
130349
  return ret;
130252
130350
  }, config);
130253
130351
  };
130254
130352
 
130255
130353
  // packages/config-tools/src/env/set-env.ts
130256
130354
  var setExtensionEnv = (extensionName, extension) => {
130257
- Object.keys(extension ?? {}).forEach((key) => {
130355
+ for (const key of Object.keys(extension ?? {})) {
130258
130356
  if (extension[key]) {
130259
- let result = key?.replace(
130357
+ const result = key?.replace(
130260
130358
  /([A-Z])+/g,
130261
130359
  (input) => input ? input[0].toUpperCase() + input.slice(1) : ""
130262
130360
  ).split(/(?=[A-Z])|[\.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
130263
130361
  let extensionKey;
130264
130362
  if (result.length === 0) {
130265
130363
  return;
130266
- } else if (result.length === 1) {
130364
+ }
130365
+ if (result.length === 1) {
130267
130366
  extensionKey = result[0].toUpperCase();
130268
130367
  } else {
130269
130368
  extensionKey = result.reduce((ret, part) => {
@@ -130272,59 +130371,117 @@ var setExtensionEnv = (extensionName, extension) => {
130272
130371
  }
130273
130372
  process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
130274
130373
  }
130275
- });
130374
+ }
130276
130375
  };
130277
130376
  var setConfigEnv = (config) => {
130278
- const prefix = `STORM_`;
130279
- config.name && (process.env[`${prefix}NAME`] = config.name);
130280
- config.namespace && (process.env[`${prefix}NAMESPACE`] = config.namespace);
130281
- config.owner && (process.env[`${prefix}OWNER`] = config.owner);
130282
- config.worker && (process.env[`${prefix}WORKER`] = config.worker);
130283
- config.organization && (process.env[`${prefix}ORGANIZATION`] = config.organization);
130284
- config.packageManager && (process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager);
130285
- config.license && (process.env[`${prefix}LICENSE`] = config.license);
130286
- config.homepage && (process.env[`${prefix}HOMEPAGE`] = config.homepage);
130287
- config.timezone && (process.env[`${prefix}TIMEZONE`] = config.timezone);
130288
- config.timezone && (process.env.TZ = config.timezone);
130289
- config.timezone && (process.env.DEFAULT_TIMEZONE = config.timezone);
130290
- config.locale && (process.env[`${prefix}LOCALE`] = config.locale);
130291
- config.locale && (process.env.LOCALE = config.locale);
130292
- config.locale && (process.env.DEFAULT_LOCALE = config.locale);
130293
- config.locale && (process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8");
130294
- config.configFile && (process.env[`${prefix}CONFIG_FILE`] = config.configFile);
130295
- config.workspaceRoot && (process.env[`${prefix}WORKSPACE_ROOT`] = config.workspaceRoot);
130296
- config.workspaceRoot && (process.env.NX_WORKSPACE_ROOT = config.workspaceRoot);
130297
- config.workspaceRoot && (process.env.NX_WORKSPACE_ROOT_PATH = config.workspaceRoot);
130298
- config.packageDirectory && (process.env[`${prefix}PACKAGE_DIRECTORY`] = config.packageDirectory);
130299
- config.buildDirectory && (process.env[`${prefix}BUILD_DIRECTORY`] = config.buildDirectory);
130300
- config.runtimeVersion && (process.env[`${prefix}RUNTIME_VERSION`] = config.runtimeVersion);
130301
- config.runtimeDirectory && (process.env[`${prefix}RUNTIME_DIRECTORY`] = config.runtimeDirectory);
130302
- config.env && (process.env[`${prefix}ENV`] = config.env);
130303
- config.env && (process.env.NODE_ENV = config.env);
130304
- config.env && (process.env.ENVIRONMENT = config.env);
130305
- config.ci && (process.env[`${prefix}CI`] = String(config.ci));
130306
- config.ci && (process.env.CI = String(config.ci));
130307
- config.ci && (process.env.CONTINUOUS_INTEGRATION = String(config.ci));
130308
- config.colors.primary && (process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary);
130309
- config.colors.background && (process.env[`${prefix}COLOR_BACKGROUND`] = config.colors.background);
130310
- config.colors.success && (process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success);
130311
- config.colors.info && (process.env[`${prefix}COLOR_INFO`] = config.colors.info);
130312
- config.colors.warning && (process.env[`${prefix}COLOR_WARNING`] = config.colors.warning);
130313
- config.colors.error && (process.env[`${prefix}COLOR_ERROR`] = config.colors.error);
130314
- config.colors.fatal && (process.env[`${prefix}COLOR_FATAL`] = config.colors.fatal);
130315
- config.repository && (process.env[`${prefix}REPOSITORY`] = config.repository);
130316
- config.branch && (process.env[`${prefix}BRANCH`] = config.branch);
130317
- config.preMajor && (process.env[`${prefix}PRE_MAJOR`] = String(config.preMajor));
130318
- config.logLevel && (process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel));
130319
- config.logLevel && (process.env.LOG_LEVEL = String(config.logLevel));
130320
- config.logLevel && (process.env.NX_VERBOSE_LOGGING = String(
130321
- getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
130322
- ));
130323
- config.logLevel && (process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none");
130324
- config && (process.env[`${prefix}CONFIG`] = JSON.stringify(config));
130325
- Object.keys(config.extensions ?? {}).forEach((key) => {
130377
+ const prefix = "STORM_";
130378
+ if (config.name) {
130379
+ process.env[`${prefix}NAME`] = config.name;
130380
+ }
130381
+ if (config.namespace) {
130382
+ process.env[`${prefix}NAMESPACE`] = config.namespace;
130383
+ }
130384
+ if (config.owner) {
130385
+ process.env[`${prefix}OWNER`] = config.owner;
130386
+ }
130387
+ if (config.worker) {
130388
+ process.env[`${prefix}WORKER`] = config.worker;
130389
+ }
130390
+ if (config.organization) {
130391
+ process.env[`${prefix}ORGANIZATION`] = config.organization;
130392
+ }
130393
+ if (config.packageManager) {
130394
+ process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager;
130395
+ }
130396
+ if (config.license) {
130397
+ process.env[`${prefix}LICENSE`] = config.license;
130398
+ }
130399
+ if (config.homepage) {
130400
+ process.env[`${prefix}HOMEPAGE`] = config.homepage;
130401
+ }
130402
+ if (config.timezone) {
130403
+ process.env[`${prefix}TIMEZONE`] = config.timezone;
130404
+ process.env.TZ = config.timezone;
130405
+ process.env.DEFAULT_TIMEZONE = config.timezone;
130406
+ }
130407
+ if (config.locale) {
130408
+ process.env[`${prefix}LOCALE`] = config.locale;
130409
+ process.env.LOCALE = config.locale;
130410
+ process.env.DEFAULT_LOCALE = config.locale;
130411
+ process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
130412
+ }
130413
+ if (config.configFile) {
130414
+ process.env[`${prefix}CONFIG_FILE`] = config.configFile;
130415
+ }
130416
+ if (config.workspaceRoot) {
130417
+ process.env[`${prefix}WORKSPACE_ROOT`] = config.workspaceRoot;
130418
+ process.env.NX_WORKSPACE_ROOT = config.workspaceRoot;
130419
+ process.env.NX_WORKSPACE_ROOT_PATH = config.workspaceRoot;
130420
+ }
130421
+ if (config.packageDirectory) {
130422
+ process.env[`${prefix}PACKAGE_DIRECTORY`] = config.packageDirectory;
130423
+ }
130424
+ if (config.buildDirectory) {
130425
+ process.env[`${prefix}BUILD_DIRECTORY`] = config.buildDirectory;
130426
+ }
130427
+ if (config.runtimeVersion) {
130428
+ process.env[`${prefix}RUNTIME_VERSION`] = config.runtimeVersion;
130429
+ }
130430
+ if (config.runtimeDirectory) {
130431
+ process.env[`${prefix}RUNTIME_DIRECTORY`] = config.runtimeDirectory;
130432
+ }
130433
+ if (config.env) {
130434
+ process.env[`${prefix}ENV`] = config.env;
130435
+ process.env.NODE_ENV = config.env;
130436
+ process.env.ENVIRONMENT = config.env;
130437
+ }
130438
+ if (config.ci) {
130439
+ process.env[`${prefix}CI`] = String(config.ci);
130440
+ process.env.CI = String(config.ci);
130441
+ process.env.CONTINUOUS_INTEGRATION = String(config.ci);
130442
+ }
130443
+ if (config.colors.primary) {
130444
+ process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary;
130445
+ }
130446
+ if (config.colors.background) {
130447
+ process.env[`${prefix}COLOR_BACKGROUND`] = config.colors.background;
130448
+ }
130449
+ if (config.colors.success) {
130450
+ process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success;
130451
+ }
130452
+ if (config.colors.info) {
130453
+ process.env[`${prefix}COLOR_INFO`] = config.colors.info;
130454
+ }
130455
+ if (config.colors.warning) {
130456
+ process.env[`${prefix}COLOR_WARNING`] = config.colors.warning;
130457
+ }
130458
+ if (config.colors.error) {
130459
+ process.env[`${prefix}COLOR_ERROR`] = config.colors.error;
130460
+ }
130461
+ if (config.colors.fatal) {
130462
+ process.env[`${prefix}COLOR_FATAL`] = config.colors.fatal;
130463
+ }
130464
+ if (config.repository) {
130465
+ process.env[`${prefix}REPOSITORY`] = config.repository;
130466
+ }
130467
+ if (config.branch) {
130468
+ process.env[`${prefix}BRANCH`] = config.branch;
130469
+ }
130470
+ if (config.preMajor) {
130471
+ process.env[`${prefix}PRE_MAJOR`] = String(config.preMajor);
130472
+ }
130473
+ if (config.logLevel) {
130474
+ process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
130475
+ process.env.LOG_LEVEL = String(config.logLevel);
130476
+ process.env.NX_VERBOSE_LOGGING = String(
130477
+ getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
130478
+ );
130479
+ process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
130480
+ }
130481
+ process.env[`${prefix}CONFIG`] = JSON.stringify(config);
130482
+ for (const key of Object.keys(config.extensions ?? {})) {
130326
130483
  config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
130327
- });
130484
+ }
130328
130485
  };
130329
130486
 
130330
130487
  // node_modules/.pnpm/esbuild-plugin-define@0.4.0_esbuild@0.19.5/node_modules/esbuild-plugin-define/dist/mjs/utils.js
@@ -136553,7 +136710,7 @@ var import_tsup = __toESM(require_dist6());
136553
136710
  var ts = __toESM(require("typescript"));
136554
136711
 
136555
136712
  // packages/workspace-tools/src/base/base-executor.ts
136556
- var chalk = __toESM(require_source());
136713
+ var chalk2 = __toESM(require_source());
136557
136714
 
136558
136715
  // packages/workspace-tools/src/utils/get-workspace-root.ts
136559
136716
  var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
@@ -136641,16 +136798,13 @@ var applyWorkspaceTokens = (options, config, tokenizerFn) => {
136641
136798
  };
136642
136799
 
136643
136800
  // packages/workspace-tools/src/base/base-executor.ts
136644
- var withRunExecutor = (name, executorFn, executorOptions = {
136645
- skipReadingConfig: false,
136646
- hooks: {}
136647
- }) => async (_options, context) => {
136801
+ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
136648
136802
  const startTime = Date.now();
136649
136803
  let options = _options;
136804
+ let config;
136650
136805
  try {
136651
- console.info(chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} executor...
136652
-
136653
- `));
136806
+ writeInfo(config, `\u26A1 Running the ${name} executor...
136807
+ `);
136654
136808
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
136655
136809
  throw new Error(
136656
136810
  "The Build process failed because the context is not valid. Please run this command from a workspace."
@@ -136660,26 +136814,37 @@ var withRunExecutor = (name, executorFn, executorOptions = {
136660
136814
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
136661
136815
  const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot;
136662
136816
  const projectName = context.projectsConfigurations.projects[context.projectName].name;
136663
- let config;
136664
136817
  if (!executorOptions.skipReadingConfig) {
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
+ `
136826
+ );
136665
136827
  config = getDefaultConfig({
136666
136828
  ...await getConfigFile(),
136667
136829
  ...getConfigEnv()
136668
136830
  });
136669
136831
  setConfigEnv(config);
136670
- getLogLevel(config.logLevel) >= LogLevel.DEBUG && console.debug(
136671
- chalk.dim(
136672
- `Loaded Storm config into env:
136673
- ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\n")}`
136674
- )
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")}`
136675
136836
  );
136676
136837
  }
136677
136838
  if (executorOptions?.hooks?.applyDefaultOptions) {
136678
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the applyDefaultOptions hook..."));
136839
+ writeDebug(config, "Running the applyDefaultOptions hook...");
136679
136840
  options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
136680
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the applyDefaultOptions hook..."));
136841
+ writeDebug(config, "Completed the applyDefaultOptions hook");
136681
136842
  }
136682
- 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
+ );
136683
136848
  const tokenized = applyWorkspaceTokens(
136684
136849
  options,
136685
136850
  {
@@ -136694,9 +136859,9 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
136694
136859
  applyWorkspaceExecutorTokens
136695
136860
  );
136696
136861
  if (executorOptions?.hooks?.preProcess) {
136697
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the preProcess hook..."));
136862
+ writeDebug(config, "Running the preProcess hook...");
136698
136863
  await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
136699
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the preProcess hook..."));
136864
+ writeDebug(config, "Completed the preProcess hook");
136700
136865
  }
136701
136866
  const result = await Promise.resolve(executorFn(tokenized, context, config));
136702
136867
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
@@ -136705,31 +136870,32 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
136705
136870
  });
136706
136871
  }
136707
136872
  if (executorOptions?.hooks?.postProcess) {
136708
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the postProcess hook..."));
136873
+ writeDebug(config, "Running the postProcess hook...");
136709
136874
  await Promise.resolve(executorOptions.hooks.postProcess(config));
136710
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the postProcess hook..."));
136875
+ writeDebug(config, "Completed the postProcess hook");
136711
136876
  }
136712
- console.info(
136713
- chalk.bold.hex("#087f5b")(`
136714
-
136715
- \u{1F389} Successfully completed running the ${name} executor!
136716
-
136717
- `)
136718
- );
136877
+ writeSuccess(config, `Completed running the ${name} task executor!
136878
+ `);
136719
136879
  return {
136720
136880
  success: true
136721
136881
  };
136722
136882
  } catch (error) {
136723
- console.error(
136724
- chalk.bold.hex("#7d1a1a")("\u274C An error occurred while running the executor\n\n"),
136725
- 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}`
136726
136892
  );
136727
136893
  return {
136728
136894
  success: false
136729
136895
  };
136730
136896
  } finally {
136731
136897
  console.info(
136732
- chalk.dim(
136898
+ chalk2.dim(
136733
136899
  `\u23F1\uFE0F The${name ? ` ${name}` : ""} generator took ${Date.now() - startTime}ms to complete`
136734
136900
  )
136735
136901
  );