@storm-software/projen 0.21.15 → 0.21.18
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 +32 -0
- package/README.md +1 -2
- package/dist/{chunk-6MFEBS6R.mjs → chunk-4N7KSY4E.mjs} +1 -1
- package/dist/{chunk-GULNWTGR.mjs → chunk-C53PM5EF.mjs} +392 -785
- package/dist/{chunk-FLFJZ4QS.js → chunk-E7OUB2TI.js} +3 -3
- package/dist/{chunk-JJ5FMNEP.mjs → chunk-GNPBWHER.mjs} +2 -2
- package/dist/{chunk-4DSPJSYH.js → chunk-GT4TSWRO.js} +2 -2
- package/dist/chunk-HGGW3DXQ.js +6 -0
- package/dist/{chunk-YJ3DWUG3.mjs → chunk-MQ4Q4SR6.mjs} +1 -1
- package/dist/{chunk-FQ324XJ4.mjs → chunk-MU3GKHYE.mjs} +1 -1
- package/dist/{chunk-I5J4CUAR.js → chunk-QTJS4PSI.js} +2 -2
- package/dist/{chunk-PQDIMZXV.js → chunk-XBHVA2L7.js} +551 -944
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +4 -4
- package/dist/index.js +10 -10
- package/dist/index.mjs +5 -5
- package/dist/src/components/index.js +3 -3
- package/dist/src/components/index.mjs +2 -2
- package/dist/src/components/nx-workspace.js +4 -4
- package/dist/src/components/nx-workspace.mjs +2 -2
- package/dist/src/generators/init/generator.js +4 -4
- package/dist/src/generators/init/generator.mjs +3 -3
- package/dist/tsup.config.js +2 -2
- package/dist/tsup.config.mjs +1 -1
- package/package.json +10 -10
- package/dist/chunk-5VS62CVS.js +0 -6
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
correctPaths,
|
|
3
3
|
joinPaths
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4N7KSY4E.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__dirname,
|
|
7
7
|
init_esm_shims
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GNPBWHER.mjs";
|
|
9
9
|
|
|
10
10
|
// src/generators/init/generator.ts
|
|
11
11
|
init_esm_shims();
|
|
12
12
|
import {
|
|
13
13
|
addDependenciesToPackageJson as addDependenciesToPackageJson4,
|
|
14
|
-
formatFiles as
|
|
14
|
+
formatFiles as formatFiles8,
|
|
15
15
|
readJsonFile as readJsonFile4,
|
|
16
16
|
runTasksInSerial
|
|
17
17
|
} from "@nx/devkit";
|
|
@@ -219,9 +219,9 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
219
219
|
};
|
|
220
220
|
|
|
221
221
|
// ../config-tools/src/logger/console.ts
|
|
222
|
-
var getLogFn = (logLevel = LogLevel.INFO,
|
|
223
|
-
const colors = !
|
|
224
|
-
const configLogLevel =
|
|
222
|
+
var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
223
|
+
const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
|
|
224
|
+
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
225
225
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
226
226
|
return (_) => {
|
|
227
227
|
};
|
|
@@ -297,13 +297,13 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? DEFAULT_COLOR_CON
|
|
|
297
297
|
);
|
|
298
298
|
};
|
|
299
299
|
};
|
|
300
|
-
var writeFatal = (message,
|
|
301
|
-
var writeError = (message,
|
|
302
|
-
var writeWarning = (message,
|
|
303
|
-
var writeInfo = (message,
|
|
304
|
-
var writeSuccess = (message,
|
|
305
|
-
var writeDebug = (message,
|
|
306
|
-
var writeTrace = (message,
|
|
300
|
+
var writeFatal = (message, config) => getLogFn(LogLevel.FATAL, config)(message);
|
|
301
|
+
var writeError = (message, config) => getLogFn(LogLevel.ERROR, config)(message);
|
|
302
|
+
var writeWarning = (message, config) => getLogFn(LogLevel.WARN, config)(message);
|
|
303
|
+
var writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
|
|
304
|
+
var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
|
|
305
|
+
var writeDebug = (message, config) => getLogFn(LogLevel.DEBUG, config)(message);
|
|
306
|
+
var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
|
|
307
307
|
var getStopwatch = (name) => {
|
|
308
308
|
const start = process.hrtime();
|
|
309
309
|
return () => {
|
|
@@ -1176,34 +1176,34 @@ async function getPackageJsonConfig(root) {
|
|
|
1176
1176
|
support
|
|
1177
1177
|
};
|
|
1178
1178
|
}
|
|
1179
|
-
function applyDefaultConfig(
|
|
1180
|
-
if (!
|
|
1181
|
-
|
|
1179
|
+
function applyDefaultConfig(config) {
|
|
1180
|
+
if (!config.support && config.contact) {
|
|
1181
|
+
config.support = config.contact;
|
|
1182
1182
|
}
|
|
1183
|
-
if (!
|
|
1184
|
-
|
|
1183
|
+
if (!config.contact && config.support) {
|
|
1184
|
+
config.contact = config.support;
|
|
1185
1185
|
}
|
|
1186
|
-
if (
|
|
1187
|
-
if (!
|
|
1188
|
-
|
|
1186
|
+
if (config.homepage) {
|
|
1187
|
+
if (!config.docs) {
|
|
1188
|
+
config.docs = `${config.homepage}/docs`;
|
|
1189
1189
|
}
|
|
1190
|
-
if (!
|
|
1191
|
-
|
|
1190
|
+
if (!config.license) {
|
|
1191
|
+
config.license = `${config.homepage}/license`;
|
|
1192
1192
|
}
|
|
1193
|
-
if (!
|
|
1194
|
-
|
|
1193
|
+
if (!config.support) {
|
|
1194
|
+
config.support = `${config.homepage}/support`;
|
|
1195
1195
|
}
|
|
1196
|
-
if (!
|
|
1197
|
-
|
|
1196
|
+
if (!config.contact) {
|
|
1197
|
+
config.contact = `${config.homepage}/contact`;
|
|
1198
1198
|
}
|
|
1199
|
-
if (!
|
|
1200
|
-
|
|
1201
|
-
if (
|
|
1202
|
-
|
|
1199
|
+
if (!config.error?.codesFile || !config?.error?.url) {
|
|
1200
|
+
config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
1201
|
+
if (config.homepage) {
|
|
1202
|
+
config.error.url ??= `${config.homepage}/errors`;
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
|
-
return
|
|
1206
|
+
return config;
|
|
1207
1207
|
}
|
|
1208
1208
|
|
|
1209
1209
|
// ../config-tools/src/config-file/get-config-file.ts
|
|
@@ -1245,9 +1245,9 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
1245
1245
|
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
1246
1246
|
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
1247
1247
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
1248
|
-
let
|
|
1248
|
+
let config = result.config;
|
|
1249
1249
|
const configFile = result.configFile;
|
|
1250
|
-
if (
|
|
1250
|
+
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
1251
1251
|
writeTrace(
|
|
1252
1252
|
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
1253
1253
|
{
|
|
@@ -1263,7 +1263,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
1263
1263
|
);
|
|
1264
1264
|
for (const result2 of results) {
|
|
1265
1265
|
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
1266
|
-
if (!
|
|
1266
|
+
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
1267
1267
|
writeTrace(
|
|
1268
1268
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
1269
1269
|
{
|
|
@@ -1271,15 +1271,15 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
1271
1271
|
}
|
|
1272
1272
|
);
|
|
1273
1273
|
}
|
|
1274
|
-
|
|
1274
|
+
config = defu(result2.config ?? {}, config ?? {});
|
|
1275
1275
|
}
|
|
1276
1276
|
}
|
|
1277
1277
|
}
|
|
1278
|
-
if (!
|
|
1278
|
+
if (!config || Object.keys(config).length === 0) {
|
|
1279
1279
|
return void 0;
|
|
1280
1280
|
}
|
|
1281
|
-
|
|
1282
|
-
return
|
|
1281
|
+
config.configFile = configFile;
|
|
1282
|
+
return config;
|
|
1283
1283
|
};
|
|
1284
1284
|
|
|
1285
1285
|
// ../config-tools/src/create-storm-config.ts
|
|
@@ -1303,7 +1303,7 @@ var getExtensionEnv = (extensionName) => {
|
|
|
1303
1303
|
};
|
|
1304
1304
|
var getConfigEnv = () => {
|
|
1305
1305
|
const prefix = "STORM_";
|
|
1306
|
-
let
|
|
1306
|
+
let config = {
|
|
1307
1307
|
extends: process.env[`${prefix}EXTENDS`] || void 0,
|
|
1308
1308
|
name: process.env[`${prefix}NAME`] || void 0,
|
|
1309
1309
|
variant: process.env[`${prefix}VARIANT`] || void 0,
|
|
@@ -1392,38 +1392,38 @@ var getConfigEnv = () => {
|
|
|
1392
1392
|
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
1393
1393
|
)
|
|
1394
1394
|
);
|
|
1395
|
-
|
|
1395
|
+
config.colors = themeNames.length > 0 ? themeNames.reduce(
|
|
1396
1396
|
(ret, themeName) => {
|
|
1397
1397
|
ret[themeName] = getThemeColorsEnv(prefix, themeName);
|
|
1398
1398
|
return ret;
|
|
1399
1399
|
},
|
|
1400
1400
|
{}
|
|
1401
1401
|
) : getThemeColorsEnv(prefix);
|
|
1402
|
-
if (
|
|
1403
|
-
if (
|
|
1404
|
-
|
|
1402
|
+
if (config.docs === STORM_DEFAULT_DOCS) {
|
|
1403
|
+
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
1404
|
+
config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
1405
1405
|
} else {
|
|
1406
|
-
|
|
1406
|
+
config.docs = `${config.homepage}/docs`;
|
|
1407
1407
|
}
|
|
1408
1408
|
}
|
|
1409
|
-
if (
|
|
1410
|
-
if (
|
|
1411
|
-
|
|
1409
|
+
if (config.licensing === STORM_DEFAULT_LICENSING) {
|
|
1410
|
+
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
1411
|
+
config.licensing = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
1412
1412
|
} else {
|
|
1413
|
-
|
|
1413
|
+
config.licensing = `${config.homepage}/docs`;
|
|
1414
1414
|
}
|
|
1415
1415
|
}
|
|
1416
1416
|
const serializedConfig = process.env[`${prefix}WORKSPACE_CONFIG`];
|
|
1417
1417
|
if (serializedConfig) {
|
|
1418
1418
|
const parsed = JSON.parse(serializedConfig);
|
|
1419
|
-
|
|
1420
|
-
...
|
|
1419
|
+
config = {
|
|
1420
|
+
...config,
|
|
1421
1421
|
...parsed,
|
|
1422
|
-
colors: { ...
|
|
1423
|
-
extensions: { ...
|
|
1422
|
+
colors: { ...config.colors, ...parsed.colors },
|
|
1423
|
+
extensions: { ...config.extensions, ...parsed.extensions }
|
|
1424
1424
|
};
|
|
1425
1425
|
}
|
|
1426
|
-
return
|
|
1426
|
+
return config;
|
|
1427
1427
|
};
|
|
1428
1428
|
var getThemeColorsEnv = (prefix, theme) => {
|
|
1429
1429
|
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
@@ -1524,348 +1524,348 @@ var setExtensionEnv = (extensionName, extension) => {
|
|
|
1524
1524
|
}
|
|
1525
1525
|
}
|
|
1526
1526
|
};
|
|
1527
|
-
var setConfigEnv = (
|
|
1527
|
+
var setConfigEnv = (config) => {
|
|
1528
1528
|
const prefix = "STORM_";
|
|
1529
|
-
if (
|
|
1530
|
-
process.env[`${prefix}EXTENDS`] = Array.isArray(
|
|
1529
|
+
if (config.extends) {
|
|
1530
|
+
process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
|
|
1531
1531
|
}
|
|
1532
|
-
if (
|
|
1533
|
-
process.env[`${prefix}NAME`] =
|
|
1532
|
+
if (config.name) {
|
|
1533
|
+
process.env[`${prefix}NAME`] = config.name;
|
|
1534
1534
|
}
|
|
1535
|
-
if (
|
|
1536
|
-
process.env[`${prefix}VARIANT`] =
|
|
1535
|
+
if (config.variant) {
|
|
1536
|
+
process.env[`${prefix}VARIANT`] = config.variant;
|
|
1537
1537
|
}
|
|
1538
|
-
if (
|
|
1539
|
-
process.env[`${prefix}NAMESPACE`] =
|
|
1538
|
+
if (config.namespace) {
|
|
1539
|
+
process.env[`${prefix}NAMESPACE`] = config.namespace;
|
|
1540
1540
|
}
|
|
1541
|
-
if (
|
|
1542
|
-
process.env[`${prefix}OWNER`] =
|
|
1541
|
+
if (config.owner) {
|
|
1542
|
+
process.env[`${prefix}OWNER`] = config.owner;
|
|
1543
1543
|
}
|
|
1544
|
-
if (
|
|
1545
|
-
process.env[`${prefix}BOT_NAME`] =
|
|
1546
|
-
process.env[`${prefix}BOT_EMAIL`] =
|
|
1544
|
+
if (config.bot) {
|
|
1545
|
+
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
1546
|
+
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
1547
1547
|
}
|
|
1548
|
-
if (
|
|
1549
|
-
process.env[`${prefix}ERROR_CODES_FILE`] =
|
|
1550
|
-
process.env[`${prefix}ERROR_URL`] =
|
|
1548
|
+
if (config.error) {
|
|
1549
|
+
process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
|
|
1550
|
+
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
1551
1551
|
}
|
|
1552
|
-
if (
|
|
1553
|
-
if (
|
|
1554
|
-
if (typeof
|
|
1555
|
-
process.env[`${prefix}RELEASE_BANNER`] =
|
|
1556
|
-
process.env[`${prefix}RELEASE_BANNER_URL`] =
|
|
1552
|
+
if (config.release) {
|
|
1553
|
+
if (config.release.banner) {
|
|
1554
|
+
if (typeof config.release.banner === "string") {
|
|
1555
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
1556
|
+
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner;
|
|
1557
1557
|
} else {
|
|
1558
|
-
process.env[`${prefix}RELEASE_BANNER`] =
|
|
1559
|
-
process.env[`${prefix}RELEASE_BANNER_URL`] =
|
|
1560
|
-
process.env[`${prefix}RELEASE_BANNER_ALT`] =
|
|
1558
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner.url;
|
|
1559
|
+
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner.url;
|
|
1560
|
+
process.env[`${prefix}RELEASE_BANNER_ALT`] = config.release.banner.alt;
|
|
1561
1561
|
}
|
|
1562
1562
|
}
|
|
1563
|
-
process.env[`${prefix}RELEASE_HEADER`] =
|
|
1564
|
-
process.env[`${prefix}RELEASE_FOOTER`] =
|
|
1563
|
+
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
1564
|
+
process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
|
|
1565
1565
|
}
|
|
1566
|
-
if (
|
|
1567
|
-
if (
|
|
1568
|
-
process.env[`${prefix}SOCIAL_TWITTER`] =
|
|
1566
|
+
if (config.socials) {
|
|
1567
|
+
if (config.socials.twitter) {
|
|
1568
|
+
process.env[`${prefix}SOCIAL_TWITTER`] = config.socials.twitter;
|
|
1569
1569
|
}
|
|
1570
|
-
if (
|
|
1571
|
-
process.env[`${prefix}SOCIAL_DISCORD`] =
|
|
1570
|
+
if (config.socials.discord) {
|
|
1571
|
+
process.env[`${prefix}SOCIAL_DISCORD`] = config.socials.discord;
|
|
1572
1572
|
}
|
|
1573
|
-
if (
|
|
1574
|
-
process.env[`${prefix}SOCIAL_TELEGRAM`] =
|
|
1573
|
+
if (config.socials.telegram) {
|
|
1574
|
+
process.env[`${prefix}SOCIAL_TELEGRAM`] = config.socials.telegram;
|
|
1575
1575
|
}
|
|
1576
|
-
if (
|
|
1577
|
-
process.env[`${prefix}SOCIAL_SLACK`] =
|
|
1576
|
+
if (config.socials.slack) {
|
|
1577
|
+
process.env[`${prefix}SOCIAL_SLACK`] = config.socials.slack;
|
|
1578
1578
|
}
|
|
1579
|
-
if (
|
|
1580
|
-
process.env[`${prefix}SOCIAL_MEDIUM`] =
|
|
1579
|
+
if (config.socials.medium) {
|
|
1580
|
+
process.env[`${prefix}SOCIAL_MEDIUM`] = config.socials.medium;
|
|
1581
1581
|
}
|
|
1582
|
-
if (
|
|
1583
|
-
process.env[`${prefix}SOCIAL_GITHUB`] =
|
|
1582
|
+
if (config.socials.github) {
|
|
1583
|
+
process.env[`${prefix}SOCIAL_GITHUB`] = config.socials.github;
|
|
1584
1584
|
}
|
|
1585
1585
|
}
|
|
1586
|
-
if (
|
|
1587
|
-
if (typeof
|
|
1588
|
-
process.env[`${prefix}ORG`] =
|
|
1589
|
-
process.env[`${prefix}ORG_NAME`] =
|
|
1590
|
-
process.env[`${prefix}ORGANIZATION`] =
|
|
1591
|
-
process.env[`${prefix}ORGANIZATION_NAME`] =
|
|
1586
|
+
if (config.organization) {
|
|
1587
|
+
if (typeof config.organization === "string") {
|
|
1588
|
+
process.env[`${prefix}ORG`] = config.organization;
|
|
1589
|
+
process.env[`${prefix}ORG_NAME`] = config.organization;
|
|
1590
|
+
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
1591
|
+
process.env[`${prefix}ORGANIZATION_NAME`] = config.organization;
|
|
1592
1592
|
} else {
|
|
1593
|
-
process.env[`${prefix}ORG`] =
|
|
1594
|
-
process.env[`${prefix}ORG_NAME`] =
|
|
1595
|
-
process.env[`${prefix}ORGANIZATION`] =
|
|
1596
|
-
process.env[`${prefix}ORGANIZATION_NAME`] =
|
|
1597
|
-
if (
|
|
1598
|
-
process.env[`${prefix}ORG_URL`] =
|
|
1599
|
-
process.env[`${prefix}ORGANIZATION_URL`] =
|
|
1593
|
+
process.env[`${prefix}ORG`] = config.organization.name;
|
|
1594
|
+
process.env[`${prefix}ORG_NAME`] = config.organization.name;
|
|
1595
|
+
process.env[`${prefix}ORGANIZATION`] = config.organization.name;
|
|
1596
|
+
process.env[`${prefix}ORGANIZATION_NAME`] = config.organization.name;
|
|
1597
|
+
if (config.organization.url) {
|
|
1598
|
+
process.env[`${prefix}ORG_URL`] = config.organization.url;
|
|
1599
|
+
process.env[`${prefix}ORGANIZATION_URL`] = config.organization.url;
|
|
1600
1600
|
}
|
|
1601
|
-
if (
|
|
1602
|
-
process.env[`${prefix}ORG_DESCRIPTION`] =
|
|
1603
|
-
process.env[`${prefix}ORGANIZATION_DESCRIPTION`] =
|
|
1601
|
+
if (config.organization.description) {
|
|
1602
|
+
process.env[`${prefix}ORG_DESCRIPTION`] = config.organization.description;
|
|
1603
|
+
process.env[`${prefix}ORGANIZATION_DESCRIPTION`] = config.organization.description;
|
|
1604
1604
|
}
|
|
1605
|
-
if (
|
|
1606
|
-
process.env[`${prefix}ORG_LOGO`] =
|
|
1607
|
-
process.env[`${prefix}ORGANIZATION_LOGO`] =
|
|
1605
|
+
if (config.organization.logo) {
|
|
1606
|
+
process.env[`${prefix}ORG_LOGO`] = config.organization.logo;
|
|
1607
|
+
process.env[`${prefix}ORGANIZATION_LOGO`] = config.organization.logo;
|
|
1608
1608
|
}
|
|
1609
|
-
if (
|
|
1610
|
-
process.env[`${prefix}ORG_ICON`] =
|
|
1611
|
-
process.env[`${prefix}ORGANIZATION_ICON`] =
|
|
1609
|
+
if (config.organization.icon) {
|
|
1610
|
+
process.env[`${prefix}ORG_ICON`] = config.organization.icon;
|
|
1611
|
+
process.env[`${prefix}ORGANIZATION_ICON`] = config.organization.icon;
|
|
1612
1612
|
}
|
|
1613
1613
|
}
|
|
1614
1614
|
}
|
|
1615
|
-
if (
|
|
1616
|
-
process.env[`${prefix}PACKAGE_MANAGER`] =
|
|
1615
|
+
if (config.packageManager) {
|
|
1616
|
+
process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager;
|
|
1617
1617
|
}
|
|
1618
|
-
if (
|
|
1619
|
-
process.env[`${prefix}LICENSE`] =
|
|
1618
|
+
if (config.license) {
|
|
1619
|
+
process.env[`${prefix}LICENSE`] = config.license;
|
|
1620
1620
|
}
|
|
1621
|
-
if (
|
|
1622
|
-
process.env[`${prefix}HOMEPAGE`] =
|
|
1621
|
+
if (config.homepage) {
|
|
1622
|
+
process.env[`${prefix}HOMEPAGE`] = config.homepage;
|
|
1623
1623
|
}
|
|
1624
|
-
if (
|
|
1625
|
-
process.env[`${prefix}DOCS`] =
|
|
1624
|
+
if (config.docs) {
|
|
1625
|
+
process.env[`${prefix}DOCS`] = config.docs;
|
|
1626
1626
|
}
|
|
1627
|
-
if (
|
|
1628
|
-
process.env[`${prefix}PORTAL`] =
|
|
1627
|
+
if (config.portal) {
|
|
1628
|
+
process.env[`${prefix}PORTAL`] = config.portal;
|
|
1629
1629
|
}
|
|
1630
|
-
if (
|
|
1631
|
-
process.env[`${prefix}LICENSING`] =
|
|
1630
|
+
if (config.licensing) {
|
|
1631
|
+
process.env[`${prefix}LICENSING`] = config.licensing;
|
|
1632
1632
|
}
|
|
1633
|
-
if (
|
|
1634
|
-
process.env[`${prefix}CONTACT`] =
|
|
1633
|
+
if (config.contact) {
|
|
1634
|
+
process.env[`${prefix}CONTACT`] = config.contact;
|
|
1635
1635
|
}
|
|
1636
|
-
if (
|
|
1637
|
-
process.env[`${prefix}SUPPORT`] =
|
|
1636
|
+
if (config.support) {
|
|
1637
|
+
process.env[`${prefix}SUPPORT`] = config.support;
|
|
1638
1638
|
}
|
|
1639
|
-
if (
|
|
1640
|
-
process.env[`${prefix}TIMEZONE`] =
|
|
1641
|
-
process.env.TZ =
|
|
1642
|
-
process.env.DEFAULT_TIMEZONE =
|
|
1643
|
-
process.env.TIMEZONE =
|
|
1639
|
+
if (config.timezone) {
|
|
1640
|
+
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
1641
|
+
process.env.TZ = config.timezone;
|
|
1642
|
+
process.env.DEFAULT_TIMEZONE = config.timezone;
|
|
1643
|
+
process.env.TIMEZONE = config.timezone;
|
|
1644
1644
|
}
|
|
1645
|
-
if (
|
|
1646
|
-
process.env[`${prefix}LOCALE`] =
|
|
1647
|
-
process.env.DEFAULT_LOCALE =
|
|
1648
|
-
process.env.LOCALE =
|
|
1649
|
-
process.env.LANG =
|
|
1645
|
+
if (config.locale) {
|
|
1646
|
+
process.env[`${prefix}LOCALE`] = config.locale;
|
|
1647
|
+
process.env.DEFAULT_LOCALE = config.locale;
|
|
1648
|
+
process.env.LOCALE = config.locale;
|
|
1649
|
+
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
1650
1650
|
}
|
|
1651
|
-
if (
|
|
1651
|
+
if (config.configFile) {
|
|
1652
1652
|
process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = correctPaths(
|
|
1653
|
-
|
|
1653
|
+
config.configFile
|
|
1654
1654
|
);
|
|
1655
1655
|
}
|
|
1656
|
-
if (
|
|
1657
|
-
process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths(
|
|
1658
|
-
process.env.NX_WORKSPACE_ROOT = correctPaths(
|
|
1659
|
-
process.env.NX_WORKSPACE_ROOT_PATH = correctPaths(
|
|
1656
|
+
if (config.workspaceRoot) {
|
|
1657
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths(config.workspaceRoot);
|
|
1658
|
+
process.env.NX_WORKSPACE_ROOT = correctPaths(config.workspaceRoot);
|
|
1659
|
+
process.env.NX_WORKSPACE_ROOT_PATH = correctPaths(config.workspaceRoot);
|
|
1660
1660
|
}
|
|
1661
|
-
if (
|
|
1662
|
-
if (!
|
|
1661
|
+
if (config.directories) {
|
|
1662
|
+
if (!config.skipCache && config.directories.cache) {
|
|
1663
1663
|
process.env[`${prefix}CACHE_DIR`] = correctPaths(
|
|
1664
|
-
|
|
1664
|
+
config.directories.cache
|
|
1665
1665
|
);
|
|
1666
1666
|
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
1667
1667
|
}
|
|
1668
|
-
if (
|
|
1669
|
-
process.env[`${prefix}DATA_DIR`] = correctPaths(
|
|
1668
|
+
if (config.directories.data) {
|
|
1669
|
+
process.env[`${prefix}DATA_DIR`] = correctPaths(config.directories.data);
|
|
1670
1670
|
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
1671
1671
|
}
|
|
1672
|
-
if (
|
|
1672
|
+
if (config.directories.config) {
|
|
1673
1673
|
process.env[`${prefix}CONFIG_DIR`] = correctPaths(
|
|
1674
|
-
|
|
1674
|
+
config.directories.config
|
|
1675
1675
|
);
|
|
1676
1676
|
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
1677
1677
|
}
|
|
1678
|
-
if (
|
|
1679
|
-
process.env[`${prefix}TEMP_DIR`] = correctPaths(
|
|
1678
|
+
if (config.directories.temp) {
|
|
1679
|
+
process.env[`${prefix}TEMP_DIR`] = correctPaths(config.directories.temp);
|
|
1680
1680
|
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
1681
1681
|
}
|
|
1682
|
-
if (
|
|
1683
|
-
process.env[`${prefix}LOG_DIR`] = correctPaths(
|
|
1682
|
+
if (config.directories.log) {
|
|
1683
|
+
process.env[`${prefix}LOG_DIR`] = correctPaths(config.directories.log);
|
|
1684
1684
|
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
1685
1685
|
}
|
|
1686
|
-
if (
|
|
1686
|
+
if (config.directories.build) {
|
|
1687
1687
|
process.env[`${prefix}BUILD_DIR`] = correctPaths(
|
|
1688
|
-
|
|
1688
|
+
config.directories.build
|
|
1689
1689
|
);
|
|
1690
1690
|
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
1691
1691
|
}
|
|
1692
1692
|
}
|
|
1693
|
-
if (
|
|
1694
|
-
process.env[`${prefix}SKIP_CACHE`] = String(
|
|
1695
|
-
if (
|
|
1696
|
-
process.env.NX_SKIP_NX_CACHE ??= String(
|
|
1697
|
-
process.env.NX_CACHE_PROJECT_GRAPH ??= String(
|
|
1693
|
+
if (config.skipCache !== void 0) {
|
|
1694
|
+
process.env[`${prefix}SKIP_CACHE`] = String(config.skipCache);
|
|
1695
|
+
if (config.skipCache) {
|
|
1696
|
+
process.env.NX_SKIP_NX_CACHE ??= String(config.skipCache);
|
|
1697
|
+
process.env.NX_CACHE_PROJECT_GRAPH ??= String(config.skipCache);
|
|
1698
1698
|
}
|
|
1699
1699
|
}
|
|
1700
|
-
if (
|
|
1701
|
-
process.env[`${prefix}MODE`] =
|
|
1702
|
-
process.env.NODE_ENV =
|
|
1703
|
-
process.env.ENVIRONMENT =
|
|
1700
|
+
if (config.mode) {
|
|
1701
|
+
process.env[`${prefix}MODE`] = config.mode;
|
|
1702
|
+
process.env.NODE_ENV = config.mode;
|
|
1703
|
+
process.env.ENVIRONMENT = config.mode;
|
|
1704
1704
|
}
|
|
1705
|
-
if (
|
|
1706
|
-
for (const key of Object.keys(
|
|
1707
|
-
setThemeColorsEnv(`${prefix}COLOR_${key}_`,
|
|
1705
|
+
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
1706
|
+
for (const key of Object.keys(config.colors)) {
|
|
1707
|
+
setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
1708
1708
|
}
|
|
1709
1709
|
} else {
|
|
1710
1710
|
setThemeColorsEnv(
|
|
1711
1711
|
`${prefix}COLOR_`,
|
|
1712
|
-
|
|
1712
|
+
config.colors
|
|
1713
1713
|
);
|
|
1714
1714
|
}
|
|
1715
|
-
if (
|
|
1716
|
-
process.env[`${prefix}REPOSITORY`] =
|
|
1715
|
+
if (config.repository) {
|
|
1716
|
+
process.env[`${prefix}REPOSITORY`] = config.repository;
|
|
1717
1717
|
}
|
|
1718
|
-
if (
|
|
1719
|
-
process.env[`${prefix}BRANCH`] =
|
|
1718
|
+
if (config.branch) {
|
|
1719
|
+
process.env[`${prefix}BRANCH`] = config.branch;
|
|
1720
1720
|
}
|
|
1721
|
-
if (
|
|
1722
|
-
process.env[`${prefix}PRE_ID`] = String(
|
|
1721
|
+
if (config.preid) {
|
|
1722
|
+
process.env[`${prefix}PRE_ID`] = String(config.preid);
|
|
1723
1723
|
}
|
|
1724
|
-
if (
|
|
1725
|
-
if (
|
|
1726
|
-
process.env[`${prefix}REGISTRY_GITHUB`] = String(
|
|
1724
|
+
if (config.registry) {
|
|
1725
|
+
if (config.registry.github) {
|
|
1726
|
+
process.env[`${prefix}REGISTRY_GITHUB`] = String(config.registry.github);
|
|
1727
1727
|
}
|
|
1728
|
-
if (
|
|
1729
|
-
process.env[`${prefix}REGISTRY_NPM`] = String(
|
|
1728
|
+
if (config.registry.npm) {
|
|
1729
|
+
process.env[`${prefix}REGISTRY_NPM`] = String(config.registry.npm);
|
|
1730
1730
|
}
|
|
1731
|
-
if (
|
|
1732
|
-
process.env[`${prefix}REGISTRY_CARGO`] = String(
|
|
1731
|
+
if (config.registry.cargo) {
|
|
1732
|
+
process.env[`${prefix}REGISTRY_CARGO`] = String(config.registry.cargo);
|
|
1733
1733
|
}
|
|
1734
|
-
if (
|
|
1734
|
+
if (config.registry.cyclone) {
|
|
1735
1735
|
process.env[`${prefix}REGISTRY_CYCLONE`] = String(
|
|
1736
|
-
|
|
1736
|
+
config.registry.cyclone
|
|
1737
1737
|
);
|
|
1738
1738
|
}
|
|
1739
|
-
if (
|
|
1739
|
+
if (config.registry.container) {
|
|
1740
1740
|
process.env[`${prefix}REGISTRY_CONTAINER`] = String(
|
|
1741
|
-
|
|
1741
|
+
config.registry.container
|
|
1742
1742
|
);
|
|
1743
1743
|
}
|
|
1744
1744
|
}
|
|
1745
|
-
if (
|
|
1746
|
-
process.env[`${prefix}LOG_LEVEL`] = String(
|
|
1747
|
-
process.env.LOG_LEVEL = String(
|
|
1745
|
+
if (config.logLevel) {
|
|
1746
|
+
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
1747
|
+
process.env.LOG_LEVEL = String(config.logLevel);
|
|
1748
1748
|
process.env.NX_VERBOSE_LOGGING = String(
|
|
1749
|
-
getLogLevel(
|
|
1749
|
+
getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false
|
|
1750
1750
|
);
|
|
1751
|
-
process.env.RUST_BACKTRACE = getLogLevel(
|
|
1751
|
+
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
1752
1752
|
}
|
|
1753
|
-
if (
|
|
1753
|
+
if (config.skipConfigLogging !== void 0) {
|
|
1754
1754
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
1755
|
-
|
|
1755
|
+
config.skipConfigLogging
|
|
1756
1756
|
);
|
|
1757
1757
|
}
|
|
1758
|
-
process.env[`${prefix}WORKSPACE_CONFIG`] = JSON.stringify(
|
|
1759
|
-
for (const key of Object.keys(
|
|
1760
|
-
if (
|
|
1761
|
-
setExtensionEnv(key,
|
|
1758
|
+
process.env[`${prefix}WORKSPACE_CONFIG`] = JSON.stringify(config);
|
|
1759
|
+
for (const key of Object.keys(config.extensions ?? {})) {
|
|
1760
|
+
if (config.extensions[key] && Object.keys(config.extensions[key])) {
|
|
1761
|
+
setExtensionEnv(key, config.extensions[key]);
|
|
1762
1762
|
}
|
|
1763
1763
|
}
|
|
1764
1764
|
};
|
|
1765
|
-
var setThemeColorsEnv = (prefix,
|
|
1766
|
-
return
|
|
1765
|
+
var setThemeColorsEnv = (prefix, config) => {
|
|
1766
|
+
return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
|
|
1767
1767
|
};
|
|
1768
|
-
var setSingleThemeColorsEnv = (prefix,
|
|
1769
|
-
if (
|
|
1770
|
-
process.env[`${prefix}DARK`] =
|
|
1768
|
+
var setSingleThemeColorsEnv = (prefix, config) => {
|
|
1769
|
+
if (config.dark) {
|
|
1770
|
+
process.env[`${prefix}DARK`] = config.dark;
|
|
1771
1771
|
}
|
|
1772
|
-
if (
|
|
1773
|
-
process.env[`${prefix}LIGHT`] =
|
|
1772
|
+
if (config.light) {
|
|
1773
|
+
process.env[`${prefix}LIGHT`] = config.light;
|
|
1774
1774
|
}
|
|
1775
|
-
if (
|
|
1776
|
-
process.env[`${prefix}BRAND`] =
|
|
1775
|
+
if (config.brand) {
|
|
1776
|
+
process.env[`${prefix}BRAND`] = config.brand;
|
|
1777
1777
|
}
|
|
1778
|
-
if (
|
|
1779
|
-
process.env[`${prefix}ALTERNATE`] =
|
|
1778
|
+
if (config.alternate) {
|
|
1779
|
+
process.env[`${prefix}ALTERNATE`] = config.alternate;
|
|
1780
1780
|
}
|
|
1781
|
-
if (
|
|
1782
|
-
process.env[`${prefix}ACCENT`] =
|
|
1781
|
+
if (config.accent) {
|
|
1782
|
+
process.env[`${prefix}ACCENT`] = config.accent;
|
|
1783
1783
|
}
|
|
1784
|
-
if (
|
|
1785
|
-
process.env[`${prefix}LINK`] =
|
|
1784
|
+
if (config.link) {
|
|
1785
|
+
process.env[`${prefix}LINK`] = config.link;
|
|
1786
1786
|
}
|
|
1787
|
-
if (
|
|
1788
|
-
process.env[`${prefix}HELP`] =
|
|
1787
|
+
if (config.help) {
|
|
1788
|
+
process.env[`${prefix}HELP`] = config.help;
|
|
1789
1789
|
}
|
|
1790
|
-
if (
|
|
1791
|
-
process.env[`${prefix}SUCCESS`] =
|
|
1790
|
+
if (config.success) {
|
|
1791
|
+
process.env[`${prefix}SUCCESS`] = config.success;
|
|
1792
1792
|
}
|
|
1793
|
-
if (
|
|
1794
|
-
process.env[`${prefix}INFO`] =
|
|
1793
|
+
if (config.info) {
|
|
1794
|
+
process.env[`${prefix}INFO`] = config.info;
|
|
1795
1795
|
}
|
|
1796
|
-
if (
|
|
1797
|
-
process.env[`${prefix}WARNING`] =
|
|
1796
|
+
if (config.warning) {
|
|
1797
|
+
process.env[`${prefix}WARNING`] = config.warning;
|
|
1798
1798
|
}
|
|
1799
|
-
if (
|
|
1800
|
-
process.env[`${prefix}DANGER`] =
|
|
1799
|
+
if (config.danger) {
|
|
1800
|
+
process.env[`${prefix}DANGER`] = config.danger;
|
|
1801
1801
|
}
|
|
1802
|
-
if (
|
|
1803
|
-
process.env[`${prefix}FATAL`] =
|
|
1802
|
+
if (config.fatal) {
|
|
1803
|
+
process.env[`${prefix}FATAL`] = config.fatal;
|
|
1804
1804
|
}
|
|
1805
|
-
if (
|
|
1806
|
-
process.env[`${prefix}POSITIVE`] =
|
|
1805
|
+
if (config.positive) {
|
|
1806
|
+
process.env[`${prefix}POSITIVE`] = config.positive;
|
|
1807
1807
|
}
|
|
1808
|
-
if (
|
|
1809
|
-
process.env[`${prefix}NEGATIVE`] =
|
|
1808
|
+
if (config.negative) {
|
|
1809
|
+
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
1810
1810
|
}
|
|
1811
|
-
if (
|
|
1812
|
-
for (let i = 0; i <
|
|
1813
|
-
process.env[`${prefix}GRADIENT_${i}`] =
|
|
1811
|
+
if (config.gradient) {
|
|
1812
|
+
for (let i = 0; i < config.gradient.length; i++) {
|
|
1813
|
+
process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
|
|
1814
1814
|
}
|
|
1815
1815
|
}
|
|
1816
1816
|
};
|
|
1817
|
-
var setMultiThemeColorsEnv = (prefix,
|
|
1817
|
+
var setMultiThemeColorsEnv = (prefix, config) => {
|
|
1818
1818
|
return {
|
|
1819
|
-
light: setBaseThemeColorsEnv(`${prefix}LIGHT_`,
|
|
1820
|
-
dark: setBaseThemeColorsEnv(`${prefix}DARK_`,
|
|
1819
|
+
light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config.light),
|
|
1820
|
+
dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config.dark)
|
|
1821
1821
|
};
|
|
1822
1822
|
};
|
|
1823
|
-
var setBaseThemeColorsEnv = (prefix,
|
|
1824
|
-
if (
|
|
1825
|
-
process.env[`${prefix}FOREGROUND`] =
|
|
1823
|
+
var setBaseThemeColorsEnv = (prefix, config) => {
|
|
1824
|
+
if (config.foreground) {
|
|
1825
|
+
process.env[`${prefix}FOREGROUND`] = config.foreground;
|
|
1826
1826
|
}
|
|
1827
|
-
if (
|
|
1828
|
-
process.env[`${prefix}BACKGROUND`] =
|
|
1827
|
+
if (config.background) {
|
|
1828
|
+
process.env[`${prefix}BACKGROUND`] = config.background;
|
|
1829
1829
|
}
|
|
1830
|
-
if (
|
|
1831
|
-
process.env[`${prefix}BRAND`] =
|
|
1830
|
+
if (config.brand) {
|
|
1831
|
+
process.env[`${prefix}BRAND`] = config.brand;
|
|
1832
1832
|
}
|
|
1833
|
-
if (
|
|
1834
|
-
process.env[`${prefix}ALTERNATE`] =
|
|
1833
|
+
if (config.alternate) {
|
|
1834
|
+
process.env[`${prefix}ALTERNATE`] = config.alternate;
|
|
1835
1835
|
}
|
|
1836
|
-
if (
|
|
1837
|
-
process.env[`${prefix}ACCENT`] =
|
|
1836
|
+
if (config.accent) {
|
|
1837
|
+
process.env[`${prefix}ACCENT`] = config.accent;
|
|
1838
1838
|
}
|
|
1839
|
-
if (
|
|
1840
|
-
process.env[`${prefix}LINK`] =
|
|
1839
|
+
if (config.link) {
|
|
1840
|
+
process.env[`${prefix}LINK`] = config.link;
|
|
1841
1841
|
}
|
|
1842
|
-
if (
|
|
1843
|
-
process.env[`${prefix}HELP`] =
|
|
1842
|
+
if (config.help) {
|
|
1843
|
+
process.env[`${prefix}HELP`] = config.help;
|
|
1844
1844
|
}
|
|
1845
|
-
if (
|
|
1846
|
-
process.env[`${prefix}SUCCESS`] =
|
|
1845
|
+
if (config.success) {
|
|
1846
|
+
process.env[`${prefix}SUCCESS`] = config.success;
|
|
1847
1847
|
}
|
|
1848
|
-
if (
|
|
1849
|
-
process.env[`${prefix}INFO`] =
|
|
1848
|
+
if (config.info) {
|
|
1849
|
+
process.env[`${prefix}INFO`] = config.info;
|
|
1850
1850
|
}
|
|
1851
|
-
if (
|
|
1852
|
-
process.env[`${prefix}WARNING`] =
|
|
1851
|
+
if (config.warning) {
|
|
1852
|
+
process.env[`${prefix}WARNING`] = config.warning;
|
|
1853
1853
|
}
|
|
1854
|
-
if (
|
|
1855
|
-
process.env[`${prefix}DANGER`] =
|
|
1854
|
+
if (config.danger) {
|
|
1855
|
+
process.env[`${prefix}DANGER`] = config.danger;
|
|
1856
1856
|
}
|
|
1857
|
-
if (
|
|
1858
|
-
process.env[`${prefix}FATAL`] =
|
|
1857
|
+
if (config.fatal) {
|
|
1858
|
+
process.env[`${prefix}FATAL`] = config.fatal;
|
|
1859
1859
|
}
|
|
1860
|
-
if (
|
|
1861
|
-
process.env[`${prefix}POSITIVE`] =
|
|
1860
|
+
if (config.positive) {
|
|
1861
|
+
process.env[`${prefix}POSITIVE`] = config.positive;
|
|
1862
1862
|
}
|
|
1863
|
-
if (
|
|
1864
|
-
process.env[`${prefix}NEGATIVE`] =
|
|
1863
|
+
if (config.negative) {
|
|
1864
|
+
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
1865
1865
|
}
|
|
1866
|
-
if (
|
|
1867
|
-
for (let i = 0; i <
|
|
1868
|
-
process.env[`${prefix}GRADIENT_${i}`] =
|
|
1866
|
+
if (config.gradient) {
|
|
1867
|
+
for (let i = 0; i < config.gradient.length; i++) {
|
|
1868
|
+
process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
|
|
1869
1869
|
}
|
|
1870
1870
|
}
|
|
1871
1871
|
};
|
|
@@ -1947,22 +1947,22 @@ var createConfigExtension = (extensionName, schema) => {
|
|
|
1947
1947
|
return extension;
|
|
1948
1948
|
};
|
|
1949
1949
|
var loadStormWorkspaceConfig = async (workspaceRoot3, skipLogs = false) => {
|
|
1950
|
-
const
|
|
1950
|
+
const config = await createStormWorkspaceConfig(
|
|
1951
1951
|
void 0,
|
|
1952
1952
|
void 0,
|
|
1953
1953
|
workspaceRoot3,
|
|
1954
1954
|
skipLogs,
|
|
1955
1955
|
true
|
|
1956
1956
|
);
|
|
1957
|
-
setConfigEnv(
|
|
1958
|
-
if (!skipLogs && !
|
|
1957
|
+
setConfigEnv(config);
|
|
1958
|
+
if (!skipLogs && !config.skipConfigLogging) {
|
|
1959
1959
|
writeTrace(
|
|
1960
1960
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1961
|
-
${formatLogMessage(
|
|
1962
|
-
|
|
1961
|
+
${formatLogMessage(config)}`,
|
|
1962
|
+
config
|
|
1963
1963
|
);
|
|
1964
1964
|
}
|
|
1965
|
-
return
|
|
1965
|
+
return config;
|
|
1966
1966
|
};
|
|
1967
1967
|
|
|
1968
1968
|
// ../config-tools/src/get-config.ts
|
|
@@ -1983,7 +1983,7 @@ import { defu as defu3 } from "defu";
|
|
|
1983
1983
|
var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_options, context) => {
|
|
1984
1984
|
const stopwatch = getStopwatch(name);
|
|
1985
1985
|
let options = _options;
|
|
1986
|
-
let
|
|
1986
|
+
let config = {};
|
|
1987
1987
|
try {
|
|
1988
1988
|
if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
1989
1989
|
throw new Error(
|
|
@@ -1994,8 +1994,8 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
1994
1994
|
const projectRoot = context.projectsConfigurations.projects[context.projectName].root || workspaceRoot3;
|
|
1995
1995
|
const sourceRoot = context.projectsConfigurations.projects[context.projectName].sourceRoot || projectRoot || workspaceRoot3;
|
|
1996
1996
|
const projectName = context.projectName;
|
|
1997
|
-
|
|
1998
|
-
writeInfo(`\u26A1 Running the ${name} executor for ${projectName} `,
|
|
1997
|
+
config.workspaceRoot = workspaceRoot3;
|
|
1998
|
+
writeInfo(`\u26A1 Running the ${name} executor for ${projectName} `, config);
|
|
1999
1999
|
if (!executorOptions.skipReadingConfig) {
|
|
2000
2000
|
writeTrace(
|
|
2001
2001
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
@@ -2004,28 +2004,28 @@ var withRunExecutor = (name, executorFn, executorOptions = {}) => async (_option
|
|
|
2004
2004
|
- sourceRoot: ${sourceRoot}
|
|
2005
2005
|
- projectName: ${projectName}
|
|
2006
2006
|
`,
|
|
2007
|
-
|
|
2007
|
+
config
|
|
2008
2008
|
);
|
|
2009
|
-
|
|
2009
|
+
config = await getConfig(workspaceRoot3);
|
|
2010
2010
|
}
|
|
2011
2011
|
if (executorOptions?.hooks?.applyDefaultOptions) {
|
|
2012
|
-
writeDebug("Running the applyDefaultOptions hook...",
|
|
2012
|
+
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
2013
2013
|
options = await Promise.resolve(
|
|
2014
|
-
executorOptions.hooks.applyDefaultOptions(options,
|
|
2014
|
+
executorOptions.hooks.applyDefaultOptions(options, config)
|
|
2015
2015
|
);
|
|
2016
|
-
writeDebug("Completed the applyDefaultOptions hook",
|
|
2016
|
+
writeDebug("Completed the applyDefaultOptions hook", config);
|
|
2017
2017
|
}
|
|
2018
2018
|
writeTrace(
|
|
2019
2019
|
`Executor schema options \u2699\uFE0F
|
|
2020
2020
|
${formatLogMessage(options)}
|
|
2021
2021
|
`,
|
|
2022
|
-
|
|
2022
|
+
config
|
|
2023
2023
|
);
|
|
2024
2024
|
const tokenized = await applyWorkspaceTokens(
|
|
2025
2025
|
options,
|
|
2026
2026
|
defu3(
|
|
2027
|
-
{ workspaceRoot: workspaceRoot3, projectRoot, sourceRoot, projectName, config
|
|
2028
|
-
|
|
2027
|
+
{ workspaceRoot: workspaceRoot3, projectRoot, sourceRoot, projectName, config },
|
|
2028
|
+
config,
|
|
2029
2029
|
context.projectsConfigurations.projects[context.projectName]
|
|
2030
2030
|
),
|
|
2031
2031
|
applyWorkspaceProjectTokens
|
|
@@ -2034,16 +2034,16 @@ ${formatLogMessage(options)}
|
|
|
2034
2034
|
`Executor schema tokenized options \u2699\uFE0F
|
|
2035
2035
|
${formatLogMessage(tokenized)}
|
|
2036
2036
|
`,
|
|
2037
|
-
|
|
2037
|
+
config
|
|
2038
2038
|
);
|
|
2039
2039
|
if (executorOptions?.hooks?.preProcess) {
|
|
2040
|
-
writeDebug("Running the preProcess hook...",
|
|
2040
|
+
writeDebug("Running the preProcess hook...", config);
|
|
2041
2041
|
await Promise.resolve(
|
|
2042
|
-
executorOptions.hooks.preProcess(tokenized,
|
|
2042
|
+
executorOptions.hooks.preProcess(tokenized, config)
|
|
2043
2043
|
);
|
|
2044
|
-
writeDebug("Completed the preProcess hook",
|
|
2044
|
+
writeDebug("Completed the preProcess hook", config);
|
|
2045
2045
|
}
|
|
2046
|
-
const ret = executorFn(tokenized, context,
|
|
2046
|
+
const ret = executorFn(tokenized, context, config);
|
|
2047
2047
|
if (_isFunction2(ret?.next)) {
|
|
2048
2048
|
const asyncGen = ret;
|
|
2049
2049
|
for await (const iter of asyncGen) {
|
|
@@ -2065,25 +2065,25 @@ ${formatLogMessage(
|
|
|
2065
2065
|
);
|
|
2066
2066
|
}
|
|
2067
2067
|
if (executorOptions?.hooks?.postProcess) {
|
|
2068
|
-
writeDebug("Running the postProcess hook...",
|
|
2069
|
-
await Promise.resolve(executorOptions.hooks.postProcess(
|
|
2070
|
-
writeDebug("Completed the postProcess hook",
|
|
2068
|
+
writeDebug("Running the postProcess hook...", config);
|
|
2069
|
+
await Promise.resolve(executorOptions.hooks.postProcess(config));
|
|
2070
|
+
writeDebug("Completed the postProcess hook", config);
|
|
2071
2071
|
}
|
|
2072
2072
|
writeSuccess(`Completed running the ${name} task executor!
|
|
2073
|
-
`,
|
|
2073
|
+
`, config);
|
|
2074
2074
|
return {
|
|
2075
2075
|
success: true
|
|
2076
2076
|
};
|
|
2077
2077
|
} catch (error) {
|
|
2078
2078
|
writeFatal(
|
|
2079
2079
|
"A fatal error occurred while running the executor - the process was forced to terminate",
|
|
2080
|
-
|
|
2080
|
+
config
|
|
2081
2081
|
);
|
|
2082
2082
|
writeError(
|
|
2083
2083
|
`An exception was thrown in the executor's process
|
|
2084
2084
|
- Details: ${error.message}
|
|
2085
2085
|
- Stacktrace: ${error.stack}`,
|
|
2086
|
-
|
|
2086
|
+
config
|
|
2087
2087
|
);
|
|
2088
2088
|
return {
|
|
2089
2089
|
success: false
|
|
@@ -2187,14 +2187,14 @@ function cargoCommandSync(args = "", options) {
|
|
|
2187
2187
|
}
|
|
2188
2188
|
}
|
|
2189
2189
|
function cargoMetadata() {
|
|
2190
|
-
const
|
|
2190
|
+
const output2 = cargoCommandSync("metadata --format-version=1", {
|
|
2191
2191
|
stdio: "pipe"
|
|
2192
2192
|
});
|
|
2193
|
-
if (!
|
|
2193
|
+
if (!output2.success) {
|
|
2194
2194
|
console.error("Failed to get cargo metadata");
|
|
2195
2195
|
return null;
|
|
2196
2196
|
}
|
|
2197
|
-
return JSON.parse(
|
|
2197
|
+
return JSON.parse(output2.output);
|
|
2198
2198
|
}
|
|
2199
2199
|
function runProcess(processCmd, ...args) {
|
|
2200
2200
|
const metadata = cargoMetadata();
|
|
@@ -2395,7 +2395,7 @@ init_esm_shims();
|
|
|
2395
2395
|
import { CopyAssetsHandler } from "@nx/js/src/utils/assets/copy-assets-handler";
|
|
2396
2396
|
import { glob } from "glob";
|
|
2397
2397
|
import { readFile as readFile2, writeFile } from "node:fs/promises";
|
|
2398
|
-
var copyAssets = async (
|
|
2398
|
+
var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson3 = true, includeSrc = false, banner, footer) => {
|
|
2399
2399
|
const pendingAssets = Array.from(assets ?? []);
|
|
2400
2400
|
pendingAssets.push({
|
|
2401
2401
|
input: projectRoot,
|
|
@@ -2424,29 +2424,29 @@ var copyAssets = async (config5, assets, outputPath, projectRoot, sourceRoot, ge
|
|
|
2424
2424
|
writeTrace(
|
|
2425
2425
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
2426
2426
|
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
2427
|
-
|
|
2427
|
+
config
|
|
2428
2428
|
);
|
|
2429
2429
|
const assetHandler = new CopyAssetsHandler({
|
|
2430
2430
|
projectDir: projectRoot,
|
|
2431
|
-
rootDir:
|
|
2431
|
+
rootDir: config.workspaceRoot,
|
|
2432
2432
|
outputDir: outputPath,
|
|
2433
2433
|
assets: pendingAssets
|
|
2434
2434
|
});
|
|
2435
2435
|
await assetHandler.processAllAssetsOnce();
|
|
2436
|
-
writeTrace("Completed copying assets to the output directory",
|
|
2436
|
+
writeTrace("Completed copying assets to the output directory", config);
|
|
2437
2437
|
if (includeSrc === true) {
|
|
2438
2438
|
writeDebug(
|
|
2439
2439
|
`\u{1F4DD} Adding banner and writing source files: ${joinPaths(
|
|
2440
2440
|
outputPath,
|
|
2441
2441
|
"src"
|
|
2442
2442
|
)}`,
|
|
2443
|
-
|
|
2443
|
+
config
|
|
2444
2444
|
);
|
|
2445
2445
|
const files = await glob([
|
|
2446
|
-
joinPaths(
|
|
2447
|
-
joinPaths(
|
|
2448
|
-
joinPaths(
|
|
2449
|
-
joinPaths(
|
|
2446
|
+
joinPaths(config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
2447
|
+
joinPaths(config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
2448
|
+
joinPaths(config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
2449
|
+
joinPaths(config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
2450
2450
|
]);
|
|
2451
2451
|
await Promise.allSettled(
|
|
2452
2452
|
files.map(
|
|
@@ -3081,8 +3081,8 @@ async function build2(options) {
|
|
|
3081
3081
|
}
|
|
3082
3082
|
|
|
3083
3083
|
// ../workspace-tools/src/executors/esbuild/executor.ts
|
|
3084
|
-
async function esbuildExecutorFn(options, context,
|
|
3085
|
-
writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace",
|
|
3084
|
+
async function esbuildExecutorFn(options, context, config) {
|
|
3085
|
+
writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
3086
3086
|
if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) {
|
|
3087
3087
|
throw new Error(
|
|
3088
3088
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -3243,13 +3243,13 @@ import esBuildPlugin from "@size-limit/esbuild";
|
|
|
3243
3243
|
import esBuildWhyPlugin from "@size-limit/esbuild-why";
|
|
3244
3244
|
import filePlugin from "@size-limit/file";
|
|
3245
3245
|
import sizeLimit from "size-limit";
|
|
3246
|
-
async function sizeLimitExecutorFn(options, context,
|
|
3246
|
+
async function sizeLimitExecutorFn(options, context, config) {
|
|
3247
3247
|
if (!context?.projectName || !context.projectsConfigurations?.projects || !context.projectsConfigurations.projects[context.projectName]) {
|
|
3248
3248
|
throw new Error(
|
|
3249
3249
|
"The Size-Limit process failed because the context is not valid. Please run this command from a workspace."
|
|
3250
3250
|
);
|
|
3251
3251
|
}
|
|
3252
|
-
writeInfo(`\u{1F4CF} Running Size-Limit on ${context.projectName}`,
|
|
3252
|
+
writeInfo(`\u{1F4CF} Running Size-Limit on ${context.projectName}`, config);
|
|
3253
3253
|
sizeLimit([filePlugin, esBuildPlugin, esBuildWhyPlugin], {
|
|
3254
3254
|
checks: options.entry ?? context.projectsConfigurations.projects[context.projectName]?.sourceRoot ?? joinPathFragments4(
|
|
3255
3255
|
context.projectsConfigurations.projects[context.projectName]?.root ?? "./",
|
|
@@ -3258,7 +3258,7 @@ async function sizeLimitExecutorFn(options, context, config5) {
|
|
|
3258
3258
|
}).then((result) => {
|
|
3259
3259
|
writeInfo(
|
|
3260
3260
|
`\u{1F4CF} ${context.projectName} Size-Limit result: ${JSON.stringify(result)}`,
|
|
3261
|
-
|
|
3261
|
+
config
|
|
3262
3262
|
);
|
|
3263
3263
|
});
|
|
3264
3264
|
return {
|
|
@@ -3296,13 +3296,13 @@ import { build as tsdown } from "tsdown";
|
|
|
3296
3296
|
// ../tsdown/src/clean.ts
|
|
3297
3297
|
init_esm_shims();
|
|
3298
3298
|
import { rm as rm2 } from "node:fs/promises";
|
|
3299
|
-
async function cleanDirectories2(name = "TSDown", directory,
|
|
3299
|
+
async function cleanDirectories2(name = "TSDown", directory, config) {
|
|
3300
3300
|
await rm2(directory, { recursive: true, force: true });
|
|
3301
3301
|
}
|
|
3302
3302
|
|
|
3303
3303
|
// ../tsdown/src/config.ts
|
|
3304
3304
|
init_esm_shims();
|
|
3305
|
-
function getDefaultOptions(
|
|
3305
|
+
function getDefaultOptions(config) {
|
|
3306
3306
|
return {
|
|
3307
3307
|
entry: ["./src/*.ts"],
|
|
3308
3308
|
platform: "node",
|
|
@@ -3315,7 +3315,7 @@ function getDefaultOptions(config5) {
|
|
|
3315
3315
|
},
|
|
3316
3316
|
publint: true,
|
|
3317
3317
|
fixedExtension: true,
|
|
3318
|
-
...
|
|
3318
|
+
...config
|
|
3319
3319
|
};
|
|
3320
3320
|
}
|
|
3321
3321
|
function toTSDownFormat(format4) {
|
|
@@ -3576,8 +3576,8 @@ async function build3(options) {
|
|
|
3576
3576
|
}
|
|
3577
3577
|
|
|
3578
3578
|
// ../workspace-tools/src/executors/tsdown/executor.ts
|
|
3579
|
-
async function tsdownExecutorFn(options, context,
|
|
3580
|
-
writeInfo("\u{1F4E6} Running Storm TSDown executor on the workspace",
|
|
3579
|
+
async function tsdownExecutorFn(options, context, config) {
|
|
3580
|
+
writeInfo("\u{1F4E6} Running Storm TSDown executor on the workspace", config);
|
|
3581
3581
|
if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) {
|
|
3582
3582
|
throw new Error(
|
|
3583
3583
|
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
@@ -3618,14 +3618,14 @@ var executor_default8 = withRunExecutor(
|
|
|
3618
3618
|
init_esm_shims();
|
|
3619
3619
|
import { removeSync } from "fs-extra";
|
|
3620
3620
|
import { TypiaProgrammer } from "typia/lib/programmers/TypiaProgrammer.js";
|
|
3621
|
-
async function typiaExecutorFn(options, _,
|
|
3621
|
+
async function typiaExecutorFn(options, _, config) {
|
|
3622
3622
|
if (options.clean !== false) {
|
|
3623
|
-
writeInfo(`\u{1F9F9} Cleaning output path: ${options.outputPath}`,
|
|
3623
|
+
writeInfo(`\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
3624
3624
|
removeSync(options.outputPath);
|
|
3625
3625
|
}
|
|
3626
3626
|
await Promise.all(
|
|
3627
3627
|
options.entry.map((entry) => {
|
|
3628
|
-
writeInfo(`\u{1F680} Running Typia on entry: ${entry}`,
|
|
3628
|
+
writeInfo(`\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
3629
3629
|
return TypiaProgrammer.build({
|
|
3630
3630
|
input: entry,
|
|
3631
3631
|
output: options.outputPath,
|
|
@@ -3658,8 +3658,8 @@ var executor_default9 = withRunExecutor(
|
|
|
3658
3658
|
init_esm_shims();
|
|
3659
3659
|
import { defu as defu6 } from "defu";
|
|
3660
3660
|
import { createJiti } from "jiti";
|
|
3661
|
-
async function unbuildExecutorFn(options, context,
|
|
3662
|
-
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace",
|
|
3661
|
+
async function unbuildExecutorFn(options, context, config) {
|
|
3662
|
+
writeInfo("\u{1F4E6} Running Storm Unbuild executor on the workspace", config);
|
|
3663
3663
|
if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName]) {
|
|
3664
3664
|
throw new Error(
|
|
3665
3665
|
"The Build process failed because the context is not valid. Please run this command from a workspace root directory."
|
|
@@ -3675,10 +3675,10 @@ async function unbuildExecutorFn(options, context, config5) {
|
|
|
3675
3675
|
"The Build process failed because the project's source root is not valid. Please run this command from a workspace root directory."
|
|
3676
3676
|
);
|
|
3677
3677
|
}
|
|
3678
|
-
const jiti = createJiti(
|
|
3679
|
-
fsCache:
|
|
3680
|
-
|
|
3681
|
-
|
|
3678
|
+
const jiti = createJiti(config.workspaceRoot, {
|
|
3679
|
+
fsCache: config.skipCache ? false : joinPaths(
|
|
3680
|
+
config.workspaceRoot,
|
|
3681
|
+
config.directories.cache || "node_modules/.cache/storm",
|
|
3682
3682
|
"jiti"
|
|
3683
3683
|
),
|
|
3684
3684
|
interopDefault: true
|
|
@@ -3698,9 +3698,9 @@ async function unbuildExecutorFn(options, context, config5) {
|
|
|
3698
3698
|
{
|
|
3699
3699
|
stubOptions: {
|
|
3700
3700
|
jiti: {
|
|
3701
|
-
fsCache:
|
|
3702
|
-
|
|
3703
|
-
|
|
3701
|
+
fsCache: config.skipCache ? false : joinPaths(
|
|
3702
|
+
config.workspaceRoot,
|
|
3703
|
+
config.directories.cache || "node_modules/.cache/storm",
|
|
3704
3704
|
"jiti"
|
|
3705
3705
|
)
|
|
3706
3706
|
}
|
|
@@ -3733,7 +3733,7 @@ var executor_default10 = withRunExecutor(
|
|
|
3733
3733
|
{
|
|
3734
3734
|
skipReadingConfig: false,
|
|
3735
3735
|
hooks: {
|
|
3736
|
-
applyDefaultOptions: async (options,
|
|
3736
|
+
applyDefaultOptions: async (options, config) => {
|
|
3737
3737
|
options.debug ??= false;
|
|
3738
3738
|
options.treeShaking ??= true;
|
|
3739
3739
|
options.buildOnly ??= false;
|
|
@@ -3765,46 +3765,46 @@ var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
|
3765
3765
|
}) => async (tree, _options) => {
|
|
3766
3766
|
const stopwatch = getStopwatch(name);
|
|
3767
3767
|
let options = _options;
|
|
3768
|
-
let
|
|
3768
|
+
let config;
|
|
3769
3769
|
try {
|
|
3770
3770
|
writeInfo(`\u26A1 Running the ${name} generator...
|
|
3771
3771
|
|
|
3772
|
-
`,
|
|
3772
|
+
`, config);
|
|
3773
3773
|
const workspaceRoot3 = findWorkspaceRoot();
|
|
3774
3774
|
if (!generatorOptions.skipReadingConfig) {
|
|
3775
3775
|
writeDebug(
|
|
3776
3776
|
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
3777
3777
|
- workspaceRoot: ${workspaceRoot3}`,
|
|
3778
|
-
|
|
3778
|
+
config
|
|
3779
3779
|
);
|
|
3780
|
-
|
|
3780
|
+
config = await getConfig(workspaceRoot3);
|
|
3781
3781
|
}
|
|
3782
3782
|
if (generatorOptions?.hooks?.applyDefaultOptions) {
|
|
3783
|
-
writeDebug("Running the applyDefaultOptions hook...",
|
|
3783
|
+
writeDebug("Running the applyDefaultOptions hook...", config);
|
|
3784
3784
|
options = await Promise.resolve(
|
|
3785
|
-
generatorOptions.hooks.applyDefaultOptions(options,
|
|
3785
|
+
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
3786
3786
|
);
|
|
3787
|
-
writeDebug("Completed the applyDefaultOptions hook",
|
|
3787
|
+
writeDebug("Completed the applyDefaultOptions hook", config);
|
|
3788
3788
|
}
|
|
3789
3789
|
writeTrace(
|
|
3790
3790
|
`Generator schema options \u2699\uFE0F
|
|
3791
3791
|
${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
|
|
3792
|
-
|
|
3792
|
+
config
|
|
3793
3793
|
);
|
|
3794
3794
|
const tokenized = await applyWorkspaceTokens(
|
|
3795
3795
|
options,
|
|
3796
|
-
{ workspaceRoot: tree.root, config
|
|
3796
|
+
{ workspaceRoot: tree.root, config },
|
|
3797
3797
|
applyWorkspaceBaseTokens
|
|
3798
3798
|
);
|
|
3799
3799
|
if (generatorOptions?.hooks?.preProcess) {
|
|
3800
|
-
writeDebug("Running the preProcess hook...",
|
|
3800
|
+
writeDebug("Running the preProcess hook...", config);
|
|
3801
3801
|
await Promise.resolve(
|
|
3802
|
-
generatorOptions.hooks.preProcess(tokenized,
|
|
3802
|
+
generatorOptions.hooks.preProcess(tokenized, config)
|
|
3803
3803
|
);
|
|
3804
|
-
writeDebug("Completed the preProcess hook",
|
|
3804
|
+
writeDebug("Completed the preProcess hook", config);
|
|
3805
3805
|
}
|
|
3806
3806
|
const result = await Promise.resolve(
|
|
3807
|
-
generatorFn(tree, tokenized,
|
|
3807
|
+
generatorFn(tree, tokenized, config)
|
|
3808
3808
|
);
|
|
3809
3809
|
if (result) {
|
|
3810
3810
|
if (result.success === false || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string") {
|
|
@@ -3816,25 +3816,25 @@ ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[ke
|
|
|
3816
3816
|
}
|
|
3817
3817
|
}
|
|
3818
3818
|
if (generatorOptions?.hooks?.postProcess) {
|
|
3819
|
-
writeDebug("Running the postProcess hook...",
|
|
3820
|
-
await Promise.resolve(generatorOptions.hooks.postProcess(
|
|
3821
|
-
writeDebug("Completed the postProcess hook",
|
|
3819
|
+
writeDebug("Running the postProcess hook...", config);
|
|
3820
|
+
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
3821
|
+
writeDebug("Completed the postProcess hook", config);
|
|
3822
3822
|
}
|
|
3823
3823
|
return () => {
|
|
3824
3824
|
writeSuccess(`Completed running the ${name} generator!
|
|
3825
|
-
`,
|
|
3825
|
+
`, config);
|
|
3826
3826
|
};
|
|
3827
3827
|
} catch (error) {
|
|
3828
3828
|
return () => {
|
|
3829
3829
|
writeFatal(
|
|
3830
3830
|
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
3831
|
-
|
|
3831
|
+
config
|
|
3832
3832
|
);
|
|
3833
3833
|
writeError(
|
|
3834
3834
|
`An exception was thrown in the generator's process
|
|
3835
3835
|
- Details: ${error.message}
|
|
3836
3836
|
- Stacktrace: ${error.stack}`,
|
|
3837
|
-
|
|
3837
|
+
config
|
|
3838
3838
|
);
|
|
3839
3839
|
};
|
|
3840
3840
|
} finally {
|
|
@@ -3872,7 +3872,7 @@ var nodeVersion = "20.11.0";
|
|
|
3872
3872
|
var pnpmVersion = "8.10.2";
|
|
3873
3873
|
|
|
3874
3874
|
// ../workspace-tools/src/base/typescript-library-generator.ts
|
|
3875
|
-
async function typeScriptLibraryGeneratorFn(tree, options,
|
|
3875
|
+
async function typeScriptLibraryGeneratorFn(tree, options, config) {
|
|
3876
3876
|
const normalized = await normalizeOptions(tree, { ...options });
|
|
3877
3877
|
const tasks = [];
|
|
3878
3878
|
tasks.push(
|
|
@@ -3949,7 +3949,7 @@ async function typeScriptLibraryGeneratorFn(tree, options, config5) {
|
|
|
3949
3949
|
addProjectConfiguration(tree, normalized.name, projectConfig);
|
|
3950
3950
|
let repository = {
|
|
3951
3951
|
type: "github",
|
|
3952
|
-
url:
|
|
3952
|
+
url: config?.repository || `https://github.com/${(typeof config?.organization === "string" ? config?.organization : config?.organization?.name) || "storm-software"}/${config?.namespace || config?.name || "repository"}.git`
|
|
3953
3953
|
};
|
|
3954
3954
|
let description = options.description || "A package developed by Storm Software used to create modern, scalable web applications.";
|
|
3955
3955
|
if (tree.exists("package.json")) {
|
|
@@ -4095,10 +4095,10 @@ function createProjectTsConfigJson(tree, options) {
|
|
|
4095
4095
|
};
|
|
4096
4096
|
writeJson(tree, joinPaths(options.projectRoot, "tsconfig.json"), tsconfig);
|
|
4097
4097
|
}
|
|
4098
|
-
async function normalizeOptions(tree, options,
|
|
4098
|
+
async function normalizeOptions(tree, options, config) {
|
|
4099
4099
|
let importPath = options.importPath;
|
|
4100
|
-
if (!importPath &&
|
|
4101
|
-
importPath = `@${
|
|
4100
|
+
if (!importPath && config?.namespace) {
|
|
4101
|
+
importPath = `@${config?.namespace}/${options.name}`;
|
|
4102
4102
|
}
|
|
4103
4103
|
if (options.publishable) {
|
|
4104
4104
|
if (!importPath) {
|
|
@@ -4157,7 +4157,7 @@ async function normalizeOptions(tree, options, config5) {
|
|
|
4157
4157
|
}
|
|
4158
4158
|
|
|
4159
4159
|
// ../workspace-tools/src/generators/browser-library/generator.ts
|
|
4160
|
-
async function browserLibraryGeneratorFn(tree, schema,
|
|
4160
|
+
async function browserLibraryGeneratorFn(tree, schema, config) {
|
|
4161
4161
|
const filesDir = joinPaths(
|
|
4162
4162
|
__dirname,
|
|
4163
4163
|
"src",
|
|
@@ -4219,7 +4219,7 @@ async function browserLibraryGeneratorFn(tree, schema, config5) {
|
|
|
4219
4219
|
}
|
|
4220
4220
|
}
|
|
4221
4221
|
});
|
|
4222
|
-
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions,
|
|
4222
|
+
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions, config);
|
|
4223
4223
|
await formatFiles2(tree);
|
|
4224
4224
|
return null;
|
|
4225
4225
|
}
|
|
@@ -4241,14 +4241,14 @@ var generator_default = withRunGenerator(
|
|
|
4241
4241
|
init_esm_shims();
|
|
4242
4242
|
import { formatFiles as formatFiles3, writeJson as writeJson2 } from "@nx/devkit";
|
|
4243
4243
|
import * as z2 from "zod";
|
|
4244
|
-
async function configSchemaGeneratorFn(tree, options,
|
|
4244
|
+
async function configSchemaGeneratorFn(tree, options, config) {
|
|
4245
4245
|
writeInfo(
|
|
4246
4246
|
"\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
|
|
4247
|
-
|
|
4247
|
+
config
|
|
4248
4248
|
);
|
|
4249
4249
|
writeTrace(
|
|
4250
4250
|
`Determining the Storm Workspace Configuration JSON Schema...`,
|
|
4251
|
-
|
|
4251
|
+
config
|
|
4252
4252
|
);
|
|
4253
4253
|
const jsonSchema = z2.toJSONSchema(workspaceConfigSchema, {
|
|
4254
4254
|
target: "draft-7",
|
|
@@ -4257,25 +4257,25 @@ async function configSchemaGeneratorFn(tree, options, config5) {
|
|
|
4257
4257
|
jsonSchema.$id ??= "https://public.storm-cdn.com/schemas/storm-workspace.schema.json";
|
|
4258
4258
|
jsonSchema.title ??= "Storm Workspace Configuration JSON Schema";
|
|
4259
4259
|
jsonSchema.description ??= "This JSON Schema defines the structure of the Storm Workspace configuration file (`storm-workspace.json`). It is used to validate the configuration file and ensure that it adheres to the expected format.";
|
|
4260
|
-
writeTrace(jsonSchema,
|
|
4260
|
+
writeTrace(jsonSchema, config);
|
|
4261
4261
|
if (!options.outputFile) {
|
|
4262
4262
|
throw new Error(
|
|
4263
4263
|
"The `outputFile` option is required. Please specify the output file path."
|
|
4264
4264
|
);
|
|
4265
4265
|
}
|
|
4266
4266
|
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
4267
|
-
|
|
4267
|
+
config?.workspaceRoot ?? findWorkspaceRoot(),
|
|
4268
4268
|
options.outputFile.startsWith("./") ? "" : "./"
|
|
4269
4269
|
);
|
|
4270
4270
|
writeTrace(
|
|
4271
4271
|
`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
|
|
4272
|
-
|
|
4272
|
+
config
|
|
4273
4273
|
);
|
|
4274
4274
|
writeJson2(tree, outputPath, jsonSchema, { spaces: 2 });
|
|
4275
4275
|
await formatFiles3(tree);
|
|
4276
4276
|
writeSuccess(
|
|
4277
4277
|
"\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
|
|
4278
|
-
|
|
4278
|
+
config
|
|
4279
4279
|
);
|
|
4280
4280
|
return {
|
|
4281
4281
|
success: true
|
|
@@ -4330,7 +4330,7 @@ import {
|
|
|
4330
4330
|
names as names3,
|
|
4331
4331
|
offsetFromRoot as offsetFromRoot3
|
|
4332
4332
|
} from "@nx/devkit";
|
|
4333
|
-
async function neutralLibraryGeneratorFn(tree, schema,
|
|
4333
|
+
async function neutralLibraryGeneratorFn(tree, schema, config) {
|
|
4334
4334
|
const filesDir = joinPaths(
|
|
4335
4335
|
__dirname,
|
|
4336
4336
|
"src",
|
|
@@ -4364,7 +4364,7 @@ async function neutralLibraryGeneratorFn(tree, schema, config5) {
|
|
|
4364
4364
|
buildable: options.bundler && options.bundler !== "none",
|
|
4365
4365
|
hasUnitTestRunner: options.unitTestRunner !== "none"
|
|
4366
4366
|
});
|
|
4367
|
-
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions,
|
|
4367
|
+
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions, config);
|
|
4368
4368
|
await formatFiles5(tree);
|
|
4369
4369
|
return null;
|
|
4370
4370
|
}
|
|
@@ -4390,7 +4390,7 @@ import {
|
|
|
4390
4390
|
names as names4,
|
|
4391
4391
|
offsetFromRoot as offsetFromRoot4
|
|
4392
4392
|
} from "@nx/devkit";
|
|
4393
|
-
async function nodeLibraryGeneratorFn(tree, schema,
|
|
4393
|
+
async function nodeLibraryGeneratorFn(tree, schema, config) {
|
|
4394
4394
|
const filesDir = joinPaths(
|
|
4395
4395
|
__dirname,
|
|
4396
4396
|
"src",
|
|
@@ -4426,7 +4426,7 @@ async function nodeLibraryGeneratorFn(tree, schema, config5) {
|
|
|
4426
4426
|
buildable: options.bundler && options.bundler !== "none",
|
|
4427
4427
|
hasUnitTestRunner: options.unitTestRunner !== "none"
|
|
4428
4428
|
});
|
|
4429
|
-
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions,
|
|
4429
|
+
await typeScriptLibraryGeneratorFn(tree, tsLibraryGeneratorOptions, config);
|
|
4430
4430
|
await formatFiles6(tree);
|
|
4431
4431
|
return null;
|
|
4432
4432
|
}
|
|
@@ -4683,417 +4683,6 @@ var generator_default5 = withRunGenerator(
|
|
|
4683
4683
|
presetGeneratorFn
|
|
4684
4684
|
);
|
|
4685
4685
|
|
|
4686
|
-
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
4687
|
-
init_esm_shims();
|
|
4688
|
-
import {
|
|
4689
|
-
formatFiles as formatFiles8,
|
|
4690
|
-
joinPathFragments as joinPathFragments6,
|
|
4691
|
-
output,
|
|
4692
|
-
readJson as readJson2,
|
|
4693
|
-
updateJson as updateJson3,
|
|
4694
|
-
writeJson as writeJson3
|
|
4695
|
-
} from "@nx/devkit";
|
|
4696
|
-
import { resolveLocalPackageDependencies as resolveLocalPackageJsonDependencies } from "@nx/js/src/generators/release-version/utils/resolve-local-package-dependencies";
|
|
4697
|
-
import { updateLockFile } from "@nx/js/src/release/utils/update-lock-file";
|
|
4698
|
-
|
|
4699
|
-
// ../git-tools/dist/release/config.js
|
|
4700
|
-
init_esm_shims();
|
|
4701
|
-
|
|
4702
|
-
// ../git-tools/dist/chunk-YCEUZFMU.js
|
|
4703
|
-
init_esm_shims();
|
|
4704
|
-
|
|
4705
|
-
// ../git-tools/dist/chunk-JCEVFJCA.js
|
|
4706
|
-
init_esm_shims();
|
|
4707
|
-
|
|
4708
|
-
// ../git-tools/dist/chunk-KZRVQ5RZ.js
|
|
4709
|
-
init_esm_shims();
|
|
4710
|
-
|
|
4711
|
-
// ../git-tools/dist/chunk-5XU2KBM6.js
|
|
4712
|
-
init_esm_shims();
|
|
4713
|
-
var DEFAULT_COMMIT_PROMPT_MESSAGES = {
|
|
4714
|
-
skip: "press enter to skip",
|
|
4715
|
-
max: "must be %d chars at most",
|
|
4716
|
-
min: "must be %d chars at least",
|
|
4717
|
-
emptyWarning: "can not be empty",
|
|
4718
|
-
upperLimitWarning: "%s is %d characters longer than the upper limit",
|
|
4719
|
-
lowerLimitWarning: "%s is %d characters less than the lower limit",
|
|
4720
|
-
closedIssueMessage: "Closes: "
|
|
4721
|
-
};
|
|
4722
|
-
|
|
4723
|
-
// ../git-tools/dist/chunk-3GGWHKRP.js
|
|
4724
|
-
init_esm_shims();
|
|
4725
|
-
var DEFAULT_COMMIT_TYPES = {
|
|
4726
|
-
/* --- Bumps version when selected --- */
|
|
4727
|
-
"chore": {
|
|
4728
|
-
"description": "Other changes that don't modify src or test files",
|
|
4729
|
-
"title": "Chore",
|
|
4730
|
-
"emoji": "\u2699\uFE0F ",
|
|
4731
|
-
"semverBump": "patch",
|
|
4732
|
-
"changelog": {
|
|
4733
|
-
"title": "Miscellaneous",
|
|
4734
|
-
"hidden": false
|
|
4735
|
-
}
|
|
4736
|
-
},
|
|
4737
|
-
"fix": {
|
|
4738
|
-
"description": "A change that resolves an issue previously identified with the package",
|
|
4739
|
-
"title": "Bug Fix",
|
|
4740
|
-
"emoji": "\u{1FAB2} ",
|
|
4741
|
-
"semverBump": "patch",
|
|
4742
|
-
"changelog": {
|
|
4743
|
-
"title": "Bug Fixes",
|
|
4744
|
-
"hidden": false
|
|
4745
|
-
}
|
|
4746
|
-
},
|
|
4747
|
-
"feat": {
|
|
4748
|
-
"description": "A change that adds a new feature to the package",
|
|
4749
|
-
"title": "Feature",
|
|
4750
|
-
"emoji": "\u{1F511} ",
|
|
4751
|
-
"semverBump": "minor",
|
|
4752
|
-
"changelog": {
|
|
4753
|
-
"title": "Features",
|
|
4754
|
-
"hidden": false
|
|
4755
|
-
}
|
|
4756
|
-
},
|
|
4757
|
-
"ci": {
|
|
4758
|
-
"description": "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
|
|
4759
|
-
"title": "Continuous Integration",
|
|
4760
|
-
"emoji": "\u{1F9F0} ",
|
|
4761
|
-
"semverBump": "patch",
|
|
4762
|
-
"changelog": {
|
|
4763
|
-
"title": "Continuous Integration",
|
|
4764
|
-
"hidden": false
|
|
4765
|
-
}
|
|
4766
|
-
},
|
|
4767
|
-
"refactor": {
|
|
4768
|
-
"description": "A code change that neither fixes a bug nor adds a feature",
|
|
4769
|
-
"title": "Code Refactoring",
|
|
4770
|
-
"emoji": "\u{1F9EA} ",
|
|
4771
|
-
"semverBump": "patch",
|
|
4772
|
-
"changelog": {
|
|
4773
|
-
"title": "Source Code Improvements",
|
|
4774
|
-
"hidden": false
|
|
4775
|
-
}
|
|
4776
|
-
},
|
|
4777
|
-
"style": {
|
|
4778
|
-
"description": "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
|
|
4779
|
-
"title": "Style Improvements",
|
|
4780
|
-
"emoji": "\u{1F48E} ",
|
|
4781
|
-
"semverBump": "patch",
|
|
4782
|
-
"changelog": {
|
|
4783
|
-
"title": "Style Improvements",
|
|
4784
|
-
"hidden": false
|
|
4785
|
-
}
|
|
4786
|
-
},
|
|
4787
|
-
"perf": {
|
|
4788
|
-
"description": "A code change that improves performance",
|
|
4789
|
-
"title": "Performance Improvement",
|
|
4790
|
-
"emoji": "\u23F1\uFE0F ",
|
|
4791
|
-
"semverBump": "patch",
|
|
4792
|
-
"changelog": {
|
|
4793
|
-
"title": "Performance Improvements",
|
|
4794
|
-
"hidden": false
|
|
4795
|
-
}
|
|
4796
|
-
},
|
|
4797
|
-
/* --- Does not bump version when selected --- */
|
|
4798
|
-
"docs": {
|
|
4799
|
-
"description": "A change that only includes documentation updates",
|
|
4800
|
-
"title": "Documentation",
|
|
4801
|
-
"emoji": "\u{1F4DC} ",
|
|
4802
|
-
"semverBump": "none",
|
|
4803
|
-
"changelog": {
|
|
4804
|
-
"title": "Documentation",
|
|
4805
|
-
"hidden": false
|
|
4806
|
-
}
|
|
4807
|
-
},
|
|
4808
|
-
"test": {
|
|
4809
|
-
"description": "Adding missing tests or correcting existing tests",
|
|
4810
|
-
"title": "Testing",
|
|
4811
|
-
"emoji": "\u{1F6A8} ",
|
|
4812
|
-
"semverBump": "none",
|
|
4813
|
-
"changelog": {
|
|
4814
|
-
"title": "Testing",
|
|
4815
|
-
"hidden": true
|
|
4816
|
-
}
|
|
4817
|
-
},
|
|
4818
|
-
/* --- Not included in commitlint but included in changelog --- */
|
|
4819
|
-
"deps": {
|
|
4820
|
-
"description": "Changes that add, update, or remove dependencies. This includes devDependencies and peerDependencies",
|
|
4821
|
-
"title": "Dependencies",
|
|
4822
|
-
"emoji": "\u{1F4E6} ",
|
|
4823
|
-
"hidden": true,
|
|
4824
|
-
"semverBump": "patch",
|
|
4825
|
-
"changelog": {
|
|
4826
|
-
"title": "Dependency Upgrades",
|
|
4827
|
-
"hidden": false
|
|
4828
|
-
}
|
|
4829
|
-
},
|
|
4830
|
-
/* --- Not included in commitlint or changelog --- */
|
|
4831
|
-
"build": {
|
|
4832
|
-
"description": "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
|
|
4833
|
-
"title": "Build",
|
|
4834
|
-
"emoji": "\u{1F6E0} ",
|
|
4835
|
-
"hidden": true,
|
|
4836
|
-
"semverBump": "none",
|
|
4837
|
-
"changelog": {
|
|
4838
|
-
"title": "Build",
|
|
4839
|
-
"hidden": true
|
|
4840
|
-
}
|
|
4841
|
-
},
|
|
4842
|
-
"release": {
|
|
4843
|
-
"description": "Publishing a commit containing a newly released version",
|
|
4844
|
-
"title": "Publish Release",
|
|
4845
|
-
"emoji": "\u{1F680} ",
|
|
4846
|
-
"hidden": true,
|
|
4847
|
-
"semverBump": "none",
|
|
4848
|
-
"changelog": {
|
|
4849
|
-
"title": "Publish Release",
|
|
4850
|
-
"hidden": true
|
|
4851
|
-
}
|
|
4852
|
-
}
|
|
4853
|
-
};
|
|
4854
|
-
var CHANGELOG_COMMIT_TYPES_OBJECT = Object.freeze(
|
|
4855
|
-
Object.entries(DEFAULT_COMMIT_TYPES).reduce(
|
|
4856
|
-
(ret, [key, commitType]) => {
|
|
4857
|
-
ret[key] = {
|
|
4858
|
-
...commitType.changelog,
|
|
4859
|
-
type: key,
|
|
4860
|
-
section: commitType.changelog?.title || commitType.title,
|
|
4861
|
-
hidden: commitType.changelog?.hidden
|
|
4862
|
-
};
|
|
4863
|
-
return ret;
|
|
4864
|
-
},
|
|
4865
|
-
{}
|
|
4866
|
-
)
|
|
4867
|
-
);
|
|
4868
|
-
var CHANGELOG_COMMIT_TYPES = [
|
|
4869
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.feat,
|
|
4870
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.fix,
|
|
4871
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.chore,
|
|
4872
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.deps,
|
|
4873
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.docs,
|
|
4874
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.style,
|
|
4875
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.refactor,
|
|
4876
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.perf,
|
|
4877
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.build,
|
|
4878
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.ci,
|
|
4879
|
-
CHANGELOG_COMMIT_TYPES_OBJECT.test
|
|
4880
|
-
];
|
|
4881
|
-
var CHANGELOG_COMMIT_TYPE_ORDER = CHANGELOG_COMMIT_TYPES.map(
|
|
4882
|
-
(entry) => entry.type
|
|
4883
|
-
);
|
|
4884
|
-
var CHANGELOG_COMMIT_SECTION_ORDER = CHANGELOG_COMMIT_TYPES.map(
|
|
4885
|
-
(entry) => entry.section
|
|
4886
|
-
);
|
|
4887
|
-
var changelogs = {
|
|
4888
|
-
props: {
|
|
4889
|
-
ignoreCommits: void 0,
|
|
4890
|
-
types: CHANGELOG_COMMIT_TYPES,
|
|
4891
|
-
bumpStrict: true,
|
|
4892
|
-
scope: void 0,
|
|
4893
|
-
scopeOnly: false
|
|
4894
|
-
}
|
|
4895
|
-
};
|
|
4896
|
-
var commitlint = {
|
|
4897
|
-
helpUrl: "https://developer.stormsoftware.com/commitlint/minimal",
|
|
4898
|
-
rules: {
|
|
4899
|
-
"body-leading-blank": [1, "always"],
|
|
4900
|
-
"body-max-length": [2, "always", 600],
|
|
4901
|
-
"footer-leading-blank": [1, "always"],
|
|
4902
|
-
"footer-max-line-length": [2, "always", 150],
|
|
4903
|
-
"header-max-length": [2, "always", 150],
|
|
4904
|
-
"header-trim": [2, "always"],
|
|
4905
|
-
"subject-case": [2, "always", ["sentence-case"]],
|
|
4906
|
-
"subject-empty": [2, "never"],
|
|
4907
|
-
"subject-full-stop": [2, "never", "."],
|
|
4908
|
-
"subject-max-length": [2, "always", 150],
|
|
4909
|
-
"subject-min-length": [2, "always", 3],
|
|
4910
|
-
"type-case": [2, "always", "kebab-case"],
|
|
4911
|
-
"type-empty": [2, "never"],
|
|
4912
|
-
"type-enum": [
|
|
4913
|
-
2,
|
|
4914
|
-
"always",
|
|
4915
|
-
Object.keys(DEFAULT_COMMIT_TYPES)
|
|
4916
|
-
],
|
|
4917
|
-
"type-max-length": [2, "always", 20],
|
|
4918
|
-
"type-min-length": [2, "always", 3],
|
|
4919
|
-
"scope-empty": [2, "always"]
|
|
4920
|
-
},
|
|
4921
|
-
settings: {
|
|
4922
|
-
enableMultipleScopes: false,
|
|
4923
|
-
disableEmoji: true,
|
|
4924
|
-
breakingChangePrefix: "\u{1F4A3} ",
|
|
4925
|
-
closedIssuePrefix: "\u2705 ",
|
|
4926
|
-
format: "{type}: {emoji}{subject}"
|
|
4927
|
-
}
|
|
4928
|
-
};
|
|
4929
|
-
var config = {
|
|
4930
|
-
types: DEFAULT_COMMIT_TYPES,
|
|
4931
|
-
changelogs,
|
|
4932
|
-
commitlint
|
|
4933
|
-
};
|
|
4934
|
-
var minimal_default = config;
|
|
4935
|
-
var changelogs2 = {
|
|
4936
|
-
props: {
|
|
4937
|
-
ignoreCommits: void 0,
|
|
4938
|
-
types: CHANGELOG_COMMIT_TYPES,
|
|
4939
|
-
bumpStrict: true,
|
|
4940
|
-
scope: ["monorepo"],
|
|
4941
|
-
scopeOnly: true
|
|
4942
|
-
}
|
|
4943
|
-
};
|
|
4944
|
-
var commitlint2 = {
|
|
4945
|
-
helpUrl: "https://developer.stormsoftware.com/commitlint/monorepo",
|
|
4946
|
-
rules: {
|
|
4947
|
-
"body-leading-blank": [1, "always"],
|
|
4948
|
-
"body-max-length": [2, "always", 600],
|
|
4949
|
-
"footer-leading-blank": [1, "always"],
|
|
4950
|
-
"footer-max-line-length": [2, "always", 150],
|
|
4951
|
-
"header-max-length": [2, "always", 150],
|
|
4952
|
-
"header-trim": [2, "always"],
|
|
4953
|
-
"subject-case": [2, "always", ["sentence-case"]],
|
|
4954
|
-
"subject-empty": [2, "never"],
|
|
4955
|
-
"subject-full-stop": [2, "never", "."],
|
|
4956
|
-
"subject-max-length": [2, "always", 150],
|
|
4957
|
-
"subject-min-length": [2, "always", 3],
|
|
4958
|
-
"type-case": [2, "always", "kebab-case"],
|
|
4959
|
-
"type-empty": [2, "never"],
|
|
4960
|
-
"type-enum": [
|
|
4961
|
-
2,
|
|
4962
|
-
"always",
|
|
4963
|
-
Object.keys(DEFAULT_COMMIT_TYPES)
|
|
4964
|
-
],
|
|
4965
|
-
"type-max-length": [2, "always", 20],
|
|
4966
|
-
"type-min-length": [2, "always", 3],
|
|
4967
|
-
"scope-case": [2, "always", ["kebab-case"]],
|
|
4968
|
-
"scope-empty": [2, "never"]
|
|
4969
|
-
},
|
|
4970
|
-
settings: {
|
|
4971
|
-
enableMultipleScopes: false,
|
|
4972
|
-
disableEmoji: true,
|
|
4973
|
-
breakingChangePrefix: "\u{1F4A3} ",
|
|
4974
|
-
closedIssuePrefix: "\u2705 ",
|
|
4975
|
-
format: "{type}({scope}): {emoji}{subject}"
|
|
4976
|
-
}
|
|
4977
|
-
};
|
|
4978
|
-
var config2 = {
|
|
4979
|
-
types: DEFAULT_COMMIT_TYPES,
|
|
4980
|
-
changelogs: changelogs2,
|
|
4981
|
-
commitlint: commitlint2
|
|
4982
|
-
};
|
|
4983
|
-
var monorepo_default = config2;
|
|
4984
|
-
var COMMIT_CONFIGS = { minimal: minimal_default, monorepo: monorepo_default };
|
|
4985
|
-
|
|
4986
|
-
// ../git-tools/dist/chunk-KZRVQ5RZ.js
|
|
4987
|
-
var DEFAULT_MINIMAL_COMMIT_QUESTIONS = {
|
|
4988
|
-
type: {
|
|
4989
|
-
type: "select",
|
|
4990
|
-
title: "Commit Type",
|
|
4991
|
-
description: "Select the commit type that best describes your changes",
|
|
4992
|
-
enum: Object.keys(DEFAULT_COMMIT_TYPES).filter(
|
|
4993
|
-
(type) => DEFAULT_COMMIT_TYPES[type].hidden !== true
|
|
4994
|
-
).reduce((ret, type) => {
|
|
4995
|
-
ret[type] = DEFAULT_COMMIT_TYPES[type];
|
|
4996
|
-
return ret;
|
|
4997
|
-
}, {}),
|
|
4998
|
-
defaultValue: "chore",
|
|
4999
|
-
maxLength: 20,
|
|
5000
|
-
minLength: 3
|
|
5001
|
-
},
|
|
5002
|
-
subject: {
|
|
5003
|
-
type: "input",
|
|
5004
|
-
title: "Commit Subject",
|
|
5005
|
-
description: "Write a short, imperative tense description of the change",
|
|
5006
|
-
maxLength: 150,
|
|
5007
|
-
minLength: 3
|
|
5008
|
-
},
|
|
5009
|
-
body: {
|
|
5010
|
-
type: "input",
|
|
5011
|
-
title: "Commit Body",
|
|
5012
|
-
description: "Provide a longer description of the change",
|
|
5013
|
-
maxLength: 600
|
|
5014
|
-
},
|
|
5015
|
-
isBreaking: {
|
|
5016
|
-
type: "confirm",
|
|
5017
|
-
title: "Breaking Changes",
|
|
5018
|
-
description: "Are there any breaking changes as a result of this commit?",
|
|
5019
|
-
defaultValue: false
|
|
5020
|
-
},
|
|
5021
|
-
breakingBody: {
|
|
5022
|
-
type: "input",
|
|
5023
|
-
title: "Breaking Changes (Details)",
|
|
5024
|
-
description: "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself",
|
|
5025
|
-
when: (answers) => answers.isBreaking === true,
|
|
5026
|
-
maxLength: 600,
|
|
5027
|
-
minLength: 3
|
|
5028
|
-
},
|
|
5029
|
-
isIssueAffected: {
|
|
5030
|
-
type: "confirm",
|
|
5031
|
-
title: "Open Issue Affected",
|
|
5032
|
-
description: "Does this change impact any open issues?",
|
|
5033
|
-
defaultValue: false
|
|
5034
|
-
},
|
|
5035
|
-
issuesBody: {
|
|
5036
|
-
type: "input",
|
|
5037
|
-
title: "Open Issue Affected (Details)",
|
|
5038
|
-
description: "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself",
|
|
5039
|
-
when: (answers) => answers.isIssueAffected === true,
|
|
5040
|
-
maxLength: 600,
|
|
5041
|
-
minLength: 3
|
|
5042
|
-
}
|
|
5043
|
-
};
|
|
5044
|
-
var config3 = {
|
|
5045
|
-
settings: COMMIT_CONFIGS.minimal.commitlint.settings,
|
|
5046
|
-
messages: DEFAULT_COMMIT_PROMPT_MESSAGES,
|
|
5047
|
-
questions: DEFAULT_MINIMAL_COMMIT_QUESTIONS,
|
|
5048
|
-
types: DEFAULT_COMMIT_TYPES
|
|
5049
|
-
};
|
|
5050
|
-
|
|
5051
|
-
// ../git-tools/dist/chunk-JCEVFJCA.js
|
|
5052
|
-
var DEFAULT_MONOREPO_COMMIT_QUESTIONS = {
|
|
5053
|
-
type: DEFAULT_MINIMAL_COMMIT_QUESTIONS.type,
|
|
5054
|
-
scope: {
|
|
5055
|
-
type: "select",
|
|
5056
|
-
title: "Commit Scope",
|
|
5057
|
-
description: "Select the project that's the most impacted by this change",
|
|
5058
|
-
enum: {},
|
|
5059
|
-
defaultValue: "monorepo",
|
|
5060
|
-
maxLength: 50,
|
|
5061
|
-
minLength: 1
|
|
5062
|
-
},
|
|
5063
|
-
subject: DEFAULT_MINIMAL_COMMIT_QUESTIONS.subject,
|
|
5064
|
-
body: DEFAULT_MINIMAL_COMMIT_QUESTIONS.body,
|
|
5065
|
-
isBreaking: DEFAULT_MINIMAL_COMMIT_QUESTIONS.isBreaking,
|
|
5066
|
-
breakingBody: DEFAULT_MINIMAL_COMMIT_QUESTIONS.breakingBody,
|
|
5067
|
-
isIssueAffected: DEFAULT_MINIMAL_COMMIT_QUESTIONS.isIssueAffected,
|
|
5068
|
-
issuesBody: DEFAULT_MINIMAL_COMMIT_QUESTIONS.issuesBody
|
|
5069
|
-
};
|
|
5070
|
-
var config4 = {
|
|
5071
|
-
settings: COMMIT_CONFIGS.monorepo.commitlint.settings,
|
|
5072
|
-
messages: DEFAULT_COMMIT_PROMPT_MESSAGES,
|
|
5073
|
-
questions: DEFAULT_MONOREPO_COMMIT_QUESTIONS,
|
|
5074
|
-
types: DEFAULT_COMMIT_TYPES
|
|
5075
|
-
};
|
|
5076
|
-
|
|
5077
|
-
// ../workspace-tools/src/generators/release-version/generator.ts
|
|
5078
|
-
import { execSync as execSync4 } from "node:child_process";
|
|
5079
|
-
import { relative as relative3 } from "node:path";
|
|
5080
|
-
import { IMPLICIT_DEFAULT_RELEASE_GROUP } from "nx/src/command-line/release/config/config";
|
|
5081
|
-
import {
|
|
5082
|
-
getFirstGitCommit,
|
|
5083
|
-
getLatestGitTagForPattern
|
|
5084
|
-
} from "nx/src/command-line/release/utils/git";
|
|
5085
|
-
import {
|
|
5086
|
-
resolveSemverSpecifierFromConventionalCommits,
|
|
5087
|
-
resolveSemverSpecifierFromPrompt
|
|
5088
|
-
} from "nx/src/command-line/release/utils/resolve-semver-specifier";
|
|
5089
|
-
import { isValidSemverSpecifier } from "nx/src/command-line/release/utils/semver";
|
|
5090
|
-
import {
|
|
5091
|
-
deriveNewSemverVersion,
|
|
5092
|
-
validReleaseVersionPrefixes
|
|
5093
|
-
} from "nx/src/command-line/release/version-legacy";
|
|
5094
|
-
import { interpolate } from "nx/src/tasks-runner/utils";
|
|
5095
|
-
import { prerelease } from "semver";
|
|
5096
|
-
|
|
5097
4686
|
// ../workspace-tools/src/base/index.ts
|
|
5098
4687
|
init_esm_shims();
|
|
5099
4688
|
|
|
@@ -5466,6 +5055,24 @@ var typescript_library_generator_untyped_default = defineUntypedSchema5({
|
|
|
5466
5055
|
}
|
|
5467
5056
|
});
|
|
5468
5057
|
|
|
5058
|
+
// ../workspace-tools/src/release/index.ts
|
|
5059
|
+
init_esm_shims();
|
|
5060
|
+
|
|
5061
|
+
// ../workspace-tools/src/release/js-version-actions.ts
|
|
5062
|
+
init_esm_shims();
|
|
5063
|
+
import JsVersionActions from "@nx/js/src/release/version-actions.js";
|
|
5064
|
+
|
|
5065
|
+
// ../workspace-tools/src/release/rust-version-actions.ts
|
|
5066
|
+
init_esm_shims();
|
|
5067
|
+
import {
|
|
5068
|
+
joinPathFragments as joinPathFragments6
|
|
5069
|
+
} from "@nx/devkit";
|
|
5070
|
+
import { VersionActions } from "nx/release";
|
|
5071
|
+
|
|
5072
|
+
// ../workspace-tools/src/utils/registry-helpers.ts
|
|
5073
|
+
init_esm_shims();
|
|
5074
|
+
import https2 from "node:https";
|
|
5075
|
+
|
|
5469
5076
|
// ../workspace-tools/src/types.ts
|
|
5470
5077
|
init_esm_shims();
|
|
5471
5078
|
|
|
@@ -5486,7 +5093,7 @@ import { retrieveProjectConfigurationsWithoutPluginInference } from "nx/src/proj
|
|
|
5486
5093
|
// ../workspace-tools/src/utils/lock-file.ts
|
|
5487
5094
|
init_esm_shims();
|
|
5488
5095
|
import {
|
|
5489
|
-
output
|
|
5096
|
+
output,
|
|
5490
5097
|
readJsonFile as readJsonFile2,
|
|
5491
5098
|
workspaceRoot as workspaceRoot2
|
|
5492
5099
|
} from "@nx/devkit";
|
|
@@ -5528,11 +5135,11 @@ init_esm_shims();
|
|
|
5528
5135
|
import transform2 from "typia/lib/transform";
|
|
5529
5136
|
|
|
5530
5137
|
// src/generators/init/generator.ts
|
|
5531
|
-
async function initGeneratorFn(tree, options,
|
|
5138
|
+
async function initGeneratorFn(tree, options, config) {
|
|
5532
5139
|
const task = initGenerator(tree, options);
|
|
5533
5140
|
await runTasksInSerial(addProjenDeps(tree, options))();
|
|
5534
5141
|
if (!options.skipFormat) {
|
|
5535
|
-
await
|
|
5142
|
+
await formatFiles8(tree);
|
|
5536
5143
|
}
|
|
5537
5144
|
return task;
|
|
5538
5145
|
}
|