@storm-software/tsup 0.2.86 → 0.2.88

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.
@@ -728,13 +728,13 @@ import { relative } from "path";
728
728
  // ../config-tools/dist/get-config.js
729
729
  init_esm_shims();
730
730
 
731
- // ../config-tools/dist/chunk-ZVA3DOGV.js
731
+ // ../config-tools/dist/chunk-T32OBFSH.js
732
732
  init_esm_shims();
733
733
 
734
- // ../config-tools/dist/chunk-RSTBLBBG.js
734
+ // ../config-tools/dist/chunk-VOEYKXJ6.js
735
735
  init_esm_shims();
736
736
 
737
- // ../config-tools/dist/chunk-ZGGNJYIH.js
737
+ // ../config-tools/dist/chunk-ZFTN72CN.js
738
738
  init_esm_shims();
739
739
 
740
740
  // ../config-tools/dist/chunk-LF3SAK2O.js
@@ -960,7 +960,7 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
960
960
  return result;
961
961
  }
962
962
 
963
- // ../config-tools/dist/chunk-QKYARTIV.js
963
+ // ../config-tools/dist/chunk-SPHE3YEH.js
964
964
  init_esm_shims();
965
965
 
966
966
  // ../config-tools/dist/chunk-DJB7XLHA.js
@@ -1147,8 +1147,691 @@ var getLogLevelLabel2 = (logLevel = LogLevel2.INFO) => {
1147
1147
  return LogLevelLabel2.INFO;
1148
1148
  };
1149
1149
 
