@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.
- package/CHANGELOG.md +14 -0
- package/config/nx.json +1 -3
- package/index.js +396 -230
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +387 -221
- package/src/executors/design-tokens/executor.js +393 -227
- package/src/executors/tsup/executor.js +383 -217
- package/src/executors/tsup-browser/executor.js +383 -217
- package/src/executors/tsup-neutral/executor.js +383 -217
- package/src/executors/tsup-node/executor.js +383 -217
- package/src/generators/browser-library/generator.js +266 -189
- package/src/generators/config-schema/generator.js +246 -169
- package/src/generators/neutral-library/generator.js +266 -189
- package/src/generators/node-library/generator.js +266 -189
- package/src/generators/preset/generator.js +246 -169
|
@@ -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
|
|
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
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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 =
|
|
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 = (
|
|
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(
|
|
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(
|
|
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
|
|
20253
|
-
applyOptions(
|
|
20254
|
-
|
|
20252
|
+
const chalk3 = {};
|
|
20253
|
+
applyOptions(chalk3, options);
|
|
20254
|
+
chalk3.template = function() {
|
|
20255
20255
|
const args = [].slice.call(arguments);
|
|
20256
|
-
return chalkTag.apply(null, [
|
|
20256
|
+
return chalkTag.apply(null, [chalk3.template].concat(args));
|
|
20257
20257
|
};
|
|
20258
|
-
Object.setPrototypeOf(
|
|
20259
|
-
Object.setPrototypeOf(
|
|
20260
|
-
|
|
20261
|
-
return
|
|
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(
|
|
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(
|
|
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(
|
|
20436
|
+
function getDefs(chalk3) {
|
|
20437
20437
|
return {
|
|
20438
|
-
keyword:
|
|
20439
|
-
capitalized:
|
|
20440
|
-
jsxIdentifier:
|
|
20441
|
-
punctuator:
|
|
20442
|
-
number:
|
|
20443
|
-
string:
|
|
20444
|
-
regex:
|
|
20445
|
-
comment:
|
|
20446
|
-
invalid:
|
|
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(
|
|
20577
|
+
function getDefs(chalk3) {
|
|
20578
20578
|
return {
|
|
20579
|
-
gutter:
|
|
20580
|
-
marker:
|
|
20581
|
-
message:
|
|
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
|
|
20644
|
-
const defs = getDefs(
|
|
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
|
|
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(
|
|
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 =
|
|
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 = (
|
|
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(
|
|
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(
|
|
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
|
|
26081
|
-
applyOptions(
|
|
26082
|
-
|
|
26083
|
-
Object.setPrototypeOf(
|
|
26084
|
-
Object.setPrototypeOf(
|
|
26085
|
-
|
|
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
|
-
|
|
26089
|
-
return
|
|
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 = (
|
|
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(
|
|
26216
|
+
return template(chalk4, parts.join(""));
|
|
26217
26217
|
};
|
|
26218
26218
|
Object.defineProperties(Chalk.prototype, styles);
|
|
26219
|
-
var
|
|
26220
|
-
|
|
26221
|
-
|
|
26222
|
-
|
|
26223
|
-
module2.exports =
|
|
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
|
|
|
@@ -28102,7 +28102,7 @@ var require_array = __commonJS({
|
|
|
28102
28102
|
parent.enabled = choices.every((ch) => ch.enabled === true);
|
|
28103
28103
|
parent = parent.parent;
|
|
28104
28104
|
}
|
|
28105
|
-
|
|
28105
|
+
reset2(this, this.choices);
|
|
28106
28106
|
this.emit("toggle", choice, this);
|
|
28107
28107
|
return choice;
|
|
28108
28108
|
}
|
|
@@ -28400,7 +28400,7 @@ var require_array = __commonJS({
|
|
|
28400
28400
|
}
|
|
28401
28401
|
}
|
|
28402
28402
|
get choices() {
|
|
28403
|
-
return
|
|
28403
|
+
return reset2(this, this.state.choices || []);
|
|
28404
28404
|
}
|
|
28405
28405
|
set visible(visible) {
|
|
28406
28406
|
this.state.visible = visible;
|
|
@@ -28448,7 +28448,7 @@ var require_array = __commonJS({
|
|
|
28448
28448
|
return this.multiple ? this.enabled : this.focused;
|
|
28449
28449
|
}
|
|
28450
28450
|
};
|
|
28451
|
-
function
|
|
28451
|
+
function reset2(prompt, choices) {
|
|
28452
28452
|
if (choices instanceof Promise)
|
|
28453
28453
|
return choices;
|
|
28454
28454
|
if (typeof choices === "function") {
|
|
@@ -31283,20 +31283,20 @@ var require_highlight = __commonJS({
|
|
|
31283
31283
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31284
31284
|
exports.highlight = void 0;
|
|
31285
31285
|
var jsTokens = require_js_tokens();
|
|
31286
|
-
var
|
|
31286
|
+
var chalk3 = require_source();
|
|
31287
31287
|
var identifiers_1 = require_identifiers2();
|
|
31288
|
-
function getDefs(
|
|
31288
|
+
function getDefs(chalk4) {
|
|
31289
31289
|
return {
|
|
31290
|
-
keyword:
|
|
31291
|
-
capitalized:
|
|
31292
|
-
jsx_tag:
|
|
31293
|
-
punctuator:
|
|
31290
|
+
keyword: chalk4.cyan,
|
|
31291
|
+
capitalized: chalk4.yellow,
|
|
31292
|
+
jsx_tag: chalk4.yellow,
|
|
31293
|
+
punctuator: chalk4.yellow,
|
|
31294
31294
|
// bracket: intentionally omitted.
|
|
31295
|
-
number:
|
|
31296
|
-
string:
|
|
31297
|
-
regex:
|
|
31298
|
-
comment:
|
|
31299
|
-
invalid:
|
|
31295
|
+
number: chalk4.magenta,
|
|
31296
|
+
string: chalk4.green,
|
|
31297
|
+
regex: chalk4.magenta,
|
|
31298
|
+
comment: chalk4.grey,
|
|
31299
|
+
invalid: chalk4.white.bgRed.bold
|
|
31300
31300
|
};
|
|
31301
31301
|
}
|
|
31302
31302
|
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
@@ -31336,7 +31336,7 @@ var require_highlight = __commonJS({
|
|
|
31336
31336
|
});
|
|
31337
31337
|
}
|
|
31338
31338
|
function highlight(code) {
|
|
31339
|
-
const defs = getDefs(
|
|
31339
|
+
const defs = getDefs(chalk3);
|
|
31340
31340
|
return highlightTokens(defs, code);
|
|
31341
31341
|
}
|
|
31342
31342
|
exports.highlight = highlight;
|
|
@@ -31449,7 +31449,7 @@ var require_run_type_check = __commonJS({
|
|
|
31449
31449
|
"use strict";
|
|
31450
31450
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31451
31451
|
exports.getFormattedDiagnostic = exports.runTypeCheck = exports.runTypeCheckWatch = void 0;
|
|
31452
|
-
var
|
|
31452
|
+
var chalk3 = require_source();
|
|
31453
31453
|
var path = require("path");
|
|
31454
31454
|
var code_frames_1 = require("nx/src/utils/code-frames");
|
|
31455
31455
|
var highlight_1 = require_highlight();
|
|
@@ -31529,17 +31529,17 @@ var require_run_type_check = __commonJS({
|
|
|
31529
31529
|
const category = diagnostic.category;
|
|
31530
31530
|
switch (category) {
|
|
31531
31531
|
case ts.DiagnosticCategory.Warning: {
|
|
31532
|
-
message += `${
|
|
31532
|
+
message += `${chalk3.yellow.bold("warning")} ${chalk3.gray(`TS${diagnostic.code}`)}: `;
|
|
31533
31533
|
break;
|
|
31534
31534
|
}
|
|
31535
31535
|
case ts.DiagnosticCategory.Error: {
|
|
31536
|
-
message += `${
|
|
31536
|
+
message += `${chalk3.red.bold("error")} ${chalk3.gray(`TS${diagnostic.code}`)}: `;
|
|
31537
31537
|
break;
|
|
31538
31538
|
}
|
|
31539
31539
|
case ts.DiagnosticCategory.Suggestion:
|
|
31540
31540
|
case ts.DiagnosticCategory.Message:
|
|
31541
31541
|
default: {
|
|
31542
|
-
message += `${
|
|
31542
|
+
message += `${chalk3.cyan.bold(category === 2 ? "suggestion" : "info")}: `;
|
|
31543
31543
|
break;
|
|
31544
31544
|
}
|
|
31545
31545
|
}
|
|
@@ -31549,7 +31549,7 @@ var require_run_type_check = __commonJS({
|
|
|
31549
31549
|
const line = pos.line + 1;
|
|
31550
31550
|
const column = pos.character + 1;
|
|
31551
31551
|
const fileName = path.relative(workspaceRoot, diagnostic.file.fileName);
|
|
31552
|
-
message = `${
|
|
31552
|
+
message = `${chalk3.underline.blue(`${fileName}:${line}:${column}`)} - ` + message;
|
|
31553
31553
|
const code = diagnostic.file.getFullText(diagnostic.file.getSourceFile());
|
|
31554
31554
|
message += "\n" + (0, code_frames_1.codeFrameColumns)(code, {
|
|
31555
31555
|
start: { line, column }
|
|
@@ -43521,8 +43521,10 @@ var LogLevel = {
|
|
|
43521
43521
|
ERROR: 20,
|
|
43522
43522
|
WARN: 30,
|
|
43523
43523
|
INFO: 40,
|
|
43524
|
+
SUCCESS: 45,
|
|
43524
43525
|
DEBUG: 60,
|
|
43525
|
-
TRACE: 70
|
|
43526
|
+
TRACE: 70,
|
|
43527
|
+
ALL: 100
|
|
43526
43528
|
};
|
|
43527
43529
|
var LogLevelLabel = {
|
|
43528
43530
|
SILENT: "silent",
|
|
@@ -43531,7 +43533,8 @@ var LogLevelLabel = {
|
|
|
43531
43533
|
WARN: "warn",
|
|
43532
43534
|
INFO: "info",
|
|
43533
43535
|
DEBUG: "debug",
|
|
43534
|
-
TRACE: "trace"
|
|
43536
|
+
TRACE: "trace",
|
|
43537
|
+
ALL: "all"
|
|
43535
43538
|
};
|
|
43536
43539
|
|
|
43537
43540
|
// packages/config-tools/src/utilities/find-up.ts
|
|
@@ -43540,15 +43543,15 @@ var import_path = require("path");
|
|
|
43540
43543
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
43541
43544
|
var depth = 0;
|
|
43542
43545
|
function findFolderUp(startPath, endFileNames) {
|
|
43543
|
-
|
|
43544
|
-
if (endFileNames.some((endFileName) => (0, import_fs.existsSync)((0, import_path.join)(
|
|
43545
|
-
return
|
|
43546
|
-
}
|
|
43547
|
-
|
|
43546
|
+
const _startPath = startPath ?? process.cwd();
|
|
43547
|
+
if (endFileNames.some((endFileName) => (0, import_fs.existsSync)((0, import_path.join)(_startPath, endFileName)))) {
|
|
43548
|
+
return _startPath;
|
|
43549
|
+
}
|
|
43550
|
+
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
43551
|
+
const parent = (0, import_path.join)(_startPath, "..");
|
|
43548
43552
|
return findFolderUp(parent, endFileNames);
|
|
43549
|
-
} else {
|
|
43550
|
-
return void 0;
|
|
43551
43553
|
}
|
|
43554
|
+
return void 0;
|
|
43552
43555
|
}
|
|
43553
43556
|
|
|
43554
43557
|
// packages/config-tools/src/utilities/find-workspace-root.ts
|
|
@@ -47205,17 +47208,13 @@ var StormConfigSchema = objectType({
|
|
|
47205
47208
|
license: stringType().trim().default("Apache License 2.0").describe("The root directory of the package"),
|
|
47206
47209
|
homepage: stringType().trim().url().default("https://stormsoftware.org").describe("The homepage of the workspace"),
|
|
47207
47210
|
branch: stringType().trim().default("main").describe("The branch of the workspace"),
|
|
47208
|
-
preMajor: booleanType().default(false).describe(
|
|
47209
|
-
"An indicator specifying if the package is still in it's pre-major version"
|
|
47210
|
-
),
|
|
47211
|
+
preMajor: booleanType().default(false).describe("An indicator specifying if the package is still in it's pre-major version"),
|
|
47211
47212
|
owner: stringType().trim().default("@storm-software/development").describe("The owner of the package"),
|
|
47212
47213
|
worker: stringType().trim().default("stormie-bot").describe(
|
|
47213
47214
|
"The worker of the package (this is the bot that will be used to perform various tasks)"
|
|
47214
47215
|
),
|
|
47215
47216
|
env: enumType(["development", "staging", "production"]).default("production").describe("The current runtime environment of the package"),
|
|
47216
|
-
ci: booleanType().default(true).describe(
|
|
47217
|
-
"An indicator specifying if the current environment is a CI environment"
|
|
47218
|
-
),
|
|
47217
|
+
ci: booleanType().default(true).describe("An indicator specifying if the current environment is a CI environment"),
|
|
47219
47218
|
workspaceRoot: stringType().trim().optional().describe("The root directory of the workspace"),
|
|
47220
47219
|
packageDirectory: stringType().trim().optional().describe("The root directory of the package"),
|
|
47221
47220
|
buildDirectory: stringType().trim().default("dist").describe("The build directory for the workspace"),
|
|
@@ -47226,7 +47225,7 @@ var StormConfigSchema = objectType({
|
|
|
47226
47225
|
packageManager: enumType(["npm", "yarn", "pnpm", "bun"]).default("npm").describe("The package manager used by the repository"),
|
|
47227
47226
|
timezone: stringType().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
47228
47227
|
locale: stringType().trim().default("en-US").describe("The default locale of the workspace"),
|
|
47229
|
-
logLevel: enumType(["silent", "fatal", "error", "warn", "info", "debug", "trace"]).default("debug").describe(
|
|
47228
|
+
logLevel: enumType(["silent", "fatal", "error", "warn", "info", "debug", "trace", "all"]).default("debug").describe(
|
|
47230
47229
|
"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`)."
|
|
47231
47230
|
),
|
|
47232
47231
|
configFile: stringType().trim().nullable().default(null).describe(
|
|
@@ -47284,11 +47283,21 @@ var getDefaultConfig = (config = {}, root) => {
|
|
|
47284
47283
|
});
|
|
47285
47284
|
if (file) {
|
|
47286
47285
|
const packageJson = JSON.parse(file);
|
|
47287
|
-
|
|
47288
|
-
|
|
47289
|
-
|
|
47290
|
-
|
|
47291
|
-
|
|
47286
|
+
if (packageJson.name) {
|
|
47287
|
+
name = packageJson.name;
|
|
47288
|
+
}
|
|
47289
|
+
if (packageJson.namespace) {
|
|
47290
|
+
namespace = packageJson.namespace;
|
|
47291
|
+
}
|
|
47292
|
+
if (packageJson.repository?.url) {
|
|
47293
|
+
repository = packageJson.repository?.url;
|
|
47294
|
+
}
|
|
47295
|
+
if (packageJson.license) {
|
|
47296
|
+
license = packageJson.license;
|
|
47297
|
+
}
|
|
47298
|
+
if (packageJson.homepage) {
|
|
47299
|
+
homepage = packageJson.homepage;
|
|
47300
|
+
}
|
|
47292
47301
|
}
|
|
47293
47302
|
}
|
|
47294
47303
|
return StormConfigSchema.parse({
|
|
@@ -47310,6 +47319,8 @@ var getDefaultConfig = (config = {}, root) => {
|
|
|
47310
47319
|
// packages/config-tools/src/utilities/get-log-level.ts
|
|
47311
47320
|
var getLogLevel = (label) => {
|
|
47312
47321
|
switch (label) {
|
|
47322
|
+
case "all":
|
|
47323
|
+
return LogLevel.ALL;
|
|
47313
47324
|
case "trace":
|
|
47314
47325
|
return LogLevel.TRACE;
|
|
47315
47326
|
case "debug":
|
|
@@ -47329,38 +47340,49 @@ var getLogLevel = (label) => {
|
|
|
47329
47340
|
}
|
|
47330
47341
|
};
|
|
47331
47342
|
var getLogLevelLabel = (logLevel) => {
|
|
47343
|
+
if (logLevel >= LogLevel.ALL) {
|
|
47344
|
+
return LogLevelLabel.ALL;
|
|
47345
|
+
}
|
|
47332
47346
|
if (logLevel >= LogLevel.TRACE) {
|
|
47333
47347
|
return LogLevelLabel.TRACE;
|
|
47334
|
-
}
|
|
47348
|
+
}
|
|
47349
|
+
if (logLevel >= LogLevel.DEBUG) {
|
|
47335
47350
|
return LogLevelLabel.DEBUG;
|
|
47336
|
-
}
|
|
47351
|
+
}
|
|
47352
|
+
if (logLevel >= LogLevel.INFO) {
|
|
47337
47353
|
return LogLevelLabel.INFO;
|
|
47338
|
-
}
|
|
47354
|
+
}
|
|
47355
|
+
if (logLevel >= LogLevel.WARN) {
|
|
47339
47356
|
return LogLevelLabel.WARN;
|
|
47340
|
-
}
|
|
47357
|
+
}
|
|
47358
|
+
if (logLevel >= LogLevel.ERROR) {
|
|
47341
47359
|
return LogLevelLabel.ERROR;
|
|
47342
|
-
}
|
|
47360
|
+
}
|
|
47361
|
+
if (logLevel >= LogLevel.FATAL) {
|
|
47343
47362
|
return LogLevelLabel.FATAL;
|
|
47344
|
-
}
|
|
47363
|
+
}
|
|
47364
|
+
if (logLevel <= LogLevel.SILENT) {
|
|
47345
47365
|
return LogLevelLabel.SILENT;
|
|
47346
|
-
} else {
|
|
47347
|
-
return LogLevelLabel.INFO;
|
|
47348
47366
|
}
|
|
47367
|
+
return LogLevelLabel.INFO;
|
|
47349
47368
|
};
|
|
47350
47369
|
|
|
47370
|
+
// packages/config-tools/src/utilities/logger.ts
|
|
47371
|
+
var chalk = __toESM(require_source(), 1);
|
|
47372
|
+
|
|
47351
47373
|
// packages/config-tools/src/env/get-env.ts
|
|
47352
47374
|
var getExtensionEnv = (extensionName) => {
|
|
47353
47375
|
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
47354
47376
|
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
47355
|
-
const name = key.replace(prefix, "").split("_").map(
|
|
47356
|
-
|
|
47357
|
-
|
|
47358
|
-
|
|
47377
|
+
const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
|
|
47378
|
+
if (name) {
|
|
47379
|
+
ret[name] = process.env[key];
|
|
47380
|
+
}
|
|
47359
47381
|
return ret;
|
|
47360
47382
|
}, {});
|
|
47361
47383
|
};
|
|
47362
47384
|
var getConfigEnv = () => {
|
|
47363
|
-
const prefix =
|
|
47385
|
+
const prefix = "STORM_";
|
|
47364
47386
|
let config = {
|
|
47365
47387
|
name: process.env[`${prefix}NAME`],
|
|
47366
47388
|
namespace: process.env[`${prefix}NAMESPACE`],
|
|
@@ -47379,9 +47401,7 @@ var getConfigEnv = () => {
|
|
|
47379
47401
|
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
47380
47402
|
runtimeDirectory: process.env[`${prefix}RUNTIME_DIRECTORY`],
|
|
47381
47403
|
env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
47382
|
-
ci: Boolean(
|
|
47383
|
-
process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION
|
|
47384
|
-
),
|
|
47404
|
+
ci: Boolean(process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION),
|
|
47385
47405
|
colors: {
|
|
47386
47406
|
primary: process.env[`${prefix}COLOR_PRIMARY`],
|
|
47387
47407
|
background: process.env[`${prefix}COLOR_BACKGROUND`],
|
|
@@ -47394,9 +47414,7 @@ var getConfigEnv = () => {
|
|
|
47394
47414
|
repository: process.env[`${prefix}REPOSITORY`],
|
|
47395
47415
|
branch: process.env[`${prefix}BRANCH`],
|
|
47396
47416
|
preMajor: Boolean(process.env[`${prefix}PRE_MAJOR`]),
|
|
47397
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? Number.isSafeInteger(
|
|
47398
|
-
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
47399
|
-
) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : LogLevelLabel.INFO,
|
|
47417
|
+
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,
|
|
47400
47418
|
extensions: {}
|
|
47401
47419
|
};
|
|
47402
47420
|
const serializedConfig = process.env[`${prefix}CONFIG`];
|
|
@@ -47411,26 +47429,27 @@ var getConfigEnv = () => {
|
|
|
47411
47429
|
}
|
|
47412
47430
|
const extensionPrefix = `${prefix}EXTENSION_`;
|
|
47413
47431
|
return Object.keys(process.env).filter((key) => key.startsWith(extensionPrefix)).reduce((ret, key) => {
|
|
47414
|
-
const extensionName = key.substring(prefix.length, key.indexOf("_", prefix.length)).split("_").map(
|
|
47415
|
-
|
|
47416
|
-
|
|
47417
|
-
|
|
47432
|
+
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("");
|
|
47433
|
+
if (extensionName) {
|
|
47434
|
+
ret.extensions[extensionName] = getExtensionEnv(extensionName);
|
|
47435
|
+
}
|
|
47418
47436
|
return ret;
|
|
47419
47437
|
}, config);
|
|
47420
47438
|
};
|
|
47421
47439
|
|
|
47422
47440
|
// packages/config-tools/src/env/set-env.ts
|
|
47423
47441
|
var setExtensionEnv = (extensionName, extension) => {
|
|
47424
|
-
Object.keys(extension ?? {})
|
|
47442
|
+
for (const key of Object.keys(extension ?? {})) {
|
|
47425
47443
|
if (extension[key]) {
|
|
47426
|
-
|
|
47444
|
+
const result = key?.replace(
|
|
47427
47445
|
/([A-Z])+/g,
|
|
47428
47446
|
(input) => input ? input[0].toUpperCase() + input.slice(1) : ""
|
|
47429
47447
|
).split(/(?=[A-Z])|[\.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
|
|
47430
47448
|
let extensionKey;
|
|
47431
47449
|
if (result.length === 0) {
|
|
47432
47450
|
return;
|
|
47433
|
-
}
|
|
47451
|
+
}
|
|
47452
|
+
if (result.length === 1) {
|
|
47434
47453
|
extensionKey = result[0].toUpperCase();
|
|
47435
47454
|
} else {
|
|
47436
47455
|
extensionKey = result.reduce((ret, part) => {
|
|
@@ -47439,63 +47458,121 @@ var setExtensionEnv = (extensionName, extension) => {
|
|
|
47439
47458
|
}
|
|
47440
47459
|
process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
|
|
47441
47460
|
}
|
|
47442
|
-
}
|
|
47461
|
+
}
|
|
47443
47462
|
};
|
|
47444
47463
|
var setConfigEnv = (config) => {
|
|
47445
|
-
const prefix =
|
|
47446
|
-
|
|
47447
|
-
|
|
47448
|
-
|
|
47449
|
-
|
|
47450
|
-
|
|
47451
|
-
|
|
47452
|
-
|
|
47453
|
-
|
|
47454
|
-
|
|
47455
|
-
|
|
47456
|
-
|
|
47457
|
-
|
|
47458
|
-
|
|
47459
|
-
|
|
47460
|
-
|
|
47461
|
-
|
|
47462
|
-
|
|
47463
|
-
|
|
47464
|
-
|
|
47465
|
-
|
|
47466
|
-
|
|
47467
|
-
|
|
47468
|
-
|
|
47469
|
-
|
|
47470
|
-
|
|
47471
|
-
|
|
47472
|
-
|
|
47473
|
-
|
|
47474
|
-
|
|
47475
|
-
|
|
47476
|
-
|
|
47477
|
-
|
|
47478
|
-
|
|
47479
|
-
|
|
47480
|
-
|
|
47481
|
-
|
|
47482
|
-
|
|
47483
|
-
|
|
47484
|
-
|
|
47485
|
-
|
|
47486
|
-
|
|
47487
|
-
|
|
47488
|
-
|
|
47489
|
-
)
|
|
47490
|
-
|
|
47491
|
-
|
|
47492
|
-
|
|
47464
|
+
const prefix = "STORM_";
|
|
47465
|
+
if (config.name) {
|
|
47466
|
+
process.env[`${prefix}NAME`] = config.name;
|
|
47467
|
+
}
|
|
47468
|
+
if (config.namespace) {
|
|
47469
|
+
process.env[`${prefix}NAMESPACE`] = config.namespace;
|
|
47470
|
+
}
|
|
47471
|
+
if (config.owner) {
|
|
47472
|
+
process.env[`${prefix}OWNER`] = config.owner;
|
|
47473
|
+
}
|
|
47474
|
+
if (config.worker) {
|
|
47475
|
+
process.env[`${prefix}WORKER`] = config.worker;
|
|
47476
|
+
}
|
|
47477
|
+
if (config.organization) {
|
|
47478
|
+
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
47479
|
+
}
|
|
47480
|
+
if (config.packageManager) {
|
|
47481
|
+
process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager;
|
|
47482
|
+
}
|
|
47483
|
+
if (config.license) {
|
|
47484
|
+
process.env[`${prefix}LICENSE`] = config.license;
|
|
47485
|
+
}
|
|
47486
|
+
if (config.homepage) {
|
|
47487
|
+
process.env[`${prefix}HOMEPAGE`] = config.homepage;
|
|
47488
|
+
}
|
|
47489
|
+
if (config.timezone) {
|
|
47490
|
+
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
47491
|
+
process.env.TZ = config.timezone;
|
|
47492
|
+
process.env.DEFAULT_TIMEZONE = config.timezone;
|
|
47493
|
+
}
|
|
47494
|
+
if (config.locale) {
|
|
47495
|
+
process.env[`${prefix}LOCALE`] = config.locale;
|
|
47496
|
+
process.env.LOCALE = config.locale;
|
|
47497
|
+
process.env.DEFAULT_LOCALE = config.locale;
|
|
47498
|
+
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
47499
|
+
}
|
|
47500
|
+
if (config.configFile) {
|
|
47501
|
+
process.env[`${prefix}CONFIG_FILE`] = config.configFile;
|
|
47502
|
+
}
|
|
47503
|
+
if (config.workspaceRoot) {
|
|
47504
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = config.workspaceRoot;
|
|
47505
|
+
process.env.NX_WORKSPACE_ROOT = config.workspaceRoot;
|
|
47506
|
+
process.env.NX_WORKSPACE_ROOT_PATH = config.workspaceRoot;
|
|
47507
|
+
}
|
|
47508
|
+
if (config.packageDirectory) {
|
|
47509
|
+
process.env[`${prefix}PACKAGE_DIRECTORY`] = config.packageDirectory;
|
|
47510
|
+
}
|
|
47511
|
+
if (config.buildDirectory) {
|
|
47512
|
+
process.env[`${prefix}BUILD_DIRECTORY`] = config.buildDirectory;
|
|
47513
|
+
}
|
|
47514
|
+
if (config.runtimeVersion) {
|
|
47515
|
+
process.env[`${prefix}RUNTIME_VERSION`] = config.runtimeVersion;
|
|
47516
|
+
}
|
|
47517
|
+
if (config.runtimeDirectory) {
|
|
47518
|
+
process.env[`${prefix}RUNTIME_DIRECTORY`] = config.runtimeDirectory;
|
|
47519
|
+
}
|
|
47520
|
+
if (config.env) {
|
|
47521
|
+
process.env[`${prefix}ENV`] = config.env;
|
|
47522
|
+
process.env.NODE_ENV = config.env;
|
|
47523
|
+
process.env.ENVIRONMENT = config.env;
|
|
47524
|
+
}
|
|
47525
|
+
if (config.ci) {
|
|
47526
|
+
process.env[`${prefix}CI`] = String(config.ci);
|
|
47527
|
+
process.env.CI = String(config.ci);
|
|
47528
|
+
process.env.CONTINUOUS_INTEGRATION = String(config.ci);
|
|
47529
|
+
}
|
|
47530
|
+
if (config.colors.primary) {
|
|
47531
|
+
process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary;
|
|
47532
|
+
}
|
|
47533
|
+
if (config.colors.background) {
|
|
47534
|
+
process.env[`${prefix}COLOR_BACKGROUND`] = config.colors.background;
|
|
47535
|
+
}
|
|
47536
|
+
if (config.colors.success) {
|
|
47537
|
+
process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success;
|
|
47538
|
+
}
|
|
47539
|
+
if (config.colors.info) {
|
|
47540
|
+
process.env[`${prefix}COLOR_INFO`] = config.colors.info;
|
|
47541
|
+
}
|
|
47542
|
+
if (config.colors.warning) {
|
|
47543
|
+
process.env[`${prefix}COLOR_WARNING`] = config.colors.warning;
|
|
47544
|
+
}
|
|
47545
|
+
if (config.colors.error) {
|
|
47546
|
+
process.env[`${prefix}COLOR_ERROR`] = config.colors.error;
|
|
47547
|
+
}
|
|
47548
|
+
if (config.colors.fatal) {
|
|
47549
|
+
process.env[`${prefix}COLOR_FATAL`] = config.colors.fatal;
|
|
47550
|
+
}
|
|
47551
|
+
if (config.repository) {
|
|
47552
|
+
process.env[`${prefix}REPOSITORY`] = config.repository;
|
|
47553
|
+
}
|
|
47554
|
+
if (config.branch) {
|
|
47555
|
+
process.env[`${prefix}BRANCH`] = config.branch;
|
|
47556
|
+
}
|
|
47557
|
+
if (config.preMajor) {
|
|
47558
|
+
process.env[`${prefix}PRE_MAJOR`] = String(config.preMajor);
|
|
47559
|
+
}
|
|
47560
|
+
if (config.logLevel) {
|
|
47561
|
+
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
47562
|
+
process.env.LOG_LEVEL = String(config.logLevel);
|
|
47563
|
+
process.env.NX_VERBOSE_LOGGING = String(
|
|
47564
|
+
getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
|
|
47565
|
+
);
|
|
47566
|
+
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
47567
|
+
}
|
|
47568
|
+
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
47569
|
+
for (const key of Object.keys(config.extensions ?? {})) {
|
|
47493
47570
|
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
47494
|
-
}
|
|
47571
|
+
}
|
|
47495
47572
|
};
|
|
47496
47573
|
|
|
47497
47574
|
// packages/workspace-tools/src/base/base-generator.ts
|
|
47498
|
-
var
|
|
47575
|
+
var chalk2 = __toESM(require_source());
|
|
47499
47576
|
|
|
47500
47577
|
// packages/workspace-tools/src/utils/get-workspace-root.ts
|
|
47501
47578
|
var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
|
|
@@ -47566,7 +47643,7 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
|
47566
47643
|
const startTime = Date.now();
|
|
47567
47644
|
let options = _options;
|
|
47568
47645
|
try {
|
|
47569
|
-
console.info(
|
|
47646
|
+
console.info(chalk2.bold.hex("#1fb2a6")(`\u26A1 Running the ${name} generator...
|
|
47570
47647
|
|
|
47571
47648
|
`));
|
|
47572
47649
|
let config;
|
|
@@ -47577,29 +47654,29 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
|
47577
47654
|
});
|
|
47578
47655
|
setConfigEnv(config);
|
|
47579
47656
|
getLogLevel(config.logLevel) >= LogLevel.DEBUG && console.debug(
|
|
47580
|
-
|
|
47657
|
+
chalk2.dim(
|
|
47581
47658
|
`Loaded Storm config into env:
|
|
47582
47659
|
${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\n")}`
|
|
47583
47660
|
)
|
|
47584
47661
|
);
|
|
47585
47662
|
}
|
|
47586
47663
|
if (generatorOptions?.hooks?.applyDefaultOptions) {
|
|
47587
|
-
getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(
|
|
47664
|
+
getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Running the applyDefaultOptions hook..."));
|
|
47588
47665
|
options = await Promise.resolve(
|
|
47589
47666
|
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
47590
47667
|
);
|
|
47591
|
-
getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(
|
|
47668
|
+
getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Completed the applyDefaultOptions hook..."));
|
|
47592
47669
|
}
|
|
47593
|
-
getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(
|
|
47670
|
+
getLogLevel(config.logLevel) >= LogLevel.INFO && console.info(chalk2.hex("#0ea5e9").italic("\n\n \u2699\uFE0F Generator schema options: \n"), options);
|
|
47594
47671
|
const tokenized = applyWorkspaceTokens(
|
|
47595
47672
|
options,
|
|
47596
47673
|
{ workspaceRoot: tree.root, config },
|
|
47597
47674
|
applyWorkspaceGeneratorTokens
|
|
47598
47675
|
);
|
|
47599
47676
|
if (generatorOptions?.hooks?.preProcess) {
|
|
47600
|
-
getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(
|
|
47677
|
+
getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Running the preProcess hook..."));
|
|
47601
47678
|
await Promise.resolve(generatorOptions.hooks.preProcess(options, config));
|
|
47602
|
-
getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(
|
|
47679
|
+
getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Completed the preProcess hook..."));
|
|
47603
47680
|
}
|
|
47604
47681
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
47605
47682
|
if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
|
|
@@ -47608,12 +47685,12 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
|
|
|
47608
47685
|
});
|
|
47609
47686
|
}
|
|
47610
47687
|
if (generatorOptions?.hooks?.postProcess) {
|
|
47611
|
-
getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(
|
|
47688
|
+
getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Running the postProcess hook..."));
|
|
47612
47689
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
47613
|
-
getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(
|
|
47690
|
+
getLogLevel(config?.logLevel) >= LogLevel.TRACE && console.debug(chalk2.dim("Completed the postProcess hook..."));
|
|
47614
47691
|
}
|
|
47615
47692
|
console.info(
|
|
47616
|
-
|
|
47693
|
+
chalk2.bold.hex("#087f5b")(`
|
|
47617
47694
|
|
|
47618
47695
|
\u{1F389} Successfully completed running the ${name} generator!`)
|
|
47619
47696
|
);
|
|
@@ -47622,7 +47699,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
|
|
|
47622
47699
|
};
|
|
47623
47700
|
} catch (error) {
|
|
47624
47701
|
console.error(
|
|
47625
|
-
|
|
47702
|
+
chalk2.bold.hex("#7d1a1a")("\u274C An error occurred while running the generator\n\n"),
|
|
47626
47703
|
error
|
|
47627
47704
|
);
|
|
47628
47705
|
console.error(error);
|
|
@@ -47631,7 +47708,7 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
|
|
|
47631
47708
|
};
|
|
47632
47709
|
} finally {
|
|
47633
47710
|
console.info(
|
|
47634
|
-
|
|
47711
|
+
chalk2.hex("#0ea5e9").italic(
|
|
47635
47712
|
`\u23F1\uFE0F The${name ? ` ${name}` : ""} generator took ${Date.now() - startTime}ms to complete`
|
|
47636
47713
|
)
|
|
47637
47714
|
);
|