@nsshunt/stsutils 1.16.42 → 1.16.43
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/stsutils.mjs +15 -461
- package/dist/stsutils.mjs.map +1 -1
- package/dist/stsutils.umd.js +15 -461
- package/dist/stsutils.umd.js.map +1 -1
- package/package.json +1 -1
- package/types/winstonTransport.d.ts +2 -1
- package/types/winstonTransport.d.ts.map +1 -1
package/dist/stsutils.mjs
CHANGED
|
@@ -22,7 +22,7 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
22
22
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
23
23
|
return value;
|
|
24
24
|
};
|
|
25
|
-
var _options
|
|
25
|
+
var _options;
|
|
26
26
|
import Ajv from "ajv/dist/jtd.js";
|
|
27
27
|
import require$$0$2 from "util";
|
|
28
28
|
import require$$0 from "events";
|
|
@@ -175,7 +175,7 @@ function getDefaultExportFromCjs(x) {
|
|
|
175
175
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
176
176
|
}
|
|
177
177
|
var dist = { exports: {} };
|
|
178
|
-
var browser
|
|
178
|
+
var browser = deprecate;
|
|
179
179
|
function deprecate(fn, msg) {
|
|
180
180
|
if (config$1("noDeprecation")) {
|
|
181
181
|
return fn;
|
|
@@ -2235,7 +2235,7 @@ function require_stream_writable() {
|
|
|
2235
2235
|
var Duplex;
|
|
2236
2236
|
Writable.WritableState = WritableState;
|
|
2237
2237
|
var internalUtil = {
|
|
2238
|
-
deprecate: browser
|
|
2238
|
+
deprecate: browser
|
|
2239
2239
|
};
|
|
2240
2240
|
var Stream = streamBrowser;
|
|
2241
2241
|
var Buffer2 = require$$0$1.Buffer;
|
|
@@ -2980,474 +2980,28 @@ function requireDist() {
|
|
|
2980
2980
|
}
|
|
2981
2981
|
var distExports = requireDist();
|
|
2982
2982
|
const Transport = /* @__PURE__ */ getDefaultExportFromCjs(distExports);
|
|
2983
|
-
var browser = { exports: {} };
|
|
2984
|
-
var ms;
|
|
2985
|
-
var hasRequiredMs;
|
|
2986
|
-
function requireMs() {
|
|
2987
|
-
if (hasRequiredMs)
|
|
2988
|
-
return ms;
|
|
2989
|
-
hasRequiredMs = 1;
|
|
2990
|
-
var s = 1e3;
|
|
2991
|
-
var m = s * 60;
|
|
2992
|
-
var h = m * 60;
|
|
2993
|
-
var d = h * 24;
|
|
2994
|
-
var w = d * 7;
|
|
2995
|
-
var y = d * 365.25;
|
|
2996
|
-
ms = function(val, options) {
|
|
2997
|
-
options = options || {};
|
|
2998
|
-
var type = typeof val;
|
|
2999
|
-
if (type === "string" && val.length > 0) {
|
|
3000
|
-
return parse(val);
|
|
3001
|
-
} else if (type === "number" && isFinite(val)) {
|
|
3002
|
-
return options.long ? fmtLong(val) : fmtShort(val);
|
|
3003
|
-
}
|
|
3004
|
-
throw new Error(
|
|
3005
|
-
"val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
|
|
3006
|
-
);
|
|
3007
|
-
};
|
|
3008
|
-
function parse(str) {
|
|
3009
|
-
str = String(str);
|
|
3010
|
-
if (str.length > 100) {
|
|
3011
|
-
return;
|
|
3012
|
-
}
|
|
3013
|
-
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(
|
|
3014
|
-
str
|
|
3015
|
-
);
|
|
3016
|
-
if (!match) {
|
|
3017
|
-
return;
|
|
3018
|
-
}
|
|
3019
|
-
var n = parseFloat(match[1]);
|
|
3020
|
-
var type = (match[2] || "ms").toLowerCase();
|
|
3021
|
-
switch (type) {
|
|
3022
|
-
case "years":
|
|
3023
|
-
case "year":
|
|
3024
|
-
case "yrs":
|
|
3025
|
-
case "yr":
|
|
3026
|
-
case "y":
|
|
3027
|
-
return n * y;
|
|
3028
|
-
case "weeks":
|
|
3029
|
-
case "week":
|
|
3030
|
-
case "w":
|
|
3031
|
-
return n * w;
|
|
3032
|
-
case "days":
|
|
3033
|
-
case "day":
|
|
3034
|
-
case "d":
|
|
3035
|
-
return n * d;
|
|
3036
|
-
case "hours":
|
|
3037
|
-
case "hour":
|
|
3038
|
-
case "hrs":
|
|
3039
|
-
case "hr":
|
|
3040
|
-
case "h":
|
|
3041
|
-
return n * h;
|
|
3042
|
-
case "minutes":
|
|
3043
|
-
case "minute":
|
|
3044
|
-
case "mins":
|
|
3045
|
-
case "min":
|
|
3046
|
-
case "m":
|
|
3047
|
-
return n * m;
|
|
3048
|
-
case "seconds":
|
|
3049
|
-
case "second":
|
|
3050
|
-
case "secs":
|
|
3051
|
-
case "sec":
|
|
3052
|
-
case "s":
|
|
3053
|
-
return n * s;
|
|
3054
|
-
case "milliseconds":
|
|
3055
|
-
case "millisecond":
|
|
3056
|
-
case "msecs":
|
|
3057
|
-
case "msec":
|
|
3058
|
-
case "ms":
|
|
3059
|
-
return n;
|
|
3060
|
-
default:
|
|
3061
|
-
return void 0;
|
|
3062
|
-
}
|
|
3063
|
-
}
|
|
3064
|
-
function fmtShort(ms2) {
|
|
3065
|
-
var msAbs = Math.abs(ms2);
|
|
3066
|
-
if (msAbs >= d) {
|
|
3067
|
-
return Math.round(ms2 / d) + "d";
|
|
3068
|
-
}
|
|
3069
|
-
if (msAbs >= h) {
|
|
3070
|
-
return Math.round(ms2 / h) + "h";
|
|
3071
|
-
}
|
|
3072
|
-
if (msAbs >= m) {
|
|
3073
|
-
return Math.round(ms2 / m) + "m";
|
|
3074
|
-
}
|
|
3075
|
-
if (msAbs >= s) {
|
|
3076
|
-
return Math.round(ms2 / s) + "s";
|
|
3077
|
-
}
|
|
3078
|
-
return ms2 + "ms";
|
|
3079
|
-
}
|
|
3080
|
-
function fmtLong(ms2) {
|
|
3081
|
-
var msAbs = Math.abs(ms2);
|
|
3082
|
-
if (msAbs >= d) {
|
|
3083
|
-
return plural(ms2, msAbs, d, "day");
|
|
3084
|
-
}
|
|
3085
|
-
if (msAbs >= h) {
|
|
3086
|
-
return plural(ms2, msAbs, h, "hour");
|
|
3087
|
-
}
|
|
3088
|
-
if (msAbs >= m) {
|
|
3089
|
-
return plural(ms2, msAbs, m, "minute");
|
|
3090
|
-
}
|
|
3091
|
-
if (msAbs >= s) {
|
|
3092
|
-
return plural(ms2, msAbs, s, "second");
|
|
3093
|
-
}
|
|
3094
|
-
return ms2 + " ms";
|
|
3095
|
-
}
|
|
3096
|
-
function plural(ms2, msAbs, n, name) {
|
|
3097
|
-
var isPlural = msAbs >= n * 1.5;
|
|
3098
|
-
return Math.round(ms2 / n) + " " + name + (isPlural ? "s" : "");
|
|
3099
|
-
}
|
|
3100
|
-
return ms;
|
|
3101
|
-
}
|
|
3102
|
-
function setup(env) {
|
|
3103
|
-
createDebug.debug = createDebug;
|
|
3104
|
-
createDebug.default = createDebug;
|
|
3105
|
-
createDebug.coerce = coerce;
|
|
3106
|
-
createDebug.disable = disable;
|
|
3107
|
-
createDebug.enable = enable;
|
|
3108
|
-
createDebug.enabled = enabled;
|
|
3109
|
-
createDebug.humanize = requireMs();
|
|
3110
|
-
createDebug.destroy = destroy2;
|
|
3111
|
-
Object.keys(env).forEach((key) => {
|
|
3112
|
-
createDebug[key] = env[key];
|
|
3113
|
-
});
|
|
3114
|
-
createDebug.names = [];
|
|
3115
|
-
createDebug.skips = [];
|
|
3116
|
-
createDebug.formatters = {};
|
|
3117
|
-
function selectColor(namespace) {
|
|
3118
|
-
let hash = 0;
|
|
3119
|
-
for (let i = 0; i < namespace.length; i++) {
|
|
3120
|
-
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
3121
|
-
hash |= 0;
|
|
3122
|
-
}
|
|
3123
|
-
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
3124
|
-
}
|
|
3125
|
-
createDebug.selectColor = selectColor;
|
|
3126
|
-
function createDebug(namespace) {
|
|
3127
|
-
let prevTime;
|
|
3128
|
-
let enableOverride = null;
|
|
3129
|
-
let namespacesCache;
|
|
3130
|
-
let enabledCache;
|
|
3131
|
-
function debug(...args) {
|
|
3132
|
-
if (!debug.enabled) {
|
|
3133
|
-
return;
|
|
3134
|
-
}
|
|
3135
|
-
const self2 = debug;
|
|
3136
|
-
const curr = Number(/* @__PURE__ */ new Date());
|
|
3137
|
-
const ms2 = curr - (prevTime || curr);
|
|
3138
|
-
self2.diff = ms2;
|
|
3139
|
-
self2.prev = prevTime;
|
|
3140
|
-
self2.curr = curr;
|
|
3141
|
-
prevTime = curr;
|
|
3142
|
-
args[0] = createDebug.coerce(args[0]);
|
|
3143
|
-
if (typeof args[0] !== "string") {
|
|
3144
|
-
args.unshift("%O");
|
|
3145
|
-
}
|
|
3146
|
-
let index = 0;
|
|
3147
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
3148
|
-
if (match === "%%") {
|
|
3149
|
-
return "%";
|
|
3150
|
-
}
|
|
3151
|
-
index++;
|
|
3152
|
-
const formatter = createDebug.formatters[format];
|
|
3153
|
-
if (typeof formatter === "function") {
|
|
3154
|
-
const val = args[index];
|
|
3155
|
-
match = formatter.call(self2, val);
|
|
3156
|
-
args.splice(index, 1);
|
|
3157
|
-
index--;
|
|
3158
|
-
}
|
|
3159
|
-
return match;
|
|
3160
|
-
});
|
|
3161
|
-
createDebug.formatArgs.call(self2, args);
|
|
3162
|
-
const logFn = self2.log || createDebug.log;
|
|
3163
|
-
logFn.apply(self2, args);
|
|
3164
|
-
}
|
|
3165
|
-
debug.namespace = namespace;
|
|
3166
|
-
debug.useColors = createDebug.useColors();
|
|
3167
|
-
debug.color = createDebug.selectColor(namespace);
|
|
3168
|
-
debug.extend = extend;
|
|
3169
|
-
debug.destroy = createDebug.destroy;
|
|
3170
|
-
Object.defineProperty(debug, "enabled", {
|
|
3171
|
-
enumerable: true,
|
|
3172
|
-
configurable: false,
|
|
3173
|
-
get: () => {
|
|
3174
|
-
if (enableOverride !== null) {
|
|
3175
|
-
return enableOverride;
|
|
3176
|
-
}
|
|
3177
|
-
if (namespacesCache !== createDebug.namespaces) {
|
|
3178
|
-
namespacesCache = createDebug.namespaces;
|
|
3179
|
-
enabledCache = createDebug.enabled(namespace);
|
|
3180
|
-
}
|
|
3181
|
-
return enabledCache;
|
|
3182
|
-
},
|
|
3183
|
-
set: (v) => {
|
|
3184
|
-
enableOverride = v;
|
|
3185
|
-
}
|
|
3186
|
-
});
|
|
3187
|
-
if (typeof createDebug.init === "function") {
|
|
3188
|
-
createDebug.init(debug);
|
|
3189
|
-
}
|
|
3190
|
-
return debug;
|
|
3191
|
-
}
|
|
3192
|
-
function extend(namespace, delimiter) {
|
|
3193
|
-
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
3194
|
-
newDebug.log = this.log;
|
|
3195
|
-
return newDebug;
|
|
3196
|
-
}
|
|
3197
|
-
function enable(namespaces) {
|
|
3198
|
-
createDebug.save(namespaces);
|
|
3199
|
-
createDebug.namespaces = namespaces;
|
|
3200
|
-
createDebug.names = [];
|
|
3201
|
-
createDebug.skips = [];
|
|
3202
|
-
let i;
|
|
3203
|
-
const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
|
|
3204
|
-
const len = split.length;
|
|
3205
|
-
for (i = 0; i < len; i++) {
|
|
3206
|
-
if (!split[i]) {
|
|
3207
|
-
continue;
|
|
3208
|
-
}
|
|
3209
|
-
namespaces = split[i].replace(/\*/g, ".*?");
|
|
3210
|
-
if (namespaces[0] === "-") {
|
|
3211
|
-
createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
|
|
3212
|
-
} else {
|
|
3213
|
-
createDebug.names.push(new RegExp("^" + namespaces + "$"));
|
|
3214
|
-
}
|
|
3215
|
-
}
|
|
3216
|
-
}
|
|
3217
|
-
function disable() {
|
|
3218
|
-
const namespaces = [
|
|
3219
|
-
...createDebug.names.map(toNamespace),
|
|
3220
|
-
...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
|
|
3221
|
-
].join(",");
|
|
3222
|
-
createDebug.enable("");
|
|
3223
|
-
return namespaces;
|
|
3224
|
-
}
|
|
3225
|
-
function enabled(name) {
|
|
3226
|
-
if (name[name.length - 1] === "*") {
|
|
3227
|
-
return true;
|
|
3228
|
-
}
|
|
3229
|
-
let i;
|
|
3230
|
-
let len;
|
|
3231
|
-
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
3232
|
-
if (createDebug.skips[i].test(name)) {
|
|
3233
|
-
return false;
|
|
3234
|
-
}
|
|
3235
|
-
}
|
|
3236
|
-
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
|
3237
|
-
if (createDebug.names[i].test(name)) {
|
|
3238
|
-
return true;
|
|
3239
|
-
}
|
|
3240
|
-
}
|
|
3241
|
-
return false;
|
|
3242
|
-
}
|
|
3243
|
-
function toNamespace(regexp) {
|
|
3244
|
-
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
|
|
3245
|
-
}
|
|
3246
|
-
function coerce(val) {
|
|
3247
|
-
if (val instanceof Error) {
|
|
3248
|
-
return val.stack || val.message;
|
|
3249
|
-
}
|
|
3250
|
-
return val;
|
|
3251
|
-
}
|
|
3252
|
-
function destroy2() {
|
|
3253
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
3254
|
-
}
|
|
3255
|
-
createDebug.enable(createDebug.load());
|
|
3256
|
-
return createDebug;
|
|
3257
|
-
}
|
|
3258
|
-
var common = setup;
|
|
3259
|
-
(function(module, exports) {
|
|
3260
|
-
exports.formatArgs = formatArgs;
|
|
3261
|
-
exports.save = save;
|
|
3262
|
-
exports.load = load;
|
|
3263
|
-
exports.useColors = useColors;
|
|
3264
|
-
exports.storage = localstorage();
|
|
3265
|
-
exports.destroy = (() => {
|
|
3266
|
-
let warned = false;
|
|
3267
|
-
return () => {
|
|
3268
|
-
if (!warned) {
|
|
3269
|
-
warned = true;
|
|
3270
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
3271
|
-
}
|
|
3272
|
-
};
|
|
3273
|
-
})();
|
|
3274
|
-
exports.colors = [
|
|
3275
|
-
"#0000CC",
|
|
3276
|
-
"#0000FF",
|
|
3277
|
-
"#0033CC",
|
|
3278
|
-
"#0033FF",
|
|
3279
|
-
"#0066CC",
|
|
3280
|
-
"#0066FF",
|
|
3281
|
-
"#0099CC",
|
|
3282
|
-
"#0099FF",
|
|
3283
|
-
"#00CC00",
|
|
3284
|
-
"#00CC33",
|
|
3285
|
-
"#00CC66",
|
|
3286
|
-
"#00CC99",
|
|
3287
|
-
"#00CCCC",
|
|
3288
|
-
"#00CCFF",
|
|
3289
|
-
"#3300CC",
|
|
3290
|
-
"#3300FF",
|
|
3291
|
-
"#3333CC",
|
|
3292
|
-
"#3333FF",
|
|
3293
|
-
"#3366CC",
|
|
3294
|
-
"#3366FF",
|
|
3295
|
-
"#3399CC",
|
|
3296
|
-
"#3399FF",
|
|
3297
|
-
"#33CC00",
|
|
3298
|
-
"#33CC33",
|
|
3299
|
-
"#33CC66",
|
|
3300
|
-
"#33CC99",
|
|
3301
|
-
"#33CCCC",
|
|
3302
|
-
"#33CCFF",
|
|
3303
|
-
"#6600CC",
|
|
3304
|
-
"#6600FF",
|
|
3305
|
-
"#6633CC",
|
|
3306
|
-
"#6633FF",
|
|
3307
|
-
"#66CC00",
|
|
3308
|
-
"#66CC33",
|
|
3309
|
-
"#9900CC",
|
|
3310
|
-
"#9900FF",
|
|
3311
|
-
"#9933CC",
|
|
3312
|
-
"#9933FF",
|
|
3313
|
-
"#99CC00",
|
|
3314
|
-
"#99CC33",
|
|
3315
|
-
"#CC0000",
|
|
3316
|
-
"#CC0033",
|
|
3317
|
-
"#CC0066",
|
|
3318
|
-
"#CC0099",
|
|
3319
|
-
"#CC00CC",
|
|
3320
|
-
"#CC00FF",
|
|
3321
|
-
"#CC3300",
|
|
3322
|
-
"#CC3333",
|
|
3323
|
-
"#CC3366",
|
|
3324
|
-
"#CC3399",
|
|
3325
|
-
"#CC33CC",
|
|
3326
|
-
"#CC33FF",
|
|
3327
|
-
"#CC6600",
|
|
3328
|
-
"#CC6633",
|
|
3329
|
-
"#CC9900",
|
|
3330
|
-
"#CC9933",
|
|
3331
|
-
"#CCCC00",
|
|
3332
|
-
"#CCCC33",
|
|
3333
|
-
"#FF0000",
|
|
3334
|
-
"#FF0033",
|
|
3335
|
-
"#FF0066",
|
|
3336
|
-
"#FF0099",
|
|
3337
|
-
"#FF00CC",
|
|
3338
|
-
"#FF00FF",
|
|
3339
|
-
"#FF3300",
|
|
3340
|
-
"#FF3333",
|
|
3341
|
-
"#FF3366",
|
|
3342
|
-
"#FF3399",
|
|
3343
|
-
"#FF33CC",
|
|
3344
|
-
"#FF33FF",
|
|
3345
|
-
"#FF6600",
|
|
3346
|
-
"#FF6633",
|
|
3347
|
-
"#FF9900",
|
|
3348
|
-
"#FF9933",
|
|
3349
|
-
"#FFCC00",
|
|
3350
|
-
"#FFCC33"
|
|
3351
|
-
];
|
|
3352
|
-
function useColors() {
|
|
3353
|
-
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
3354
|
-
return true;
|
|
3355
|
-
}
|
|
3356
|
-
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
3357
|
-
return false;
|
|
3358
|
-
}
|
|
3359
|
-
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
3360
|
-
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
3361
|
-
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
3362
|
-
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
3363
|
-
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
3364
|
-
}
|
|
3365
|
-
function formatArgs(args) {
|
|
3366
|
-
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
|
|
3367
|
-
if (!this.useColors) {
|
|
3368
|
-
return;
|
|
3369
|
-
}
|
|
3370
|
-
const c = "color: " + this.color;
|
|
3371
|
-
args.splice(1, 0, c, "color: inherit");
|
|
3372
|
-
let index = 0;
|
|
3373
|
-
let lastC = 0;
|
|
3374
|
-
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
3375
|
-
if (match === "%%") {
|
|
3376
|
-
return;
|
|
3377
|
-
}
|
|
3378
|
-
index++;
|
|
3379
|
-
if (match === "%c") {
|
|
3380
|
-
lastC = index;
|
|
3381
|
-
}
|
|
3382
|
-
});
|
|
3383
|
-
args.splice(lastC, 0, c);
|
|
3384
|
-
}
|
|
3385
|
-
exports.log = console.debug || console.log || (() => {
|
|
3386
|
-
});
|
|
3387
|
-
function save(namespaces) {
|
|
3388
|
-
try {
|
|
3389
|
-
if (namespaces) {
|
|
3390
|
-
exports.storage.setItem("debug", namespaces);
|
|
3391
|
-
} else {
|
|
3392
|
-
exports.storage.removeItem("debug");
|
|
3393
|
-
}
|
|
3394
|
-
} catch (error) {
|
|
3395
|
-
}
|
|
3396
|
-
}
|
|
3397
|
-
function load() {
|
|
3398
|
-
let r;
|
|
3399
|
-
try {
|
|
3400
|
-
r = exports.storage.getItem("debug");
|
|
3401
|
-
} catch (error) {
|
|
3402
|
-
}
|
|
3403
|
-
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
3404
|
-
r = process.env.DEBUG;
|
|
3405
|
-
}
|
|
3406
|
-
return r;
|
|
3407
|
-
}
|
|
3408
|
-
function localstorage() {
|
|
3409
|
-
try {
|
|
3410
|
-
return localStorage;
|
|
3411
|
-
} catch (error) {
|
|
3412
|
-
}
|
|
3413
|
-
}
|
|
3414
|
-
module.exports = common(exports);
|
|
3415
|
-
const { formatters } = module.exports;
|
|
3416
|
-
formatters.j = function(v) {
|
|
3417
|
-
try {
|
|
3418
|
-
return JSON.stringify(v);
|
|
3419
|
-
} catch (error) {
|
|
3420
|
-
return "[UnexpectedJSONParseError]: " + error.message;
|
|
3421
|
-
}
|
|
3422
|
-
};
|
|
3423
|
-
})(browser, browser.exports);
|
|
3424
|
-
var browserExports = browser.exports;
|
|
3425
|
-
const debugModule = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
|
|
3426
2983
|
class STSWinstonTransport extends Transport {
|
|
3427
2984
|
constructor(opts) {
|
|
3428
2985
|
super(opts);
|
|
3429
|
-
//#debug: debugModule.Debugger;
|
|
3430
|
-
__privateAdd(this, _debug, void 0);
|
|
3431
2986
|
__publicField(this, "myopts");
|
|
3432
2987
|
this.myopts = opts;
|
|
3433
2988
|
}
|
|
2989
|
+
get debugger() {
|
|
2990
|
+
return this.myopts.debugger;
|
|
2991
|
+
}
|
|
2992
|
+
set debugger(newDebugger) {
|
|
2993
|
+
this.myopts.debugger = newDebugger;
|
|
2994
|
+
}
|
|
3434
2995
|
log(info, callback) {
|
|
3435
|
-
|
|
3436
|
-
if (
|
|
3437
|
-
|
|
3438
|
-
__privateSet(this, _debug, debugModule(`proc:${process.pid}:${this.myopts.stsContext}`));
|
|
3439
|
-
}
|
|
3440
|
-
__privateGet(this, _debug).call(this, info.message);
|
|
3441
|
-
if (this.myopts.debugger) {
|
|
3442
|
-
this.myopts.debugger(info.message);
|
|
3443
|
-
}
|
|
2996
|
+
if (info[Symbol.for("level")] == "debug") {
|
|
2997
|
+
if (this.myopts.debugger) {
|
|
2998
|
+
this.myopts.debugger(info.message);
|
|
3444
2999
|
}
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3000
|
+
}
|
|
3001
|
+
this.emit("logged", info);
|
|
3002
|
+
callback();
|
|
3448
3003
|
}
|
|
3449
3004
|
}
|
|
3450
|
-
_debug = new WeakMap();
|
|
3451
3005
|
var ModelDelimeter = /* @__PURE__ */ ((ModelDelimeter2) => {
|
|
3452
3006
|
ModelDelimeter2["ROOT"] = "_";
|
|
3453
3007
|
ModelDelimeter2["SEPERATOR"] = "|";
|