1150
- // ../config-tools/dist/chunk-QKYARTIV.js
1151
- import { formatDistanceToNow as formatDistanceToNow2 } from "date-fns/formatDistanceToNow";
1150
+ // ../config-tools/dist/chunk-SPHE3YEH.js
1151
+ var daysInYear = 365.2425;
1152
+ var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
1153
+ var minTime = -maxTime;
1154
+ var minutesInMonth = 43200;
1155
+ var minutesInDay = 1440;
1156
+ var secondsInHour = 3600;
1157
+ var secondsInDay = secondsInHour * 24;
1158
+ var secondsInWeek = secondsInDay * 7;
1159
+ var secondsInYear = secondsInDay * daysInYear;
1160
+ var secondsInMonth = secondsInYear / 12;
1161
+ var secondsInQuarter = secondsInMonth * 3;
1162
+ var constructFromSymbol = Symbol.for("constructDateFrom");
1163
+ function constructFrom(date, value) {
1164
+ if (typeof date === "function") return date(value);
1165
+ if (date && typeof date === "object" && constructFromSymbol in date)
1166
+ return date[constructFromSymbol](value);
1167
+ if (date instanceof Date) return new date.constructor(value);
1168
+ return new Date(value);
1169
+ }
1170
+ function constructNow(date) {
1171
+ return constructFrom(date, Date.now());
1172
+ }
1173
+ var formatDistanceLocale = {
1174
+ lessThanXSeconds: {
1175
+ one: "less than a second",
1176
+ other: "less than {{count}} seconds"
1177
+ },
1178
+ xSeconds: {
1179
+ one: "1 second",
1180
+ other: "{{count}} seconds"
1181
+ },
1182
+ halfAMinute: "half a minute",
1183
+ lessThanXMinutes: {
1184
+ one: "less than a minute",
1185
+ other: "less than {{count}} minutes"
1186
+ },
1187
+ xMinutes: {
1188
+ one: "1 minute",
1189
+ other: "{{count}} minutes"
1190
+ },
1191
+ aboutXHours: {
1192
+ one: "about 1 hour",
1193
+ other: "about {{count}} hours"
1194
+ },
1195
+ xHours: {
1196
+ one: "1 hour",
1197
+ other: "{{count}} hours"
1198
+ },
1199
+ xDays: {
1200
+ one: "1 day",
1201
+ other: "{{count}} days"
1202
+ },
1203
+ aboutXWeeks: {
1204
+ one: "about 1 week",
1205
+ other: "about {{count}} weeks"
1206
+ },
1207
+ xWeeks: {
1208
+ one: "1 week",
1209
+ other: "{{count}} weeks"
1210
+ },
1211
+ aboutXMonths: {
1212
+ one: "about 1 month",
1213
+ other: "about {{count}} months"
1214
+ },
1215
+ xMonths: {
1216
+ one: "1 month",
1217
+ other: "{{count}} months"
1218
+ },
1219
+ aboutXYears: {
1220
+ one: "about 1 year",
1221
+ other: "about {{count}} years"
1222
+ },
1223
+ xYears: {
1224
+ one: "1 year",
1225
+ other: "{{count}} years"
1226
+ },
1227
+ overXYears: {
1228
+ one: "over 1 year",
1229
+ other: "over {{count}} years"
1230
+ },
1231
+ almostXYears: {
1232
+ one: "almost 1 year",
1233
+ other: "almost {{count}} years"
1234
+ }
1235
+ };
1236
+ var formatDistance = (token, count, options) => {
1237
+ let result;
1238
+ const tokenValue = formatDistanceLocale[token];
1239
+ if (typeof tokenValue === "string") {
1240
+ result = tokenValue;
1241
+ } else if (count === 1) {
1242
+ result = tokenValue.one;
1243
+ } else {
1244
+ result = tokenValue.other.replace("{{count}}", count.toString());
1245
+ }
1246
+ if (options?.addSuffix) {
1247
+ if (options.comparison && options.comparison > 0) {
1248
+ return "in " + result;
1249
+ } else {
1250
+ return result + " ago";
1251
+ }
1252
+ }
1253
+ return result;
1254
+ };
1255
+ function buildFormatLongFn(args) {
1256
+ return (options = {}) => {
1257
+ const width = options.width ? String(options.width) : args.defaultWidth;
1258
+ const format2 = args.formats[width] || args.formats[args.defaultWidth];
1259
+ return format2;
1260
+ };
1261
+ }
1262
+ var dateFormats = {
1263
+ full: "EEEE, MMMM do, y",
1264
+ long: "MMMM do, y",
1265
+ medium: "MMM d, y",
1266
+ short: "MM/dd/yyyy"
1267
+ };
1268
+ var timeFormats = {
1269
+ full: "h:mm:ss a zzzz",
1270
+ long: "h:mm:ss a z",
1271
+ medium: "h:mm:ss a",
1272
+ short: "h:mm a"
1273
+ };
1274
+ var dateTimeFormats = {
1275
+ full: "{{date}} 'at' {{time}}",
1276
+ long: "{{date}} 'at' {{time}}",
1277
+ medium: "{{date}}, {{time}}",
1278
+ short: "{{date}}, {{time}}"
1279
+ };
1280
+ var formatLong = {
1281
+ date: buildFormatLongFn({
1282
+ formats: dateFormats,
1283
+ defaultWidth: "full"
1284
+ }),
1285
+ time: buildFormatLongFn({
1286
+ formats: timeFormats,
1287
+ defaultWidth: "full"
1288
+ }),
1289
+ dateTime: buildFormatLongFn({
1290
+ formats: dateTimeFormats,
1291
+ defaultWidth: "full"
1292
+ })
1293
+ };
1294
+ var formatRelativeLocale = {
1295
+ lastWeek: "'last' eeee 'at' p",
1296
+ yesterday: "'yesterday at' p",
1297
+ today: "'today at' p",
1298
+ tomorrow: "'tomorrow at' p",
1299
+ nextWeek: "eeee 'at' p",
1300
+ other: "P"
1301
+ };
1302
+ var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
1303
+ function buildLocalizeFn(args) {
1304
+ return (value, options) => {
1305
+ const context = options?.context ? String(options.context) : "standalone";
1306
+ let valuesArray;
1307
+ if (context === "formatting" && args.formattingValues) {
1308
+ const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
1309
+ const width = options?.width ? String(options.width) : defaultWidth;
1310
+ valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
1311
+ } else {
1312
+ const defaultWidth = args.defaultWidth;
1313
+ const width = options?.width ? String(options.width) : args.defaultWidth;
1314
+ valuesArray = args.values[width] || args.values[defaultWidth];
1315
+ }
1316
+ const index = args.argumentCallback ? args.argumentCallback(value) : value;
1317
+ return valuesArray[index];
1318
+ };
1319
+ }
1320
+ var eraValues = {
1321
+ narrow: ["B", "A"],
1322
+ abbreviated: ["BC", "AD"],
1323
+ wide: ["Before Christ", "Anno Domini"]
1324
+ };
1325
+ var quarterValues = {
1326
+ narrow: ["1", "2", "3", "4"],
1327
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
1328
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
1329
+ };
1330
+ var monthValues = {
1331
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
1332
+ abbreviated: [
1333
+ "Jan",
1334
+ "Feb",
1335
+ "Mar",
1336
+ "Apr",
1337
+ "May",
1338
+ "Jun",
1339
+ "Jul",
1340
+ "Aug",
1341
+ "Sep",
1342
+ "Oct",
1343
+ "Nov",
1344
+ "Dec"
1345
+ ],
1346
+ wide: [
1347
+ "January",
1348
+ "February",
1349
+ "March",
1350
+ "April",
1351
+ "May",
1352
+ "June",
1353
+ "July",
1354
+ "August",
1355
+ "September",
1356
+ "October",
1357
+ "November",
1358
+ "December"
1359
+ ]
1360
+ };
1361
+ var dayValues = {
1362
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
1363
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
1364
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
1365
+ wide: [
1366
+ "Sunday",
1367
+ "Monday",
1368
+ "Tuesday",
1369
+ "Wednesday",
1370
+ "Thursday",
1371
+ "Friday",
1372
+ "Saturday"
1373
+ ]
1374
+ };
1375
+ var dayPeriodValues = {
1376
+ narrow: {
1377
+ am: "a",
1378
+ pm: "p",
1379
+ midnight: "mi",
1380
+ noon: "n",
1381
+ morning: "morning",
1382
+ afternoon: "afternoon",
1383
+ evening: "evening",
1384
+ night: "night"
1385
+ },
1386
+ abbreviated: {
1387
+ am: "AM",
1388
+ pm: "PM",
1389
+ midnight: "midnight",
1390
+ noon: "noon",
1391
+ morning: "morning",
1392
+ afternoon: "afternoon",
1393
+ evening: "evening",
1394
+ night: "night"
1395
+ },
1396
+ wide: {
1397
+ am: "a.m.",
1398
+ pm: "p.m.",
1399
+ midnight: "midnight",
1400
+ noon: "noon",
1401
+ morning: "morning",
1402
+ afternoon: "afternoon",
1403
+ evening: "evening",
1404
+ night: "night"
1405
+ }
1406
+ };
1407
+ var formattingDayPeriodValues = {
1408
+ narrow: {
1409
+ am: "a",
1410
+ pm: "p",
1411
+ midnight: "mi",
1412
+ noon: "n",
1413
+ morning: "in the morning",
1414
+ afternoon: "in the afternoon",
1415
+ evening: "in the evening",
1416
+ night: "at night"
1417
+ },
1418
+ abbreviated: {
1419
+ am: "AM",
1420
+ pm: "PM",
1421
+ midnight: "midnight",
1422
+ noon: "noon",
1423
+ morning: "in the morning",
1424
+ afternoon: "in the afternoon",
1425
+ evening: "in the evening",
1426
+ night: "at night"
1427
+ },
1428
+ wide: {
1429
+ am: "a.m.",
1430
+ pm: "p.m.",
1431
+ midnight: "midnight",
1432
+ noon: "noon",
1433
+ morning: "in the morning",
1434
+ afternoon: "in the afternoon",
1435
+ evening: "in the evening",
1436
+ night: "at night"
1437
+ }
1438
+ };
1439
+ var ordinalNumber = (dirtyNumber, _options) => {
1440
+ const number = Number(dirtyNumber);
1441
+ const rem100 = number % 100;
1442
+ if (rem100 > 20 || rem100 < 10) {
1443
+ switch (rem100 % 10) {
1444
+ case 1:
1445
+ return number + "st";
1446
+ case 2:
1447
+ return number + "nd";
1448
+ case 3:
1449
+ return number + "rd";
1450
+ }
1451
+ }
1452
+ return number + "th";
1453
+ };
1454
+ var localize = {
1455
+ ordinalNumber,
1456
+ era: buildLocalizeFn({
1457
+ values: eraValues,
1458
+ defaultWidth: "wide"
1459
+ }),
1460
+ quarter: buildLocalizeFn({
1461
+ values: quarterValues,
1462
+ defaultWidth: "wide",
1463
+ argumentCallback: (quarter) => quarter - 1
1464
+ }),
1465
+ month: buildLocalizeFn({
1466
+ values: monthValues,
1467
+ defaultWidth: "wide"
1468
+ }),
1469
+ day: buildLocalizeFn({
1470
+ values: dayValues,
1471
+ defaultWidth: "wide"
1472
+ }),
1473
+ dayPeriod: buildLocalizeFn({
1474
+ values: dayPeriodValues,
1475
+ defaultWidth: "wide",
1476
+ formattingValues: formattingDayPeriodValues,
1477
+ defaultFormattingWidth: "wide"
1478
+ })
1479
+ };
1480
+ function buildMatchFn(args) {
1481
+ return (string3, options = {}) => {
1482
+ const width = options.width;
1483
+ const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
1484
+ const matchResult = string3.match(matchPattern);
1485
+ if (!matchResult) {
1486
+ return null;
1487
+ }
1488
+ const matchedString = matchResult[0];
1489
+ const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
1490
+ const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
1491
+ // [TODO] -- I challenge you to fix the type
1492
+ findKey(parsePatterns, (pattern) => pattern.test(matchedString))
1493
+ );
1494
+ let value;
1495
+ value = args.valueCallback ? args.valueCallback(key) : key;
1496
+ value = options.valueCallback ? (
1497
+ // [TODO] -- I challenge you to fix the type
1498
+ options.valueCallback(value)
1499
+ ) : value;
1500
+ const rest = string3.slice(matchedString.length);
1501
+ return { value, rest };
1502
+ };
1503
+ }
1504
+ function findKey(object3, predicate) {
1505
+ for (const key in object3) {
1506
+ if (Object.prototype.hasOwnProperty.call(object3, key) && predicate(object3[key])) {
1507
+ return key;
1508
+ }
1509
+ }
1510
+ return void 0;
1511
+ }
1512
+ function findIndex(array3, predicate) {
1513
+ for (let key = 0; key < array3.length; key++) {
1514
+ if (predicate(array3[key])) {
1515
+ return key;
1516
+ }
1517
+ }
1518
+ return void 0;
1519
+ }
1520
+ function buildMatchPatternFn(args) {
1521
+ return (string3, options = {}) => {
1522
+ const matchResult = string3.match(args.matchPattern);
1523
+ if (!matchResult) return null;
1524
+ const matchedString = matchResult[0];
1525
+ const parseResult = string3.match(args.parsePattern);
1526
+ if (!parseResult) return null;
1527
+ let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
1528
+ value = options.valueCallback ? options.valueCallback(value) : value;
1529
+ const rest = string3.slice(matchedString.length);
1530
+ return { value, rest };
1531
+ };
1532
+ }
1533
+ var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
1534
+ var parseOrdinalNumberPattern = /\d+/i;
1535
+ var matchEraPatterns = {
1536
+ narrow: /^(b|a)/i,
1537
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
1538
+ wide: /^(before christ|before common era|anno domini|common era)/i
1539
+ };
1540
+ var parseEraPatterns = {
1541
+ any: [/^b/i, /^(a|c)/i]
1542
+ };
1543
+ var matchQuarterPatterns = {
1544
+ narrow: /^[1234]/i,
1545
+ abbreviated: /^q[1234]/i,
1546
+ wide: /^[1234](th|st|nd|rd)? quarter/i
1547
+ };
1548
+ var parseQuarterPatterns = {
1549
+ any: [/1/i, /2/i, /3/i, /4/i]
1550
+ };
1551
+ var matchMonthPatterns = {
1552
+ narrow: /^[jfmasond]/i,
1553
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
1554
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
1555
+ };
1556
+ var parseMonthPatterns = {
1557
+ narrow: [
1558
+ /^j/i,
1559
+ /^f/i,
1560
+ /^m/i,
1561
+ /^a/i,
1562
+ /^m/i,
1563
+ /^j/i,
1564
+ /^j/i,
1565
+ /^a/i,
1566
+ /^s/i,
1567
+ /^o/i,
1568
+ /^n/i,
1569
+ /^d/i
1570
+ ],
1571
+ any: [
1572
+ /^ja/i,
1573
+ /^f/i,
1574
+ /^mar/i,
1575
+ /^ap/i,
1576
+ /^may/i,
1577
+ /^jun/i,
1578
+ /^jul/i,
1579
+ /^au/i,
1580
+ /^s/i,
1581
+ /^o/i,
1582
+ /^n/i,
1583
+ /^d/i
1584
+ ]
1585
+ };
1586
+ var matchDayPatterns = {
1587
+ narrow: /^[smtwf]/i,
1588
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
1589
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
1590
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
1591
+ };
1592
+ var parseDayPatterns = {
1593
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
1594
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
1595
+ };
1596
+ var matchDayPeriodPatterns = {
1597
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
1598
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
1599
+ };
1600
+ var parseDayPeriodPatterns = {
1601
+ any: {
1602
+ am: /^a/i,
1603
+ pm: /^p/i,
1604
+ midnight: /^mi/i,
1605
+ noon: /^no/i,
1606
+ morning: /morning/i,
1607
+ afternoon: /afternoon/i,
1608
+ evening: /evening/i,
1609
+ night: /night/i
1610
+ }
1611
+ };
1612
+ var match = {
1613
+ ordinalNumber: buildMatchPatternFn({
1614
+ matchPattern: matchOrdinalNumberPattern,
1615
+ parsePattern: parseOrdinalNumberPattern,
1616
+ valueCallback: (value) => parseInt(value, 10)
1617
+ }),
1618
+ era: buildMatchFn({
1619
+ matchPatterns: matchEraPatterns,
1620
+ defaultMatchWidth: "wide",
1621
+ parsePatterns: parseEraPatterns,
1622
+ defaultParseWidth: "any"
1623
+ }),
1624
+ quarter: buildMatchFn({
1625
+ matchPatterns: matchQuarterPatterns,
1626
+ defaultMatchWidth: "wide",
1627
+ parsePatterns: parseQuarterPatterns,
1628
+ defaultParseWidth: "any",
1629
+ valueCallback: (index) => index + 1
1630
+ }),
1631
+ month: buildMatchFn({
1632
+ matchPatterns: matchMonthPatterns,
1633
+ defaultMatchWidth: "wide",
1634
+ parsePatterns: parseMonthPatterns,
1635
+ defaultParseWidth: "any"
1636
+ }),
1637
+ day: buildMatchFn({
1638
+ matchPatterns: matchDayPatterns,
1639
+ defaultMatchWidth: "wide",
1640
+ parsePatterns: parseDayPatterns,
1641
+ defaultParseWidth: "any"
1642
+ }),
1643
+ dayPeriod: buildMatchFn({
1644
+ matchPatterns: matchDayPeriodPatterns,
1645
+ defaultMatchWidth: "any",
1646
+ parsePatterns: parseDayPeriodPatterns,
1647
+ defaultParseWidth: "any"
1648
+ })
1649
+ };
1650
+ var enUS = {
1651
+ code: "en-US",
1652
+ formatDistance,
1653
+ formatLong,
1654
+ formatRelative,
1655
+ localize,
1656
+ match,
1657
+ options: {
1658
+ weekStartsOn: 0,
1659
+ firstWeekContainsDate: 1
1660
+ }
1661
+ };
1662
+ var defaultOptions = {};
1663
+ function getDefaultOptions() {
1664
+ return defaultOptions;
1665
+ }
1666
+ function toDate(argument, context) {
1667
+ return constructFrom(context || argument, argument);
1668
+ }
1669
+ function getTimezoneOffsetInMilliseconds(date) {
1670
+ const _date = toDate(date);
1671
+ const utcDate = new Date(
1672
+ Date.UTC(
1673
+ _date.getFullYear(),
1674
+ _date.getMonth(),
1675
+ _date.getDate(),
1676
+ _date.getHours(),
1677
+ _date.getMinutes(),
1678
+ _date.getSeconds(),
1679
+ _date.getMilliseconds()
1680
+ )
1681
+ );
1682
+ utcDate.setUTCFullYear(_date.getFullYear());
1683
+ return +date - +utcDate;
1684
+ }
1685
+ function normalizeDates(context, ...dates) {
1686
+ const normalize = constructFrom.bind(
1687
+ null,
1688
+ context || dates.find((date) => typeof date === "object")
1689
+ );
1690
+ return dates.map(normalize);
1691
+ }
1692
+ function compareAsc(dateLeft, dateRight) {
1693
+ const diff = +toDate(dateLeft) - +toDate(dateRight);
1694
+ if (diff < 0) return -1;
1695
+ else if (diff > 0) return 1;
1696
+ return diff;
1697
+ }
1698
+ function differenceInCalendarMonths(laterDate, earlierDate, options) {
1699
+ const [laterDate_, earlierDate_] = normalizeDates(
1700
+ options?.in,
1701
+ laterDate,
1702
+ earlierDate
1703
+ );
1704
+ const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();
1705
+ const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();
1706
+ return yearsDiff * 12 + monthsDiff;
1707
+ }
1708
+ function endOfDay(date, options) {
1709
+ const _date = toDate(date, options?.in);
1710
+ _date.setHours(23, 59, 59, 999);
1711
+ return _date;
1712
+ }
1713
+ function endOfMonth(date, options) {
1714
+ const _date = toDate(date, options?.in);
1715
+ const month = _date.getMonth();
1716
+ _date.setFullYear(_date.getFullYear(), month + 1, 0);
1717
+ _date.setHours(23, 59, 59, 999);
1718
+ return _date;
1719
+ }
1720
+ function isLastDayOfMonth(date, options) {
1721
+ const _date = toDate(date, options?.in);
1722
+ return +endOfDay(_date, options) === +endOfMonth(_date, options);
1723
+ }
1724
+ function differenceInMonths(laterDate, earlierDate, options) {
1725
+ const [laterDate_, workingLaterDate, earlierDate_] = normalizeDates(
1726
+ options?.in,
1727
+ laterDate,
1728
+ laterDate,
1729
+ earlierDate
1730
+ );
1731
+ const sign = compareAsc(workingLaterDate, earlierDate_);
1732
+ const difference = Math.abs(
1733
+ differenceInCalendarMonths(workingLaterDate, earlierDate_)
1734
+ );
1735
+ if (difference < 1) return 0;
1736
+ if (workingLaterDate.getMonth() === 1 && workingLaterDate.getDate() > 27)
1737
+ workingLaterDate.setDate(30);
1738
+ workingLaterDate.setMonth(workingLaterDate.getMonth() - sign * difference);
1739
+ let isLastMonthNotFull = compareAsc(workingLaterDate, earlierDate_) === -sign;
1740
+ if (isLastDayOfMonth(laterDate_) && difference === 1 && compareAsc(laterDate_, earlierDate_) === 1) {
1741
+ isLastMonthNotFull = false;
1742
+ }
1743
+ const result = sign * (difference - +isLastMonthNotFull);
1744
+ return result === 0 ? 0 : result;
1745
+ }
1746
+ function getRoundingMethod(method) {
1747
+ return (number) => {
1748
+ const round = method ? Math[method] : Math.trunc;
1749
+ const result = round(number);
1750
+ return result === 0 ? 0 : result;
1751
+ };
1752
+ }
1753
+ function differenceInMilliseconds(laterDate, earlierDate) {
1754
+ return +toDate(laterDate) - +toDate(earlierDate);
1755
+ }
1756
+ function differenceInSeconds(laterDate, earlierDate, options) {
1757
+ const diff = differenceInMilliseconds(laterDate, earlierDate) / 1e3;
1758
+ return getRoundingMethod(options?.roundingMethod)(diff);
1759
+ }
1760
+ function formatDistance2(laterDate, earlierDate, options) {
1761
+ const defaultOptions2 = getDefaultOptions();
1762
+ const locale = options?.locale ?? defaultOptions2.locale ?? enUS;
1763
+ const minutesInAlmostTwoDays = 2520;
1764
+ const comparison = compareAsc(laterDate, earlierDate);
1765
+ if (isNaN(comparison)) throw new RangeError("Invalid time value");
1766
+ const localizeOptions = Object.assign({}, options, {
1767
+ addSuffix: options?.addSuffix,
1768
+ comparison
1769
+ });
1770
+ const [laterDate_, earlierDate_] = normalizeDates(
1771
+ options?.in,
1772
+ ...comparison > 0 ? [earlierDate, laterDate] : [laterDate, earlierDate]
1773
+ );
1774
+ const seconds = differenceInSeconds(earlierDate_, laterDate_);
1775
+ const offsetInSeconds = (getTimezoneOffsetInMilliseconds(earlierDate_) - getTimezoneOffsetInMilliseconds(laterDate_)) / 1e3;
1776
+ const minutes = Math.round((seconds - offsetInSeconds) / 60);
1777
+ let months;
1778
+ if (minutes < 2) {
1779
+ if (options?.includeSeconds) {
1780
+ if (seconds < 5) {
1781
+ return locale.formatDistance("lessThanXSeconds", 5, localizeOptions);
1782
+ } else if (seconds < 10) {
1783
+ return locale.formatDistance("lessThanXSeconds", 10, localizeOptions);
1784
+ } else if (seconds < 20) {
1785
+ return locale.formatDistance("lessThanXSeconds", 20, localizeOptions);
1786
+ } else if (seconds < 40) {
1787
+ return locale.formatDistance("halfAMinute", 0, localizeOptions);
1788
+ } else if (seconds < 60) {
1789
+ return locale.formatDistance("lessThanXMinutes", 1, localizeOptions);
1790
+ } else {
1791
+ return locale.formatDistance("xMinutes", 1, localizeOptions);
1792
+ }
1793
+ } else {
1794
+ if (minutes === 0) {
1795
+ return locale.formatDistance("lessThanXMinutes", 1, localizeOptions);
1796
+ } else {
1797
+ return locale.formatDistance("xMinutes", minutes, localizeOptions);
1798
+ }
1799
+ }
1800
+ } else if (minutes < 45) {
1801
+ return locale.formatDistance("xMinutes", minutes, localizeOptions);
1802
+ } else if (minutes < 90) {
1803
+ return locale.formatDistance("aboutXHours", 1, localizeOptions);
1804
+ } else if (minutes < minutesInDay) {
1805
+ const hours = Math.round(minutes / 60);
1806
+ return locale.formatDistance("aboutXHours", hours, localizeOptions);
1807
+ } else if (minutes < minutesInAlmostTwoDays) {
1808
+ return locale.formatDistance("xDays", 1, localizeOptions);
1809
+ } else if (minutes < minutesInMonth) {
1810
+ const days = Math.round(minutes / minutesInDay);
1811
+ return locale.formatDistance("xDays", days, localizeOptions);
1812
+ } else if (minutes < minutesInMonth * 2) {
1813
+ months = Math.round(minutes / minutesInMonth);
1814
+ return locale.formatDistance("aboutXMonths", months, localizeOptions);
1815
+ }
1816
+ months = differenceInMonths(earlierDate_, laterDate_);
1817
+ if (months < 12) {
1818
+ const nearestMonth = Math.round(minutes / minutesInMonth);
1819
+ return locale.formatDistance("xMonths", nearestMonth, localizeOptions);
1820
+ } else {
1821
+ const monthsSinceStartOfYear = months % 12;
1822
+ const years = Math.trunc(months / 12);
1823
+ if (monthsSinceStartOfYear < 3) {
1824
+ return locale.formatDistance("aboutXYears", years, localizeOptions);
1825
+ } else if (monthsSinceStartOfYear < 9) {
1826
+ return locale.formatDistance("overXYears", years, localizeOptions);
1827
+ } else {
1828
+ return locale.formatDistance("almostXYears", years + 1, localizeOptions);
1829
+ }
1830
+ }
1831
+ }
1832
+ function formatDistanceToNow2(date, options) {
1833
+ return formatDistance2(date, constructNow(date), options);
1834
+ }
1152
1835
  var getLogFn = (logLevel = LogLevel2.INFO, config = {}, _chalk = getChalk()) => {
1153
1836
  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;
1154
1837
  const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel2.INFO;
@@ -1298,7 +1981,7 @@ var _isFunction = (value) => {
1298
1981
  }
1299
1982
  };
