@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);
@@ -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,8 +26279,10 @@ var LogLevel = {
26279
26279
  ERROR: 20,
26280
26280
  WARN: 30,
26281
26281
  INFO: 40,
26282
+ SUCCESS: 45,
26282
26283
  DEBUG: 60,
26283
- TRACE: 70
26284
+ TRACE: 70,
26285
+ ALL: 100
26284
26286
  };
26285
26287
  var LogLevelLabel = {
26286
26288
  SILENT: "silent",
@@ -26289,7 +26291,8 @@ var LogLevelLabel = {
26289
26291
  WARN: "warn",
26290
26292
  INFO: "info",
26291
26293
  DEBUG: "debug",
26292
- TRACE: "trace"
26294
+ TRACE: "trace",
26295
+ ALL: "all"
26293
26296
  };
26294
26297
 
26295
26298
  // packages/config-tools/src/utilities/find-up.ts
@@ -26298,15 +26301,15 @@ var import_path = require("path");
26298
26301
  var MAX_PATH_SEARCH_DEPTH = 30;
26299
26302
  var depth = 0;
26300
26303
  function findFolderUp(startPath, endFileNames) {
26301
- startPath = startPath ?? process.cwd();
26302
- if (endFileNames.some((endFileName) => (0, import_fs.existsSync)((0, import_path.join)(startPath, endFileName)))) {
26303
- return startPath;
26304
- } else if (startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
26305
- const parent = (0, import_path.join)(startPath, "..");
26304
+ const _startPath = startPath ?? process.cwd();
26305
+ if (endFileNames.some((endFileName) => (0, import_fs.existsSync)((0, import_path.join)(_startPath, endFileName)))) {
26306
+ return _startPath;
26307
+ }
26308
+ if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
26309
+ const parent = (0, import_path.join)(_startPath, "..");
26306
26310
  return findFolderUp(parent, endFileNames);
26307
- } else {
26308
- return void 0;
26309
26311
  }
26312
+ return void 0;
26310
26313
  }
26311
26314
 
26312
26315
  // packages/config-tools/src/utilities/find-workspace-root.ts
@@ -29963,17 +29966,13 @@ var StormConfigSchema = objectType({
29963
29966
  license: stringType().trim().default("Apache License 2.0").describe("The root directory of the package"),
29964
29967
  homepage: stringType().trim().url().default("https://stormsoftware.org").describe("The homepage of the workspace"),
29965
29968
  branch: stringType().trim().default("main").describe("The branch of the workspace"),
29966
- preMajor: booleanType().default(false).describe(
29967
- "An indicator specifying if the package is still in it's pre-major version"
29968
- ),
29969
+ preMajor: booleanType().default(false).describe("An indicator specifying if the package is still in it's pre-major version"),
29969
29970
  owner: stringType().trim().default("@storm-software/development").describe("The owner of the package"),
29970
29971
  worker: stringType().trim().default("stormie-bot").describe(
29971
29972
  "The worker of the package (this is the bot that will be used to perform various tasks)"
29972
29973
  ),
29973
29974
  env: enumType(["development", "staging", "production"]).default("production").describe("The current runtime environment of the package"),
29974
- ci: booleanType().default(true).describe(
29975
- "An indicator specifying if the current environment is a CI environment"
29976
- ),
29975
+ ci: booleanType().default(true).describe("An indicator specifying if the current environment is a CI environment"),
29977
29976
  workspaceRoot: stringType().trim().optional().describe("The root directory of the workspace"),
29978
29977
  packageDirectory: stringType().trim().optional().describe("The root directory of the package"),
29979
29978
  buildDirectory: stringType().trim().default("dist").describe("The build directory for the workspace"),
@@ -29984,7 +29983,7 @@ var StormConfigSchema = objectType({
29984
29983
  packageManager: enumType(["npm", "yarn", "pnpm", "bun"]).default("npm").describe("The package manager used by the repository"),
29985
29984
  timezone: stringType().trim().default("America/New_York").describe("The default timezone of the workspace"),
29986
29985
  locale: stringType().trim().default("en-US").describe("The default locale of the workspace"),
29987
- logLevel: enumType(["silent", "fatal", "error", "warn", "info", "debug", "trace"]).default("debug").describe(
29986
+ logLevel: enumType(["silent", "fatal", "error", "warn", "info", "debug", "trace", "all"]).default("debug").describe(
29988
29987
  "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`)."
29989
29988
  ),
29990
29989
  configFile: stringType().trim().nullable().default(null).describe(
@@ -30042,11 +30041,21 @@ var getDefaultConfig = (config = {}, root) => {
30042
30041
  });
30043
30042
  if (file) {
30044
30043
  const packageJson = JSON.parse(file);
30045
- packageJson.name && (name = packageJson.name);
30046
- packageJson.namespace && (namespace = packageJson.namespace);
30047
- packageJson.repository?.url && (repository = packageJson.repository?.url);
30048
- packageJson.license && (license = packageJson.license);
30049
- packageJson.homepage && (homepage = packageJson.homepage);
30044
+ if (packageJson.name) {
30045
+ name = packageJson.name;
30046
+ }
30047
+ if (packageJson.namespace) {
30048
+ namespace = packageJson.namespace;
30049
+ }
30050
+ if (packageJson.repository?.url) {
30051
+ repository = packageJson.repository?.url;
30052
+ }
30053
+ if (packageJson.license) {
30054
+ license = packageJson.license;
30055
+ }
30056
+ if (packageJson.homepage) {
30057
+ homepage = packageJson.homepage;
30058
+ }
30050
30059
  }
30051
30060
  }
30052
30061
  return StormConfigSchema.parse({
@@ -30068,6 +30077,8 @@ var getDefaultConfig = (config = {}, root) => {
30068
30077
  // packages/config-tools/src/utilities/get-log-level.ts
30069
30078
  var getLogLevel = (label) => {
30070
30079
  switch (label) {
30080
+ case "all":
30081
+ return LogLevel.ALL;
30071
30082
  case "trace":
30072
30083
  return LogLevel.TRACE;
30073
30084
  case "debug":
@@ -30087,38 +30098,49 @@ var getLogLevel = (label) => {
30087
30098
  }
30088
30099
  };
30089
30100
  var getLogLevelLabel = (logLevel) => {
30101
+ if (logLevel >= LogLevel.ALL) {
30102
+ return LogLevelLabel.ALL;
30103
+ }
30090
30104
  if (logLevel >= LogLevel.TRACE) {
30091
30105
  return LogLevelLabel.TRACE;
30092
- } else if (logLevel >= LogLevel.DEBUG) {
30106
+ }
30107
+ if (logLevel >= LogLevel.DEBUG) {
30093
30108
  return LogLevelLabel.DEBUG;
30094
- } else if (logLevel >= LogLevel.INFO) {
30109
+ }
30110
+ if (logLevel >= LogLevel.INFO) {
30095
30111
  return LogLevelLabel.INFO;
30096
- } else if (logLevel >= LogLevel.WARN) {
30112
+ }
30113
+ if (logLevel >= LogLevel.WARN) {
30097
30114
  return LogLevelLabel.WARN;
30098
- } else if (logLevel >= LogLevel.ERROR) {
30115
+ }
30116
+ if (logLevel >= LogLevel.ERROR) {
30099
30117
  return LogLevelLabel.ERROR;
30100
- } else if (logLevel >= LogLevel.FATAL) {
30118
+ }
30119
+ if (logLevel >= LogLevel.FATAL) {
30101
30120
  return LogLevelLabel.FATAL;
30102
- } else if (logLevel <= LogLevel.SILENT) {
30121
+ }
30122
+ if (logLevel <= LogLevel.SILENT) {
30103
30123
  return LogLevelLabel.SILENT;
30104
- } else {
30105
- return LogLevelLabel.INFO;
30106
30124
  }
30125
+ return LogLevelLabel.INFO;
30107
30126
  };
30108
30127
 
30128
+ // packages/config-tools/src/utilities/logger.ts
30129
+ var chalk = __toESM(require_source(), 1);
30130
+
30109
30131
  // packages/config-tools/src/env/get-env.ts
30110
30132
  var getExtensionEnv = (extensionName) => {
30111
30133
  const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
30112
30134
  return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
30113
- const name = key.replace(prefix, "").split("_").map(
30114
- (i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
30115
- ).join("");
30116
- name && (ret[name] = process.env[key]);
30135
+ const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
30136
+ if (name) {
30137
+ ret[name] = process.env[key];
30138
+ }
30117
30139
  return ret;
30118
30140
  }, {});
30119
30141
  };
30120
30142
  var getConfigEnv = () => {
30121
- const prefix = `STORM_`;
30143
+ const prefix = "STORM_";
30122
30144
  let config = {
30123
30145
  name: process.env[`${prefix}NAME`],
30124
30146
  namespace: process.env[`${prefix}NAMESPACE`],
@@ -30137,9 +30159,7 @@ var getConfigEnv = () => {
30137
30159
  runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
30138
30160
  runtimeDirectory: process.env[`${prefix}RUNTIME_DIRECTORY`],
30139
30161
  env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
30140
- ci: Boolean(
30141
- process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION
30142
- ),
30162
+ ci: Boolean(process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION),
30143
30163
  colors: {
30144
30164
  primary: process.env[`${prefix}COLOR_PRIMARY`],
30145
30165
  background: process.env[`${prefix}COLOR_BACKGROUND`],
@@ -30152,9 +30172,7 @@ var getConfigEnv = () => {
30152
30172
  repository: process.env[`${prefix}REPOSITORY`],
30153
30173
  branch: process.env[`${prefix}BRANCH`],
30154
30174
  preMajor: Boolean(process.env[`${prefix}PRE_MAJOR`]),
30155
- logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? Number.isSafeInteger(
30156
- Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
30157
- ) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : LogLevelLabel.INFO,
30175
+ 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,
30158
30176
  extensions: {}
30159
30177
  };
30160
30178
  const serializedConfig = process.env[`${prefix}CONFIG`];
@@ -30169,26 +30187,27 @@ var getConfigEnv = () => {
30169
30187
  }
30170
30188
  const extensionPrefix = `${prefix}EXTENSION_`;
30171
30189
  return Object.keys(process.env).filter((key) => key.startsWith(extensionPrefix)).reduce((ret, key) => {
30172
- const extensionName = key.substring(prefix.length, key.indexOf("_", prefix.length)).split("_").map(
30173
- (i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
30174
- ).join("");
30175
- extensionName && (ret.extensions[extensionName] = getExtensionEnv(extensionName));
30190
+ 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("");
30191
+ if (extensionName) {
30192
+ ret.extensions[extensionName] = getExtensionEnv(extensionName);
30193
+ }
30176
30194
  return ret;
30177
30195
  }, config);
30178
30196
  };
30179
30197
 
30180
30198
  // packages/config-tools/src/env/set-env.ts
30181
30199
  var setExtensionEnv = (extensionName, extension) => {
30182
- Object.keys(extension ?? {}).forEach((key) => {
30200
+ for (const key of Object.keys(extension ?? {})) {
30183
30201
  if (extension[key]) {
30184
- let result = key?.replace(
30202
+ const result = key?.replace(
30185
30203
  /([A-Z])+/g,
30186
30204
  (input) => input ? input[0].toUpperCase() + input.slice(1) : ""
30187
30205
  ).split(/(?=[A-Z])|[\.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
30188
30206
  let extensionKey;
30189
30207
  if (result.length === 0) {
30190
30208
  return;
30191
- } else if (result.length === 1) {
30209
+ }
30210
+ if (result.length === 1) {
30192
30211
  extensionKey = result[0].toUpperCase();
30193
30212
  } else {
30194
30213
  extensionKey = result.reduce((ret, part) => {
@@ -30197,59 +30216,117 @@ var setExtensionEnv = (extensionName, extension) => {
30197
30216
  }
30198
30217
  process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
30199
30218
  }
30200
- });
30219
+ }
30201
30220
  };
30202
30221
  var setConfigEnv = (config) => {
30203
- const prefix = `STORM_`;
30204
- config.name && (process.env[`${prefix}NAME`] = config.name);
30205
- config.namespace && (process.env[`${prefix}NAMESPACE`] = config.namespace);
30206
- config.owner && (process.env[`${prefix}OWNER`] = config.owner);
30207
- config.worker && (process.env[`${prefix}WORKER`] = config.worker);
30208
- config.organization && (process.env[`${prefix}ORGANIZATION`] = config.organization);
30209
- config.packageManager && (process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager);
30210
- config.license && (process.env[`${prefix}LICENSE`] = config.license);
30211
- config.homepage && (process.env[`${prefix}HOMEPAGE`] = config.homepage);
30212
- config.timezone && (process.env[`${prefix}TIMEZONE`] = config.timezone);
30213
- config.timezone && (process.env.TZ = config.timezone);
30214
- config.timezone && (process.env.DEFAULT_TIMEZONE = config.timezone);
30215
- config.locale && (process.env[`${prefix}LOCALE`] = config.locale);
30216
- config.locale && (process.env.LOCALE = config.locale);
30217
- config.locale && (process.env.DEFAULT_LOCALE = config.locale);
30218
- config.locale && (process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8");
30219
- config.configFile && (process.env[`${prefix}CONFIG_FILE`] = config.configFile);
30220
- config.workspaceRoot && (process.env[`${prefix}WORKSPACE_ROOT`] = config.workspaceRoot);
30221
- config.workspaceRoot && (process.env.NX_WORKSPACE_ROOT = config.workspaceRoot);
30222
- config.workspaceRoot && (process.env.NX_WORKSPACE_ROOT_PATH = config.workspaceRoot);
30223
- config.packageDirectory && (process.env[`${prefix}PACKAGE_DIRECTORY`] = config.packageDirectory);
30224
- config.buildDirectory && (process.env[`${prefix}BUILD_DIRECTORY`] = config.buildDirectory);
30225
- config.runtimeVersion && (process.env[`${prefix}RUNTIME_VERSION`] = config.runtimeVersion);
30226
- config.runtimeDirectory && (process.env[`${prefix}RUNTIME_DIRECTORY`] = config.runtimeDirectory);
30227
- config.env && (process.env[`${prefix}ENV`] = config.env);
30228
- config.env && (process.env.NODE_ENV = config.env);
30229
- config.env && (process.env.ENVIRONMENT = config.env);
30230
- config.ci && (process.env[`${prefix}CI`] = String(config.ci));
30231
- config.ci && (process.env.CI = String(config.ci));
30232
- config.ci && (process.env.CONTINUOUS_INTEGRATION = String(config.ci));
30233
- config.colors.primary && (process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary);
30234
- config.colors.background && (process.env[`${prefix}COLOR_BACKGROUND`] = config.colors.background);
30235
- config.colors.success && (process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success);
30236
- config.colors.info && (process.env[`${prefix}COLOR_INFO`] = config.colors.info);
30237
- config.colors.warning && (process.env[`${prefix}COLOR_WARNING`] = config.colors.warning);
30238
- config.colors.error && (process.env[`${prefix}COLOR_ERROR`] = config.colors.error);
30239
- config.colors.fatal && (process.env[`${prefix}COLOR_FATAL`] = config.colors.fatal);
30240
- config.repository && (process.env[`${prefix}REPOSITORY`] = config.repository);
30241
- config.branch && (process.env[`${prefix}BRANCH`] = config.branch);
30242
- config.preMajor && (process.env[`${prefix}PRE_MAJOR`] = String(config.preMajor));
30243
- config.logLevel && (process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel));
30244
- config.logLevel && (process.env.LOG_LEVEL = String(config.logLevel));
30245
- config.logLevel && (process.env.NX_VERBOSE_LOGGING = String(
30246
- getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
30247
- ));
30248
- config.logLevel && (process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none");
30249
- config && (process.env[`${prefix}CONFIG`] = JSON.stringify(config));
30250
- Object.keys(config.extensions ?? {}).forEach((key) => {
30222
+ const prefix = "STORM_";
30223
+ if (config.name) {
30224
+ process.env[`${prefix}NAME`] = config.name;
30225
+ }
30226
+ if (config.namespace) {
30227
+ process.env[`${prefix}NAMESPACE`] = config.namespace;
30228
+ }
30229
+ if (config.owner) {
30230
+ process.env[`${prefix}OWNER`] = config.owner;
30231
+ }
30232
+ if (config.worker) {
30233
+ process.env[`${prefix}WORKER`] = config.worker;
30234
+ }
30235
+ if (config.organization) {
30236
+ process.env[`${prefix}ORGANIZATION`] = config.organization;
30237
+ }
30238
+ if (config.packageManager) {
30239
+ process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager;
30240
+ }
30241
+ if (config.license) {
30242
+ process.env[`${prefix}LICENSE`] = config.license;
30243
+ }
30244
+ if (config.homepage) {
30245
+ process.env[`${prefix}HOMEPAGE`] = config.homepage;
30246
+ }
30247
+ if (config.timezone) {
30248
+ process.env[`${prefix}TIMEZONE`] = config.timezone;
30249
+ process.env.TZ = config.timezone;
30250
+ process.env.DEFAULT_TIMEZONE = config.timezone;
30251
+ }
30252
+ if (config.locale) {
30253
+ process.env[`${prefix}LOCALE`] = config.locale;
30254
+ process.env.LOCALE = config.locale;
30255
+ process.env.DEFAULT_LOCALE = config.locale;
30256
+ process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
30257
+ }
30258
+ if (config.configFile) {
30259
+ process.env[`${prefix}CONFIG_FILE`] = config.configFile;
30260
+ }
30261
+ if (config.workspaceRoot) {
30262
+ process.env[`${prefix}WORKSPACE_ROOT`] = config.workspaceRoot;
30263
+ process.env.NX_WORKSPACE_ROOT = config.workspaceRoot;
30264
+ process.env.NX_WORKSPACE_ROOT_PATH = config.workspaceRoot;
30265
+ }
30266
+ if (config.packageDirectory) {
30267
+ process.env[`${prefix}PACKAGE_DIRECTORY`] = config.packageDirectory;
30268
+ }
30269
+ if (config.buildDirectory) {
30270
+ process.env[`${prefix}BUILD_DIRECTORY`] = config.buildDirectory;
30271
+ }
30272
+ if (config.runtimeVersion) {
30273
+ process.env[`${prefix}RUNTIME_VERSION`] = config.runtimeVersion;
30274
+ }
30275
+ if (config.runtimeDirectory) {
30276
+ process.env[`${prefix}RUNTIME_DIRECTORY`] = config.runtimeDirectory;
30277
+ }
30278
+ if (config.env) {
30279
+ process.env[`${prefix}ENV`] = config.env;
30280
+ process.env.NODE_ENV = config.env;
30281
+ process.env.ENVIRONMENT = config.env;
30282
+ }
30283
+ if (config.ci) {
30284
+ process.env[`${prefix}CI`] = String(config.ci);
30285
+ process.env.CI = String(config.ci);
30286
+ process.env.CONTINUOUS_INTEGRATION = String(config.ci);
30287
+ }
30288
+ if (config.colors.primary) {
30289
+ process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary;
30290
+ }
30291
+ if (config.colors.background) {
30292
+ process.env[`${prefix}COLOR_BACKGROUND`] = config.colors.background;
30293
+ }
30294
+ if (config.colors.success) {
30295
+ process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success;
30296
+ }
30297
+ if (config.colors.info) {
30298
+ process.env[`${prefix}COLOR_INFO`] = config.colors.info;
30299
+ }
30300
+ if (config.colors.warning) {
30301
+ process.env[`${prefix}COLOR_WARNING`] = config.colors.warning;
30302
+ }
30303
+ if (config.colors.error) {
30304
+ process.env[`${prefix}COLOR_ERROR`] = config.colors.error;
30305
+ }
30306
+ if (config.colors.fatal) {
30307
+ process.env[`${prefix}COLOR_FATAL`] = config.colors.fatal;
30308
+ }
30309
+ if (config.repository) {
30310
+ process.env[`${prefix}REPOSITORY`] = config.repository;
30311
+ }
30312
+ if (config.branch) {
30313
+ process.env[`${prefix}BRANCH`] = config.branch;
30314
+ }
30315
+ if (config.preMajor) {
30316
+ process.env[`${prefix}PRE_MAJOR`] = String(config.preMajor);
30317
+ }
30318
+ if (config.logLevel) {
30319
+ process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
30320
+ process.env.LOG_LEVEL = String(config.logLevel);
30321
+ process.env.NX_VERBOSE_LOGGING = String(
30322
+ getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
30323
+ );
30324
+ process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
30325
+ }
30326
+ process.env[`${prefix}CONFIG`] = JSON.stringify(config);
30327
+ for (const key of Object.keys(config.extensions ?? {})) {
30251
30328
  config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
30252
- });
30329
+ }
30253
30330
  };
30254
30331
 
30255
30332
  // packages/workspace-tools/src/generators/config-schema/generator.ts
@@ -31268,7 +31345,7 @@ var zodToJsonSchema = (schema, options) => {
31268
31345
  };
31269
31346
 
31270
31347
  // packages/workspace-tools/src/base/base-generator.ts
31271
- var chalk = __toESM(require_source());
31348
+ var chalk2 = __toESM(require_source());
31272
31349
 
31273
31350
  // packages/workspace-tools/src/utils/get-workspace-root.ts
31274
31351
  var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
@@ -31339,7 +31416,7 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
31339
31416
  const startTime = Date.now();
31340
31417
  let options = _options;
31341
31418
  try {
31342
- console.info(chalk.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} generator...
31419
+ console.info(chalk2.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} generator...
31343
31420
 
31344
31421
  `));
31345
31422
  let config;
@@ -31350,29 +31427,29 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
31350
31427
  });
31351
31428
  setConfigEnv(config);
31352
31429
  getLogLevel(config.logLevel) >= LogLevel.DEBUG && console.debug(
31353
- chalk.dim(
31430
+ chalk2.dim(
31354
31431
  `Loaded Storm config into env:
31355
31432
  ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\n")}`
31356
31433
  )
31357
31434
  );
31358
31435
  }
31359
31436
  if (generatorOptions?.hooks?.applyDefaultOptions) {
31360
- 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..."));
31361
31438
  options = await Promise.resolve(
31362
31439
  generatorOptions.hooks.applyDefaultOptions(options, config)
31363
31440
  );
31364
- 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..."));
31365
31442
  }
31366
- 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);
31367
31444
  const tokenized = applyWorkspaceTokens(
31368
31445
  options,
31369
31446
  { workspaceRoot: tree.root, config },
31370
31447
  applyWorkspaceGeneratorTokens
31371
31448
  );
31372
31449
  if (generatorOptions?.hooks?.preProcess) {
31373
- 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..."));
31374
31451
  await Promise.resolve(generatorOptions.hooks.preProcess(options, config));
31375
- 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..."));
31376
31453
  }
31377
31454
  const result = await Promise.resolve(generatorFn(tree, tokenized, config));
31378
31455
  if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
@@ -31381,12 +31458,12 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
31381
31458
  });
31382
31459
  }
31383
31460
  if (generatorOptions?.hooks?.postProcess) {
31384
- 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..."));
31385
31462
  await Promise.resolve(generatorOptions.hooks.postProcess(config));
31386
- 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..."));
31387
31464
  }
31388
31465
  console.info(
31389
- chalk.bold.hex("#087f5b")(`
31466
+ chalk2.bold.hex("#087f5b")(`
31390
31467
 
31391
31468
  \u{1F389} Successfully completed running the ${name} generator!`)
31392
31469
  );
@@ -31395,7 +31472,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
31395
31472
  };
31396
31473
  } catch (error) {
31397
31474
  console.error(
31398
- 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"),
31399
31476
  error
31400
31477
  );
31401
31478
  console.error(error);
@@ -31404,7 +31481,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
31404
31481
  };
31405
31482
  } finally {
31406
31483
  console.info(
31407
- chalk.hex("#0ea5e9").italic(
31484
+ chalk2.hex("#0ea5e9").italic(
31408
31485
  `\u23F1\uFE0F The${name ? ` ${name}` : ""} generator took ${Date.now() - startTime}ms to complete`
31409
31486
  )
31410
31487
  );