@storm-software/oxlint 0.0.2 → 0.0.3
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/dist/chunk-GEMVBBN7.js +16 -0
- package/dist/{chunk-K4IDUB5S.js → chunk-IGI5GSD4.js} +6 -1
- package/dist/configs/prettier.cjs +22 -0
- package/dist/configs/prettier.d.cts +8 -0
- package/dist/configs/prettier.d.ts +8 -0
- package/dist/configs/prettier.js +1 -0
- package/dist/index.cjs +301 -280
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +7 -6
- package/dist/preset.cjs +295 -278
- package/dist/preset.js +3 -2
- package/dist/types.d.cts +1 -0
- package/dist/types.d.ts +1 -0
- package/package.json +6 -5
package/dist/index.cjs
CHANGED
|
@@ -10,6 +10,7 @@ var fs = require('fs');
|
|
|
10
10
|
var path = require('path');
|
|
11
11
|
var z = require('zod/v4/mini');
|
|
12
12
|
var promises = require('fs/promises');
|
|
13
|
+
var config = require('eslint-plugin-prettier/recommended');
|
|
13
14
|
|
|
14
15
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
16
|
|
|
@@ -34,6 +35,7 @@ function _interopNamespace(e) {
|
|
|
34
35
|
var defu__default = /*#__PURE__*/_interopDefault(defu);
|
|
35
36
|
var chalk__default = /*#__PURE__*/_interopDefault(chalk);
|
|
36
37
|
var z__namespace = /*#__PURE__*/_interopNamespace(z);
|
|
38
|
+
var config__default = /*#__PURE__*/_interopDefault(config);
|
|
37
39
|
|
|
38
40
|
// ../config-tools/src/config-file/get-config-file.ts
|
|
39
41
|
|
|
@@ -193,14 +195,14 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
193
195
|
};
|
|
194
196
|
|
|
195
197
|
// ../config-tools/src/logger/console.ts
|
|
196
|
-
var getLogFn = (logLevel = LogLevel.INFO,
|
|
198
|
+
var getLogFn = (logLevel = LogLevel.INFO, config2 = {}, options = {}) => {
|
|
197
199
|
const {
|
|
198
200
|
chalk: _chalk = getChalk(),
|
|
199
201
|
fullDateTime = false,
|
|
200
202
|
hideDateTime = false
|
|
201
203
|
} = options;
|
|
202
|
-
const colors = !
|
|
203
|
-
const configLogLevel =
|
|
204
|
+
const colors = !config2.colors?.dark && !config2.colors?.["base"] && !config2.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config2.colors?.dark && typeof config2.colors.dark === "string" ? config2.colors : config2.colors?.["base"]?.dark && typeof config2.colors["base"].dark === "string" ? config2.colors["base"].dark : config2.colors?.["base"] ? config2.colors?.["base"] : DEFAULT_COLOR_CONFIG;
|
|
205
|
+
const configLogLevel = config2.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
204
206
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
205
207
|
return (_) => {
|
|
206
208
|
};
|
|
@@ -303,8 +305,8 @@ ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.
|
|
|
303
305
|
);
|
|
304
306
|
};
|
|
305
307
|
};
|
|
306
|
-
var writeWarning = (message,
|
|
307
|
-
var writeTrace = (message,
|
|
308
|
+
var writeWarning = (message, config2) => getLogFn(LogLevel.WARN, config2)(message);
|
|
309
|
+
var writeTrace = (message, config2) => getLogFn(LogLevel.TRACE, config2)(message);
|
|
308
310
|
var MAX_DEPTH = 10;
|
|
309
311
|
var formatLogMessage = (message, options = {}, depth2 = 0) => {
|
|
310
312
|
if (depth2 > MAX_DEPTH) {
|
|
@@ -1204,34 +1206,34 @@ async function getPackageJsonConfig(root) {
|
|
|
1204
1206
|
support
|
|
1205
1207
|
};
|
|
1206
1208
|
}
|
|
1207
|
-
function applyDefaultConfig(
|
|
1208
|
-
if (!
|
|
1209
|
-
|
|
1209
|
+
function applyDefaultConfig(config2) {
|
|
1210
|
+
if (!config2.support && config2.contact) {
|
|
1211
|
+
config2.support = config2.contact;
|
|
1210
1212
|
}
|
|
1211
|
-
if (!
|
|
1212
|
-
|
|
1213
|
+
if (!config2.contact && config2.support) {
|
|
1214
|
+
config2.contact = config2.support;
|
|
1213
1215
|
}
|
|
1214
|
-
if (
|
|
1215
|
-
if (!
|
|
1216
|
-
|
|
1216
|
+
if (config2.homepage) {
|
|
1217
|
+
if (!config2.docs) {
|
|
1218
|
+
config2.docs = `${config2.homepage}/docs`;
|
|
1217
1219
|
}
|
|
1218
|
-
if (!
|
|
1219
|
-
|
|
1220
|
+
if (!config2.license) {
|
|
1221
|
+
config2.license = `${config2.homepage}/license`;
|
|
1220
1222
|
}
|
|
1221
|
-
if (!
|
|
1222
|
-
|
|
1223
|
+
if (!config2.support) {
|
|
1224
|
+
config2.support = `${config2.homepage}/support`;
|
|
1223
1225
|
}
|
|
1224
|
-
if (!
|
|
1225
|
-
|
|
1226
|
+
if (!config2.contact) {
|
|
1227
|
+
config2.contact = `${config2.homepage}/contact`;
|
|
1226
1228
|
}
|
|
1227
|
-
if (!
|
|
1228
|
-
|
|
1229
|
-
if (
|
|
1230
|
-
|
|
1229
|
+
if (!config2.error?.codesFile || !config2?.error?.url) {
|
|
1230
|
+
config2.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
1231
|
+
if (config2.homepage) {
|
|
1232
|
+
config2.error.url ??= `${config2.homepage}/errors`;
|
|
1231
1233
|
}
|
|
1232
1234
|
}
|
|
1233
1235
|
}
|
|
1234
|
-
return
|
|
1236
|
+
return config2;
|
|
1235
1237
|
}
|
|
1236
1238
|
|
|
1237
1239
|
// ../config-tools/src/config-file/get-config-file.ts
|
|
@@ -1273,9 +1275,9 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
1273
1275
|
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
1274
1276
|
const workspacePath = filePath ? filePath : findWorkspaceRoot(filePath);
|
|
1275
1277
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
1276
|
-
let
|
|
1278
|
+
let config2 = result.config;
|
|
1277
1279
|
const configFile = result.configFile;
|
|
1278
|
-
if (
|
|
1280
|
+
if (config2 && configFile && Object.keys(config2).length > 0 && !config2.skipConfigLogging) {
|
|
1279
1281
|
writeTrace(
|
|
1280
1282
|
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
1281
1283
|
{
|
|
@@ -1291,7 +1293,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
1291
1293
|
);
|
|
1292
1294
|
for (const result2 of results) {
|
|
1293
1295
|
if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
|
|
1294
|
-
if (!
|
|
1296
|
+
if (!config2.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
1295
1297
|
writeTrace(
|
|
1296
1298
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
1297
1299
|
{
|
|
@@ -1299,19 +1301,19 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
1299
1301
|
}
|
|
1300
1302
|
);
|
|
1301
1303
|
}
|
|
1302
|
-
|
|
1304
|
+
config2 = defu__default.default(result2.config ?? {}, config2 ?? {});
|
|
1303
1305
|
}
|
|
1304
1306
|
}
|
|
1305
1307
|
}
|
|
1306
|
-
if (!
|
|
1308
|
+
if (!config2 || Object.keys(config2).length === 0) {
|
|
1307
1309
|
return void 0;
|
|
1308
1310
|
}
|
|
1309
|
-
|
|
1310
|
-
return
|
|
1311
|
+
config2.configFile = configFile;
|
|
1312
|
+
return config2;
|
|
1311
1313
|
};
|
|
1312
1314
|
var getConfigEnv = () => {
|
|
1313
1315
|
const prefix = "STORM_";
|
|
1314
|
-
let
|
|
1316
|
+
let config2 = {
|
|
1315
1317
|
extends: process.env[`${prefix}EXTENDS`] || void 0,
|
|
1316
1318
|
name: process.env[`${prefix}NAME`] || void 0,
|
|
1317
1319
|
variant: process.env[`${prefix}VARIANT`] || void 0,
|
|
@@ -1400,38 +1402,38 @@ var getConfigEnv = () => {
|
|
|
1400
1402
|
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
1401
1403
|
)
|
|
1402
1404
|
);
|
|
1403
|
-
|
|
1405
|
+
config2.colors = themeNames.length > 0 ? themeNames.reduce(
|
|
1404
1406
|
(ret, themeName) => {
|
|
1405
1407
|
ret[themeName] = getThemeColorsEnv(prefix, themeName);
|
|
1406
1408
|
return ret;
|
|
1407
1409
|
},
|
|
1408
1410
|
{}
|
|
1409
1411
|
) : getThemeColorsEnv(prefix);
|
|
1410
|
-
if (
|
|
1411
|
-
if (
|
|
1412
|
-
|
|
1412
|
+
if (config2.docs === STORM_DEFAULT_DOCS) {
|
|
1413
|
+
if (config2.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
1414
|
+
config2.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config2.name}/docs`;
|
|
1413
1415
|
} else {
|
|
1414
|
-
|
|
1416
|
+
config2.docs = `${config2.homepage}/docs`;
|
|
1415
1417
|
}
|
|
1416
1418
|
}
|
|
1417
|
-
if (
|
|
1418
|
-
if (
|
|
1419
|
-
|
|
1419
|
+
if (config2.licensing === STORM_DEFAULT_LICENSING) {
|
|
1420
|
+
if (config2.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
1421
|
+
config2.licensing = `${STORM_DEFAULT_HOMEPAGE}/projects/${config2.name}/licensing`;
|
|
1420
1422
|
} else {
|
|
1421
|
-
|
|
1423
|
+
config2.licensing = `${config2.homepage}/docs`;
|
|
1422
1424
|
}
|
|
1423
1425
|
}
|
|
1424
1426
|
const serializedConfig = process.env[`${prefix}WORKSPACE_CONFIG`];
|
|
1425
1427
|
if (serializedConfig) {
|
|
1426
1428
|
const parsed = JSON.parse(serializedConfig);
|
|
1427
|
-
|
|
1428
|
-
...
|
|
1429
|
+
config2 = {
|
|
1430
|
+
...config2,
|
|
1429
1431
|
...parsed,
|
|
1430
|
-
colors: { ...
|
|
1431
|
-
extensions: { ...
|
|
1432
|
+
colors: { ...config2.colors, ...parsed.colors },
|
|
1433
|
+
extensions: { ...config2.extensions, ...parsed.extensions }
|
|
1432
1434
|
};
|
|
1433
1435
|
}
|
|
1434
|
-
return
|
|
1436
|
+
return config2;
|
|
1435
1437
|
};
|
|
1436
1438
|
var getThemeColorsEnv = (prefix, theme) => {
|
|
1437
1439
|
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
@@ -1535,360 +1537,360 @@ var setExtensionEnv = (extensionName, extension) => {
|
|
|
1535
1537
|
}
|
|
1536
1538
|
}
|
|
1537
1539
|
};
|
|
1538
|
-
var setConfigEnv = (
|
|
1540
|
+
var setConfigEnv = (config2) => {
|
|
1539
1541
|
const prefix = "STORM_";
|
|
1540
|
-
if (
|
|
1541
|
-
process.env[`${prefix}EXTENDS`] = Array.isArray(
|
|
1542
|
+
if (config2.extends) {
|
|
1543
|
+
process.env[`${prefix}EXTENDS`] = Array.isArray(config2.extends) ? JSON.stringify(config2.extends) : config2.extends;
|
|
1542
1544
|
}
|
|
1543
|
-
if (
|
|
1544
|
-
process.env[`${prefix}NAME`] =
|
|
1545
|
+
if (config2.name) {
|
|
1546
|
+
process.env[`${prefix}NAME`] = config2.name;
|
|
1545
1547
|
}
|
|
1546
|
-
if (
|
|
1547
|
-
process.env[`${prefix}VARIANT`] =
|
|
1548
|
+
if (config2.variant) {
|
|
1549
|
+
process.env[`${prefix}VARIANT`] = config2.variant;
|
|
1548
1550
|
}
|
|
1549
|
-
if (
|
|
1550
|
-
process.env[`${prefix}NAMESPACE`] =
|
|
1551
|
+
if (config2.namespace) {
|
|
1552
|
+
process.env[`${prefix}NAMESPACE`] = config2.namespace;
|
|
1551
1553
|
}
|
|
1552
|
-
if (
|
|
1553
|
-
process.env[`${prefix}OWNER`] =
|
|
1554
|
+
if (config2.owner) {
|
|
1555
|
+
process.env[`${prefix}OWNER`] = config2.owner;
|
|
1554
1556
|
}
|
|
1555
|
-
if (
|
|
1556
|
-
process.env[`${prefix}BOT_NAME`] =
|
|
1557
|
-
process.env[`${prefix}BOT_EMAIL`] =
|
|
1557
|
+
if (config2.bot) {
|
|
1558
|
+
process.env[`${prefix}BOT_NAME`] = config2.bot.name;
|
|
1559
|
+
process.env[`${prefix}BOT_EMAIL`] = config2.bot.email;
|
|
1558
1560
|
}
|
|
1559
|
-
if (
|
|
1560
|
-
process.env[`${prefix}ERROR_CODES_FILE`] =
|
|
1561
|
-
process.env[`${prefix}ERROR_URL`] =
|
|
1561
|
+
if (config2.error) {
|
|
1562
|
+
process.env[`${prefix}ERROR_CODES_FILE`] = config2.error.codesFile;
|
|
1563
|
+
process.env[`${prefix}ERROR_URL`] = config2.error.url;
|
|
1562
1564
|
}
|
|
1563
|
-
if (
|
|
1564
|
-
if (
|
|
1565
|
-
if (typeof
|
|
1566
|
-
process.env[`${prefix}RELEASE_BANNER`] =
|
|
1567
|
-
process.env[`${prefix}RELEASE_BANNER_URL`] =
|
|
1565
|
+
if (config2.release) {
|
|
1566
|
+
if (config2.release.banner) {
|
|
1567
|
+
if (typeof config2.release.banner === "string") {
|
|
1568
|
+
process.env[`${prefix}RELEASE_BANNER`] = config2.release.banner;
|
|
1569
|
+
process.env[`${prefix}RELEASE_BANNER_URL`] = config2.release.banner;
|
|
1568
1570
|
} else {
|
|
1569
|
-
process.env[`${prefix}RELEASE_BANNER`] =
|
|
1570
|
-
process.env[`${prefix}RELEASE_BANNER_URL`] =
|
|
1571
|
-
process.env[`${prefix}RELEASE_BANNER_ALT`] =
|
|
1571
|
+
process.env[`${prefix}RELEASE_BANNER`] = config2.release.banner.url;
|
|
1572
|
+
process.env[`${prefix}RELEASE_BANNER_URL`] = config2.release.banner.url;
|
|
1573
|
+
process.env[`${prefix}RELEASE_BANNER_ALT`] = config2.release.banner.alt;
|
|
1572
1574
|
}
|
|
1573
1575
|
}
|
|
1574
|
-
process.env[`${prefix}RELEASE_HEADER`] =
|
|
1575
|
-
process.env[`${prefix}RELEASE_FOOTER`] =
|
|
1576
|
+
process.env[`${prefix}RELEASE_HEADER`] = config2.release.header;
|
|
1577
|
+
process.env[`${prefix}RELEASE_FOOTER`] = config2.release.footer;
|
|
1576
1578
|
}
|
|
1577
|
-
if (
|
|
1578
|
-
if (
|
|
1579
|
-
process.env[`${prefix}SOCIAL_TWITTER`] =
|
|
1579
|
+
if (config2.socials) {
|
|
1580
|
+
if (config2.socials.twitter) {
|
|
1581
|
+
process.env[`${prefix}SOCIAL_TWITTER`] = config2.socials.twitter;
|
|
1580
1582
|
}
|
|
1581
|
-
if (
|
|
1582
|
-
process.env[`${prefix}SOCIAL_DISCORD`] =
|
|
1583
|
+
if (config2.socials.discord) {
|
|
1584
|
+
process.env[`${prefix}SOCIAL_DISCORD`] = config2.socials.discord;
|
|
1583
1585
|
}
|
|
1584
|
-
if (
|
|
1585
|
-
process.env[`${prefix}SOCIAL_TELEGRAM`] =
|
|
1586
|
+
if (config2.socials.telegram) {
|
|
1587
|
+
process.env[`${prefix}SOCIAL_TELEGRAM`] = config2.socials.telegram;
|
|
1586
1588
|
}
|
|
1587
|
-
if (
|
|
1588
|
-
process.env[`${prefix}SOCIAL_SLACK`] =
|
|
1589
|
+
if (config2.socials.slack) {
|
|
1590
|
+
process.env[`${prefix}SOCIAL_SLACK`] = config2.socials.slack;
|
|
1589
1591
|
}
|
|
1590
|
-
if (
|
|
1591
|
-
process.env[`${prefix}SOCIAL_MEDIUM`] =
|
|
1592
|
+
if (config2.socials.medium) {
|
|
1593
|
+
process.env[`${prefix}SOCIAL_MEDIUM`] = config2.socials.medium;
|
|
1592
1594
|
}
|
|
1593
|
-
if (
|
|
1594
|
-
process.env[`${prefix}SOCIAL_GITHUB`] =
|
|
1595
|
+
if (config2.socials.github) {
|
|
1596
|
+
process.env[`${prefix}SOCIAL_GITHUB`] = config2.socials.github;
|
|
1595
1597
|
}
|
|
1596
1598
|
}
|
|
1597
|
-
if (
|
|
1598
|
-
if (typeof
|
|
1599
|
-
process.env[`${prefix}ORG`] =
|
|
1600
|
-
process.env[`${prefix}ORG_NAME`] =
|
|
1601
|
-
process.env[`${prefix}ORGANIZATION`] =
|
|
1602
|
-
process.env[`${prefix}ORGANIZATION_NAME`] =
|
|
1599
|
+
if (config2.organization) {
|
|
1600
|
+
if (typeof config2.organization === "string") {
|
|
1601
|
+
process.env[`${prefix}ORG`] = config2.organization;
|
|
1602
|
+
process.env[`${prefix}ORG_NAME`] = config2.organization;
|
|
1603
|
+
process.env[`${prefix}ORGANIZATION`] = config2.organization;
|
|
1604
|
+
process.env[`${prefix}ORGANIZATION_NAME`] = config2.organization;
|
|
1603
1605
|
} else {
|
|
1604
|
-
process.env[`${prefix}ORG`] =
|
|
1605
|
-
process.env[`${prefix}ORG_NAME`] =
|
|
1606
|
-
process.env[`${prefix}ORGANIZATION`] =
|
|
1607
|
-
process.env[`${prefix}ORGANIZATION_NAME`] =
|
|
1608
|
-
if (
|
|
1609
|
-
process.env[`${prefix}ORG_URL`] =
|
|
1610
|
-
process.env[`${prefix}ORGANIZATION_URL`] =
|
|
1606
|
+
process.env[`${prefix}ORG`] = config2.organization.name;
|
|
1607
|
+
process.env[`${prefix}ORG_NAME`] = config2.organization.name;
|
|
1608
|
+
process.env[`${prefix}ORGANIZATION`] = config2.organization.name;
|
|
1609
|
+
process.env[`${prefix}ORGANIZATION_NAME`] = config2.organization.name;
|
|
1610
|
+
if (config2.organization.url) {
|
|
1611
|
+
process.env[`${prefix}ORG_URL`] = config2.organization.url;
|
|
1612
|
+
process.env[`${prefix}ORGANIZATION_URL`] = config2.organization.url;
|
|
1611
1613
|
}
|
|
1612
|
-
if (
|
|
1613
|
-
process.env[`${prefix}ORG_DESCRIPTION`] =
|
|
1614
|
-
process.env[`${prefix}ORGANIZATION_DESCRIPTION`] =
|
|
1614
|
+
if (config2.organization.description) {
|
|
1615
|
+
process.env[`${prefix}ORG_DESCRIPTION`] = config2.organization.description;
|
|
1616
|
+
process.env[`${prefix}ORGANIZATION_DESCRIPTION`] = config2.organization.description;
|
|
1615
1617
|
}
|
|
1616
|
-
if (
|
|
1617
|
-
process.env[`${prefix}ORG_LOGO`] =
|
|
1618
|
-
process.env[`${prefix}ORGANIZATION_LOGO`] =
|
|
1618
|
+
if (config2.organization.logo) {
|
|
1619
|
+
process.env[`${prefix}ORG_LOGO`] = config2.organization.logo;
|
|
1620
|
+
process.env[`${prefix}ORGANIZATION_LOGO`] = config2.organization.logo;
|
|
1619
1621
|
}
|
|
1620
|
-
if (
|
|
1621
|
-
process.env[`${prefix}ORG_ICON`] =
|
|
1622
|
-
process.env[`${prefix}ORGANIZATION_ICON`] =
|
|
1622
|
+
if (config2.organization.icon) {
|
|
1623
|
+
process.env[`${prefix}ORG_ICON`] = config2.organization.icon;
|
|
1624
|
+
process.env[`${prefix}ORGANIZATION_ICON`] = config2.organization.icon;
|
|
1623
1625
|
}
|
|
1624
1626
|
}
|
|
1625
1627
|
}
|
|
1626
|
-
if (
|
|
1627
|
-
process.env[`${prefix}PACKAGE_MANAGER`] =
|
|
1628
|
+
if (config2.packageManager) {
|
|
1629
|
+
process.env[`${prefix}PACKAGE_MANAGER`] = config2.packageManager;
|
|
1628
1630
|
}
|
|
1629
|
-
if (
|
|
1630
|
-
process.env[`${prefix}LICENSE`] =
|
|
1631
|
+
if (config2.license) {
|
|
1632
|
+
process.env[`${prefix}LICENSE`] = config2.license;
|
|
1631
1633
|
}
|
|
1632
|
-
if (
|
|
1633
|
-
process.env[`${prefix}HOMEPAGE`] =
|
|
1634
|
+
if (config2.homepage) {
|
|
1635
|
+
process.env[`${prefix}HOMEPAGE`] = config2.homepage;
|
|
1634
1636
|
}
|
|
1635
|
-
if (
|
|
1636
|
-
process.env[`${prefix}DOCS`] =
|
|
1637
|
+
if (config2.docs) {
|
|
1638
|
+
process.env[`${prefix}DOCS`] = config2.docs;
|
|
1637
1639
|
}
|
|
1638
|
-
if (
|
|
1639
|
-
process.env[`${prefix}PORTAL`] =
|
|
1640
|
+
if (config2.portal) {
|
|
1641
|
+
process.env[`${prefix}PORTAL`] = config2.portal;
|
|
1640
1642
|
}
|
|
1641
|
-
if (
|
|
1642
|
-
process.env[`${prefix}LICENSING`] =
|
|
1643
|
+
if (config2.licensing) {
|
|
1644
|
+
process.env[`${prefix}LICENSING`] = config2.licensing;
|
|
1643
1645
|
}
|
|
1644
|
-
if (
|
|
1645
|
-
process.env[`${prefix}CONTACT`] =
|
|
1646
|
+
if (config2.contact) {
|
|
1647
|
+
process.env[`${prefix}CONTACT`] = config2.contact;
|
|
1646
1648
|
}
|
|
1647
|
-
if (
|
|
1648
|
-
process.env[`${prefix}SUPPORT`] =
|
|
1649
|
+
if (config2.support) {
|
|
1650
|
+
process.env[`${prefix}SUPPORT`] = config2.support;
|
|
1649
1651
|
}
|
|
1650
|
-
if (
|
|
1651
|
-
process.env[`${prefix}TIMEZONE`] =
|
|
1652
|
-
process.env.TZ =
|
|
1653
|
-
process.env.DEFAULT_TIMEZONE =
|
|
1654
|
-
process.env.TIMEZONE =
|
|
1652
|
+
if (config2.timezone) {
|
|
1653
|
+
process.env[`${prefix}TIMEZONE`] = config2.timezone;
|
|
1654
|
+
process.env.TZ = config2.timezone;
|
|
1655
|
+
process.env.DEFAULT_TIMEZONE = config2.timezone;
|
|
1656
|
+
process.env.TIMEZONE = config2.timezone;
|
|
1655
1657
|
}
|
|
1656
|
-
if (
|
|
1657
|
-
process.env[`${prefix}LOCALE`] =
|
|
1658
|
-
process.env.DEFAULT_LOCALE =
|
|
1659
|
-
process.env.LOCALE =
|
|
1660
|
-
process.env.LANG =
|
|
1658
|
+
if (config2.locale) {
|
|
1659
|
+
process.env[`${prefix}LOCALE`] = config2.locale;
|
|
1660
|
+
process.env.DEFAULT_LOCALE = config2.locale;
|
|
1661
|
+
process.env.LOCALE = config2.locale;
|
|
1662
|
+
process.env.LANG = config2.locale ? `${config2.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
1661
1663
|
}
|
|
1662
|
-
if (
|
|
1664
|
+
if (config2.configFile) {
|
|
1663
1665
|
process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = correctPaths(
|
|
1664
|
-
|
|
1666
|
+
config2.configFile
|
|
1665
1667
|
);
|
|
1666
1668
|
}
|
|
1667
|
-
if (
|
|
1668
|
-
process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths(
|
|
1669
|
-
process.env.NX_WORKSPACE_ROOT = correctPaths(
|
|
1670
|
-
process.env.NX_WORKSPACE_ROOT_PATH = correctPaths(
|
|
1669
|
+
if (config2.workspaceRoot) {
|
|
1670
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths(config2.workspaceRoot);
|
|
1671
|
+
process.env.NX_WORKSPACE_ROOT = correctPaths(config2.workspaceRoot);
|
|
1672
|
+
process.env.NX_WORKSPACE_ROOT_PATH = correctPaths(config2.workspaceRoot);
|
|
1671
1673
|
}
|
|
1672
|
-
if (
|
|
1673
|
-
if (!
|
|
1674
|
+
if (config2.directories) {
|
|
1675
|
+
if (!config2.skipCache && config2.directories.cache) {
|
|
1674
1676
|
process.env[`${prefix}CACHE_DIR`] = correctPaths(
|
|
1675
|
-
|
|
1677
|
+
config2.directories.cache
|
|
1676
1678
|
);
|
|
1677
1679
|
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
1678
1680
|
}
|
|
1679
|
-
if (
|
|
1680
|
-
process.env[`${prefix}DATA_DIR`] = correctPaths(
|
|
1681
|
+
if (config2.directories.data) {
|
|
1682
|
+
process.env[`${prefix}DATA_DIR`] = correctPaths(config2.directories.data);
|
|
1681
1683
|
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
1682
1684
|
}
|
|
1683
|
-
if (
|
|
1685
|
+
if (config2.directories.config) {
|
|
1684
1686
|
process.env[`${prefix}CONFIG_DIR`] = correctPaths(
|
|
1685
|
-
|
|
1687
|
+
config2.directories.config
|
|
1686
1688
|
);
|
|
1687
1689
|
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
1688
1690
|
}
|
|
1689
|
-
if (
|
|
1690
|
-
process.env[`${prefix}TEMP_DIR`] = correctPaths(
|
|
1691
|
+
if (config2.directories.temp) {
|
|
1692
|
+
process.env[`${prefix}TEMP_DIR`] = correctPaths(config2.directories.temp);
|
|
1691
1693
|
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
1692
1694
|
}
|
|
1693
|
-
if (
|
|
1694
|
-
process.env[`${prefix}LOG_DIR`] = correctPaths(
|
|
1695
|
+
if (config2.directories.log) {
|
|
1696
|
+
process.env[`${prefix}LOG_DIR`] = correctPaths(config2.directories.log);
|
|
1695
1697
|
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
1696
1698
|
}
|
|
1697
|
-
if (
|
|
1699
|
+
if (config2.directories.build) {
|
|
1698
1700
|
process.env[`${prefix}BUILD_DIR`] = correctPaths(
|
|
1699
|
-
|
|
1701
|
+
config2.directories.build
|
|
1700
1702
|
);
|
|
1701
1703
|
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
1702
1704
|
}
|
|
1703
1705
|
}
|
|
1704
|
-
if (
|
|
1705
|
-
process.env[`${prefix}SKIP_CACHE`] = String(
|
|
1706
|
-
if (
|
|
1707
|
-
process.env.NX_SKIP_NX_CACHE ??= String(
|
|
1708
|
-
process.env.NX_CACHE_PROJECT_GRAPH ??= String(
|
|
1706
|
+
if (config2.skipCache !== void 0) {
|
|
1707
|
+
process.env[`${prefix}SKIP_CACHE`] = String(config2.skipCache);
|
|
1708
|
+
if (config2.skipCache) {
|
|
1709
|
+
process.env.NX_SKIP_NX_CACHE ??= String(config2.skipCache);
|
|
1710
|
+
process.env.NX_CACHE_PROJECT_GRAPH ??= String(config2.skipCache);
|
|
1709
1711
|
}
|
|
1710
1712
|
}
|
|
1711
|
-
if (
|
|
1712
|
-
process.env[`${prefix}MODE`] =
|
|
1713
|
-
process.env.NODE_ENV =
|
|
1714
|
-
process.env.ENVIRONMENT =
|
|
1713
|
+
if (config2.mode) {
|
|
1714
|
+
process.env[`${prefix}MODE`] = config2.mode;
|
|
1715
|
+
process.env.NODE_ENV = config2.mode;
|
|
1716
|
+
process.env.ENVIRONMENT = config2.mode;
|
|
1715
1717
|
}
|
|
1716
|
-
if (
|
|
1717
|
-
for (const key of Object.keys(
|
|
1718
|
-
setThemeColorsEnv(`${prefix}COLOR_${key}_`,
|
|
1718
|
+
if (config2.colors?.base?.light || config2.colors?.base?.dark) {
|
|
1719
|
+
for (const key of Object.keys(config2.colors)) {
|
|
1720
|
+
setThemeColorsEnv(`${prefix}COLOR_${key}_`, config2.colors[key]);
|
|
1719
1721
|
}
|
|
1720
1722
|
} else {
|
|
1721
1723
|
setThemeColorsEnv(
|
|
1722
1724
|
`${prefix}COLOR_`,
|
|
1723
|
-
|
|
1725
|
+
config2.colors
|
|
1724
1726
|
);
|
|
1725
1727
|
}
|
|
1726
|
-
if (
|
|
1727
|
-
process.env[`${prefix}REPOSITORY`] =
|
|
1728
|
+
if (config2.repository) {
|
|
1729
|
+
process.env[`${prefix}REPOSITORY`] = config2.repository;
|
|
1728
1730
|
}
|
|
1729
|
-
if (
|
|
1730
|
-
process.env[`${prefix}BRANCH`] =
|
|
1731
|
+
if (config2.branch) {
|
|
1732
|
+
process.env[`${prefix}BRANCH`] = config2.branch;
|
|
1731
1733
|
}
|
|
1732
|
-
if (
|
|
1733
|
-
process.env[`${prefix}PRE_ID`] = String(
|
|
1734
|
+
if (config2.preid) {
|
|
1735
|
+
process.env[`${prefix}PRE_ID`] = String(config2.preid);
|
|
1734
1736
|
}
|
|
1735
|
-
if (
|
|
1736
|
-
if (
|
|
1737
|
-
process.env[`${prefix}REGISTRY_GITHUB`] = String(
|
|
1737
|
+
if (config2.registry) {
|
|
1738
|
+
if (config2.registry.github) {
|
|
1739
|
+
process.env[`${prefix}REGISTRY_GITHUB`] = String(config2.registry.github);
|
|
1738
1740
|
}
|
|
1739
|
-
if (
|
|
1740
|
-
process.env[`${prefix}REGISTRY_NPM`] = String(
|
|
1741
|
+
if (config2.registry.npm) {
|
|
1742
|
+
process.env[`${prefix}REGISTRY_NPM`] = String(config2.registry.npm);
|
|
1741
1743
|
}
|
|
1742
|
-
if (
|
|
1743
|
-
process.env[`${prefix}REGISTRY_CARGO`] = String(
|
|
1744
|
+
if (config2.registry.cargo) {
|
|
1745
|
+
process.env[`${prefix}REGISTRY_CARGO`] = String(config2.registry.cargo);
|
|
1744
1746
|
}
|
|
1745
|
-
if (
|
|
1747
|
+
if (config2.registry.cyclone) {
|
|
1746
1748
|
process.env[`${prefix}REGISTRY_CYCLONE`] = String(
|
|
1747
|
-
|
|
1749
|
+
config2.registry.cyclone
|
|
1748
1750
|
);
|
|
1749
1751
|
}
|
|
1750
|
-
if (
|
|
1752
|
+
if (config2.registry.container) {
|
|
1751
1753
|
process.env[`${prefix}REGISTRY_CONTAINER`] = String(
|
|
1752
|
-
|
|
1754
|
+
config2.registry.container
|
|
1753
1755
|
);
|
|
1754
1756
|
}
|
|
1755
1757
|
}
|
|
1756
|
-
if (
|
|
1757
|
-
process.env[`${prefix}LOG_LEVEL`] = String(
|
|
1758
|
-
process.env.LOG_LEVEL = String(
|
|
1758
|
+
if (config2.logLevel) {
|
|
1759
|
+
process.env[`${prefix}LOG_LEVEL`] = String(config2.logLevel);
|
|
1760
|
+
process.env.LOG_LEVEL = String(config2.logLevel);
|
|
1759
1761
|
process.env.NX_VERBOSE_LOGGING = String(
|
|
1760
|
-
getLogLevel(
|
|
1762
|
+
getLogLevel(config2.logLevel) >= LogLevel.DEBUG ? true : false
|
|
1761
1763
|
);
|
|
1762
|
-
process.env.RUST_BACKTRACE = getLogLevel(
|
|
1764
|
+
process.env.RUST_BACKTRACE = getLogLevel(config2.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
1763
1765
|
}
|
|
1764
|
-
if (
|
|
1766
|
+
if (config2.skipConfigLogging !== void 0) {
|
|
1765
1767
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
1766
|
-
|
|
1768
|
+
config2.skipConfigLogging
|
|
1767
1769
|
);
|
|
1768
1770
|
}
|
|
1769
|
-
process.env[`${prefix}WORKSPACE_CONFIG`] = JSON.stringify(
|
|
1770
|
-
for (const key of Object.keys(
|
|
1771
|
-
if (
|
|
1772
|
-
setExtensionEnv(key,
|
|
1771
|
+
process.env[`${prefix}WORKSPACE_CONFIG`] = JSON.stringify(config2);
|
|
1772
|
+
for (const key of Object.keys(config2.extensions ?? {})) {
|
|
1773
|
+
if (config2.extensions[key] && Object.keys(config2.extensions[key])) {
|
|
1774
|
+
setExtensionEnv(key, config2.extensions[key]);
|
|
1773
1775
|
}
|
|
1774
1776
|
}
|
|
1775
1777
|
};
|
|
1776
|
-
var setThemeColorsEnv = (prefix,
|
|
1777
|
-
return
|
|
1778
|
+
var setThemeColorsEnv = (prefix, config2) => {
|
|
1779
|
+
return config2?.light?.brand || config2?.dark?.brand ? setMultiThemeColorsEnv(prefix, config2) : setSingleThemeColorsEnv(prefix, config2);
|
|
1778
1780
|
};
|
|
1779
|
-
var setSingleThemeColorsEnv = (prefix,
|
|
1780
|
-
if (
|
|
1781
|
-
process.env[`${prefix}DARK`] =
|
|
1781
|
+
var setSingleThemeColorsEnv = (prefix, config2) => {
|
|
1782
|
+
if (config2.dark) {
|
|
1783
|
+
process.env[`${prefix}DARK`] = config2.dark;
|
|
1782
1784
|
}
|
|
1783
|
-
if (
|
|
1784
|
-
process.env[`${prefix}LIGHT`] =
|
|
1785
|
+
if (config2.light) {
|
|
1786
|
+
process.env[`${prefix}LIGHT`] = config2.light;
|
|
1785
1787
|
}
|
|
1786
|
-
if (
|
|
1787
|
-
process.env[`${prefix}BRAND`] =
|
|
1788
|
+
if (config2.brand) {
|
|
1789
|
+
process.env[`${prefix}BRAND`] = config2.brand;
|
|
1788
1790
|
}
|
|
1789
|
-
if (
|
|
1790
|
-
process.env[`${prefix}ALTERNATE`] =
|
|
1791
|
+
if (config2.alternate) {
|
|
1792
|
+
process.env[`${prefix}ALTERNATE`] = config2.alternate;
|
|
1791
1793
|
}
|
|
1792
|
-
if (
|
|
1793
|
-
process.env[`${prefix}ACCENT`] =
|
|
1794
|
+
if (config2.accent) {
|
|
1795
|
+
process.env[`${prefix}ACCENT`] = config2.accent;
|
|
1794
1796
|
}
|
|
1795
|
-
if (
|
|
1796
|
-
process.env[`${prefix}LINK`] =
|
|
1797
|
+
if (config2.link) {
|
|
1798
|
+
process.env[`${prefix}LINK`] = config2.link;
|
|
1797
1799
|
}
|
|
1798
|
-
if (
|
|
1799
|
-
process.env[`${prefix}HELP`] =
|
|
1800
|
+
if (config2.help) {
|
|
1801
|
+
process.env[`${prefix}HELP`] = config2.help;
|
|
1800
1802
|
}
|
|
1801
|
-
if (
|
|
1802
|
-
process.env[`${prefix}SUCCESS`] =
|
|
1803
|
+
if (config2.success) {
|
|
1804
|
+
process.env[`${prefix}SUCCESS`] = config2.success;
|
|
1803
1805
|
}
|
|
1804
|
-
if (
|
|
1805
|
-
process.env[`${prefix}INFO`] =
|
|
1806
|
+
if (config2.info) {
|
|
1807
|
+
process.env[`${prefix}INFO`] = config2.info;
|
|
1806
1808
|
}
|
|
1807
|
-
if (
|
|
1808
|
-
process.env[`${prefix}DEBUG`] =
|
|
1809
|
+
if (config2.debug) {
|
|
1810
|
+
process.env[`${prefix}DEBUG`] = config2.debug;
|
|
1809
1811
|
}
|
|
1810
|
-
if (
|
|
1811
|
-
process.env[`${prefix}WARNING`] =
|
|
1812
|
+
if (config2.warning) {
|
|
1813
|
+
process.env[`${prefix}WARNING`] = config2.warning;
|
|
1812
1814
|
}
|
|
1813
|
-
if (
|
|
1814
|
-
process.env[`${prefix}DANGER`] =
|
|
1815
|
+
if (config2.danger) {
|
|
1816
|
+
process.env[`${prefix}DANGER`] = config2.danger;
|
|
1815
1817
|
}
|
|
1816
|
-
if (
|
|
1817
|
-
process.env[`${prefix}FATAL`] =
|
|
1818
|
+
if (config2.fatal) {
|
|
1819
|
+
process.env[`${prefix}FATAL`] = config2.fatal;
|
|
1818
1820
|
}
|
|
1819
|
-
if (
|
|
1820
|
-
process.env[`${prefix}PERFORMANCE`] =
|
|
1821
|
+
if (config2.performance) {
|
|
1822
|
+
process.env[`${prefix}PERFORMANCE`] = config2.performance;
|
|
1821
1823
|
}
|
|
1822
|
-
if (
|
|
1823
|
-
process.env[`${prefix}POSITIVE`] =
|
|
1824
|
+
if (config2.positive) {
|
|
1825
|
+
process.env[`${prefix}POSITIVE`] = config2.positive;
|
|
1824
1826
|
}
|
|
1825
|
-
if (
|
|
1826
|
-
process.env[`${prefix}NEGATIVE`] =
|
|
1827
|
+
if (config2.negative) {
|
|
1828
|
+
process.env[`${prefix}NEGATIVE`] = config2.negative;
|
|
1827
1829
|
}
|
|
1828
|
-
if (
|
|
1829
|
-
for (let i = 0; i <
|
|
1830
|
-
process.env[`${prefix}GRADIENT_${i}`] =
|
|
1830
|
+
if (config2.gradient) {
|
|
1831
|
+
for (let i = 0; i < config2.gradient.length; i++) {
|
|
1832
|
+
process.env[`${prefix}GRADIENT_${i}`] = config2.gradient[i];
|
|
1831
1833
|
}
|
|
1832
1834
|
}
|
|
1833
1835
|
};
|
|
1834
|
-
var setMultiThemeColorsEnv = (prefix,
|
|
1836
|
+
var setMultiThemeColorsEnv = (prefix, config2) => {
|
|
1835
1837
|
return {
|
|
1836
|
-
light: setBaseThemeColorsEnv(`${prefix}LIGHT_`,
|
|
1837
|
-
dark: setBaseThemeColorsEnv(`${prefix}DARK_`,
|
|
1838
|
+
light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config2.light),
|
|
1839
|
+
dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config2.dark)
|
|
1838
1840
|
};
|
|
1839
1841
|
};
|
|
1840
|
-
var setBaseThemeColorsEnv = (prefix,
|
|
1841
|
-
if (
|
|
1842
|
-
process.env[`${prefix}FOREGROUND`] =
|
|
1842
|
+
var setBaseThemeColorsEnv = (prefix, config2) => {
|
|
1843
|
+
if (config2.foreground) {
|
|
1844
|
+
process.env[`${prefix}FOREGROUND`] = config2.foreground;
|
|
1843
1845
|
}
|
|
1844
|
-
if (
|
|
1845
|
-
process.env[`${prefix}BACKGROUND`] =
|
|
1846
|
+
if (config2.background) {
|
|
1847
|
+
process.env[`${prefix}BACKGROUND`] = config2.background;
|
|
1846
1848
|
}
|
|
1847
|
-
if (
|
|
1848
|
-
process.env[`${prefix}BRAND`] =
|
|
1849
|
+
if (config2.brand) {
|
|
1850
|
+
process.env[`${prefix}BRAND`] = config2.brand;
|
|
1849
1851
|
}
|
|
1850
|
-
if (
|
|
1851
|
-
process.env[`${prefix}ALTERNATE`] =
|
|
1852
|
+
if (config2.alternate) {
|
|
1853
|
+
process.env[`${prefix}ALTERNATE`] = config2.alternate;
|
|
1852
1854
|
}
|
|
1853
|
-
if (
|
|
1854
|
-
process.env[`${prefix}ACCENT`] =
|
|
1855
|
+
if (config2.accent) {
|
|
1856
|
+
process.env[`${prefix}ACCENT`] = config2.accent;
|
|
1855
1857
|
}
|
|
1856
|
-
if (
|
|
1857
|
-
process.env[`${prefix}LINK`] =
|
|
1858
|
+
if (config2.link) {
|
|
1859
|
+
process.env[`${prefix}LINK`] = config2.link;
|
|
1858
1860
|
}
|
|
1859
|
-
if (
|
|
1860
|
-
process.env[`${prefix}HELP`] =
|
|
1861
|
+
if (config2.help) {
|
|
1862
|
+
process.env[`${prefix}HELP`] = config2.help;
|
|
1861
1863
|
}
|
|
1862
|
-
if (
|
|
1863
|
-
process.env[`${prefix}SUCCESS`] =
|
|
1864
|
+
if (config2.success) {
|
|
1865
|
+
process.env[`${prefix}SUCCESS`] = config2.success;
|
|
1864
1866
|
}
|
|
1865
|
-
if (
|
|
1866
|
-
process.env[`${prefix}INFO`] =
|
|
1867
|
+
if (config2.info) {
|
|
1868
|
+
process.env[`${prefix}INFO`] = config2.info;
|
|
1867
1869
|
}
|
|
1868
|
-
if (
|
|
1869
|
-
process.env[`${prefix}DEBUG`] =
|
|
1870
|
+
if (config2.debug) {
|
|
1871
|
+
process.env[`${prefix}DEBUG`] = config2.debug;
|
|
1870
1872
|
}
|
|
1871
|
-
if (
|
|
1872
|
-
process.env[`${prefix}WARNING`] =
|
|
1873
|
+
if (config2.warning) {
|
|
1874
|
+
process.env[`${prefix}WARNING`] = config2.warning;
|
|
1873
1875
|
}
|
|
1874
|
-
if (
|
|
1875
|
-
process.env[`${prefix}DANGER`] =
|
|
1876
|
+
if (config2.danger) {
|
|
1877
|
+
process.env[`${prefix}DANGER`] = config2.danger;
|
|
1876
1878
|
}
|
|
1877
|
-
if (
|
|
1878
|
-
process.env[`${prefix}FATAL`] =
|
|
1879
|
+
if (config2.fatal) {
|
|
1880
|
+
process.env[`${prefix}FATAL`] = config2.fatal;
|
|
1879
1881
|
}
|
|
1880
|
-
if (
|
|
1881
|
-
process.env[`${prefix}PERFORMANCE`] =
|
|
1882
|
+
if (config2.performance) {
|
|
1883
|
+
process.env[`${prefix}PERFORMANCE`] = config2.performance;
|
|
1882
1884
|
}
|
|
1883
|
-
if (
|
|
1884
|
-
process.env[`${prefix}POSITIVE`] =
|
|
1885
|
+
if (config2.positive) {
|
|
1886
|
+
process.env[`${prefix}POSITIVE`] = config2.positive;
|
|
1885
1887
|
}
|
|
1886
|
-
if (
|
|
1887
|
-
process.env[`${prefix}NEGATIVE`] =
|
|
1888
|
+
if (config2.negative) {
|
|
1889
|
+
process.env[`${prefix}NEGATIVE`] = config2.negative;
|
|
1888
1890
|
}
|
|
1889
|
-
if (
|
|
1890
|
-
for (let i = 0; i <
|
|
1891
|
-
process.env[`${prefix}GRADIENT_${i}`] =
|
|
1891
|
+
if (config2.gradient) {
|
|
1892
|
+
for (let i = 0; i < config2.gradient.length; i++) {
|
|
1893
|
+
process.env[`${prefix}GRADIENT_${i}`] = config2.gradient[i];
|
|
1892
1894
|
}
|
|
1893
1895
|
}
|
|
1894
1896
|
};
|
|
@@ -1954,25 +1956,25 @@ Please ensure your configuration file is valid JSON and matches the expected sch
|
|
|
1954
1956
|
};
|
|
1955
1957
|
var tryLoadStormWorkspaceConfig = async (workspaceRoot, skipLogs = true, useDefault = false) => {
|
|
1956
1958
|
try {
|
|
1957
|
-
const
|
|
1959
|
+
const config2 = await createStormWorkspaceConfig(
|
|
1958
1960
|
void 0,
|
|
1959
1961
|
void 0,
|
|
1960
1962
|
workspaceRoot,
|
|
1961
1963
|
skipLogs,
|
|
1962
1964
|
useDefault
|
|
1963
1965
|
);
|
|
1964
|
-
if (!
|
|
1966
|
+
if (!config2) {
|
|
1965
1967
|
return void 0;
|
|
1966
1968
|
}
|
|
1967
|
-
setConfigEnv(
|
|
1968
|
-
if (!skipLogs && !
|
|
1969
|
+
setConfigEnv(config2);
|
|
1970
|
+
if (!skipLogs && !config2.skipConfigLogging) {
|
|
1969
1971
|
writeTrace(
|
|
1970
1972
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
1971
|
-
${formatLogMessage(
|
|
1972
|
-
|
|
1973
|
+
${formatLogMessage(config2)}`,
|
|
1974
|
+
config2
|
|
1973
1975
|
);
|
|
1974
1976
|
}
|
|
1975
|
-
return
|
|
1977
|
+
return config2;
|
|
1976
1978
|
} catch (error) {
|
|
1977
1979
|
if (!skipLogs) {
|
|
1978
1980
|
writeWarning(
|
|
@@ -2149,6 +2151,17 @@ function pnpm(options) {
|
|
|
2149
2151
|
}
|
|
2150
2152
|
};
|
|
2151
2153
|
}
|
|
2154
|
+
function prettier() {
|
|
2155
|
+
return {
|
|
2156
|
+
jsPlugins: ["eslint-plugin-prettier"],
|
|
2157
|
+
rules: {
|
|
2158
|
+
...config__default.default.rules,
|
|
2159
|
+
"prettier/prettier": "error",
|
|
2160
|
+
"arrow-body-style": "off",
|
|
2161
|
+
"prefer-arrow-callback": "off"
|
|
2162
|
+
}
|
|
2163
|
+
};
|
|
2164
|
+
}
|
|
2152
2165
|
|
|
2153
2166
|
// src/configs/promise.ts
|
|
2154
2167
|
function promise() {
|
|
@@ -2412,6 +2425,7 @@ async function getStormConfig(options = {}, ...userConfigs) {
|
|
|
2412
2425
|
jsdoc: enableJsdoc = true,
|
|
2413
2426
|
node: enableNode = true,
|
|
2414
2427
|
promise: enablePromise = true,
|
|
2428
|
+
prettier: enablePrettier = true,
|
|
2415
2429
|
pnpm: enablePnpm = true,
|
|
2416
2430
|
tsdoc: enableTSDoc = true,
|
|
2417
2431
|
unicorn: enableUnicorn = true,
|
|
@@ -2469,6 +2483,9 @@ async function getStormConfig(options = {}, ...userConfigs) {
|
|
|
2469
2483
|
if (enablePromise) {
|
|
2470
2484
|
configs.push(promise());
|
|
2471
2485
|
}
|
|
2486
|
+
if (enablePrettier) {
|
|
2487
|
+
configs.push(prettier());
|
|
2488
|
+
}
|
|
2472
2489
|
if (enableUnicorn) {
|
|
2473
2490
|
configs.push(unicorn());
|
|
2474
2491
|
}
|
|
@@ -2511,8 +2528,8 @@ var getConfig = getStormConfig;
|
|
|
2511
2528
|
var defineConfig = getStormConfig;
|
|
2512
2529
|
|
|
2513
2530
|
// src/utils/format-config.ts
|
|
2514
|
-
function formatConfig(name,
|
|
2515
|
-
return
|
|
2531
|
+
function formatConfig(name, config2 = []) {
|
|
2532
|
+
return config2.map((item, index) => {
|
|
2516
2533
|
if (!item) {
|
|
2517
2534
|
return {};
|
|
2518
2535
|
}
|
|
@@ -2534,6 +2551,7 @@ exports.GLOB_SRC = GLOB_SRC;
|
|
|
2534
2551
|
exports.GLOB_SRC_EXT = GLOB_SRC_EXT;
|
|
2535
2552
|
exports.GLOB_SRC_FILE = GLOB_SRC_FILE;
|
|
2536
2553
|
exports.GLOB_TEST = GLOB_TEST;
|
|
2554
|
+
exports.banner = banner;
|
|
2537
2555
|
exports.combine = combine;
|
|
2538
2556
|
exports.default = index_default;
|
|
2539
2557
|
exports.defineConfig = defineConfig;
|
|
@@ -2546,11 +2564,14 @@ exports.jsdoc = jsdoc;
|
|
|
2546
2564
|
exports.jsx = jsx;
|
|
2547
2565
|
exports.next = next;
|
|
2548
2566
|
exports.node = node;
|
|
2567
|
+
exports.pnpm = pnpm;
|
|
2568
|
+
exports.prettier = prettier;
|
|
2549
2569
|
exports.promise = promise;
|
|
2550
2570
|
exports.react = react;
|
|
2551
2571
|
exports.reactPerf = reactPerf;
|
|
2552
2572
|
exports.regexp = regexp;
|
|
2553
2573
|
exports.storybook = storybook;
|
|
2554
2574
|
exports.test = test;
|
|
2575
|
+
exports.tsdoc = tsdoc;
|
|
2555
2576
|
exports.typescript = typescript;
|
|
2556
2577
|
exports.unicorn = unicorn;
|