1300
1983
 
1301
- // ../config-tools/dist/chunk-ZGGNJYIH.js
1984
+ // ../config-tools/dist/chunk-ZFTN72CN.js
1302
1985
  import { loadConfig as loadConfig2 } from "c12";
1303
1986
  import defu3 from "defu";
1304
1987
  var getConfigFileByName = async (fileName, filePath, options = {}) => {
@@ -2262,7 +2945,7 @@ var getBaseThemeColorsEnv = (prefix) => {
2262
2945
  // ../config/dist/schema.js
2263
2946
  init_esm_shims();
2264
2947
 
2265
- // ../config-tools/dist/chunk-RSTBLBBG.js
2948
+ // ../config-tools/dist/chunk-VOEYKXJ6.js
2266
2949
  import defu4 from "defu";
2267
2950
  import { existsSync as existsSync7 } from "node:fs";
2268
2951
  var _extension_cache = /* @__PURE__ */ new WeakMap();
@@ -2359,7 +3042,7 @@ ${formatLogMessage2(config)}`,
2359
3042
  return config;
2360
3043
  };
2361
3044
 
2362
- // ../config-tools/dist/chunk-ZVA3DOGV.js
3045
+ // ../config-tools/dist/chunk-T32OBFSH.js
2363
3046
  function getConfig(workspaceRoot, skipLogs = false) {
2364
3047
  return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
2365
3048
  }