@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.
- package/README.md +1 -1
- package/dist/{chunk-HG5QIQCH.js → chunk-YFNPBZUZ.js} +692 -9
- package/dist/index.cjs +701 -18
- package/dist/index.js +1 -1
- package/dist/options.cjs +689 -6
- package/dist/options.js +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -812,9 +812,9 @@ var require_commonjs_plugin = __commonJS({
|
|
|
812
812
|
return null;
|
|
813
813
|
default:
|
|
814
814
|
if (ch >= 48 && ch <= 55) {
|
|
815
|
-
let
|
|
816
|
-
if (
|
|
817
|
-
let octalStr =
|
|
815
|
+
let match2 = this.input.slice(this.pos - 1, this.pos + 2).match(/^[0-7]+/);
|
|
816
|
+
if (match2 === null) return null;
|
|
817
|
+
let octalStr = match2[0];
|
|
818
818
|
let octal = parseInt(octalStr, 8);
|
|
819
819
|
if (octal > 255) {
|
|
820
820
|
octalStr = octalStr.slice(0, -1);
|
|
@@ -1968,16 +1968,16 @@ var require_dist = __commonJS({
|
|
|
1968
1968
|
);
|
|
1969
1969
|
}
|
|
1970
1970
|
const { minify } = terser;
|
|
1971
|
-
const
|
|
1971
|
+
const defaultOptions2 = {};
|
|
1972
1972
|
if (format2 === "esm") {
|
|
1973
|
-
|
|
1973
|
+
defaultOptions2.module = true;
|
|
1974
1974
|
} else if (!(format2 === "iife" && globalName !== void 0)) {
|
|
1975
|
-
|
|
1975
|
+
defaultOptions2.toplevel = true;
|
|
1976
1976
|
}
|
|
1977
1977
|
try {
|
|
1978
1978
|
const minifiedOutput = await minify(
|
|
1979
1979
|
{ [info.path]: code },
|
|
1980
|
-
{ ...
|
|
1980
|
+
{ ...defaultOptions2, ...terserOptions }
|
|
1981
1981
|
);
|
|
1982
1982
|
logger3.info("TERSER", "Minifying with Terser");
|
|
1983
1983
|
if (!minifiedOutput.code) {
|
|
@@ -2705,7 +2705,7 @@ init_cjs_shims();
|
|
|
2705
2705
|
// ../config-tools/dist/logger/console.js
|
|
2706
2706
|
init_cjs_shims();
|
|
2707
2707
|
|
|
2708
|
-
// ../config-tools/dist/chunk-
|
|
2708
|
+
// ../config-tools/dist/chunk-SPHE3YEH.js
|
|
2709
2709
|
init_cjs_shims();
|
|
2710
2710
|
|
|
2711
2711
|
// ../config-tools/dist/chunk-DJB7XLHA.js
|
|
@@ -2892,8 +2892,691 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
2892
2892
|
return LogLevelLabel.INFO;
|
|
2893
2893
|
};
|
|
2894
2894
|
|
|
2895
|
-
// ../config-tools/dist/chunk-
|
|
2896
|
-
var
|
|
2895
|
+
// ../config-tools/dist/chunk-SPHE3YEH.js
|
|
2896
|
+
var daysInYear = 365.2425;
|
|
2897
|
+
var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
|
|
2898
|
+
var minTime = -maxTime;
|
|
2899
|
+
var minutesInMonth = 43200;
|
|
2900
|
+
var minutesInDay = 1440;
|
|
2901
|
+
var secondsInHour = 3600;
|
|
2902
|
+
var secondsInDay = secondsInHour * 24;
|
|
2903
|
+
var secondsInWeek = secondsInDay * 7;
|
|
2904
|
+
var secondsInYear = secondsInDay * daysInYear;
|
|
2905
|
+
var secondsInMonth = secondsInYear / 12;
|
|
2906
|
+
var secondsInQuarter = secondsInMonth * 3;
|
|
2907
|
+
var constructFromSymbol = Symbol.for("constructDateFrom");
|
|
2908
|
+
function constructFrom(date, value) {
|
|
2909
|
+
if (typeof date === "function") return date(value);
|
|
2910
|
+
if (date && typeof date === "object" && constructFromSymbol in date)
|
|
2911
|
+
return date[constructFromSymbol](value);
|
|
2912
|
+
if (date instanceof Date) return new date.constructor(value);
|
|
2913
|
+
return new Date(value);
|
|
2914
|
+
}
|
|
2915
|
+
function constructNow(date) {
|
|
2916
|
+
return constructFrom(date, Date.now());
|
|
2917
|
+
}
|
|
2918
|
+
var formatDistanceLocale = {
|
|
2919
|
+
lessThanXSeconds: {
|
|
2920
|
+
one: "less than a second",
|
|
2921
|
+
other: "less than {{count}} seconds"
|
|
2922
|
+
},
|
|
2923
|
+
xSeconds: {
|
|
2924
|
+
one: "1 second",
|
|
2925
|
+
other: "{{count}} seconds"
|
|
2926
|
+
},
|
|
2927
|
+
halfAMinute: "half a minute",
|
|
2928
|
+
lessThanXMinutes: {
|
|
2929
|
+
one: "less than a minute",
|
|
2930
|
+
other: "less than {{count}} minutes"
|
|
2931
|
+
},
|
|
2932
|
+
xMinutes: {
|
|
2933
|
+
one: "1 minute",
|
|
2934
|
+
other: "{{count}} minutes"
|
|
2935
|
+
},
|
|
2936
|
+
aboutXHours: {
|
|
2937
|
+
one: "about 1 hour",
|
|
2938
|
+
other: "about {{count}} hours"
|
|
2939
|
+
},
|
|
2940
|
+
xHours: {
|
|
2941
|
+
one: "1 hour",
|
|
2942
|
+
other: "{{count}} hours"
|
|
2943
|
+
},
|
|
2944
|
+
xDays: {
|
|
2945
|
+
one: "1 day",
|
|
2946
|
+
other: "{{count}} days"
|
|
2947
|
+
},
|
|
2948
|
+
aboutXWeeks: {
|
|
2949
|
+
one: "about 1 week",
|
|
2950
|
+
other: "about {{count}} weeks"
|
|
2951
|
+
},
|
|
2952
|
+
xWeeks: {
|
|
2953
|
+
one: "1 week",
|
|
2954
|
+
other: "{{count}} weeks"
|
|
2955
|
+
},
|
|
2956
|
+
aboutXMonths: {
|
|
2957
|
+
one: "about 1 month",
|
|
2958
|
+
other: "about {{count}} months"
|
|
2959
|
+
},
|
|
2960
|
+
xMonths: {
|
|
2961
|
+
one: "1 month",
|
|
2962
|
+
other: "{{count}} months"
|
|
2963
|
+
},
|
|
2964
|
+
aboutXYears: {
|
|
2965
|
+
one: "about 1 year",
|
|
2966
|
+
other: "about {{count}} years"
|
|
2967
|
+
},
|
|
2968
|
+
xYears: {
|
|
2969
|
+
one: "1 year",
|
|
2970
|
+
other: "{{count}} years"
|
|
2971
|
+
},
|
|
2972
|
+
overXYears: {
|
|
2973
|
+
one: "over 1 year",
|
|
2974
|
+
other: "over {{count}} years"
|
|
2975
|
+
},
|
|
2976
|
+
almostXYears: {
|
|
2977
|
+
one: "almost 1 year",
|
|
2978
|
+
other: "almost {{count}} years"
|
|
2979
|
+
}
|
|
2980
|
+
};
|
|
2981
|
+
var formatDistance = (token, count, options2) => {
|
|
2982
|
+
let result;
|
|
2983
|
+
const tokenValue = formatDistanceLocale[token];
|
|
2984
|
+
if (typeof tokenValue === "string") {
|
|
2985
|
+
result = tokenValue;
|
|
2986
|
+
} else if (count === 1) {
|
|
2987
|
+
result = tokenValue.one;
|
|
2988
|
+
} else {
|
|
2989
|
+
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
2990
|
+
}
|
|
2991
|
+
if (options2?.addSuffix) {
|
|
2992
|
+
if (options2.comparison && options2.comparison > 0) {
|
|
2993
|
+
return "in " + result;
|
|
2994
|
+
} else {
|
|
2995
|
+
return result + " ago";
|
|
2996
|
+
}
|
|
2997
|
+
}
|
|
2998
|
+
return result;
|
|
2999
|
+
};
|
|
3000
|
+
function buildFormatLongFn(args) {
|
|
3001
|
+
return (options2 = {}) => {
|
|
3002
|
+
const width = options2.width ? String(options2.width) : args.defaultWidth;
|
|
3003
|
+
const format2 = args.formats[width] || args.formats[args.defaultWidth];
|
|
3004
|
+
return format2;
|
|
3005
|
+
};
|
|
3006
|
+
}
|
|
3007
|
+
var dateFormats = {
|
|
3008
|
+
full: "EEEE, MMMM do, y",
|
|
3009
|
+
long: "MMMM do, y",
|
|
3010
|
+
medium: "MMM d, y",
|
|
3011
|
+
short: "MM/dd/yyyy"
|
|
3012
|
+
};
|
|
3013
|
+
var timeFormats = {
|
|
3014
|
+
full: "h:mm:ss a zzzz",
|
|
3015
|
+
long: "h:mm:ss a z",
|
|
3016
|
+
medium: "h:mm:ss a",
|
|
3017
|
+
short: "h:mm a"
|
|
3018
|
+
};
|
|
3019
|
+
var dateTimeFormats = {
|
|
3020
|
+
full: "{{date}} 'at' {{time}}",
|
|
3021
|
+
long: "{{date}} 'at' {{time}}",
|
|
3022
|
+
medium: "{{date}}, {{time}}",
|
|
3023
|
+
short: "{{date}}, {{time}}"
|
|
3024
|
+
};
|
|
3025
|
+
var formatLong = {
|
|
3026
|
+
date: buildFormatLongFn({
|
|
3027
|
+
formats: dateFormats,
|
|
3028
|
+
defaultWidth: "full"
|
|
3029
|
+
}),
|
|
3030
|
+
time: buildFormatLongFn({
|
|
3031
|
+
formats: timeFormats,
|
|
3032
|
+
defaultWidth: "full"
|
|
3033
|
+
}),
|
|
3034
|
+
dateTime: buildFormatLongFn({
|
|
3035
|
+
formats: dateTimeFormats,
|
|
3036
|
+
defaultWidth: "full"
|
|
3037
|
+
})
|
|
3038
|
+
};
|
|
3039
|
+
var formatRelativeLocale = {
|
|
3040
|
+
lastWeek: "'last' eeee 'at' p",
|
|
3041
|
+
yesterday: "'yesterday at' p",
|
|
3042
|
+
today: "'today at' p",
|
|
3043
|
+
tomorrow: "'tomorrow at' p",
|
|
3044
|
+
nextWeek: "eeee 'at' p",
|
|
3045
|
+
other: "P"
|
|
3046
|
+
};
|
|
3047
|
+
var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
|
|
3048
|
+
function buildLocalizeFn(args) {
|
|
3049
|
+
return (value, options2) => {
|
|
3050
|
+
const context = options2?.context ? String(options2.context) : "standalone";
|
|
3051
|
+
let valuesArray;
|
|
3052
|
+
if (context === "formatting" && args.formattingValues) {
|
|
3053
|
+
const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
3054
|
+
const width = options2?.width ? String(options2.width) : defaultWidth;
|
|
3055
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
3056
|
+
} else {
|
|
3057
|
+
const defaultWidth = args.defaultWidth;
|
|
3058
|
+
const width = options2?.width ? String(options2.width) : args.defaultWidth;
|
|
3059
|
+
valuesArray = args.values[width] || args.values[defaultWidth];
|
|
3060
|
+
}
|
|
3061
|
+
const index = args.argumentCallback ? args.argumentCallback(value) : value;
|
|
3062
|
+
return valuesArray[index];
|
|
3063
|
+
};
|
|
3064
|
+
}
|
|
3065
|
+
var eraValues = {
|
|
3066
|
+
narrow: ["B", "A"],
|
|
3067
|
+
abbreviated: ["BC", "AD"],
|
|
3068
|
+
wide: ["Before Christ", "Anno Domini"]
|
|
3069
|
+
};
|
|
3070
|
+
var quarterValues = {
|
|
3071
|
+
narrow: ["1", "2", "3", "4"],
|
|
3072
|
+
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
3073
|
+
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
3074
|
+
};
|
|
3075
|
+
var monthValues = {
|
|
3076
|
+
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
3077
|
+
abbreviated: [
|
|
3078
|
+
"Jan",
|
|
3079
|
+
"Feb",
|
|
3080
|
+
"Mar",
|
|
3081
|
+
"Apr",
|
|
3082
|
+
"May",
|
|
3083
|
+
"Jun",
|
|
3084
|
+
"Jul",
|
|
3085
|
+
"Aug",
|
|
3086
|
+
"Sep",
|
|
3087
|
+
"Oct",
|
|
3088
|
+
"Nov",
|
|
3089
|
+
"Dec"
|
|
3090
|
+
],
|
|
3091
|
+
wide: [
|
|
3092
|
+
"January",
|
|
3093
|
+
"February",
|
|
3094
|
+
"March",
|
|
3095
|
+
"April",
|
|
3096
|
+
"May",
|
|
3097
|
+
"June",
|
|
3098
|
+
"July",
|
|
3099
|
+
"August",
|
|
3100
|
+
"September",
|
|
3101
|
+
"October",
|
|
3102
|
+
"November",
|
|
3103
|
+
"December"
|
|
3104
|
+
]
|
|
3105
|
+
};
|
|
3106
|
+
var dayValues = {
|
|
3107
|
+
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
3108
|
+
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
3109
|
+
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
3110
|
+
wide: [
|
|
3111
|
+
"Sunday",
|
|
3112
|
+
"Monday",
|
|
3113
|
+
"Tuesday",
|
|
3114
|
+
"Wednesday",
|
|
3115
|
+
"Thursday",
|
|
3116
|
+
"Friday",
|
|
3117
|
+
"Saturday"
|
|
3118
|
+
]
|
|
3119
|
+
};
|
|
3120
|
+
var dayPeriodValues = {
|
|
3121
|
+
narrow: {
|
|
3122
|
+
am: "a",
|
|
3123
|
+
pm: "p",
|
|
3124
|
+
midnight: "mi",
|
|
3125
|
+
noon: "n",
|
|
3126
|
+
morning: "morning",
|
|
3127
|
+
afternoon: "afternoon",
|
|
3128
|
+
evening: "evening",
|
|
3129
|
+
night: "night"
|
|
3130
|
+
},
|
|
3131
|
+
abbreviated: {
|
|
3132
|
+
am: "AM",
|
|
3133
|
+
pm: "PM",
|
|
3134
|
+
midnight: "midnight",
|
|
3135
|
+
noon: "noon",
|
|
3136
|
+
morning: "morning",
|
|
3137
|
+
afternoon: "afternoon",
|
|
3138
|
+
evening: "evening",
|
|
3139
|
+
night: "night"
|
|
3140
|
+
},
|
|
3141
|
+
wide: {
|
|
3142
|
+
am: "a.m.",
|
|
3143
|
+
pm: "p.m.",
|
|
3144
|
+
midnight: "midnight",
|
|
3145
|
+
noon: "noon",
|
|
3146
|
+
morning: "morning",
|
|
3147
|
+
afternoon: "afternoon",
|
|
3148
|
+
evening: "evening",
|
|
3149
|
+
night: "night"
|
|
3150
|
+
}
|
|
3151
|
+
};
|
|
3152
|
+
var formattingDayPeriodValues = {
|
|
3153
|
+
narrow: {
|
|
3154
|
+
am: "a",
|
|
3155
|
+
pm: "p",
|
|
3156
|
+
midnight: "mi",
|
|
3157
|
+
noon: "n",
|
|
3158
|
+
morning: "in the morning",
|
|
3159
|
+
afternoon: "in the afternoon",
|
|
3160
|
+
evening: "in the evening",
|
|
3161
|
+
night: "at night"
|
|
3162
|
+
},
|
|
3163
|
+
abbreviated: {
|
|
3164
|
+
am: "AM",
|
|
3165
|
+
pm: "PM",
|
|
3166
|
+
midnight: "midnight",
|
|
3167
|
+
noon: "noon",
|
|
3168
|
+
morning: "in the morning",
|
|
3169
|
+
afternoon: "in the afternoon",
|
|
3170
|
+
evening: "in the evening",
|
|
3171
|
+
night: "at night"
|
|
3172
|
+
},
|
|
3173
|
+
wide: {
|
|
3174
|
+
am: "a.m.",
|
|
3175
|
+
pm: "p.m.",
|
|
3176
|
+
midnight: "midnight",
|
|
3177
|
+
noon: "noon",
|
|
3178
|
+
morning: "in the morning",
|
|
3179
|
+
afternoon: "in the afternoon",
|
|
3180
|
+
evening: "in the evening",
|
|
3181
|
+
night: "at night"
|
|
3182
|
+
}
|
|
3183
|
+
};
|
|
3184
|
+
var ordinalNumber = (dirtyNumber, _options) => {
|
|
3185
|
+
const number = Number(dirtyNumber);
|
|
3186
|
+
const rem100 = number % 100;
|
|
3187
|
+
if (rem100 > 20 || rem100 < 10) {
|
|
3188
|
+
switch (rem100 % 10) {
|
|
3189
|
+
case 1:
|
|
3190
|
+
return number + "st";
|
|
3191
|
+
case 2:
|
|
3192
|
+
return number + "nd";
|
|
3193
|
+
case 3:
|
|
3194
|
+
return number + "rd";
|
|
3195
|
+
}
|
|
3196
|
+
}
|
|
3197
|
+
return number + "th";
|
|
3198
|
+
};
|
|
3199
|
+
var localize = {
|
|
3200
|
+
ordinalNumber,
|
|
3201
|
+
era: buildLocalizeFn({
|
|
3202
|
+
values: eraValues,
|
|
3203
|
+
defaultWidth: "wide"
|
|
3204
|
+
}),
|
|
3205
|
+
quarter: buildLocalizeFn({
|
|
3206
|
+
values: quarterValues,
|
|
3207
|
+
defaultWidth: "wide",
|
|
3208
|
+
argumentCallback: (quarter) => quarter - 1
|
|
3209
|
+
}),
|
|
3210
|
+
month: buildLocalizeFn({
|
|
3211
|
+
values: monthValues,
|
|
3212
|
+
defaultWidth: "wide"
|
|
3213
|
+
}),
|
|
3214
|
+
day: buildLocalizeFn({
|
|
3215
|
+
values: dayValues,
|
|
3216
|
+
defaultWidth: "wide"
|
|
3217
|
+
}),
|
|
3218
|
+
dayPeriod: buildLocalizeFn({
|
|
3219
|
+
values: dayPeriodValues,
|
|
3220
|
+
defaultWidth: "wide",
|
|
3221
|
+
formattingValues: formattingDayPeriodValues,
|
|
3222
|
+
defaultFormattingWidth: "wide"
|
|
3223
|
+
})
|
|
3224
|
+
};
|
|
3225
|
+
function buildMatchFn(args) {
|
|
3226
|
+
return (string3, options2 = {}) => {
|
|
3227
|
+
const width = options2.width;
|
|
3228
|
+
const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
3229
|
+
const matchResult = string3.match(matchPattern);
|
|
3230
|
+
if (!matchResult) {
|
|
3231
|
+
return null;
|
|
3232
|
+
}
|
|
3233
|
+
const matchedString = matchResult[0];
|
|
3234
|
+
const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
3235
|
+
const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
|
|
3236
|
+
// [TODO] -- I challenge you to fix the type
|
|
3237
|
+
findKey(parsePatterns, (pattern) => pattern.test(matchedString))
|
|
3238
|
+
);
|
|
3239
|
+
let value;
|
|
3240
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
3241
|
+
value = options2.valueCallback ? (
|
|
3242
|
+
// [TODO] -- I challenge you to fix the type
|
|
3243
|
+
options2.valueCallback(value)
|
|
3244
|
+
) : value;
|
|
3245
|
+
const rest = string3.slice(matchedString.length);
|
|
3246
|
+
return { value, rest };
|
|
3247
|
+
};
|
|
3248
|
+
}
|
|
3249
|
+
function findKey(object3, predicate) {
|
|
3250
|
+
for (const key in object3) {
|
|
3251
|
+
if (Object.prototype.hasOwnProperty.call(object3, key) && predicate(object3[key])) {
|
|
3252
|
+
return key;
|
|
3253
|
+
}
|
|
3254
|
+
}
|
|
3255
|
+
return void 0;
|
|
3256
|
+
}
|
|
3257
|
+
function findIndex(array3, predicate) {
|
|
3258
|
+
for (let key = 0; key < array3.length; key++) {
|
|
3259
|
+
if (predicate(array3[key])) {
|
|
3260
|
+
return key;
|
|
3261
|
+
}
|
|
3262
|
+
}
|
|
3263
|
+
return void 0;
|
|
3264
|
+
}
|
|
3265
|
+
function buildMatchPatternFn(args) {
|
|
3266
|
+
return (string3, options2 = {}) => {
|
|
3267
|
+
const matchResult = string3.match(args.matchPattern);
|
|
3268
|
+
if (!matchResult) return null;
|
|
3269
|
+
const matchedString = matchResult[0];
|
|
3270
|
+
const parseResult = string3.match(args.parsePattern);
|
|
3271
|
+
if (!parseResult) return null;
|
|
3272
|
+
let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
3273
|
+
value = options2.valueCallback ? options2.valueCallback(value) : value;
|
|
3274
|
+
const rest = string3.slice(matchedString.length);
|
|
3275
|
+
return { value, rest };
|
|
3276
|
+
};
|
|
3277
|
+
}
|
|
3278
|
+
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
3279
|
+
var parseOrdinalNumberPattern = /\d+/i;
|
|
3280
|
+
var matchEraPatterns = {
|
|
3281
|
+
narrow: /^(b|a)/i,
|
|
3282
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
3283
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
3284
|
+
};
|
|
3285
|
+
var parseEraPatterns = {
|
|
3286
|
+
any: [/^b/i, /^(a|c)/i]
|
|
3287
|
+
};
|
|
3288
|
+
var matchQuarterPatterns = {
|
|
3289
|
+
narrow: /^[1234]/i,
|
|
3290
|
+
abbreviated: /^q[1234]/i,
|
|
3291
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
3292
|
+
};
|
|
3293
|
+
var parseQuarterPatterns = {
|
|
3294
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
3295
|
+
};
|
|
3296
|
+
var matchMonthPatterns = {
|
|
3297
|
+
narrow: /^[jfmasond]/i,
|
|
3298
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
3299
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
3300
|
+
};
|
|
3301
|
+
var parseMonthPatterns = {
|
|
3302
|
+
narrow: [
|
|
3303
|
+
/^j/i,
|
|
3304
|
+
/^f/i,
|
|
3305
|
+
/^m/i,
|
|
3306
|
+
/^a/i,
|
|
3307
|
+
/^m/i,
|
|
3308
|
+
/^j/i,
|
|
3309
|
+
/^j/i,
|
|
3310
|
+
/^a/i,
|
|
3311
|
+
/^s/i,
|
|
3312
|
+
/^o/i,
|
|
3313
|
+
/^n/i,
|
|
3314
|
+
/^d/i
|
|
3315
|
+
],
|
|
3316
|
+
any: [
|
|
3317
|
+
/^ja/i,
|
|
3318
|
+
/^f/i,
|
|
3319
|
+
/^mar/i,
|
|
3320
|
+
/^ap/i,
|
|
3321
|
+
/^may/i,
|
|
3322
|
+
/^jun/i,
|
|
3323
|
+
/^jul/i,
|
|
3324
|
+
/^au/i,
|
|
3325
|
+
/^s/i,
|
|
3326
|
+
/^o/i,
|
|
3327
|
+
/^n/i,
|
|
3328
|
+
/^d/i
|
|
3329
|
+
]
|
|
3330
|
+
};
|
|
3331
|
+
var matchDayPatterns = {
|
|
3332
|
+
narrow: /^[smtwf]/i,
|
|
3333
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
3334
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
3335
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
3336
|
+
};
|
|
3337
|
+
var parseDayPatterns = {
|
|
3338
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
3339
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
3340
|
+
};
|
|
3341
|
+
var matchDayPeriodPatterns = {
|
|
3342
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
3343
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
3344
|
+
};
|
|
3345
|
+
var parseDayPeriodPatterns = {
|
|
3346
|
+
any: {
|
|
3347
|
+
am: /^a/i,
|
|
3348
|
+
pm: /^p/i,
|
|
3349
|
+
midnight: /^mi/i,
|
|
3350
|
+
noon: /^no/i,
|
|
3351
|
+
morning: /morning/i,
|
|
3352
|
+
afternoon: /afternoon/i,
|
|
3353
|
+
evening: /evening/i,
|
|
3354
|
+
night: /night/i
|
|
3355
|
+
}
|
|
3356
|
+
};
|
|
3357
|
+
var match = {
|
|
3358
|
+
ordinalNumber: buildMatchPatternFn({
|
|
3359
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
3360
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
3361
|
+
valueCallback: (value) => parseInt(value, 10)
|
|
3362
|
+
}),
|
|
3363
|
+
era: buildMatchFn({
|
|
3364
|
+
matchPatterns: matchEraPatterns,
|
|
3365
|
+
defaultMatchWidth: "wide",
|
|
3366
|
+
parsePatterns: parseEraPatterns,
|
|
3367
|
+
defaultParseWidth: "any"
|
|
3368
|
+
}),
|
|
3369
|
+
quarter: buildMatchFn({
|
|
3370
|
+
matchPatterns: matchQuarterPatterns,
|
|
3371
|
+
defaultMatchWidth: "wide",
|
|
3372
|
+
parsePatterns: parseQuarterPatterns,
|
|
3373
|
+
defaultParseWidth: "any",
|
|
3374
|
+
valueCallback: (index) => index + 1
|
|
3375
|
+
}),
|
|
3376
|
+
month: buildMatchFn({
|
|
3377
|
+
matchPatterns: matchMonthPatterns,
|
|
3378
|
+
defaultMatchWidth: "wide",
|
|
3379
|
+
parsePatterns: parseMonthPatterns,
|
|
3380
|
+
defaultParseWidth: "any"
|
|
3381
|
+
}),
|
|
3382
|
+
day: buildMatchFn({
|
|
3383
|
+
matchPatterns: matchDayPatterns,
|
|
3384
|
+
defaultMatchWidth: "wide",
|
|
3385
|
+
parsePatterns: parseDayPatterns,
|
|
3386
|
+
defaultParseWidth: "any"
|
|
3387
|
+
}),
|
|
3388
|
+
dayPeriod: buildMatchFn({
|
|
3389
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
3390
|
+
defaultMatchWidth: "any",
|
|
3391
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
3392
|
+
defaultParseWidth: "any"
|
|
3393
|
+
})
|
|
3394
|
+
};
|
|
3395
|
+
var enUS = {
|
|
3396
|
+
code: "en-US",
|
|
3397
|
+
formatDistance,
|
|
3398
|
+
formatLong,
|
|
3399
|
+
formatRelative,
|
|
3400
|
+
localize,
|
|
3401
|
+
match,
|
|
3402
|
+
options: {
|
|
3403
|
+
weekStartsOn: 0,
|
|
3404
|
+
firstWeekContainsDate: 1
|
|
3405
|
+
}
|
|
3406
|
+
};
|
|
3407
|
+
var defaultOptions = {};
|
|
3408
|
+
function getDefaultOptions() {
|
|
3409
|
+
return defaultOptions;
|
|
3410
|
+
}
|
|
3411
|
+
function toDate(argument, context) {
|
|
3412
|
+
return constructFrom(context || argument, argument);
|
|
3413
|
+
}
|
|
3414
|
+
function getTimezoneOffsetInMilliseconds(date) {
|
|
3415
|
+
const _date = toDate(date);
|
|
3416
|
+
const utcDate = new Date(
|
|
3417
|
+
Date.UTC(
|
|
3418
|
+
_date.getFullYear(),
|
|
3419
|
+
_date.getMonth(),
|
|
3420
|
+
_date.getDate(),
|
|
3421
|
+
_date.getHours(),
|
|
3422
|
+
_date.getMinutes(),
|
|
3423
|
+
_date.getSeconds(),
|
|
3424
|
+
_date.getMilliseconds()
|
|
3425
|
+
)
|
|
3426
|
+
);
|
|
3427
|
+
utcDate.setUTCFullYear(_date.getFullYear());
|
|
3428
|
+
return +date - +utcDate;
|
|
3429
|
+
}
|
|
3430
|
+
function normalizeDates(context, ...dates) {
|
|
3431
|
+
const normalize = constructFrom.bind(
|
|
3432
|
+
null,
|
|
3433
|
+
context || dates.find((date) => typeof date === "object")
|
|
3434
|
+
);
|
|
3435
|
+
return dates.map(normalize);
|
|
3436
|
+
}
|
|
3437
|
+
function compareAsc(dateLeft, dateRight) {
|
|
3438
|
+
const diff = +toDate(dateLeft) - +toDate(dateRight);
|
|
3439
|
+
if (diff < 0) return -1;
|
|
3440
|
+
else if (diff > 0) return 1;
|
|
3441
|
+
return diff;
|
|
3442
|
+
}
|
|
3443
|
+
function differenceInCalendarMonths(laterDate, earlierDate, options2) {
|
|
3444
|
+
const [laterDate_, earlierDate_] = normalizeDates(
|
|
3445
|
+
options2?.in,
|
|
3446
|
+
laterDate,
|
|
3447
|
+
earlierDate
|
|
3448
|
+
);
|
|
3449
|
+
const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();
|
|
3450
|
+
const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();
|
|
3451
|
+
return yearsDiff * 12 + monthsDiff;
|
|
3452
|
+
}
|
|
3453
|
+
function endOfDay(date, options2) {
|
|
3454
|
+
const _date = toDate(date, options2?.in);
|
|
3455
|
+
_date.setHours(23, 59, 59, 999);
|
|
3456
|
+
return _date;
|
|
3457
|
+
}
|
|
3458
|
+
function endOfMonth(date, options2) {
|
|
3459
|
+
const _date = toDate(date, options2?.in);
|
|
3460
|
+
const month = _date.getMonth();
|
|
3461
|
+
_date.setFullYear(_date.getFullYear(), month + 1, 0);
|
|
3462
|
+
_date.setHours(23, 59, 59, 999);
|
|
3463
|
+
return _date;
|
|
3464
|
+
}
|
|
3465
|
+
function isLastDayOfMonth(date, options2) {
|
|
3466
|
+
const _date = toDate(date, options2?.in);
|
|
3467
|
+
return +endOfDay(_date, options2) === +endOfMonth(_date, options2);
|
|
3468
|
+
}
|
|
3469
|
+
function differenceInMonths(laterDate, earlierDate, options2) {
|
|
3470
|
+
const [laterDate_, workingLaterDate, earlierDate_] = normalizeDates(
|
|
3471
|
+
options2?.in,
|
|
3472
|
+
laterDate,
|
|
3473
|
+
laterDate,
|
|
3474
|
+
earlierDate
|
|
3475
|
+
);
|
|
3476
|
+
const sign = compareAsc(workingLaterDate, earlierDate_);
|
|
3477
|
+
const difference = Math.abs(
|
|
3478
|
+
differenceInCalendarMonths(workingLaterDate, earlierDate_)
|
|
3479
|
+
);
|
|
3480
|
+
if (difference < 1) return 0;
|
|
3481
|
+
if (workingLaterDate.getMonth() === 1 && workingLaterDate.getDate() > 27)
|
|
3482
|
+
workingLaterDate.setDate(30);
|
|
3483
|
+
workingLaterDate.setMonth(workingLaterDate.getMonth() - sign * difference);
|
|
3484
|
+
let isLastMonthNotFull = compareAsc(workingLaterDate, earlierDate_) === -sign;
|
|
3485
|
+
if (isLastDayOfMonth(laterDate_) && difference === 1 && compareAsc(laterDate_, earlierDate_) === 1) {
|
|
3486
|
+
isLastMonthNotFull = false;
|
|
3487
|
+
}
|
|
3488
|
+
const result = sign * (difference - +isLastMonthNotFull);
|
|
3489
|
+
return result === 0 ? 0 : result;
|
|
3490
|
+
}
|
|
3491
|
+
function getRoundingMethod(method) {
|
|
3492
|
+
return (number) => {
|
|
3493
|
+
const round = method ? Math[method] : Math.trunc;
|
|
3494
|
+
const result = round(number);
|
|
3495
|
+
return result === 0 ? 0 : result;
|
|
3496
|
+
};
|
|
3497
|
+
}
|
|
3498
|
+
function differenceInMilliseconds(laterDate, earlierDate) {
|
|
3499
|
+
return +toDate(laterDate) - +toDate(earlierDate);
|
|
3500
|
+
}
|
|
3501
|
+
function differenceInSeconds(laterDate, earlierDate, options2) {
|
|
3502
|
+
const diff = differenceInMilliseconds(laterDate, earlierDate) / 1e3;
|
|
3503
|
+
return getRoundingMethod(options2?.roundingMethod)(diff);
|
|
3504
|
+
}
|
|
3505
|
+
function formatDistance2(laterDate, earlierDate, options2) {
|
|
3506
|
+
const defaultOptions2 = getDefaultOptions();
|
|
3507
|
+
const locale = options2?.locale ?? defaultOptions2.locale ?? enUS;
|
|
3508
|
+
const minutesInAlmostTwoDays = 2520;
|
|
3509
|
+
const comparison = compareAsc(laterDate, earlierDate);
|
|
3510
|
+
if (isNaN(comparison)) throw new RangeError("Invalid time value");
|
|
3511
|
+
const localizeOptions = Object.assign({}, options2, {
|
|
3512
|
+
addSuffix: options2?.addSuffix,
|
|
3513
|
+
comparison
|
|
3514
|
+
});
|
|
3515
|
+
const [laterDate_, earlierDate_] = normalizeDates(
|
|
3516
|
+
options2?.in,
|
|
3517
|
+
...comparison > 0 ? [earlierDate, laterDate] : [laterDate, earlierDate]
|
|
3518
|
+
);
|
|
3519
|
+
const seconds = differenceInSeconds(earlierDate_, laterDate_);
|
|
3520
|
+
const offsetInSeconds = (getTimezoneOffsetInMilliseconds(earlierDate_) - getTimezoneOffsetInMilliseconds(laterDate_)) / 1e3;
|
|
3521
|
+
const minutes = Math.round((seconds - offsetInSeconds) / 60);
|
|
3522
|
+
let months;
|
|
3523
|
+
if (minutes < 2) {
|
|
3524
|
+
if (options2?.includeSeconds) {
|
|
3525
|
+
if (seconds < 5) {
|
|
3526
|
+
return locale.formatDistance("lessThanXSeconds", 5, localizeOptions);
|
|
3527
|
+
} else if (seconds < 10) {
|
|
3528
|
+
return locale.formatDistance("lessThanXSeconds", 10, localizeOptions);
|
|
3529
|
+
} else if (seconds < 20) {
|
|
3530
|
+
return locale.formatDistance("lessThanXSeconds", 20, localizeOptions);
|
|
3531
|
+
} else if (seconds < 40) {
|
|
3532
|
+
return locale.formatDistance("halfAMinute", 0, localizeOptions);
|
|
3533
|
+
} else if (seconds < 60) {
|
|
3534
|
+
return locale.formatDistance("lessThanXMinutes", 1, localizeOptions);
|
|
3535
|
+
} else {
|
|
3536
|
+
return locale.formatDistance("xMinutes", 1, localizeOptions);
|
|
3537
|
+
}
|
|
3538
|
+
} else {
|
|
3539
|
+
if (minutes === 0) {
|
|
3540
|
+
return locale.formatDistance("lessThanXMinutes", 1, localizeOptions);
|
|
3541
|
+
} else {
|
|
3542
|
+
return locale.formatDistance("xMinutes", minutes, localizeOptions);
|
|
3543
|
+
}
|
|
3544
|
+
}
|
|
3545
|
+
} else if (minutes < 45) {
|
|
3546
|
+
return locale.formatDistance("xMinutes", minutes, localizeOptions);
|
|
3547
|
+
} else if (minutes < 90) {
|
|
3548
|
+
return locale.formatDistance("aboutXHours", 1, localizeOptions);
|
|
3549
|
+
} else if (minutes < minutesInDay) {
|
|
3550
|
+
const hours = Math.round(minutes / 60);
|
|
3551
|
+
return locale.formatDistance("aboutXHours", hours, localizeOptions);
|
|
3552
|
+
} else if (minutes < minutesInAlmostTwoDays) {
|
|
3553
|
+
return locale.formatDistance("xDays", 1, localizeOptions);
|
|
3554
|
+
} else if (minutes < minutesInMonth) {
|
|
3555
|
+
const days = Math.round(minutes / minutesInDay);
|
|
3556
|
+
return locale.formatDistance("xDays", days, localizeOptions);
|
|
3557
|
+
} else if (minutes < minutesInMonth * 2) {
|
|
3558
|
+
months = Math.round(minutes / minutesInMonth);
|
|
3559
|
+
return locale.formatDistance("aboutXMonths", months, localizeOptions);
|
|
3560
|
+
}
|
|
3561
|
+
months = differenceInMonths(earlierDate_, laterDate_);
|
|
3562
|
+
if (months < 12) {
|
|
3563
|
+
const nearestMonth = Math.round(minutes / minutesInMonth);
|
|
3564
|
+
return locale.formatDistance("xMonths", nearestMonth, localizeOptions);
|
|
3565
|
+
} else {
|
|
3566
|
+
const monthsSinceStartOfYear = months % 12;
|
|
3567
|
+
const years = Math.trunc(months / 12);
|
|
3568
|
+
if (monthsSinceStartOfYear < 3) {
|
|
3569
|
+
return locale.formatDistance("aboutXYears", years, localizeOptions);
|
|
3570
|
+
} else if (monthsSinceStartOfYear < 9) {
|
|
3571
|
+
return locale.formatDistance("overXYears", years, localizeOptions);
|
|
3572
|
+
} else {
|
|
3573
|
+
return locale.formatDistance("almostXYears", years + 1, localizeOptions);
|
|
3574
|
+
}
|
|
3575
|
+
}
|
|
3576
|
+
}
|
|
3577
|
+
function formatDistanceToNow(date, options2) {
|
|
3578
|
+
return formatDistance2(date, constructNow(date), options2);
|
|
3579
|
+
}
|
|
2897
3580
|
var getLogFn = (logLevel = LogLevel.INFO, config = {}, _chalk = getChalk()) => {
|
|
2898
3581
|
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;
|
|
2899
3582
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
@@ -3009,7 +3692,7 @@ var getStopwatch = (name) => {
|
|
|
3009
3692
|
const start = /* @__PURE__ */ new Date();
|
|
3010
3693
|
return () => {
|
|
3011
3694
|
console.info(
|
|
3012
|
-
`> \u23F1 The${name ? ` ${name}` : ""} process took ${
|
|
3695
|
+
`> \u23F1 The${name ? ` ${name}` : ""} process took ${formatDistanceToNow(
|
|
3013
3696
|
start,
|
|
3014
3697
|
{
|
|
3015
3698
|
includeSeconds: true
|
|
@@ -3133,7 +3816,7 @@ var import_node_path = require("path");
|
|
|
3133
3816
|
|
|
3134
3817
|
// ../build-tools/dist/chunk-RBJMCJYF.mjs
|
|
3135
3818
|
init_cjs_shims();
|
|
3136
|
-
var
|
|
3819
|
+
var import_formatDistanceToNow = require("date-fns/formatDistanceToNow");
|
|
3137
3820
|
var import_chalk2 = __toESM(require("chalk"), 1);
|
|
3138
3821
|
var LogLevelLabel2 = {
|
|
3139
3822
|
SILENT: "silent",
|
|
@@ -3823,13 +4506,13 @@ var import_path = require("path");
|
|
|
3823
4506
|
// ../config-tools/dist/get-config.js
|
|
3824
4507
|
init_cjs_shims();
|
|
3825
4508
|
|
|
3826
|
-
// ../config-tools/dist/chunk-
|
|
4509
|
+
// ../config-tools/dist/chunk-T32OBFSH.js
|
|
3827
4510
|
init_cjs_shims();
|
|
3828
4511
|
|
|
3829
|
-
// ../config-tools/dist/chunk-
|
|
4512
|
+
// ../config-tools/dist/chunk-VOEYKXJ6.js
|
|
3830
4513
|
init_cjs_shims();
|
|
3831
4514
|
|
|
3832
|
-
// ../config-tools/dist/chunk-
|
|
4515
|
+
// ../config-tools/dist/chunk-ZFTN72CN.js
|
|
3833
4516
|
init_cjs_shims();
|
|
3834
4517
|
|
|
3835
4518
|
// ../config-tools/dist/chunk-LF3SAK2O.js
|
|
@@ -4055,7 +4738,7 @@ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
|
|
|
4055
4738
|
return result;
|
|
4056
4739
|
}
|
|
4057
4740
|
|
|
4058
|
-
// ../config-tools/dist/chunk-
|
|
4741
|
+
// ../config-tools/dist/chunk-ZFTN72CN.js
|
|
4059
4742
|
var import_c122 = require("c12");
|
|
4060
4743
|
var import_defu3 = __toESM(require("defu"), 1);
|
|
4061
4744
|
var getConfigFileByName = async (fileName, filePath, options2 = {}) => {
|
|
@@ -5019,7 +5702,7 @@ var getBaseThemeColorsEnv = (prefix) => {
|
|
|
5019
5702
|
// ../config/dist/schema.js
|
|
5020
5703
|
init_cjs_shims();
|
|
5021
5704
|
|
|
5022
|
-
// ../config-tools/dist/chunk-
|
|
5705
|
+
// ../config-tools/dist/chunk-VOEYKXJ6.js
|
|
5023
5706
|
var import_defu4 = __toESM(require("defu"), 1);
|
|
5024
5707
|
var import_node_fs9 = require("fs");
|
|
5025
5708
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
@@ -5116,7 +5799,7 @@ ${formatLogMessage(config)}`,
|
|
|
5116
5799
|
return config;
|
|
5117
5800
|
};
|
|
5118
5801
|
|
|
5119
|
-
// ../config-tools/dist/chunk-
|
|
5802
|
+
// ../config-tools/dist/chunk-T32OBFSH.js
|
|
5120
5803
|
function getConfig(workspaceRoot, skipLogs = false) {
|
|
5121
5804
|
return loadStormWorkspaceConfig(workspaceRoot, skipLogs);
|
|
5122
5805
|
}
|