@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
|
@@ -1974,14 +1974,14 @@ var require_templates = __commonJS({
|
|
|
1974
1974
|
}
|
|
1975
1975
|
return results;
|
|
1976
1976
|
}
|
|
1977
|
-
function buildStyle(
|
|
1977
|
+
function buildStyle(chalk3, styles) {
|
|
1978
1978
|
const enabled = {};
|
|
1979
1979
|
for (const layer of styles) {
|
|
1980
1980
|
for (const style of layer.styles) {
|
|
1981
1981
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
1982
1982
|
}
|
|
1983
1983
|
}
|
|
1984
|
-
let current =
|
|
1984
|
+
let current = chalk3;
|
|
1985
1985
|
for (const styleName of Object.keys(enabled)) {
|
|
1986
1986
|
if (Array.isArray(enabled[styleName])) {
|
|
1987
1987
|
if (!(styleName in current)) {
|
|
@@ -1996,7 +1996,7 @@ var require_templates = __commonJS({
|
|
|
1996
1996
|
}
|
|
1997
1997
|
return current;
|
|
1998
1998
|
}
|
|
1999
|
-
module2.exports = (
|
|
1999
|
+
module2.exports = (chalk3, tmp) => {
|
|
2000
2000
|
const styles = [];
|
|
2001
2001
|
const chunks = [];
|
|
2002
2002
|
let chunk = [];
|
|
@@ -2006,13 +2006,13 @@ var require_templates = __commonJS({
|
|
|
2006
2006
|
} else if (style) {
|
|
2007
2007
|
const str = chunk.join("");
|
|
2008
2008
|
chunk = [];
|
|
2009
|
-
chunks.push(styles.length === 0 ? str : buildStyle(
|
|
2009
|
+
chunks.push(styles.length === 0 ? str : buildStyle(chalk3, styles)(str));
|
|
2010
2010
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
2011
2011
|
} else if (close) {
|
|
2012
2012
|
if (styles.length === 0) {
|
|
2013
2013
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
2014
2014
|
}
|
|
2015
|
-
chunks.push(buildStyle(
|
|
2015
|
+
chunks.push(buildStyle(chalk3, styles)(chunk.join("")));
|
|
2016
2016
|
chunk = [];
|
|
2017
2017
|
styles.pop();
|
|
2018
2018
|
} else {
|
|
@@ -2049,16 +2049,16 @@ var require_chalk = __commonJS({
|
|
|
2049
2049
|
}
|
|
2050
2050
|
function Chalk(options) {
|
|
2051
2051
|
if (!this || !(this instanceof Chalk) || this.template) {
|
|
2052
|
-
const
|
|
2053
|
-
applyOptions(
|
|
2054
|
-
|
|
2052
|
+
const chalk3 = {};
|
|
2053
|
+
applyOptions(chalk3, options);
|
|
2054
|
+
chalk3.template = function() {
|
|
2055
2055
|
const args = [].slice.call(arguments);
|
|
2056
|
-
return chalkTag.apply(null, [
|
|
2056
|
+
return chalkTag.apply(null, [chalk3.template].concat(args));
|
|
2057
2057
|
};
|
|
2058
|
-
Object.setPrototypeOf(
|
|
2059
|
-
Object.setPrototypeOf(
|
|
2060
|
-
|
|
2061
|
-
return
|
|
2058
|
+
Object.setPrototypeOf(chalk3, Chalk.prototype);
|
|
2059
|
+
Object.setPrototypeOf(chalk3.template, chalk3);
|
|
2060
|
+
chalk3.template.constructor = Chalk;
|
|
2061
|
+
return chalk3.template;
|
|
2062
2062
|
}
|
|
2063
2063
|
applyOptions(this, options);
|
|
2064
2064
|
}
|
|
@@ -2177,7 +2177,7 @@ var require_chalk = __commonJS({
|
|
|
2177
2177
|
ansiStyles.dim.open = originalDim;
|
|
2178
2178
|
return str;
|
|
2179
2179
|
}
|
|
2180
|
-
function chalkTag(
|
|
2180
|
+
function chalkTag(chalk3, strings) {
|
|
2181
2181
|
if (!Array.isArray(strings)) {
|
|
2182
2182
|
return [].slice.call(arguments, 1).join(" ");
|
|
2183
2183
|
}
|
|
@@ -2187,7 +2187,7 @@ var require_chalk = __commonJS({
|
|
|
2187
2187
|
parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
|
|
2188
2188
|
parts.push(String(strings.raw[i]));
|
|
2189
2189
|
}
|
|
2190
|
-
return template(
|
|
2190
|
+
return template(chalk3, parts.join(""));
|
|
2191
2191
|
}
|
|
2192
2192
|
Object.defineProperties(Chalk.prototype, styles);
|
|
2193
2193
|
module2.exports = Chalk();
|
|
@@ -2233,17 +2233,17 @@ var require_lib2 = __commonJS({
|
|
|
2233
2233
|
return n.default = e, t && t.set(e, n), n;
|
|
2234
2234
|
}
|
|
2235
2235
|
var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
|
|
2236
|
-
function getDefs(
|
|
2236
|
+
function getDefs(chalk3) {
|
|
2237
2237
|
return {
|
|
2238
|
-
keyword:
|
|
2239
|
-
capitalized:
|
|
2240
|
-
jsxIdentifier:
|
|
2241
|
-
punctuator:
|
|
2242
|
-
number:
|
|
2243
|
-
string:
|
|
2244
|
-
regex:
|
|
2245
|
-
comment:
|
|
2246
|
-
invalid:
|
|
2238
|
+
keyword: chalk3.cyan,
|
|
2239
|
+
capitalized: chalk3.yellow,
|
|
2240
|
+
jsxIdentifier: chalk3.yellow,
|
|
2241
|
+
punctuator: chalk3.yellow,
|
|
2242
|
+
number: chalk3.magenta,
|
|
2243
|
+
string: chalk3.green,
|
|
2244
|
+
regex: chalk3.magenta,
|
|
2245
|
+
comment: chalk3.grey,
|
|
2246
|
+
invalid: chalk3.white.bgRed.bold
|
|
2247
2247
|
};
|
|
2248
2248
|
}
|
|
2249
2249
|
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
@@ -2374,11 +2374,11 @@ var require_lib3 = __commonJS({
|
|
|
2374
2374
|
return _chalk.default;
|
|
2375
2375
|
}
|
|
2376
2376
|
var deprecationWarningShown = false;
|
|
2377
|
-
function getDefs(
|
|
2377
|
+
function getDefs(chalk3) {
|
|
2378
2378
|
return {
|
|
2379
|
-
gutter:
|
|
2380
|
-
marker:
|
|
2381
|
-
message:
|
|
2379
|
+
gutter: chalk3.grey,
|
|
2380
|
+
marker: chalk3.red.bold,
|
|
2381
|
+
message: chalk3.red.bold
|
|
2382
2382
|
};
|
|
2383
2383
|
}
|
|
2384
2384
|
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
@@ -2440,8 +2440,8 @@ var require_lib3 = __commonJS({
|
|
|
2440
2440
|
}
|
|
2441
2441
|
function codeFrameColumns(rawLines, loc, opts = {}) {
|
|
2442
2442
|
const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
|
|
2443
|
-
const
|
|
2444
|
-
const defs = getDefs(
|
|
2443
|
+
const chalk3 = getChalk(opts.forceColor);
|
|
2444
|
+
const defs = getDefs(chalk3);
|
|
2445
2445
|
const maybeHighlight = (chalkFn, string) => {
|
|
2446
2446
|
return highlighted ? chalkFn(string) : string;
|
|
2447
2447
|
};
|
|
@@ -2480,7 +2480,7 @@ var require_lib3 = __commonJS({
|
|
|
2480
2480
|
${frame}`;
|
|
2481
2481
|
}
|
|
2482
2482
|
if (highlighted) {
|
|
2483
|
-
return
|
|
2483
|
+
return chalk3.reset(frame);
|
|
2484
2484
|
} else {
|
|
2485
2485
|
return frame;
|
|
2486
2486
|
}
|
|
@@ -7794,14 +7794,14 @@ var require_templates2 = __commonJS({
|
|
|
7794
7794
|
}
|
|
7795
7795
|
return results;
|
|
7796
7796
|
}
|
|
7797
|
-
function buildStyle(
|
|
7797
|
+
function buildStyle(chalk3, styles) {
|
|
7798
7798
|
const enabled = {};
|
|
7799
7799
|
for (const layer of styles) {
|
|
7800
7800
|
for (const style of layer.styles) {
|
|
7801
7801
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
7802
7802
|
}
|
|
7803
7803
|
}
|
|
7804
|
-
let current =
|
|
7804
|
+
let current = chalk3;
|
|
7805
7805
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
7806
7806
|
if (!Array.isArray(styles2)) {
|
|
7807
7807
|
continue;
|
|
@@ -7813,7 +7813,7 @@ var require_templates2 = __commonJS({
|
|
|
7813
7813
|
}
|
|
7814
7814
|
return current;
|
|
7815
7815
|
}
|
|
7816
|
-
module2.exports = (
|
|
7816
|
+
module2.exports = (chalk3, temporary) => {
|
|
7817
7817
|
const styles = [];
|
|
7818
7818
|
const chunks = [];
|
|
7819
7819
|
let chunk = [];
|
|
@@ -7823,13 +7823,13 @@ var require_templates2 = __commonJS({
|
|
|
7823
7823
|
} else if (style) {
|
|
7824
7824
|
const string = chunk.join("");
|
|
7825
7825
|
chunk = [];
|
|
7826
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
|
7826
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk3, styles)(string));
|
|
7827
7827
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
7828
7828
|
} else if (close) {
|
|
7829
7829
|
if (styles.length === 0) {
|
|
7830
7830
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
7831
7831
|
}
|
|
7832
|
-
chunks.push(buildStyle(
|
|
7832
|
+
chunks.push(buildStyle(chalk3, styles)(chunk.join("")));
|
|
7833
7833
|
chunk = [];
|
|
7834
7834
|
styles.pop();
|
|
7835
7835
|
} else {
|
|
@@ -7877,16 +7877,16 @@ var require_source = __commonJS({
|
|
|
7877
7877
|
}
|
|
7878
7878
|
};
|
|
7879
7879
|
var chalkFactory = (options) => {
|
|
7880
|
-
const
|
|
7881
|
-
applyOptions(
|
|
7882
|
-
|
|
7883
|
-
Object.setPrototypeOf(
|
|
7884
|
-
Object.setPrototypeOf(
|
|
7885
|
-
|
|
7880
|
+
const chalk4 = {};
|
|
7881
|
+
applyOptions(chalk4, options);
|
|
7882
|
+
chalk4.template = (...arguments_) => chalkTag(chalk4.template, ...arguments_);
|
|
7883
|
+
Object.setPrototypeOf(chalk4, Chalk.prototype);
|
|
7884
|
+
Object.setPrototypeOf(chalk4.template, chalk4);
|
|
7885
|
+
chalk4.template.constructor = () => {
|
|
7886
7886
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
7887
7887
|
};
|
|
7888
|
-
|
|
7889
|
-
return
|
|
7888
|
+
chalk4.template.Instance = ChalkClass;
|
|
7889
|
+
return chalk4.template;
|
|
7890
7890
|
};
|
|
7891
7891
|
function Chalk(options) {
|
|
7892
7892
|
return chalkFactory(options);
|
|
@@ -7997,7 +7997,7 @@ var require_source = __commonJS({
|
|
|
7997
7997
|
return openAll + string + closeAll;
|
|
7998
7998
|
};
|
|
7999
7999
|
var template;
|
|
8000
|
-
var chalkTag = (
|
|
8000
|
+
var chalkTag = (chalk4, ...strings) => {
|
|
8001
8001
|
const [firstString] = strings;
|
|
8002
8002
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
8003
8003
|
return strings.join(" ");
|
|
@@ -8013,14 +8013,14 @@ var require_source = __commonJS({
|
|
|
8013
8013
|
if (template === void 0) {
|
|
8014
8014
|
template = require_templates2();
|
|
8015
8015
|
}
|
|
8016
|
-
return template(
|
|
8016
|
+
return template(chalk4, parts.join(""));
|
|
8017
8017
|
};
|
|
8018
8018
|
Object.defineProperties(Chalk.prototype, styles);
|
|
8019
|
-
var
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
module2.exports =
|
|
8019
|
+
var chalk3 = Chalk();
|
|
8020
|
+
chalk3.supportsColor = stdoutColor;
|
|
8021
|
+
chalk3.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
8022
|
+
chalk3.stderr.supportsColor = stderrColor;
|
|
8023
|
+
module2.exports = chalk3;
|
|
8024
8024
|
}
|
|
8025
8025
|
});
|
|
8026
8026
|
|
|
@@ -24382,14 +24382,14 @@ var require_share = __commonJS({
|
|
|
24382
24382
|
resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();
|
|
24383
24383
|
resetConnection = void 0;
|
|
24384
24384
|
};
|
|
24385
|
-
var
|
|
24385
|
+
var reset2 = function() {
|
|
24386
24386
|
cancelReset();
|
|
24387
24387
|
connection = subject = void 0;
|
|
24388
24388
|
hasCompleted = hasErrored = false;
|
|
24389
24389
|
};
|
|
24390
24390
|
var resetAndUnsubscribe = function() {
|
|
24391
24391
|
var conn = connection;
|
|
24392
|
-
|
|
24392
|
+
reset2();
|
|
24393
24393
|
conn === null || conn === void 0 ? void 0 : conn.unsubscribe();
|
|
24394
24394
|
};
|
|
24395
24395
|
return lift_1.operate(function(source, subscriber) {
|
|
@@ -24413,13 +24413,13 @@ var require_share = __commonJS({
|
|
|
24413
24413
|
error: function(err) {
|
|
24414
24414
|
hasErrored = true;
|
|
24415
24415
|
cancelReset();
|
|
24416
|
-
resetConnection = handleReset(
|
|
24416
|
+
resetConnection = handleReset(reset2, resetOnError, err);
|
|
24417
24417
|
dest.error(err);
|
|
24418
24418
|
},
|
|
24419
24419
|
complete: function() {
|
|
24420
24420
|
hasCompleted = true;
|
|
24421
24421
|
cancelReset();
|
|
24422
|
-
resetConnection = handleReset(
|
|
24422
|
+
resetConnection = handleReset(reset2, resetOnComplete);
|
|
24423
24423
|
dest.complete();
|
|
24424
24424
|
}
|
|
24425
24425
|
});
|
|
@@ -24429,13 +24429,13 @@ var require_share = __commonJS({
|
|
|
24429
24429
|
};
|
|
24430
24430
|
}
|
|
24431
24431
|
exports.share = share;
|
|
24432
|
-
function handleReset(
|
|
24432
|
+
function handleReset(reset2, on) {
|
|
24433
24433
|
var args = [];
|
|
24434
24434
|
for (var _i = 2; _i < arguments.length; _i++) {
|
|
24435
24435
|
args[_i - 2] = arguments[_i];
|
|
24436
24436
|
}
|
|
24437
24437
|
if (on === true) {
|
|
24438
|
-
|
|
24438
|
+
reset2();
|
|
24439
24439
|
return;
|
|
24440
24440
|
}
|
|
24441
24441
|
if (on === false) {
|
|
@@ -24444,7 +24444,7 @@ var require_share = __commonJS({
|
|
|
24444
24444
|
var onSubscriber = new Subscriber_1.SafeSubscriber({
|
|
24445
24445
|
next: function() {
|
|
24446
24446
|
onSubscriber.unsubscribe();
|
|
24447
|
-
|
|
24447
|
+
reset2();
|
|
24448
24448
|
}
|
|
24449
24449
|
});
|
|
24450
24450
|
return innerFrom_1.innerFrom(on.apply(void 0, __spreadArray2([], __read2(args)))).subscribe(onSubscriber);
|
|
@@ -26729,20 +26729,20 @@ var require_highlight = __commonJS({
|
|
|
26729
26729
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26730
26730
|
exports.highlight = void 0;
|
|
26731
26731
|
var jsTokens = require_js_tokens();
|
|
26732
|
-
var
|
|
26732
|
+
var chalk3 = require_source();
|
|
26733
26733
|
var identifiers_1 = require_identifiers2();
|
|
26734
|
-
function getDefs(
|
|
26734
|
+
function getDefs(chalk4) {
|
|
26735
26735
|
return {
|
|
26736
|
-
keyword:
|
|
26737
|
-
capitalized:
|
|
26738
|
-
jsx_tag:
|
|
26739
|
-
punctuator:
|
|
26736
|
+
keyword: chalk4.cyan,
|
|
26737
|
+
capitalized: chalk4.yellow,
|
|
26738
|
+
jsx_tag: chalk4.yellow,
|
|
26739
|
+
punctuator: chalk4.yellow,
|
|
26740
26740
|
// bracket: intentionally omitted.
|
|
26741
|
-
number:
|
|
26742
|
-
string:
|
|
26743
|
-
regex:
|
|
26744
|
-
comment:
|
|
26745
|
-
invalid:
|
|
26741
|
+
number: chalk4.magenta,
|
|
26742
|
+
string: chalk4.green,
|
|
26743
|
+
regex: chalk4.magenta,
|
|
26744
|
+
comment: chalk4.grey,
|
|
26745
|
+
invalid: chalk4.white.bgRed.bold
|
|
26746
26746
|
};
|
|
26747
26747
|
}
|
|
26748
26748
|
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
@@ -26782,7 +26782,7 @@ var require_highlight = __commonJS({
|
|
|
26782
26782
|
});
|
|
26783
26783
|
}
|
|
26784
26784
|
function highlight(code) {
|
|
26785
|
-
const defs = getDefs(
|
|
26785
|
+
const defs = getDefs(chalk3);
|
|
26786
26786
|
return highlightTokens(defs, code);
|
|
26787
26787
|
}
|
|
26788
26788
|
exports.highlight = highlight;
|
|
@@ -26895,7 +26895,7 @@ var require_run_type_check = __commonJS({
|
|
|
26895
26895
|
"use strict";
|
|
26896
26896
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26897
26897
|
exports.getFormattedDiagnostic = exports.runTypeCheck = exports.runTypeCheckWatch = void 0;
|
|
26898
|
-
var
|
|
26898
|
+
var chalk3 = require_source();
|
|
26899
26899
|
var path2 = require("path");
|
|
26900
26900
|
var code_frames_1 = require("nx/src/utils/code-frames");
|
|
26901
26901
|
var highlight_1 = require_highlight();
|
|
@@ -26975,17 +26975,17 @@ var require_run_type_check = __commonJS({
|
|
|
26975
26975
|
const category = diagnostic.category;
|
|
26976
26976
|
switch (category) {
|
|
26977
26977
|
case ts2.DiagnosticCategory.Warning: {
|
|
26978
|
-
message += `${
|
|
26978
|
+
message += `${chalk3.yellow.bold("warning")} ${chalk3.gray(`TS${diagnostic.code}`)}: `;
|
|
26979
26979
|
break;
|
|
26980
26980
|
}
|
|
26981
26981
|
case ts2.DiagnosticCategory.Error: {
|
|
26982
|
-
message += `${
|
|
26982
|
+
message += `${chalk3.red.bold("error")} ${chalk3.gray(`TS${diagnostic.code}`)}: `;
|
|
26983
26983
|
break;
|
|
26984
26984
|
}
|
|
26985
26985
|
case ts2.DiagnosticCategory.Suggestion:
|
|
26986
26986
|
case ts2.DiagnosticCategory.Message:
|
|
26987
26987
|
default: {
|
|
26988
|
-
message += `${
|
|
26988
|
+
message += `${chalk3.cyan.bold(category === 2 ? "suggestion" : "info")}: `;
|
|
26989
26989
|
break;
|
|
26990
26990
|
}
|
|
26991
26991
|
}
|
|
@@ -26995,7 +26995,7 @@ var require_run_type_check = __commonJS({
|
|
|
26995
26995
|
const line = pos.line + 1;
|
|
26996
26996
|
const column = pos.character + 1;
|
|
26997
26997
|
const fileName = path2.relative(workspaceRoot, diagnostic.file.fileName);
|
|
26998
|
-
message = `${
|
|
26998
|
+
message = `${chalk3.underline.blue(`${fileName}:${line}:${column}`)} - ` + message;
|
|
26999
26999
|
const code = diagnostic.file.getFullText(diagnostic.file.getSourceFile());
|
|
27000
27000
|
message += "\n" + (0, code_frames_1.codeFrameColumns)(code, {
|
|
27001
27001
|
start: { line, column }
|
|
@@ -38620,7 +38620,7 @@ var require_array2 = __commonJS({
|
|
|
38620
38620
|
parent.enabled = choices.every((ch) => ch.enabled === true);
|
|
38621
38621
|
parent = parent.parent;
|
|
38622
38622
|
}
|
|
38623
|
-
|
|
38623
|
+
reset2(this, this.choices);
|
|
38624
38624
|
this.emit("toggle", choice, this);
|
|
38625
38625
|
return choice;
|
|
38626
38626
|
}
|
|
@@ -38918,7 +38918,7 @@ var require_array2 = __commonJS({
|
|
|
38918
38918
|
}
|
|
38919
38919
|
}
|
|
38920
38920
|
get choices() {
|
|
38921
|
-
return
|
|
38921
|
+
return reset2(this, this.state.choices || []);
|
|
38922
38922
|
}
|
|
38923
38923
|
set visible(visible) {
|
|
38924
38924
|
this.state.visible = visible;
|
|
@@ -38966,7 +38966,7 @@ var require_array2 = __commonJS({
|
|
|
38966
38966
|
return this.multiple ? this.enabled : this.focused;
|
|
38967
38967
|
}
|
|
38968
38968
|
};
|
|
38969
|
-
function
|
|
38969
|
+
function reset2(prompt, choices) {
|
|
38970
38970
|
if (choices instanceof Promise)
|
|
38971
38971
|
return choices;
|
|
38972
38972
|
if (typeof choices === "function") {
|
|
@@ -46812,7 +46812,7 @@ var require_chunk_UIX4URMV = __commonJS({
|
|
|
46812
46812
|
magentaBright: () => magentaBright,
|
|
46813
46813
|
red: () => red,
|
|
46814
46814
|
redBright: () => redBright,
|
|
46815
|
-
reset: () =>
|
|
46815
|
+
reset: () => reset2,
|
|
46816
46816
|
strikethrough: () => strikethrough,
|
|
46817
46817
|
underline: () => underline,
|
|
46818
46818
|
white: () => white,
|
|
@@ -46889,7 +46889,7 @@ var require_chunk_UIX4URMV = __commonJS({
|
|
|
46889
46889
|
{}
|
|
46890
46890
|
);
|
|
46891
46891
|
var {
|
|
46892
|
-
reset,
|
|
46892
|
+
reset: reset2,
|
|
46893
46893
|
bold: bold2,
|
|
46894
46894
|
dim: dim2,
|
|
46895
46895
|
italic,
|
|
@@ -65095,7 +65095,7 @@ var require_Options_gen_types = __commonJS({
|
|
|
65095
65095
|
compiledFilename: "string"
|
|
65096
65096
|
});
|
|
65097
65097
|
exports.SourceMapOptions = SourceMapOptions;
|
|
65098
|
-
var
|
|
65098
|
+
var Options = t.iface([], {
|
|
65099
65099
|
transforms: t.array("Transform"),
|
|
65100
65100
|
disableESTransforms: t.opt("boolean"),
|
|
65101
65101
|
jsxRuntime: t.opt(t.union(t.lit("classic"), t.lit("automatic"), t.lit("preserve"))),
|
|
@@ -65111,7 +65111,7 @@ var require_Options_gen_types = __commonJS({
|
|
|
65111
65111
|
sourceMapOptions: t.opt("SourceMapOptions"),
|
|
65112
65112
|
filePath: t.opt("string")
|
|
65113
65113
|
});
|
|
65114
|
-
exports.Options =
|
|
65114
|
+
exports.Options = Options;
|
|
65115
65115
|
var exportedTypeSuite = {
|
|
65116
65116
|
Transform: exports.Transform,
|
|
65117
65117
|
SourceMapOptions: exports.SourceMapOptions,
|
|
@@ -78733,7 +78733,7 @@ var require_rollup = __commonJS({
|
|
|
78733
78733
|
{}
|
|
78734
78734
|
);
|
|
78735
78735
|
var {
|
|
78736
|
-
reset,
|
|
78736
|
+
reset: reset2,
|
|
78737
78737
|
bold: bold$1,
|
|
78738
78738
|
dim: dim$1,
|
|
78739
78739
|
italic,
|
|
@@ -93603,19 +93603,19 @@ ${outro}`;
|
|
|
93603
93603
|
function keep(key, value) {
|
|
93604
93604
|
if (++num > limit) {
|
|
93605
93605
|
prev = curr;
|
|
93606
|
-
|
|
93606
|
+
reset3(1);
|
|
93607
93607
|
++num;
|
|
93608
93608
|
}
|
|
93609
93609
|
curr[key] = value;
|
|
93610
93610
|
}
|
|
93611
|
-
function
|
|
93611
|
+
function reset3(isPartial) {
|
|
93612
93612
|
num = 0;
|
|
93613
93613
|
curr = /* @__PURE__ */ Object.create(null);
|
|
93614
93614
|
isPartial || (prev = /* @__PURE__ */ Object.create(null));
|
|
93615
93615
|
}
|
|
93616
|
-
|
|
93616
|
+
reset3();
|
|
93617
93617
|
return {
|
|
93618
|
-
clear:
|
|
93618
|
+
clear: reset3,
|
|
93619
93619
|
has: function(key) {
|
|
93620
93620
|
return curr[key] !== void 0 || prev[key] !== void 0;
|
|
93621
93621
|
},
|
|
@@ -126346,8 +126346,10 @@ var LogLevel = {
|
|
|
126346
126346
|
ERROR: 20,
|
|
126347
126347
|
WARN: 30,
|
|
126348
126348
|
INFO: 40,
|
|
126349
|
+
SUCCESS: 45,
|
|
126349
126350
|
DEBUG: 60,
|
|
126350
|
-
TRACE: 70
|
|
126351
|
+
TRACE: 70,
|
|
126352
|
+
ALL: 100
|
|
126351
126353
|
};
|
|
126352
126354
|
var LogLevelLabel = {
|
|
126353
126355
|
SILENT: "silent",
|
|
@@ -126356,7 +126358,8 @@ var LogLevelLabel = {
|
|
|
126356
126358
|
WARN: "warn",
|
|
126357
126359
|
INFO: "info",
|
|
126358
126360
|
DEBUG: "debug",
|
|
126359
|
-
TRACE: "trace"
|
|
126361
|
+
TRACE: "trace",
|
|
126362
|
+
ALL: "all"
|
|
126360
126363
|
};
|
|
126361
126364
|
|
|
126362
126365
|
// packages/config-tools/src/utilities/find-up.ts
|
|
@@ -126365,15 +126368,15 @@ var import_path = require("path");
|
|
|
126365
126368
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
126366
126369
|
var depth = 0;
|
|
126367
126370
|
function findFolderUp(startPath, endFileNames) {
|
|
126368
|
-
|
|
126369
|
-
if (endFileNames.some((endFileName) => (0, import_fs.existsSync)((0, import_path.join)(
|
|
126370
|
-
return
|
|
126371
|
-
}
|
|
126372
|
-
|
|
126371
|
+
const _startPath = startPath ?? process.cwd();
|
|
126372
|
+
if (endFileNames.some((endFileName) => (0, import_fs.existsSync)((0, import_path.join)(_startPath, endFileName)))) {
|
|
126373
|
+
return _startPath;
|
|
126374
|
+
}
|
|
126375
|
+
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
126376
|
+
const parent = (0, import_path.join)(_startPath, "..");
|
|
126373
126377
|
return findFolderUp(parent, endFileNames);
|
|
126374
|
-
} else {
|
|
126375
|
-
return void 0;
|
|
126376
126378
|
}
|
|
126379
|
+
return void 0;
|
|
126377
126380
|
}
|
|
126378
126381
|
|
|
126379
126382
|
// packages/config-tools/src/utilities/find-workspace-root.ts
|
|
@@ -130030,17 +130033,13 @@ var StormConfigSchema = objectType({
|
|
|
130030
130033
|
license: stringType().trim().default("Apache License 2.0").describe("The root directory of the package"),
|
|
130031
130034
|
homepage: stringType().trim().url().default("https://stormsoftware.org").describe("The homepage of the workspace"),
|
|
130032
130035
|
branch: stringType().trim().default("main").describe("The branch of the workspace"),
|
|
130033
|
-
preMajor: booleanType().default(false).describe(
|
|
130034
|
-
"An indicator specifying if the package is still in it's pre-major version"
|
|
130035
|
-
),
|
|
130036
|
+
preMajor: booleanType().default(false).describe("An indicator specifying if the package is still in it's pre-major version"),
|
|
130036
130037
|
owner: stringType().trim().default("@storm-software/development").describe("The owner of the package"),
|
|
130037
130038
|
worker: stringType().trim().default("stormie-bot").describe(
|
|
130038
130039
|
"The worker of the package (this is the bot that will be used to perform various tasks)"
|
|
130039
130040
|
),
|
|
130040
130041
|
env: enumType(["development", "staging", "production"]).default("production").describe("The current runtime environment of the package"),
|
|
130041
|
-
ci: booleanType().default(true).describe(
|
|
130042
|
-
"An indicator specifying if the current environment is a CI environment"
|
|
130043
|
-
),
|
|
130042
|
+
ci: booleanType().default(true).describe("An indicator specifying if the current environment is a CI environment"),
|
|
130044
130043
|
workspaceRoot: stringType().trim().optional().describe("The root directory of the workspace"),
|
|
130045
130044
|
packageDirectory: stringType().trim().optional().describe("The root directory of the package"),
|
|
130046
130045
|
buildDirectory: stringType().trim().default("dist").describe("The build directory for the workspace"),
|
|
@@ -130051,7 +130050,7 @@ var StormConfigSchema = objectType({
|
|
|
130051
130050
|
packageManager: enumType(["npm", "yarn", "pnpm", "bun"]).default("npm").describe("The package manager used by the repository"),
|
|
130052
130051
|
timezone: stringType().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
130053
130052
|
locale: stringType().trim().default("en-US").describe("The default locale of the workspace"),
|
|
130054
|
-
logLevel: enumType(["silent", "fatal", "error", "warn", "info", "debug", "trace"]).default("debug").describe(
|
|
130053
|
+
logLevel: enumType(["silent", "fatal", "error", "warn", "info", "debug", "trace", "all"]).default("debug").describe(
|
|
130055
130054
|
"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`)."
|
|
130056
130055
|
),
|
|
130057
130056
|
configFile: stringType().trim().nullable().default(null).describe(
|
|
@@ -130109,11 +130108,21 @@ var getDefaultConfig = (config = {}, root) => {
|
|
|
130109
130108
|
});
|
|
130110
130109
|
if (file) {
|
|
130111
130110
|
const packageJson = JSON.parse(file);
|
|
130112
|
-
|
|
130113
|
-
|
|
130114
|
-
|
|
130115
|
-
|
|
130116
|
-
|
|
130111
|
+
if (packageJson.name) {
|
|
130112
|
+
name = packageJson.name;
|
|
130113
|
+
}
|
|
130114
|
+
if (packageJson.namespace) {
|
|
130115
|
+
namespace = packageJson.namespace;
|
|
130116
|
+
}
|
|
130117
|
+
if (packageJson.repository?.url) {
|
|
130118
|
+
repository = packageJson.repository?.url;
|
|
130119
|
+
}
|
|
130120
|
+
if (packageJson.license) {
|
|
130121
|
+
license = packageJson.license;
|
|
130122
|
+
}
|
|
130123
|
+
if (packageJson.homepage) {
|
|
130124
|
+
homepage = packageJson.homepage;
|
|
130125
|
+
}
|
|
130117
130126
|
}
|
|
130118
130127
|
}
|
|
130119
130128
|
return StormConfigSchema.parse({
|
|
@@ -130135,6 +130144,8 @@ var getDefaultConfig = (config = {}, root) => {
|
|
|
130135
130144
|
// packages/config-tools/src/utilities/get-log-level.ts
|
|
130136
130145
|
var getLogLevel = (label) => {
|
|
130137
130146
|
switch (label) {
|
|
130147
|
+
case "all":
|
|
130148
|
+
return LogLevel.ALL;
|
|
130138
130149
|
case "trace":
|
|
130139
130150
|
return LogLevel.TRACE;
|
|
130140
130151
|
case "debug":
|
|
@@ -130154,38 +130165,129 @@ var getLogLevel = (label) => {
|
|
|
130154
130165
|
}
|
|
130155
130166
|
};
|
|
130156
130167
|
var getLogLevelLabel = (logLevel) => {
|
|
130168
|
+
if (logLevel >= LogLevel.ALL) {
|
|
130169
|
+
return LogLevelLabel.ALL;
|
|
130170
|
+
}
|
|
130157
130171
|
if (logLevel >= LogLevel.TRACE) {
|
|
130158
130172
|
return LogLevelLabel.TRACE;
|
|
130159
|
-
}
|
|
130173
|
+
}
|
|
130174
|
+
if (logLevel >= LogLevel.DEBUG) {
|
|
130160
130175
|
return LogLevelLabel.DEBUG;
|
|
130161
|
-
}
|
|
130176
|
+
}
|
|
130177
|
+
if (logLevel >= LogLevel.INFO) {
|
|
130162
130178
|
return LogLevelLabel.INFO;
|
|
130163
|
-
}
|
|
130179
|
+
}
|
|
130180
|
+
if (logLevel >= LogLevel.WARN) {
|
|
130164
130181
|
return LogLevelLabel.WARN;
|
|
130165
|
-
}
|
|
130182
|
+
}
|
|
130183
|
+
if (logLevel >= LogLevel.ERROR) {
|
|
130166
130184
|
return LogLevelLabel.ERROR;
|
|
130167
|
-
}
|
|
130185
|
+
}
|
|
130186
|
+
if (logLevel >= LogLevel.FATAL) {
|
|
130168
130187
|
return LogLevelLabel.FATAL;
|
|
130169
|
-
}
|
|
130188
|
+
}
|
|
130189
|
+
if (logLevel <= LogLevel.SILENT) {
|
|
130170
130190
|
return LogLevelLabel.SILENT;
|
|
130171
|
-
} else {
|
|
130172
|
-
return LogLevelLabel.INFO;
|
|
130173
130191
|
}
|
|
130192
|
+
return LogLevelLabel.INFO;
|
|
130174
130193
|
};
|
|
130175
130194
|
|
|
130195
|
+
// packages/config-tools/src/utilities/logger.ts
|
|
130196
|
+
var chalk = __toESM(require_source(), 1);
|
|
130197
|
+
var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
130198
|
+
if (typeof logLevel === "number" && (logLevel >= getLogLevel(config.logLevel ?? process.env?.STORM_LOG_LEVEL) || logLevel <= LogLevel.SILENT) || typeof logLevel === "string" && getLogLevel(logLevel) >= getLogLevel(config.logLevel ?? process.env?.STORM_LOG_LEVEL)) {
|
|
130199
|
+
return (message) => {
|
|
130200
|
+
};
|
|
130201
|
+
}
|
|
130202
|
+
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
130203
|
+
return (message) => {
|
|
130204
|
+
console.error(
|
|
130205
|
+
` ${chalk.bold.bgHex(config?.colors?.fatal ? config.colors.fatal : "#1fb2a6").inverse("\n\n \u{1F480} Fatal ")} ${chalk.reset.hex(
|
|
130206
|
+
config?.colors?.fatal ? config.colors.fatal : "#1fb2a6"
|
|
130207
|
+
)(message)}
|
|
130208
|
+
`
|
|
130209
|
+
);
|
|
130210
|
+
};
|
|
130211
|
+
}
|
|
130212
|
+
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel || typeof logLevel === "string" && LogLevel.ERROR >= getLogLevel(logLevel)) {
|
|
130213
|
+
return (message) => {
|
|
130214
|
+
console.error(
|
|
130215
|
+
` ${chalk.bold.bgHex(config?.colors?.error ? config.colors.error : "#7d1a1a").inverse("\n\n \u{1F6D1} Error ")} ${chalk.reset.hex(
|
|
130216
|
+
config?.colors?.error ? config.colors.error : "#7d1a1a"
|
|
130217
|
+
)(message)}
|
|
130218
|
+
`
|
|
130219
|
+
);
|
|
130220
|
+
};
|
|
130221
|
+
}
|
|
130222
|
+
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel || typeof logLevel === "string" && LogLevel.WARN >= getLogLevel(logLevel)) {
|
|
130223
|
+
return (message) => {
|
|
130224
|
+
console.warn(
|
|
130225
|
+
` ${chalk.bold.bgHex(config?.colors?.warning ? config.colors.warning : "#fcc419").inverse("\n\n \u26A0\uFE0F Warn ")} ${chalk.reset.hex(
|
|
130226
|
+
config?.colors?.warning ? config.colors.warning : "#fcc419"
|
|
130227
|
+
)(message)}
|
|
130228
|
+
`
|
|
130229
|
+
);
|
|
130230
|
+
};
|
|
130231
|
+
}
|
|
130232
|
+
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
130233
|
+
return (message) => {
|
|
130234
|
+
console.info(
|
|
130235
|
+
` ${chalk.bold.bgHex(config?.colors?.info ? config.colors.info : "#0ea5e9").inverse("\n\n \u{1F4EC} Info ")} ${chalk.reset.hex(
|
|
130236
|
+
config?.colors?.info ? config.colors.info : "#0ea5e9"
|
|
130237
|
+
)(message)}
|
|
130238
|
+
`
|
|
130239
|
+
);
|
|
130240
|
+
};
|
|
130241
|
+
}
|
|
130242
|
+
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel || typeof logLevel === "string" && LogLevel.INFO >= getLogLevel(logLevel)) {
|
|
130243
|
+
return (message) => {
|
|
130244
|
+
console.info(
|
|
130245
|
+
` ${chalk.bold.bgHex(config?.colors?.success ? config.colors.success : "#087f5b").inverse("\n\n \u{1F389} Success ")} ${chalk.reset.hex(
|
|
130246
|
+
config?.colors?.success ? config.colors.success : "#087f5b"
|
|
130247
|
+
)(message)}
|
|
130248
|
+
`
|
|
130249
|
+
);
|
|
130250
|
+
};
|
|
130251
|
+
}
|
|
130252
|
+
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel || typeof logLevel === "string" && LogLevel.DEBUG >= getLogLevel(logLevel)) {
|
|
130253
|
+
return (message) => {
|
|
130254
|
+
console.debug(
|
|
130255
|
+
` ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").inverse("\n\n \u{1F9EA} Debug ")} ${chalk.reset.hex(
|
|
130256
|
+
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
130257
|
+
)(message)}
|
|
130258
|
+
`
|
|
130259
|
+
);
|
|
130260
|
+
};
|
|
130261
|
+
}
|
|
130262
|
+
return (message) => {
|
|
130263
|
+
console.log(
|
|
130264
|
+
` ${chalk.bold.bgHex(config?.colors?.primary ? config.colors.primary : "#1fb2a6").inverse("\n\n \u{1F4E2} System ")} ${chalk.bold.hex(
|
|
130265
|
+
config?.colors?.primary ? config.colors.primary : "#1fb2a6"
|
|
130266
|
+
)(message)}
|
|
130267
|
+
`
|
|
130268
|
+
);
|
|
130269
|
+
};
|
|
130270
|
+
};
|
|
130271
|
+
var writeFatal = (config, message) => getLogFn(config, LogLevel.FATAL)(message);
|
|
130272
|
+
var writeError = (config, message) => getLogFn(config, LogLevel.ERROR)(message);
|
|
130273
|
+
var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
|
|
130274
|
+
var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
|
|
130275
|
+
var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
|
|
130276
|
+
var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
|
|
130277
|
+
|
|
130176
130278
|
// packages/config-tools/src/env/get-env.ts
|
|
130177
130279
|
var getExtensionEnv = (extensionName) => {
|
|
130178
130280
|
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
130179
130281
|
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
130180
|
-
const name = key.replace(prefix, "").split("_").map(
|
|
130181
|
-
|
|
130182
|
-
|
|
130183
|
-
|
|
130282
|
+
const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
|
|
130283
|
+
if (name) {
|
|
130284
|
+
ret[name] = process.env[key];
|
|
130285
|
+
}
|
|
130184
130286
|
return ret;
|
|
130185
130287
|
}, {});
|
|
130186
130288
|
};
|
|
130187
130289
|
var getConfigEnv = () => {
|
|
130188
|
-
const prefix =
|
|
130290
|
+
const prefix = "STORM_";
|
|
130189
130291
|
let config = {
|
|
130190
130292
|
name: process.env[`${prefix}NAME`],
|
|
130191
130293
|
namespace: process.env[`${prefix}NAMESPACE`],
|
|
@@ -130204,9 +130306,7 @@ var getConfigEnv = () => {
|
|
|
130204
130306
|
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
130205
130307
|
runtimeDirectory: process.env[`${prefix}RUNTIME_DIRECTORY`],
|
|
130206
130308
|
env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
130207
|
-
ci: Boolean(
|
|
130208
|
-
process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION
|
|
130209
|
-
),
|
|
130309
|
+
ci: Boolean(process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION),
|
|
130210
130310
|
colors: {
|
|
130211
130311
|
primary: process.env[`${prefix}COLOR_PRIMARY`],
|
|
130212
130312
|
background: process.env[`${prefix}COLOR_BACKGROUND`],
|
|
@@ -130219,9 +130319,7 @@ var getConfigEnv = () => {
|
|
|
130219
130319
|
repository: process.env[`${prefix}REPOSITORY`],
|
|
130220
130320
|
branch: process.env[`${prefix}BRANCH`],
|
|
130221
130321
|
preMajor: Boolean(process.env[`${prefix}PRE_MAJOR`]),
|
|
130222
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? Number.isSafeInteger(
|
|
130223
|
-
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
130224
|
-
) ? getLogLevelLabel(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : LogLevelLabel.INFO,
|
|
130322
|
+
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,
|
|
130225
130323
|
extensions: {}
|
|
130226
130324
|
};
|
|
130227
130325
|
const serializedConfig = process.env[`${prefix}CONFIG`];
|
|
@@ -130236,26 +130334,27 @@ var getConfigEnv = () => {
|
|
|
130236
130334
|
}
|
|
130237
130335
|
const extensionPrefix = `${prefix}EXTENSION_`;
|
|
130238
130336
|
return Object.keys(process.env).filter((key) => key.startsWith(extensionPrefix)).reduce((ret, key) => {
|
|
130239
|
-
const extensionName = key.substring(prefix.length, key.indexOf("_", prefix.length)).split("_").map(
|
|
130240
|
-
|
|
130241
|
-
|
|
130242
|
-
|
|
130337
|
+
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("");
|
|
130338
|
+
if (extensionName) {
|
|
130339
|
+
ret.extensions[extensionName] = getExtensionEnv(extensionName);
|
|
130340
|
+
}
|
|
130243
130341
|
return ret;
|
|
130244
130342
|
}, config);
|
|
130245
130343
|
};
|
|
130246
130344
|
|
|
130247
130345
|
// packages/config-tools/src/env/set-env.ts
|
|
130248
130346
|
var setExtensionEnv = (extensionName, extension) => {
|
|
130249
|
-
Object.keys(extension ?? {})
|
|
130347
|
+
for (const key of Object.keys(extension ?? {})) {
|
|
130250
130348
|
if (extension[key]) {
|
|
130251
|
-
|
|
130349
|
+
const result = key?.replace(
|
|
130252
130350
|
/([A-Z])+/g,
|
|
130253
130351
|
(input) => input ? input[0].toUpperCase() + input.slice(1) : ""
|
|
130254
130352
|
).split(/(?=[A-Z])|[\.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
|
|
130255
130353
|
let extensionKey;
|
|
130256
130354
|
if (result.length === 0) {
|
|
130257
130355
|
return;
|
|
130258
|
-
}
|
|
130356
|
+
}
|
|
130357
|
+
if (result.length === 1) {
|
|
130259
130358
|
extensionKey = result[0].toUpperCase();
|
|
130260
130359
|
} else {
|
|
130261
130360
|
extensionKey = result.reduce((ret, part) => {
|
|
@@ -130264,63 +130363,121 @@ var setExtensionEnv = (extensionName, extension) => {
|
|
|
130264
130363
|
}
|
|
130265
130364
|
process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
|
|
130266
130365
|
}
|
|
130267
|
-
}
|
|
130366
|
+
}
|
|
130268
130367
|
};
|
|
130269
130368
|
var setConfigEnv = (config) => {
|
|
130270
|
-
const prefix =
|
|
130271
|
-
|
|
130272
|
-
|
|
130273
|
-
|
|
130274
|
-
|
|
130275
|
-
|
|
130276
|
-
|
|
130277
|
-
|
|
130278
|
-
|
|
130279
|
-
|
|
130280
|
-
|
|
130281
|
-
|
|
130282
|
-
|
|
130283
|
-
|
|
130284
|
-
|
|
130285
|
-
|
|
130286
|
-
|
|
130287
|
-
|
|
130288
|
-
|
|
130289
|
-
|
|
130290
|
-
|
|
130291
|
-
|
|
130292
|
-
|
|
130293
|
-
|
|
130294
|
-
|
|
130295
|
-
|
|
130296
|
-
|
|
130297
|
-
|
|
130298
|
-
|
|
130299
|
-
|
|
130300
|
-
|
|
130301
|
-
|
|
130302
|
-
|
|
130303
|
-
|
|
130304
|
-
|
|
130305
|
-
|
|
130306
|
-
|
|
130307
|
-
|
|
130308
|
-
|
|
130309
|
-
|
|
130310
|
-
|
|
130311
|
-
|
|
130312
|
-
|
|
130313
|
-
|
|
130314
|
-
)
|
|
130315
|
-
|
|
130316
|
-
|
|
130317
|
-
|
|
130369
|
+
const prefix = "STORM_";
|
|
130370
|
+
if (config.name) {
|
|
130371
|
+
process.env[`${prefix}NAME`] = config.name;
|
|
130372
|
+
}
|
|
130373
|
+
if (config.namespace) {
|
|
130374
|
+
process.env[`${prefix}NAMESPACE`] = config.namespace;
|
|
130375
|
+
}
|
|
130376
|
+
if (config.owner) {
|
|
130377
|
+
process.env[`${prefix}OWNER`] = config.owner;
|
|
130378
|
+
}
|
|
130379
|
+
if (config.worker) {
|
|
130380
|
+
process.env[`${prefix}WORKER`] = config.worker;
|
|
130381
|
+
}
|
|
130382
|
+
if (config.organization) {
|
|
130383
|
+
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
130384
|
+
}
|
|
130385
|
+
if (config.packageManager) {
|
|
130386
|
+
process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager;
|
|
130387
|
+
}
|
|
130388
|
+
if (config.license) {
|
|
130389
|
+
process.env[`${prefix}LICENSE`] = config.license;
|
|
130390
|
+
}
|
|
130391
|
+
if (config.homepage) {
|
|
130392
|
+
process.env[`${prefix}HOMEPAGE`] = config.homepage;
|
|
130393
|
+
}
|
|
130394
|
+
if (config.timezone) {
|
|
130395
|
+
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
130396
|
+
process.env.TZ = config.timezone;
|
|
130397
|
+
process.env.DEFAULT_TIMEZONE = config.timezone;
|
|
130398
|
+
}
|
|
130399
|
+
if (config.locale) {
|
|
130400
|
+
process.env[`${prefix}LOCALE`] = config.locale;
|
|
130401
|
+
process.env.LOCALE = config.locale;
|
|
130402
|
+
process.env.DEFAULT_LOCALE = config.locale;
|
|
130403
|
+
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
130404
|
+
}
|
|
130405
|
+
if (config.configFile) {
|
|
130406
|
+
process.env[`${prefix}CONFIG_FILE`] = config.configFile;
|
|
130407
|
+
}
|
|
130408
|
+
if (config.workspaceRoot) {
|
|
130409
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = config.workspaceRoot;
|
|
130410
|
+
process.env.NX_WORKSPACE_ROOT = config.workspaceRoot;
|
|
130411
|
+
process.env.NX_WORKSPACE_ROOT_PATH = config.workspaceRoot;
|
|
130412
|
+
}
|
|
130413
|
+
if (config.packageDirectory) {
|
|
130414
|
+
process.env[`${prefix}PACKAGE_DIRECTORY`] = config.packageDirectory;
|
|
130415
|
+
}
|
|
130416
|
+
if (config.buildDirectory) {
|
|
130417
|
+
process.env[`${prefix}BUILD_DIRECTORY`] = config.buildDirectory;
|
|
130418
|
+
}
|
|
130419
|
+
if (config.runtimeVersion) {
|
|
130420
|
+
process.env[`${prefix}RUNTIME_VERSION`] = config.runtimeVersion;
|
|
130421
|
+
}
|
|
130422
|
+
if (config.runtimeDirectory) {
|
|
130423
|
+
process.env[`${prefix}RUNTIME_DIRECTORY`] = config.runtimeDirectory;
|
|
130424
|
+
}
|
|
130425
|
+
if (config.env) {
|
|
130426
|
+
process.env[`${prefix}ENV`] = config.env;
|
|
130427
|
+
process.env.NODE_ENV = config.env;
|
|
130428
|
+
process.env.ENVIRONMENT = config.env;
|
|
130429
|
+
}
|
|
130430
|
+
if (config.ci) {
|
|
130431
|
+
process.env[`${prefix}CI`] = String(config.ci);
|
|
130432
|
+
process.env.CI = String(config.ci);
|
|
130433
|
+
process.env.CONTINUOUS_INTEGRATION = String(config.ci);
|
|
130434
|
+
}
|
|
130435
|
+
if (config.colors.primary) {
|
|
130436
|
+
process.env[`${prefix}COLOR_PRIMARY`] = config.colors.primary;
|
|
130437
|
+
}
|
|
130438
|
+
if (config.colors.background) {
|
|
130439
|
+
process.env[`${prefix}COLOR_BACKGROUND`] = config.colors.background;
|
|
130440
|
+
}
|
|
130441
|
+
if (config.colors.success) {
|
|
130442
|
+
process.env[`${prefix}COLOR_SUCCESS`] = config.colors.success;
|
|
130443
|
+
}
|
|
130444
|
+
if (config.colors.info) {
|
|
130445
|
+
process.env[`${prefix}COLOR_INFO`] = config.colors.info;
|
|
130446
|
+
}
|
|
130447
|
+
if (config.colors.warning) {
|
|
130448
|
+
process.env[`${prefix}COLOR_WARNING`] = config.colors.warning;
|
|
130449
|
+
}
|
|
130450
|
+
if (config.colors.error) {
|
|
130451
|
+
process.env[`${prefix}COLOR_ERROR`] = config.colors.error;
|
|
130452
|
+
}
|
|
130453
|
+
if (config.colors.fatal) {
|
|
130454
|
+
process.env[`${prefix}COLOR_FATAL`] = config.colors.fatal;
|
|
130455
|
+
}
|
|
130456
|
+
if (config.repository) {
|
|
130457
|
+
process.env[`${prefix}REPOSITORY`] = config.repository;
|
|
130458
|
+
}
|
|
130459
|
+
if (config.branch) {
|
|
130460
|
+
process.env[`${prefix}BRANCH`] = config.branch;
|
|
130461
|
+
}
|
|
130462
|
+
if (config.preMajor) {
|
|
130463
|
+
process.env[`${prefix}PRE_MAJOR`] = String(config.preMajor);
|
|
130464
|
+
}
|
|
130465
|
+
if (config.logLevel) {
|
|
130466
|
+
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
130467
|
+
process.env.LOG_LEVEL = String(config.logLevel);
|
|
130468
|
+
process.env.NX_VERBOSE_LOGGING = String(
|
|
130469
|
+
getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
|
|
130470
|
+
);
|
|
130471
|
+
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
130472
|
+
}
|
|
130473
|
+
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
130474
|
+
for (const key of Object.keys(config.extensions ?? {})) {
|
|
130318
130475
|
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
130319
|
-
}
|
|
130476
|
+
}
|
|
130320
130477
|
};
|
|
130321
130478
|
|
|
130322
130479
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
130323
|
-
var
|
|
130480
|
+
var chalk2 = __toESM(require_source());
|
|
130324
130481
|
|
|
130325
130482
|
// packages/workspace-tools/src/utils/get-workspace-root.ts
|
|
130326
130483
|
var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
|
|
@@ -130408,16 +130565,13 @@ var applyWorkspaceTokens = (options, config, tokenizerFn) => {
|
|
|
130408
130565
|
};
|
|
130409
130566
|
|
|
130410
130567
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
130411
|
-
var withRunExecutor = (name, executorFn, executorOptions
|
|
130412
|
-
skipReadingConfig: false,
|
|
130413
|
-
hooks: {}
|
|
130414
|
-
}) => async (_options, context) => {
|
|
130568
|
+
var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
|
|
130415
130569
|
const startTime = Date.now();
|
|
130416
130570
|
let options = _options;
|
|
130571
|
+
let config;
|
|
130417
130572
|
try {
|
|
130418
|
-
|
|
130419
|
-
|
|
130420
|
-
`));
|
|
130573
|
+
writeInfo(config, `\u26A1 Running the ${name} executor...
|
|
130574
|
+
`);
|
|
130421
130575
|
if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
130422
130576
|
throw new Error(
|
|
130423
130577
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -130427,26 +130581,37 @@ var withRunExecutor = (name, executorFn, executorOptions = {
|
|
|
130427
130581
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
130428
130582
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot;
|
|
130429
130583
|
const projectName = context.projectsConfigurations.projects[context.projectName].name;
|
|
130430
|
-
let config;
|
|
130431
130584
|
if (!executorOptions.skipReadingConfig) {
|
|
130585
|
+
writeDebug(
|
|
130586
|
+
config,
|
|
130587
|
+
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
130588
|
+
- workspaceRoot: ${workspaceRoot}
|
|
130589
|
+
- projectRoot: ${projectRoot}
|
|
130590
|
+
- sourceRoot: ${sourceRoot}
|
|
130591
|
+
- projectName: ${projectName}
|
|
130592
|
+
`
|
|
130593
|
+
);
|
|
130432
130594
|
config = getDefaultConfig({
|
|
130433
130595
|
...await getConfigFile(),
|
|
130434
130596
|
...getConfigEnv()
|
|
130435
130597
|
});
|
|
130436
130598
|
setConfigEnv(config);
|
|
130437
|
-
|
|
130438
|
-
|
|
130439
|
-
|
|
130440
|
-
${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\n")}`
|
|
130441
|
-
)
|
|
130599
|
+
writeTrace(
|
|
130600
|
+
config,
|
|
130601
|
+
`Loaded Storm config into env:
|
|
130602
|
+
${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`
|
|
130442
130603
|
);
|
|
130443
130604
|
}
|
|
130444
130605
|
if (executorOptions?.hooks?.applyDefaultOptions) {
|
|
130445
|
-
|
|
130606
|
+
writeDebug(config, "Running the applyDefaultOptions hook...");
|
|
130446
130607
|
options = await Promise.resolve(executorOptions.hooks.applyDefaultOptions(options, config));
|
|
130447
|
-
|
|
130608
|
+
writeDebug(config, "Completed the applyDefaultOptions hook");
|
|
130448
130609
|
}
|
|
130449
|
-
|
|
130610
|
+
writeTrace(
|
|
130611
|
+
config,
|
|
130612
|
+
`Executor schema options \u2699\uFE0F
|
|
130613
|
+
${Object.keys(options).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`
|
|
130614
|
+
);
|
|
130450
130615
|
const tokenized = applyWorkspaceTokens(
|
|
130451
130616
|
options,
|
|
130452
130617
|
{
|
|
@@ -130461,9 +130626,9 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
|
|
|
130461
130626
|
applyWorkspaceExecutorTokens
|
|
130462
130627
|
);
|
|
130463
130628
|
if (executorOptions?.hooks?.preProcess) {
|
|
130464
|
-
|
|
130629
|
+
writeDebug(config, "Running the preProcess hook...");
|
|
130465
130630
|
await Promise.resolve(executorOptions.hooks.preProcess(tokenized, config));
|
|
130466
|
-
|
|
130631
|
+
writeDebug(config, "Completed the preProcess hook");
|
|
130467
130632
|
}
|
|
130468
130633
|
const result = await Promise.resolve(executorFn(tokenized, context, config));
|
|
130469
130634
|
if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
|
|
@@ -130472,31 +130637,32 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
|
|
|
130472
130637
|
});
|
|
130473
130638
|
}
|
|
130474
130639
|
if (executorOptions?.hooks?.postProcess) {
|
|
130475
|
-
|
|
130640
|
+
writeDebug(config, "Running the postProcess hook...");
|
|
130476
130641
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
130477
|
-
|
|
130642
|
+
writeDebug(config, "Completed the postProcess hook");
|
|
130478
130643
|
}
|
|
130479
|
-
|
|
130480
|
-
|
|
130481
|
-
|
|
130482
|
-
\u{1F389} Successfully completed running the ${name} executor!
|
|
130483
|
-
|
|
130484
|
-
`)
|
|
130485
|
-
);
|
|
130644
|
+
writeSuccess(config, `Completed running the ${name} task executor!
|
|
130645
|
+
`);
|
|
130486
130646
|
return {
|
|
130487
130647
|
success: true
|
|
130488
130648
|
};
|
|
130489
130649
|
} catch (error) {
|
|
130490
|
-
|
|
130491
|
-
|
|
130492
|
-
error
|
|
130650
|
+
writeFatal(
|
|
130651
|
+
config,
|
|
130652
|
+
"A fatal error occurred while running the executor - the process was forced to terminate"
|
|
130653
|
+
);
|
|
130654
|
+
writeError(
|
|
130655
|
+
config,
|
|
130656
|
+
`An exception was thrown in the executor's process
|
|
130657
|
+
- Details: ${error.message}
|
|
130658
|
+
- Stacktrace: ${error.stack}`
|
|
130493
130659
|
);
|
|
130494
130660
|
return {
|
|
130495
130661
|
success: false
|
|
130496
130662
|
};
|
|
130497
130663
|
} finally {
|
|
130498
130664
|
console.info(
|
|
130499
|
-
|
|
130665
|
+
chalk2.dim(
|
|
130500
130666
|
`\u23F1\uFE0F The${name ? ` ${name}` : ""} generator took ${Date.now() - startTime}ms to complete`
|
|
130501
130667
|
)
|
|
130502
130668
|
);
|