@storm-software/config-tools 1.189.7 → 1.189.8
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/bin/config.cjs +0 -3
- package/bin/config.js +0 -3
- package/dist/chunk-2YZ5KRRZ.cjs +931 -0
- package/dist/{chunk-SBJJ3URW.js → chunk-7XZ53BLB.js} +1 -1
- package/dist/{chunk-OZ6NKEEC.cjs → chunk-D7M3EBCK.cjs} +9 -9
- package/dist/{chunk-GLYIZSQP.cjs → chunk-FIJZNJOM.cjs} +2 -2
- package/dist/{chunk-RVHA3XPD.cjs → chunk-GLF62BIP.cjs} +9 -9
- package/dist/{chunk-CSO3LQWV.cjs → chunk-IOQ5VDAA.cjs} +3 -3
- package/dist/{chunk-DPDS4CSW.cjs → chunk-Q5Y5FFCH.cjs} +3 -3
- package/dist/chunk-SPHE3YEH.js +931 -0
- package/dist/{chunk-ZVA3DOGV.js → chunk-T32OBFSH.js} +1 -1
- package/dist/{chunk-OGXIFMHW.js → chunk-T4YVVO6G.js} +1 -1
- package/dist/{chunk-RSTBLBBG.js → chunk-VOEYKXJ6.js} +2 -2
- package/dist/{chunk-RKSFAUGQ.js → chunk-WH6MLTFO.js} +1 -1
- package/dist/{chunk-B3OWNYW5.cjs → chunk-Z6KNQQGD.cjs} +10 -10
- package/dist/{chunk-ZGGNJYIH.js → chunk-ZFTN72CN.js} +1 -1
- package/dist/config-file/get-config-file.cjs +6 -6
- package/dist/config-file/get-config-file.js +5 -5
- package/dist/config-file/index.cjs +6 -6
- package/dist/config-file/index.js +5 -5
- package/dist/create-storm-config.cjs +7 -7
- package/dist/create-storm-config.js +6 -6
- package/dist/get-config.cjs +8 -8
- package/dist/get-config.js +7 -7
- package/dist/index.cjs +8 -8
- package/dist/index.js +7 -7
- package/dist/logger/console.cjs +2 -2
- package/dist/logger/console.js +1 -1
- package/dist/logger/create-logger.cjs +3 -3
- package/dist/logger/create-logger.js +2 -2
- package/dist/logger/index.cjs +3 -3
- package/dist/logger/index.js +2 -2
- package/dist/utilities/index.cjs +5 -5
- package/dist/utilities/index.js +4 -4
- package/dist/utilities/process-handler.cjs +3 -3
- package/dist/utilities/process-handler.js +2 -2
- package/dist/utilities/toml.cjs +4 -4
- package/dist/utilities/toml.js +3 -3
- package/package.json +3 -3
- package/dist/chunk-4XZCLDX5.cjs +0 -192
- package/dist/chunk-QKYARTIV.js +0 -192
|
@@ -0,0 +1,931 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkIKP3QKCZcjs = require('./chunk-IKP3QKCZ.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkLOY6ICHZcjs = require('./chunk-LOY6ICHZ.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkNSUIDUD7cjs = require('./chunk-NSUIDUD7.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
var _chunkBN6MEGGYcjs = require('./chunk-BN6MEGGY.cjs');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var _chunk4PX5UVANcjs = require('./chunk-4PX5UVAN.cjs');
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
var _chunkIRCFHYKZcjs = require('./chunk-IRCFHYKZ.cjs');
|
|
21
|
+
|
|
22
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.js
|
|
23
|
+
var daysInYear = 365.2425;
|
|
24
|
+
var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
|
|
25
|
+
var minTime = -maxTime;
|
|
26
|
+
var minutesInMonth = 43200;
|
|
27
|
+
var minutesInDay = 1440;
|
|
28
|
+
var secondsInHour = 3600;
|
|
29
|
+
var secondsInDay = secondsInHour * 24;
|
|
30
|
+
var secondsInWeek = secondsInDay * 7;
|
|
31
|
+
var secondsInYear = secondsInDay * daysInYear;
|
|
32
|
+
var secondsInMonth = secondsInYear / 12;
|
|
33
|
+
var secondsInQuarter = secondsInMonth * 3;
|
|
34
|
+
var constructFromSymbol = Symbol.for("constructDateFrom");
|
|
35
|
+
|
|
36
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.js
|
|
37
|
+
function constructFrom(date, value) {
|
|
38
|
+
if (typeof date === "function") return date(value);
|
|
39
|
+
if (date && typeof date === "object" && constructFromSymbol in date)
|
|
40
|
+
return date[constructFromSymbol](value);
|
|
41
|
+
if (date instanceof Date) return new date.constructor(value);
|
|
42
|
+
return new Date(value);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructNow.js
|
|
46
|
+
function constructNow(date) {
|
|
47
|
+
return constructFrom(date, Date.now());
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js
|
|
51
|
+
var formatDistanceLocale = {
|
|
52
|
+
lessThanXSeconds: {
|
|
53
|
+
one: "less than a second",
|
|
54
|
+
other: "less than {{count}} seconds"
|
|
55
|
+
},
|
|
56
|
+
xSeconds: {
|
|
57
|
+
one: "1 second",
|
|
58
|
+
other: "{{count}} seconds"
|
|
59
|
+
},
|
|
60
|
+
halfAMinute: "half a minute",
|
|
61
|
+
lessThanXMinutes: {
|
|
62
|
+
one: "less than a minute",
|
|
63
|
+
other: "less than {{count}} minutes"
|
|
64
|
+
},
|
|
65
|
+
xMinutes: {
|
|
66
|
+
one: "1 minute",
|
|
67
|
+
other: "{{count}} minutes"
|
|
68
|
+
},
|
|
69
|
+
aboutXHours: {
|
|
70
|
+
one: "about 1 hour",
|
|
71
|
+
other: "about {{count}} hours"
|
|
72
|
+
},
|
|
73
|
+
xHours: {
|
|
74
|
+
one: "1 hour",
|
|
75
|
+
other: "{{count}} hours"
|
|
76
|
+
},
|
|
77
|
+
xDays: {
|
|
78
|
+
one: "1 day",
|
|
79
|
+
other: "{{count}} days"
|
|
80
|
+
},
|
|
81
|
+
aboutXWeeks: {
|
|
82
|
+
one: "about 1 week",
|
|
83
|
+
other: "about {{count}} weeks"
|
|
84
|
+
},
|
|
85
|
+
xWeeks: {
|
|
86
|
+
one: "1 week",
|
|
87
|
+
other: "{{count}} weeks"
|
|
88
|
+
},
|
|
89
|
+
aboutXMonths: {
|
|
90
|
+
one: "about 1 month",
|
|
91
|
+
other: "about {{count}} months"
|
|
92
|
+
},
|
|
93
|
+
xMonths: {
|
|
94
|
+
one: "1 month",
|
|
95
|
+
other: "{{count}} months"
|
|
96
|
+
},
|
|
97
|
+
aboutXYears: {
|
|
98
|
+
one: "about 1 year",
|
|
99
|
+
other: "about {{count}} years"
|
|
100
|
+
},
|
|
101
|
+
xYears: {
|
|
102
|
+
one: "1 year",
|
|
103
|
+
other: "{{count}} years"
|
|
104
|
+
},
|
|
105
|
+
overXYears: {
|
|
106
|
+
one: "over 1 year",
|
|
107
|
+
other: "over {{count}} years"
|
|
108
|
+
},
|
|
109
|
+
almostXYears: {
|
|
110
|
+
one: "almost 1 year",
|
|
111
|
+
other: "almost {{count}} years"
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
var formatDistance = (token, count, options) => {
|
|
115
|
+
let result;
|
|
116
|
+
const tokenValue = formatDistanceLocale[token];
|
|
117
|
+
if (typeof tokenValue === "string") {
|
|
118
|
+
result = tokenValue;
|
|
119
|
+
} else if (count === 1) {
|
|
120
|
+
result = tokenValue.one;
|
|
121
|
+
} else {
|
|
122
|
+
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
123
|
+
}
|
|
124
|
+
if (_optionalChain([options, 'optionalAccess', _2 => _2.addSuffix])) {
|
|
125
|
+
if (options.comparison && options.comparison > 0) {
|
|
126
|
+
return "in " + result;
|
|
127
|
+
} else {
|
|
128
|
+
return result + " ago";
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return result;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js
|
|
135
|
+
function buildFormatLongFn(args) {
|
|
136
|
+
return (options = {}) => {
|
|
137
|
+
const width = options.width ? String(options.width) : args.defaultWidth;
|
|
138
|
+
const format = args.formats[width] || args.formats[args.defaultWidth];
|
|
139
|
+
return format;
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js
|
|
144
|
+
var dateFormats = {
|
|
145
|
+
full: "EEEE, MMMM do, y",
|
|
146
|
+
long: "MMMM do, y",
|
|
147
|
+
medium: "MMM d, y",
|
|
148
|
+
short: "MM/dd/yyyy"
|
|
149
|
+
};
|
|
150
|
+
var timeFormats = {
|
|
151
|
+
full: "h:mm:ss a zzzz",
|
|
152
|
+
long: "h:mm:ss a z",
|
|
153
|
+
medium: "h:mm:ss a",
|
|
154
|
+
short: "h:mm a"
|
|
155
|
+
};
|
|
156
|
+
var dateTimeFormats = {
|
|
157
|
+
full: "{{date}} 'at' {{time}}",
|
|
158
|
+
long: "{{date}} 'at' {{time}}",
|
|
159
|
+
medium: "{{date}}, {{time}}",
|
|
160
|
+
short: "{{date}}, {{time}}"
|
|
161
|
+
};
|
|
162
|
+
var formatLong = {
|
|
163
|
+
date: buildFormatLongFn({
|
|
164
|
+
formats: dateFormats,
|
|
165
|
+
defaultWidth: "full"
|
|
166
|
+
}),
|
|
167
|
+
time: buildFormatLongFn({
|
|
168
|
+
formats: timeFormats,
|
|
169
|
+
defaultWidth: "full"
|
|
170
|
+
}),
|
|
171
|
+
dateTime: buildFormatLongFn({
|
|
172
|
+
formats: dateTimeFormats,
|
|
173
|
+
defaultWidth: "full"
|
|
174
|
+
})
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js
|
|
178
|
+
var formatRelativeLocale = {
|
|
179
|
+
lastWeek: "'last' eeee 'at' p",
|
|
180
|
+
yesterday: "'yesterday at' p",
|
|
181
|
+
today: "'today at' p",
|
|
182
|
+
tomorrow: "'tomorrow at' p",
|
|
183
|
+
nextWeek: "eeee 'at' p",
|
|
184
|
+
other: "P"
|
|
185
|
+
};
|
|
186
|
+
var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
|
|
187
|
+
|
|
188
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js
|
|
189
|
+
function buildLocalizeFn(args) {
|
|
190
|
+
return (value, options) => {
|
|
191
|
+
const context = _optionalChain([options, 'optionalAccess', _3 => _3.context]) ? String(options.context) : "standalone";
|
|
192
|
+
let valuesArray;
|
|
193
|
+
if (context === "formatting" && args.formattingValues) {
|
|
194
|
+
const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
195
|
+
const width = _optionalChain([options, 'optionalAccess', _4 => _4.width]) ? String(options.width) : defaultWidth;
|
|
196
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
197
|
+
} else {
|
|
198
|
+
const defaultWidth = args.defaultWidth;
|
|
199
|
+
const width = _optionalChain([options, 'optionalAccess', _5 => _5.width]) ? String(options.width) : args.defaultWidth;
|
|
200
|
+
valuesArray = args.values[width] || args.values[defaultWidth];
|
|
201
|
+
}
|
|
202
|
+
const index = args.argumentCallback ? args.argumentCallback(value) : value;
|
|
203
|
+
return valuesArray[index];
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/localize.js
|
|
208
|
+
var eraValues = {
|
|
209
|
+
narrow: ["B", "A"],
|
|
210
|
+
abbreviated: ["BC", "AD"],
|
|
211
|
+
wide: ["Before Christ", "Anno Domini"]
|
|
212
|
+
};
|
|
213
|
+
var quarterValues = {
|
|
214
|
+
narrow: ["1", "2", "3", "4"],
|
|
215
|
+
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
216
|
+
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
217
|
+
};
|
|
218
|
+
var monthValues = {
|
|
219
|
+
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
220
|
+
abbreviated: [
|
|
221
|
+
"Jan",
|
|
222
|
+
"Feb",
|
|
223
|
+
"Mar",
|
|
224
|
+
"Apr",
|
|
225
|
+
"May",
|
|
226
|
+
"Jun",
|
|
227
|
+
"Jul",
|
|
228
|
+
"Aug",
|
|
229
|
+
"Sep",
|
|
230
|
+
"Oct",
|
|
231
|
+
"Nov",
|
|
232
|
+
"Dec"
|
|
233
|
+
],
|
|
234
|
+
wide: [
|
|
235
|
+
"January",
|
|
236
|
+
"February",
|
|
237
|
+
"March",
|
|
238
|
+
"April",
|
|
239
|
+
"May",
|
|
240
|
+
"June",
|
|
241
|
+
"July",
|
|
242
|
+
"August",
|
|
243
|
+
"September",
|
|
244
|
+
"October",
|
|
245
|
+
"November",
|
|
246
|
+
"December"
|
|
247
|
+
]
|
|
248
|
+
};
|
|
249
|
+
var dayValues = {
|
|
250
|
+
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
251
|
+
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
252
|
+
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
253
|
+
wide: [
|
|
254
|
+
"Sunday",
|
|
255
|
+
"Monday",
|
|
256
|
+
"Tuesday",
|
|
257
|
+
"Wednesday",
|
|
258
|
+
"Thursday",
|
|
259
|
+
"Friday",
|
|
260
|
+
"Saturday"
|
|
261
|
+
]
|
|
262
|
+
};
|
|
263
|
+
var dayPeriodValues = {
|
|
264
|
+
narrow: {
|
|
265
|
+
am: "a",
|
|
266
|
+
pm: "p",
|
|
267
|
+
midnight: "mi",
|
|
268
|
+
noon: "n",
|
|
269
|
+
morning: "morning",
|
|
270
|
+
afternoon: "afternoon",
|
|
271
|
+
evening: "evening",
|
|
272
|
+
night: "night"
|
|
273
|
+
},
|
|
274
|
+
abbreviated: {
|
|
275
|
+
am: "AM",
|
|
276
|
+
pm: "PM",
|
|
277
|
+
midnight: "midnight",
|
|
278
|
+
noon: "noon",
|
|
279
|
+
morning: "morning",
|
|
280
|
+
afternoon: "afternoon",
|
|
281
|
+
evening: "evening",
|
|
282
|
+
night: "night"
|
|
283
|
+
},
|
|
284
|
+
wide: {
|
|
285
|
+
am: "a.m.",
|
|
286
|
+
pm: "p.m.",
|
|
287
|
+
midnight: "midnight",
|
|
288
|
+
noon: "noon",
|
|
289
|
+
morning: "morning",
|
|
290
|
+
afternoon: "afternoon",
|
|
291
|
+
evening: "evening",
|
|
292
|
+
night: "night"
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
var formattingDayPeriodValues = {
|
|
296
|
+
narrow: {
|
|
297
|
+
am: "a",
|
|
298
|
+
pm: "p",
|
|
299
|
+
midnight: "mi",
|
|
300
|
+
noon: "n",
|
|
301
|
+
morning: "in the morning",
|
|
302
|
+
afternoon: "in the afternoon",
|
|
303
|
+
evening: "in the evening",
|
|
304
|
+
night: "at night"
|
|
305
|
+
},
|
|
306
|
+
abbreviated: {
|
|
307
|
+
am: "AM",
|
|
308
|
+
pm: "PM",
|
|
309
|
+
midnight: "midnight",
|
|
310
|
+
noon: "noon",
|
|
311
|
+
morning: "in the morning",
|
|
312
|
+
afternoon: "in the afternoon",
|
|
313
|
+
evening: "in the evening",
|
|
314
|
+
night: "at night"
|
|
315
|
+
},
|
|
316
|
+
wide: {
|
|
317
|
+
am: "a.m.",
|
|
318
|
+
pm: "p.m.",
|
|
319
|
+
midnight: "midnight",
|
|
320
|
+
noon: "noon",
|
|
321
|
+
morning: "in the morning",
|
|
322
|
+
afternoon: "in the afternoon",
|
|
323
|
+
evening: "in the evening",
|
|
324
|
+
night: "at night"
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
var ordinalNumber = (dirtyNumber, _options) => {
|
|
328
|
+
const number = Number(dirtyNumber);
|
|
329
|
+
const rem100 = number % 100;
|
|
330
|
+
if (rem100 > 20 || rem100 < 10) {
|
|
331
|
+
switch (rem100 % 10) {
|
|
332
|
+
case 1:
|
|
333
|
+
return number + "st";
|
|
334
|
+
case 2:
|
|
335
|
+
return number + "nd";
|
|
336
|
+
case 3:
|
|
337
|
+
return number + "rd";
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
return number + "th";
|
|
341
|
+
};
|
|
342
|
+
var localize = {
|
|
343
|
+
ordinalNumber,
|
|
344
|
+
era: buildLocalizeFn({
|
|
345
|
+
values: eraValues,
|
|
346
|
+
defaultWidth: "wide"
|
|
347
|
+
}),
|
|
348
|
+
quarter: buildLocalizeFn({
|
|
349
|
+
values: quarterValues,
|
|
350
|
+
defaultWidth: "wide",
|
|
351
|
+
argumentCallback: (quarter) => quarter - 1
|
|
352
|
+
}),
|
|
353
|
+
month: buildLocalizeFn({
|
|
354
|
+
values: monthValues,
|
|
355
|
+
defaultWidth: "wide"
|
|
356
|
+
}),
|
|
357
|
+
day: buildLocalizeFn({
|
|
358
|
+
values: dayValues,
|
|
359
|
+
defaultWidth: "wide"
|
|
360
|
+
}),
|
|
361
|
+
dayPeriod: buildLocalizeFn({
|
|
362
|
+
values: dayPeriodValues,
|
|
363
|
+
defaultWidth: "wide",
|
|
364
|
+
formattingValues: formattingDayPeriodValues,
|
|
365
|
+
defaultFormattingWidth: "wide"
|
|
366
|
+
})
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js
|
|
370
|
+
function buildMatchFn(args) {
|
|
371
|
+
return (string, options = {}) => {
|
|
372
|
+
const width = options.width;
|
|
373
|
+
const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
374
|
+
const matchResult = string.match(matchPattern);
|
|
375
|
+
if (!matchResult) {
|
|
376
|
+
return null;
|
|
377
|
+
}
|
|
378
|
+
const matchedString = matchResult[0];
|
|
379
|
+
const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
380
|
+
const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
|
|
381
|
+
// [TODO] -- I challenge you to fix the type
|
|
382
|
+
findKey(parsePatterns, (pattern) => pattern.test(matchedString))
|
|
383
|
+
);
|
|
384
|
+
let value;
|
|
385
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
386
|
+
value = options.valueCallback ? (
|
|
387
|
+
// [TODO] -- I challenge you to fix the type
|
|
388
|
+
options.valueCallback(value)
|
|
389
|
+
) : value;
|
|
390
|
+
const rest = string.slice(matchedString.length);
|
|
391
|
+
return { value, rest };
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
function findKey(object, predicate) {
|
|
395
|
+
for (const key in object) {
|
|
396
|
+
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
|
|
397
|
+
return key;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
return void 0;
|
|
401
|
+
}
|
|
402
|
+
function findIndex(array, predicate) {
|
|
403
|
+
for (let key = 0; key < array.length; key++) {
|
|
404
|
+
if (predicate(array[key])) {
|
|
405
|
+
return key;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
return void 0;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
|
|
412
|
+
function buildMatchPatternFn(args) {
|
|
413
|
+
return (string, options = {}) => {
|
|
414
|
+
const matchResult = string.match(args.matchPattern);
|
|
415
|
+
if (!matchResult) return null;
|
|
416
|
+
const matchedString = matchResult[0];
|
|
417
|
+
const parseResult = string.match(args.parsePattern);
|
|
418
|
+
if (!parseResult) return null;
|
|
419
|
+
let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
420
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
421
|
+
const rest = string.slice(matchedString.length);
|
|
422
|
+
return { value, rest };
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/match.js
|
|
427
|
+
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
428
|
+
var parseOrdinalNumberPattern = /\d+/i;
|
|
429
|
+
var matchEraPatterns = {
|
|
430
|
+
narrow: /^(b|a)/i,
|
|
431
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
432
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
433
|
+
};
|
|
434
|
+
var parseEraPatterns = {
|
|
435
|
+
any: [/^b/i, /^(a|c)/i]
|
|
436
|
+
};
|
|
437
|
+
var matchQuarterPatterns = {
|
|
438
|
+
narrow: /^[1234]/i,
|
|
439
|
+
abbreviated: /^q[1234]/i,
|
|
440
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
441
|
+
};
|
|
442
|
+
var parseQuarterPatterns = {
|
|
443
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
444
|
+
};
|
|
445
|
+
var matchMonthPatterns = {
|
|
446
|
+
narrow: /^[jfmasond]/i,
|
|
447
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
448
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
449
|
+
};
|
|
450
|
+
var parseMonthPatterns = {
|
|
451
|
+
narrow: [
|
|
452
|
+
/^j/i,
|
|
453
|
+
/^f/i,
|
|
454
|
+
/^m/i,
|
|
455
|
+
/^a/i,
|
|
456
|
+
/^m/i,
|
|
457
|
+
/^j/i,
|
|
458
|
+
/^j/i,
|
|
459
|
+
/^a/i,
|
|
460
|
+
/^s/i,
|
|
461
|
+
/^o/i,
|
|
462
|
+
/^n/i,
|
|
463
|
+
/^d/i
|
|
464
|
+
],
|
|
465
|
+
any: [
|
|
466
|
+
/^ja/i,
|
|
467
|
+
/^f/i,
|
|
468
|
+
/^mar/i,
|
|
469
|
+
/^ap/i,
|
|
470
|
+
/^may/i,
|
|
471
|
+
/^jun/i,
|
|
472
|
+
/^jul/i,
|
|
473
|
+
/^au/i,
|
|
474
|
+
/^s/i,
|
|
475
|
+
/^o/i,
|
|
476
|
+
/^n/i,
|
|
477
|
+
/^d/i
|
|
478
|
+
]
|
|
479
|
+
};
|
|
480
|
+
var matchDayPatterns = {
|
|
481
|
+
narrow: /^[smtwf]/i,
|
|
482
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
483
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
484
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
485
|
+
};
|
|
486
|
+
var parseDayPatterns = {
|
|
487
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
488
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
489
|
+
};
|
|
490
|
+
var matchDayPeriodPatterns = {
|
|
491
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
492
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
493
|
+
};
|
|
494
|
+
var parseDayPeriodPatterns = {
|
|
495
|
+
any: {
|
|
496
|
+
am: /^a/i,
|
|
497
|
+
pm: /^p/i,
|
|
498
|
+
midnight: /^mi/i,
|
|
499
|
+
noon: /^no/i,
|
|
500
|
+
morning: /morning/i,
|
|
501
|
+
afternoon: /afternoon/i,
|
|
502
|
+
evening: /evening/i,
|
|
503
|
+
night: /night/i
|
|
504
|
+
}
|
|
505
|
+
};
|
|
506
|
+
var match = {
|
|
507
|
+
ordinalNumber: buildMatchPatternFn({
|
|
508
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
509
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
510
|
+
valueCallback: (value) => parseInt(value, 10)
|
|
511
|
+
}),
|
|
512
|
+
era: buildMatchFn({
|
|
513
|
+
matchPatterns: matchEraPatterns,
|
|
514
|
+
defaultMatchWidth: "wide",
|
|
515
|
+
parsePatterns: parseEraPatterns,
|
|
516
|
+
defaultParseWidth: "any"
|
|
517
|
+
}),
|
|
518
|
+
quarter: buildMatchFn({
|
|
519
|
+
matchPatterns: matchQuarterPatterns,
|
|
520
|
+
defaultMatchWidth: "wide",
|
|
521
|
+
parsePatterns: parseQuarterPatterns,
|
|
522
|
+
defaultParseWidth: "any",
|
|
523
|
+
valueCallback: (index) => index + 1
|
|
524
|
+
}),
|
|
525
|
+
month: buildMatchFn({
|
|
526
|
+
matchPatterns: matchMonthPatterns,
|
|
527
|
+
defaultMatchWidth: "wide",
|
|
528
|
+
parsePatterns: parseMonthPatterns,
|
|
529
|
+
defaultParseWidth: "any"
|
|
530
|
+
}),
|
|
531
|
+
day: buildMatchFn({
|
|
532
|
+
matchPatterns: matchDayPatterns,
|
|
533
|
+
defaultMatchWidth: "wide",
|
|
534
|
+
parsePatterns: parseDayPatterns,
|
|
535
|
+
defaultParseWidth: "any"
|
|
536
|
+
}),
|
|
537
|
+
dayPeriod: buildMatchFn({
|
|
538
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
539
|
+
defaultMatchWidth: "any",
|
|
540
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
541
|
+
defaultParseWidth: "any"
|
|
542
|
+
})
|
|
543
|
+
};
|
|
544
|
+
|
|
545
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US.js
|
|
546
|
+
var enUS = {
|
|
547
|
+
code: "en-US",
|
|
548
|
+
formatDistance,
|
|
549
|
+
formatLong,
|
|
550
|
+
formatRelative,
|
|
551
|
+
localize,
|
|
552
|
+
match,
|
|
553
|
+
options: {
|
|
554
|
+
weekStartsOn: 0,
|
|
555
|
+
firstWeekContainsDate: 1
|
|
556
|
+
}
|
|
557
|
+
};
|
|
558
|
+
|
|
559
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/defaultOptions.js
|
|
560
|
+
var defaultOptions = {};
|
|
561
|
+
function getDefaultOptions() {
|
|
562
|
+
return defaultOptions;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/toDate.js
|
|
566
|
+
function toDate(argument, context) {
|
|
567
|
+
return constructFrom(context || argument, argument);
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
|
|
571
|
+
function getTimezoneOffsetInMilliseconds(date) {
|
|
572
|
+
const _date = toDate(date);
|
|
573
|
+
const utcDate = new Date(
|
|
574
|
+
Date.UTC(
|
|
575
|
+
_date.getFullYear(),
|
|
576
|
+
_date.getMonth(),
|
|
577
|
+
_date.getDate(),
|
|
578
|
+
_date.getHours(),
|
|
579
|
+
_date.getMinutes(),
|
|
580
|
+
_date.getSeconds(),
|
|
581
|
+
_date.getMilliseconds()
|
|
582
|
+
)
|
|
583
|
+
);
|
|
584
|
+
utcDate.setUTCFullYear(_date.getFullYear());
|
|
585
|
+
return +date - +utcDate;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.js
|
|
589
|
+
function normalizeDates(context, ...dates) {
|
|
590
|
+
const normalize = constructFrom.bind(
|
|
591
|
+
null,
|
|
592
|
+
context || dates.find((date) => typeof date === "object")
|
|
593
|
+
);
|
|
594
|
+
return dates.map(normalize);
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/compareAsc.js
|
|
598
|
+
function compareAsc(dateLeft, dateRight) {
|
|
599
|
+
const diff = +toDate(dateLeft) - +toDate(dateRight);
|
|
600
|
+
if (diff < 0) return -1;
|
|
601
|
+
else if (diff > 0) return 1;
|
|
602
|
+
return diff;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInCalendarMonths.js
|
|
606
|
+
function differenceInCalendarMonths(laterDate, earlierDate, options) {
|
|
607
|
+
const [laterDate_, earlierDate_] = normalizeDates(
|
|
608
|
+
_optionalChain([options, 'optionalAccess', _6 => _6.in]),
|
|
609
|
+
laterDate,
|
|
610
|
+
earlierDate
|
|
611
|
+
);
|
|
612
|
+
const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();
|
|
613
|
+
const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();
|
|
614
|
+
return yearsDiff * 12 + monthsDiff;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/endOfDay.js
|
|
618
|
+
function endOfDay(date, options) {
|
|
619
|
+
const _date = toDate(date, _optionalChain([options, 'optionalAccess', _7 => _7.in]));
|
|
620
|
+
_date.setHours(23, 59, 59, 999);
|
|
621
|
+
return _date;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/endOfMonth.js
|
|
625
|
+
function endOfMonth(date, options) {
|
|
626
|
+
const _date = toDate(date, _optionalChain([options, 'optionalAccess', _8 => _8.in]));
|
|
627
|
+
const month = _date.getMonth();
|
|
628
|
+
_date.setFullYear(_date.getFullYear(), month + 1, 0);
|
|
629
|
+
_date.setHours(23, 59, 59, 999);
|
|
630
|
+
return _date;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isLastDayOfMonth.js
|
|
634
|
+
function isLastDayOfMonth(date, options) {
|
|
635
|
+
const _date = toDate(date, _optionalChain([options, 'optionalAccess', _9 => _9.in]));
|
|
636
|
+
return +endOfDay(_date, options) === +endOfMonth(_date, options);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInMonths.js
|
|
640
|
+
function differenceInMonths(laterDate, earlierDate, options) {
|
|
641
|
+
const [laterDate_, workingLaterDate, earlierDate_] = normalizeDates(
|
|
642
|
+
_optionalChain([options, 'optionalAccess', _10 => _10.in]),
|
|
643
|
+
laterDate,
|
|
644
|
+
laterDate,
|
|
645
|
+
earlierDate
|
|
646
|
+
);
|
|
647
|
+
const sign = compareAsc(workingLaterDate, earlierDate_);
|
|
648
|
+
const difference = Math.abs(
|
|
649
|
+
differenceInCalendarMonths(workingLaterDate, earlierDate_)
|
|
650
|
+
);
|
|
651
|
+
if (difference < 1) return 0;
|
|
652
|
+
if (workingLaterDate.getMonth() === 1 && workingLaterDate.getDate() > 27)
|
|
653
|
+
workingLaterDate.setDate(30);
|
|
654
|
+
workingLaterDate.setMonth(workingLaterDate.getMonth() - sign * difference);
|
|
655
|
+
let isLastMonthNotFull = compareAsc(workingLaterDate, earlierDate_) === -sign;
|
|
656
|
+
if (isLastDayOfMonth(laterDate_) && difference === 1 && compareAsc(laterDate_, earlierDate_) === 1) {
|
|
657
|
+
isLastMonthNotFull = false;
|
|
658
|
+
}
|
|
659
|
+
const result = sign * (difference - +isLastMonthNotFull);
|
|
660
|
+
return result === 0 ? 0 : result;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/getRoundingMethod.js
|
|
664
|
+
function getRoundingMethod(method) {
|
|
665
|
+
return (number) => {
|
|
666
|
+
const round = method ? Math[method] : Math.trunc;
|
|
667
|
+
const result = round(number);
|
|
668
|
+
return result === 0 ? 0 : result;
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInMilliseconds.js
|
|
673
|
+
function differenceInMilliseconds(laterDate, earlierDate) {
|
|
674
|
+
return +toDate(laterDate) - +toDate(earlierDate);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInSeconds.js
|
|
678
|
+
function differenceInSeconds(laterDate, earlierDate, options) {
|
|
679
|
+
const diff = differenceInMilliseconds(laterDate, earlierDate) / 1e3;
|
|
680
|
+
return getRoundingMethod(_optionalChain([options, 'optionalAccess', _11 => _11.roundingMethod]))(diff);
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/formatDistance.js
|
|
684
|
+
function formatDistance2(laterDate, earlierDate, options) {
|
|
685
|
+
const defaultOptions2 = getDefaultOptions();
|
|
686
|
+
const locale = _nullishCoalesce(_nullishCoalesce(_optionalChain([options, 'optionalAccess', _12 => _12.locale]), () => ( defaultOptions2.locale)), () => ( enUS));
|
|
687
|
+
const minutesInAlmostTwoDays = 2520;
|
|
688
|
+
const comparison = compareAsc(laterDate, earlierDate);
|
|
689
|
+
if (isNaN(comparison)) throw new RangeError("Invalid time value");
|
|
690
|
+
const localizeOptions = Object.assign({}, options, {
|
|
691
|
+
addSuffix: _optionalChain([options, 'optionalAccess', _13 => _13.addSuffix]),
|
|
692
|
+
comparison
|
|
693
|
+
});
|
|
694
|
+
const [laterDate_, earlierDate_] = normalizeDates(
|
|
695
|
+
_optionalChain([options, 'optionalAccess', _14 => _14.in]),
|
|
696
|
+
...comparison > 0 ? [earlierDate, laterDate] : [laterDate, earlierDate]
|
|
697
|
+
);
|
|
698
|
+
const seconds = differenceInSeconds(earlierDate_, laterDate_);
|
|
699
|
+
const offsetInSeconds = (getTimezoneOffsetInMilliseconds(earlierDate_) - getTimezoneOffsetInMilliseconds(laterDate_)) / 1e3;
|
|
700
|
+
const minutes = Math.round((seconds - offsetInSeconds) / 60);
|
|
701
|
+
let months;
|
|
702
|
+
if (minutes < 2) {
|
|
703
|
+
if (_optionalChain([options, 'optionalAccess', _15 => _15.includeSeconds])) {
|
|
704
|
+
if (seconds < 5) {
|
|
705
|
+
return locale.formatDistance("lessThanXSeconds", 5, localizeOptions);
|
|
706
|
+
} else if (seconds < 10) {
|
|
707
|
+
return locale.formatDistance("lessThanXSeconds", 10, localizeOptions);
|
|
708
|
+
} else if (seconds < 20) {
|
|
709
|
+
return locale.formatDistance("lessThanXSeconds", 20, localizeOptions);
|
|
710
|
+
} else if (seconds < 40) {
|
|
711
|
+
return locale.formatDistance("halfAMinute", 0, localizeOptions);
|
|
712
|
+
} else if (seconds < 60) {
|
|
713
|
+
return locale.formatDistance("lessThanXMinutes", 1, localizeOptions);
|
|
714
|
+
} else {
|
|
715
|
+
return locale.formatDistance("xMinutes", 1, localizeOptions);
|
|
716
|
+
}
|
|
717
|
+
} else {
|
|
718
|
+
if (minutes === 0) {
|
|
719
|
+
return locale.formatDistance("lessThanXMinutes", 1, localizeOptions);
|
|
720
|
+
} else {
|
|
721
|
+
return locale.formatDistance("xMinutes", minutes, localizeOptions);
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
} else if (minutes < 45) {
|
|
725
|
+
return locale.formatDistance("xMinutes", minutes, localizeOptions);
|
|
726
|
+
} else if (minutes < 90) {
|
|
727
|
+
return locale.formatDistance("aboutXHours", 1, localizeOptions);
|
|
728
|
+
} else if (minutes < minutesInDay) {
|
|
729
|
+
const hours = Math.round(minutes / 60);
|
|
730
|
+
return locale.formatDistance("aboutXHours", hours, localizeOptions);
|
|
731
|
+
} else if (minutes < minutesInAlmostTwoDays) {
|
|
732
|
+
return locale.formatDistance("xDays", 1, localizeOptions);
|
|
733
|
+
} else if (minutes < minutesInMonth) {
|
|
734
|
+
const days = Math.round(minutes / minutesInDay);
|
|
735
|
+
return locale.formatDistance("xDays", days, localizeOptions);
|
|
736
|
+
} else if (minutes < minutesInMonth * 2) {
|
|
737
|
+
months = Math.round(minutes / minutesInMonth);
|
|
738
|
+
return locale.formatDistance("aboutXMonths", months, localizeOptions);
|
|
739
|
+
}
|
|
740
|
+
months = differenceInMonths(earlierDate_, laterDate_);
|
|
741
|
+
if (months < 12) {
|
|
742
|
+
const nearestMonth = Math.round(minutes / minutesInMonth);
|
|
743
|
+
return locale.formatDistance("xMonths", nearestMonth, localizeOptions);
|
|
744
|
+
} else {
|
|
745
|
+
const monthsSinceStartOfYear = months % 12;
|
|
746
|
+
const years = Math.trunc(months / 12);
|
|
747
|
+
if (monthsSinceStartOfYear < 3) {
|
|
748
|
+
return locale.formatDistance("aboutXYears", years, localizeOptions);
|
|
749
|
+
} else if (monthsSinceStartOfYear < 9) {
|
|
750
|
+
return locale.formatDistance("overXYears", years, localizeOptions);
|
|
751
|
+
} else {
|
|
752
|
+
return locale.formatDistance("almostXYears", years + 1, localizeOptions);
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
// ../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/formatDistanceToNow.js
|
|
758
|
+
function formatDistanceToNow(date, options) {
|
|
759
|
+
return formatDistance2(date, constructNow(date), options);
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
// src/logger/console.ts
|
|
763
|
+
var getLogFn = (logLevel = _chunkIRCFHYKZcjs.LogLevel.INFO, config = {}, _chalk = _chunkLOY6ICHZcjs.getChalk.call(void 0, )) => {
|
|
764
|
+
const colors = !_optionalChain([config, 'access', _16 => _16.colors, 'optionalAccess', _17 => _17.dark]) && !_optionalChain([config, 'access', _18 => _18.colors, 'optionalAccess', _19 => _19["base"]]) && !_optionalChain([config, 'access', _20 => _20.colors, 'optionalAccess', _21 => _21["base"], 'optionalAccess', _22 => _22.dark]) ? _chunkIKP3QKCZcjs.DEFAULT_COLOR_CONFIG : _optionalChain([config, 'access', _23 => _23.colors, 'optionalAccess', _24 => _24.dark]) && typeof config.colors.dark === "string" ? config.colors : _optionalChain([config, 'access', _25 => _25.colors, 'optionalAccess', _26 => _26["base"], 'optionalAccess', _27 => _27.dark]) && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : _optionalChain([config, 'access', _28 => _28.colors, 'optionalAccess', _29 => _29["base"]]) ? _optionalChain([config, 'access', _30 => _30.colors, 'optionalAccess', _31 => _31["base"]]) : _chunkIKP3QKCZcjs.DEFAULT_COLOR_CONFIG;
|
|
765
|
+
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || _chunkIRCFHYKZcjs.LogLevelLabel.INFO;
|
|
766
|
+
if (logLevel > _chunk4PX5UVANcjs.getLogLevel.call(void 0, configLogLevel) || logLevel <= _chunkIRCFHYKZcjs.LogLevel.SILENT || _chunk4PX5UVANcjs.getLogLevel.call(void 0, configLogLevel) <= _chunkIRCFHYKZcjs.LogLevel.SILENT) {
|
|
767
|
+
return (_) => {
|
|
768
|
+
};
|
|
769
|
+
}
|
|
770
|
+
if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.FATAL >= logLevel) {
|
|
771
|
+
return (message) => {
|
|
772
|
+
console.error(
|
|
773
|
+
`
|
|
774
|
+
${_chalk.gray(_chunkBN6MEGGYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(
|
|
775
|
+
_nullishCoalesce(colors.fatal, () => ( _chunkIKP3QKCZcjs.DEFAULT_COLOR_CONFIG.dark.fatal))
|
|
776
|
+
)(
|
|
777
|
+
`[${_chunkNSUIDUD7cjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.FATAL]} Fatal] `
|
|
778
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
779
|
+
`
|
|
780
|
+
);
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.ERROR >= logLevel) {
|
|
784
|
+
return (message) => {
|
|
785
|
+
console.error(
|
|
786
|
+
`
|
|
787
|
+
${_chalk.gray(_chunkBN6MEGGYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(
|
|
788
|
+
_nullishCoalesce(colors.danger, () => ( _chunkIKP3QKCZcjs.DEFAULT_COLOR_CONFIG.dark.danger))
|
|
789
|
+
)(
|
|
790
|
+
`[${_chunkNSUIDUD7cjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.ERROR]} Error] `
|
|
791
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
792
|
+
`
|
|
793
|
+
);
|
|
794
|
+
};
|
|
795
|
+
}
|
|
796
|
+
if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.WARN >= logLevel) {
|
|
797
|
+
return (message) => {
|
|
798
|
+
console.warn(
|
|
799
|
+
`
|
|
800
|
+
${_chalk.gray(_chunkBN6MEGGYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(
|
|
801
|
+
_nullishCoalesce(colors.warning, () => ( _chunkIKP3QKCZcjs.DEFAULT_COLOR_CONFIG.dark.warning))
|
|
802
|
+
)(
|
|
803
|
+
`[${_chunkNSUIDUD7cjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.WARN]} Warn] `
|
|
804
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
805
|
+
`
|
|
806
|
+
);
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.SUCCESS >= logLevel) {
|
|
810
|
+
return (message) => {
|
|
811
|
+
console.info(
|
|
812
|
+
`
|
|
813
|
+
${_chalk.gray(_chunkBN6MEGGYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(
|
|
814
|
+
_nullishCoalesce(colors.success, () => ( _chunkIKP3QKCZcjs.DEFAULT_COLOR_CONFIG.dark.success))
|
|
815
|
+
)(
|
|
816
|
+
`[${_chunkNSUIDUD7cjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.SUCCESS]} Success] `
|
|
817
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
818
|
+
`
|
|
819
|
+
);
|
|
820
|
+
};
|
|
821
|
+
}
|
|
822
|
+
if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.INFO >= logLevel) {
|
|
823
|
+
return (message) => {
|
|
824
|
+
console.info(
|
|
825
|
+
`
|
|
826
|
+
${_chalk.gray(_chunkBN6MEGGYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(
|
|
827
|
+
_nullishCoalesce(colors.info, () => ( _chunkIKP3QKCZcjs.DEFAULT_COLOR_CONFIG.dark.info))
|
|
828
|
+
)(
|
|
829
|
+
`[${_chunkNSUIDUD7cjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.INFO]} Info] `
|
|
830
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
831
|
+
`
|
|
832
|
+
);
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.DEBUG >= logLevel) {
|
|
836
|
+
return (message) => {
|
|
837
|
+
console.debug(
|
|
838
|
+
`
|
|
839
|
+
${_chalk.gray(_chunkBN6MEGGYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(
|
|
840
|
+
_nullishCoalesce(colors.debug, () => ( _chunkIKP3QKCZcjs.DEFAULT_COLOR_CONFIG.dark.debug))
|
|
841
|
+
)(
|
|
842
|
+
`[${_chunkNSUIDUD7cjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.DEBUG]} Debug] `
|
|
843
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
844
|
+
`
|
|
845
|
+
);
|
|
846
|
+
};
|
|
847
|
+
}
|
|
848
|
+
if (typeof logLevel === "number" && _chunkIRCFHYKZcjs.LogLevel.TRACE >= logLevel) {
|
|
849
|
+
return (message) => {
|
|
850
|
+
console.debug(
|
|
851
|
+
`
|
|
852
|
+
${_chalk.gray(_chunkBN6MEGGYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex("#bbbbbb")(
|
|
853
|
+
`[${_chunkNSUIDUD7cjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.TRACE]} Trace] `
|
|
854
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
855
|
+
`
|
|
856
|
+
);
|
|
857
|
+
};
|
|
858
|
+
}
|
|
859
|
+
return (message) => {
|
|
860
|
+
console.log(
|
|
861
|
+
`
|
|
862
|
+
${_chalk.gray(_chunkBN6MEGGYcjs.formatTimestamp.call(void 0, ))} ${_chalk.hex(
|
|
863
|
+
_nullishCoalesce(colors.brand, () => ( _chunkIKP3QKCZcjs.DEFAULT_COLOR_CONFIG.dark.brand))
|
|
864
|
+
)(
|
|
865
|
+
`[${_chunkNSUIDUD7cjs.CONSOLE_ICONS[_chunkIRCFHYKZcjs.LogLevelLabel.ALL]} System] `
|
|
866
|
+
)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
867
|
+
`
|
|
868
|
+
);
|
|
869
|
+
};
|
|
870
|
+
};
|
|
871
|
+
var writeFatal = (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.FATAL, config)(message);
|
|
872
|
+
var writeError = (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.ERROR, config)(message);
|
|
873
|
+
var writeWarning = (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.WARN, config)(message);
|
|
874
|
+
var writeInfo = (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.INFO, config)(message);
|
|
875
|
+
var writeSuccess = (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.SUCCESS, config)(message);
|
|
876
|
+
var writeDebug = (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.DEBUG, config)(message);
|
|
877
|
+
var writeTrace = (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.TRACE, config)(message);
|
|
878
|
+
var writeSystem = (message, config) => getLogFn(_chunkIRCFHYKZcjs.LogLevel.ALL, config)(message);
|
|
879
|
+
var getStopwatch = (name) => {
|
|
880
|
+
const start = /* @__PURE__ */ new Date();
|
|
881
|
+
return () => {
|
|
882
|
+
console.info(
|
|
883
|
+
`> \u23F1 The${name ? ` ${name}` : ""} process took ${formatDistanceToNow(
|
|
884
|
+
start,
|
|
885
|
+
{
|
|
886
|
+
includeSeconds: true
|
|
887
|
+
}
|
|
888
|
+
)} to complete`
|
|
889
|
+
);
|
|
890
|
+
};
|
|
891
|
+
};
|
|
892
|
+
var MAX_DEPTH = 6;
|
|
893
|
+
var formatLogMessage = (message, options = {}, depth = 0) => {
|
|
894
|
+
if (depth > MAX_DEPTH) {
|
|
895
|
+
return "<max depth>";
|
|
896
|
+
}
|
|
897
|
+
const prefix = _nullishCoalesce(options.prefix, () => ( "-"));
|
|
898
|
+
const skip = _nullishCoalesce(options.skip, () => ( []));
|
|
899
|
+
return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : Array.isArray(message) ? `
|
|
900
|
+
${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, { prefix: `${prefix}-`, skip }, depth + 1)}`).join("\n")}` : typeof message === "object" ? `
|
|
901
|
+
${Object.keys(message).filter((key) => !skip.includes(key)).map(
|
|
902
|
+
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(
|
|
903
|
+
message[key],
|
|
904
|
+
{ prefix: `${prefix}-`, skip },
|
|
905
|
+
depth + 1
|
|
906
|
+
) : message[key]}`
|
|
907
|
+
).join("\n")}` : message;
|
|
908
|
+
};
|
|
909
|
+
var _isFunction = (value) => {
|
|
910
|
+
try {
|
|
911
|
+
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _32 => _32.constructor]) && _optionalChain([value, 'optionalAccess', _33 => _33.call]) && _optionalChain([value, 'optionalAccess', _34 => _34.apply]));
|
|
912
|
+
} catch (e) {
|
|
913
|
+
return false;
|
|
914
|
+
}
|
|
915
|
+
};
|
|
916
|
+
var brandIcon = (config = {}, _chalk = _chunkLOY6ICHZcjs.getChalk.call(void 0, )) => _chalk.hex(_chunkIKP3QKCZcjs.getColor.call(void 0, "brand", config))("\u{1F5F2}");
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
exports.getLogFn = getLogFn; exports.writeFatal = writeFatal; exports.writeError = writeError; exports.writeWarning = writeWarning; exports.writeInfo = writeInfo; exports.writeSuccess = writeSuccess; exports.writeDebug = writeDebug; exports.writeTrace = writeTrace; exports.writeSystem = writeSystem; exports.getStopwatch = getStopwatch; exports.formatLogMessage = formatLogMessage; exports.brandIcon = brandIcon;
|