@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.
@@ -16158,14 +16158,14 @@ var require_share = __commonJS({
16158
16158
  resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();
16159
16159
  resetConnection = void 0;
16160
16160
  };
16161
- var reset = function() {
16161
+ var reset2 = function() {
16162
16162
  cancelReset();
16163
16163
  connection = subject = void 0;
16164
16164
  hasCompleted = hasErrored = false;
16165
16165
  };
16166
16166
  var resetAndUnsubscribe = function() {
16167
16167
  var conn = connection;
16168
- reset();
16168
+ reset2();
16169
16169
  conn === null || conn === void 0 ? void 0 : conn.unsubscribe();
16170
16170
  };
16171
16171
  return lift_1.operate(function(source, subscriber) {
@@ -16189,13 +16189,13 @@ var require_share = __commonJS({
16189
16189
  error: function(err) {
16190
16190
  hasErrored = true;
16191
16191
  cancelReset();
16192
- resetConnection = handleReset(reset, resetOnError, err);
16192
+ resetConnection = handleReset(reset2, resetOnError, err);
16193
16193
  dest.error(err);
16194
16194
  },
16195
16195
  complete: function() {
16196
16196
  hasCompleted = true;
16197
16197
  cancelReset();
16198
- resetConnection = handleReset(reset, resetOnComplete);
16198
+ resetConnection = handleReset(reset2, resetOnComplete);
16199
16199
  dest.complete();
16200
16200
  }
16201
16201
  });
@@ -16205,13 +16205,13 @@ var require_share = __commonJS({
16205
16205
  };
16206
16206
  }
16207
16207
  exports.share = share;
16208
- function handleReset(reset, on) {
16208
+ function handleReset(reset2, on) {
16209
16209
  var args = [];
16210
16210
  for (var _i = 2; _i < arguments.length; _i++) {
16211
16211
  args[_i - 2] = arguments[_i];
16212
16212
  }
16213
16213
  if (on === true) {
16214
- reset();
16214
+ reset2();
16215
16215
  return;
16216
16216
  }
16217
16217
  if (on === false) {
@@ -16220,7 +16220,7 @@ var require_share = __commonJS({
16220
16220
  var onSubscriber = new Subscriber_1.SafeSubscriber({
16221
16221
  next: function() {
16222
16222
  onSubscriber.unsubscribe();
16223
- reset();
16223
+ reset2();
16224
16224
  }
16225
16225
  });
16226
16226
  return innerFrom_1.innerFrom(on.apply(void 0, __spreadArray2([], __read2(args)))).subscribe(onSubscriber);
@@ -19603,14 +19603,14 @@ var require_templates = __commonJS({
19603
19603
  }
19604
19604
  return results;
19605
19605
  }
19606
- function buildStyle(chalk2, styles) {
19606
+ function buildStyle(chalk3, styles) {
19607
19607
  const enabled = {};
19608
19608
  for (const layer of styles) {
19609
19609
  for (const style of layer.styles) {
19610
19610
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
19611
19611
  }
19612
19612
  }
19613
- let current = chalk2;
19613
+ let current = chalk3;
19614
19614
  for (const [styleName, styles2] of Object.entries(enabled)) {
19615
19615
  if (!Array.isArray(styles2)) {
19616
19616
  continue;
@@ -19622,7 +19622,7 @@ var require_templates = __commonJS({
19622
19622
  }
19623
19623
  return current;
19624
19624
  }
19625
- module2.exports = (chalk2, temporary) => {
19625
+ module2.exports = (chalk3, temporary) => {
19626
19626
  const styles = [];
19627
19627
  const chunks = [];
19628
19628
  let chunk = [];
@@ -19632,13 +19632,13 @@ var require_templates = __commonJS({
19632
19632
  } else if (style) {
19633
19633
  const string = chunk.join("");
19634
19634
  chunk = [];
19635
- chunks.push(styles.length === 0 ? string : buildStyle(chalk2, styles)(string));
19635
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk3, styles)(string));
19636
19636
  styles.push({ inverse, styles: parseStyle(style) });
19637
19637
  } else if (close) {
19638
19638
  if (styles.length === 0) {
19639
19639
  throw new Error("Found extraneous } in Chalk template literal");
19640
19640
  }
19641
- chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
19641
+ chunks.push(buildStyle(chalk3, styles)(chunk.join("")));
19642
19642
  chunk = [];
19643
19643
  styles.pop();
19644
19644
  } else {
@@ -19686,16 +19686,16 @@ var require_source = __commonJS({
19686
19686
  }
19687
19687
  };
19688
19688
  var chalkFactory = (options) => {
19689
- const chalk3 = {};
19690
- applyOptions(chalk3, options);
19691
- chalk3.template = (...arguments_) => chalkTag(chalk3.template, ...arguments_);
19692
- Object.setPrototypeOf(chalk3, Chalk.prototype);
19693
- Object.setPrototypeOf(chalk3.template, chalk3);
19694
- chalk3.template.constructor = () => {
19689
+ const chalk4 = {};
19690
+ applyOptions(chalk4, options);
19691
+ chalk4.template = (...arguments_) => chalkTag(chalk4.template, ...arguments_);
19692
+ Object.setPrototypeOf(chalk4, Chalk.prototype);
19693
+ Object.setPrototypeOf(chalk4.template, chalk4);
19694
+ chalk4.template.constructor = () => {
19695
19695
  throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
19696
19696
  };
19697
- chalk3.template.Instance = ChalkClass;
19698
- return chalk3.template;
19697
+ chalk4.template.Instance = ChalkClass;
19698
+ return chalk4.template;
19699
19699
  };
19700
19700
  function Chalk(options) {
19701
19701
  return chalkFactory(options);
@@ -19806,7 +19806,7 @@ var require_source = __commonJS({
19806
19806
  return openAll + string + closeAll;
19807
19807
  };
19808
19808
  var template;
19809
- var chalkTag = (chalk3, ...strings) => {
19809
+ var chalkTag = (chalk4, ...strings) => {
19810
19810
  const [firstString] = strings;
19811
19811
  if (!isArray(firstString) || !isArray(firstString.raw)) {
19812
19812
  return strings.join(" ");
@@ -19822,14 +19822,14 @@ var require_source = __commonJS({
19822
19822
  if (template === void 0) {
19823
19823
  template = require_templates();
19824
19824
  }
19825
- return template(chalk3, parts.join(""));
19825
+ return template(chalk4, parts.join(""));
19826
19826
  };
19827
19827
  Object.defineProperties(Chalk.prototype, styles);
19828
- var chalk2 = Chalk();
19829
- chalk2.supportsColor = stdoutColor;
19830
- chalk2.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
19831
- chalk2.stderr.supportsColor = stderrColor;
19832
- module2.exports = chalk2;
19828
+ var chalk3 = Chalk();
19829
+ chalk3.supportsColor = stdoutColor;
19830
+ chalk3.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
19831
+ chalk3.stderr.supportsColor = stderrColor;
19832
+ module2.exports = chalk3;
19833
19833
  }
19834
19834
  });
19835
19835
 
@@ -20478,22 +20478,22 @@ var require_tinycolor = __commonJS({
20478
20478
  };
20479
20479
  }
20480
20480
  function rgbToHex(r, g, b, allow3Char) {
20481
- var hex2 = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
20482
- if (allow3Char && hex2[0].charAt(0) == hex2[0].charAt(1) && hex2[1].charAt(0) == hex2[1].charAt(1) && hex2[2].charAt(0) == hex2[2].charAt(1)) {
20483
- return hex2[0].charAt(0) + hex2[1].charAt(0) + hex2[2].charAt(0);
20481
+ var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
20482
+ if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
20483
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
20484
20484
  }
20485
- return hex2.join("");
20485
+ return hex.join("");
20486
20486
  }
20487
20487
  function rgbaToHex(r, g, b, a, allow4Char) {
20488
- var hex2 = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))];
20489
- if (allow4Char && hex2[0].charAt(0) == hex2[0].charAt(1) && hex2[1].charAt(0) == hex2[1].charAt(1) && hex2[2].charAt(0) == hex2[2].charAt(1) && hex2[3].charAt(0) == hex2[3].charAt(1)) {
20490
- return hex2[0].charAt(0) + hex2[1].charAt(0) + hex2[2].charAt(0) + hex2[3].charAt(0);
20488
+ var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))];
20489
+ if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
20490
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
20491
20491
  }
20492
- return hex2.join("");
20492
+ return hex.join("");
20493
20493
  }
20494
20494
  function rgbaToArgbHex(r, g, b, a) {
20495
- var hex2 = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
20496
- return hex2.join("");
20495
+ var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
20496
+ return hex.join("");
20497
20497
  }
20498
20498
  tinycolor.equals = function(color1, color2) {
20499
20499
  if (!color1 || !color2)
@@ -28499,16 +28499,16 @@ var require_template2 = __commonJS({
28499
28499
  "node_modules/.pnpm/style-dictionary@3.9.1/node_modules/style-dictionary/lib/register/template.js"(exports, module2) {
28500
28500
  var fs = require("fs");
28501
28501
  var _template = require_template();
28502
- var chalk2 = require_source();
28502
+ var chalk3 = require_source();
28503
28503
  var GroupMessages = require_groupMessages();
28504
28504
  var REGISTER_TEMPLATE_DEPRECATION_WARNINGS = GroupMessages.GROUP.RegisterTemplateDeprecationWarnings;
28505
28505
  function registerTemplate(options) {
28506
28506
  if (typeof options.name !== "string")
28507
- throw new Error("Template name must be a string: " + chalk2.red(JSON.stringify(options.name)));
28507
+ throw new Error("Template name must be a string: " + chalk3.red(JSON.stringify(options.name)));
28508
28508
  if (typeof options.template !== "string")
28509
- throw new Error("Template path must be a string: " + chalk2.red(JSON.stringify(options.template)));
28509
+ throw new Error("Template path must be a string: " + chalk3.red(JSON.stringify(options.template)));
28510
28510
  if (!fs.existsSync(options.template))
28511
- throw new Error("Can't find template: " + chalk2.red(JSON.stringify(options.template)));
28511
+ throw new Error("Can't find template: " + chalk3.red(JSON.stringify(options.template)));
28512
28512
  GroupMessages.add(
28513
28513
  REGISTER_TEMPLATE_DEPRECATION_WARNINGS,
28514
28514
  `${options.name}`
@@ -29207,7 +29207,7 @@ var require_buildFile = __commonJS({
29207
29207
  "node_modules/.pnpm/style-dictionary@3.9.1/node_modules/style-dictionary/lib/buildFile.js"(exports, module2) {
29208
29208
  var path = require("path");
29209
29209
  var fs = require_lib();
29210
- var chalk2 = require_source();
29210
+ var chalk3 = require_source();
29211
29211
  var filterProperties = require_filterProperties();
29212
29212
  var GroupMessages = require_groupMessages();
29213
29213
  var createFormatArgs = require_createFormatArgs();
@@ -29237,7 +29237,7 @@ var require_buildFile = __commonJS({
29237
29237
  });
29238
29238
  if (filteredProperties.hasOwnProperty("properties") && Object.keys(filteredProperties.properties).length === 0 && filteredProperties.properties.constructor === Object) {
29239
29239
  let warnNoFile = `No properties for ${destination}. File not created.`;
29240
- console.log(chalk2.keyword("darkorange")(warnNoFile));
29240
+ console.log(chalk3.keyword("darkorange")(warnNoFile));
29241
29241
  return null;
29242
29242
  }
29243
29243
  var nameCollisionObj = {};
@@ -29253,13 +29253,13 @@ var require_buildFile = __commonJS({
29253
29253
  Object.keys(nameCollisionObj).forEach((propertyName) => {
29254
29254
  if (nameCollisionObj[propertyName].length > 1) {
29255
29255
  let collisions = nameCollisionObj[propertyName].map((properties) => {
29256
- let propertyPathText = chalk2.keyword("orangered")(properties.path.join("."));
29257
- let valueText = chalk2.keyword("darkorange")(properties.value);
29256
+ let propertyPathText = chalk3.keyword("orangered")(properties.path.join("."));
29257
+ let valueText = chalk3.keyword("darkorange")(properties.value);
29258
29258
  return propertyPathText + " " + valueText;
29259
29259
  }).join("\n ");
29260
29260
  GroupMessages.add(
29261
29261
  PROPERTY_NAME_COLLISION_WARNINGS,
29262
- `Output name ${chalk2.keyword("orangered").bold(propertyName)} was generated by:
29262
+ `Output name ${chalk3.keyword("orangered").bold(propertyName)} was generated by:
29263
29263
  ${collisions}`
29264
29264
  );
29265
29265
  }
@@ -29272,13 +29272,13 @@ var require_buildFile = __commonJS({
29272
29272
  }), platform, file));
29273
29273
  let filteredReferencesCount = GroupMessages.count(GroupMessages.GROUP.FilteredOutputReferences);
29274
29274
  if ((nested || propertyNamesCollisionCount === 0) && filteredReferencesCount === 0) {
29275
- console.log(chalk2.bold.green(`\u2714\uFE0E ${fullDestination}`));
29275
+ console.log(chalk3.bold.green(`\u2714\uFE0E ${fullDestination}`));
29276
29276
  } else {
29277
29277
  console.log(`\u26A0\uFE0F ${fullDestination}`);
29278
29278
  if (propertyNamesCollisionCount > 0) {
29279
29279
  let propertyNamesCollisionWarnings = GroupMessages.fetchMessages(PROPERTY_NAME_COLLISION_WARNINGS).join("\n ");
29280
- let title = `While building ${chalk2.keyword("orangered").bold(destination)}, token collisions were found; output may be unexpected.`;
29281
- let help = chalk2.keyword("orange")([
29280
+ let title = `While building ${chalk3.keyword("orangered").bold(destination)}, token collisions were found; output may be unexpected.`;
29281
+ let help = chalk3.keyword("orange")([
29282
29282
  "This many-to-one issue is usually caused by some combination of:",
29283
29283
  "* conflicting or similar paths/names in property definitions",
29284
29284
  "* platform transforms/transformGroups affecting names, especially when removing specificity",
@@ -29287,18 +29287,18 @@ var require_buildFile = __commonJS({
29287
29287
  let warn = `${title}
29288
29288
  ${propertyNamesCollisionWarnings}
29289
29289
  ${help}`;
29290
- console.log(chalk2.keyword("darkorange").bold(warn));
29290
+ console.log(chalk3.keyword("darkorange").bold(warn));
29291
29291
  }
29292
29292
  if (filteredReferencesCount > 0) {
29293
29293
  let filteredReferencesWarnings = GroupMessages.flush(GroupMessages.GROUP.FilteredOutputReferences).join("\n ");
29294
- let title = `While building ${chalk2.keyword("orangered").bold(destination)}, filtered out token references were found; output may be unexpected. Here are the references that are used but not defined in the file`;
29295
- let help = chalk2.keyword("orange")([
29294
+ let title = `While building ${chalk3.keyword("orangered").bold(destination)}, filtered out token references were found; output may be unexpected. Here are the references that are used but not defined in the file`;
29295
+ let help = chalk3.keyword("orange")([
29296
29296
  "This is caused when combining a filter and `outputReferences`."
29297
29297
  ].join("\n "));
29298
29298
  let warn = `${title}
29299
29299
  ${filteredReferencesWarnings}
29300
29300
  ${help}`;
29301
- console.log(chalk2.keyword("darkorange").bold(warn));
29301
+ console.log(chalk3.keyword("darkorange").bold(warn));
29302
29302
  }
29303
29303
  }
29304
29304
  }
@@ -29465,7 +29465,7 @@ var require_buildAllPlatforms = __commonJS({
29465
29465
  var require_cleanFile = __commonJS({
29466
29466
  "node_modules/.pnpm/style-dictionary@3.9.1/node_modules/style-dictionary/lib/cleanFile.js"(exports, module2) {
29467
29467
  var fs = require_lib();
29468
- var chalk2 = require_source();
29468
+ var chalk3 = require_source();
29469
29469
  function cleanFile(file = {}, platform = {}) {
29470
29470
  var { destination } = file;
29471
29471
  if (typeof destination !== "string")
@@ -29474,11 +29474,11 @@ var require_cleanFile = __commonJS({
29474
29474
  destination = platform.buildPath + destination;
29475
29475
  }
29476
29476
  if (!fs.existsSync(destination)) {
29477
- console.log(chalk2.bold.red("!") + " " + destination + ", does not exist");
29477
+ console.log(chalk3.bold.red("!") + " " + destination + ", does not exist");
29478
29478
  return;
29479
29479
  }
29480
29480
  fs.unlinkSync(destination);
29481
- console.log(chalk2.bold.red("-") + " " + destination);
29481
+ console.log(chalk3.bold.red("-") + " " + destination);
29482
29482
  }
29483
29483
  module2.exports = cleanFile;
29484
29484
  }
@@ -29509,7 +29509,7 @@ var require_cleanDir = __commonJS({
29509
29509
  "node_modules/.pnpm/style-dictionary@3.9.1/node_modules/style-dictionary/lib/cleanDir.js"(exports, module2) {
29510
29510
  var path = require("path");
29511
29511
  var fs = require_lib();
29512
- var chalk2 = require_source();
29512
+ var chalk3 = require_source();
29513
29513
  function cleanDir(file = {}, platform = {}) {
29514
29514
  var { destination } = file;
29515
29515
  if (typeof destination !== "string")
@@ -29521,7 +29521,7 @@ var require_cleanDir = __commonJS({
29521
29521
  while (dirname) {
29522
29522
  if (fs.existsSync(dirname)) {
29523
29523
  if (fs.readdirSync(dirname).length === 0) {
29524
- console.log(chalk2.bold.red("-") + " " + dirname);
29524
+ console.log(chalk3.bold.red("-") + " " + dirname);
29525
29525
  fs.rmdirSync(dirname);
29526
29526
  } else {
29527
29527
  break;
@@ -37595,7 +37595,7 @@ ${collisions}
37595
37595
  // node_modules/.pnpm/style-dictionary@3.9.1/node_modules/style-dictionary/index.js
37596
37596
  var require_style_dictionary = __commonJS({
37597
37597
  "node_modules/.pnpm/style-dictionary@3.9.1/node_modules/style-dictionary/index.js"(exports, module2) {
37598
- var chalk2 = require_source();
37598
+ var chalk3 = require_source();
37599
37599
  var GroupMessages = require_groupMessages();
37600
37600
  var TEMPLATE_DEPRECATION_WARNINGS = GroupMessages.GROUP.TemplateDeprecationWarnings;
37601
37601
  var REGISTER_TEMPLATE_DEPRECATION_WARNINGS = GroupMessages.GROUP.RegisterTemplateDeprecationWarnings;
@@ -37637,7 +37637,7 @@ var require_style_dictionary = __commonJS({
37637
37637
  process.on("exit", function() {
37638
37638
  if (GroupMessages.count(TEMPLATE_DEPRECATION_WARNINGS) > 0) {
37639
37639
  var template_warnings = GroupMessages.flush(TEMPLATE_DEPRECATION_WARNINGS).join("\n ");
37640
- console.log(chalk2.bold.yellow(`
37640
+ console.log(chalk3.bold.yellow(`
37641
37641
  \u26A0\uFE0F DEPRECATION WARNING \uFE0F\uFE0F\uFE0F\uFE0F\uFE0F\u26A0\uFE0F
37642
37642
  Templates are deprecated and will be removed, please update your config to use formats.
37643
37643
  This is an example of how to update your config.json:
@@ -37660,7 +37660,7 @@ Your current config uses the following templates:
37660
37660
  }
37661
37661
  if (GroupMessages.count(REGISTER_TEMPLATE_DEPRECATION_WARNINGS) > 0) {
37662
37662
  var register_template_warnings = GroupMessages.flush(REGISTER_TEMPLATE_DEPRECATION_WARNINGS).join("\n ");
37663
- console.log(chalk2.bold.yellow(`
37663
+ console.log(chalk3.bold.yellow(`
37664
37664
  \u26A0\uFE0F DEPRECATION WARNING \uFE0F\uFE0F\uFE0F\uFE0F\uFE0F\u26A0\uFE0F
37665
37665
  The registerTemplate method is deprecated and will be removed, please
37666
37666
  migrate to registerFormat. You can use any templating engine you would
@@ -37691,7 +37691,7 @@ custom templates:
37691
37691
  }
37692
37692
  if (GroupMessages.count(SASS_MAP_FORMAT_DEPRECATION_WARNINGS) > 0) {
37693
37693
  var sass_map_format_warnings = GroupMessages.flush(SASS_MAP_FORMAT_DEPRECATION_WARNINGS).join("\n ");
37694
- console.log(chalk2.bold.cyan(`
37694
+ console.log(chalk3.bold.cyan(`
37695
37695
  \u{1F514} NOTICE \u{1F514}
37696
37696
  The formats 'sass/map-***' have been renamed to 'scss/map-***', please update your config.
37697
37697
  In the future 'sass/map-***' formats may output actual Sass instead of SCSS, which may break your current configuration.
@@ -45010,7 +45010,7 @@ var require_acorn = __commonJS({
45010
45010
  this.groupNames = [];
45011
45011
  this.backReferenceNames = [];
45012
45012
  };
45013
- RegExpValidationState.prototype.reset = function reset(start, pattern, flags) {
45013
+ RegExpValidationState.prototype.reset = function reset2(start, pattern, flags) {
45014
45014
  var unicodeSets = flags.indexOf("v") !== -1;
45015
45015
  var unicode = flags.indexOf("u") !== -1;
45016
45016
  this.start = start | 0;
@@ -49631,7 +49631,7 @@ ${getTopLevelAwaitHint()}`);
49631
49631
  nodeReplServer = repl;
49632
49632
  context = repl.context;
49633
49633
  const resetEval = appendToEvalState(state, "");
49634
- function reset() {
49634
+ function reset2() {
49635
49635
  resetEval();
49636
49636
  runInContext("exports = module.exports", state.path, context);
49637
49637
  if (forceToBeModule) {
@@ -49643,8 +49643,8 @@ ${module_1.builtinModules.filter((name) => !name.startsWith("_") && !name.includ
49643
49643
  `;
49644
49644
  }
49645
49645
  }
49646
- reset();
49647
- repl.on("reset", reset);
49646
+ reset2();
49647
+ repl.on("reset", reset2);
49648
49648
  repl.defineCommand("type", {
49649
49649
  help: "Check the type of a TypeScript identifier",
49650
49650
  action: function(identifier) {
@@ -56614,14 +56614,14 @@ var require_templates2 = __commonJS({
56614
56614
  }
56615
56615
  return results;
56616
56616
  }
56617
- function buildStyle(chalk2, styles) {
56617
+ function buildStyle(chalk3, styles) {
56618
56618
  const enabled = {};
56619
56619
  for (const layer of styles) {
56620
56620
  for (const style of layer.styles) {
56621
56621
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
56622
56622
  }
56623
56623
  }
56624
- let current = chalk2;
56624
+ let current = chalk3;
56625
56625
  for (const styleName of Object.keys(enabled)) {
56626
56626
  if (Array.isArray(enabled[styleName])) {
56627
56627
  if (!(styleName in current)) {
@@ -56636,7 +56636,7 @@ var require_templates2 = __commonJS({
56636
56636
  }
56637
56637
  return current;
56638
56638
  }
56639
- module2.exports = (chalk2, tmp) => {
56639
+ module2.exports = (chalk3, tmp) => {
56640
56640
  const styles = [];
56641
56641
  const chunks = [];
56642
56642
  let chunk = [];
@@ -56646,13 +56646,13 @@ var require_templates2 = __commonJS({
56646
56646
  } else if (style) {
56647
56647
  const str = chunk.join("");
56648
56648
  chunk = [];
56649
- chunks.push(styles.length === 0 ? str : buildStyle(chalk2, styles)(str));
56649
+ chunks.push(styles.length === 0 ? str : buildStyle(chalk3, styles)(str));
56650
56650
  styles.push({ inverse, styles: parseStyle(style) });
56651
56651
  } else if (close) {
56652
56652
  if (styles.length === 0) {
56653
56653
  throw new Error("Found extraneous } in Chalk template literal");
56654
56654
  }
56655
- chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
56655
+ chunks.push(buildStyle(chalk3, styles)(chunk.join("")));
56656
56656
  chunk = [];
56657
56657
  styles.pop();
56658
56658
  } else {
@@ -56689,16 +56689,16 @@ var require_chalk = __commonJS({
56689
56689
  }
56690
56690
  function Chalk(options) {
56691
56691
  if (!this || !(this instanceof Chalk) || this.template) {
56692
- const chalk2 = {};
56693
- applyOptions(chalk2, options);
56694
- chalk2.template = function() {
56692
+ const chalk3 = {};
56693
+ applyOptions(chalk3, options);
56694
+ chalk3.template = function() {
56695
56695
  const args = [].slice.call(arguments);
56696
- return chalkTag.apply(null, [chalk2.template].concat(args));
56696
+ return chalkTag.apply(null, [chalk3.template].concat(args));
56697
56697
  };
56698
- Object.setPrototypeOf(chalk2, Chalk.prototype);
56699
- Object.setPrototypeOf(chalk2.template, chalk2);
56700
- chalk2.template.constructor = Chalk;
56701
- return chalk2.template;
56698
+ Object.setPrototypeOf(chalk3, Chalk.prototype);
56699
+ Object.setPrototypeOf(chalk3.template, chalk3);
56700
+ chalk3.template.constructor = Chalk;
56701
+ return chalk3.template;
56702
56702
  }
56703
56703
  applyOptions(this, options);
56704
56704
  }
@@ -56817,7 +56817,7 @@ var require_chalk = __commonJS({
56817
56817
  ansiStyles.dim.open = originalDim;
56818
56818
  return str;
56819
56819
  }
56820
- function chalkTag(chalk2, strings) {
56820
+ function chalkTag(chalk3, strings) {
56821
56821
  if (!Array.isArray(strings)) {
56822
56822
  return [].slice.call(arguments, 1).join(" ");
56823
56823
  }
@@ -56827,7 +56827,7 @@ var require_chalk = __commonJS({
56827
56827
  parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
56828
56828
  parts.push(String(strings.raw[i]));
56829
56829
  }
56830
- return template(chalk2, parts.join(""));
56830
+ return template(chalk3, parts.join(""));
56831
56831
  }
56832
56832
  Object.defineProperties(Chalk.prototype, styles);
56833
56833
  module2.exports = Chalk();
@@ -56873,17 +56873,17 @@ var require_lib7 = __commonJS({
56873
56873
  return n.default = e, t && t.set(e, n), n;
56874
56874
  }
56875
56875
  var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
56876
- function getDefs(chalk2) {
56876
+ function getDefs(chalk3) {
56877
56877
  return {
56878
- keyword: chalk2.cyan,
56879
- capitalized: chalk2.yellow,
56880
- jsxIdentifier: chalk2.yellow,
56881
- punctuator: chalk2.yellow,
56882
- number: chalk2.magenta,
56883
- string: chalk2.green,
56884
- regex: chalk2.magenta,
56885
- comment: chalk2.grey,
56886
- invalid: chalk2.white.bgRed.bold
56878
+ keyword: chalk3.cyan,
56879
+ capitalized: chalk3.yellow,
56880
+ jsxIdentifier: chalk3.yellow,
56881
+ punctuator: chalk3.yellow,
56882
+ number: chalk3.magenta,
56883
+ string: chalk3.green,
56884
+ regex: chalk3.magenta,
56885
+ comment: chalk3.grey,
56886
+ invalid: chalk3.white.bgRed.bold
56887
56887
  };
56888
56888
  }
56889
56889
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -57014,11 +57014,11 @@ var require_lib8 = __commonJS({
57014
57014
  return _chalk.default;
57015
57015
  }
57016
57016
  var deprecationWarningShown = false;
57017
- function getDefs(chalk2) {
57017
+ function getDefs(chalk3) {
57018
57018
  return {
57019
- gutter: chalk2.grey,
57020
- marker: chalk2.red.bold,
57021
- message: chalk2.red.bold
57019
+ gutter: chalk3.grey,
57020
+ marker: chalk3.red.bold,
57021
+ message: chalk3.red.bold
57022
57022
  };
57023
57023
  }
57024
57024
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -57080,8 +57080,8 @@ var require_lib8 = __commonJS({
57080
57080
  }
57081
57081
  function codeFrameColumns(rawLines, loc, opts = {}) {
57082
57082
  const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
57083
- const chalk2 = getChalk(opts.forceColor);
57084
- const defs = getDefs(chalk2);
57083
+ const chalk3 = getChalk(opts.forceColor);
57084
+ const defs = getDefs(chalk3);
57085
57085
  const maybeHighlight = (chalkFn, string) => {
57086
57086
  return highlighted ? chalkFn(string) : string;
57087
57087
  };
@@ -57120,7 +57120,7 @@ var require_lib8 = __commonJS({
57120
57120
  ${frame}`;
57121
57121
  }
57122
57122
  if (highlighted) {
57123
- return chalk2.reset(frame);
57123
+ return chalk3.reset(frame);
57124
57124
  } else {
57125
57125
  return frame;
57126
57126
  }
@@ -61444,8 +61444,10 @@ var LogLevel = {
61444
61444
  ERROR: 20,
61445
61445
  WARN: 30,
61446
61446
  INFO: 40,
61447
+ SUCCESS: 45,
61447
61448
  DEBUG: 60,
61448
- TRACE: 70
61449
+ TRACE: 70,
61450
+ ALL: 100
61449
61451
  };
61450
61452
  var LogLevelLabel = {
61451
61453
  SILENT: "silent",
@@ -61454,7 +61456,8 @@ var LogLevelLabel = {
61454
61456
  WARN: "warn",
61455
61457
  INFO: "info",
61456
61458
  DEBUG: "debug",
61457
- TRACE: "trace"
61459
+ TRACE: "trace",
61460
+ ALL: "all"
61458
61461
  };
61459
61462
 
61460
61463
  // packages/config-tools/src/utilities/find-up.ts
@@ -61463,15 +61466,15 @@ var import_path = require("path");
61463
61466
  var MAX_PATH_SEARCH_DEPTH = 30;
61464
61467
  var depth = 0;
61465
61468
  function findFolderUp(startPath, endFileNames) {
61466
- startPath = startPath ?? process.cwd();
61467
- if (endFileNames.some((endFileName) => (0, import_fs.existsSync)((0, import_path.join)(startPath, endFileName)))) {
61468
- return startPath;
61469
- } else if (startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
61470
- const parent = (0, import_path.join)(startPath, "..");
61469
+ const _startPath = startPath ?? process.cwd();
61470
+ if (endFileNames.some((endFileName) => (0, import_fs.existsSync)((0, import_path.join)(_startPath, endFileName)))) {
61471
+ return _startPath;
61472
+ }
61473
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
61474
+ const parent = (0, import_path.join)(_startPath, "..");
61471
61475
  return findFolderUp(parent, endFileNames);
61472
- } else {
61473
- return void 0;
61474
61476
  }
61477
+ return void 0;
61475
61478
  }
61476
61479
 
61477
61480
  // packages/config-tools/src/utilities/find-workspace-root.ts
@@ -65128,17 +65131,13 @@ var StormConfigSchema = objectType({
65128
65131
  license: stringType().trim().default("Apache License 2.0").describe("The root directory of the package"),
65129
65132
  homepage: stringType().trim().url().default("https://stormsoftware.org").describe("The homepage of the workspace"),
65130
65133
  branch: stringType().trim().default("main").describe("The branch of the workspace"),
65131
- preMajor: booleanType().default(false).describe(
65132
- "An indicator specifying if the package is still in it's pre-major version"
65133
- ),
65134
+ preMajor: booleanType().default(false).describe("An indicator specifying if the package is still in it's pre-major version"),
65134
65135
  owner: stringType().trim().default("@storm-software/development").describe("The owner of the package"),
65135
65136
  worker: stringType().trim().default("stormie-bot").describe(
65136
65137
  "The worker of the package (this is the bot that will be used to perform various tasks)"
65137
65138
  ),
65138
65139
  env: enumType(["development", "staging", "production"]).default("production").describe("The current runtime environment of the package"),
65139
- ci: booleanType().default(true).describe(
65140
- "An indicator specifying if the current environment is a CI environment"
65141
- ),
65140
+ ci: booleanType().default(true).describe("An indicator specifying if the current environment is a CI environment"),
65142
65141
  workspaceRoot: stringType().trim().optional().describe("The root directory of the workspace"),
65143
65142
  packageDirectory: stringType().trim().optional().describe("The root directory of the package"),
65144
65143
  buildDirectory: stringType().trim().default("dist").describe("The build directory for the workspace"),
@@ -65149,7 +65148,7 @@ var StormConfigSchema = objectType({
65149
65148
  packageManager: enumType(["npm", "yarn", "pnpm", "bun"]).default("npm").describe("The package manager used by the repository"),
65150
65149
  timezone: stringType().trim().default("America/New_York").describe("The default timezone of the workspace"),
65151
65150
  locale: stringType().trim().default("en-US").describe("The default locale of the workspace"),
65152
- logLevel: enumType(["silent", "fatal", "error", "warn", "info", "debug", "trace"]).default("debug").describe(
65151
+ logLevel: enumType(["silent", "fatal", "error", "warn", "info", "debug", "trace", "all"]).default("debug").describe(
65153
65152
  "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`)."
65154
65153
  ),
65155
65154
  configFile: stringType().trim().nullable().default(null).describe(
@@ -65207,11 +65206,21 @@ var getDefaultConfig = (config = {}, root) => {
65207
65206
  });
65208
65207
  if (file) {
65209
65208
  const packageJson = JSON.parse(file);
65210
- packageJson.name && (name = packageJson.name);
65211
- packageJson.namespace && (namespace = packageJson.namespace);
65212
- packageJson.repository?.url && (repository = packageJson.repository?.url);
65213
- packageJson.license && (license = packageJson.license);
65214
- packageJson.homepage && (homepage = packageJson.homepage);
65209
+ if (packageJson.name) {
65210
+ name = packageJson.name;
65211
+ }
65212
+ if (packageJson.namespace) {
65213
+ namespace = packageJson.namespace;
65214
+ }
65215
+ if (packageJson.repository?.url) {
65216
+ repository = packageJson.repository?.url;
65217
+ }
65218
+ if (packageJson.license) {
65219
+ license = packageJson.license;
65220
+ }
65221
+ if (packageJson.homepage) {
65222
+ homepage = packageJson.homepage;
65223
+ }
65215
65224
  }
65216
65225
  }
65217
65226
  return StormConfigSchema.parse({
@@ -65233,6 +65242,8 @@ var getDefaultConfig = (config = {}, root) => {
65233
65242
  // packages/config-tools/src/utilities/get-log-level.ts
65234
65243
  var getLogLevel = (label) => {
65235
65244
  switch (label) {
65245
+ case "all":
65246
+ return LogLevel.ALL;
65236
65247
  case "trace":
65237
65248
  return LogLevel.TRACE;
65238
65249
  case "debug":
@@ -65252,38 +65263,129 @@ var getLogLevel = (label) => {
65252
65263
  }
65253
65264
  };
65254
65265
  var getLogLevelLabel = (logLevel) => {
65266
+ if (logLevel >= LogLevel.ALL) {
65267
+ return LogLevelLabel.ALL;
65268
+ }
65255
65269
  if (logLevel >= LogLevel.TRACE) {
65256
65270
  return LogLevelLabel.TRACE;
65257
- } else if (logLevel >= LogLevel.DEBUG) {
65271
+ }
65272
+ if (logLevel >= LogLevel.DEBUG) {
65258
65273
  return LogLevelLabel.DEBUG;
65259
- } else if (logLevel >= LogLevel.INFO) {
65274
+ }
65275
+ if (logLevel >= LogLevel.INFO) {
65260
65276
  return LogLevelLabel.INFO;
65261
- } else if (logLevel >= LogLevel.WARN) {
65277
+ }
65278
+ if (logLevel >= LogLevel.WARN) {
65262
65279
  return LogLevelLabel.WARN;
65263
- } else if (logLevel >= LogLevel.ERROR) {
65280
+ }
65281
+ if (logLevel >= LogLevel.ERROR) {
65264
65282
  return LogLevelLabel.ERROR;
65265
- } else if (logLevel >= LogLevel.FATAL) {
65283
+ }
65284
+ if (logLevel >= LogLevel.FATAL) {
65266
65285
  return LogLevelLabel.FATAL;
65267
- } else if (logLevel <= LogLevel.SILENT) {
65286
+ }
65287
+ if (logLevel <= LogLevel.SILENT) {
65268
65288
  return LogLevelLabel.SILENT;
65269
- } else {
65270
- return LogLevelLabel.INFO;
65271
65289
  }
65290
+ return LogLevelLabel.INFO;
65291
+ };
65292
+
65293
+ // packages/config-tools/src/utilities/logger.ts
65294
+ var chalk = __toESM(require_source(), 1);
65295
+ var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
65296
+ 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)) {
65297
+ return (message) => {
65298
+ };
65299
+ }
65300
+ if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
65301
+ return (message) => {
65302
+ console.error(
65303
+ ` ${chalk.bold.bgHex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6").inverse("\n\n \u{1F480} Fatal ")} ${chalk.reset.hex(
65304
+ config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
65305
+ )(message)}
65306
+ `
65307
+ );
65308
+ };
65309
+ }
65310
+ if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
65311
+ return (message) => {
65312
+ console.error(
65313
+ ` ${chalk.bold.bgHex(config?.colors?.error ? config.colors.error : "#7d1a1a").inverse("\n\n \u{1F6D1} Error ")} ${chalk.reset.hex(
65314
+ config?.colors?.error ? config.colors.error : "#7d1a1a"
65315
+ )(message)}
65316
+ `
65317
+ );
65318
+ };
65319
+ }
65320
+ if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
65321
+ return (message) => {
65322
+ console.warn(
65323
+ ` ${chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").inverse("\n\n \u26A0\uFE0F Warn ")} ${chalk.reset.hex(
65324
+ config?.colors?.warning ? config.colors.warning : "#fcc419"
65325
+ )(message)}
65326
+ `
65327
+ );
65328
+ };
65329
+ }
65330
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
65331
+ return (message) => {
65332
+ console.info(
65333
+ ` ${chalk.bold.bgHex(config?.colors?.info ? config.colors.info : "#0ea5e9").inverse("\n\n \u{1F4EC} Info ")} ${chalk.reset.hex(
65334
+ config?.colors?.info ? config.colors.info : "#0ea5e9"
65335
+ )(message)}
65336
+ `
65337
+ );
65338
+ };
65339
+ }
65340
+ if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
65341
+ return (message) => {
65342
+ console.info(
65343
+ ` ${chalk.bold.bgHex(config?.colors?.success ? config.colors.success : "#087f5b").inverse("\n\n \u{1F389} Success ")} ${chalk.reset.hex(
65344
+ config?.colors?.success ? config.colors.success : "#087f5b"
65345
+ )(message)}
65346
+ `
65347
+ );
65348
+ };
65349
+ }
65350
+ if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
65351
+ return (message) => {
65352
+ console.debug(
65353
+ ` ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").inverse("\n\n \u{1F9EA} Debug ")} ${chalk.reset.hex(
65354
+ config?.colors?.primary ? config.colors.primary : "#1fb2a6"
65355
+ )(message)}
65356
+ `
65357
+ );
65358
+ };
65359
+ }
65360
+ return (message) => {
65361
+ console.log(
65362
+ ` ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").inverse("\n\n \u{1F4E2} System ")} ${chalk.bold.hex(
65363
+ config?.colors?.primary ? config.colors.primary : "#1fb2a6"
65364
+ )(message)}
65365
+ `
65366
+ );
65367
+ };
65272
65368
  };
65369
+ var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
65370
+ var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
65371
+ var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
65372
+ var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
65373
+ var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
65374
+ var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
65273
65375
 
65274
65376
  // packages/config-tools/src/env/get-env.ts
65275
65377
  var getExtensionEnv = (extensionName) => {
65276
65378
  const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
65277
65379
  return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
65278
- const name = key.replace(prefix, "").split("_").map(
65279
- (i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
65280
- ).join("");
65281
- name && (ret[name] = process.env[key]);
65380
+ const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
65381
+ if (name) {
65382
+ ret[name] = process.env[key];
65383
+ }
65282
65384
  return ret;
65283
65385
  }, {});
65284
65386
  };
65285
65387
  var getConfigEnv = () => {
65286
- const prefix = `STORM_`;
65388
+ const prefix = "STORM_";
65287
65389
  let config = {
65288
65390
  name: process.env[`${prefix}NAME`],
65289
65391
  namespace: process.env[`${prefix}NAMESPACE`],
@@ -65302,9 +65404,7 @@ var getConfigEnv = () => {
65302
65404
  runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
65303
65405
  runtimeDirectory: process.env[`${prefix}RUNTIME_DIRECTORY`],
65304
65406
  env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
65305
- ci: Boolean(
65306
- process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION
65307
- ),
65407
+ ci: Boolean(process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION),
65308
65408
  colors: {
65309
65409
  primary: process.env[`${prefix}COLOR_PRIMARY`],
65310
65410
  background: process.env[`${prefix}COLOR_BACKGROUND`],
@@ -65317,9 +65417,7 @@ var getConfigEnv = () => {
65317
65417
  repository: process.env[`${prefix}REPOSITORY`],
65318
65418
  branch: process.env[`${prefix}BRANCH`],
65319
65419
  preMajor: Boolean(process.env[`${prefix}PRE_MAJOR`]),
65320
- logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? Number.isSafeInteger(
65321
- Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
65322
- ) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : LogLevelLabel.INFO,
65420
+ 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,
65323
65421
  extensions: {}
65324
65422
  };
65325
65423
  const serializedConfig = process.env[`${prefix}CONFIG`];
@@ -65334,26 +65432,27 @@ var getConfigEnv = () => {
65334
65432
  }
65335
65433
  const extensionPrefix = `${prefix}EXTENSION_`;
65336
65434
  return Object.keys(process.env).filter((key) => key.startsWith(extensionPrefix)).reduce((ret, key) => {
65337
- const extensionName = key.substring(prefix.length, key.indexOf("_", prefix.length)).split("_").map(
65338
- (i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
65339
- ).join("");
65340
- extensionName && (ret.extensions[extensionName] = getExtensionEnv(extensionName));
65435
+ 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("");
65436
+ if (extensionName) {
65437
+ ret.extensions[extensionName] = getExtensionEnv(extensionName);
65438
+ }
65341
65439
  return ret;
65342
65440
  }, config);
65343
65441
  };
65344
65442
 
65345
65443
  // packages/config-tools/src/env/set-env.ts
65346
65444
  var setExtensionEnv = (extensionName, extension) => {
65347
- Object.keys(extension ?? {}).forEach((key) => {
65445
+ for (const key of Object.keys(extension ?? {})) {
65348
65446
  if (extension[key]) {
65349
- let result = key?.replace(
65447
+ const result = key?.replace(
65350
65448
  /([A-Z])+/g,
65351
65449
  (input) => input ? input[0].toUpperCase() + input.slice(1) : ""
65352
65450
  ).split(/(?=[A-Z])|[\.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
65353
65451
  let extensionKey;
65354
65452
  if (result.length === 0) {
65355
65453
  return;
65356
- } else if (result.length === 1) {
65454
+ }
65455
+ if (result.length === 1) {
65357
65456
  extensionKey = result[0].toUpperCase();
65358
65457
  } else {
65359
65458
  extensionKey = result.reduce((ret, part) => {
@@ -65362,63 +65461,121 @@ var setExtensionEnv = (extensionName, extension) => {
65362
65461
  }
65363
65462
  process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
65364
65463
  }
65365
- });
65464
+ }
65366
65465
  };
65367
65466
  var setConfigEnv = (config) => {
65368
- const prefix = `STORM_`;
65369
- config.name && (process.env[`${prefix}NAME`] = config.name);
65370
- config.namespace && (process.env[`${prefix}NAMESPACE`] = config.namespace);
65371
- config.owner && (process.env[`${prefix}OWNER`] = config.owner);
65372
- config.worker && (process.env[`${prefix}WORKER`] = config.worker);
65373
- config.organization && (process.env[`${prefix}ORGANIZATION`] = config.organization);
65374
- config.packageManager && (process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager);
65375
- config.license && (process.env[`${prefix}LICENSE`] = config.license);
65376
- config.homepage && (process.env[`${prefix}HOMEPAGE`] = config.homepage);
65377
- config.timezone && (process.env[`${prefix}TIMEZONE`] = config.timezone);
65378
- config.timezone && (process.env.TZ = config.timezone);
65379
- config.timezone && (process.env.DEFAULT_TIMEZONE = config.timezone);
65380
- config.locale && (process.env[`${prefix}LOCALE`] = config.locale);
65381
- config.locale && (process.env.LOCALE = config.locale);
65382
- config.locale && (process.env.DEFAULT_LOCALE = config.locale);
65383
- config.locale && (process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8");
65384
- config.configFile && (process.env[`${prefix}CONFIG_FILE`] = config.configFile);
65385
- config.workspaceRoot && (process.env[`${prefix}WORKSPACE_ROOT`] = config.workspaceRoot);
65386
- config.workspaceRoot && (process.env.NX_WORKSPACE_ROOT = config.workspaceRoot);
65387
- config.workspaceRoot && (process.env.NX_WORKSPACE_ROOT_PATH = config.workspaceRoot);
65388
- config.packageDirectory && (process.env[`${prefix}PACKAGE_DIRECTORY`] = config.packageDirectory);
65389
- config.buildDirectory && (process.env[`${prefix}BUILD_DIRECTORY`] = config.buildDirectory);
65390
- config.runtimeVersion && (process.env[`${prefix}RUNTIME_VERSION`] = config.runtimeVersion);
65391
- config.runtimeDirectory && (process.env[`${prefix}RUNTIME_DIRECTORY`] = config.runtimeDirectory);
65392
- config.env && (process.env[`${prefix}ENV`] = config.env);
65393
- config.env && (process.env.NODE_ENV = config.env);
65394
- config.env && (process.env.ENVIRONMENT = config.env);
65395
- config.ci && (process.env[`${prefix}CI`] = String(config.ci));
65396
- config.ci && (process.env.CI = String(config.ci));
65397
- config.ci && (process.env.CONTINUOUS_INTEGRATION = String(config.ci));
65398
- config.colors.primary && (process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary);
65399
- config.colors.background && (process.env[`${prefix}COLOR_BACKGROUND`] = config.colors.background);
65400
- config.colors.success && (process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success);
65401
- config.colors.info && (process.env[`${prefix}COLOR_INFO`] = config.colors.info);
65402
- config.colors.warning && (process.env[`${prefix}COLOR_WARNING`] = config.colors.warning);
65403
- config.colors.error && (process.env[`${prefix}COLOR_ERROR`] = config.colors.error);
65404
- config.colors.fatal && (process.env[`${prefix}COLOR_FATAL`] = config.colors.fatal);
65405
- config.repository && (process.env[`${prefix}REPOSITORY`] = config.repository);
65406
- config.branch && (process.env[`${prefix}BRANCH`] = config.branch);
65407
- config.preMajor && (process.env[`${prefix}PRE_MAJOR`] = String(config.preMajor));
65408
- config.logLevel && (process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel));
65409
- config.logLevel && (process.env.LOG_LEVEL = String(config.logLevel));
65410
- config.logLevel && (process.env.NX_VERBOSE_LOGGING = String(
65411
- getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
65412
- ));
65413
- config.logLevel && (process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none");
65414
- config && (process.env[`${prefix}CONFIG`] = JSON.stringify(config));
65415
- Object.keys(config.extensions ?? {}).forEach((key) => {
65467
+ const prefix = "STORM_";
65468
+ if (config.name) {
65469
+ process.env[`${prefix}NAME`] = config.name;
65470
+ }
65471
+ if (config.namespace) {
65472
+ process.env[`${prefix}NAMESPACE`] = config.namespace;
65473
+ }
65474
+ if (config.owner) {
65475
+ process.env[`${prefix}OWNER`] = config.owner;
65476
+ }
65477
+ if (config.worker) {
65478
+ process.env[`${prefix}WORKER`] = config.worker;
65479
+ }
65480
+ if (config.organization) {
65481
+ process.env[`${prefix}ORGANIZATION`] = config.organization;
65482
+ }
65483
+ if (config.packageManager) {
65484
+ process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager;
65485
+ }
65486
+ if (config.license) {
65487
+ process.env[`${prefix}LICENSE`] = config.license;
65488
+ }
65489
+ if (config.homepage) {
65490
+ process.env[`${prefix}HOMEPAGE`] = config.homepage;
65491
+ }
65492
+ if (config.timezone) {
65493
+ process.env[`${prefix}TIMEZONE`] = config.timezone;
65494
+ process.env.TZ = config.timezone;
65495
+ process.env.DEFAULT_TIMEZONE = config.timezone;
65496
+ }
65497
+ if (config.locale) {
65498
+ process.env[`${prefix}LOCALE`] = config.locale;
65499
+ process.env.LOCALE = config.locale;
65500
+ process.env.DEFAULT_LOCALE = config.locale;
65501
+ process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
65502
+ }
65503
+ if (config.configFile) {
65504
+ process.env[`${prefix}CONFIG_FILE`] = config.configFile;
65505
+ }
65506
+ if (config.workspaceRoot) {
65507
+ process.env[`${prefix}WORKSPACE_ROOT`] = config.workspaceRoot;
65508
+ process.env.NX_WORKSPACE_ROOT = config.workspaceRoot;
65509
+ process.env.NX_WORKSPACE_ROOT_PATH = config.workspaceRoot;
65510
+ }
65511
+ if (config.packageDirectory) {
65512
+ process.env[`${prefix}PACKAGE_DIRECTORY`] = config.packageDirectory;
65513
+ }
65514
+ if (config.buildDirectory) {
65515
+ process.env[`${prefix}BUILD_DIRECTORY`] = config.buildDirectory;
65516
+ }
65517
+ if (config.runtimeVersion) {
65518
+ process.env[`${prefix}RUNTIME_VERSION`] = config.runtimeVersion;
65519
+ }
65520
+ if (config.runtimeDirectory) {
65521
+ process.env[`${prefix}RUNTIME_DIRECTORY`] = config.runtimeDirectory;
65522
+ }
65523
+ if (config.env) {
65524
+ process.env[`${prefix}ENV`] = config.env;
65525
+ process.env.NODE_ENV = config.env;
65526
+ process.env.ENVIRONMENT = config.env;
65527
+ }
65528
+ if (config.ci) {
65529
+ process.env[`${prefix}CI`] = String(config.ci);
65530
+ process.env.CI = String(config.ci);
65531
+ process.env.CONTINUOUS_INTEGRATION = String(config.ci);
65532
+ }
65533
+ if (config.colors.primary) {
65534
+ process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary;
65535
+ }
65536
+ if (config.colors.background) {
65537
+ process.env[`${prefix}COLOR_BACKGROUND`] = config.colors.background;
65538
+ }
65539
+ if (config.colors.success) {
65540
+ process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success;
65541
+ }
65542
+ if (config.colors.info) {
65543
+ process.env[`${prefix}COLOR_INFO`] = config.colors.info;
65544
+ }
65545
+ if (config.colors.warning) {
65546
+ process.env[`${prefix}COLOR_WARNING`] = config.colors.warning;
65547
+ }
65548
+ if (config.colors.error) {
65549
+ process.env[`${prefix}COLOR_ERROR`] = config.colors.error;
65550
+ }
65551
+ if (config.colors.fatal) {
65552
+ process.env[`${prefix}COLOR_FATAL`] = config.colors.fatal;
65553
+ }
65554
+ if (config.repository) {
65555
+ process.env[`${prefix}REPOSITORY`] = config.repository;
65556
+ }
65557
+ if (config.branch) {
65558
+ process.env[`${prefix}BRANCH`] = config.branch;
65559
+ }
65560
+ if (config.preMajor) {
65561
+ process.env[`${prefix}PRE_MAJOR`] = String(config.preMajor);
65562
+ }
65563
+ if (config.logLevel) {
65564
+ process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
65565
+ process.env.LOG_LEVEL = String(config.logLevel);
65566
+ process.env.NX_VERBOSE_LOGGING = String(
65567
+ getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
65568
+ );
65569
+ process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
65570
+ }
65571
+ process.env[`${prefix}CONFIG`] = JSON.stringify(config);
65572
+ for (const key of Object.keys(config.extensions ?? {})) {
65416
65573
  config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
65417
- });
65574
+ }
65418
65575
  };
65419
65576
 
65420
65577
  // packages/workspace-tools/src/base/base-executor.ts
65421
- var chalk = __toESM(require_source());
65578
+ var chalk2 = __toESM(require_source());
65422
65579
 
65423
65580
  // packages/workspace-tools/src/utils/get-workspace-root.ts
65424
65581
  var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
@@ -65506,16 +65663,13 @@ var applyWorkspaceTokens = (options, config, tokenizerFn) => {
65506
65663
  };
65507
65664
 
65508
65665
  // packages/workspace-tools/src/base/base-executor.ts
65509
- var withRunExecutor = (name, executorFn, executorOptions = {
65510
- skipReadingConfig: false,
65511
- hooks: {}
65512
- }) => async (_options, context) => {
65666
+ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
65513
65667
  const startTime = Date.now();
65514
65668
  let options = _options;
65669
+ let config;
65515
65670
  try {
65516
- console.info(chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} executor...
65517
-
65518
- `));
65671
+ writeInfo(config, `\u26A1 Running the ${name} executor...
65672
+ `);
65519
65673
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
65520
65674
  throw new Error(
65521
65675
  "The Build process failed because the context is not valid. Please run this command from a workspace."
@@ -65525,26 +65679,37 @@ var withRunExecutor = (name, executorFn, executorOptions = {
65525
65679
  const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
65526
65680
  const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot;
65527
65681
  const projectName = context.projectsConfigurations.projects[context.projectName].name;
65528
- let config;
65529
65682
  if (!executorOptions.skipReadingConfig) {
65683
+ writeDebug(
65684
+ config,
65685
+ `Loading the Storm Config from environment variables and storm.config.js file...
65686
+ - workspaceRoot: ${workspaceRoot}
65687
+ - projectRoot: ${projectRoot}
65688
+ - sourceRoot: ${sourceRoot}
65689
+ - projectName: ${projectName}
65690
+ `
65691
+ );
65530
65692
  config = getDefaultConfig({
65531
65693
  ...await getConfigFile(),
65532
65694
  ...getConfigEnv()
65533
65695
  });
65534
65696
  setConfigEnv(config);
65535
- getLogLevel(config.logLevel) >= LogLevel.DEBUG && console.debug(
65536
- chalk.dim(
65537
- `Loaded Storm config into env:
65538
- ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\n")}`
65539
- )
65697
+ writeTrace(
65698
+ config,
65699
+ `Loaded Storm config into env:
65700
+ ${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`
65540
65701
  );
65541
65702
  }
65542
65703
  if (executorOptions?.hooks?.applyDefaultOptions) {
65543
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the applyDefaultOptions hook..."));
65704
+ writeDebug(config, "Running the applyDefaultOptions hook...");
65544
65705
  options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
65545
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the applyDefaultOptions hook..."));
65706
+ writeDebug(config, "Completed the applyDefaultOptions hook");
65546
65707
  }
65547
- getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(chalk.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Executor schema options: \n"), options);
65708
+ writeTrace(
65709
+ config,
65710
+ `Executor schema options \u2699\uFE0F
65711
+ ${Object.keys(options).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`
65712
+ );
65548
65713
  const tokenized = applyWorkspaceTokens(
65549
65714
  options,
65550
65715
  {
@@ -65559,9 +65724,9 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
65559
65724
  applyWorkspaceExecutorTokens
65560
65725
  );
65561
65726
  if (executorOptions?.hooks?.preProcess) {
65562
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the preProcess hook..."));
65727
+ writeDebug(config, "Running the preProcess hook...");
65563
65728
  await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
65564
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the preProcess hook..."));
65729
+ writeDebug(config, "Completed the preProcess hook");
65565
65730
  }
65566
65731
  const result = await Promise.resolve(executorFn(tokenized, context, config));
65567
65732
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
@@ -65570,31 +65735,32 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
65570
65735
  });
65571
65736
  }
65572
65737
  if (executorOptions?.hooks?.postProcess) {
65573
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the postProcess hook..."));
65738
+ writeDebug(config, "Running the postProcess hook...");
65574
65739
  await Promise.resolve(executorOptions.hooks.postProcess(config));
65575
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the postProcess hook..."));
65740
+ writeDebug(config, "Completed the postProcess hook");
65576
65741
  }
65577
- console.info(
65578
- chalk.bold.hex("#087f5b")(`
65579
-
65580
- \u{1F389} Successfully completed running the ${name} executor!
65581
-
65582
- `)
65583
- );
65742
+ writeSuccess(config, `Completed running the ${name} task executor!
65743
+ `);
65584
65744
  return {
65585
65745
  success: true
65586
65746
  };
65587
65747
  } catch (error) {
65588
- console.error(
65589
- chalk.bold.hex("#7d1a1a")("\u274C An error occurred while running the executor\n\n"),
65590
- error
65748
+ writeFatal(
65749
+ config,
65750
+ "A fatal error occurred while running the executor - the process was forced to terminate"
65751
+ );
65752
+ writeError(
65753
+ config,
65754
+ `An exception was thrown in the executor's process
65755
+ - Details: ${error.message}
65756
+ - Stacktrace: ${error.stack}`
65591
65757
  );
65592
65758
  return {
65593
65759
  success: false
65594
65760
  };
65595
65761
  } finally {
65596
65762
  console.info(
65597
- chalk.dim(
65763
+ chalk2.dim(
65598
65764
  `\u23F1\uFE0F The${name ? ` ${name}` : ""} generator took ${Date.now() - startTime}ms to complete`
65599
65765
  )
65600
65766
  );