@storm-software/projen 0.21.82 → 0.21.83
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/dist/{chunk-44HCCL6Z.mjs → chunk-7SRMURME.mjs} +43 -7
- package/dist/{chunk-U6H53A3R.js → chunk-WAS4YKMW.js} +115 -79
- package/dist/generators.js +2 -2
- package/dist/generators.mjs +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +3 -3
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Storm Ops - Projen
|
|
4
4
|
|
|
5
|
+
## [0.21.82](https://github.com/storm-software/storm-ops/releases/tag/projen%400.21.82) (01/14/2026)
|
|
6
|
+
|
|
7
|
+
### Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated **workspace-tools** to **v1.294.26**
|
|
10
|
+
- Updated **config-tools** to **v1.188.80**
|
|
11
|
+
|
|
5
12
|
## [0.21.81](https://github.com/storm-software/storm-ops/releases/tag/projen%400.21.81) (01/14/2026)
|
|
6
13
|
|
|
7
14
|
### Updated Dependencies
|
|
@@ -102,6 +102,35 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
102
102
|
gradient: ["#1fb2a6", "#db2777", "#818cf8"]
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
|
+
function getColors(config) {
|
|
106
|
+
if (!config?.colors || typeof config.colors !== "object" || !config.colors["dark"] && (!config.colors["base"] || typeof config.colors !== "object" || !config.colors["base"]?.["dark"])) {
|
|
107
|
+
return DEFAULT_COLOR_CONFIG;
|
|
108
|
+
}
|
|
109
|
+
if (config.colors["base"]) {
|
|
110
|
+
if (typeof config.colors["base"]["dark"] === "object") {
|
|
111
|
+
return config.colors["base"]["dark"];
|
|
112
|
+
} else if (config.colors["base"]["dark"] === "string") {
|
|
113
|
+
return config.colors["base"];
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (typeof config.colors["dark"] === "object") {
|
|
117
|
+
return config.colors["dark"];
|
|
118
|
+
}
|
|
119
|
+
return config.colors ?? DEFAULT_COLOR_CONFIG;
|
|
120
|
+
}
|
|
121
|
+
function getColor(key, config) {
|
|
122
|
+
const colors = getColors(config);
|
|
123
|
+
const result = (typeof colors["dark"] === "object" ? colors["dark"][key] : colors[key]) || DEFAULT_COLOR_CONFIG["dark"][key] || DEFAULT_COLOR_CONFIG[key];
|
|
124
|
+
if (result) {
|
|
125
|
+
return result;
|
|
126
|
+
}
|
|
127
|
+
if (key === "link" || key === "debug") {
|
|
128
|
+
return getColor("info", config);
|
|
129
|
+
} else if (key === "fatal") {
|
|
130
|
+
return getColor("danger", config);
|
|
131
|
+
}
|
|
132
|
+
return getColor("brand", config);
|
|
133
|
+
}
|
|
105
134
|
|
|
106
135
|
// ../config-tools/src/logger/chalk.ts
|
|
107
136
|
init_esm_shims();
|
|
@@ -375,6 +404,7 @@ var _isFunction = (value) => {
|
|
|
375
404
|
return false;
|
|
376
405
|
}
|
|
377
406
|
};
|
|
407
|
+
var brandIcon = (config = {}, _chalk = getChalk()) => _chalk.hex(getColor("brand", config))("\u{1F5F2}");
|
|
378
408
|
|
|
379
409
|
// ../config-tools/src/utilities/apply-workspace-tokens.ts
|
|
380
410
|
init_esm_shims();
|
|
@@ -2042,7 +2072,10 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
2042
2072
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot2;
|
|
2043
2073
|
const projectName = context.projectName;
|
|
2044
2074
|
config.workspaceRoot = workspaceRoot2;
|
|
2045
|
-
writeInfo(
|
|
2075
|
+
writeInfo(
|
|
2076
|
+
`${brandIcon(config)} Running the ${name} executor for ${projectName} `,
|
|
2077
|
+
config
|
|
2078
|
+
);
|
|
2046
2079
|
if (!executorOptions.skipReadingConfig) {
|
|
2047
2080
|
writeTrace(
|
|
2048
2081
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
@@ -2401,12 +2434,12 @@ init_esm_shims();
|
|
|
2401
2434
|
init_esm_shims();
|
|
2402
2435
|
var DEFAULT_JS_BANNER = `
|
|
2403
2436
|
// ---------------------------------------
|
|
2404
|
-
// \
|
|
2437
|
+
// \u{1F5F2} Built by Storm Software
|
|
2405
2438
|
// ---------------------------------------
|
|
2406
2439
|
`;
|
|
2407
2440
|
var DEFAULT_CSS_BANNER = `
|
|
2408
2441
|
/* ---------------------------------------
|
|
2409
|
-
\
|
|
2442
|
+
\u{1F5F2} Built by Storm Software
|
|
2410
2443
|
--------------------------------------- */
|
|
2411
2444
|
`;
|
|
2412
2445
|
var DEFAULT_ENVIRONMENT = "production";
|
|
@@ -3104,7 +3137,7 @@ async function cleanOutputPath(context) {
|
|
|
3104
3137
|
return context;
|
|
3105
3138
|
}
|
|
3106
3139
|
async function build2(options) {
|
|
3107
|
-
writeDebug(`
|
|
3140
|
+
writeDebug(` ${brandIcon()} Executing Storm ESBuild pipeline`);
|
|
3108
3141
|
const stopwatch = getStopwatch("ESBuild pipeline");
|
|
3109
3142
|
try {
|
|
3110
3143
|
const opts = Array.isArray(options) ? options : [options];
|
|
@@ -3703,7 +3736,7 @@ async function cleanOutputPath2(options) {
|
|
|
3703
3736
|
return options;
|
|
3704
3737
|
}
|
|
3705
3738
|
async function build3(options) {
|
|
3706
|
-
writeDebug(`
|
|
3739
|
+
writeDebug(` ${brandIcon()} Executing Storm TSDown pipeline`);
|
|
3707
3740
|
const stopwatch = getStopwatch("TSDown pipeline");
|
|
3708
3741
|
try {
|
|
3709
3742
|
const opts = Array.isArray(options) ? options : [options];
|
|
@@ -3931,9 +3964,12 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
|
3931
3964
|
let options = _options;
|
|
3932
3965
|
let config;
|
|
3933
3966
|
try {
|
|
3934
|
-
writeInfo(
|
|
3967
|
+
writeInfo(
|
|
3968
|
+
`${brandIcon(config)} Running the ${name} generator...
|
|
3935
3969
|
|
|
3936
|
-
`,
|
|
3970
|
+
`,
|
|
3971
|
+
config
|
|
3972
|
+
);
|
|
3937
3973
|
const workspaceRoot2 = findWorkspaceRoot();
|
|
3938
3974
|
if (!generatorOptions.skipReadingConfig) {
|
|
3939
3975
|
writeDebug(
|
|
@@ -101,6 +101,35 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
101
101
|
gradient: ["#1fb2a6", "#db2777", "#818cf8"]
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
|
+
function getColors(config) {
|
|
105
|
+
if (!_optionalChain([config, 'optionalAccess', _2 => _2.colors]) || typeof config.colors !== "object" || !config.colors["dark"] && (!config.colors["base"] || typeof config.colors !== "object" || !_optionalChain([config, 'access', _3 => _3.colors, 'access', _4 => _4["base"], 'optionalAccess', _5 => _5["dark"]]))) {
|
|
106
|
+
return DEFAULT_COLOR_CONFIG;
|
|
107
|
+
}
|
|
108
|
+
if (config.colors["base"]) {
|
|
109
|
+
if (typeof config.colors["base"]["dark"] === "object") {
|
|
110
|
+
return config.colors["base"]["dark"];
|
|
111
|
+
} else if (config.colors["base"]["dark"] === "string") {
|
|
112
|
+
return config.colors["base"];
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (typeof config.colors["dark"] === "object") {
|
|
116
|
+
return config.colors["dark"];
|
|
117
|
+
}
|
|
118
|
+
return _nullishCoalesce(config.colors, () => ( DEFAULT_COLOR_CONFIG));
|
|
119
|
+
}
|
|
120
|
+
function getColor(key, config) {
|
|
121
|
+
const colors = getColors(config);
|
|
122
|
+
const result = (typeof colors["dark"] === "object" ? colors["dark"][key] : colors[key]) || DEFAULT_COLOR_CONFIG["dark"][key] || DEFAULT_COLOR_CONFIG[key];
|
|
123
|
+
if (result) {
|
|
124
|
+
return result;
|
|
125
|
+
}
|
|
126
|
+
if (key === "link" || key === "debug") {
|
|
127
|
+
return getColor("info", config);
|
|
128
|
+
} else if (key === "fatal") {
|
|
129
|
+
return getColor("danger", config);
|
|
130
|
+
}
|
|
131
|
+
return getColor("brand", config);
|
|
132
|
+
}
|
|
104
133
|
|
|
105
134
|
// ../config-tools/src/logger/chalk.ts
|
|
106
135
|
_chunkOMQGQKIFjs.init_cjs_shims.call(void 0, );
|
|
@@ -130,7 +159,7 @@ var chalkDefault = {
|
|
|
130
159
|
};
|
|
131
160
|
var getChalk = () => {
|
|
132
161
|
let _chalk = _chalk3.default;
|
|
133
|
-
if (!_optionalChain([_chalk, 'optionalAccess',
|
|
162
|
+
if (!_optionalChain([_chalk, 'optionalAccess', _6 => _6.hex]) || !_optionalChain([_chalk, 'optionalAccess', _7 => _7.bold, 'optionalAccess', _8 => _8.hex]) || !_optionalChain([_chalk, 'optionalAccess', _9 => _9.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _10 => _10.whiteBright]) || !_optionalChain([_chalk, 'optionalAccess', _11 => _11.white])) {
|
|
134
163
|
_chalk = chalkDefault;
|
|
135
164
|
}
|
|
136
165
|
return _chalk;
|
|
@@ -224,7 +253,7 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
224
253
|
|
|
225
254
|
// ../config-tools/src/logger/console.ts
|
|
226
255
|
var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
227
|
-
const colors = !_optionalChain([config, 'access',
|
|
256
|
+
const colors = !_optionalChain([config, 'access', _12 => _12.colors, 'optionalAccess', _13 => _13.dark]) && !_optionalChain([config, 'access', _14 => _14.colors, 'optionalAccess', _15 => _15["base"]]) && !_optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17["base"], 'optionalAccess', _18 => _18.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _19 => _19.colors, 'optionalAccess', _20 => _20.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _21 => _21.colors, 'optionalAccess', _22 => _22["base"], 'optionalAccess', _23 => _23.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _24 => _24.colors, 'optionalAccess', _25 => _25["base"]]) ? _optionalChain([config, 'access', _26 => _26.colors, 'optionalAccess', _27 => _27["base"]]) : DEFAULT_COLOR_CONFIG;
|
|
228
257
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
229
258
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
230
259
|
return (_) => {
|
|
@@ -369,11 +398,12 @@ ${Object.keys(message).filter((key) => !skip.includes(key)).map(
|
|
|
369
398
|
};
|
|
370
399
|
var _isFunction = (value) => {
|
|
371
400
|
try {
|
|
372
|
-
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess',
|
|
401
|
+
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _28 => _28.constructor]) && _optionalChain([value, 'optionalAccess', _29 => _29.call]) && _optionalChain([value, 'optionalAccess', _30 => _30.apply]));
|
|
373
402
|
} catch (e2) {
|
|
374
403
|
return false;
|
|
375
404
|
}
|
|
376
405
|
};
|
|
406
|
+
var brandIcon = (config = {}, _chalk = getChalk()) => _chalk.hex(getColor("brand", config))("\u{1F5F2}");
|
|
377
407
|
|
|
378
408
|
// ../config-tools/src/utilities/apply-workspace-tokens.ts
|
|
379
409
|
_chunkOMQGQKIFjs.init_cjs_shims.call(void 0, );
|
|
@@ -488,7 +518,7 @@ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
|
488
518
|
if (result.includes(`{${optionKey}}`)) {
|
|
489
519
|
result = result.replaceAll(
|
|
490
520
|
`{${optionKey}}`,
|
|
491
|
-
_optionalChain([tokenParams, 'optionalAccess',
|
|
521
|
+
_optionalChain([tokenParams, 'optionalAccess', _31 => _31[optionKey]]) || ""
|
|
492
522
|
);
|
|
493
523
|
}
|
|
494
524
|
}
|
|
@@ -510,7 +540,7 @@ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
|
510
540
|
if (result.includes("{workspaceRoot}")) {
|
|
511
541
|
result = result.replaceAll(
|
|
512
542
|
"{workspaceRoot}",
|
|
513
|
-
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access',
|
|
543
|
+
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _32 => _32.config, 'optionalAccess', _33 => _33.workspaceRoot]))), () => ( findWorkspaceRoot()))
|
|
514
544
|
);
|
|
515
545
|
}
|
|
516
546
|
return result;
|
|
@@ -1234,7 +1264,7 @@ function applyDefaultConfig(config) {
|
|
|
1234
1264
|
if (!config.contact) {
|
|
1235
1265
|
config.contact = `${config.homepage}/contact`;
|
|
1236
1266
|
}
|
|
1237
|
-
if (!_optionalChain([config, 'access',
|
|
1267
|
+
if (!_optionalChain([config, 'access', _34 => _34.error, 'optionalAccess', _35 => _35.codesFile]) || !_optionalChain([config, 'optionalAccess', _36 => _36.error, 'optionalAccess', _37 => _37.url])) {
|
|
1238
1268
|
config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
1239
1269
|
if (config.homepage) {
|
|
1240
1270
|
config.error.url ??= `${config.homepage}/errors`;
|
|
@@ -1252,7 +1282,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
1252
1282
|
cwd: workspacePath,
|
|
1253
1283
|
packageJson: true,
|
|
1254
1284
|
name: fileName,
|
|
1255
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
1285
|
+
envName: _optionalChain([fileName, 'optionalAccess', _38 => _38.toUpperCase, 'call', _39 => _39()]),
|
|
1256
1286
|
jitiOptions: {
|
|
1257
1287
|
debug: false,
|
|
1258
1288
|
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkLMAXMHBUjs.joinPaths.call(void 0,
|
|
@@ -1266,7 +1296,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
1266
1296
|
cwd: workspacePath,
|
|
1267
1297
|
packageJson: true,
|
|
1268
1298
|
name: fileName,
|
|
1269
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
1299
|
+
envName: _optionalChain([fileName, 'optionalAccess', _40 => _40.toUpperCase, 'call', _41 => _41()]),
|
|
1270
1300
|
jitiOptions: {
|
|
1271
1301
|
debug: false,
|
|
1272
1302
|
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkLMAXMHBUjs.joinPaths.call(void 0,
|
|
@@ -1300,7 +1330,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
1300
1330
|
)
|
|
1301
1331
|
);
|
|
1302
1332
|
for (const result2 of results) {
|
|
1303
|
-
if (_optionalChain([result2, 'optionalAccess',
|
|
1333
|
+
if (_optionalChain([result2, 'optionalAccess', _42 => _42.config]) && _optionalChain([result2, 'optionalAccess', _43 => _43.configFile]) && Object.keys(result2.config).length > 0) {
|
|
1304
1334
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
1305
1335
|
writeTrace(
|
|
1306
1336
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
@@ -1545,16 +1575,16 @@ _chunkOMQGQKIFjs.init_cjs_shims.call(void 0, );
|
|
|
1545
1575
|
var setExtensionEnv = (extensionName, extension) => {
|
|
1546
1576
|
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
1547
1577
|
if (extension[key]) {
|
|
1548
|
-
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess',
|
|
1578
|
+
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _44 => _44.replace, 'call', _45 => _45(
|
|
1549
1579
|
/([A-Z])+/g,
|
|
1550
|
-
(input) => input ? _optionalChain([input, 'access',
|
|
1551
|
-
), 'access',
|
|
1580
|
+
(input) => input ? _optionalChain([input, 'access', _46 => _46[0], 'optionalAccess', _47 => _47.toUpperCase, 'call', _48 => _48()]) + input.slice(1) : ""
|
|
1581
|
+
), 'access', _49 => _49.split, 'call', _50 => _50(/(?=[A-Z])|[.\-\s_]/), 'access', _51 => _51.map, 'call', _52 => _52((x) => x.toLowerCase())]), () => ( []));
|
|
1552
1582
|
let extensionKey;
|
|
1553
1583
|
if (result.length === 0) {
|
|
1554
1584
|
return;
|
|
1555
1585
|
}
|
|
1556
1586
|
if (result.length === 1) {
|
|
1557
|
-
extensionKey = _nullishCoalesce(_optionalChain([result, 'access',
|
|
1587
|
+
extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _53 => _53[0], 'optionalAccess', _54 => _54.toUpperCase, 'call', _55 => _55()]), () => ( ""));
|
|
1558
1588
|
} else {
|
|
1559
1589
|
extensionKey = result.reduce((ret, part) => {
|
|
1560
1590
|
return `${ret}_${part.toLowerCase()}`;
|
|
@@ -1742,7 +1772,7 @@ var setConfigEnv = (config) => {
|
|
|
1742
1772
|
process.env.NODE_ENV = config.mode;
|
|
1743
1773
|
process.env.ENVIRONMENT = config.mode;
|
|
1744
1774
|
}
|
|
1745
|
-
if (_optionalChain([config, 'access',
|
|
1775
|
+
if (_optionalChain([config, 'access', _56 => _56.colors, 'optionalAccess', _57 => _57.base, 'optionalAccess', _58 => _58.light]) || _optionalChain([config, 'access', _59 => _59.colors, 'optionalAccess', _60 => _60.base, 'optionalAccess', _61 => _61.dark])) {
|
|
1746
1776
|
for (const key of Object.keys(config.colors)) {
|
|
1747
1777
|
setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
1748
1778
|
}
|
|
@@ -1803,7 +1833,7 @@ var setConfigEnv = (config) => {
|
|
|
1803
1833
|
}
|
|
1804
1834
|
};
|
|
1805
1835
|
var setThemeColorsEnv = (prefix, config) => {
|
|
1806
|
-
return _optionalChain([config, 'optionalAccess',
|
|
1836
|
+
return _optionalChain([config, 'optionalAccess', _62 => _62.light, 'optionalAccess', _63 => _63.brand]) || _optionalChain([config, 'optionalAccess', _64 => _64.dark, 'optionalAccess', _65 => _65.brand]) ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
|
|
1807
1837
|
};
|
|
1808
1838
|
var setSingleThemeColorsEnv = (prefix, config) => {
|
|
1809
1839
|
if (config.dark) {
|
|
@@ -1921,7 +1951,7 @@ var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
|
1921
1951
|
var _static_cache = void 0;
|
|
1922
1952
|
var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot2, skipLogs = false, useDefault = true) => {
|
|
1923
1953
|
let result;
|
|
1924
|
-
if (!_optionalChain([_static_cache, 'optionalAccess',
|
|
1954
|
+
if (!_optionalChain([_static_cache, 'optionalAccess', _66 => _66.data]) || !_optionalChain([_static_cache, 'optionalAccess', _67 => _67.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
1925
1955
|
let _workspaceRoot = workspaceRoot2;
|
|
1926
1956
|
if (!_workspaceRoot) {
|
|
1927
1957
|
_workspaceRoot = findWorkspaceRoot();
|
|
@@ -1955,7 +1985,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot2, s
|
|
|
1955
1985
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1956
1986
|
} catch (error) {
|
|
1957
1987
|
throw new Error(
|
|
1958
|
-
`Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess',
|
|
1988
|
+
`Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess', _68 => _68.message]) ? `: ${error.message}` : ""}
|
|
1959
1989
|
|
|
1960
1990
|
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${formatLogMessage(
|
|
1961
1991
|
configInput
|
|
@@ -2031,7 +2061,7 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
2031
2061
|
let options = _options;
|
|
2032
2062
|
let config = {};
|
|
2033
2063
|
try {
|
|
2034
|
-
if (!_optionalChain([context, 'access',
|
|
2064
|
+
if (!_optionalChain([context, 'access', _69 => _69.projectsConfigurations, 'optionalAccess', _70 => _70.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
2035
2065
|
throw new Error(
|
|
2036
2066
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
2037
2067
|
);
|
|
@@ -2041,7 +2071,10 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
2041
2071
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot2;
|
|
2042
2072
|
const projectName = context.projectName;
|
|
2043
2073
|
config.workspaceRoot = workspaceRoot2;
|
|
2044
|
-
writeInfo(
|
|
2074
|
+
writeInfo(
|
|
2075
|
+
`${brandIcon(config)} Running the ${name} executor for ${projectName} `,
|
|
2076
|
+
config
|
|
2077
|
+
);
|
|
2045
2078
|
if (!executorOptions.skipReadingConfig) {
|
|
2046
2079
|
writeTrace(
|
|
2047
2080
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
@@ -2054,7 +2087,7 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
2054
2087
|
);
|
|
2055
2088
|
config = await getConfig(workspaceRoot2);
|
|
2056
2089
|
}
|
|
2057
|
-
if (_optionalChain([executorOptions, 'optionalAccess',
|
|
2090
|
+
if (_optionalChain([executorOptions, 'optionalAccess', _71 => _71.hooks, 'optionalAccess', _72 => _72.applyDefaultOptions])) {
|
|
2058
2091
|
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
2059
2092
|
options = await Promise.resolve(
|
|
2060
2093
|
executorOptions.hooks.applyDefaultOptions(options, config)
|
|
@@ -2082,7 +2115,7 @@ ${formatLogMessage(tokenized)}
|
|
|
2082
2115
|
`,
|
|
2083
2116
|
config
|
|
2084
2117
|
);
|
|
2085
|
-
if (_optionalChain([executorOptions, 'optionalAccess',
|
|
2118
|
+
if (_optionalChain([executorOptions, 'optionalAccess', _73 => _73.hooks, 'optionalAccess', _74 => _74.preProcess])) {
|
|
2086
2119
|
writeDebug("Running the preProcess hook...", config);
|
|
2087
2120
|
await Promise.resolve(
|
|
2088
2121
|
executorOptions.hooks.preProcess(tokenized, config)
|
|
@@ -2090,7 +2123,7 @@ ${formatLogMessage(tokenized)}
|
|
|
2090
2123
|
writeDebug("Completed the preProcess hook", config);
|
|
2091
2124
|
}
|
|
2092
2125
|
const ret = executorFn(tokenized, context, config);
|
|
2093
|
-
if (_isFunction2(_optionalChain([ret, 'optionalAccess',
|
|
2126
|
+
if (_isFunction2(_optionalChain([ret, 'optionalAccess', _75 => _75.next]))) {
|
|
2094
2127
|
const asyncGen = ret;
|
|
2095
2128
|
for await (const iter of asyncGen) {
|
|
2096
2129
|
void iter;
|
|
@@ -2099,18 +2132,18 @@ ${formatLogMessage(tokenized)}
|
|
|
2099
2132
|
const result = await Promise.resolve(
|
|
2100
2133
|
ret
|
|
2101
2134
|
);
|
|
2102
|
-
if (result && (!result.success || result.error && _optionalChain([result, 'optionalAccess',
|
|
2135
|
+
if (result && (!result.success || result.error && _optionalChain([result, 'optionalAccess', _76 => _76.error, 'optionalAccess', _77 => _77.message]) && typeof _optionalChain([result, 'optionalAccess', _78 => _78.error, 'optionalAccess', _79 => _79.message]) === "string" && _optionalChain([result, 'optionalAccess', _80 => _80.error, 'optionalAccess', _81 => _81.name]) && typeof _optionalChain([result, 'optionalAccess', _82 => _82.error, 'optionalAccess', _83 => _83.name]) === "string")) {
|
|
2103
2136
|
throw new Error(
|
|
2104
2137
|
`Failure determined while running the ${name} executor
|
|
2105
2138
|
${formatLogMessage(
|
|
2106
2139
|
result
|
|
2107
2140
|
)}`,
|
|
2108
2141
|
{
|
|
2109
|
-
cause: _optionalChain([result, 'optionalAccess',
|
|
2142
|
+
cause: _optionalChain([result, 'optionalAccess', _84 => _84.error])
|
|
2110
2143
|
}
|
|
2111
2144
|
);
|
|
2112
2145
|
}
|
|
2113
|
-
if (_optionalChain([executorOptions, 'optionalAccess',
|
|
2146
|
+
if (_optionalChain([executorOptions, 'optionalAccess', _85 => _85.hooks, 'optionalAccess', _86 => _86.postProcess])) {
|
|
2114
2147
|
writeDebug("Running the postProcess hook...", config);
|
|
2115
2148
|
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
2116
2149
|
writeDebug("Completed the postProcess hook", config);
|
|
@@ -2140,7 +2173,7 @@ ${formatLogMessage(
|
|
|
2140
2173
|
};
|
|
2141
2174
|
var _isFunction2 = (value) => {
|
|
2142
2175
|
try {
|
|
2143
|
-
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess',
|
|
2176
|
+
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _87 => _87.constructor]) && _optionalChain([value, 'optionalAccess', _88 => _88.call]) && _optionalChain([value, 'optionalAccess', _89 => _89.apply]));
|
|
2144
2177
|
} catch (e) {
|
|
2145
2178
|
return false;
|
|
2146
2179
|
}
|
|
@@ -2208,10 +2241,10 @@ async function cargoCommand(workspaceRoot2, ...args) {
|
|
|
2208
2241
|
}
|
|
2209
2242
|
function cargoCommandSync(args = "", options) {
|
|
2210
2243
|
const normalizedOptions = {
|
|
2211
|
-
stdio: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2244
|
+
stdio: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _90 => _90.stdio]), () => ( "inherit")),
|
|
2212
2245
|
env: {
|
|
2213
2246
|
...process.env,
|
|
2214
|
-
..._optionalChain([options, 'optionalAccess',
|
|
2247
|
+
..._optionalChain([options, 'optionalAccess', _91 => _91.env])
|
|
2215
2248
|
}
|
|
2216
2249
|
};
|
|
2217
2250
|
try {
|
|
@@ -2244,7 +2277,7 @@ function cargoMetadata() {
|
|
|
2244
2277
|
}
|
|
2245
2278
|
function runProcess(workspaceRoot2, processCmd, ...args) {
|
|
2246
2279
|
const metadata = cargoMetadata();
|
|
2247
|
-
const targetDir = _nullishCoalesce(_optionalChain([metadata, 'optionalAccess',
|
|
2280
|
+
const targetDir = _nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _92 => _92.target_directory]), () => ( _devkit.joinPathFragments.call(void 0, workspaceRoot2, "dist")));
|
|
2248
2281
|
return new Promise((resolve2) => {
|
|
2249
2282
|
if (process.env.VERCEL) {
|
|
2250
2283
|
return resolve2({ success: true });
|
|
@@ -2400,12 +2433,12 @@ _chunkOMQGQKIFjs.init_cjs_shims.call(void 0, );
|
|
|
2400
2433
|
_chunkOMQGQKIFjs.init_cjs_shims.call(void 0, );
|
|
2401
2434
|
var DEFAULT_JS_BANNER = `
|
|
2402
2435
|
// ---------------------------------------
|
|
2403
|
-
// \
|
|
2436
|
+
// \u{1F5F2} Built by Storm Software
|
|
2404
2437
|
// ---------------------------------------
|
|
2405
2438
|
`;
|
|
2406
2439
|
var DEFAULT_CSS_BANNER = `
|
|
2407
2440
|
/* ---------------------------------------
|
|
2408
|
-
\
|
|
2441
|
+
\u{1F5F2} Built by Storm Software
|
|
2409
2442
|
--------------------------------------- */
|
|
2410
2443
|
`;
|
|
2411
2444
|
var DEFAULT_ENVIRONMENT = "production";
|
|
@@ -2548,7 +2581,7 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
2548
2581
|
);
|
|
2549
2582
|
const localPackages = [];
|
|
2550
2583
|
for (const project of projectDependencies.dependencies.filter(
|
|
2551
|
-
(dep) => dep.node.type === "lib" && _optionalChain([dep, 'access',
|
|
2584
|
+
(dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _93 => _93.node, 'access', _94 => _94.data, 'optionalAccess', _95 => _95.root]) !== projectRoot && _optionalChain([dep, 'access', _96 => _96.node, 'access', _97 => _97.data, 'optionalAccess', _98 => _98.root]) !== workspaceRoot2
|
|
2552
2585
|
)) {
|
|
2553
2586
|
const projectNode = project.node;
|
|
2554
2587
|
if (projectNode.data.root) {
|
|
@@ -2580,13 +2613,13 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
2580
2613
|
const projectJson = JSON.parse(projectJsonFile);
|
|
2581
2614
|
const projectName2 = projectJson.name;
|
|
2582
2615
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2583
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
2616
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _99 => _99.projects, 'optionalAccess', _100 => _100[projectName2]])) {
|
|
2584
2617
|
throw new Error(
|
|
2585
2618
|
"The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project."
|
|
2586
2619
|
);
|
|
2587
2620
|
}
|
|
2588
|
-
const implicitDependencies = _optionalChain([projectConfigurations, 'access',
|
|
2589
|
-
if (_optionalChain([projectConfigurations, 'access',
|
|
2621
|
+
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _101 => _101.projects, 'optionalAccess', _102 => _102[projectName2], 'access', _103 => _103.implicitDependencies, 'optionalAccess', _104 => _104.reduce, 'call', _105 => _105((ret, dep) => {
|
|
2622
|
+
if (_optionalChain([projectConfigurations, 'access', _106 => _106.projects, 'optionalAccess', _107 => _107[dep]])) {
|
|
2590
2623
|
const depPackageJsonPath = _chunkLMAXMHBUjs.joinPaths.call(void 0,
|
|
2591
2624
|
workspaceRoot2,
|
|
2592
2625
|
projectConfigurations.projects[dep].root,
|
|
@@ -2606,13 +2639,13 @@ var addPackageDependencies = async (workspaceRoot2, projectRoot, projectName, pa
|
|
|
2606
2639
|
return ret;
|
|
2607
2640
|
}, [])]);
|
|
2608
2641
|
packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
|
|
2609
|
-
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess',
|
|
2642
|
+
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _108 => _108.includes, 'call', _109 => _109(localPackage.name)]) && _optionalChain([packageJson, 'access', _110 => _110.devDependencies, 'optionalAccess', _111 => _111[localPackage.name]]) === void 0) {
|
|
2610
2643
|
ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
|
|
2611
2644
|
}
|
|
2612
2645
|
return ret;
|
|
2613
2646
|
}, _nullishCoalesce(packageJson.dependencies, () => ( {})));
|
|
2614
2647
|
packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
|
|
2615
|
-
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess',
|
|
2648
|
+
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _112 => _112.includes, 'call', _113 => _113(localPackage.name)]) && _optionalChain([packageJson, 'access', _114 => _114.dependencies, 'optionalAccess', _115 => _115[localPackage.name]]) === void 0) {
|
|
2616
2649
|
ret[localPackage.name] = `^${localPackage.version || "0.0.1"}`;
|
|
2617
2650
|
}
|
|
2618
2651
|
return ret;
|
|
@@ -2727,7 +2760,7 @@ var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
|
2727
2760
|
|
|
2728
2761
|
// ../esbuild/src/assets.ts
|
|
2729
2762
|
async function copyBuildAssets(context) {
|
|
2730
|
-
if (!_optionalChain([context, 'access',
|
|
2763
|
+
if (!_optionalChain([context, 'access', _116 => _116.result, 'optionalAccess', _117 => _117.errors, 'access', _118 => _118.length]) && _optionalChain([context, 'access', _119 => _119.options, 'access', _120 => _120.assets, 'optionalAccess', _121 => _121.length])) {
|
|
2731
2764
|
writeDebug(
|
|
2732
2765
|
` \u{1F4CB} Copying ${context.options.assets.length} asset files to output directory: ${context.outputPath}`,
|
|
2733
2766
|
context.workspaceConfig
|
|
@@ -2836,7 +2869,7 @@ async function resolveContext(userOptions) {
|
|
|
2836
2869
|
const projectJson = JSON.parse(projectJsonFile);
|
|
2837
2870
|
const projectName = projectJson.name || userOptions.name;
|
|
2838
2871
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
2839
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
2872
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _122 => _122.projects, 'optionalAccess', _123 => _123[projectName]])) {
|
|
2840
2873
|
throw new Error(
|
|
2841
2874
|
"The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project."
|
|
2842
2875
|
);
|
|
@@ -3069,7 +3102,7 @@ async function executeTsup(context) {
|
|
|
3069
3102
|
|
|
3070
3103
|
// ../esbuild/src/build.ts
|
|
3071
3104
|
async function reportResults(context) {
|
|
3072
|
-
if (_optionalChain([context, 'access',
|
|
3105
|
+
if (_optionalChain([context, 'access', _124 => _124.result, 'optionalAccess', _125 => _125.errors, 'access', _126 => _126.length]) === 0) {
|
|
3073
3106
|
if (context.result.warnings.length > 0) {
|
|
3074
3107
|
writeWarning(
|
|
3075
3108
|
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
@@ -3080,7 +3113,7 @@ async function reportResults(context) {
|
|
|
3080
3113
|
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
3081
3114
|
context.workspaceConfig
|
|
3082
3115
|
);
|
|
3083
|
-
} else if (_optionalChain([context, 'access',
|
|
3116
|
+
} else if (_optionalChain([context, 'access', _127 => _127.result, 'optionalAccess', _128 => _128.errors]) && _optionalChain([context, 'access', _129 => _129.result, 'optionalAccess', _130 => _130.errors, 'access', _131 => _131.length]) > 0) {
|
|
3084
3117
|
writeError(
|
|
3085
3118
|
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
3086
3119
|
context.workspaceConfig
|
|
@@ -3103,7 +3136,7 @@ async function cleanOutputPath(context) {
|
|
|
3103
3136
|
return context;
|
|
3104
3137
|
}
|
|
3105
3138
|
async function build2(options) {
|
|
3106
|
-
writeDebug(`
|
|
3139
|
+
writeDebug(` ${brandIcon()} Executing Storm ESBuild pipeline`);
|
|
3107
3140
|
const stopwatch = getStopwatch("ESBuild pipeline");
|
|
3108
3141
|
try {
|
|
3109
3142
|
const opts = Array.isArray(options) ? options : [options];
|
|
@@ -3133,7 +3166,7 @@ async function build2(options) {
|
|
|
3133
3166
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
3134
3167
|
async function esbuildExecutorFn(options, context, config) {
|
|
3135
3168
|
writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
3136
|
-
if (!_optionalChain([context, 'access',
|
|
3169
|
+
if (!_optionalChain([context, 'access', _132 => _132.projectsConfigurations, 'optionalAccess', _133 => _133.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _134 => _134.projectsConfigurations, 'access', _135 => _135.projects, 'access', _136 => _136[context.projectName], 'optionalAccess', _137 => _137.root])) {
|
|
3137
3170
|
throw new Error(
|
|
3138
3171
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
3139
3172
|
);
|
|
@@ -3142,10 +3175,10 @@ async function esbuildExecutorFn(options, context, config) {
|
|
|
3142
3175
|
...options,
|
|
3143
3176
|
projectRoot: (
|
|
3144
3177
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
3145
|
-
_optionalChain([context, 'access',
|
|
3178
|
+
_optionalChain([context, 'access', _138 => _138.projectsConfigurations, 'access', _139 => _139.projects, 'optionalAccess', _140 => _140[context.projectName], 'access', _141 => _141.root])
|
|
3146
3179
|
),
|
|
3147
3180
|
name: context.projectName,
|
|
3148
|
-
sourceRoot: _optionalChain([context, 'access',
|
|
3181
|
+
sourceRoot: _optionalChain([context, 'access', _142 => _142.projectsConfigurations, 'access', _143 => _143.projects, 'optionalAccess', _144 => _144[context.projectName], 'optionalAccess', _145 => _145.sourceRoot]),
|
|
3149
3182
|
format: options.format,
|
|
3150
3183
|
platform: options.platform
|
|
3151
3184
|
});
|
|
@@ -3185,12 +3218,12 @@ async function napiExecutor(options, context, config) {
|
|
|
3185
3218
|
const { NapiCli } = await jiti.import(
|
|
3186
3219
|
jiti.esmResolve("@napi-rs/cli")
|
|
3187
3220
|
);
|
|
3188
|
-
if (!_optionalChain([context, 'access',
|
|
3221
|
+
if (!_optionalChain([context, 'access', _146 => _146.projectGraph, 'optionalAccess', _147 => _147.nodes, 'access', _148 => _148[_nullishCoalesce(context.projectName, () => ( ""))]])) {
|
|
3189
3222
|
throw new Error(
|
|
3190
3223
|
"The Napi Build process failed because the project could not be found in the project graph. Please run this command from a workspace root directory."
|
|
3191
3224
|
);
|
|
3192
3225
|
}
|
|
3193
|
-
const projectRoot = _optionalChain([context, 'access',
|
|
3226
|
+
const projectRoot = _optionalChain([context, 'access', _149 => _149.projectGraph, 'optionalAccess', _150 => _150.nodes, 'access', _151 => _151[_nullishCoalesce(context.projectName, () => ( ""))], 'access', _152 => _152.data, 'access', _153 => _153.root]);
|
|
3194
3227
|
const packageJson = _chunkLMAXMHBUjs.joinPaths.call(void 0, _nullishCoalesce(projectRoot, () => ( ".")), "package.json");
|
|
3195
3228
|
if (!_fileutils.fileExists.call(void 0, packageJson)) {
|
|
3196
3229
|
throw new Error(`Could not find package.json at ${packageJson}`);
|
|
@@ -3198,7 +3231,7 @@ async function napiExecutor(options, context, config) {
|
|
|
3198
3231
|
const napi = new NapiCli();
|
|
3199
3232
|
const normalizedOptions = { ...options };
|
|
3200
3233
|
const metadata = cargoMetadata();
|
|
3201
|
-
normalizedOptions.targetDir = options.targetDir || _optionalChain([metadata, 'optionalAccess',
|
|
3234
|
+
normalizedOptions.targetDir = options.targetDir || _optionalChain([metadata, 'optionalAccess', _154 => _154.target_directory]) || _chunkLMAXMHBUjs.joinPaths.call(void 0, config.workspaceRoot, "dist", "target");
|
|
3202
3235
|
normalizedOptions.outputDir = options.outputPath;
|
|
3203
3236
|
normalizedOptions.packageJsonPath = options.packageJsonPath || packageJson;
|
|
3204
3237
|
if (options.cwd) {
|
|
@@ -3407,15 +3440,15 @@ var _esbuildwhy = require('@size-limit/esbuild-why'); var _esbuildwhy2 = _intero
|
|
|
3407
3440
|
var _file = require('@size-limit/file'); var _file2 = _interopRequireDefault(_file);
|
|
3408
3441
|
var _sizelimit = require('size-limit'); var _sizelimit2 = _interopRequireDefault(_sizelimit);
|
|
3409
3442
|
async function sizeLimitExecutorFn(options, context, config) {
|
|
3410
|
-
if (!_optionalChain([context, 'optionalAccess',
|
|
3443
|
+
if (!_optionalChain([context, 'optionalAccess', _155 => _155.projectName]) || !_optionalChain([context, 'access', _156 => _156.projectsConfigurations, 'optionalAccess', _157 => _157.projects]) || !context.projectsConfigurations.projects[context.projectName]) {
|
|
3411
3444
|
throw new Error(
|
|
3412
3445
|
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
3413
3446
|
);
|
|
3414
3447
|
}
|
|
3415
3448
|
writeInfo(`\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
3416
3449
|
_sizelimit2.default.call(void 0, [_file2.default, _esbuild2.default, _esbuildwhy2.default], {
|
|
3417
|
-
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access',
|
|
3418
|
-
_nullishCoalesce(_optionalChain([context, 'access',
|
|
3450
|
+
checks: _nullishCoalesce(_nullishCoalesce(options.entry, () => ( _optionalChain([context, 'access', _158 => _158.projectsConfigurations, 'access', _159 => _159.projects, 'access', _160 => _160[context.projectName], 'optionalAccess', _161 => _161.sourceRoot]))), () => ( _devkit.joinPathFragments.call(void 0,
|
|
3451
|
+
_nullishCoalesce(_optionalChain([context, 'access', _162 => _162.projectsConfigurations, 'access', _163 => _163.projects, 'access', _164 => _164[context.projectName], 'optionalAccess', _165 => _165.root]), () => ( "./")),
|
|
3419
3452
|
"src"
|
|
3420
3453
|
)))
|
|
3421
3454
|
}).then((result) => {
|
|
@@ -3519,7 +3552,7 @@ var resolveOptions = async (userOptions) => {
|
|
|
3519
3552
|
const projectJson = JSON.parse(projectJsonFile);
|
|
3520
3553
|
const projectName = projectJson.name;
|
|
3521
3554
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
3522
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
3555
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _166 => _166.projects, 'optionalAccess', _167 => _167[projectName]])) {
|
|
3523
3556
|
throw new Error(
|
|
3524
3557
|
"The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project."
|
|
3525
3558
|
);
|
|
@@ -3702,7 +3735,7 @@ async function cleanOutputPath2(options) {
|
|
|
3702
3735
|
return options;
|
|
3703
3736
|
}
|
|
3704
3737
|
async function build3(options) {
|
|
3705
|
-
writeDebug(`
|
|
3738
|
+
writeDebug(` ${brandIcon()} Executing Storm TSDown pipeline`);
|
|
3706
3739
|
const stopwatch = getStopwatch("TSDown pipeline");
|
|
3707
3740
|
try {
|
|
3708
3741
|
const opts = Array.isArray(options) ? options : [options];
|
|
@@ -3741,7 +3774,7 @@ async function build3(options) {
|
|
|
3741
3774
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
3742
3775
|
async function tsdownExecutorFn(options, context, config) {
|
|
3743
3776
|
writeInfo("\u{1F4E6} Running Storm TSDown executor on the workspace", config);
|
|
3744
|
-
if (!_optionalChain([context, 'access',
|
|
3777
|
+
if (!_optionalChain([context, 'access', _168 => _168.projectsConfigurations, 'optionalAccess', _169 => _169.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _170 => _170.projectsConfigurations, 'access', _171 => _171.projects, 'access', _172 => _172[context.projectName], 'optionalAccess', _173 => _173.root])) {
|
|
3745
3778
|
throw new Error(
|
|
3746
3779
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
3747
3780
|
);
|
|
@@ -3750,10 +3783,10 @@ async function tsdownExecutorFn(options, context, config) {
|
|
|
3750
3783
|
...options,
|
|
3751
3784
|
projectRoot: (
|
|
3752
3785
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
3753
|
-
_optionalChain([context, 'access',
|
|
3786
|
+
_optionalChain([context, 'access', _174 => _174.projectsConfigurations, 'access', _175 => _175.projects, 'optionalAccess', _176 => _176[context.projectName], 'access', _177 => _177.root])
|
|
3754
3787
|
),
|
|
3755
3788
|
name: context.projectName,
|
|
3756
|
-
sourceRoot: _optionalChain([context, 'access',
|
|
3789
|
+
sourceRoot: _optionalChain([context, 'access', _178 => _178.projectsConfigurations, 'access', _179 => _179.projects, 'optionalAccess', _180 => _180[context.projectName], 'optionalAccess', _181 => _181.sourceRoot]),
|
|
3757
3790
|
format: options.format,
|
|
3758
3791
|
platform: options.platform
|
|
3759
3792
|
});
|
|
@@ -3823,7 +3856,7 @@ _chunkOMQGQKIFjs.init_cjs_shims.call(void 0, );
|
|
|
3823
3856
|
|
|
3824
3857
|
async function unbuildExecutorFn(options, context, config) {
|
|
3825
3858
|
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
3826
|
-
if (!_optionalChain([context, 'access',
|
|
3859
|
+
if (!_optionalChain([context, 'access', _182 => _182.projectsConfigurations, 'optionalAccess', _183 => _183.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
3827
3860
|
throw new Error(
|
|
3828
3861
|
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
3829
3862
|
);
|
|
@@ -3930,9 +3963,12 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
|
3930
3963
|
let options = _options;
|
|
3931
3964
|
let config;
|
|
3932
3965
|
try {
|
|
3933
|
-
writeInfo(
|
|
3966
|
+
writeInfo(
|
|
3967
|
+
`${brandIcon(config)} Running the ${name} generator...
|
|
3934
3968
|
|
|
3935
|
-
`,
|
|
3969
|
+
`,
|
|
3970
|
+
config
|
|
3971
|
+
);
|
|
3936
3972
|
const workspaceRoot2 = findWorkspaceRoot();
|
|
3937
3973
|
if (!generatorOptions.skipReadingConfig) {
|
|
3938
3974
|
writeDebug(
|
|
@@ -3942,7 +3978,7 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
|
3942
3978
|
);
|
|
3943
3979
|
config = await getConfig(workspaceRoot2);
|
|
3944
3980
|
}
|
|
3945
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
3981
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _184 => _184.hooks, 'optionalAccess', _185 => _185.applyDefaultOptions])) {
|
|
3946
3982
|
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
3947
3983
|
options = await Promise.resolve(
|
|
3948
3984
|
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
@@ -3959,7 +3995,7 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
3959
3995
|
{ workspaceRoot: tree.root, config },
|
|
3960
3996
|
applyWorkspaceBaseTokens
|
|
3961
3997
|
);
|
|
3962
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
3998
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _186 => _186.hooks, 'optionalAccess', _187 => _187.preProcess])) {
|
|
3963
3999
|
writeDebug("Running the preProcess hook...", config);
|
|
3964
4000
|
await Promise.resolve(
|
|
3965
4001
|
generatorOptions.hooks.preProcess(tokenized, config)
|
|
@@ -3970,15 +4006,15 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
3970
4006
|
generatorFn(tree, tokenized, config)
|
|
3971
4007
|
);
|
|
3972
4008
|
if (result) {
|
|
3973
|
-
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess',
|
|
4009
|
+
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _188 => _188.error, 'optionalAccess', _189 => _189.message]) && typeof _optionalChain([result, 'optionalAccess', _190 => _190.error, 'optionalAccess', _191 => _191.message]) === "string" && _optionalChain([result, 'optionalAccess', _192 => _192.error, 'optionalAccess', _193 => _193.name]) && typeof _optionalChain([result, 'optionalAccess', _194 => _194.error, 'optionalAccess', _195 => _195.name]) === "string") {
|
|
3974
4010
|
throw new Error(`The ${name} generator failed to run`, {
|
|
3975
|
-
cause: _optionalChain([result, 'optionalAccess',
|
|
4011
|
+
cause: _optionalChain([result, 'optionalAccess', _196 => _196.error])
|
|
3976
4012
|
});
|
|
3977
4013
|
} else if (result.success && result.data) {
|
|
3978
4014
|
return result;
|
|
3979
4015
|
}
|
|
3980
4016
|
}
|
|
3981
|
-
if (_optionalChain([generatorOptions, 'optionalAccess',
|
|
4017
|
+
if (_optionalChain([generatorOptions, 'optionalAccess', _197 => _197.hooks, 'optionalAccess', _198 => _198.postProcess])) {
|
|
3982
4018
|
writeDebug("Running the postProcess hook...", config);
|
|
3983
4019
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
3984
4020
|
writeDebug("Completed the postProcess hook", config);
|
|
@@ -4112,15 +4148,15 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
4112
4148
|
_devkit.addProjectConfiguration.call(void 0, tree, normalized.name, projectConfig);
|
|
4113
4149
|
let repository = {
|
|
4114
4150
|
type: "github",
|
|
4115
|
-
url: _optionalChain([config, 'optionalAccess',
|
|
4151
|
+
url: _optionalChain([config, 'optionalAccess', _199 => _199.repository]) || `https://github.com/${(typeof _optionalChain([config, 'optionalAccess', _200 => _200.organization]) === "string" ? _optionalChain([config, 'optionalAccess', _201 => _201.organization]) : _optionalChain([config, 'optionalAccess', _202 => _202.organization, 'optionalAccess', _203 => _203.name])) || "storm-software"}/${_optionalChain([config, 'optionalAccess', _204 => _204.namespace]) || _optionalChain([config, 'optionalAccess', _205 => _205.name]) || "repository"}.git`
|
|
4116
4152
|
};
|
|
4117
4153
|
let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
4118
4154
|
if (tree.exists("package.json")) {
|
|
4119
4155
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
4120
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
4156
|
+
if (_optionalChain([packageJson, 'optionalAccess', _206 => _206.repository])) {
|
|
4121
4157
|
repository = packageJson.repository;
|
|
4122
4158
|
}
|
|
4123
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
4159
|
+
if (_optionalChain([packageJson, 'optionalAccess', _207 => _207.description])) {
|
|
4124
4160
|
description = packageJson.description;
|
|
4125
4161
|
}
|
|
4126
4162
|
}
|
|
@@ -4175,9 +4211,9 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
4175
4211
|
_devkit.updateJson.call(void 0, tree, "package.json", (json) => ({
|
|
4176
4212
|
...json,
|
|
4177
4213
|
pnpm: {
|
|
4178
|
-
..._optionalChain([json, 'optionalAccess',
|
|
4214
|
+
..._optionalChain([json, 'optionalAccess', _208 => _208.pnpm]),
|
|
4179
4215
|
overrides: {
|
|
4180
|
-
..._optionalChain([json, 'optionalAccess',
|
|
4216
|
+
..._optionalChain([json, 'optionalAccess', _209 => _209.pnpm, 'optionalAccess', _210 => _210.overrides]),
|
|
4181
4217
|
[_nullishCoalesce(normalized.importPath, () => ( ""))]: "workspace:*"
|
|
4182
4218
|
}
|
|
4183
4219
|
}
|
|
@@ -4195,10 +4231,10 @@ async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
|
4195
4231
|
]);
|
|
4196
4232
|
if (tree.exists("package.json")) {
|
|
4197
4233
|
const packageJson = _devkit.readJson.call(void 0, tree, "package.json");
|
|
4198
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
4234
|
+
if (_optionalChain([packageJson, 'optionalAccess', _211 => _211.repository])) {
|
|
4199
4235
|
repository = packageJson.repository;
|
|
4200
4236
|
}
|
|
4201
|
-
if (_optionalChain([packageJson, 'optionalAccess',
|
|
4237
|
+
if (_optionalChain([packageJson, 'optionalAccess', _212 => _212.description])) {
|
|
4202
4238
|
description = packageJson.description;
|
|
4203
4239
|
}
|
|
4204
4240
|
}
|
|
@@ -4235,22 +4271,22 @@ function getOutputPath(options) {
|
|
|
4235
4271
|
function createProjectTsConfigJson(tree, options) {
|
|
4236
4272
|
const tsconfig = {
|
|
4237
4273
|
extends: options.rootProject ? void 0 : _js.getRelativePathToRootTsConfig.call(void 0, tree, options.projectRoot),
|
|
4238
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4274
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _213 => _213.tsconfigOptions]), () => ( {})),
|
|
4239
4275
|
compilerOptions: {
|
|
4240
4276
|
...options.rootProject ? _js.tsConfigBaseOptions : {},
|
|
4241
4277
|
outDir: _chunkLMAXMHBUjs.joinPaths.call(void 0, _devkit.offsetFromRoot.call(void 0, options.projectRoot), "dist/out-tsc"),
|
|
4242
4278
|
noEmit: true,
|
|
4243
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4279
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _214 => _214.tsconfigOptions, 'optionalAccess', _215 => _215.compilerOptions]), () => ( {}))
|
|
4244
4280
|
},
|
|
4245
|
-
files: [..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4281
|
+
files: [..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _216 => _216.tsconfigOptions, 'optionalAccess', _217 => _217.files]), () => ( []))],
|
|
4246
4282
|
include: [
|
|
4247
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4283
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _218 => _218.tsconfigOptions, 'optionalAccess', _219 => _219.include]), () => ( [])),
|
|
4248
4284
|
"src/**/*.ts",
|
|
4249
4285
|
"src/**/*.js",
|
|
4250
4286
|
"bin/**/*"
|
|
4251
4287
|
],
|
|
4252
4288
|
exclude: [
|
|
4253
|
-
..._nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
4289
|
+
..._nullishCoalesce(_optionalChain([options, 'optionalAccess', _220 => _220.tsconfigOptions, 'optionalAccess', _221 => _221.exclude]), () => ( [])),
|
|
4254
4290
|
"jest.config.ts",
|
|
4255
4291
|
"src/**/*.spec.ts",
|
|
4256
4292
|
"src/**/*.test.ts"
|
|
@@ -4260,8 +4296,8 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
4260
4296
|
}
|
|
4261
4297
|
async function normalizeOptions(tree, options, config) {
|
|
4262
4298
|
let importPath = options.importPath;
|
|
4263
|
-
if (!importPath && _optionalChain([config, 'optionalAccess',
|
|
4264
|
-
importPath = `@${_optionalChain([config, 'optionalAccess',
|
|
4299
|
+
if (!importPath && _optionalChain([config, 'optionalAccess', _222 => _222.namespace])) {
|
|
4300
|
+
importPath = `@${_optionalChain([config, 'optionalAccess', _223 => _223.namespace])}/${options.name}`;
|
|
4265
4301
|
}
|
|
4266
4302
|
if (options.publishable) {
|
|
4267
4303
|
if (!importPath) {
|
|
@@ -4427,7 +4463,7 @@ async function configSchemaGeneratorFn(tree, options, config) {
|
|
|
4427
4463
|
);
|
|
4428
4464
|
}
|
|
4429
4465
|
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
4430
|
-
_nullishCoalesce(_optionalChain([config, 'optionalAccess',
|
|
4466
|
+
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _224 => _224.workspaceRoot]), () => ( findWorkspaceRoot())),
|
|
4431
4467
|
options.outputFile.startsWith("./") ? "" : "./"
|
|
4432
4468
|
);
|
|
4433
4469
|
writeTrace(
|
package/dist/generators.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-KJ37M6QV.js');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkWAS4YKMWjs = require('./chunk-WAS4YKMW.js');
|
|
5
5
|
require('./chunk-LMAXMHBU.js');
|
|
6
6
|
require('./chunk-OMQGQKIF.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.initGeneratorFn =
|
|
9
|
+
exports.initGeneratorFn = _chunkWAS4YKMWjs.initGeneratorFn;
|
package/dist/generators.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-KJ37M6QV.js');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkWAS4YKMWjs = require('./chunk-WAS4YKMW.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkDJZBKK2Xjs = require('./chunk-DJZBKK2X.js');
|
|
8
8
|
require('./chunk-LMAXMHBU.js');
|
|
9
9
|
|
|
10
10
|
|
|
@@ -16,10 +16,10 @@ var _chunkOMQGQKIFjs = require('./chunk-OMQGQKIF.js');
|
|
|
16
16
|
// index.ts
|
|
17
17
|
var index_exports = {};
|
|
18
18
|
_chunkOMQGQKIFjs.__export.call(void 0, index_exports, {
|
|
19
|
-
initGeneratorFn: () =>
|
|
19
|
+
initGeneratorFn: () => _chunkWAS4YKMWjs.initGeneratorFn
|
|
20
20
|
});
|
|
21
21
|
_chunkOMQGQKIFjs.init_cjs_shims.call(void 0, );
|
|
22
22
|
_chunkOMQGQKIFjs.__reExport.call(void 0, index_exports, _chunkOMQGQKIFjs.__toESM.call(void 0, _chunkDJZBKK2Xjs.require_components.call(void 0, )));
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
exports.initGeneratorFn =
|
|
25
|
+
exports.initGeneratorFn = _chunkWAS4YKMWjs.initGeneratorFn;
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./chunk-F3HSPG2H.mjs";
|
|
2
|
+
import {
|
|
3
|
+
initGeneratorFn
|
|
4
|
+
} from "./chunk-7SRMURME.mjs";
|
|
2
5
|
import {
|
|
3
6
|
require_components
|
|
4
7
|
} from "./chunk-I6K44E7U.mjs";
|
|
5
|
-
import {
|
|
6
|
-
initGeneratorFn
|
|
7
|
-
} from "./chunk-44HCCL6Z.mjs";
|
|
8
8
|
import "./chunk-2EQMICE3.mjs";
|
|
9
9
|
import {
|
|
10
10
|
__export,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkWAS4YKMWjs = require('../../../chunk-WAS4YKMW.js');
|
|
5
5
|
require('../../../chunk-LMAXMHBU.js');
|
|
6
6
|
require('../../../chunk-OMQGQKIF.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.default =
|
|
10
|
+
exports.default = _chunkWAS4YKMWjs.generator_default; exports.initGeneratorFn = _chunkWAS4YKMWjs.initGeneratorFn;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/projen",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.83",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "Tools for managing Projen configuration automation within a Nx workspace.",
|
|
6
6
|
"repository": {
|
|
@@ -116,8 +116,8 @@
|
|
|
116
116
|
"peerDependencies": {
|
|
117
117
|
"@nx/devkit": "^22.3.3",
|
|
118
118
|
"@storm-software/config": "1.135.0",
|
|
119
|
-
"@storm-software/config-tools": "1.188.
|
|
120
|
-
"@storm-software/workspace-tools": "1.294.
|
|
119
|
+
"@storm-software/config-tools": "1.188.80",
|
|
120
|
+
"@storm-software/workspace-tools": "1.294.26",
|
|
121
121
|
"projen": "^0.91.6",
|
|
122
122
|
"tsup": "8.4.0",
|
|
123
123
|
"untyped": "1.5.2"
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"publishConfig": { "access": "public" },
|
|
143
143
|
"executors": "./executors.json",
|
|
144
144
|
"generators": "./generators.json",
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "0305bdb839af50999ab4680248db5dd2c4994ef3"
|
|
146
146
|
}
|