vitest 0.12.6 → 0.12.9
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/LICENSE.md +0 -72
- package/dist/{chunk-api-setup.02588d9f.js → chunk-api-setup.010a6158.js} +5 -4
- package/dist/{chunk-constants.7180775c.js → chunk-constants.9e9c5c75.js} +1 -1
- package/dist/{chunk-defaults.9e0c233e.js → chunk-defaults.0fce304d.js} +1 -1
- package/dist/{chunk-install-pkg.078f5345.js → chunk-install-pkg.73b84ae1.js} +9 -11
- package/dist/chunk-integrations-globals.fda74a73.js +26 -0
- package/dist/{chunk-magic-string.d5e0e473.js → chunk-magic-string.41232190.js} +0 -4
- package/dist/{chunk-runtime-chain.5cae775c.js → chunk-runtime-chain.67ecb3a0.js} +24 -23
- package/dist/{chunk-runtime-mocker.43db6608.js → chunk-runtime-mocker.f99f69c3.js} +4 -4
- package/dist/{chunk-runtime-rpc.ad208eea.js → chunk-runtime-rpc.5050afd6.js} +1 -1
- package/dist/{chunk-utils-global.29e8a0a3.js → chunk-utils-global.2529a727.js} +8 -8
- package/dist/{chunk-utils-timers.64f2cbe8.js → chunk-utils-timers.b1b3dfa6.js} +1 -1
- package/dist/{chunk-vite-node-externalize.35ad761d.js → chunk-vite-node-externalize.42b0363f.js} +57 -43
- package/dist/{chunk-vite-node-utils.26c328fa.js → chunk-vite-node-utils.317f59c6.js} +8 -1064
- package/dist/cli.js +11 -9
- package/dist/config.d.ts +6 -3
- package/dist/entry.js +7 -6
- package/dist/index.d.ts +248 -251
- package/dist/index.js +5 -4
- package/dist/node.d.ts +215 -0
- package/dist/node.js +13 -11
- package/dist/vendor-_commonjsHelpers.addc3445.js +3 -0
- package/dist/{vendor-entry.5c1e6d94.js → vendor-entry.e4d01a65.js} +29 -85
- package/dist/{vendor-index.3ff91c47.js → vendor-index.40be925a.js} +5 -5
- package/dist/worker.js +6 -5
- package/package.json +8 -7
- package/dist/chunk-integrations-globals.cf24723d.js +0 -25
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { builtinModules, createRequire } from 'module';
|
|
2
2
|
import { pathToFileURL, fileURLToPath as fileURLToPath$2, URL as URL$1 } from 'url';
|
|
3
3
|
import vm from 'vm';
|
|
4
|
-
import {
|
|
4
|
+
import { k as isAbsolute$2, h as resolve, j as join$2, D as extname$2, d as dirname$2 } from './chunk-utils-global.2529a727.js';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import fs, { realpathSync, statSync, Stats, promises, existsSync } from 'fs';
|
|
7
7
|
import assert from 'assert';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import { format as format$2, inspect } from 'util';
|
|
9
|
+
import createDebug from 'debug';
|
|
10
10
|
|
|
11
11
|
/*---------------------------------------------------------------------------------------------
|
|
12
12
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -8841,1069 +8841,13 @@ async function isValidNodeImport(id, _opts = {}) {
|
|
|
8841
8841
|
return hasCJSSyntax(code) || !hasESMSyntax(code);
|
|
8842
8842
|
}
|
|
8843
8843
|
|
|
8844
|
-
var src = {exports: {}};
|
|
8845
|
-
|
|
8846
|
-
var browser$1 = {exports: {}};
|
|
8847
|
-
|
|
8848
|
-
/**
|
|
8849
|
-
* Helpers.
|
|
8850
|
-
*/
|
|
8851
|
-
|
|
8852
|
-
var ms;
|
|
8853
|
-
var hasRequiredMs;
|
|
8854
|
-
|
|
8855
|
-
function requireMs () {
|
|
8856
|
-
if (hasRequiredMs) return ms;
|
|
8857
|
-
hasRequiredMs = 1;
|
|
8858
|
-
var s = 1000;
|
|
8859
|
-
var m = s * 60;
|
|
8860
|
-
var h = m * 60;
|
|
8861
|
-
var d = h * 24;
|
|
8862
|
-
var w = d * 7;
|
|
8863
|
-
var y = d * 365.25;
|
|
8864
|
-
|
|
8865
|
-
/**
|
|
8866
|
-
* Parse or format the given `val`.
|
|
8867
|
-
*
|
|
8868
|
-
* Options:
|
|
8869
|
-
*
|
|
8870
|
-
* - `long` verbose formatting [false]
|
|
8871
|
-
*
|
|
8872
|
-
* @param {String|Number} val
|
|
8873
|
-
* @param {Object} [options]
|
|
8874
|
-
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
8875
|
-
* @return {String|Number}
|
|
8876
|
-
* @api public
|
|
8877
|
-
*/
|
|
8878
|
-
|
|
8879
|
-
ms = function(val, options) {
|
|
8880
|
-
options = options || {};
|
|
8881
|
-
var type = typeof val;
|
|
8882
|
-
if (type === 'string' && val.length > 0) {
|
|
8883
|
-
return parse(val);
|
|
8884
|
-
} else if (type === 'number' && isFinite(val)) {
|
|
8885
|
-
return options.long ? fmtLong(val) : fmtShort(val);
|
|
8886
|
-
}
|
|
8887
|
-
throw new Error(
|
|
8888
|
-
'val is not a non-empty string or a valid number. val=' +
|
|
8889
|
-
JSON.stringify(val)
|
|
8890
|
-
);
|
|
8891
|
-
};
|
|
8892
|
-
|
|
8893
|
-
/**
|
|
8894
|
-
* Parse the given `str` and return milliseconds.
|
|
8895
|
-
*
|
|
8896
|
-
* @param {String} str
|
|
8897
|
-
* @return {Number}
|
|
8898
|
-
* @api private
|
|
8899
|
-
*/
|
|
8900
|
-
|
|
8901
|
-
function parse(str) {
|
|
8902
|
-
str = String(str);
|
|
8903
|
-
if (str.length > 100) {
|
|
8904
|
-
return;
|
|
8905
|
-
}
|
|
8906
|
-
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(
|
|
8907
|
-
str
|
|
8908
|
-
);
|
|
8909
|
-
if (!match) {
|
|
8910
|
-
return;
|
|
8911
|
-
}
|
|
8912
|
-
var n = parseFloat(match[1]);
|
|
8913
|
-
var type = (match[2] || 'ms').toLowerCase();
|
|
8914
|
-
switch (type) {
|
|
8915
|
-
case 'years':
|
|
8916
|
-
case 'year':
|
|
8917
|
-
case 'yrs':
|
|
8918
|
-
case 'yr':
|
|
8919
|
-
case 'y':
|
|
8920
|
-
return n * y;
|
|
8921
|
-
case 'weeks':
|
|
8922
|
-
case 'week':
|
|
8923
|
-
case 'w':
|
|
8924
|
-
return n * w;
|
|
8925
|
-
case 'days':
|
|
8926
|
-
case 'day':
|
|
8927
|
-
case 'd':
|
|
8928
|
-
return n * d;
|
|
8929
|
-
case 'hours':
|
|
8930
|
-
case 'hour':
|
|
8931
|
-
case 'hrs':
|
|
8932
|
-
case 'hr':
|
|
8933
|
-
case 'h':
|
|
8934
|
-
return n * h;
|
|
8935
|
-
case 'minutes':
|
|
8936
|
-
case 'minute':
|
|
8937
|
-
case 'mins':
|
|
8938
|
-
case 'min':
|
|
8939
|
-
case 'm':
|
|
8940
|
-
return n * m;
|
|
8941
|
-
case 'seconds':
|
|
8942
|
-
case 'second':
|
|
8943
|
-
case 'secs':
|
|
8944
|
-
case 'sec':
|
|
8945
|
-
case 's':
|
|
8946
|
-
return n * s;
|
|
8947
|
-
case 'milliseconds':
|
|
8948
|
-
case 'millisecond':
|
|
8949
|
-
case 'msecs':
|
|
8950
|
-
case 'msec':
|
|
8951
|
-
case 'ms':
|
|
8952
|
-
return n;
|
|
8953
|
-
default:
|
|
8954
|
-
return undefined;
|
|
8955
|
-
}
|
|
8956
|
-
}
|
|
8957
|
-
|
|
8958
|
-
/**
|
|
8959
|
-
* Short format for `ms`.
|
|
8960
|
-
*
|
|
8961
|
-
* @param {Number} ms
|
|
8962
|
-
* @return {String}
|
|
8963
|
-
* @api private
|
|
8964
|
-
*/
|
|
8965
|
-
|
|
8966
|
-
function fmtShort(ms) {
|
|
8967
|
-
var msAbs = Math.abs(ms);
|
|
8968
|
-
if (msAbs >= d) {
|
|
8969
|
-
return Math.round(ms / d) + 'd';
|
|
8970
|
-
}
|
|
8971
|
-
if (msAbs >= h) {
|
|
8972
|
-
return Math.round(ms / h) + 'h';
|
|
8973
|
-
}
|
|
8974
|
-
if (msAbs >= m) {
|
|
8975
|
-
return Math.round(ms / m) + 'm';
|
|
8976
|
-
}
|
|
8977
|
-
if (msAbs >= s) {
|
|
8978
|
-
return Math.round(ms / s) + 's';
|
|
8979
|
-
}
|
|
8980
|
-
return ms + 'ms';
|
|
8981
|
-
}
|
|
8982
|
-
|
|
8983
|
-
/**
|
|
8984
|
-
* Long format for `ms`.
|
|
8985
|
-
*
|
|
8986
|
-
* @param {Number} ms
|
|
8987
|
-
* @return {String}
|
|
8988
|
-
* @api private
|
|
8989
|
-
*/
|
|
8990
|
-
|
|
8991
|
-
function fmtLong(ms) {
|
|
8992
|
-
var msAbs = Math.abs(ms);
|
|
8993
|
-
if (msAbs >= d) {
|
|
8994
|
-
return plural(ms, msAbs, d, 'day');
|
|
8995
|
-
}
|
|
8996
|
-
if (msAbs >= h) {
|
|
8997
|
-
return plural(ms, msAbs, h, 'hour');
|
|
8998
|
-
}
|
|
8999
|
-
if (msAbs >= m) {
|
|
9000
|
-
return plural(ms, msAbs, m, 'minute');
|
|
9001
|
-
}
|
|
9002
|
-
if (msAbs >= s) {
|
|
9003
|
-
return plural(ms, msAbs, s, 'second');
|
|
9004
|
-
}
|
|
9005
|
-
return ms + ' ms';
|
|
9006
|
-
}
|
|
9007
|
-
|
|
9008
|
-
/**
|
|
9009
|
-
* Pluralization helper.
|
|
9010
|
-
*/
|
|
9011
|
-
|
|
9012
|
-
function plural(ms, msAbs, n, name) {
|
|
9013
|
-
var isPlural = msAbs >= n * 1.5;
|
|
9014
|
-
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
|
9015
|
-
}
|
|
9016
|
-
return ms;
|
|
9017
|
-
}
|
|
9018
|
-
|
|
9019
|
-
var common;
|
|
9020
|
-
var hasRequiredCommon;
|
|
9021
|
-
|
|
9022
|
-
function requireCommon () {
|
|
9023
|
-
if (hasRequiredCommon) return common;
|
|
9024
|
-
hasRequiredCommon = 1;
|
|
9025
|
-
/**
|
|
9026
|
-
* This is the common logic for both the Node.js and web browser
|
|
9027
|
-
* implementations of `debug()`.
|
|
9028
|
-
*/
|
|
9029
|
-
|
|
9030
|
-
function setup(env) {
|
|
9031
|
-
createDebug.debug = createDebug;
|
|
9032
|
-
createDebug.default = createDebug;
|
|
9033
|
-
createDebug.coerce = coerce;
|
|
9034
|
-
createDebug.disable = disable;
|
|
9035
|
-
createDebug.enable = enable;
|
|
9036
|
-
createDebug.enabled = enabled;
|
|
9037
|
-
createDebug.humanize = requireMs();
|
|
9038
|
-
createDebug.destroy = destroy;
|
|
9039
|
-
|
|
9040
|
-
Object.keys(env).forEach(key => {
|
|
9041
|
-
createDebug[key] = env[key];
|
|
9042
|
-
});
|
|
9043
|
-
|
|
9044
|
-
/**
|
|
9045
|
-
* The currently active debug mode names, and names to skip.
|
|
9046
|
-
*/
|
|
9047
|
-
|
|
9048
|
-
createDebug.names = [];
|
|
9049
|
-
createDebug.skips = [];
|
|
9050
|
-
|
|
9051
|
-
/**
|
|
9052
|
-
* Map of special "%n" handling functions, for the debug "format" argument.
|
|
9053
|
-
*
|
|
9054
|
-
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
9055
|
-
*/
|
|
9056
|
-
createDebug.formatters = {};
|
|
9057
|
-
|
|
9058
|
-
/**
|
|
9059
|
-
* Selects a color for a debug namespace
|
|
9060
|
-
* @param {String} namespace The namespace string for the debug instance to be colored
|
|
9061
|
-
* @return {Number|String} An ANSI color code for the given namespace
|
|
9062
|
-
* @api private
|
|
9063
|
-
*/
|
|
9064
|
-
function selectColor(namespace) {
|
|
9065
|
-
let hash = 0;
|
|
9066
|
-
|
|
9067
|
-
for (let i = 0; i < namespace.length; i++) {
|
|
9068
|
-
hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
|
|
9069
|
-
hash |= 0; // Convert to 32bit integer
|
|
9070
|
-
}
|
|
9071
|
-
|
|
9072
|
-
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
9073
|
-
}
|
|
9074
|
-
createDebug.selectColor = selectColor;
|
|
9075
|
-
|
|
9076
|
-
/**
|
|
9077
|
-
* Create a debugger with the given `namespace`.
|
|
9078
|
-
*
|
|
9079
|
-
* @param {String} namespace
|
|
9080
|
-
* @return {Function}
|
|
9081
|
-
* @api public
|
|
9082
|
-
*/
|
|
9083
|
-
function createDebug(namespace) {
|
|
9084
|
-
let prevTime;
|
|
9085
|
-
let enableOverride = null;
|
|
9086
|
-
let namespacesCache;
|
|
9087
|
-
let enabledCache;
|
|
9088
|
-
|
|
9089
|
-
function debug(...args) {
|
|
9090
|
-
// Disabled?
|
|
9091
|
-
if (!debug.enabled) {
|
|
9092
|
-
return;
|
|
9093
|
-
}
|
|
9094
|
-
|
|
9095
|
-
const self = debug;
|
|
9096
|
-
|
|
9097
|
-
// Set `diff` timestamp
|
|
9098
|
-
const curr = Number(new Date());
|
|
9099
|
-
const ms = curr - (prevTime || curr);
|
|
9100
|
-
self.diff = ms;
|
|
9101
|
-
self.prev = prevTime;
|
|
9102
|
-
self.curr = curr;
|
|
9103
|
-
prevTime = curr;
|
|
9104
|
-
|
|
9105
|
-
args[0] = createDebug.coerce(args[0]);
|
|
9106
|
-
|
|
9107
|
-
if (typeof args[0] !== 'string') {
|
|
9108
|
-
// Anything else let's inspect with %O
|
|
9109
|
-
args.unshift('%O');
|
|
9110
|
-
}
|
|
9111
|
-
|
|
9112
|
-
// Apply any `formatters` transformations
|
|
9113
|
-
let index = 0;
|
|
9114
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
9115
|
-
// If we encounter an escaped % then don't increase the array index
|
|
9116
|
-
if (match === '%%') {
|
|
9117
|
-
return '%';
|
|
9118
|
-
}
|
|
9119
|
-
index++;
|
|
9120
|
-
const formatter = createDebug.formatters[format];
|
|
9121
|
-
if (typeof formatter === 'function') {
|
|
9122
|
-
const val = args[index];
|
|
9123
|
-
match = formatter.call(self, val);
|
|
9124
|
-
|
|
9125
|
-
// Now we need to remove `args[index]` since it's inlined in the `format`
|
|
9126
|
-
args.splice(index, 1);
|
|
9127
|
-
index--;
|
|
9128
|
-
}
|
|
9129
|
-
return match;
|
|
9130
|
-
});
|
|
9131
|
-
|
|
9132
|
-
// Apply env-specific formatting (colors, etc.)
|
|
9133
|
-
createDebug.formatArgs.call(self, args);
|
|
9134
|
-
|
|
9135
|
-
const logFn = self.log || createDebug.log;
|
|
9136
|
-
logFn.apply(self, args);
|
|
9137
|
-
}
|
|
9138
|
-
|
|
9139
|
-
debug.namespace = namespace;
|
|
9140
|
-
debug.useColors = createDebug.useColors();
|
|
9141
|
-
debug.color = createDebug.selectColor(namespace);
|
|
9142
|
-
debug.extend = extend;
|
|
9143
|
-
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
|
9144
|
-
|
|
9145
|
-
Object.defineProperty(debug, 'enabled', {
|
|
9146
|
-
enumerable: true,
|
|
9147
|
-
configurable: false,
|
|
9148
|
-
get: () => {
|
|
9149
|
-
if (enableOverride !== null) {
|
|
9150
|
-
return enableOverride;
|
|
9151
|
-
}
|
|
9152
|
-
if (namespacesCache !== createDebug.namespaces) {
|
|
9153
|
-
namespacesCache = createDebug.namespaces;
|
|
9154
|
-
enabledCache = createDebug.enabled(namespace);
|
|
9155
|
-
}
|
|
9156
|
-
|
|
9157
|
-
return enabledCache;
|
|
9158
|
-
},
|
|
9159
|
-
set: v => {
|
|
9160
|
-
enableOverride = v;
|
|
9161
|
-
}
|
|
9162
|
-
});
|
|
9163
|
-
|
|
9164
|
-
// Env-specific initialization logic for debug instances
|
|
9165
|
-
if (typeof createDebug.init === 'function') {
|
|
9166
|
-
createDebug.init(debug);
|
|
9167
|
-
}
|
|
9168
|
-
|
|
9169
|
-
return debug;
|
|
9170
|
-
}
|
|
9171
|
-
|
|
9172
|
-
function extend(namespace, delimiter) {
|
|
9173
|
-
const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
|
9174
|
-
newDebug.log = this.log;
|
|
9175
|
-
return newDebug;
|
|
9176
|
-
}
|
|
9177
|
-
|
|
9178
|
-
/**
|
|
9179
|
-
* Enables a debug mode by namespaces. This can include modes
|
|
9180
|
-
* separated by a colon and wildcards.
|
|
9181
|
-
*
|
|
9182
|
-
* @param {String} namespaces
|
|
9183
|
-
* @api public
|
|
9184
|
-
*/
|
|
9185
|
-
function enable(namespaces) {
|
|
9186
|
-
createDebug.save(namespaces);
|
|
9187
|
-
createDebug.namespaces = namespaces;
|
|
9188
|
-
|
|
9189
|
-
createDebug.names = [];
|
|
9190
|
-
createDebug.skips = [];
|
|
9191
|
-
|
|
9192
|
-
let i;
|
|
9193
|
-
const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
|
9194
|
-
const len = split.length;
|
|
9195
|
-
|
|
9196
|
-
for (i = 0; i < len; i++) {
|
|
9197
|
-
if (!split[i]) {
|
|
9198
|
-
// ignore empty strings
|
|
9199
|
-
continue;
|
|
9200
|
-
}
|
|
9201
|
-
|
|
9202
|
-
namespaces = split[i].replace(/\*/g, '.*?');
|
|
9203
|
-
|
|
9204
|
-
if (namespaces[0] === '-') {
|
|
9205
|
-
createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
|
|
9206
|
-
} else {
|
|
9207
|
-
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
|
9208
|
-
}
|
|
9209
|
-
}
|
|
9210
|
-
}
|
|
9211
|
-
|
|
9212
|
-
/**
|
|
9213
|
-
* Disable debug output.
|
|
9214
|
-
*
|
|
9215
|
-
* @return {String} namespaces
|
|
9216
|
-
* @api public
|
|
9217
|
-
*/
|
|
9218
|
-
function disable() {
|
|
9219
|
-
const namespaces = [
|
|
9220
|
-
...createDebug.names.map(toNamespace),
|
|
9221
|
-
...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
|
|
9222
|
-
].join(',');
|
|
9223
|
-
createDebug.enable('');
|
|
9224
|
-
return namespaces;
|
|
9225
|
-
}
|
|
9226
|
-
|
|
9227
|
-
/**
|
|
9228
|
-
* Returns true if the given mode name is enabled, false otherwise.
|
|
9229
|
-
*
|
|
9230
|
-
* @param {String} name
|
|
9231
|
-
* @return {Boolean}
|
|
9232
|
-
* @api public
|
|
9233
|
-
*/
|
|
9234
|
-
function enabled(name) {
|
|
9235
|
-
if (name[name.length - 1] === '*') {
|
|
9236
|
-
return true;
|
|
9237
|
-
}
|
|
9238
|
-
|
|
9239
|
-
let i;
|
|
9240
|
-
let len;
|
|
9241
|
-
|
|
9242
|
-
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
9243
|
-
if (createDebug.skips[i].test(name)) {
|
|
9244
|
-
return false;
|
|
9245
|
-
}
|
|
9246
|
-
}
|
|
9247
|
-
|
|
9248
|
-
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
|
9249
|
-
if (createDebug.names[i].test(name)) {
|
|
9250
|
-
return true;
|
|
9251
|
-
}
|
|
9252
|
-
}
|
|
9253
|
-
|
|
9254
|
-
return false;
|
|
9255
|
-
}
|
|
9256
|
-
|
|
9257
|
-
/**
|
|
9258
|
-
* Convert regexp to namespace
|
|
9259
|
-
*
|
|
9260
|
-
* @param {RegExp} regxep
|
|
9261
|
-
* @return {String} namespace
|
|
9262
|
-
* @api private
|
|
9263
|
-
*/
|
|
9264
|
-
function toNamespace(regexp) {
|
|
9265
|
-
return regexp.toString()
|
|
9266
|
-
.substring(2, regexp.toString().length - 2)
|
|
9267
|
-
.replace(/\.\*\?$/, '*');
|
|
9268
|
-
}
|
|
9269
|
-
|
|
9270
|
-
/**
|
|
9271
|
-
* Coerce `val`.
|
|
9272
|
-
*
|
|
9273
|
-
* @param {Mixed} val
|
|
9274
|
-
* @return {Mixed}
|
|
9275
|
-
* @api private
|
|
9276
|
-
*/
|
|
9277
|
-
function coerce(val) {
|
|
9278
|
-
if (val instanceof Error) {
|
|
9279
|
-
return val.stack || val.message;
|
|
9280
|
-
}
|
|
9281
|
-
return val;
|
|
9282
|
-
}
|
|
9283
|
-
|
|
9284
|
-
/**
|
|
9285
|
-
* XXX DO NOT USE. This is a temporary stub function.
|
|
9286
|
-
* XXX It WILL be removed in the next major release.
|
|
9287
|
-
*/
|
|
9288
|
-
function destroy() {
|
|
9289
|
-
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
9290
|
-
}
|
|
9291
|
-
|
|
9292
|
-
createDebug.enable(createDebug.load());
|
|
9293
|
-
|
|
9294
|
-
return createDebug;
|
|
9295
|
-
}
|
|
9296
|
-
|
|
9297
|
-
common = setup;
|
|
9298
|
-
return common;
|
|
9299
|
-
}
|
|
9300
|
-
|
|
9301
|
-
/* eslint-env browser */
|
|
9302
|
-
|
|
9303
|
-
var hasRequiredBrowser$1;
|
|
9304
|
-
|
|
9305
|
-
function requireBrowser$1 () {
|
|
9306
|
-
if (hasRequiredBrowser$1) return browser$1.exports;
|
|
9307
|
-
hasRequiredBrowser$1 = 1;
|
|
9308
|
-
(function (module, exports) {
|
|
9309
|
-
/**
|
|
9310
|
-
* This is the web browser implementation of `debug()`.
|
|
9311
|
-
*/
|
|
9312
|
-
|
|
9313
|
-
exports.formatArgs = formatArgs;
|
|
9314
|
-
exports.save = save;
|
|
9315
|
-
exports.load = load;
|
|
9316
|
-
exports.useColors = useColors;
|
|
9317
|
-
exports.storage = localstorage();
|
|
9318
|
-
exports.destroy = (() => {
|
|
9319
|
-
let warned = false;
|
|
9320
|
-
|
|
9321
|
-
return () => {
|
|
9322
|
-
if (!warned) {
|
|
9323
|
-
warned = true;
|
|
9324
|
-
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
9325
|
-
}
|
|
9326
|
-
};
|
|
9327
|
-
})();
|
|
9328
|
-
|
|
9329
|
-
/**
|
|
9330
|
-
* Colors.
|
|
9331
|
-
*/
|
|
9332
|
-
|
|
9333
|
-
exports.colors = [
|
|
9334
|
-
'#0000CC',
|
|
9335
|
-
'#0000FF',
|
|
9336
|
-
'#0033CC',
|
|
9337
|
-
'#0033FF',
|
|
9338
|
-
'#0066CC',
|
|
9339
|
-
'#0066FF',
|
|
9340
|
-
'#0099CC',
|
|
9341
|
-
'#0099FF',
|
|
9342
|
-
'#00CC00',
|
|
9343
|
-
'#00CC33',
|
|
9344
|
-
'#00CC66',
|
|
9345
|
-
'#00CC99',
|
|
9346
|
-
'#00CCCC',
|
|
9347
|
-
'#00CCFF',
|
|
9348
|
-
'#3300CC',
|
|
9349
|
-
'#3300FF',
|
|
9350
|
-
'#3333CC',
|
|
9351
|
-
'#3333FF',
|
|
9352
|
-
'#3366CC',
|
|
9353
|
-
'#3366FF',
|
|
9354
|
-
'#3399CC',
|
|
9355
|
-
'#3399FF',
|
|
9356
|
-
'#33CC00',
|
|
9357
|
-
'#33CC33',
|
|
9358
|
-
'#33CC66',
|
|
9359
|
-
'#33CC99',
|
|
9360
|
-
'#33CCCC',
|
|
9361
|
-
'#33CCFF',
|
|
9362
|
-
'#6600CC',
|
|
9363
|
-
'#6600FF',
|
|
9364
|
-
'#6633CC',
|
|
9365
|
-
'#6633FF',
|
|
9366
|
-
'#66CC00',
|
|
9367
|
-
'#66CC33',
|
|
9368
|
-
'#9900CC',
|
|
9369
|
-
'#9900FF',
|
|
9370
|
-
'#9933CC',
|
|
9371
|
-
'#9933FF',
|
|
9372
|
-
'#99CC00',
|
|
9373
|
-
'#99CC33',
|
|
9374
|
-
'#CC0000',
|
|
9375
|
-
'#CC0033',
|
|
9376
|
-
'#CC0066',
|
|
9377
|
-
'#CC0099',
|
|
9378
|
-
'#CC00CC',
|
|
9379
|
-
'#CC00FF',
|
|
9380
|
-
'#CC3300',
|
|
9381
|
-
'#CC3333',
|
|
9382
|
-
'#CC3366',
|
|
9383
|
-
'#CC3399',
|
|
9384
|
-
'#CC33CC',
|
|
9385
|
-
'#CC33FF',
|
|
9386
|
-
'#CC6600',
|
|
9387
|
-
'#CC6633',
|
|
9388
|
-
'#CC9900',
|
|
9389
|
-
'#CC9933',
|
|
9390
|
-
'#CCCC00',
|
|
9391
|
-
'#CCCC33',
|
|
9392
|
-
'#FF0000',
|
|
9393
|
-
'#FF0033',
|
|
9394
|
-
'#FF0066',
|
|
9395
|
-
'#FF0099',
|
|
9396
|
-
'#FF00CC',
|
|
9397
|
-
'#FF00FF',
|
|
9398
|
-
'#FF3300',
|
|
9399
|
-
'#FF3333',
|
|
9400
|
-
'#FF3366',
|
|
9401
|
-
'#FF3399',
|
|
9402
|
-
'#FF33CC',
|
|
9403
|
-
'#FF33FF',
|
|
9404
|
-
'#FF6600',
|
|
9405
|
-
'#FF6633',
|
|
9406
|
-
'#FF9900',
|
|
9407
|
-
'#FF9933',
|
|
9408
|
-
'#FFCC00',
|
|
9409
|
-
'#FFCC33'
|
|
9410
|
-
];
|
|
9411
|
-
|
|
9412
|
-
/**
|
|
9413
|
-
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
9414
|
-
* and the Firebug extension (any Firefox version) are known
|
|
9415
|
-
* to support "%c" CSS customizations.
|
|
9416
|
-
*
|
|
9417
|
-
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
|
9418
|
-
*/
|
|
9419
|
-
|
|
9420
|
-
// eslint-disable-next-line complexity
|
|
9421
|
-
function useColors() {
|
|
9422
|
-
// NB: In an Electron preload script, document will be defined but not fully
|
|
9423
|
-
// initialized. Since we know we're in Chrome, we'll just detect this case
|
|
9424
|
-
// explicitly
|
|
9425
|
-
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
|
9426
|
-
return true;
|
|
9427
|
-
}
|
|
9428
|
-
|
|
9429
|
-
// Internet Explorer and Edge do not support colors.
|
|
9430
|
-
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
9431
|
-
return false;
|
|
9432
|
-
}
|
|
9433
|
-
|
|
9434
|
-
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
|
9435
|
-
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
|
9436
|
-
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
|
9437
|
-
// Is firebug? http://stackoverflow.com/a/398120/376773
|
|
9438
|
-
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
|
9439
|
-
// Is firefox >= v31?
|
|
9440
|
-
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
9441
|
-
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
|
9442
|
-
// Double check webkit in userAgent just in case we are in a worker
|
|
9443
|
-
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
|
9444
|
-
}
|
|
9445
|
-
|
|
9446
|
-
/**
|
|
9447
|
-
* Colorize log arguments if enabled.
|
|
9448
|
-
*
|
|
9449
|
-
* @api public
|
|
9450
|
-
*/
|
|
9451
|
-
|
|
9452
|
-
function formatArgs(args) {
|
|
9453
|
-
args[0] = (this.useColors ? '%c' : '') +
|
|
9454
|
-
this.namespace +
|
|
9455
|
-
(this.useColors ? ' %c' : ' ') +
|
|
9456
|
-
args[0] +
|
|
9457
|
-
(this.useColors ? '%c ' : ' ') +
|
|
9458
|
-
'+' + module.exports.humanize(this.diff);
|
|
9459
|
-
|
|
9460
|
-
if (!this.useColors) {
|
|
9461
|
-
return;
|
|
9462
|
-
}
|
|
9463
|
-
|
|
9464
|
-
const c = 'color: ' + this.color;
|
|
9465
|
-
args.splice(1, 0, c, 'color: inherit');
|
|
9466
|
-
|
|
9467
|
-
// The final "%c" is somewhat tricky, because there could be other
|
|
9468
|
-
// arguments passed either before or after the %c, so we need to
|
|
9469
|
-
// figure out the correct index to insert the CSS into
|
|
9470
|
-
let index = 0;
|
|
9471
|
-
let lastC = 0;
|
|
9472
|
-
args[0].replace(/%[a-zA-Z%]/g, match => {
|
|
9473
|
-
if (match === '%%') {
|
|
9474
|
-
return;
|
|
9475
|
-
}
|
|
9476
|
-
index++;
|
|
9477
|
-
if (match === '%c') {
|
|
9478
|
-
// We only are interested in the *last* %c
|
|
9479
|
-
// (the user may have provided their own)
|
|
9480
|
-
lastC = index;
|
|
9481
|
-
}
|
|
9482
|
-
});
|
|
9483
|
-
|
|
9484
|
-
args.splice(lastC, 0, c);
|
|
9485
|
-
}
|
|
9486
|
-
|
|
9487
|
-
/**
|
|
9488
|
-
* Invokes `console.debug()` when available.
|
|
9489
|
-
* No-op when `console.debug` is not a "function".
|
|
9490
|
-
* If `console.debug` is not available, falls back
|
|
9491
|
-
* to `console.log`.
|
|
9492
|
-
*
|
|
9493
|
-
* @api public
|
|
9494
|
-
*/
|
|
9495
|
-
exports.log = console.debug || console.log || (() => {});
|
|
9496
|
-
|
|
9497
|
-
/**
|
|
9498
|
-
* Save `namespaces`.
|
|
9499
|
-
*
|
|
9500
|
-
* @param {String} namespaces
|
|
9501
|
-
* @api private
|
|
9502
|
-
*/
|
|
9503
|
-
function save(namespaces) {
|
|
9504
|
-
try {
|
|
9505
|
-
if (namespaces) {
|
|
9506
|
-
exports.storage.setItem('debug', namespaces);
|
|
9507
|
-
} else {
|
|
9508
|
-
exports.storage.removeItem('debug');
|
|
9509
|
-
}
|
|
9510
|
-
} catch (error) {
|
|
9511
|
-
// Swallow
|
|
9512
|
-
// XXX (@Qix-) should we be logging these?
|
|
9513
|
-
}
|
|
9514
|
-
}
|
|
9515
|
-
|
|
9516
|
-
/**
|
|
9517
|
-
* Load `namespaces`.
|
|
9518
|
-
*
|
|
9519
|
-
* @return {String} returns the previously persisted debug modes
|
|
9520
|
-
* @api private
|
|
9521
|
-
*/
|
|
9522
|
-
function load() {
|
|
9523
|
-
let r;
|
|
9524
|
-
try {
|
|
9525
|
-
r = exports.storage.getItem('debug');
|
|
9526
|
-
} catch (error) {
|
|
9527
|
-
// Swallow
|
|
9528
|
-
// XXX (@Qix-) should we be logging these?
|
|
9529
|
-
}
|
|
9530
|
-
|
|
9531
|
-
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
9532
|
-
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
|
9533
|
-
r = process.env.DEBUG;
|
|
9534
|
-
}
|
|
9535
|
-
|
|
9536
|
-
return r;
|
|
9537
|
-
}
|
|
9538
|
-
|
|
9539
|
-
/**
|
|
9540
|
-
* Localstorage attempts to return the localstorage.
|
|
9541
|
-
*
|
|
9542
|
-
* This is necessary because safari throws
|
|
9543
|
-
* when a user disables cookies/localstorage
|
|
9544
|
-
* and you attempt to access it.
|
|
9545
|
-
*
|
|
9546
|
-
* @return {LocalStorage}
|
|
9547
|
-
* @api private
|
|
9548
|
-
*/
|
|
9549
|
-
|
|
9550
|
-
function localstorage() {
|
|
9551
|
-
try {
|
|
9552
|
-
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
|
9553
|
-
// The Browser also has localStorage in the global context.
|
|
9554
|
-
return localStorage;
|
|
9555
|
-
} catch (error) {
|
|
9556
|
-
// Swallow
|
|
9557
|
-
// XXX (@Qix-) should we be logging these?
|
|
9558
|
-
}
|
|
9559
|
-
}
|
|
9560
|
-
|
|
9561
|
-
module.exports = requireCommon()(exports);
|
|
9562
|
-
|
|
9563
|
-
const {formatters} = module.exports;
|
|
9564
|
-
|
|
9565
|
-
/**
|
|
9566
|
-
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
|
9567
|
-
*/
|
|
9568
|
-
|
|
9569
|
-
formatters.j = function (v) {
|
|
9570
|
-
try {
|
|
9571
|
-
return JSON.stringify(v);
|
|
9572
|
-
} catch (error) {
|
|
9573
|
-
return '[UnexpectedJSONParseError]: ' + error.message;
|
|
9574
|
-
}
|
|
9575
|
-
};
|
|
9576
|
-
} (browser$1, browser$1.exports));
|
|
9577
|
-
return browser$1.exports;
|
|
9578
|
-
}
|
|
9579
|
-
|
|
9580
|
-
var node = {exports: {}};
|
|
9581
|
-
|
|
9582
|
-
/* eslint-env browser */
|
|
9583
|
-
|
|
9584
|
-
var browser;
|
|
9585
|
-
var hasRequiredBrowser;
|
|
9586
|
-
|
|
9587
|
-
function requireBrowser () {
|
|
9588
|
-
if (hasRequiredBrowser) return browser;
|
|
9589
|
-
hasRequiredBrowser = 1;
|
|
9590
|
-
|
|
9591
|
-
function getChromeVersion() {
|
|
9592
|
-
const matches = /(Chrome|Chromium)\/(?<chromeVersion>\d+)\./.exec(navigator.userAgent);
|
|
9593
|
-
|
|
9594
|
-
if (!matches) {
|
|
9595
|
-
return;
|
|
9596
|
-
}
|
|
9597
|
-
|
|
9598
|
-
return Number.parseInt(matches.groups.chromeVersion, 10);
|
|
9599
|
-
}
|
|
9600
|
-
|
|
9601
|
-
const colorSupport = getChromeVersion() >= 69 ? {
|
|
9602
|
-
level: 1,
|
|
9603
|
-
hasBasic: true,
|
|
9604
|
-
has256: false,
|
|
9605
|
-
has16m: false
|
|
9606
|
-
} : false;
|
|
9607
|
-
|
|
9608
|
-
browser = {
|
|
9609
|
-
stdout: colorSupport,
|
|
9610
|
-
stderr: colorSupport
|
|
9611
|
-
};
|
|
9612
|
-
return browser;
|
|
9613
|
-
}
|
|
9614
|
-
|
|
9615
|
-
/**
|
|
9616
|
-
* Module dependencies.
|
|
9617
|
-
*/
|
|
9618
|
-
|
|
9619
|
-
var hasRequiredNode;
|
|
9620
|
-
|
|
9621
|
-
function requireNode () {
|
|
9622
|
-
if (hasRequiredNode) return node.exports;
|
|
9623
|
-
hasRequiredNode = 1;
|
|
9624
|
-
(function (module, exports) {
|
|
9625
|
-
const tty = require$$0;
|
|
9626
|
-
const util = require$$1;
|
|
9627
|
-
|
|
9628
|
-
/**
|
|
9629
|
-
* This is the Node.js implementation of `debug()`.
|
|
9630
|
-
*/
|
|
9631
|
-
|
|
9632
|
-
exports.init = init;
|
|
9633
|
-
exports.log = log;
|
|
9634
|
-
exports.formatArgs = formatArgs;
|
|
9635
|
-
exports.save = save;
|
|
9636
|
-
exports.load = load;
|
|
9637
|
-
exports.useColors = useColors;
|
|
9638
|
-
exports.destroy = util.deprecate(
|
|
9639
|
-
() => {},
|
|
9640
|
-
'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
|
|
9641
|
-
);
|
|
9642
|
-
|
|
9643
|
-
/**
|
|
9644
|
-
* Colors.
|
|
9645
|
-
*/
|
|
9646
|
-
|
|
9647
|
-
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
9648
|
-
|
|
9649
|
-
try {
|
|
9650
|
-
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
|
|
9651
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
9652
|
-
const supportsColor = requireBrowser();
|
|
9653
|
-
|
|
9654
|
-
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
9655
|
-
exports.colors = [
|
|
9656
|
-
20,
|
|
9657
|
-
21,
|
|
9658
|
-
26,
|
|
9659
|
-
27,
|
|
9660
|
-
32,
|
|
9661
|
-
33,
|
|
9662
|
-
38,
|
|
9663
|
-
39,
|
|
9664
|
-
40,
|
|
9665
|
-
41,
|
|
9666
|
-
42,
|
|
9667
|
-
43,
|
|
9668
|
-
44,
|
|
9669
|
-
45,
|
|
9670
|
-
56,
|
|
9671
|
-
57,
|
|
9672
|
-
62,
|
|
9673
|
-
63,
|
|
9674
|
-
68,
|
|
9675
|
-
69,
|
|
9676
|
-
74,
|
|
9677
|
-
75,
|
|
9678
|
-
76,
|
|
9679
|
-
77,
|
|
9680
|
-
78,
|
|
9681
|
-
79,
|
|
9682
|
-
80,
|
|
9683
|
-
81,
|
|
9684
|
-
92,
|
|
9685
|
-
93,
|
|
9686
|
-
98,
|
|
9687
|
-
99,
|
|
9688
|
-
112,
|
|
9689
|
-
113,
|
|
9690
|
-
128,
|
|
9691
|
-
129,
|
|
9692
|
-
134,
|
|
9693
|
-
135,
|
|
9694
|
-
148,
|
|
9695
|
-
149,
|
|
9696
|
-
160,
|
|
9697
|
-
161,
|
|
9698
|
-
162,
|
|
9699
|
-
163,
|
|
9700
|
-
164,
|
|
9701
|
-
165,
|
|
9702
|
-
166,
|
|
9703
|
-
167,
|
|
9704
|
-
168,
|
|
9705
|
-
169,
|
|
9706
|
-
170,
|
|
9707
|
-
171,
|
|
9708
|
-
172,
|
|
9709
|
-
173,
|
|
9710
|
-
178,
|
|
9711
|
-
179,
|
|
9712
|
-
184,
|
|
9713
|
-
185,
|
|
9714
|
-
196,
|
|
9715
|
-
197,
|
|
9716
|
-
198,
|
|
9717
|
-
199,
|
|
9718
|
-
200,
|
|
9719
|
-
201,
|
|
9720
|
-
202,
|
|
9721
|
-
203,
|
|
9722
|
-
204,
|
|
9723
|
-
205,
|
|
9724
|
-
206,
|
|
9725
|
-
207,
|
|
9726
|
-
208,
|
|
9727
|
-
209,
|
|
9728
|
-
214,
|
|
9729
|
-
215,
|
|
9730
|
-
220,
|
|
9731
|
-
221
|
|
9732
|
-
];
|
|
9733
|
-
}
|
|
9734
|
-
} catch (error) {
|
|
9735
|
-
// Swallow - we only care if `supports-color` is available; it doesn't have to be.
|
|
9736
|
-
}
|
|
9737
|
-
|
|
9738
|
-
/**
|
|
9739
|
-
* Build up the default `inspectOpts` object from the environment variables.
|
|
9740
|
-
*
|
|
9741
|
-
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
|
9742
|
-
*/
|
|
9743
|
-
|
|
9744
|
-
exports.inspectOpts = Object.keys(process.env).filter(key => {
|
|
9745
|
-
return /^debug_/i.test(key);
|
|
9746
|
-
}).reduce((obj, key) => {
|
|
9747
|
-
// Camel-case
|
|
9748
|
-
const prop = key
|
|
9749
|
-
.substring(6)
|
|
9750
|
-
.toLowerCase()
|
|
9751
|
-
.replace(/_([a-z])/g, (_, k) => {
|
|
9752
|
-
return k.toUpperCase();
|
|
9753
|
-
});
|
|
9754
|
-
|
|
9755
|
-
// Coerce string value into JS value
|
|
9756
|
-
let val = process.env[key];
|
|
9757
|
-
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
9758
|
-
val = true;
|
|
9759
|
-
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
9760
|
-
val = false;
|
|
9761
|
-
} else if (val === 'null') {
|
|
9762
|
-
val = null;
|
|
9763
|
-
} else {
|
|
9764
|
-
val = Number(val);
|
|
9765
|
-
}
|
|
9766
|
-
|
|
9767
|
-
obj[prop] = val;
|
|
9768
|
-
return obj;
|
|
9769
|
-
}, {});
|
|
9770
|
-
|
|
9771
|
-
/**
|
|
9772
|
-
* Is stdout a TTY? Colored output is enabled when `true`.
|
|
9773
|
-
*/
|
|
9774
|
-
|
|
9775
|
-
function useColors() {
|
|
9776
|
-
return 'colors' in exports.inspectOpts ?
|
|
9777
|
-
Boolean(exports.inspectOpts.colors) :
|
|
9778
|
-
tty.isatty(process.stderr.fd);
|
|
9779
|
-
}
|
|
9780
|
-
|
|
9781
|
-
/**
|
|
9782
|
-
* Adds ANSI color escape codes if enabled.
|
|
9783
|
-
*
|
|
9784
|
-
* @api public
|
|
9785
|
-
*/
|
|
9786
|
-
|
|
9787
|
-
function formatArgs(args) {
|
|
9788
|
-
const {namespace: name, useColors} = this;
|
|
9789
|
-
|
|
9790
|
-
if (useColors) {
|
|
9791
|
-
const c = this.color;
|
|
9792
|
-
const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
|
|
9793
|
-
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
|
|
9794
|
-
|
|
9795
|
-
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
|
|
9796
|
-
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
|
|
9797
|
-
} else {
|
|
9798
|
-
args[0] = getDate() + name + ' ' + args[0];
|
|
9799
|
-
}
|
|
9800
|
-
}
|
|
9801
|
-
|
|
9802
|
-
function getDate() {
|
|
9803
|
-
if (exports.inspectOpts.hideDate) {
|
|
9804
|
-
return '';
|
|
9805
|
-
}
|
|
9806
|
-
return new Date().toISOString() + ' ';
|
|
9807
|
-
}
|
|
9808
|
-
|
|
9809
|
-
/**
|
|
9810
|
-
* Invokes `util.format()` with the specified arguments and writes to stderr.
|
|
9811
|
-
*/
|
|
9812
|
-
|
|
9813
|
-
function log(...args) {
|
|
9814
|
-
return process.stderr.write(util.format(...args) + '\n');
|
|
9815
|
-
}
|
|
9816
|
-
|
|
9817
|
-
/**
|
|
9818
|
-
* Save `namespaces`.
|
|
9819
|
-
*
|
|
9820
|
-
* @param {String} namespaces
|
|
9821
|
-
* @api private
|
|
9822
|
-
*/
|
|
9823
|
-
function save(namespaces) {
|
|
9824
|
-
if (namespaces) {
|
|
9825
|
-
process.env.DEBUG = namespaces;
|
|
9826
|
-
} else {
|
|
9827
|
-
// If you set a process.env field to null or undefined, it gets cast to the
|
|
9828
|
-
// string 'null' or 'undefined'. Just delete instead.
|
|
9829
|
-
delete process.env.DEBUG;
|
|
9830
|
-
}
|
|
9831
|
-
}
|
|
9832
|
-
|
|
9833
|
-
/**
|
|
9834
|
-
* Load `namespaces`.
|
|
9835
|
-
*
|
|
9836
|
-
* @return {String} returns the previously persisted debug modes
|
|
9837
|
-
* @api private
|
|
9838
|
-
*/
|
|
9839
|
-
|
|
9840
|
-
function load() {
|
|
9841
|
-
return process.env.DEBUG;
|
|
9842
|
-
}
|
|
9843
|
-
|
|
9844
|
-
/**
|
|
9845
|
-
* Init logic for `debug` instances.
|
|
9846
|
-
*
|
|
9847
|
-
* Create a new `inspectOpts` object in case `useColors` is set
|
|
9848
|
-
* differently for a particular `debug` instance.
|
|
9849
|
-
*/
|
|
9850
|
-
|
|
9851
|
-
function init(debug) {
|
|
9852
|
-
debug.inspectOpts = {};
|
|
9853
|
-
|
|
9854
|
-
const keys = Object.keys(exports.inspectOpts);
|
|
9855
|
-
for (let i = 0; i < keys.length; i++) {
|
|
9856
|
-
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
9857
|
-
}
|
|
9858
|
-
}
|
|
9859
|
-
|
|
9860
|
-
module.exports = requireCommon()(exports);
|
|
9861
|
-
|
|
9862
|
-
const {formatters} = module.exports;
|
|
9863
|
-
|
|
9864
|
-
/**
|
|
9865
|
-
* Map %o to `util.inspect()`, all on a single line.
|
|
9866
|
-
*/
|
|
9867
|
-
|
|
9868
|
-
formatters.o = function (v) {
|
|
9869
|
-
this.inspectOpts.colors = this.useColors;
|
|
9870
|
-
return util.inspect(v, this.inspectOpts)
|
|
9871
|
-
.split('\n')
|
|
9872
|
-
.map(str => str.trim())
|
|
9873
|
-
.join(' ');
|
|
9874
|
-
};
|
|
9875
|
-
|
|
9876
|
-
/**
|
|
9877
|
-
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
|
9878
|
-
*/
|
|
9879
|
-
|
|
9880
|
-
formatters.O = function (v) {
|
|
9881
|
-
this.inspectOpts.colors = this.useColors;
|
|
9882
|
-
return util.inspect(v, this.inspectOpts);
|
|
9883
|
-
};
|
|
9884
|
-
} (node, node.exports));
|
|
9885
|
-
return node.exports;
|
|
9886
|
-
}
|
|
9887
|
-
|
|
9888
|
-
/**
|
|
9889
|
-
* Detect Electron renderer / nwjs process, which is node, but we should
|
|
9890
|
-
* treat as a browser.
|
|
9891
|
-
*/
|
|
9892
|
-
|
|
9893
|
-
(function (module) {
|
|
9894
|
-
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
|
|
9895
|
-
module.exports = requireBrowser$1();
|
|
9896
|
-
} else {
|
|
9897
|
-
module.exports = requireNode();
|
|
9898
|
-
}
|
|
9899
|
-
} (src));
|
|
9900
|
-
|
|
9901
|
-
var createDebug = /*@__PURE__*/getDefaultExportFromCjs(src.exports);
|
|
9902
|
-
|
|
9903
8844
|
const isWindows = process.platform === "win32";
|
|
9904
8845
|
function slash(str) {
|
|
9905
8846
|
return str.replace(/\\/g, "/");
|
|
9906
8847
|
}
|
|
8848
|
+
function mergeSlashes(str) {
|
|
8849
|
+
return str.replace(/\/\//g, "/");
|
|
8850
|
+
}
|
|
9907
8851
|
function normalizeRequestId(id, base) {
|
|
9908
8852
|
if (base && id.startsWith(base))
|
|
9909
8853
|
id = `/${id.slice(base.length)}`;
|
|
@@ -10038,7 +8982,7 @@ ${getStack()}`), 2e3);
|
|
|
10038
8982
|
if (importer && importer.startsWith("mock:"))
|
|
10039
8983
|
importer = importer.slice(5);
|
|
10040
8984
|
const { id: id2 } = await this.options.resolveId(dep, importer) || {};
|
|
10041
|
-
dep = id2 && isAbsolute$2(id2) ? `/@fs/${id2}` : id2 || dep;
|
|
8985
|
+
dep = id2 && isAbsolute$2(id2) ? mergeSlashes(`/@fs/${id2}`) : id2 || dep;
|
|
10042
8986
|
}
|
|
10043
8987
|
return dep;
|
|
10044
8988
|
};
|
|
@@ -10226,4 +9170,4 @@ function nanoid(size = 21) {
|
|
|
10226
9170
|
return id;
|
|
10227
9171
|
}
|
|
10228
9172
|
|
|
10229
|
-
export { ModuleCacheMap as M, ViteNodeRunner as V, isValidNodeImport as a, createBirpc as
|
|
9173
|
+
export { ModuleCacheMap as M, ViteNodeRunner as V, isValidNodeImport as a, createBirpc as c, isNodeBuiltin as i, normalizeRequestId as n, slash as s, toFilePath as t, withInlineSourcemap as w };
|