@mcesystems/tool-debug 1.0.41 → 1.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.browser.mjs +583 -0
- package/dist/index.browser.mjs.map +7 -0
- package/package.json +11 -2
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
// ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
|
|
28
|
+
var require_ms = __commonJS({
|
|
29
|
+
"../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports, module) {
|
|
30
|
+
var s = 1e3;
|
|
31
|
+
var m = s * 60;
|
|
32
|
+
var h = m * 60;
|
|
33
|
+
var d = h * 24;
|
|
34
|
+
var w = d * 7;
|
|
35
|
+
var y = d * 365.25;
|
|
36
|
+
module.exports = function(val, options) {
|
|
37
|
+
options = options || {};
|
|
38
|
+
var type = typeof val;
|
|
39
|
+
if (type === "string" && val.length > 0) {
|
|
40
|
+
return parse(val);
|
|
41
|
+
} else if (type === "number" && isFinite(val)) {
|
|
42
|
+
return options.long ? fmtLong(val) : fmtShort(val);
|
|
43
|
+
}
|
|
44
|
+
throw new Error(
|
|
45
|
+
"val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
function parse(str) {
|
|
49
|
+
str = String(str);
|
|
50
|
+
if (str.length > 100) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
54
|
+
str
|
|
55
|
+
);
|
|
56
|
+
if (!match) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
var n = parseFloat(match[1]);
|
|
60
|
+
var type = (match[2] || "ms").toLowerCase();
|
|
61
|
+
switch (type) {
|
|
62
|
+
case "years":
|
|
63
|
+
case "year":
|
|
64
|
+
case "yrs":
|
|
65
|
+
case "yr":
|
|
66
|
+
case "y":
|
|
67
|
+
return n * y;
|
|
68
|
+
case "weeks":
|
|
69
|
+
case "week":
|
|
70
|
+
case "w":
|
|
71
|
+
return n * w;
|
|
72
|
+
case "days":
|
|
73
|
+
case "day":
|
|
74
|
+
case "d":
|
|
75
|
+
return n * d;
|
|
76
|
+
case "hours":
|
|
77
|
+
case "hour":
|
|
78
|
+
case "hrs":
|
|
79
|
+
case "hr":
|
|
80
|
+
case "h":
|
|
81
|
+
return n * h;
|
|
82
|
+
case "minutes":
|
|
83
|
+
case "minute":
|
|
84
|
+
case "mins":
|
|
85
|
+
case "min":
|
|
86
|
+
case "m":
|
|
87
|
+
return n * m;
|
|
88
|
+
case "seconds":
|
|
89
|
+
case "second":
|
|
90
|
+
case "secs":
|
|
91
|
+
case "sec":
|
|
92
|
+
case "s":
|
|
93
|
+
return n * s;
|
|
94
|
+
case "milliseconds":
|
|
95
|
+
case "millisecond":
|
|
96
|
+
case "msecs":
|
|
97
|
+
case "msec":
|
|
98
|
+
case "ms":
|
|
99
|
+
return n;
|
|
100
|
+
default:
|
|
101
|
+
return void 0;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function fmtShort(ms) {
|
|
105
|
+
var msAbs = Math.abs(ms);
|
|
106
|
+
if (msAbs >= d) {
|
|
107
|
+
return Math.round(ms / d) + "d";
|
|
108
|
+
}
|
|
109
|
+
if (msAbs >= h) {
|
|
110
|
+
return Math.round(ms / h) + "h";
|
|
111
|
+
}
|
|
112
|
+
if (msAbs >= m) {
|
|
113
|
+
return Math.round(ms / m) + "m";
|
|
114
|
+
}
|
|
115
|
+
if (msAbs >= s) {
|
|
116
|
+
return Math.round(ms / s) + "s";
|
|
117
|
+
}
|
|
118
|
+
return ms + "ms";
|
|
119
|
+
}
|
|
120
|
+
function fmtLong(ms) {
|
|
121
|
+
var msAbs = Math.abs(ms);
|
|
122
|
+
if (msAbs >= d) {
|
|
123
|
+
return plural(ms, msAbs, d, "day");
|
|
124
|
+
}
|
|
125
|
+
if (msAbs >= h) {
|
|
126
|
+
return plural(ms, msAbs, h, "hour");
|
|
127
|
+
}
|
|
128
|
+
if (msAbs >= m) {
|
|
129
|
+
return plural(ms, msAbs, m, "minute");
|
|
130
|
+
}
|
|
131
|
+
if (msAbs >= s) {
|
|
132
|
+
return plural(ms, msAbs, s, "second");
|
|
133
|
+
}
|
|
134
|
+
return ms + " ms";
|
|
135
|
+
}
|
|
136
|
+
function plural(ms, msAbs, n, name) {
|
|
137
|
+
var isPlural = msAbs >= n * 1.5;
|
|
138
|
+
return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js
|
|
144
|
+
var require_common = __commonJS({
|
|
145
|
+
"../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js"(exports, module) {
|
|
146
|
+
function setup(env) {
|
|
147
|
+
createDebug2.debug = createDebug2;
|
|
148
|
+
createDebug2.default = createDebug2;
|
|
149
|
+
createDebug2.coerce = coerce;
|
|
150
|
+
createDebug2.disable = disable;
|
|
151
|
+
createDebug2.enable = enable;
|
|
152
|
+
createDebug2.enabled = enabled;
|
|
153
|
+
createDebug2.humanize = require_ms();
|
|
154
|
+
createDebug2.destroy = destroy;
|
|
155
|
+
Object.keys(env).forEach((key) => {
|
|
156
|
+
createDebug2[key] = env[key];
|
|
157
|
+
});
|
|
158
|
+
createDebug2.names = [];
|
|
159
|
+
createDebug2.skips = [];
|
|
160
|
+
createDebug2.formatters = {};
|
|
161
|
+
function selectColor(namespace) {
|
|
162
|
+
let hash = 0;
|
|
163
|
+
for (let i = 0; i < namespace.length; i++) {
|
|
164
|
+
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
165
|
+
hash |= 0;
|
|
166
|
+
}
|
|
167
|
+
return createDebug2.colors[Math.abs(hash) % createDebug2.colors.length];
|
|
168
|
+
}
|
|
169
|
+
createDebug2.selectColor = selectColor;
|
|
170
|
+
function createDebug2(namespace) {
|
|
171
|
+
let prevTime;
|
|
172
|
+
let enableOverride = null;
|
|
173
|
+
let namespacesCache;
|
|
174
|
+
let enabledCache;
|
|
175
|
+
function debug(...args) {
|
|
176
|
+
if (!debug.enabled) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
const self = debug;
|
|
180
|
+
const curr = Number(/* @__PURE__ */ new Date());
|
|
181
|
+
const ms = curr - (prevTime || curr);
|
|
182
|
+
self.diff = ms;
|
|
183
|
+
self.prev = prevTime;
|
|
184
|
+
self.curr = curr;
|
|
185
|
+
prevTime = curr;
|
|
186
|
+
args[0] = createDebug2.coerce(args[0]);
|
|
187
|
+
if (typeof args[0] !== "string") {
|
|
188
|
+
args.unshift("%O");
|
|
189
|
+
}
|
|
190
|
+
let index = 0;
|
|
191
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
192
|
+
if (match === "%%") {
|
|
193
|
+
return "%";
|
|
194
|
+
}
|
|
195
|
+
index++;
|
|
196
|
+
const formatter = createDebug2.formatters[format];
|
|
197
|
+
if (typeof formatter === "function") {
|
|
198
|
+
const val = args[index];
|
|
199
|
+
match = formatter.call(self, val);
|
|
200
|
+
args.splice(index, 1);
|
|
201
|
+
index--;
|
|
202
|
+
}
|
|
203
|
+
return match;
|
|
204
|
+
});
|
|
205
|
+
createDebug2.formatArgs.call(self, args);
|
|
206
|
+
const logFn = self.log || createDebug2.log;
|
|
207
|
+
logFn.apply(self, args);
|
|
208
|
+
}
|
|
209
|
+
debug.namespace = namespace;
|
|
210
|
+
debug.useColors = createDebug2.useColors();
|
|
211
|
+
debug.color = createDebug2.selectColor(namespace);
|
|
212
|
+
debug.extend = extend;
|
|
213
|
+
debug.destroy = createDebug2.destroy;
|
|
214
|
+
Object.defineProperty(debug, "enabled", {
|
|
215
|
+
enumerable: true,
|
|
216
|
+
configurable: false,
|
|
217
|
+
get: () => {
|
|
218
|
+
if (enableOverride !== null) {
|
|
219
|
+
return enableOverride;
|
|
220
|
+
}
|
|
221
|
+
if (namespacesCache !== createDebug2.namespaces) {
|
|
222
|
+
namespacesCache = createDebug2.namespaces;
|
|
223
|
+
enabledCache = createDebug2.enabled(namespace);
|
|
224
|
+
}
|
|
225
|
+
return enabledCache;
|
|
226
|
+
},
|
|
227
|
+
set: (v) => {
|
|
228
|
+
enableOverride = v;
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
if (typeof createDebug2.init === "function") {
|
|
232
|
+
createDebug2.init(debug);
|
|
233
|
+
}
|
|
234
|
+
return debug;
|
|
235
|
+
}
|
|
236
|
+
function extend(namespace, delimiter) {
|
|
237
|
+
const newDebug = createDebug2(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
238
|
+
newDebug.log = this.log;
|
|
239
|
+
return newDebug;
|
|
240
|
+
}
|
|
241
|
+
function enable(namespaces) {
|
|
242
|
+
createDebug2.save(namespaces);
|
|
243
|
+
createDebug2.namespaces = namespaces;
|
|
244
|
+
createDebug2.names = [];
|
|
245
|
+
createDebug2.skips = [];
|
|
246
|
+
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
247
|
+
for (const ns of split) {
|
|
248
|
+
if (ns[0] === "-") {
|
|
249
|
+
createDebug2.skips.push(ns.slice(1));
|
|
250
|
+
} else {
|
|
251
|
+
createDebug2.names.push(ns);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
function matchesTemplate(search, template) {
|
|
256
|
+
let searchIndex = 0;
|
|
257
|
+
let templateIndex = 0;
|
|
258
|
+
let starIndex = -1;
|
|
259
|
+
let matchIndex = 0;
|
|
260
|
+
while (searchIndex < search.length) {
|
|
261
|
+
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
262
|
+
if (template[templateIndex] === "*") {
|
|
263
|
+
starIndex = templateIndex;
|
|
264
|
+
matchIndex = searchIndex;
|
|
265
|
+
templateIndex++;
|
|
266
|
+
} else {
|
|
267
|
+
searchIndex++;
|
|
268
|
+
templateIndex++;
|
|
269
|
+
}
|
|
270
|
+
} else if (starIndex !== -1) {
|
|
271
|
+
templateIndex = starIndex + 1;
|
|
272
|
+
matchIndex++;
|
|
273
|
+
searchIndex = matchIndex;
|
|
274
|
+
} else {
|
|
275
|
+
return false;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
279
|
+
templateIndex++;
|
|
280
|
+
}
|
|
281
|
+
return templateIndex === template.length;
|
|
282
|
+
}
|
|
283
|
+
function disable() {
|
|
284
|
+
const namespaces = [
|
|
285
|
+
...createDebug2.names,
|
|
286
|
+
...createDebug2.skips.map((namespace) => "-" + namespace)
|
|
287
|
+
].join(",");
|
|
288
|
+
createDebug2.enable("");
|
|
289
|
+
return namespaces;
|
|
290
|
+
}
|
|
291
|
+
function enabled(name) {
|
|
292
|
+
for (const skip of createDebug2.skips) {
|
|
293
|
+
if (matchesTemplate(name, skip)) {
|
|
294
|
+
return false;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
for (const ns of createDebug2.names) {
|
|
298
|
+
if (matchesTemplate(name, ns)) {
|
|
299
|
+
return true;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
return false;
|
|
303
|
+
}
|
|
304
|
+
function coerce(val) {
|
|
305
|
+
if (val instanceof Error) {
|
|
306
|
+
return val.stack || val.message;
|
|
307
|
+
}
|
|
308
|
+
return val;
|
|
309
|
+
}
|
|
310
|
+
function destroy() {
|
|
311
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
312
|
+
}
|
|
313
|
+
createDebug2.enable(createDebug2.load());
|
|
314
|
+
return createDebug2;
|
|
315
|
+
}
|
|
316
|
+
module.exports = setup;
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js
|
|
321
|
+
var require_browser = __commonJS({
|
|
322
|
+
"../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js"(exports, module) {
|
|
323
|
+
exports.formatArgs = formatArgs;
|
|
324
|
+
exports.save = save;
|
|
325
|
+
exports.load = load;
|
|
326
|
+
exports.useColors = useColors;
|
|
327
|
+
exports.storage = localstorage();
|
|
328
|
+
exports.destroy = /* @__PURE__ */ (() => {
|
|
329
|
+
let warned = false;
|
|
330
|
+
return () => {
|
|
331
|
+
if (!warned) {
|
|
332
|
+
warned = true;
|
|
333
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
})();
|
|
337
|
+
exports.colors = [
|
|
338
|
+
"#0000CC",
|
|
339
|
+
"#0000FF",
|
|
340
|
+
"#0033CC",
|
|
341
|
+
"#0033FF",
|
|
342
|
+
"#0066CC",
|
|
343
|
+
"#0066FF",
|
|
344
|
+
"#0099CC",
|
|
345
|
+
"#0099FF",
|
|
346
|
+
"#00CC00",
|
|
347
|
+
"#00CC33",
|
|
348
|
+
"#00CC66",
|
|
349
|
+
"#00CC99",
|
|
350
|
+
"#00CCCC",
|
|
351
|
+
"#00CCFF",
|
|
352
|
+
"#3300CC",
|
|
353
|
+
"#3300FF",
|
|
354
|
+
"#3333CC",
|
|
355
|
+
"#3333FF",
|
|
356
|
+
"#3366CC",
|
|
357
|
+
"#3366FF",
|
|
358
|
+
"#3399CC",
|
|
359
|
+
"#3399FF",
|
|
360
|
+
"#33CC00",
|
|
361
|
+
"#33CC33",
|
|
362
|
+
"#33CC66",
|
|
363
|
+
"#33CC99",
|
|
364
|
+
"#33CCCC",
|
|
365
|
+
"#33CCFF",
|
|
366
|
+
"#6600CC",
|
|
367
|
+
"#6600FF",
|
|
368
|
+
"#6633CC",
|
|
369
|
+
"#6633FF",
|
|
370
|
+
"#66CC00",
|
|
371
|
+
"#66CC33",
|
|
372
|
+
"#9900CC",
|
|
373
|
+
"#9900FF",
|
|
374
|
+
"#9933CC",
|
|
375
|
+
"#9933FF",
|
|
376
|
+
"#99CC00",
|
|
377
|
+
"#99CC33",
|
|
378
|
+
"#CC0000",
|
|
379
|
+
"#CC0033",
|
|
380
|
+
"#CC0066",
|
|
381
|
+
"#CC0099",
|
|
382
|
+
"#CC00CC",
|
|
383
|
+
"#CC00FF",
|
|
384
|
+
"#CC3300",
|
|
385
|
+
"#CC3333",
|
|
386
|
+
"#CC3366",
|
|
387
|
+
"#CC3399",
|
|
388
|
+
"#CC33CC",
|
|
389
|
+
"#CC33FF",
|
|
390
|
+
"#CC6600",
|
|
391
|
+
"#CC6633",
|
|
392
|
+
"#CC9900",
|
|
393
|
+
"#CC9933",
|
|
394
|
+
"#CCCC00",
|
|
395
|
+
"#CCCC33",
|
|
396
|
+
"#FF0000",
|
|
397
|
+
"#FF0033",
|
|
398
|
+
"#FF0066",
|
|
399
|
+
"#FF0099",
|
|
400
|
+
"#FF00CC",
|
|
401
|
+
"#FF00FF",
|
|
402
|
+
"#FF3300",
|
|
403
|
+
"#FF3333",
|
|
404
|
+
"#FF3366",
|
|
405
|
+
"#FF3399",
|
|
406
|
+
"#FF33CC",
|
|
407
|
+
"#FF33FF",
|
|
408
|
+
"#FF6600",
|
|
409
|
+
"#FF6633",
|
|
410
|
+
"#FF9900",
|
|
411
|
+
"#FF9933",
|
|
412
|
+
"#FFCC00",
|
|
413
|
+
"#FFCC33"
|
|
414
|
+
];
|
|
415
|
+
function useColors() {
|
|
416
|
+
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
417
|
+
return true;
|
|
418
|
+
}
|
|
419
|
+
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
420
|
+
return false;
|
|
421
|
+
}
|
|
422
|
+
let m;
|
|
423
|
+
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
424
|
+
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
425
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
426
|
+
typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
427
|
+
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
428
|
+
}
|
|
429
|
+
function formatArgs(args) {
|
|
430
|
+
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
|
|
431
|
+
if (!this.useColors) {
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
const c = "color: " + this.color;
|
|
435
|
+
args.splice(1, 0, c, "color: inherit");
|
|
436
|
+
let index = 0;
|
|
437
|
+
let lastC = 0;
|
|
438
|
+
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
439
|
+
if (match === "%%") {
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
index++;
|
|
443
|
+
if (match === "%c") {
|
|
444
|
+
lastC = index;
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
args.splice(lastC, 0, c);
|
|
448
|
+
}
|
|
449
|
+
exports.log = console.debug || console.log || (() => {
|
|
450
|
+
});
|
|
451
|
+
function save(namespaces) {
|
|
452
|
+
try {
|
|
453
|
+
if (namespaces) {
|
|
454
|
+
exports.storage.setItem("debug", namespaces);
|
|
455
|
+
} else {
|
|
456
|
+
exports.storage.removeItem("debug");
|
|
457
|
+
}
|
|
458
|
+
} catch (error) {
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
function load() {
|
|
462
|
+
let r;
|
|
463
|
+
try {
|
|
464
|
+
r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
|
|
465
|
+
} catch (error) {
|
|
466
|
+
}
|
|
467
|
+
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
468
|
+
r = process.env.DEBUG;
|
|
469
|
+
}
|
|
470
|
+
return r;
|
|
471
|
+
}
|
|
472
|
+
function localstorage() {
|
|
473
|
+
try {
|
|
474
|
+
return localStorage;
|
|
475
|
+
} catch (error) {
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
module.exports = require_common()(exports);
|
|
479
|
+
var { formatters } = module.exports;
|
|
480
|
+
formatters.j = function(v) {
|
|
481
|
+
try {
|
|
482
|
+
return JSON.stringify(v);
|
|
483
|
+
} catch (error) {
|
|
484
|
+
return "[UnexpectedJSONParseError]: " + error.message;
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
|
|
490
|
+
// src/debug.ts
|
|
491
|
+
var import_debug = __toESM(require_browser());
|
|
492
|
+
var logInfo = (0, import_debug.default)("info");
|
|
493
|
+
var logTask = (0, import_debug.default)("task");
|
|
494
|
+
var logError = (0, import_debug.default)("error");
|
|
495
|
+
var logDetail = (0, import_debug.default)("detail");
|
|
496
|
+
function logNamespace(namespace) {
|
|
497
|
+
logInfo.namespace = `INFO:${namespace}`;
|
|
498
|
+
logTask.namespace = `TASK:${namespace}`;
|
|
499
|
+
logError.namespace = `ERROR:${namespace}`;
|
|
500
|
+
logDetail.namespace = `DETAIL:${namespace}`;
|
|
501
|
+
logInfo.color = "45";
|
|
502
|
+
logTask.color = "40";
|
|
503
|
+
logError.color = "160";
|
|
504
|
+
logDetail.color = "240";
|
|
505
|
+
}
|
|
506
|
+
function logDataDetail(data, prefix = "") {
|
|
507
|
+
if (data === null || data === void 0) {
|
|
508
|
+
logDetail(`${prefix}<null or undefined>`);
|
|
509
|
+
return;
|
|
510
|
+
}
|
|
511
|
+
if (typeof data !== "object") {
|
|
512
|
+
logDetail(`${prefix}${String(data)}`);
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
const keys = Object.keys(data);
|
|
516
|
+
for (const key of keys) {
|
|
517
|
+
const value = data[key];
|
|
518
|
+
if (value === null || value === void 0) {
|
|
519
|
+
logDetail(`${prefix}${key}: <${value === null ? "null" : "undefined"}>`);
|
|
520
|
+
} else if (typeof value === "object") {
|
|
521
|
+
logDetail(`${prefix}${key}:`);
|
|
522
|
+
logDataDetail(value, `${prefix} `);
|
|
523
|
+
} else {
|
|
524
|
+
logDetail(`${prefix}${key}: ${value}`);
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
function logHeader(title) {
|
|
529
|
+
logInfo("=".repeat(80));
|
|
530
|
+
logInfo(title);
|
|
531
|
+
logInfo("=".repeat(80));
|
|
532
|
+
}
|
|
533
|
+
function logDataObject(title, ...args) {
|
|
534
|
+
var _a;
|
|
535
|
+
const stack = ((_a = new Error().stack) == null ? void 0 : _a.split("\n")[2]) || "";
|
|
536
|
+
const stackMatch = stack.match(/\((.*):(\d+):(\d+)\)$/) || stack.match(/at (.*):(\d+):(\d+)$/);
|
|
537
|
+
let callerDetails = "";
|
|
538
|
+
if (stackMatch) {
|
|
539
|
+
const functionMatch = stack.match(/at (.+) \(/);
|
|
540
|
+
const functionName = functionMatch ? functionMatch[1] : "<anonymous>";
|
|
541
|
+
callerDetails = `${functionName}`;
|
|
542
|
+
}
|
|
543
|
+
logInfo("=".repeat(80));
|
|
544
|
+
logInfo(
|
|
545
|
+
`${" ".repeat(Math.max(0, 40 - (title.length + callerDetails.length) / 2 - 2))} *${title}* ${callerDetails}`
|
|
546
|
+
);
|
|
547
|
+
for (const arg of args) {
|
|
548
|
+
logDetail("");
|
|
549
|
+
logDataDetail(arg);
|
|
550
|
+
logDetail("");
|
|
551
|
+
}
|
|
552
|
+
logInfo("=".repeat(80));
|
|
553
|
+
}
|
|
554
|
+
function logErrorObject(error, extraDetails) {
|
|
555
|
+
if (error instanceof Error) {
|
|
556
|
+
logError("=".repeat(80));
|
|
557
|
+
logError("Error Message:");
|
|
558
|
+
extraDetails && logError(extraDetails);
|
|
559
|
+
logError(error.message);
|
|
560
|
+
logError("Error Stack:");
|
|
561
|
+
logError(error.stack);
|
|
562
|
+
logError("");
|
|
563
|
+
logError("=".repeat(80));
|
|
564
|
+
} else {
|
|
565
|
+
logError(error);
|
|
566
|
+
logError("=".repeat(80));
|
|
567
|
+
logError("Error Message:");
|
|
568
|
+
extraDetails && logError(extraDetails);
|
|
569
|
+
logError(String(error));
|
|
570
|
+
logError("=".repeat(80));
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
export {
|
|
574
|
+
logDataObject,
|
|
575
|
+
logDetail,
|
|
576
|
+
logError,
|
|
577
|
+
logErrorObject,
|
|
578
|
+
logHeader,
|
|
579
|
+
logInfo,
|
|
580
|
+
logNamespace,
|
|
581
|
+
logTask
|
|
582
|
+
};
|
|
583
|
+
//# sourceMappingURL=index.browser.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js", "../../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js", "../../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js", "../src/debug.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n", "\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n", "/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n", "import createDebug from \"debug\";\r\n\r\nexport const logInfo = createDebug(\"info\");\r\nexport const logTask = createDebug(\"task\");\r\nexport const logError = createDebug(\"error\");\r\nexport const logDetail = createDebug(\"detail\");\r\n\r\nexport function logNamespace(namespace: string) {\r\n\tlogInfo.namespace = `INFO:${namespace}`;\r\n\tlogTask.namespace = `TASK:${namespace}`;\r\n\tlogError.namespace = `ERROR:${namespace}`;\r\n\tlogDetail.namespace = `DETAIL:${namespace}`;\r\n\r\n\tlogInfo.color = \"45\";\r\n\tlogTask.color = \"40\";\r\n\tlogError.color = \"160\";\r\n\tlogDetail.color = \"240\";\r\n}\r\n\r\nfunction logDataDetail(data: Record<string, unknown>, prefix = \"\") {\r\n\tif (data === null || data === undefined) {\r\n\t\tlogDetail(`${prefix}<null or undefined>`);\r\n\t\treturn;\r\n\t}\r\n\tif (typeof data !== \"object\") {\r\n\t\tlogDetail(`${prefix}${String(data)}`);\r\n\t\treturn;\r\n\t}\r\n\tconst keys = Object.keys(data);\r\n\tfor (const key of keys) {\r\n\t\tconst value = data[key];\r\n\t\tif (value === null || value === undefined) {\r\n\t\t\tlogDetail(`${prefix}${key}: <${value === null ? \"null\" : \"undefined\"}>`);\r\n\t\t} else if (typeof value === \"object\") {\r\n\t\t\tlogDetail(`${prefix}${key}:`);\r\n\t\t\tlogDataDetail(value as Record<string, unknown>, `${prefix} `);\r\n\t\t} else {\r\n\t\t\tlogDetail(`${prefix}${key}: ${value}`);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport function logHeader(title: string) {\r\n\tlogInfo(\"=\".repeat(80));\r\n\tlogInfo(title);\r\n\tlogInfo(\"=\".repeat(80));\r\n}\r\n\r\nexport function logDataObject(title: string, ...args: Record<string, unknown>[]) {\r\n\tconst stack = new Error().stack?.split(\"\\n\")[2] || \"\";\r\n\tconst stackMatch = stack.match(/\\((.*):(\\d+):(\\d+)\\)$/) || stack.match(/at (.*):(\\d+):(\\d+)$/);\r\n\tlet callerDetails = \"\";\r\n\tif (stackMatch) {\r\n\t\tconst functionMatch = stack.match(/at (.+) \\(/);\r\n\t\tconst functionName = functionMatch ? functionMatch[1] : \"<anonymous>\";\r\n\t\tcallerDetails = `${functionName}`;\r\n\t}\r\n\tlogInfo(\"=\".repeat(80));\r\n\tlogInfo(\r\n\t\t`${\" \".repeat(Math.max(0, 40 - (title.length + callerDetails.length) / 2 - 2))} *${title}* ${callerDetails}`\r\n\t);\r\n\tfor (const arg of args) {\r\n\t\tlogDetail(\"\");\r\n\t\tlogDataDetail(arg);\r\n\t\tlogDetail(\"\");\r\n\t}\r\n\tlogInfo(\"=\".repeat(80));\r\n}\r\n\r\nexport function logErrorObject(error: unknown, extraDetails?: string) {\r\n\tif (error instanceof Error) {\r\n\t\tlogError(\"=\".repeat(80));\r\n\t\tlogError(\"Error Message:\");\r\n\t\textraDetails && logError(extraDetails);\r\n\t\tlogError(error.message);\r\n\t\tlogError(\"Error Stack:\");\r\n\t\tlogError(error.stack);\r\n\t\tlogError(\"\");\r\n\t\tlogError(\"=\".repeat(80));\r\n\t} else {\r\n\t\tlogError(error);\r\n\t\tlogError(\"=\".repeat(80));\r\n\t\tlogError(\"Error Message:\");\r\n\t\textraDetails && logError(extraDetails);\r\n\t\tlogError(String(error));\r\n\t\tlogError(\"=\".repeat(80));\r\n\t}\r\n}\r\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAIA,QAAI,IAAI;AACR,QAAI,IAAI,IAAI;AACZ,QAAI,IAAI,IAAI;AACZ,QAAI,IAAI,IAAI;AACZ,QAAI,IAAI,IAAI;AACZ,QAAI,IAAI,IAAI;AAgBZ,WAAO,UAAU,SAAU,KAAK,SAAS;AACvC,gBAAU,WAAW,CAAC;AACtB,UAAI,OAAO,OAAO;AAClB,UAAI,SAAS,YAAY,IAAI,SAAS,GAAG;AACvC,eAAO,MAAM,GAAG;AAAA,MAClB,WAAW,SAAS,YAAY,SAAS,GAAG,GAAG;AAC7C,eAAO,QAAQ,OAAO,QAAQ,GAAG,IAAI,SAAS,GAAG;AAAA,MACnD;AACA,YAAM,IAAI;AAAA,QACR,0DACE,KAAK,UAAU,GAAG;AAAA,MACtB;AAAA,IACF;AAUA,aAAS,MAAM,KAAK;AAClB,YAAM,OAAO,GAAG;AAChB,UAAI,IAAI,SAAS,KAAK;AACpB;AAAA,MACF;AACA,UAAI,QAAQ,mIAAmI;AAAA,QAC7I;AAAA,MACF;AACA,UAAI,CAAC,OAAO;AACV;AAAA,MACF;AACA,UAAI,IAAI,WAAW,MAAM,CAAC,CAAC;AAC3B,UAAI,QAAQ,MAAM,CAAC,KAAK,MAAM,YAAY;AAC1C,cAAQ,MAAM;AAAA,QACZ,KAAK;AAAA,QACL,KAAK;AAAA,QACL,KAAK;AAAA,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AAA,EACxB,OAAO;AACN,aAAS,KAAK;AACd,aAAS,IAAI,OAAO,EAAE,CAAC;AACvB,aAAS,gBAAgB;AACzB,oBAAgB,SAAS,YAAY;AACrC,aAAS,OAAO,KAAK,CAAC;AACtB,aAAS,IAAI,OAAO,EAAE,CAAC;AAAA,EACxB;AACD;",
|
|
6
|
+
"names": ["createDebug", "createDebug"]
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcesystems/tool-debug",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.42",
|
|
4
4
|
"description": "Tool debug toolkit for device management",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -8,8 +8,17 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/types/index.d.ts",
|
|
11
|
+
"browser": {
|
|
12
|
+
"import": "./dist/index.browser.mjs",
|
|
13
|
+
"require": "./dist/index.browser.mjs"
|
|
14
|
+
},
|
|
15
|
+
"node": {
|
|
16
|
+
"import": "./dist/index.mjs",
|
|
17
|
+
"require": "./dist/index.js"
|
|
18
|
+
},
|
|
11
19
|
"import": "./dist/index.mjs",
|
|
12
|
-
"require": "./dist/index.js"
|
|
20
|
+
"require": "./dist/index.js",
|
|
21
|
+
"default": "./dist/index.mjs"
|
|
13
22
|
}
|
|
14
23
|
},
|
|
15
24
|
"keywords": [
|