@storm-software/workspace-tools 1.43.0 → 1.43.1
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 +7 -0
- package/README.md +1 -1
- package/index.js +242 -237
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/base/index.js +229 -224
- package/src/executors/design-tokens/executor.js +168 -156
- package/src/executors/tsup/executor.js +163 -150
- package/src/executors/tsup-browser/executor.js +162 -149
- package/src/executors/tsup-neutral/executor.js +162 -149
- package/src/executors/tsup-node/executor.js +162 -149
- package/src/generators/browser-library/generator.js +302 -209
- package/src/generators/config-schema/generator.js +258 -155
- package/src/generators/neutral-library/generator.js +302 -209
- package/src/generators/node-library/generator.js +302 -209
- package/src/generators/preset/generator.js +257 -154
package/index.js
CHANGED
|
@@ -1974,14 +1974,14 @@ var require_templates = __commonJS({
|
|
|
1974
1974
|
}
|
|
1975
1975
|
return results;
|
|
1976
1976
|
}
|
|
1977
|
-
function buildStyle(
|
|
1977
|
+
function buildStyle(chalk2, 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 = chalk2;
|
|
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 = (chalk2, 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(chalk2, 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(chalk2, 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 chalk2 = {};
|
|
2053
|
+
applyOptions(chalk2, options);
|
|
2054
|
+
chalk2.template = function() {
|
|
2055
2055
|
const args = [].slice.call(arguments);
|
|
2056
|
-
return chalkTag.apply(null, [
|
|
2056
|
+
return chalkTag.apply(null, [chalk2.template].concat(args));
|
|
2057
2057
|
};
|
|
2058
|
-
Object.setPrototypeOf(
|
|
2059
|
-
Object.setPrototypeOf(
|
|
2060
|
-
|
|
2061
|
-
return
|
|
2058
|
+
Object.setPrototypeOf(chalk2, Chalk.prototype);
|
|
2059
|
+
Object.setPrototypeOf(chalk2.template, chalk2);
|
|
2060
|
+
chalk2.template.constructor = Chalk;
|
|
2061
|
+
return chalk2.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(chalk2, 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(chalk2, 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(chalk2) {
|
|
2237
2237
|
return {
|
|
2238
|
-
keyword:
|
|
2239
|
-
capitalized:
|
|
2240
|
-
jsxIdentifier:
|
|
2241
|
-
punctuator:
|
|
2242
|
-
number:
|
|
2243
|
-
string:
|
|
2244
|
-
regex:
|
|
2245
|
-
comment:
|
|
2246
|
-
invalid:
|
|
2238
|
+
keyword: chalk2.cyan,
|
|
2239
|
+
capitalized: chalk2.yellow,
|
|
2240
|
+
jsxIdentifier: chalk2.yellow,
|
|
2241
|
+
punctuator: chalk2.yellow,
|
|
2242
|
+
number: chalk2.magenta,
|
|
2243
|
+
string: chalk2.green,
|
|
2244
|
+
regex: chalk2.magenta,
|
|
2245
|
+
comment: chalk2.grey,
|
|
2246
|
+
invalid: chalk2.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(chalk2) {
|
|
2378
2378
|
return {
|
|
2379
|
-
gutter:
|
|
2380
|
-
marker:
|
|
2381
|
-
message:
|
|
2379
|
+
gutter: chalk2.grey,
|
|
2380
|
+
marker: chalk2.red.bold,
|
|
2381
|
+
message: chalk2.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 chalk2 = getChalk(opts.forceColor);
|
|
2444
|
+
const defs = getDefs(chalk2);
|
|
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 chalk2.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(chalk2, 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 = chalk2;
|
|
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 = (chalk2, 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(chalk2, 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(chalk2, 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 chalk3 = {};
|
|
7881
|
+
applyOptions(chalk3, options);
|
|
7882
|
+
chalk3.template = (...arguments_) => chalkTag(chalk3.template, ...arguments_);
|
|
7883
|
+
Object.setPrototypeOf(chalk3, Chalk.prototype);
|
|
7884
|
+
Object.setPrototypeOf(chalk3.template, chalk3);
|
|
7885
|
+
chalk3.template.constructor = () => {
|
|
7886
7886
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
7887
7887
|
};
|
|
7888
|
-
|
|
7889
|
-
return
|
|
7888
|
+
chalk3.template.Instance = ChalkClass;
|
|
7889
|
+
return chalk3.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 = (chalk3, ...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(chalk3, parts.join(""));
|
|
8017
8017
|
};
|
|
8018
8018
|
Object.defineProperties(Chalk.prototype, styles);
|
|
8019
|
-
var
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
module2.exports =
|
|
8019
|
+
var chalk2 = Chalk();
|
|
8020
|
+
chalk2.supportsColor = stdoutColor;
|
|
8021
|
+
chalk2.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
8022
|
+
chalk2.stderr.supportsColor = stderrColor;
|
|
8023
|
+
module2.exports = chalk2;
|
|
8024
8024
|
}
|
|
8025
8025
|
});
|
|
8026
8026
|
|
|
@@ -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 chalk2 = require_source();
|
|
31287
31287
|
var identifiers_1 = require_identifiers2();
|
|
31288
|
-
function getDefs(
|
|
31288
|
+
function getDefs(chalk3) {
|
|
31289
31289
|
return {
|
|
31290
|
-
keyword:
|
|
31291
|
-
capitalized:
|
|
31292
|
-
jsx_tag:
|
|
31293
|
-
punctuator:
|
|
31290
|
+
keyword: chalk3.cyan,
|
|
31291
|
+
capitalized: chalk3.yellow,
|
|
31292
|
+
jsx_tag: chalk3.yellow,
|
|
31293
|
+
punctuator: chalk3.yellow,
|
|
31294
31294
|
// bracket: intentionally omitted.
|
|
31295
|
-
number:
|
|
31296
|
-
string:
|
|
31297
|
-
regex:
|
|
31298
|
-
comment:
|
|
31299
|
-
invalid:
|
|
31295
|
+
number: chalk3.magenta,
|
|
31296
|
+
string: chalk3.green,
|
|
31297
|
+
regex: chalk3.magenta,
|
|
31298
|
+
comment: chalk3.grey,
|
|
31299
|
+
invalid: chalk3.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(chalk2);
|
|
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 chalk2 = require_source();
|
|
31453
31453
|
var path3 = 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 ts2.DiagnosticCategory.Warning: {
|
|
31532
|
-
message += `${
|
|
31532
|
+
message += `${chalk2.yellow.bold("warning")} ${chalk2.gray(`TS${diagnostic.code}`)}: `;
|
|
31533
31533
|
break;
|
|
31534
31534
|
}
|
|
31535
31535
|
case ts2.DiagnosticCategory.Error: {
|
|
31536
|
-
message += `${
|
|
31536
|
+
message += `${chalk2.red.bold("error")} ${chalk2.gray(`TS${diagnostic.code}`)}: `;
|
|
31537
31537
|
break;
|
|
31538
31538
|
}
|
|
31539
31539
|
case ts2.DiagnosticCategory.Suggestion:
|
|
31540
31540
|
case ts2.DiagnosticCategory.Message:
|
|
31541
31541
|
default: {
|
|
31542
|
-
message += `${
|
|
31542
|
+
message += `${chalk2.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 = path3.relative(workspaceRoot, diagnostic.file.fileName);
|
|
31552
|
-
message = `${
|
|
31552
|
+
message = `${chalk2.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 }
|
|
@@ -46796,11 +46796,11 @@ var require_chunk_UIX4URMV = __commonJS({
|
|
|
46796
46796
|
blackBright: () => blackBright,
|
|
46797
46797
|
blue: () => blue,
|
|
46798
46798
|
blueBright: () => blueBright,
|
|
46799
|
-
bold: () =>
|
|
46799
|
+
bold: () => bold2,
|
|
46800
46800
|
createColors: () => createColors,
|
|
46801
46801
|
cyan: () => cyan,
|
|
46802
46802
|
cyanBright: () => cyanBright,
|
|
46803
|
-
dim: () =>
|
|
46803
|
+
dim: () => dim2,
|
|
46804
46804
|
gray: () => gray,
|
|
46805
46805
|
green: () => green,
|
|
46806
46806
|
greenBright: () => greenBright,
|
|
@@ -46890,8 +46890,8 @@ var require_chunk_UIX4URMV = __commonJS({
|
|
|
46890
46890
|
);
|
|
46891
46891
|
var {
|
|
46892
46892
|
reset: reset2,
|
|
46893
|
-
bold:
|
|
46894
|
-
dim:
|
|
46893
|
+
bold: bold2,
|
|
46894
|
+
dim: dim2,
|
|
46895
46895
|
italic,
|
|
46896
46896
|
underline,
|
|
46897
46897
|
inverse,
|
|
@@ -46945,7 +46945,7 @@ var require_chunk_UIX4URMV = __commonJS({
|
|
|
46945
46945
|
function handleError(error) {
|
|
46946
46946
|
if (error.loc) {
|
|
46947
46947
|
console.error(
|
|
46948
|
-
|
|
46948
|
+
bold2(
|
|
46949
46949
|
red(
|
|
46950
46950
|
`Error parsing: ${error.loc.file}:${error.loc.line}:${error.loc.column}`
|
|
46951
46951
|
)
|
|
@@ -46954,7 +46954,7 @@ var require_chunk_UIX4URMV = __commonJS({
|
|
|
46954
46954
|
}
|
|
46955
46955
|
if (error.frame) {
|
|
46956
46956
|
console.error(red(error.message));
|
|
46957
|
-
console.error(
|
|
46957
|
+
console.error(dim2(error.frame));
|
|
46958
46958
|
} else {
|
|
46959
46959
|
if (error instanceof PrettyError) {
|
|
46960
46960
|
console.error(red(error.message));
|
|
@@ -46967,8 +46967,8 @@ var require_chunk_UIX4URMV = __commonJS({
|
|
|
46967
46967
|
_worker_threads.parentPort.postMessage("error");
|
|
46968
46968
|
}
|
|
46969
46969
|
}
|
|
46970
|
-
exports.bold =
|
|
46971
|
-
exports.dim =
|
|
46970
|
+
exports.bold = bold2;
|
|
46971
|
+
exports.dim = dim2;
|
|
46972
46972
|
exports.green = green;
|
|
46973
46973
|
exports.colorette_exports = colorette_exports;
|
|
46974
46974
|
exports.PrettyError = PrettyError;
|
|
@@ -78775,7 +78775,7 @@ var require_rollup = __commonJS({
|
|
|
78775
78775
|
bgCyanBright,
|
|
78776
78776
|
bgWhiteBright
|
|
78777
78777
|
} = createColors();
|
|
78778
|
-
var { bold:
|
|
78778
|
+
var { bold: bold2, cyan, dim: dim2, gray, green, red, underline, yellow } = createColors({
|
|
78779
78779
|
useColor: process$1.env.FORCE_COLOR !== "0" && !process$1.env.NO_COLOR
|
|
78780
78780
|
});
|
|
78781
78781
|
var stderr = (...parameters) => process$1.stderr.write(`${parameters.join("")}
|
|
@@ -78785,7 +78785,7 @@ var require_rollup = __commonJS({
|
|
|
78785
78785
|
const nameSection = name ? `${name}: ` : "";
|
|
78786
78786
|
const pluginSection = error.plugin ? `(plugin ${error.plugin}) ` : "";
|
|
78787
78787
|
const message = `${pluginSection}${nameSection}${error.message}`;
|
|
78788
|
-
const outputLines = [
|
|
78788
|
+
const outputLines = [bold2(red(`[!] ${bold2(message.toString())}`))];
|
|
78789
78789
|
if (error.url) {
|
|
78790
78790
|
outputLines.push(cyan(error.url));
|
|
78791
78791
|
}
|
|
@@ -78795,10 +78795,10 @@ var require_rollup = __commonJS({
|
|
|
78795
78795
|
outputLines.push(parseAst_js.relativeId(error.id));
|
|
78796
78796
|
}
|
|
78797
78797
|
if (error.frame) {
|
|
78798
|
-
outputLines.push(
|
|
78798
|
+
outputLines.push(dim2(error.frame));
|
|
78799
78799
|
}
|
|
78800
78800
|
if (error.stack) {
|
|
78801
|
-
outputLines.push(
|
|
78801
|
+
outputLines.push(dim2(error.stack?.replace(`${nameSection}${error.message}
|
|
78802
78802
|
`, "")));
|
|
78803
78803
|
}
|
|
78804
78804
|
outputLines.push("", "");
|
|
@@ -95003,7 +95003,7 @@ ${outro}`;
|
|
|
95003
95003
|
return options;
|
|
95004
95004
|
}
|
|
95005
95005
|
exports.blue = blue;
|
|
95006
|
-
exports.bold =
|
|
95006
|
+
exports.bold = bold2;
|
|
95007
95007
|
exports.commandAliases = commandAliases;
|
|
95008
95008
|
exports.createFilter = createFilter;
|
|
95009
95009
|
exports.cyan = cyan$1;
|
|
@@ -130245,7 +130245,7 @@ var getLogLevelLabel = (logLevel) => {
|
|
|
130245
130245
|
var chalk = __toESM(require_source(), 1);
|
|
130246
130246
|
var getLogFn = (config = {}, logLevel = LogLevel.INFO) => {
|
|
130247
130247
|
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)) {
|
|
130248
|
-
return (
|
|
130248
|
+
return (_) => {
|
|
130249
130249
|
};
|
|
130250
130250
|
}
|
|
130251
130251
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel || typeof logLevel === "string" && LogLevel.FATAL >= getLogLevel(logLevel)) {
|
|
@@ -130323,72 +130323,18 @@ var writeInfo = (config, message) => getLogFn(config, LogLevel.INFO)(message);
|
|
|
130323
130323
|
var writeSuccess = (config, message) => getLogFn(config, LogLevel.SUCCESS)(message);
|
|
130324
130324
|
var writeDebug = (config, message) => getLogFn(config, LogLevel.DEBUG)(message);
|
|
130325
130325
|
var writeTrace = (config, message) => getLogFn(config, LogLevel.TRACE)(message);
|
|
130326
|
-
|
|
130327
|
-
|
|
130328
|
-
|
|
130329
|
-
|
|
130330
|
-
|
|
130331
|
-
|
|
130332
|
-
|
|
130333
|
-
|
|
130334
|
-
|
|
130335
|
-
|
|
130336
|
-
|
|
130337
|
-
};
|
|
130338
|
-
var getConfigEnv = () => {
|
|
130339
|
-
const prefix = "STORM_";
|
|
130340
|
-
let config = {
|
|
130341
|
-
name: process.env[`${prefix}NAME`],
|
|
130342
|
-
namespace: process.env[`${prefix}NAMESPACE`],
|
|
130343
|
-
owner: process.env[`${prefix}OWNER`],
|
|
130344
|
-
worker: process.env[`${prefix}WORKER`],
|
|
130345
|
-
organization: process.env[`${prefix}ORGANIZATION`],
|
|
130346
|
-
packageManager: process.env[`${prefix}PACKAGE_MANAGER`],
|
|
130347
|
-
license: process.env[`${prefix}LICENSE`],
|
|
130348
|
-
homepage: process.env[`${prefix}HOMEPAGE`],
|
|
130349
|
-
timezone: process.env[`${prefix}TIMEZONE`] ?? process.env.TZ,
|
|
130350
|
-
locale: process.env[`${prefix}LOCALE`] ?? process.env.LOCALE,
|
|
130351
|
-
configFile: process.env[`${prefix}CONFIG_FILE`],
|
|
130352
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`],
|
|
130353
|
-
packageDirectory: process.env[`${prefix}PACKAGE_DIRECTORY`],
|
|
130354
|
-
buildDirectory: process.env[`${prefix}BUILD_DIRECTORY`],
|
|
130355
|
-
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
130356
|
-
runtimeDirectory: process.env[`${prefix}RUNTIME_DIRECTORY`],
|
|
130357
|
-
env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
130358
|
-
ci: Boolean(process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION),
|
|
130359
|
-
colors: {
|
|
130360
|
-
primary: process.env[`${prefix}COLOR_PRIMARY`],
|
|
130361
|
-
background: process.env[`${prefix}COLOR_BACKGROUND`],
|
|
130362
|
-
success: process.env[`${prefix}COLOR_SUCCESS`],
|
|
130363
|
-
info: process.env[`${prefix}COLOR_INFO`],
|
|
130364
|
-
warning: process.env[`${prefix}COLOR_WARNING`],
|
|
130365
|
-
error: process.env[`${prefix}COLOR_ERROR`],
|
|
130366
|
-
fatal: process.env[`${prefix}COLOR_FATAL`]
|
|
130367
|
-
},
|
|
130368
|
-
repository: process.env[`${prefix}REPOSITORY`],
|
|
130369
|
-
branch: process.env[`${prefix}BRANCH`],
|
|
130370
|
-
preMajor: Boolean(process.env[`${prefix}PRE_MAJOR`]),
|
|
130371
|
-
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,
|
|
130372
|
-
extensions: {}
|
|
130326
|
+
var getStopwatch = (name) => {
|
|
130327
|
+
const start = process.hrtime();
|
|
130328
|
+
return () => {
|
|
130329
|
+
const end = process.hrtime(start);
|
|
130330
|
+
console.info(
|
|
130331
|
+
chalk.dim(
|
|
130332
|
+
`\u23F1\uFE0F The${name ? ` ${name}` : ""} process took ${Math.round(
|
|
130333
|
+
end[0] * 1e3 + end[1] / 1e6
|
|
130334
|
+
)}ms to complete`
|
|
130335
|
+
)
|
|
130336
|
+
);
|
|
130373
130337
|
};
|
|
130374
|
-
const serializedConfig = process.env[`${prefix}CONFIG`];
|
|
130375
|
-
if (serializedConfig) {
|
|
130376
|
-
const parsed = JSON.parse(serializedConfig);
|
|
130377
|
-
config = {
|
|
130378
|
-
...config,
|
|
130379
|
-
...parsed,
|
|
130380
|
-
colors: { ...config.colors, ...parsed.colors },
|
|
130381
|
-
extensions: { ...config.extensions, ...parsed.extensions }
|
|
130382
|
-
};
|
|
130383
|
-
}
|
|
130384
|
-
const extensionPrefix = `${prefix}EXTENSION_`;
|
|
130385
|
-
return Object.keys(process.env).filter((key) => key.startsWith(extensionPrefix)).reduce((ret, key) => {
|
|
130386
|
-
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("");
|
|
130387
|
-
if (extensionName) {
|
|
130388
|
-
ret.extensions[extensionName] = getExtensionEnv(extensionName);
|
|
130389
|
-
}
|
|
130390
|
-
return ret;
|
|
130391
|
-
}, config);
|
|
130392
130338
|
};
|
|
130393
130339
|
|
|
130394
130340
|
// packages/config-tools/src/env/set-env.ts
|
|
@@ -130525,8 +130471,82 @@ var setConfigEnv = (config) => {
|
|
|
130525
130471
|
}
|
|
130526
130472
|
};
|
|
130527
130473
|
|
|
130528
|
-
// packages/
|
|
130529
|
-
var
|
|
130474
|
+
// packages/config-tools/src/utilities/prepare-workspace.ts
|
|
130475
|
+
var prepareWorkspace = async () => {
|
|
130476
|
+
const _STORM_CONFIG = getDefaultConfig({
|
|
130477
|
+
...await getConfigFile(),
|
|
130478
|
+
...getConfigEnv()
|
|
130479
|
+
});
|
|
130480
|
+
setConfigEnv(_STORM_CONFIG);
|
|
130481
|
+
return _STORM_CONFIG;
|
|
130482
|
+
};
|
|
130483
|
+
|
|
130484
|
+
// packages/config-tools/src/env/get-env.ts
|
|
130485
|
+
var getExtensionEnv = (extensionName) => {
|
|
130486
|
+
const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
|
|
130487
|
+
return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
|
|
130488
|
+
const name = key.replace(prefix, "").split("_").map((i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : "").join("");
|
|
130489
|
+
if (name) {
|
|
130490
|
+
ret[name] = process.env[key];
|
|
130491
|
+
}
|
|
130492
|
+
return ret;
|
|
130493
|
+
}, {});
|
|
130494
|
+
};
|
|
130495
|
+
var getConfigEnv = () => {
|
|
130496
|
+
const prefix = "STORM_";
|
|
130497
|
+
let config = {
|
|
130498
|
+
name: process.env[`${prefix}NAME`],
|
|
130499
|
+
namespace: process.env[`${prefix}NAMESPACE`],
|
|
130500
|
+
owner: process.env[`${prefix}OWNER`],
|
|
130501
|
+
worker: process.env[`${prefix}WORKER`],
|
|
130502
|
+
organization: process.env[`${prefix}ORGANIZATION`],
|
|
130503
|
+
packageManager: process.env[`${prefix}PACKAGE_MANAGER`],
|
|
130504
|
+
license: process.env[`${prefix}LICENSE`],
|
|
130505
|
+
homepage: process.env[`${prefix}HOMEPAGE`],
|
|
130506
|
+
timezone: process.env[`${prefix}TIMEZONE`] ?? process.env.TZ,
|
|
130507
|
+
locale: process.env[`${prefix}LOCALE`] ?? process.env.LOCALE,
|
|
130508
|
+
configFile: process.env[`${prefix}CONFIG_FILE`],
|
|
130509
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`],
|
|
130510
|
+
packageDirectory: process.env[`${prefix}PACKAGE_DIRECTORY`],
|
|
130511
|
+
buildDirectory: process.env[`${prefix}BUILD_DIRECTORY`],
|
|
130512
|
+
runtimeVersion: process.env[`${prefix}RUNTIME_VERSION`],
|
|
130513
|
+
runtimeDirectory: process.env[`${prefix}RUNTIME_DIRECTORY`],
|
|
130514
|
+
env: process.env[`${prefix}ENV`] ?? process.env.NODE_ENV ?? process.env.ENVIRONMENT,
|
|
130515
|
+
ci: Boolean(process.env[`${prefix}CI`] ?? process.env.CI ?? process.env.CONTINUOUS_INTEGRATION),
|
|
130516
|
+
colors: {
|
|
130517
|
+
primary: process.env[`${prefix}COLOR_PRIMARY`],
|
|
130518
|
+
background: process.env[`${prefix}COLOR_BACKGROUND`],
|
|
130519
|
+
success: process.env[`${prefix}COLOR_SUCCESS`],
|
|
130520
|
+
info: process.env[`${prefix}COLOR_INFO`],
|
|
130521
|
+
warning: process.env[`${prefix}COLOR_WARNING`],
|
|
130522
|
+
error: process.env[`${prefix}COLOR_ERROR`],
|
|
130523
|
+
fatal: process.env[`${prefix}COLOR_FATAL`]
|
|
130524
|
+
},
|
|
130525
|
+
repository: process.env[`${prefix}REPOSITORY`],
|
|
130526
|
+
branch: process.env[`${prefix}BRANCH`],
|
|
130527
|
+
preMajor: Boolean(process.env[`${prefix}PRE_MAJOR`]),
|
|
130528
|
+
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,
|
|
130529
|
+
extensions: {}
|
|
130530
|
+
};
|
|
130531
|
+
const serializedConfig = process.env[`${prefix}CONFIG`];
|
|
130532
|
+
if (serializedConfig) {
|
|
130533
|
+
const parsed = JSON.parse(serializedConfig);
|
|
130534
|
+
config = {
|
|
130535
|
+
...config,
|
|
130536
|
+
...parsed,
|
|
130537
|
+
colors: { ...config.colors, ...parsed.colors },
|
|
130538
|
+
extensions: { ...config.extensions, ...parsed.extensions }
|
|
130539
|
+
};
|
|
130540
|
+
}
|
|
130541
|
+
const extensionPrefix = `${prefix}EXTENSION_`;
|
|
130542
|
+
return Object.keys(process.env).filter((key) => key.startsWith(extensionPrefix)).reduce((ret, key) => {
|
|
130543
|
+
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("");
|
|
130544
|
+
if (extensionName) {
|
|
130545
|
+
ret.extensions[extensionName] = getExtensionEnv(extensionName);
|
|
130546
|
+
}
|
|
130547
|
+
return ret;
|
|
130548
|
+
}, config);
|
|
130549
|
+
};
|
|
130530
130550
|
|
|
130531
130551
|
// packages/workspace-tools/src/utils/get-workspace-root.ts
|
|
130532
130552
|
var import_find_workspace_root2 = require("nx/src/utils/find-workspace-root.js");
|
|
@@ -130641,7 +130661,7 @@ var applyWorkspaceTokens = (options, config, tokenizerFn) => {
|
|
|
130641
130661
|
|
|
130642
130662
|
// packages/workspace-tools/src/base/base-executor.ts
|
|
130643
130663
|
var withRunExecutor = (name, executorFn, executorOptions) => async (_options, context) => {
|
|
130644
|
-
const
|
|
130664
|
+
const stopwatch = getStopwatch(name);
|
|
130645
130665
|
let options = _options;
|
|
130646
130666
|
let config;
|
|
130647
130667
|
try {
|
|
@@ -130666,11 +130686,7 @@ var withRunExecutor = (name, executorFn, executorOptions) => async (_options, co
|
|
|
130666
130686
|
- projectName: ${projectName}
|
|
130667
130687
|
`
|
|
130668
130688
|
);
|
|
130669
|
-
config =
|
|
130670
|
-
...await getConfigFile(),
|
|
130671
|
-
...getConfigEnv()
|
|
130672
|
-
});
|
|
130673
|
-
setConfigEnv(config);
|
|
130689
|
+
config = await prepareWorkspace();
|
|
130674
130690
|
writeTrace(
|
|
130675
130691
|
config,
|
|
130676
130692
|
`Loaded Storm config into env:
|
|
@@ -130736,56 +130752,56 @@ ${Object.keys(options).map((key) => ` - ${key}=${JSON.stringify(options[key])}`)
|
|
|
130736
130752
|
success: false
|
|
130737
130753
|
};
|
|
130738
130754
|
} finally {
|
|
130739
|
-
|
|
130740
|
-
chalk2.dim(
|
|
130741
|
-
`\u23F1\uFE0F The${name ? ` ${name}` : ""} generator took ${Date.now() - startTime}ms to complete`
|
|
130742
|
-
)
|
|
130743
|
-
);
|
|
130755
|
+
stopwatch();
|
|
130744
130756
|
}
|
|
130745
130757
|
};
|
|
130746
130758
|
|
|
130747
130759
|
// packages/workspace-tools/src/base/base-generator.ts
|
|
130748
|
-
var chalk3 = __toESM(require_source());
|
|
130749
130760
|
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
130750
130761
|
skipReadingConfig: false
|
|
130751
130762
|
}) => async (tree, _options) => {
|
|
130752
|
-
const
|
|
130763
|
+
const stopwatch = getStopwatch(name);
|
|
130753
130764
|
let options = _options;
|
|
130765
|
+
let config;
|
|
130754
130766
|
try {
|
|
130755
|
-
|
|
130767
|
+
writeInfo(config, `\u26A1 Running the ${name} generator...
|
|
130756
130768
|
|
|
130757
|
-
`)
|
|
130758
|
-
|
|
130769
|
+
`);
|
|
130770
|
+
const workspaceRoot = getWorkspaceRoot();
|
|
130759
130771
|
if (!generatorOptions.skipReadingConfig) {
|
|
130760
|
-
|
|
130761
|
-
|
|
130762
|
-
...
|
|
130763
|
-
|
|
130764
|
-
|
|
130765
|
-
|
|
130766
|
-
|
|
130767
|
-
|
|
130768
|
-
|
|
130769
|
-
|
|
130772
|
+
writeDebug(
|
|
130773
|
+
config,
|
|
130774
|
+
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
130775
|
+
- workspaceRoot: ${workspaceRoot}`
|
|
130776
|
+
);
|
|
130777
|
+
config = await prepareWorkspace();
|
|
130778
|
+
writeTrace(
|
|
130779
|
+
config,
|
|
130780
|
+
`Loaded Storm config into env:
|
|
130781
|
+
${Object.keys(process.env).map((key) => ` - ${key}=${JSON.stringify(process.env[key])}`).join("\n")}`
|
|
130770
130782
|
);
|
|
130771
130783
|
}
|
|
130772
130784
|
if (generatorOptions?.hooks?.applyDefaultOptions) {
|
|
130773
|
-
|
|
130785
|
+
writeDebug(config, "Running the applyDefaultOptions hook...");
|
|
130774
130786
|
options = await Promise.resolve(
|
|
130775
130787
|
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
130776
130788
|
);
|
|
130777
|
-
|
|
130789
|
+
writeDebug(config, "Completed the applyDefaultOptions hook");
|
|
130778
130790
|
}
|
|
130779
|
-
|
|
130791
|
+
writeTrace(
|
|
130792
|
+
config,
|
|
130793
|
+
`Generator schema options \u2699\uFE0F
|
|
130794
|
+
${Object.keys(options).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`
|
|
130795
|
+
);
|
|
130780
130796
|
const tokenized = applyWorkspaceTokens(
|
|
130781
130797
|
options,
|
|
130782
130798
|
{ workspaceRoot: tree.root, config },
|
|
130783
130799
|
applyWorkspaceGeneratorTokens
|
|
130784
130800
|
);
|
|
130785
130801
|
if (generatorOptions?.hooks?.preProcess) {
|
|
130786
|
-
|
|
130787
|
-
await Promise.resolve(generatorOptions.hooks.preProcess(
|
|
130788
|
-
|
|
130802
|
+
writeDebug(config, "Running the preProcess hook...");
|
|
130803
|
+
await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
|
|
130804
|
+
writeDebug(config, "Completed the preProcess hook");
|
|
130789
130805
|
}
|
|
130790
130806
|
const result = await Promise.resolve(generatorFn(tree, tokenized, config));
|
|
130791
130807
|
if (result && (!result.success || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string")) {
|
|
@@ -130794,33 +130810,31 @@ ${Object.keys(process.env).map((key) => ` - ${key}=${process.env[key]}`).join("\
|
|
|
130794
130810
|
});
|
|
130795
130811
|
}
|
|
130796
130812
|
if (generatorOptions?.hooks?.postProcess) {
|
|
130797
|
-
|
|
130813
|
+
writeDebug(config, "Running the postProcess hook...");
|
|
130798
130814
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
130799
|
-
|
|
130815
|
+
writeDebug(config, "Completed the postProcess hook");
|
|
130800
130816
|
}
|
|
130801
|
-
|
|
130802
|
-
|
|
130803
|
-
|
|
130804
|
-
\u{1F389} Successfully completed running the ${name} generator!`)
|
|
130805
|
-
);
|
|
130817
|
+
writeSuccess(config, `Completed running the ${name} task executor!
|
|
130818
|
+
`);
|
|
130806
130819
|
return {
|
|
130807
130820
|
success: true
|
|
130808
130821
|
};
|
|
130809
130822
|
} catch (error) {
|
|
130810
|
-
|
|
130811
|
-
|
|
130812
|
-
error
|
|
130823
|
+
writeFatal(
|
|
130824
|
+
config,
|
|
130825
|
+
"A fatal error occurred while running the generator - the process was forced to terminate"
|
|
130826
|
+
);
|
|
130827
|
+
writeError(
|
|
130828
|
+
config,
|
|
130829
|
+
`An exception was thrown in the generator's process
|
|
130830
|
+
- Details: ${error.message}
|
|
130831
|
+
- Stacktrace: ${error.stack}`
|
|
130813
130832
|
);
|
|
130814
|
-
console.error(error);
|
|
130815
130833
|
return {
|
|
130816
130834
|
success: false
|
|
130817
130835
|
};
|
|
130818
130836
|
} finally {
|
|
130819
|
-
|
|
130820
|
-
chalk3.hex("#0ea5e9").italic(
|
|
130821
|
-
`\u23F1\uFE0F The${name ? ` ${name}` : ""} generator took ${Date.now() - startTime}ms to complete`
|
|
130822
|
-
)
|
|
130823
|
-
);
|
|
130837
|
+
stopwatch();
|
|
130824
130838
|
}
|
|
130825
130839
|
};
|
|
130826
130840
|
|
|
@@ -130897,9 +130911,10 @@ function defaultConfig({
|
|
|
130897
130911
|
outExtension
|
|
130898
130912
|
};
|
|
130899
130913
|
}
|
|
130900
|
-
function getConfig(workspaceRoot, projectRoot, getConfigFn, { outputPath, tsConfig,
|
|
130914
|
+
function getConfig(workspaceRoot, projectRoot, getConfigFn, { outputPath, tsConfig, platform, ...rest }) {
|
|
130901
130915
|
return getConfigFn({
|
|
130902
130916
|
...rest,
|
|
130917
|
+
additionalEntryPoints: [],
|
|
130903
130918
|
outDir: outputPath,
|
|
130904
130919
|
tsconfig: tsConfig,
|
|
130905
130920
|
workspaceRoot,
|
|
@@ -130994,14 +131009,14 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
130994
131009
|
defaultConfiguration: "production",
|
|
130995
131010
|
assets: [
|
|
130996
131011
|
{
|
|
130997
|
-
|
|
130998
|
-
|
|
130999
|
-
|
|
131012
|
+
input: options.projectRoot,
|
|
131013
|
+
glob: "*.md",
|
|
131014
|
+
output: "/"
|
|
131000
131015
|
},
|
|
131001
131016
|
{
|
|
131002
|
-
|
|
131003
|
-
|
|
131004
|
-
|
|
131017
|
+
input: "",
|
|
131018
|
+
glob: "LICENSE",
|
|
131019
|
+
output: "/"
|
|
131005
131020
|
}
|
|
131006
131021
|
]
|
|
131007
131022
|
},
|
|
@@ -131020,7 +131035,9 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
131020
131035
|
test: {}
|
|
131021
131036
|
}
|
|
131022
131037
|
};
|
|
131023
|
-
|
|
131038
|
+
if (schema.platform) {
|
|
131039
|
+
projectConfig.targets.build.options.platform = schema.platform;
|
|
131040
|
+
}
|
|
131024
131041
|
createProjectTsConfigJson(tree, options);
|
|
131025
131042
|
(0, import_devkit2.addProjectConfiguration)(tree, options.name, projectConfig);
|
|
131026
131043
|
let repository = {
|
|
@@ -131030,19 +131047,20 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
131030
131047
|
let description = schema.description ?? "\u26A1 A Storm package used to create modern, scalable web applications.";
|
|
131031
131048
|
if (tree.exists("package.json")) {
|
|
131032
131049
|
const packageJson = (0, import_devkit2.readJson)(tree, "package.json");
|
|
131033
|
-
|
|
131034
|
-
|
|
131050
|
+
if (packageJson?.repository) {
|
|
131051
|
+
repository = packageJson.repository;
|
|
131052
|
+
}
|
|
131053
|
+
if (packageJson?.description) {
|
|
131054
|
+
description = packageJson.description;
|
|
131055
|
+
}
|
|
131035
131056
|
}
|
|
131036
|
-
const packageJsonPath = (0, import_devkit2.joinPathFragments)(
|
|
131037
|
-
options.projectRoot,
|
|
131038
|
-
"package.json"
|
|
131039
|
-
);
|
|
131057
|
+
const packageJsonPath = (0, import_devkit2.joinPathFragments)(options.projectRoot, "package.json");
|
|
131040
131058
|
if (tree.exists(packageJsonPath)) {
|
|
131041
131059
|
(0, import_devkit2.updateJson)(tree, packageJsonPath, (json) => {
|
|
131042
131060
|
json.name = options.importPath;
|
|
131043
131061
|
json.version = "0.0.1";
|
|
131044
131062
|
if (json.private && (options.publishable || options.rootProject)) {
|
|
131045
|
-
|
|
131063
|
+
json.private = void 0;
|
|
131046
131064
|
}
|
|
131047
131065
|
return {
|
|
131048
131066
|
...json,
|
|
@@ -131090,19 +131108,19 @@ async function typeScriptLibraryGeneratorFn(tree, schema) {
|
|
|
131090
131108
|
}));
|
|
131091
131109
|
}
|
|
131092
131110
|
(0, import_js.addTsConfigPath)(tree, options.importPath, [
|
|
131093
|
-
(0, import_devkit2.joinPathFragments)(
|
|
131094
|
-
options.projectRoot,
|
|
131095
|
-
"./src",
|
|
131096
|
-
"index." + (options.js ? "js" : "ts")
|
|
131097
|
-
)
|
|
131111
|
+
(0, import_devkit2.joinPathFragments)(options.projectRoot, "./src", `index.${options.js ? "js" : "ts"}`)
|
|
131098
131112
|
]);
|
|
131099
131113
|
(0, import_js.addTsConfigPath)(tree, (0, import_devkit2.joinPathFragments)(options.importPath, "/*"), [
|
|
131100
131114
|
(0, import_devkit2.joinPathFragments)(options.projectRoot, "./src", "/*")
|
|
131101
131115
|
]);
|
|
131102
131116
|
if (tree.exists("package.json")) {
|
|
131103
131117
|
const packageJson = (0, import_devkit2.readJson)(tree, "package.json");
|
|
131104
|
-
|
|
131105
|
-
|
|
131118
|
+
if (packageJson?.repository) {
|
|
131119
|
+
repository = packageJson.repository;
|
|
131120
|
+
}
|
|
131121
|
+
if (packageJson?.description) {
|
|
131122
|
+
description = packageJson.description;
|
|
131123
|
+
}
|
|
131106
131124
|
}
|
|
131107
131125
|
const tsconfigPath = (0, import_devkit2.joinPathFragments)(options.projectRoot, "tsconfig.json");
|
|
131108
131126
|
if (tree.exists(tsconfigPath)) {
|
|
@@ -131141,11 +131159,7 @@ async function addLint(tree, options) {
|
|
|
131141
131159
|
tsConfigPaths: [(0, import_devkit2.joinPathFragments)(options.projectRoot, "tsconfig.json")],
|
|
131142
131160
|
unitTestRunner: options.unitTestRunner,
|
|
131143
131161
|
eslintFilePatterns: [
|
|
131144
|
-
mapLintPattern(
|
|
131145
|
-
options.projectRoot,
|
|
131146
|
-
options.js ? "js" : "ts",
|
|
131147
|
-
options.rootProject
|
|
131148
|
-
)
|
|
131162
|
+
mapLintPattern(options.projectRoot, options.js ? "js" : "ts", options.rootProject)
|
|
131149
131163
|
],
|
|
131150
131164
|
setParserOptionsProject: options.setParserOptionsProject,
|
|
131151
131165
|
rootProject: options.rootProject
|
|
@@ -131191,9 +131205,7 @@ async function addLint(tree, options) {
|
|
|
131191
131205
|
ruleOptions = {};
|
|
131192
131206
|
}
|
|
131193
131207
|
if (options.bundler === "esbuild") {
|
|
131194
|
-
ruleOptions.ignoredFiles = [
|
|
131195
|
-
"{projectRoot}/esbuild.config.{js,ts,mjs,mts}"
|
|
131196
|
-
];
|
|
131208
|
+
ruleOptions.ignoredFiles = ["{projectRoot}/esbuild.config.{js,ts,mjs,mts}"];
|
|
131197
131209
|
o.rules["@nx/dependency-checks"] = [ruleSeverity, ruleOptions];
|
|
131198
131210
|
}
|
|
131199
131211
|
return o;
|
|
@@ -131217,10 +131229,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
131217
131229
|
...options?.tsConfigOptions ?? {},
|
|
131218
131230
|
compilerOptions: {
|
|
131219
131231
|
...options.rootProject ? import_js.tsConfigBaseOptions : {},
|
|
131220
|
-
outDir: (0, import_devkit2.joinPathFragments)(
|
|
131221
|
-
(0, import_devkit2.offsetFromRoot)(options.projectRoot),
|
|
131222
|
-
"dist/out-tsc"
|
|
131223
|
-
),
|
|
131232
|
+
outDir: (0, import_devkit2.joinPathFragments)((0, import_devkit2.offsetFromRoot)(options.projectRoot), "dist/out-tsc"),
|
|
131224
131233
|
noEmit: true,
|
|
131225
131234
|
...options?.tsConfigOptions?.compilerOptions ?? {}
|
|
131226
131235
|
},
|
|
@@ -131238,11 +131247,7 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
131238
131247
|
"src/**/*.test.ts"
|
|
131239
131248
|
]
|
|
131240
131249
|
};
|
|
131241
|
-
(0, import_devkit2.writeJson)(
|
|
131242
|
-
tree,
|
|
131243
|
-
(0, import_devkit2.joinPathFragments)(options.projectRoot, "tsconfig.json"),
|
|
131244
|
-
tsconfig
|
|
131245
|
-
);
|
|
131250
|
+
(0, import_devkit2.writeJson)(tree, (0, import_devkit2.joinPathFragments)(options.projectRoot, "tsconfig.json"), tsconfig);
|
|
131246
131251
|
}
|
|
131247
131252
|
async function normalizeOptions(tree, options) {
|
|
131248
131253
|
if (options.publishable) {
|