@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/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, config = {}, options = {}) => {
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 = !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;
203
- const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
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, config) => getLogFn(LogLevel.WARN, config)(message);
307
- var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(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(config) {
1208
- if (!config.support && config.contact) {
1209
- config.support = config.contact;
1209
+ function applyDefaultConfig(config2) {
1210
+ if (!config2.support && config2.contact) {
1211
+ config2.support = config2.contact;
1210
1212
  }
1211
- if (!config.contact && config.support) {
1212
- config.contact = config.support;
1213
+ if (!config2.contact && config2.support) {
1214
+ config2.contact = config2.support;
1213
1215
  }
1214
- if (config.homepage) {
1215
- if (!config.docs) {
1216
- config.docs = `${config.homepage}/docs`;
1216
+ if (config2.homepage) {
1217
+ if (!config2.docs) {
1218
+ config2.docs = `${config2.homepage}/docs`;
1217
1219
  }
1218
- if (!config.license) {
1219
- config.license = `${config.homepage}/license`;
1220
+ if (!config2.license) {
1221
+ config2.license = `${config2.homepage}/license`;
1220
1222
  }
1221
- if (!config.support) {
1222
- config.support = `${config.homepage}/support`;
1223
+ if (!config2.support) {
1224
+ config2.support = `${config2.homepage}/support`;
1223
1225
  }
1224
- if (!config.contact) {
1225
- config.contact = `${config.homepage}/contact`;
1226
+ if (!config2.contact) {
1227
+ config2.contact = `${config2.homepage}/contact`;
1226
1228
  }
1227
- if (!config.error?.codesFile || !config?.error?.url) {
1228
- config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
1229
- if (config.homepage) {
1230
- config.error.url ??= `${config.homepage}/errors`;
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 config;
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 config = result.config;
1278
+ let config2 = result.config;
1277
1279
  const configFile = result.configFile;
1278
- if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
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 (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
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
- config = defu__default.default(result2.config ?? {}, config ?? {});
1304
+ config2 = defu__default.default(result2.config ?? {}, config2 ?? {});
1303
1305
  }
1304
1306
  }
1305
1307
  }
1306
- if (!config || Object.keys(config).length === 0) {
1308
+ if (!config2 || Object.keys(config2).length === 0) {
1307
1309
  return void 0;
1308
1310
  }
1309
- config.configFile = configFile;
1310
- return config;
1311
+ config2.configFile = configFile;
1312
+ return config2;
1311
1313
  };
1312
1314
  var getConfigEnv = () => {
1313
1315
  const prefix = "STORM_";
1314
- let config = {
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
- config.colors = themeNames.length > 0 ? themeNames.reduce(
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 (config.docs === STORM_DEFAULT_DOCS) {
1411
- if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
1412
- config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
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
- config.docs = `${config.homepage}/docs`;
1416
+ config2.docs = `${config2.homepage}/docs`;
1415
1417
  }
1416
1418
  }
1417
- if (config.licensing === STORM_DEFAULT_LICENSING) {
1418
- if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
1419
- config.licensing = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
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
- config.licensing = `${config.homepage}/docs`;
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
- config = {
1428
- ...config,
1429
+ config2 = {
1430
+ ...config2,
1429
1431
  ...parsed,
1430
- colors: { ...config.colors, ...parsed.colors },
1431
- extensions: { ...config.extensions, ...parsed.extensions }
1432
+ colors: { ...config2.colors, ...parsed.colors },
1433
+ extensions: { ...config2.extensions, ...parsed.extensions }
1432
1434
  };
1433
1435
  }
1434
- return config;
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 = (config) => {
1540
+ var setConfigEnv = (config2) => {
1539
1541
  const prefix = "STORM_";
1540
- if (config.extends) {
1541
- process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
1542
+ if (config2.extends) {
1543
+ process.env[`${prefix}EXTENDS`] = Array.isArray(config2.extends) ? JSON.stringify(config2.extends) : config2.extends;
1542
1544
  }
1543
- if (config.name) {
1544
- process.env[`${prefix}NAME`] = config.name;
1545
+ if (config2.name) {
1546
+ process.env[`${prefix}NAME`] = config2.name;
1545
1547
  }
1546
- if (config.variant) {
1547
- process.env[`${prefix}VARIANT`] = config.variant;
1548
+ if (config2.variant) {
1549
+ process.env[`${prefix}VARIANT`] = config2.variant;
1548
1550
  }
1549
- if (config.namespace) {
1550
- process.env[`${prefix}NAMESPACE`] = config.namespace;
1551
+ if (config2.namespace) {
1552
+ process.env[`${prefix}NAMESPACE`] = config2.namespace;
1551
1553
  }
1552
- if (config.owner) {
1553
- process.env[`${prefix}OWNER`] = config.owner;
1554
+ if (config2.owner) {
1555
+ process.env[`${prefix}OWNER`] = config2.owner;
1554
1556
  }
1555
- if (config.bot) {
1556
- process.env[`${prefix}BOT_NAME`] = config.bot.name;
1557
- process.env[`${prefix}BOT_EMAIL`] = config.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 (config.error) {
1560
- process.env[`${prefix}ERROR_CODES_FILE`] = config.error.codesFile;
1561
- process.env[`${prefix}ERROR_URL`] = config.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 (config.release) {
1564
- if (config.release.banner) {
1565
- if (typeof config.release.banner === "string") {
1566
- process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
1567
- process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner;
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`] = config.release.banner.url;
1570
- process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner.url;
1571
- process.env[`${prefix}RELEASE_BANNER_ALT`] = config.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`] = config.release.header;
1575
- process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
1576
+ process.env[`${prefix}RELEASE_HEADER`] = config2.release.header;
1577
+ process.env[`${prefix}RELEASE_FOOTER`] = config2.release.footer;
1576
1578
  }
1577
- if (config.socials) {
1578
- if (config.socials.twitter) {
1579
- process.env[`${prefix}SOCIAL_TWITTER`] = config.socials.twitter;
1579
+ if (config2.socials) {
1580
+ if (config2.socials.twitter) {
1581
+ process.env[`${prefix}SOCIAL_TWITTER`] = config2.socials.twitter;
1580
1582
  }
1581
- if (config.socials.discord) {
1582
- process.env[`${prefix}SOCIAL_DISCORD`] = config.socials.discord;
1583
+ if (config2.socials.discord) {
1584
+ process.env[`${prefix}SOCIAL_DISCORD`] = config2.socials.discord;
1583
1585
  }
1584
- if (config.socials.telegram) {
1585
- process.env[`${prefix}SOCIAL_TELEGRAM`] = config.socials.telegram;
1586
+ if (config2.socials.telegram) {
1587
+ process.env[`${prefix}SOCIAL_TELEGRAM`] = config2.socials.telegram;
1586
1588
  }
1587
- if (config.socials.slack) {
1588
- process.env[`${prefix}SOCIAL_SLACK`] = config.socials.slack;
1589
+ if (config2.socials.slack) {
1590
+ process.env[`${prefix}SOCIAL_SLACK`] = config2.socials.slack;
1589
1591
  }
1590
- if (config.socials.medium) {
1591
- process.env[`${prefix}SOCIAL_MEDIUM`] = config.socials.medium;
1592
+ if (config2.socials.medium) {
1593
+ process.env[`${prefix}SOCIAL_MEDIUM`] = config2.socials.medium;
1592
1594
  }
1593
- if (config.socials.github) {
1594
- process.env[`${prefix}SOCIAL_GITHUB`] = config.socials.github;
1595
+ if (config2.socials.github) {
1596
+ process.env[`${prefix}SOCIAL_GITHUB`] = config2.socials.github;
1595
1597
  }
1596
1598
  }
1597
- if (config.organization) {
1598
- if (typeof config.organization === "string") {
1599
- process.env[`${prefix}ORG`] = config.organization;
1600
- process.env[`${prefix}ORG_NAME`] = config.organization;
1601
- process.env[`${prefix}ORGANIZATION`] = config.organization;
1602
- process.env[`${prefix}ORGANIZATION_NAME`] = config.organization;
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`] = config.organization.name;
1605
- process.env[`${prefix}ORG_NAME`] = config.organization.name;
1606
- process.env[`${prefix}ORGANIZATION`] = config.organization.name;
1607
- process.env[`${prefix}ORGANIZATION_NAME`] = config.organization.name;
1608
- if (config.organization.url) {
1609
- process.env[`${prefix}ORG_URL`] = config.organization.url;
1610
- process.env[`${prefix}ORGANIZATION_URL`] = config.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 (config.organization.description) {
1613
- process.env[`${prefix}ORG_DESCRIPTION`] = config.organization.description;
1614
- process.env[`${prefix}ORGANIZATION_DESCRIPTION`] = config.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 (config.organization.logo) {
1617
- process.env[`${prefix}ORG_LOGO`] = config.organization.logo;
1618
- process.env[`${prefix}ORGANIZATION_LOGO`] = config.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 (config.organization.icon) {
1621
- process.env[`${prefix}ORG_ICON`] = config.organization.icon;
1622
- process.env[`${prefix}ORGANIZATION_ICON`] = config.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 (config.packageManager) {
1627
- process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager;
1628
+ if (config2.packageManager) {
1629
+ process.env[`${prefix}PACKAGE_MANAGER`] = config2.packageManager;
1628
1630
  }
1629
- if (config.license) {
1630
- process.env[`${prefix}LICENSE`] = config.license;
1631
+ if (config2.license) {
1632
+ process.env[`${prefix}LICENSE`] = config2.license;
1631
1633
  }
1632
- if (config.homepage) {
1633
- process.env[`${prefix}HOMEPAGE`] = config.homepage;
1634
+ if (config2.homepage) {
1635
+ process.env[`${prefix}HOMEPAGE`] = config2.homepage;
1634
1636
  }
1635
- if (config.docs) {
1636
- process.env[`${prefix}DOCS`] = config.docs;
1637
+ if (config2.docs) {
1638
+ process.env[`${prefix}DOCS`] = config2.docs;
1637
1639
  }
1638
- if (config.portal) {
1639
- process.env[`${prefix}PORTAL`] = config.portal;
1640
+ if (config2.portal) {
1641
+ process.env[`${prefix}PORTAL`] = config2.portal;
1640
1642
  }
1641
- if (config.licensing) {
1642
- process.env[`${prefix}LICENSING`] = config.licensing;
1643
+ if (config2.licensing) {
1644
+ process.env[`${prefix}LICENSING`] = config2.licensing;
1643
1645
  }
1644
- if (config.contact) {
1645
- process.env[`${prefix}CONTACT`] = config.contact;
1646
+ if (config2.contact) {
1647
+ process.env[`${prefix}CONTACT`] = config2.contact;
1646
1648
  }
1647
- if (config.support) {
1648
- process.env[`${prefix}SUPPORT`] = config.support;
1649
+ if (config2.support) {
1650
+ process.env[`${prefix}SUPPORT`] = config2.support;
1649
1651
  }
1650
- if (config.timezone) {
1651
- process.env[`${prefix}TIMEZONE`] = config.timezone;
1652
- process.env.TZ = config.timezone;
1653
- process.env.DEFAULT_TIMEZONE = config.timezone;
1654
- process.env.TIMEZONE = config.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 (config.locale) {
1657
- process.env[`${prefix}LOCALE`] = config.locale;
1658
- process.env.DEFAULT_LOCALE = config.locale;
1659
- process.env.LOCALE = config.locale;
1660
- process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
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 (config.configFile) {
1664
+ if (config2.configFile) {
1663
1665
  process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = correctPaths(
1664
- config.configFile
1666
+ config2.configFile
1665
1667
  );
1666
1668
  }
1667
- if (config.workspaceRoot) {
1668
- process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths(config.workspaceRoot);
1669
- process.env.NX_WORKSPACE_ROOT = correctPaths(config.workspaceRoot);
1670
- process.env.NX_WORKSPACE_ROOT_PATH = correctPaths(config.workspaceRoot);
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 (config.directories) {
1673
- if (!config.skipCache && config.directories.cache) {
1674
+ if (config2.directories) {
1675
+ if (!config2.skipCache && config2.directories.cache) {
1674
1676
  process.env[`${prefix}CACHE_DIR`] = correctPaths(
1675
- config.directories.cache
1677
+ config2.directories.cache
1676
1678
  );
1677
1679
  process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
1678
1680
  }
1679
- if (config.directories.data) {
1680
- process.env[`${prefix}DATA_DIR`] = correctPaths(config.directories.data);
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 (config.directories.config) {
1685
+ if (config2.directories.config) {
1684
1686
  process.env[`${prefix}CONFIG_DIR`] = correctPaths(
1685
- config.directories.config
1687
+ config2.directories.config
1686
1688
  );
1687
1689
  process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
1688
1690
  }
1689
- if (config.directories.temp) {
1690
- process.env[`${prefix}TEMP_DIR`] = correctPaths(config.directories.temp);
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 (config.directories.log) {
1694
- process.env[`${prefix}LOG_DIR`] = correctPaths(config.directories.log);
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 (config.directories.build) {
1699
+ if (config2.directories.build) {
1698
1700
  process.env[`${prefix}BUILD_DIR`] = correctPaths(
1699
- config.directories.build
1701
+ config2.directories.build
1700
1702
  );
1701
1703
  process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
1702
1704
  }
1703
1705
  }
1704
- if (config.skipCache !== void 0) {
1705
- process.env[`${prefix}SKIP_CACHE`] = String(config.skipCache);
1706
- if (config.skipCache) {
1707
- process.env.NX_SKIP_NX_CACHE ??= String(config.skipCache);
1708
- process.env.NX_CACHE_PROJECT_GRAPH ??= String(config.skipCache);
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 (config.mode) {
1712
- process.env[`${prefix}MODE`] = config.mode;
1713
- process.env.NODE_ENV = config.mode;
1714
- process.env.ENVIRONMENT = config.mode;
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 (config.colors?.base?.light || config.colors?.base?.dark) {
1717
- for (const key of Object.keys(config.colors)) {
1718
- setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[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
- config.colors
1725
+ config2.colors
1724
1726
  );
1725
1727
  }
1726
- if (config.repository) {
1727
- process.env[`${prefix}REPOSITORY`] = config.repository;
1728
+ if (config2.repository) {
1729
+ process.env[`${prefix}REPOSITORY`] = config2.repository;
1728
1730
  }
1729
- if (config.branch) {
1730
- process.env[`${prefix}BRANCH`] = config.branch;
1731
+ if (config2.branch) {
1732
+ process.env[`${prefix}BRANCH`] = config2.branch;
1731
1733
  }
1732
- if (config.preid) {
1733
- process.env[`${prefix}PRE_ID`] = String(config.preid);
1734
+ if (config2.preid) {
1735
+ process.env[`${prefix}PRE_ID`] = String(config2.preid);
1734
1736
  }
1735
- if (config.registry) {
1736
- if (config.registry.github) {
1737
- process.env[`${prefix}REGISTRY_GITHUB`] = String(config.registry.github);
1737
+ if (config2.registry) {
1738
+ if (config2.registry.github) {
1739
+ process.env[`${prefix}REGISTRY_GITHUB`] = String(config2.registry.github);
1738
1740
  }
1739
- if (config.registry.npm) {
1740
- process.env[`${prefix}REGISTRY_NPM`] = String(config.registry.npm);
1741
+ if (config2.registry.npm) {
1742
+ process.env[`${prefix}REGISTRY_NPM`] = String(config2.registry.npm);
1741
1743
  }
1742
- if (config.registry.cargo) {
1743
- process.env[`${prefix}REGISTRY_CARGO`] = String(config.registry.cargo);
1744
+ if (config2.registry.cargo) {
1745
+ process.env[`${prefix}REGISTRY_CARGO`] = String(config2.registry.cargo);
1744
1746
  }
1745
- if (config.registry.cyclone) {
1747
+ if (config2.registry.cyclone) {
1746
1748
  process.env[`${prefix}REGISTRY_CYCLONE`] = String(
1747
- config.registry.cyclone
1749
+ config2.registry.cyclone
1748
1750
  );
1749
1751
  }
1750
- if (config.registry.container) {
1752
+ if (config2.registry.container) {
1751
1753
  process.env[`${prefix}REGISTRY_CONTAINER`] = String(
1752
- config.registry.container
1754
+ config2.registry.container
1753
1755
  );
1754
1756
  }
1755
1757
  }
1756
- if (config.logLevel) {
1757
- process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
1758
- process.env.LOG_LEVEL = String(config.logLevel);
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(config.logLevel) >= LogLevel.DEBUG ? true : false
1762
+ getLogLevel(config2.logLevel) >= LogLevel.DEBUG ? true : false
1761
1763
  );
1762
- process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
1764
+ process.env.RUST_BACKTRACE = getLogLevel(config2.logLevel) >= LogLevel.DEBUG ? "full" : "none";
1763
1765
  }
1764
- if (config.skipConfigLogging !== void 0) {
1766
+ if (config2.skipConfigLogging !== void 0) {
1765
1767
  process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
1766
- config.skipConfigLogging
1768
+ config2.skipConfigLogging
1767
1769
  );
1768
1770
  }
1769
- process.env[`${prefix}WORKSPACE_CONFIG`] = JSON.stringify(config);
1770
- for (const key of Object.keys(config.extensions ?? {})) {
1771
- if (config.extensions[key] && Object.keys(config.extensions[key])) {
1772
- setExtensionEnv(key, config.extensions[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, config) => {
1777
- return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
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, config) => {
1780
- if (config.dark) {
1781
- process.env[`${prefix}DARK`] = config.dark;
1781
+ var setSingleThemeColorsEnv = (prefix, config2) => {
1782
+ if (config2.dark) {
1783
+ process.env[`${prefix}DARK`] = config2.dark;
1782
1784
  }
1783
- if (config.light) {
1784
- process.env[`${prefix}LIGHT`] = config.light;
1785
+ if (config2.light) {
1786
+ process.env[`${prefix}LIGHT`] = config2.light;
1785
1787
  }
1786
- if (config.brand) {
1787
- process.env[`${prefix}BRAND`] = config.brand;
1788
+ if (config2.brand) {
1789
+ process.env[`${prefix}BRAND`] = config2.brand;
1788
1790
  }
1789
- if (config.alternate) {
1790
- process.env[`${prefix}ALTERNATE`] = config.alternate;
1791
+ if (config2.alternate) {
1792
+ process.env[`${prefix}ALTERNATE`] = config2.alternate;
1791
1793
  }
1792
- if (config.accent) {
1793
- process.env[`${prefix}ACCENT`] = config.accent;
1794
+ if (config2.accent) {
1795
+ process.env[`${prefix}ACCENT`] = config2.accent;
1794
1796
  }
1795
- if (config.link) {
1796
- process.env[`${prefix}LINK`] = config.link;
1797
+ if (config2.link) {
1798
+ process.env[`${prefix}LINK`] = config2.link;
1797
1799
  }
1798
- if (config.help) {
1799
- process.env[`${prefix}HELP`] = config.help;
1800
+ if (config2.help) {
1801
+ process.env[`${prefix}HELP`] = config2.help;
1800
1802
  }
1801
- if (config.success) {
1802
- process.env[`${prefix}SUCCESS`] = config.success;
1803
+ if (config2.success) {
1804
+ process.env[`${prefix}SUCCESS`] = config2.success;
1803
1805
  }
1804
- if (config.info) {
1805
- process.env[`${prefix}INFO`] = config.info;
1806
+ if (config2.info) {
1807
+ process.env[`${prefix}INFO`] = config2.info;
1806
1808
  }
1807
- if (config.debug) {
1808
- process.env[`${prefix}DEBUG`] = config.debug;
1809
+ if (config2.debug) {
1810
+ process.env[`${prefix}DEBUG`] = config2.debug;
1809
1811
  }
1810
- if (config.warning) {
1811
- process.env[`${prefix}WARNING`] = config.warning;
1812
+ if (config2.warning) {
1813
+ process.env[`${prefix}WARNING`] = config2.warning;
1812
1814
  }
1813
- if (config.danger) {
1814
- process.env[`${prefix}DANGER`] = config.danger;
1815
+ if (config2.danger) {
1816
+ process.env[`${prefix}DANGER`] = config2.danger;
1815
1817
  }
1816
- if (config.fatal) {
1817
- process.env[`${prefix}FATAL`] = config.fatal;
1818
+ if (config2.fatal) {
1819
+ process.env[`${prefix}FATAL`] = config2.fatal;
1818
1820
  }
1819
- if (config.performance) {
1820
- process.env[`${prefix}PERFORMANCE`] = config.performance;
1821
+ if (config2.performance) {
1822
+ process.env[`${prefix}PERFORMANCE`] = config2.performance;
1821
1823
  }
1822
- if (config.positive) {
1823
- process.env[`${prefix}POSITIVE`] = config.positive;
1824
+ if (config2.positive) {
1825
+ process.env[`${prefix}POSITIVE`] = config2.positive;
1824
1826
  }
1825
- if (config.negative) {
1826
- process.env[`${prefix}NEGATIVE`] = config.negative;
1827
+ if (config2.negative) {
1828
+ process.env[`${prefix}NEGATIVE`] = config2.negative;
1827
1829
  }
1828
- if (config.gradient) {
1829
- for (let i = 0; i < config.gradient.length; i++) {
1830
- process.env[`${prefix}GRADIENT_${i}`] = config.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, config) => {
1836
+ var setMultiThemeColorsEnv = (prefix, config2) => {
1835
1837
  return {
1836
- light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config.light),
1837
- dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config.dark)
1838
+ light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config2.light),
1839
+ dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config2.dark)
1838
1840
  };
1839
1841
  };
1840
- var setBaseThemeColorsEnv = (prefix, config) => {
1841
- if (config.foreground) {
1842
- process.env[`${prefix}FOREGROUND`] = config.foreground;
1842
+ var setBaseThemeColorsEnv = (prefix, config2) => {
1843
+ if (config2.foreground) {
1844
+ process.env[`${prefix}FOREGROUND`] = config2.foreground;
1843
1845
  }
1844
- if (config.background) {
1845
- process.env[`${prefix}BACKGROUND`] = config.background;
1846
+ if (config2.background) {
1847
+ process.env[`${prefix}BACKGROUND`] = config2.background;
1846
1848
  }
1847
- if (config.brand) {
1848
- process.env[`${prefix}BRAND`] = config.brand;
1849
+ if (config2.brand) {
1850
+ process.env[`${prefix}BRAND`] = config2.brand;
1849
1851
  }
1850
- if (config.alternate) {
1851
- process.env[`${prefix}ALTERNATE`] = config.alternate;
1852
+ if (config2.alternate) {
1853
+ process.env[`${prefix}ALTERNATE`] = config2.alternate;
1852
1854
  }
1853
- if (config.accent) {
1854
- process.env[`${prefix}ACCENT`] = config.accent;
1855
+ if (config2.accent) {
1856
+ process.env[`${prefix}ACCENT`] = config2.accent;
1855
1857
  }
1856
- if (config.link) {
1857
- process.env[`${prefix}LINK`] = config.link;
1858
+ if (config2.link) {
1859
+ process.env[`${prefix}LINK`] = config2.link;
1858
1860
  }
1859
- if (config.help) {
1860
- process.env[`${prefix}HELP`] = config.help;
1861
+ if (config2.help) {
1862
+ process.env[`${prefix}HELP`] = config2.help;
1861
1863
  }
1862
- if (config.success) {
1863
- process.env[`${prefix}SUCCESS`] = config.success;
1864
+ if (config2.success) {
1865
+ process.env[`${prefix}SUCCESS`] = config2.success;
1864
1866
  }
1865
- if (config.info) {
1866
- process.env[`${prefix}INFO`] = config.info;
1867
+ if (config2.info) {
1868
+ process.env[`${prefix}INFO`] = config2.info;
1867
1869
  }
1868
- if (config.debug) {
1869
- process.env[`${prefix}DEBUG`] = config.debug;
1870
+ if (config2.debug) {
1871
+ process.env[`${prefix}DEBUG`] = config2.debug;
1870
1872
  }
1871
- if (config.warning) {
1872
- process.env[`${prefix}WARNING`] = config.warning;
1873
+ if (config2.warning) {
1874
+ process.env[`${prefix}WARNING`] = config2.warning;
1873
1875
  }
1874
- if (config.danger) {
1875
- process.env[`${prefix}DANGER`] = config.danger;
1876
+ if (config2.danger) {
1877
+ process.env[`${prefix}DANGER`] = config2.danger;
1876
1878
  }
1877
- if (config.fatal) {
1878
- process.env[`${prefix}FATAL`] = config.fatal;
1879
+ if (config2.fatal) {
1880
+ process.env[`${prefix}FATAL`] = config2.fatal;
1879
1881
  }
1880
- if (config.performance) {
1881
- process.env[`${prefix}PERFORMANCE`] = config.performance;
1882
+ if (config2.performance) {
1883
+ process.env[`${prefix}PERFORMANCE`] = config2.performance;
1882
1884
  }
1883
- if (config.positive) {
1884
- process.env[`${prefix}POSITIVE`] = config.positive;
1885
+ if (config2.positive) {
1886
+ process.env[`${prefix}POSITIVE`] = config2.positive;
1885
1887
  }
1886
- if (config.negative) {
1887
- process.env[`${prefix}NEGATIVE`] = config.negative;
1888
+ if (config2.negative) {
1889
+ process.env[`${prefix}NEGATIVE`] = config2.negative;
1888
1890
  }
1889
- if (config.gradient) {
1890
- for (let i = 0; i < config.gradient.length; i++) {
1891
- process.env[`${prefix}GRADIENT_${i}`] = config.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 config = await createStormWorkspaceConfig(
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 (!config) {
1966
+ if (!config2) {
1965
1967
  return void 0;
1966
1968
  }
1967
- setConfigEnv(config);
1968
- if (!skipLogs && !config.skipConfigLogging) {
1969
+ setConfigEnv(config2);
1970
+ if (!skipLogs && !config2.skipConfigLogging) {
1969
1971
  writeTrace(
1970
1972
  `\u2699\uFE0F Using Storm Workspace configuration:
1971
- ${formatLogMessage(config)}`,
1972
- config
1973
+ ${formatLogMessage(config2)}`,
1974
+ config2
1973
1975
  );
1974
1976
  }
1975
- return config;
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, config = []) {
2515
- return config.map((item, index) => {
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;