@storm-software/workspace-tools 1.42.4 → 1.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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);
@@ -20174,14 +20174,14 @@ var require_templates = __commonJS({
20174
20174
  }
20175
20175
  return results;
20176
20176
  }
20177
- function buildStyle(chalk2, styles) {
20177
+ function buildStyle(chalk3, styles) {
20178
20178
  const enabled = {};
20179
20179
  for (const layer of styles) {
20180
20180
  for (const style of layer.styles) {
20181
20181
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
20182
20182
  }
20183
20183
  }
20184
- let current = chalk2;
20184
+ let current = chalk3;
20185
20185
  for (const styleName of Object.keys(enabled)) {
20186
20186
  if (Array.isArray(enabled[styleName])) {
20187
20187
  if (!(styleName in current)) {
@@ -20196,7 +20196,7 @@ var require_templates = __commonJS({
20196
20196
  }
20197
20197
  return current;
20198
20198
  }
20199
- module2.exports = (chalk2, tmp) => {
20199
+ module2.exports = (chalk3, tmp) => {
20200
20200
  const styles = [];
20201
20201
  const chunks = [];
20202
20202
  let chunk = [];
@@ -20206,13 +20206,13 @@ var require_templates = __commonJS({
20206
20206
  } else if (style) {
20207
20207
  const str = chunk.join("");
20208
20208
  chunk = [];
20209
- chunks.push(styles.length === 0 ? str : buildStyle(chalk2, styles)(str));
20209
+ chunks.push(styles.length === 0 ? str : buildStyle(chalk3, styles)(str));
20210
20210
  styles.push({ inverse, styles: parseStyle(style) });
20211
20211
  } else if (close) {
20212
20212
  if (styles.length === 0) {
20213
20213
  throw new Error("Found extraneous } in Chalk template literal");
20214
20214
  }
20215
- chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
20215
+ chunks.push(buildStyle(chalk3, styles)(chunk.join("")));
20216
20216
  chunk = [];
20217
20217
  styles.pop();
20218
20218
  } else {
@@ -20249,16 +20249,16 @@ var require_chalk = __commonJS({
20249
20249
  }
20250
20250
  function Chalk(options) {
20251
20251
  if (!this || !(this instanceof Chalk) || this.template) {
20252
- const chalk2 = {};
20253
- applyOptions(chalk2, options);
20254
- chalk2.template = function() {
20252
+ const chalk3 = {};
20253
+ applyOptions(chalk3, options);
20254
+ chalk3.template = function() {
20255
20255
  const args = [].slice.call(arguments);
20256
- return chalkTag.apply(null, [chalk2.template].concat(args));
20256
+ return chalkTag.apply(null, [chalk3.template].concat(args));
20257
20257
  };
20258
- Object.setPrototypeOf(chalk2, Chalk.prototype);
20259
- Object.setPrototypeOf(chalk2.template, chalk2);
20260
- chalk2.template.constructor = Chalk;
20261
- return chalk2.template;
20258
+ Object.setPrototypeOf(chalk3, Chalk.prototype);
20259
+ Object.setPrototypeOf(chalk3.template, chalk3);
20260
+ chalk3.template.constructor = Chalk;
20261
+ return chalk3.template;
20262
20262
  }
20263
20263
  applyOptions(this, options);
20264
20264
  }
@@ -20377,7 +20377,7 @@ var require_chalk = __commonJS({
20377
20377
  ansiStyles.dim.open = originalDim;
20378
20378
  return str;
20379
20379
  }
20380
- function chalkTag(chalk2, strings) {
20380
+ function chalkTag(chalk3, strings) {
20381
20381
  if (!Array.isArray(strings)) {
20382
20382
  return [].slice.call(arguments, 1).join(" ");
20383
20383
  }
@@ -20387,7 +20387,7 @@ var require_chalk = __commonJS({
20387
20387
  parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
20388
20388
  parts.push(String(strings.raw[i]));
20389
20389
  }
20390
- return template(chalk2, parts.join(""));
20390
+ return template(chalk3, parts.join(""));
20391
20391
  }
20392
20392
  Object.defineProperties(Chalk.prototype, styles);
20393
20393
  module2.exports = Chalk();
@@ -20433,17 +20433,17 @@ var require_lib2 = __commonJS({
20433
20433
  return n.default = e, t && t.set(e, n), n;
20434
20434
  }
20435
20435
  var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
20436
- function getDefs(chalk2) {
20436
+ function getDefs(chalk3) {
20437
20437
  return {
20438
- keyword: chalk2.cyan,
20439
- capitalized: chalk2.yellow,
20440
- jsxIdentifier: chalk2.yellow,
20441
- punctuator: chalk2.yellow,
20442
- number: chalk2.magenta,
20443
- string: chalk2.green,
20444
- regex: chalk2.magenta,
20445
- comment: chalk2.grey,
20446
- invalid: chalk2.white.bgRed.bold
20438
+ keyword: chalk3.cyan,
20439
+ capitalized: chalk3.yellow,
20440
+ jsxIdentifier: chalk3.yellow,
20441
+ punctuator: chalk3.yellow,
20442
+ number: chalk3.magenta,
20443
+ string: chalk3.green,
20444
+ regex: chalk3.magenta,
20445
+ comment: chalk3.grey,
20446
+ invalid: chalk3.white.bgRed.bold
20447
20447
  };
20448
20448
  }
20449
20449
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -20574,11 +20574,11 @@ var require_lib3 = __commonJS({
20574
20574
  return _chalk.default;
20575
20575
  }
20576
20576
  var deprecationWarningShown = false;
20577
- function getDefs(chalk2) {
20577
+ function getDefs(chalk3) {
20578
20578
  return {
20579
- gutter: chalk2.grey,
20580
- marker: chalk2.red.bold,
20581
- message: chalk2.red.bold
20579
+ gutter: chalk3.grey,
20580
+ marker: chalk3.red.bold,
20581
+ message: chalk3.red.bold
20582
20582
  };
20583
20583
  }
20584
20584
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -20640,8 +20640,8 @@ var require_lib3 = __commonJS({
20640
20640
  }
20641
20641
  function codeFrameColumns(rawLines, loc, opts = {}) {
20642
20642
  const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
20643
- const chalk2 = getChalk(opts.forceColor);
20644
- const defs = getDefs(chalk2);
20643
+ const chalk3 = getChalk(opts.forceColor);
20644
+ const defs = getDefs(chalk3);
20645
20645
  const maybeHighlight = (chalkFn, string) => {
20646
20646
  return highlighted ? chalkFn(string) : string;
20647
20647
  };
@@ -20680,7 +20680,7 @@ var require_lib3 = __commonJS({
20680
20680
  ${frame}`;
20681
20681
  }
20682
20682
  if (highlighted) {
20683
- return chalk2.reset(frame);
20683
+ return chalk3.reset(frame);
20684
20684
  } else {
20685
20685
  return frame;
20686
20686
  }
@@ -25994,14 +25994,14 @@ var require_templates2 = __commonJS({
25994
25994
  }
25995
25995
  return results;
25996
25996
  }
25997
- function buildStyle(chalk2, styles) {
25997
+ function buildStyle(chalk3, styles) {
25998
25998
  const enabled = {};
25999
25999
  for (const layer of styles) {
26000
26000
  for (const style of layer.styles) {
26001
26001
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
26002
26002
  }
26003
26003
  }
26004
- let current = chalk2;
26004
+ let current = chalk3;
26005
26005
  for (const [styleName, styles2] of Object.entries(enabled)) {
26006
26006
  if (!Array.isArray(styles2)) {
26007
26007
  continue;
@@ -26013,7 +26013,7 @@ var require_templates2 = __commonJS({
26013
26013
  }
26014
26014
  return current;
26015
26015
  }
26016
- module2.exports = (chalk2, temporary) => {
26016
+ module2.exports = (chalk3, temporary) => {
26017
26017
  const styles = [];
26018
26018
  const chunks = [];
26019
26019
  let chunk = [];
@@ -26023,13 +26023,13 @@ var require_templates2 = __commonJS({
26023
26023
  } else if (style) {
26024
26024
  const string = chunk.join("");
26025
26025
  chunk = [];
26026
- chunks.push(styles.length === 0 ? string : buildStyle(chalk2, styles)(string));
26026
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk3, styles)(string));
26027
26027
  styles.push({ inverse, styles: parseStyle(style) });
26028
26028
  } else if (close) {
26029
26029
  if (styles.length === 0) {
26030
26030
  throw new Error("Found extraneous } in Chalk template literal");
26031
26031
  }
26032
- chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
26032
+ chunks.push(buildStyle(chalk3, styles)(chunk.join("")));
26033
26033
  chunk = [];
26034
26034
  styles.pop();
26035
26035
  } else {
@@ -26077,16 +26077,16 @@ var require_source = __commonJS({
26077
26077
  }
26078
26078
  };
26079
26079
  var chalkFactory = (options) => {
26080
- const chalk3 = {};
26081
- applyOptions(chalk3, options);
26082
- chalk3.template = (...arguments_) => chalkTag(chalk3.template, ...arguments_);
26083
- Object.setPrototypeOf(chalk3, Chalk.prototype);
26084
- Object.setPrototypeOf(chalk3.template, chalk3);
26085
- chalk3.template.constructor = () => {
26080
+ const chalk4 = {};
26081
+ applyOptions(chalk4, options);
26082
+ chalk4.template = (...arguments_) => chalkTag(chalk4.template, ...arguments_);
26083
+ Object.setPrototypeOf(chalk4, Chalk.prototype);
26084
+ Object.setPrototypeOf(chalk4.template, chalk4);
26085
+ chalk4.template.constructor = () => {
26086
26086
  throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
26087
26087
  };
26088
- chalk3.template.Instance = ChalkClass;
26089
- return chalk3.template;
26088
+ chalk4.template.Instance = ChalkClass;
26089
+ return chalk4.template;
26090
26090
  };
26091
26091
  function Chalk(options) {
26092
26092
  return chalkFactory(options);
@@ -26197,7 +26197,7 @@ var require_source = __commonJS({
26197
26197
  return openAll + string + closeAll;
26198
26198
  };
26199
26199
  var template;
26200
- var chalkTag = (chalk3, ...strings) => {
26200
+ var chalkTag = (chalk4, ...strings) => {
26201
26201
  const [firstString] = strings;
26202
26202
  if (!isArray(firstString) || !isArray(firstString.raw)) {
26203
26203
  return strings.join(" ");
@@ -26213,14 +26213,14 @@ var require_source = __commonJS({
26213
26213
  if (template === void 0) {
26214
26214
  template = require_templates2();
26215
26215
  }
26216
- return template(chalk3, parts.join(""));
26216
+ return template(chalk4, parts.join(""));
26217
26217
  };
26218
26218
  Object.defineProperties(Chalk.prototype, styles);
26219
- var chalk2 = Chalk();
26220
- chalk2.supportsColor = stdoutColor;
26221
- chalk2.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
26222
- chalk2.stderr.supportsColor = stderrColor;
26223
- module2.exports = chalk2;
26219
+ var chalk3 = Chalk();
26220
+ chalk3.supportsColor = stdoutColor;
26221
+ chalk3.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
26222
+ chalk3.stderr.supportsColor = stderrColor;
26223
+ module2.exports = chalk3;
26224
26224
  }
26225
26225
  });
26226
26226
 
@@ -26279,6 +26279,7 @@ var LogLevel = {
26279
26279
  ERROR: 20,
26280
26280
  WARN: 30,
26281
26281
  INFO: 40,
26282
+ SUCCESS: 45,
26282
26283
  DEBUG: 60,
26283
26284
  TRACE: 70,
26284
26285
  ALL: 100
@@ -30076,6 +30077,8 @@ var getDefaultConfig = (config = {}, root) => {
30076
30077
  // packages/config-tools/src/utilities/get-log-level.ts
30077
30078
  var getLogLevel = (label) => {
30078
30079
  switch (label) {
30080
+ case "all":
30081
+ return LogLevel.ALL;
30079
30082
  case "trace":
30080
30083
  return LogLevel.TRACE;
30081
30084
  case "debug":
@@ -30095,6 +30098,9 @@ var getLogLevel = (label) => {
30095
30098
  }
30096
30099
  };
30097
30100
  var getLogLevelLabel = (logLevel) => {
30101
+ if (logLevel >= LogLevel.ALL) {
30102
+ return LogLevelLabel.ALL;
30103
+ }
30098
30104
  if (logLevel >= LogLevel.TRACE) {
30099
30105
  return LogLevelLabel.TRACE;
30100
30106
  }
@@ -30119,6 +30125,9 @@ var getLogLevelLabel = (logLevel) => {
30119
30125
  return LogLevelLabel.INFO;
30120
30126
  };
30121
30127
 
30128
+ // packages/config-tools/src/utilities/logger.ts
30129
+ var chalk = __toESM(require_source(), 1);
30130
+
30122
30131
  // packages/config-tools/src/env/get-env.ts
30123
30132
  var getExtensionEnv = (extensionName) => {
30124
30133
  const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
@@ -31336,7 +31345,7 @@ var zodToJsonSchema = (schema, options) => {
31336
31345
  };
31337
31346
 
31338
31347
  // packages/workspace-tools/src/base/base-generator.ts
31339
- var chalk = __toESM(require_source());
31348
+ var chalk2 = __toESM(require_source());
31340
31349
 
31341
31350
  // packages/workspace-tools/src/utils/get-workspace-root.ts
31342
31351
  var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
@@ -31407,7 +31416,7 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
31407
31416
  const startTime = Date.now();
31408
31417
  let options = _options;
31409
31418
  try {
31410
- console.info(chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} generator...
31419
+ console.info(chalk2.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} generator...
31411
31420
 
31412
31421
  `));
31413
31422
  let config;
@@ -31418,29 +31427,29 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
31418
31427
  });
31419
31428
  setConfigEnv(config);
31420
31429
  getLogLevel(config.logLevel) >= LogLevel.DEBUG && console.debug(
31421
- chalk.dim(
31430
+ chalk2.dim(
31422
31431
  `Loaded Storm config into env:
31423
31432
  ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\n")}`
31424
31433
  )
31425
31434
  );
31426
31435
  }
31427
31436
  if (generatorOptions?.hooks?.applyDefaultOptions) {
31428
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the applyDefaultOptions hook..."));
31437
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Running the applyDefaultOptions hook..."));
31429
31438
  options = await Promise.resolve(
31430
31439
  generatorOptions.hooks.applyDefaultOptions(options, config)
31431
31440
  );
31432
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the applyDefaultOptions hook..."));
31441
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Completed the applyDefaultOptions hook..."));
31433
31442
  }
31434
- getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(chalk.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Generator schema options: \n"), options);
31443
+ getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(chalk2.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Generator schema options: \n"), options);
31435
31444
  const tokenized = applyWorkspaceTokens(
31436
31445
  options,
31437
31446
  { workspaceRoot: tree.root, config },
31438
31447
  applyWorkspaceGeneratorTokens
31439
31448
  );
31440
31449
  if (generatorOptions?.hooks?.preProcess) {
31441
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the preProcess hook..."));
31450
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Running the preProcess hook..."));
31442
31451
  await Promise.resolve(generatorOptions.hooks.preProcess(options, config));
31443
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the preProcess hook..."));
31452
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Completed the preProcess hook..."));
31444
31453
  }
31445
31454
  const result = await Promise.resolve(generatorFn(tree, tokenized, config));
31446
31455
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
@@ -31449,12 +31458,12 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
31449
31458
  });
31450
31459
  }
31451
31460
  if (generatorOptions?.hooks?.postProcess) {
31452
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Running the postProcess hook..."));
31461
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Running the postProcess hook..."));
31453
31462
  await Promise.resolve(generatorOptions.hooks.postProcess(config));
31454
- getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk.dim("Completed the postProcess hook..."));
31463
+ getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Completed the postProcess hook..."));
31455
31464
  }
31456
31465
  console.info(
31457
- chalk.bold.hex("#087f5b")(`
31466
+ chalk2.bold.hex("#087f5b")(`
31458
31467
 
31459
31468
  \u{1F389} Successfully completed running the ${name} generator!`)
31460
31469
  );
@@ -31463,7 +31472,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
31463
31472
  };
31464
31473
  } catch (error) {
31465
31474
  console.error(
31466
- chalk.bold.hex("#7d1a1a")("\u274C An error occurred while running the generator\n\n"),
31475
+ chalk2.bold.hex("#7d1a1a")("\u274C An error occurred while running the generator\n\n"),
31467
31476
  error
31468
31477
  );
31469
31478
  console.error(error);
@@ -31472,7 +31481,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
31472
31481
  };
31473
31482
  } finally {
31474
31483
  console.info(
31475
- chalk.hex("#0ea5e9").italic(
31484
+ chalk2.hex("#0ea5e9").italic(
31476
31485
  `\u23F1\uFE0F The${name ? ` ${name}` : ""} generator took ${Date.now() - startTime}ms to complete`
31477
31486
  )
31478
31487
  );