glitch-javascript-sdk 0.6.8 → 0.7.0
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/cjs/index.js +448 -448
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1270 -1461
- package/dist/esm/index.js.map +1 -1
- package/package.json +15 -13
package/dist/esm/index.js
CHANGED
|
@@ -26,81 +26,85 @@ var LabelManager = /** @class */ (function () {
|
|
|
26
26
|
return LabelManager;
|
|
27
27
|
}());
|
|
28
28
|
|
|
29
|
-
/******************************************************************************
|
|
30
|
-
Copyright (c) Microsoft Corporation.
|
|
31
|
-
|
|
32
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
33
|
-
purpose with or without fee is hereby granted.
|
|
34
|
-
|
|
35
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
36
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
37
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
38
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
39
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
40
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
41
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
42
|
-
***************************************************************************** */
|
|
43
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
var __assign = function() {
|
|
47
|
-
__assign = Object.assign || function __assign(t) {
|
|
48
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
49
|
-
s = arguments[i];
|
|
50
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
51
|
-
}
|
|
52
|
-
return t;
|
|
53
|
-
};
|
|
54
|
-
return __assign.apply(this, arguments);
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
58
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
59
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
60
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
61
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
62
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
63
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function __generator(thisArg, body) {
|
|
68
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
69
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
70
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
71
|
-
function step(op) {
|
|
72
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
73
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
74
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
75
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
76
|
-
switch (op[0]) {
|
|
77
|
-
case 0: case 1: t = op; break;
|
|
78
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
79
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
80
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
81
|
-
default:
|
|
82
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
83
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
84
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
85
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
86
|
-
if (t[2]) _.ops.pop();
|
|
87
|
-
_.trys.pop(); continue;
|
|
88
|
-
}
|
|
89
|
-
op = body.call(thisArg, _);
|
|
90
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
91
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
96
|
-
var e = new Error(message);
|
|
97
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
var global$
|
|
29
|
+
/******************************************************************************
|
|
30
|
+
Copyright (c) Microsoft Corporation.
|
|
31
|
+
|
|
32
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
33
|
+
purpose with or without fee is hereby granted.
|
|
34
|
+
|
|
35
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
36
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
37
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
38
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
39
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
40
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
41
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
42
|
+
***************************************************************************** */
|
|
43
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
var __assign = function() {
|
|
47
|
+
__assign = Object.assign || function __assign(t) {
|
|
48
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
49
|
+
s = arguments[i];
|
|
50
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
51
|
+
}
|
|
52
|
+
return t;
|
|
53
|
+
};
|
|
54
|
+
return __assign.apply(this, arguments);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
58
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
59
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
60
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
61
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
62
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
63
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function __generator(thisArg, body) {
|
|
68
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
69
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
70
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
71
|
+
function step(op) {
|
|
72
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
73
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
74
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
75
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
76
|
+
switch (op[0]) {
|
|
77
|
+
case 0: case 1: t = op; break;
|
|
78
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
79
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
80
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
81
|
+
default:
|
|
82
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
83
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
84
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
85
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
86
|
+
if (t[2]) _.ops.pop();
|
|
87
|
+
_.trys.pop(); continue;
|
|
88
|
+
}
|
|
89
|
+
op = body.call(thisArg, _);
|
|
90
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
91
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
96
|
+
var e = new Error(message);
|
|
97
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
var global$2 = (typeof global !== "undefined" ? global :
|
|
101
101
|
typeof self !== "undefined" ? self :
|
|
102
102
|
typeof window !== "undefined" ? window : {});
|
|
103
103
|
|
|
104
|
+
var global$1 = (typeof global$2 !== "undefined" ? global$2 :
|
|
105
|
+
typeof self !== "undefined" ? self :
|
|
106
|
+
typeof window !== "undefined" ? window : {});
|
|
107
|
+
|
|
104
108
|
function bind(fn, thisArg) {
|
|
105
109
|
return function wrap() {
|
|
106
110
|
return fn.apply(thisArg, arguments);
|
|
@@ -1028,15 +1032,6 @@ var isArray$1 = Array.isArray || function (arr) {
|
|
|
1028
1032
|
return toString.call(arr) == '[object Array]';
|
|
1029
1033
|
};
|
|
1030
1034
|
|
|
1031
|
-
/*!
|
|
1032
|
-
* The buffer module from node.js, for the browser.
|
|
1033
|
-
*
|
|
1034
|
-
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
1035
|
-
* @license MIT
|
|
1036
|
-
*/
|
|
1037
|
-
/* eslint-disable no-proto */
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
1035
|
var INSPECT_MAX_BYTES = 50;
|
|
1041
1036
|
|
|
1042
1037
|
/**
|
|
@@ -3034,7 +3029,7 @@ Item.prototype.run = function () {
|
|
|
3034
3029
|
};
|
|
3035
3030
|
var title = 'browser';
|
|
3036
3031
|
var platform$3 = 'browser';
|
|
3037
|
-
var browser$
|
|
3032
|
+
var browser$2 = true;
|
|
3038
3033
|
var env = {};
|
|
3039
3034
|
var argv = [];
|
|
3040
3035
|
var version = ''; // empty string to avoid regexp issues
|
|
@@ -3095,10 +3090,10 @@ function uptime$1() {
|
|
|
3095
3090
|
return dif / 1000;
|
|
3096
3091
|
}
|
|
3097
3092
|
|
|
3098
|
-
var
|
|
3093
|
+
var process = {
|
|
3099
3094
|
nextTick: nextTick,
|
|
3100
3095
|
title: title,
|
|
3101
|
-
browser: browser$
|
|
3096
|
+
browser: browser$2,
|
|
3102
3097
|
env: env,
|
|
3103
3098
|
argv: argv,
|
|
3104
3099
|
version: version,
|
|
@@ -3127,17 +3122,33 @@ function getDefaultExportFromCjs (x) {
|
|
|
3127
3122
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3128
3123
|
}
|
|
3129
3124
|
|
|
3130
|
-
function
|
|
3131
|
-
|
|
3125
|
+
function getAugmentedNamespace(n) {
|
|
3126
|
+
if (n.__esModule) return n;
|
|
3127
|
+
var f = n.default;
|
|
3128
|
+
if (typeof f == "function") {
|
|
3129
|
+
var a = function a () {
|
|
3130
|
+
if (this instanceof a) {
|
|
3131
|
+
return Reflect.construct(f, arguments, this.constructor);
|
|
3132
|
+
}
|
|
3133
|
+
return f.apply(this, arguments);
|
|
3134
|
+
};
|
|
3135
|
+
a.prototype = f.prototype;
|
|
3136
|
+
} else a = {};
|
|
3137
|
+
Object.defineProperty(a, '__esModule', {value: true});
|
|
3138
|
+
Object.keys(n).forEach(function (k) {
|
|
3139
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
3140
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
3141
|
+
enumerable: true,
|
|
3142
|
+
get: function () {
|
|
3143
|
+
return n[k];
|
|
3144
|
+
}
|
|
3145
|
+
});
|
|
3146
|
+
});
|
|
3147
|
+
return a;
|
|
3132
3148
|
}
|
|
3133
3149
|
|
|
3134
3150
|
var text_min = {};
|
|
3135
3151
|
|
|
3136
|
-
text_min.inherits = inherits;
|
|
3137
|
-
text_min.debuglog = function(empty) {
|
|
3138
|
-
|
|
3139
|
-
}
|
|
3140
|
-
|
|
3141
3152
|
(function(scope) {function B(r,e){var f;return r instanceof Buffer?f=r:f=Buffer.from(r.buffer,r.byteOffset,r.byteLength),f.toString(e)}var w=function(r){return Buffer.from(r)};function h(r){for(var e=0,f=Math.min(256*256,r.length+1),n=new Uint16Array(f),i=[],o=0;;){var t=e<r.length;if(!t||o>=f-1){var s=n.subarray(0,o),m=s;if(i.push(String.fromCharCode.apply(null,m)),!t)return i.join("");r=r.subarray(e),e=0,o=0;}var a=r[e++];if((a&128)===0)n[o++]=a;else if((a&224)===192){var d=r[e++]&63;n[o++]=(a&31)<<6|d;}else if((a&240)===224){var d=r[e++]&63,l=r[e++]&63;n[o++]=(a&31)<<12|d<<6|l;}else if((a&248)===240){var d=r[e++]&63,l=r[e++]&63,R=r[e++]&63,c=(a&7)<<18|d<<12|l<<6|R;c>65535&&(c-=65536,n[o++]=c>>>10&1023|55296,c=56320|c&1023),n[o++]=c;}}}function F(r){for(var e=0,f=r.length,n=0,i=Math.max(32,f+(f>>>1)+7),o=new Uint8Array(i>>>3<<3);e<f;){var t=r.charCodeAt(e++);if(t>=55296&&t<=56319){if(e<f){var s=r.charCodeAt(e);(s&64512)===56320&&(++e,t=((t&1023)<<10)+(s&1023)+65536);}if(t>=55296&&t<=56319)continue}if(n+4>o.length){i+=8,i*=1+e/r.length*2,i=i>>>3<<3;var m=new Uint8Array(i);m.set(o),o=m;}if((t&4294967168)===0){o[n++]=t;continue}else if((t&4294965248)===0)o[n++]=t>>>6&31|192;else if((t&4294901760)===0)o[n++]=t>>>12&15|224,o[n++]=t>>>6&63|128;else if((t&4292870144)===0)o[n++]=t>>>18&7|240,o[n++]=t>>>12&63|128,o[n++]=t>>>6&63|128;else continue;o[n++]=t&63|128;}return o.slice?o.slice(0,n):o.subarray(0,n)}var u="Failed to ",p=function(r,e,f){if(r)throw new Error("".concat(u).concat(e,": the '").concat(f,"' option is unsupported."))};var x=typeof Buffer=="function"&&Buffer.from;var A=x?w:F;function v(){this.encoding="utf-8";}v.prototype.encode=function(r,e){return p(e&&e.stream,"encode","stream"),A(r)};function U(r){var e;try{var f=new Blob([r],{type:"text/plain;charset=UTF-8"});e=URL.createObjectURL(f);var n=new XMLHttpRequest;return n.open("GET",e,!1),n.send(),n.responseText}finally{e&&URL.revokeObjectURL(e);}}var O=!x&&typeof Blob=="function"&&typeof URL=="function"&&typeof URL.createObjectURL=="function",S=["utf-8","utf8","unicode-1-1-utf-8"],T=h;x?T=B:O&&(T=function(r){try{return U(r)}catch(e){return h(r)}});var y="construct 'TextDecoder'",E="".concat(u," ").concat(y,": the ");function g(r,e){p(e&&e.fatal,y,"fatal"),r=r||"utf-8";var f;if(x?f=Buffer.isEncoding(r):f=S.indexOf(r.toLowerCase())!==-1,!f)throw new RangeError("".concat(E," encoding label provided ('").concat(r,"') is invalid."));this.encoding=r,this.fatal=!1,this.ignoreBOM=!1;}g.prototype.decode=function(r,e){p(e&&e.stream,"decode","stream");var f;return r instanceof Uint8Array?f=r:r.buffer instanceof ArrayBuffer?f=new Uint8Array(r.buffer):f=new Uint8Array(r),T(f,this.encoding)};scope.TextEncoder=scope.TextEncoder||v;scope.TextDecoder=scope.TextDecoder||g;
|
|
3142
3153
|
}(typeof window !== 'undefined' ? window : (typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : commonjsGlobal)));
|
|
3143
3154
|
|
|
@@ -3485,12 +3496,6 @@ EventEmitter.prototype.removeListener =
|
|
|
3485
3496
|
|
|
3486
3497
|
return this;
|
|
3487
3498
|
};
|
|
3488
|
-
|
|
3489
|
-
// Alias for removeListener added in NodeJS 10.0
|
|
3490
|
-
// https://nodejs.org/api/events.html#events_emitter_off_eventname_listener
|
|
3491
|
-
EventEmitter.prototype.off = function(type, listener){
|
|
3492
|
-
return this.removeListener(type, listener);
|
|
3493
|
-
};
|
|
3494
3499
|
|
|
3495
3500
|
EventEmitter.prototype.removeAllListeners =
|
|
3496
3501
|
function removeAllListeners(type) {
|
|
@@ -4230,7 +4235,7 @@ Readable.prototype.read = function (n) {
|
|
|
4230
4235
|
|
|
4231
4236
|
function chunkInvalid(state, chunk) {
|
|
4232
4237
|
var er = null;
|
|
4233
|
-
if (!
|
|
4238
|
+
if (!isBuffer$1(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {
|
|
4234
4239
|
er = new TypeError('Invalid non-string/buffer chunk');
|
|
4235
4240
|
}
|
|
4236
4241
|
return er;
|
|
@@ -5569,7 +5574,7 @@ Stream$3.prototype.pipe = function(dest, options) {
|
|
|
5569
5574
|
return dest;
|
|
5570
5575
|
};
|
|
5571
5576
|
|
|
5572
|
-
var
|
|
5577
|
+
var stream = /*#__PURE__*/Object.freeze({
|
|
5573
5578
|
__proto__: null,
|
|
5574
5579
|
Duplex: Duplex,
|
|
5575
5580
|
PassThrough: PassThrough,
|
|
@@ -5580,7 +5585,7 @@ var _polyfillNode_stream = /*#__PURE__*/Object.freeze({
|
|
|
5580
5585
|
default: Stream$3
|
|
5581
5586
|
});
|
|
5582
5587
|
|
|
5583
|
-
var require$$3 = /*@__PURE__*/
|
|
5588
|
+
var require$$3 = /*@__PURE__*/getAugmentedNamespace(stream);
|
|
5584
5589
|
|
|
5585
5590
|
var Stream$2 = require$$3.Stream;
|
|
5586
5591
|
var util$2 = text_min;
|
|
@@ -5726,7 +5731,7 @@ CombinedStream$1.isStreamLike = function(stream) {
|
|
|
5726
5731
|
&& (typeof stream !== 'string')
|
|
5727
5732
|
&& (typeof stream !== 'boolean')
|
|
5728
5733
|
&& (typeof stream !== 'number')
|
|
5729
|
-
&& (!
|
|
5734
|
+
&& (!isBuffer$1(stream));
|
|
5730
5735
|
};
|
|
5731
5736
|
|
|
5732
5737
|
CombinedStream$1.prototype.append = function(stream) {
|
|
@@ -6102,7 +6107,7 @@ function basename(path, ext) {
|
|
|
6102
6107
|
function extname(path) {
|
|
6103
6108
|
return splitPath(path)[3];
|
|
6104
6109
|
}
|
|
6105
|
-
var
|
|
6110
|
+
var path$1 = {
|
|
6106
6111
|
extname: extname,
|
|
6107
6112
|
basename: basename,
|
|
6108
6113
|
dirname: dirname,
|
|
@@ -6132,10 +6137,10 @@ var substr = 'ab'.substr(-1) === 'b' ?
|
|
|
6132
6137
|
}
|
|
6133
6138
|
;
|
|
6134
6139
|
|
|
6135
|
-
var
|
|
6140
|
+
var path$2 = /*#__PURE__*/Object.freeze({
|
|
6136
6141
|
__proto__: null,
|
|
6137
6142
|
basename: basename,
|
|
6138
|
-
default:
|
|
6143
|
+
default: path$1,
|
|
6139
6144
|
delimiter: delimiter$1,
|
|
6140
6145
|
dirname: dirname,
|
|
6141
6146
|
extname: extname,
|
|
@@ -6147,7 +6152,7 @@ var _polyfillNode_path$1 = /*#__PURE__*/Object.freeze({
|
|
|
6147
6152
|
sep: sep
|
|
6148
6153
|
});
|
|
6149
6154
|
|
|
6150
|
-
var require$$2$1 = /*@__PURE__*/
|
|
6155
|
+
var require$$2$1 = /*@__PURE__*/getAugmentedNamespace(path$2);
|
|
6151
6156
|
|
|
6152
6157
|
var hasFetch = isFunction$1(global$1.fetch) && isFunction$1(global$1.ReadableStream);
|
|
6153
6158
|
|
|
@@ -6222,7 +6227,7 @@ function IncomingMessage(xhr, response, mode) {
|
|
|
6222
6227
|
// Fake the 'close' event, but only once 'end' fires
|
|
6223
6228
|
self.on('end', function() {
|
|
6224
6229
|
// The nextTick is necessary to prevent the 'request' module from causing an infinite loop
|
|
6225
|
-
|
|
6230
|
+
nextTick(function() {
|
|
6226
6231
|
self.emit('close');
|
|
6227
6232
|
});
|
|
6228
6233
|
});
|
|
@@ -6558,7 +6563,7 @@ ClientRequest.prototype._onFinish = function() {
|
|
|
6558
6563
|
try {
|
|
6559
6564
|
xhr.open(self._opts.method, self._opts.url, true);
|
|
6560
6565
|
} catch (err) {
|
|
6561
|
-
|
|
6566
|
+
nextTick(function() {
|
|
6562
6567
|
self.emit('error', err);
|
|
6563
6568
|
});
|
|
6564
6569
|
return
|
|
@@ -6604,7 +6609,7 @@ ClientRequest.prototype._onFinish = function() {
|
|
|
6604
6609
|
try {
|
|
6605
6610
|
xhr.send(body);
|
|
6606
6611
|
} catch (err) {
|
|
6607
|
-
|
|
6612
|
+
nextTick(function() {
|
|
6608
6613
|
self.emit('error', err);
|
|
6609
6614
|
});
|
|
6610
6615
|
return
|
|
@@ -7110,20 +7115,33 @@ function parse$1(qs, sep, eq, options) {
|
|
|
7110
7115
|
return obj;
|
|
7111
7116
|
}
|
|
7112
7117
|
|
|
7113
|
-
//
|
|
7114
|
-
|
|
7115
|
-
|
|
7118
|
+
// Copyright Joyent, Inc. and other Node contributors.
|
|
7119
|
+
//
|
|
7120
|
+
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
7121
|
+
// copy of this software and associated documentation files (the
|
|
7122
|
+
// "Software"), to deal in the Software without restriction, including
|
|
7123
|
+
// without limitation the rights to use, copy, modify, merge, publish,
|
|
7124
|
+
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
7125
|
+
// persons to whom the Software is furnished to do so, subject to the
|
|
7126
|
+
// following conditions:
|
|
7127
|
+
//
|
|
7128
|
+
// The above copyright notice and this permission notice shall be included
|
|
7129
|
+
// in all copies or substantial portions of the Software.
|
|
7130
|
+
//
|
|
7131
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
7132
|
+
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
7133
|
+
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
7134
|
+
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
7135
|
+
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
7136
|
+
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
7137
|
+
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
7138
|
+
|
|
7116
7139
|
var url$1 = {
|
|
7117
7140
|
parse: urlParse,
|
|
7118
7141
|
resolve: urlResolve,
|
|
7119
7142
|
resolveObject: urlResolveObject,
|
|
7120
|
-
fileURLToPath: urlFileURLToPath,
|
|
7121
7143
|
format: urlFormat,
|
|
7122
|
-
Url: Url
|
|
7123
|
-
|
|
7124
|
-
// WHATWG API
|
|
7125
|
-
URL: URL$2,
|
|
7126
|
-
URLSearchParams: URLSearchParams$1,
|
|
7144
|
+
Url: Url
|
|
7127
7145
|
};
|
|
7128
7146
|
function Url() {
|
|
7129
7147
|
this.protocol = null;
|
|
@@ -7464,31 +7482,6 @@ function parse(self, url, parseQueryString, slashesDenoteHost) {
|
|
|
7464
7482
|
return self;
|
|
7465
7483
|
}
|
|
7466
7484
|
|
|
7467
|
-
function urlFileURLToPath(path) {
|
|
7468
|
-
if (typeof path === 'string')
|
|
7469
|
-
path = new Url().parse(path);
|
|
7470
|
-
else if (!(path instanceof Url))
|
|
7471
|
-
throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type ' + (typeof path) + String(path));
|
|
7472
|
-
if (path.protocol !== 'file:')
|
|
7473
|
-
throw new TypeError('The URL must be of scheme file');
|
|
7474
|
-
return getPathFromURLPosix(path);
|
|
7475
|
-
}
|
|
7476
|
-
|
|
7477
|
-
function getPathFromURLPosix(url) {
|
|
7478
|
-
const pathname = url.pathname;
|
|
7479
|
-
for (let n = 0; n < pathname.length; n++) {
|
|
7480
|
-
if (pathname[n] === '%') {
|
|
7481
|
-
const third = pathname.codePointAt(n + 2) | 0x20;
|
|
7482
|
-
if (pathname[n + 1] === '2' && third === 102) {
|
|
7483
|
-
throw new TypeError(
|
|
7484
|
-
'must not include encoded / characters'
|
|
7485
|
-
);
|
|
7486
|
-
}
|
|
7487
|
-
}
|
|
7488
|
-
}
|
|
7489
|
-
return decodeURIComponent(pathname);
|
|
7490
|
-
}
|
|
7491
|
-
|
|
7492
7485
|
// format a parsed object into a url string
|
|
7493
7486
|
function urlFormat(obj) {
|
|
7494
7487
|
// ensure it's an object, and not a string url.
|
|
@@ -7858,167 +7851,16 @@ function parseHost(self) {
|
|
|
7858
7851
|
if (host) self.hostname = host;
|
|
7859
7852
|
}
|
|
7860
7853
|
|
|
7861
|
-
var
|
|
7854
|
+
var url$2 = /*#__PURE__*/Object.freeze({
|
|
7862
7855
|
__proto__: null,
|
|
7863
|
-
URL: URL$2,
|
|
7864
|
-
URLSearchParams: URLSearchParams$1,
|
|
7865
7856
|
Url: Url,
|
|
7866
7857
|
default: url$1,
|
|
7867
|
-
fileURLToPath: urlFileURLToPath,
|
|
7868
7858
|
format: urlFormat,
|
|
7869
7859
|
parse: urlParse,
|
|
7870
7860
|
resolve: urlResolve,
|
|
7871
7861
|
resolveObject: urlResolveObject
|
|
7872
7862
|
});
|
|
7873
7863
|
|
|
7874
|
-
function request$1(opts, cb) {
|
|
7875
|
-
if (typeof opts === 'string')
|
|
7876
|
-
opts = urlParse(opts);
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
// Normally, the page is loaded from http or https, so not specifying a protocol
|
|
7880
|
-
// will result in a (valid) protocol-relative url. However, this won't work if
|
|
7881
|
-
// the protocol is something else, like 'file:'
|
|
7882
|
-
var defaultProtocol = global$1.location.protocol.search(/^https?:$/) === -1 ? 'http:' : '';
|
|
7883
|
-
|
|
7884
|
-
var protocol = opts.protocol || defaultProtocol;
|
|
7885
|
-
var host = opts.hostname || opts.host;
|
|
7886
|
-
var port = opts.port;
|
|
7887
|
-
var path = opts.path || '/';
|
|
7888
|
-
|
|
7889
|
-
// Necessary for IPv6 addresses
|
|
7890
|
-
if (host && host.indexOf(':') !== -1)
|
|
7891
|
-
host = '[' + host + ']';
|
|
7892
|
-
|
|
7893
|
-
// This may be a relative url. The browser should always be able to interpret it correctly.
|
|
7894
|
-
opts.url = (host ? (protocol + '//' + host) : '') + (port ? ':' + port : '') + path;
|
|
7895
|
-
opts.method = (opts.method || 'GET').toUpperCase();
|
|
7896
|
-
opts.headers = opts.headers || {};
|
|
7897
|
-
|
|
7898
|
-
// Also valid opts.auth, opts.mode
|
|
7899
|
-
|
|
7900
|
-
var req = new ClientRequest(opts);
|
|
7901
|
-
if (cb)
|
|
7902
|
-
req.on('response', cb);
|
|
7903
|
-
return req
|
|
7904
|
-
}
|
|
7905
|
-
|
|
7906
|
-
function get$1(opts, cb) {
|
|
7907
|
-
var req = request$1(opts, cb);
|
|
7908
|
-
req.end();
|
|
7909
|
-
return req
|
|
7910
|
-
}
|
|
7911
|
-
|
|
7912
|
-
function Agent$1() {}
|
|
7913
|
-
Agent$1.defaultMaxSockets = 4;
|
|
7914
|
-
|
|
7915
|
-
var METHODS$1 = [
|
|
7916
|
-
'CHECKOUT',
|
|
7917
|
-
'CONNECT',
|
|
7918
|
-
'COPY',
|
|
7919
|
-
'DELETE',
|
|
7920
|
-
'GET',
|
|
7921
|
-
'HEAD',
|
|
7922
|
-
'LOCK',
|
|
7923
|
-
'M-SEARCH',
|
|
7924
|
-
'MERGE',
|
|
7925
|
-
'MKACTIVITY',
|
|
7926
|
-
'MKCOL',
|
|
7927
|
-
'MOVE',
|
|
7928
|
-
'NOTIFY',
|
|
7929
|
-
'OPTIONS',
|
|
7930
|
-
'PATCH',
|
|
7931
|
-
'POST',
|
|
7932
|
-
'PROPFIND',
|
|
7933
|
-
'PROPPATCH',
|
|
7934
|
-
'PURGE',
|
|
7935
|
-
'PUT',
|
|
7936
|
-
'REPORT',
|
|
7937
|
-
'SEARCH',
|
|
7938
|
-
'SUBSCRIBE',
|
|
7939
|
-
'TRACE',
|
|
7940
|
-
'UNLOCK',
|
|
7941
|
-
'UNSUBSCRIBE'
|
|
7942
|
-
];
|
|
7943
|
-
var STATUS_CODES$1 = {
|
|
7944
|
-
100: 'Continue',
|
|
7945
|
-
101: 'Switching Protocols',
|
|
7946
|
-
102: 'Processing', // RFC 2518, obsoleted by RFC 4918
|
|
7947
|
-
200: 'OK',
|
|
7948
|
-
201: 'Created',
|
|
7949
|
-
202: 'Accepted',
|
|
7950
|
-
203: 'Non-Authoritative Information',
|
|
7951
|
-
204: 'No Content',
|
|
7952
|
-
205: 'Reset Content',
|
|
7953
|
-
206: 'Partial Content',
|
|
7954
|
-
207: 'Multi-Status', // RFC 4918
|
|
7955
|
-
300: 'Multiple Choices',
|
|
7956
|
-
301: 'Moved Permanently',
|
|
7957
|
-
302: 'Moved Temporarily',
|
|
7958
|
-
303: 'See Other',
|
|
7959
|
-
304: 'Not Modified',
|
|
7960
|
-
305: 'Use Proxy',
|
|
7961
|
-
307: 'Temporary Redirect',
|
|
7962
|
-
400: 'Bad Request',
|
|
7963
|
-
401: 'Unauthorized',
|
|
7964
|
-
402: 'Payment Required',
|
|
7965
|
-
403: 'Forbidden',
|
|
7966
|
-
404: 'Not Found',
|
|
7967
|
-
405: 'Method Not Allowed',
|
|
7968
|
-
406: 'Not Acceptable',
|
|
7969
|
-
407: 'Proxy Authentication Required',
|
|
7970
|
-
408: 'Request Time-out',
|
|
7971
|
-
409: 'Conflict',
|
|
7972
|
-
410: 'Gone',
|
|
7973
|
-
411: 'Length Required',
|
|
7974
|
-
412: 'Precondition Failed',
|
|
7975
|
-
413: 'Request Entity Too Large',
|
|
7976
|
-
414: 'Request-URI Too Large',
|
|
7977
|
-
415: 'Unsupported Media Type',
|
|
7978
|
-
416: 'Requested Range Not Satisfiable',
|
|
7979
|
-
417: 'Expectation Failed',
|
|
7980
|
-
418: 'I\'m a teapot', // RFC 2324
|
|
7981
|
-
422: 'Unprocessable Entity', // RFC 4918
|
|
7982
|
-
423: 'Locked', // RFC 4918
|
|
7983
|
-
424: 'Failed Dependency', // RFC 4918
|
|
7984
|
-
425: 'Unordered Collection', // RFC 4918
|
|
7985
|
-
426: 'Upgrade Required', // RFC 2817
|
|
7986
|
-
428: 'Precondition Required', // RFC 6585
|
|
7987
|
-
429: 'Too Many Requests', // RFC 6585
|
|
7988
|
-
431: 'Request Header Fields Too Large', // RFC 6585
|
|
7989
|
-
500: 'Internal Server Error',
|
|
7990
|
-
501: 'Not Implemented',
|
|
7991
|
-
502: 'Bad Gateway',
|
|
7992
|
-
503: 'Service Unavailable',
|
|
7993
|
-
504: 'Gateway Time-out',
|
|
7994
|
-
505: 'HTTP Version Not Supported',
|
|
7995
|
-
506: 'Variant Also Negotiates', // RFC 2295
|
|
7996
|
-
507: 'Insufficient Storage', // RFC 4918
|
|
7997
|
-
509: 'Bandwidth Limit Exceeded',
|
|
7998
|
-
510: 'Not Extended', // RFC 2774
|
|
7999
|
-
511: 'Network Authentication Required' // RFC 6585
|
|
8000
|
-
};
|
|
8001
|
-
|
|
8002
|
-
var http$2 = {
|
|
8003
|
-
request: request$1,
|
|
8004
|
-
get: get$1,
|
|
8005
|
-
Agent: Agent$1,
|
|
8006
|
-
METHODS: METHODS$1,
|
|
8007
|
-
STATUS_CODES: STATUS_CODES$1
|
|
8008
|
-
};
|
|
8009
|
-
|
|
8010
|
-
var _polyfillNode_http = /*#__PURE__*/Object.freeze({
|
|
8011
|
-
__proto__: null,
|
|
8012
|
-
Agent: Agent$1,
|
|
8013
|
-
METHODS: METHODS$1,
|
|
8014
|
-
STATUS_CODES: STATUS_CODES$1,
|
|
8015
|
-
default: http$2,
|
|
8016
|
-
get: get$1,
|
|
8017
|
-
request: request$1
|
|
8018
|
-
});
|
|
8019
|
-
|
|
8020
|
-
var require$$1 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_http);
|
|
8021
|
-
|
|
8022
7864
|
function request(opts, cb) {
|
|
8023
7865
|
if (typeof opts === 'string')
|
|
8024
7866
|
opts = urlParse(opts);
|
|
@@ -8147,7 +7989,7 @@ var STATUS_CODES = {
|
|
|
8147
7989
|
511: 'Network Authentication Required' // RFC 6585
|
|
8148
7990
|
};
|
|
8149
7991
|
|
|
8150
|
-
var
|
|
7992
|
+
var http$2 = {
|
|
8151
7993
|
request,
|
|
8152
7994
|
get,
|
|
8153
7995
|
Agent,
|
|
@@ -8155,28 +7997,28 @@ var https$2 = {
|
|
|
8155
7997
|
STATUS_CODES
|
|
8156
7998
|
};
|
|
8157
7999
|
|
|
8158
|
-
var
|
|
8000
|
+
var http$3 = /*#__PURE__*/Object.freeze({
|
|
8159
8001
|
__proto__: null,
|
|
8160
8002
|
Agent: Agent,
|
|
8161
8003
|
METHODS: METHODS,
|
|
8162
8004
|
STATUS_CODES: STATUS_CODES,
|
|
8163
|
-
default:
|
|
8005
|
+
default: http$2,
|
|
8164
8006
|
get: get,
|
|
8165
8007
|
request: request
|
|
8166
8008
|
});
|
|
8167
8009
|
|
|
8168
|
-
var require$$2 = /*@__PURE__*/
|
|
8010
|
+
var require$$2 = /*@__PURE__*/getAugmentedNamespace(http$3);
|
|
8169
8011
|
|
|
8170
|
-
var require$$0$3 = /*@__PURE__*/
|
|
8012
|
+
var require$$0$3 = /*@__PURE__*/getAugmentedNamespace(url$2);
|
|
8171
8013
|
|
|
8172
|
-
var
|
|
8014
|
+
var empty = {};
|
|
8173
8015
|
|
|
8174
|
-
var
|
|
8016
|
+
var empty$1 = /*#__PURE__*/Object.freeze({
|
|
8175
8017
|
__proto__: null,
|
|
8176
|
-
default:
|
|
8018
|
+
default: empty
|
|
8177
8019
|
});
|
|
8178
8020
|
|
|
8179
|
-
var require$$6 = /*@__PURE__*/
|
|
8021
|
+
var require$$6 = /*@__PURE__*/getAugmentedNamespace(empty$1);
|
|
8180
8022
|
|
|
8181
8023
|
var mimeTypes = {};
|
|
8182
8024
|
|
|
@@ -19095,17 +18937,17 @@ var defer_1 = defer$1;
|
|
|
19095
18937
|
*/
|
|
19096
18938
|
function defer$1(fn)
|
|
19097
18939
|
{
|
|
19098
|
-
var nextTick = typeof setImmediate == 'function'
|
|
18940
|
+
var nextTick$1 = typeof setImmediate == 'function'
|
|
19099
18941
|
? setImmediate
|
|
19100
18942
|
: (
|
|
19101
|
-
typeof
|
|
19102
|
-
?
|
|
18943
|
+
typeof process == 'object' && typeof nextTick == 'function'
|
|
18944
|
+
? nextTick
|
|
19103
18945
|
: null
|
|
19104
18946
|
);
|
|
19105
18947
|
|
|
19106
|
-
if (nextTick)
|
|
18948
|
+
if (nextTick$1)
|
|
19107
18949
|
{
|
|
19108
|
-
nextTick(fn);
|
|
18950
|
+
nextTick$1(fn);
|
|
19109
18951
|
}
|
|
19110
18952
|
else
|
|
19111
18953
|
{
|
|
@@ -19485,7 +19327,7 @@ var populate$1 = function(dst, src) {
|
|
|
19485
19327
|
var CombinedStream = combined_stream;
|
|
19486
19328
|
var util = text_min;
|
|
19487
19329
|
var path = require$$2$1;
|
|
19488
|
-
var http$1 = require$$
|
|
19330
|
+
var http$1 = require$$2;
|
|
19489
19331
|
var https$1 = require$$2;
|
|
19490
19332
|
var parseUrl$1 = require$$0$3.parse;
|
|
19491
19333
|
var fs = require$$6;
|
|
@@ -19572,7 +19414,7 @@ FormData$1.prototype._trackLength = function(header, value, options) {
|
|
|
19572
19414
|
// incoming file to finish to get its size.
|
|
19573
19415
|
if (options.knownLength != null) {
|
|
19574
19416
|
valueLength += +options.knownLength;
|
|
19575
|
-
} else if (
|
|
19417
|
+
} else if (isBuffer$1(value)) {
|
|
19576
19418
|
valueLength = value.length;
|
|
19577
19419
|
} else if (typeof value === 'string') {
|
|
19578
19420
|
valueLength = Buffer.byteLength(value);
|
|
@@ -19811,7 +19653,7 @@ FormData$1.prototype.getBuffer = function() {
|
|
|
19811
19653
|
if (typeof this._streams[i] !== 'function') {
|
|
19812
19654
|
|
|
19813
19655
|
// Add content to the buffer.
|
|
19814
|
-
if(
|
|
19656
|
+
if(isBuffer$1(this._streams[i])) {
|
|
19815
19657
|
dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]);
|
|
19816
19658
|
}else {
|
|
19817
19659
|
dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]);
|
|
@@ -19883,7 +19725,7 @@ FormData$1.prototype.getLength = function(cb) {
|
|
|
19883
19725
|
}
|
|
19884
19726
|
|
|
19885
19727
|
if (!this._valuesToMeasure.length) {
|
|
19886
|
-
|
|
19728
|
+
nextTick(cb.bind(this, null, knownLength));
|
|
19887
19729
|
return;
|
|
19888
19730
|
}
|
|
19889
19731
|
|
|
@@ -21262,7 +21104,7 @@ function shouldProxy(hostname, port) {
|
|
|
21262
21104
|
* @private
|
|
21263
21105
|
*/
|
|
21264
21106
|
function getEnv(key) {
|
|
21265
|
-
return
|
|
21107
|
+
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || '';
|
|
21266
21108
|
}
|
|
21267
21109
|
|
|
21268
21110
|
var getProxyForUrl_1 = getProxyForUrl;
|
|
@@ -21728,7 +21570,7 @@ function ifError(err) {
|
|
|
21728
21570
|
if (err) throw err;
|
|
21729
21571
|
}
|
|
21730
21572
|
|
|
21731
|
-
var
|
|
21573
|
+
var assert$3 = /*#__PURE__*/Object.freeze({
|
|
21732
21574
|
__proto__: null,
|
|
21733
21575
|
AssertionError: AssertionError,
|
|
21734
21576
|
assert: ok,
|
|
@@ -21748,1266 +21590,1266 @@ var _polyfillNode_assert = /*#__PURE__*/Object.freeze({
|
|
|
21748
21590
|
throws: throws
|
|
21749
21591
|
});
|
|
21750
21592
|
|
|
21751
|
-
var require$$4 = /*@__PURE__*/
|
|
21752
|
-
|
|
21753
|
-
var src = {exports: {}};
|
|
21754
|
-
|
|
21755
|
-
var node = {exports: {}};
|
|
21593
|
+
var require$$4 = /*@__PURE__*/getAugmentedNamespace(assert$3);
|
|
21756
21594
|
|
|
21757
|
-
|
|
21758
|
-
// from https://github.com/substack/tty-browserify/blob/1ba769a6429d242f36226538835b4034bf6b7886/index.js
|
|
21595
|
+
var browser$1 = true;
|
|
21759
21596
|
|
|
21760
|
-
|
|
21761
|
-
return false;
|
|
21762
|
-
}
|
|
21597
|
+
var src = {exports: {}};
|
|
21763
21598
|
|
|
21764
|
-
|
|
21765
|
-
throw new Error('tty.ReadStream is not implemented');
|
|
21766
|
-
}
|
|
21599
|
+
var browser = {exports: {}};
|
|
21767
21600
|
|
|
21768
|
-
|
|
21769
|
-
|
|
21770
|
-
|
|
21601
|
+
/**
|
|
21602
|
+
* Helpers.
|
|
21603
|
+
*/
|
|
21771
21604
|
|
|
21772
|
-
var
|
|
21773
|
-
|
|
21774
|
-
ReadStream: ReadStream,
|
|
21775
|
-
WriteStream: WriteStream
|
|
21776
|
-
};
|
|
21605
|
+
var ms;
|
|
21606
|
+
var hasRequiredMs;
|
|
21777
21607
|
|
|
21778
|
-
|
|
21779
|
-
|
|
21780
|
-
|
|
21781
|
-
|
|
21782
|
-
|
|
21783
|
-
|
|
21784
|
-
|
|
21608
|
+
function requireMs () {
|
|
21609
|
+
if (hasRequiredMs) return ms;
|
|
21610
|
+
hasRequiredMs = 1;
|
|
21611
|
+
var s = 1000;
|
|
21612
|
+
var m = s * 60;
|
|
21613
|
+
var h = m * 60;
|
|
21614
|
+
var d = h * 24;
|
|
21615
|
+
var w = d * 7;
|
|
21616
|
+
var y = d * 365.25;
|
|
21785
21617
|
|
|
21786
|
-
|
|
21618
|
+
/**
|
|
21619
|
+
* Parse or format the given `val`.
|
|
21620
|
+
*
|
|
21621
|
+
* Options:
|
|
21622
|
+
*
|
|
21623
|
+
* - `long` verbose formatting [false]
|
|
21624
|
+
*
|
|
21625
|
+
* @param {String|Number} val
|
|
21626
|
+
* @param {Object} [options]
|
|
21627
|
+
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
21628
|
+
* @return {String|Number}
|
|
21629
|
+
* @api public
|
|
21630
|
+
*/
|
|
21787
21631
|
|
|
21788
|
-
|
|
21789
|
-
|
|
21632
|
+
ms = function(val, options) {
|
|
21633
|
+
options = options || {};
|
|
21634
|
+
var type = typeof val;
|
|
21635
|
+
if (type === 'string' && val.length > 0) {
|
|
21636
|
+
return parse(val);
|
|
21637
|
+
} else if (type === 'number' && isFinite(val)) {
|
|
21638
|
+
return options.long ? fmtLong(val) : fmtShort(val);
|
|
21639
|
+
}
|
|
21640
|
+
throw new Error(
|
|
21641
|
+
'val is not a non-empty string or a valid number. val=' +
|
|
21642
|
+
JSON.stringify(val)
|
|
21643
|
+
);
|
|
21644
|
+
};
|
|
21790
21645
|
|
|
21791
|
-
|
|
21792
|
-
|
|
21793
|
-
|
|
21794
|
-
|
|
21795
|
-
|
|
21796
|
-
|
|
21797
|
-
|
|
21798
|
-
furnished to do so, subject to the following conditions:
|
|
21646
|
+
/**
|
|
21647
|
+
* Parse the given `str` and return milliseconds.
|
|
21648
|
+
*
|
|
21649
|
+
* @param {String} str
|
|
21650
|
+
* @return {Number}
|
|
21651
|
+
* @api private
|
|
21652
|
+
*/
|
|
21799
21653
|
|
|
21800
|
-
|
|
21801
|
-
|
|
21654
|
+
function parse(str) {
|
|
21655
|
+
str = String(str);
|
|
21656
|
+
if (str.length > 100) {
|
|
21657
|
+
return;
|
|
21658
|
+
}
|
|
21659
|
+
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(
|
|
21660
|
+
str
|
|
21661
|
+
);
|
|
21662
|
+
if (!match) {
|
|
21663
|
+
return;
|
|
21664
|
+
}
|
|
21665
|
+
var n = parseFloat(match[1]);
|
|
21666
|
+
var type = (match[2] || 'ms').toLowerCase();
|
|
21667
|
+
switch (type) {
|
|
21668
|
+
case 'years':
|
|
21669
|
+
case 'year':
|
|
21670
|
+
case 'yrs':
|
|
21671
|
+
case 'yr':
|
|
21672
|
+
case 'y':
|
|
21673
|
+
return n * y;
|
|
21674
|
+
case 'weeks':
|
|
21675
|
+
case 'week':
|
|
21676
|
+
case 'w':
|
|
21677
|
+
return n * w;
|
|
21678
|
+
case 'days':
|
|
21679
|
+
case 'day':
|
|
21680
|
+
case 'd':
|
|
21681
|
+
return n * d;
|
|
21682
|
+
case 'hours':
|
|
21683
|
+
case 'hour':
|
|
21684
|
+
case 'hrs':
|
|
21685
|
+
case 'hr':
|
|
21686
|
+
case 'h':
|
|
21687
|
+
return n * h;
|
|
21688
|
+
case 'minutes':
|
|
21689
|
+
case 'minute':
|
|
21690
|
+
case 'mins':
|
|
21691
|
+
case 'min':
|
|
21692
|
+
case 'm':
|
|
21693
|
+
return n * m;
|
|
21694
|
+
case 'seconds':
|
|
21695
|
+
case 'second':
|
|
21696
|
+
case 'secs':
|
|
21697
|
+
case 'sec':
|
|
21698
|
+
case 's':
|
|
21699
|
+
return n * s;
|
|
21700
|
+
case 'milliseconds':
|
|
21701
|
+
case 'millisecond':
|
|
21702
|
+
case 'msecs':
|
|
21703
|
+
case 'msec':
|
|
21704
|
+
case 'ms':
|
|
21705
|
+
return n;
|
|
21706
|
+
default:
|
|
21707
|
+
return undefined;
|
|
21708
|
+
}
|
|
21709
|
+
}
|
|
21802
21710
|
|
|
21803
|
-
|
|
21804
|
-
|
|
21805
|
-
|
|
21806
|
-
|
|
21807
|
-
|
|
21808
|
-
|
|
21809
|
-
|
|
21711
|
+
/**
|
|
21712
|
+
* Short format for `ms`.
|
|
21713
|
+
*
|
|
21714
|
+
* @param {Number} ms
|
|
21715
|
+
* @return {String}
|
|
21716
|
+
* @api private
|
|
21717
|
+
*/
|
|
21810
21718
|
|
|
21811
|
-
|
|
21812
|
-
var
|
|
21813
|
-
|
|
21814
|
-
|
|
21815
|
-
|
|
21816
|
-
|
|
21817
|
-
|
|
21818
|
-
|
|
21819
|
-
|
|
21820
|
-
|
|
21821
|
-
|
|
21822
|
-
|
|
21823
|
-
|
|
21824
|
-
|
|
21825
|
-
|
|
21826
|
-
|
|
21827
|
-
}
|
|
21828
|
-
return _endianness;
|
|
21829
|
-
}
|
|
21719
|
+
function fmtShort(ms) {
|
|
21720
|
+
var msAbs = Math.abs(ms);
|
|
21721
|
+
if (msAbs >= d) {
|
|
21722
|
+
return Math.round(ms / d) + 'd';
|
|
21723
|
+
}
|
|
21724
|
+
if (msAbs >= h) {
|
|
21725
|
+
return Math.round(ms / h) + 'h';
|
|
21726
|
+
}
|
|
21727
|
+
if (msAbs >= m) {
|
|
21728
|
+
return Math.round(ms / m) + 'm';
|
|
21729
|
+
}
|
|
21730
|
+
if (msAbs >= s) {
|
|
21731
|
+
return Math.round(ms / s) + 's';
|
|
21732
|
+
}
|
|
21733
|
+
return ms + 'ms';
|
|
21734
|
+
}
|
|
21830
21735
|
|
|
21831
|
-
|
|
21832
|
-
|
|
21833
|
-
|
|
21834
|
-
|
|
21835
|
-
}
|
|
21736
|
+
/**
|
|
21737
|
+
* Long format for `ms`.
|
|
21738
|
+
*
|
|
21739
|
+
* @param {Number} ms
|
|
21740
|
+
* @return {String}
|
|
21741
|
+
* @api private
|
|
21742
|
+
*/
|
|
21836
21743
|
|
|
21837
|
-
function
|
|
21838
|
-
|
|
21839
|
-
|
|
21744
|
+
function fmtLong(ms) {
|
|
21745
|
+
var msAbs = Math.abs(ms);
|
|
21746
|
+
if (msAbs >= d) {
|
|
21747
|
+
return plural(ms, msAbs, d, 'day');
|
|
21748
|
+
}
|
|
21749
|
+
if (msAbs >= h) {
|
|
21750
|
+
return plural(ms, msAbs, h, 'hour');
|
|
21751
|
+
}
|
|
21752
|
+
if (msAbs >= m) {
|
|
21753
|
+
return plural(ms, msAbs, m, 'minute');
|
|
21754
|
+
}
|
|
21755
|
+
if (msAbs >= s) {
|
|
21756
|
+
return plural(ms, msAbs, s, 'second');
|
|
21757
|
+
}
|
|
21758
|
+
return ms + ' ms';
|
|
21759
|
+
}
|
|
21840
21760
|
|
|
21841
|
-
|
|
21842
|
-
|
|
21843
|
-
|
|
21761
|
+
/**
|
|
21762
|
+
* Pluralization helper.
|
|
21763
|
+
*/
|
|
21844
21764
|
|
|
21845
|
-
function
|
|
21846
|
-
|
|
21765
|
+
function plural(ms, msAbs, n, name) {
|
|
21766
|
+
var isPlural = msAbs >= n * 1.5;
|
|
21767
|
+
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
|
21768
|
+
}
|
|
21769
|
+
return ms;
|
|
21847
21770
|
}
|
|
21848
21771
|
|
|
21849
|
-
|
|
21850
|
-
|
|
21851
|
-
}
|
|
21772
|
+
var common;
|
|
21773
|
+
var hasRequiredCommon;
|
|
21852
21774
|
|
|
21853
|
-
function
|
|
21854
|
-
|
|
21855
|
-
|
|
21775
|
+
function requireCommon () {
|
|
21776
|
+
if (hasRequiredCommon) return common;
|
|
21777
|
+
hasRequiredCommon = 1;
|
|
21778
|
+
/**
|
|
21779
|
+
* This is the common logic for both the Node.js and web browser
|
|
21780
|
+
* implementations of `debug()`.
|
|
21781
|
+
*/
|
|
21856
21782
|
|
|
21857
|
-
function
|
|
21858
|
-
|
|
21859
|
-
|
|
21783
|
+
function setup(env) {
|
|
21784
|
+
createDebug.debug = createDebug;
|
|
21785
|
+
createDebug.default = createDebug;
|
|
21786
|
+
createDebug.coerce = coerce;
|
|
21787
|
+
createDebug.disable = disable;
|
|
21788
|
+
createDebug.enable = enable;
|
|
21789
|
+
createDebug.enabled = enabled;
|
|
21790
|
+
createDebug.humanize = requireMs();
|
|
21791
|
+
createDebug.destroy = destroy;
|
|
21860
21792
|
|
|
21861
|
-
|
|
21862
|
-
|
|
21863
|
-
|
|
21864
|
-
}
|
|
21865
|
-
return '';
|
|
21866
|
-
}
|
|
21793
|
+
Object.keys(env).forEach(key => {
|
|
21794
|
+
createDebug[key] = env[key];
|
|
21795
|
+
});
|
|
21867
21796
|
|
|
21868
|
-
|
|
21869
|
-
|
|
21870
|
-
|
|
21797
|
+
/**
|
|
21798
|
+
* The currently active debug mode names, and names to skip.
|
|
21799
|
+
*/
|
|
21871
21800
|
|
|
21872
|
-
|
|
21873
|
-
|
|
21874
|
-
}
|
|
21801
|
+
createDebug.names = [];
|
|
21802
|
+
createDebug.skips = [];
|
|
21875
21803
|
|
|
21876
|
-
|
|
21877
|
-
|
|
21878
|
-
|
|
21804
|
+
/**
|
|
21805
|
+
* Map of special "%n" handling functions, for the debug "format" argument.
|
|
21806
|
+
*
|
|
21807
|
+
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
21808
|
+
*/
|
|
21809
|
+
createDebug.formatters = {};
|
|
21879
21810
|
|
|
21880
|
-
|
|
21881
|
-
|
|
21882
|
-
}
|
|
21811
|
+
/**
|
|
21812
|
+
* Selects a color for a debug namespace
|
|
21813
|
+
* @param {String} namespace The namespace string for the debug instance to be colored
|
|
21814
|
+
* @return {Number|String} An ANSI color code for the given namespace
|
|
21815
|
+
* @api private
|
|
21816
|
+
*/
|
|
21817
|
+
function selectColor(namespace) {
|
|
21818
|
+
let hash = 0;
|
|
21883
21819
|
|
|
21884
|
-
|
|
21885
|
-
|
|
21886
|
-
|
|
21887
|
-
|
|
21820
|
+
for (let i = 0; i < namespace.length; i++) {
|
|
21821
|
+
hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
|
|
21822
|
+
hash |= 0; // Convert to 32bit integer
|
|
21823
|
+
}
|
|
21888
21824
|
|
|
21889
|
-
|
|
21825
|
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
21826
|
+
}
|
|
21827
|
+
createDebug.selectColor = selectColor;
|
|
21890
21828
|
|
|
21891
|
-
|
|
21892
|
-
|
|
21893
|
-
|
|
21829
|
+
/**
|
|
21830
|
+
* Create a debugger with the given `namespace`.
|
|
21831
|
+
*
|
|
21832
|
+
* @param {String} namespace
|
|
21833
|
+
* @return {Function}
|
|
21834
|
+
* @api public
|
|
21835
|
+
*/
|
|
21836
|
+
function createDebug(namespace) {
|
|
21837
|
+
let prevTime;
|
|
21838
|
+
let enableOverride = null;
|
|
21839
|
+
let namespacesCache;
|
|
21840
|
+
let enabledCache;
|
|
21894
21841
|
|
|
21895
|
-
|
|
21896
|
-
|
|
21897
|
-
|
|
21898
|
-
|
|
21899
|
-
|
|
21900
|
-
tmpdir: tmpdir,
|
|
21901
|
-
tmpDir: tmpDir,
|
|
21902
|
-
networkInterfaces:networkInterfaces,
|
|
21903
|
-
getNetworkInterfaces: getNetworkInterfaces,
|
|
21904
|
-
release: release,
|
|
21905
|
-
type: type,
|
|
21906
|
-
cpus: cpus,
|
|
21907
|
-
totalmem: totalmem,
|
|
21908
|
-
freemem: freemem,
|
|
21909
|
-
uptime: uptime,
|
|
21910
|
-
loadavg: loadavg,
|
|
21911
|
-
hostname: hostname,
|
|
21912
|
-
endianness: endianness,
|
|
21913
|
-
};
|
|
21842
|
+
function debug(...args) {
|
|
21843
|
+
// Disabled?
|
|
21844
|
+
if (!debug.enabled) {
|
|
21845
|
+
return;
|
|
21846
|
+
}
|
|
21914
21847
|
|
|
21915
|
-
|
|
21916
|
-
__proto__: null,
|
|
21917
|
-
EOL: EOL,
|
|
21918
|
-
arch: arch,
|
|
21919
|
-
cpus: cpus,
|
|
21920
|
-
default: _polyfillNode_os,
|
|
21921
|
-
endianness: endianness,
|
|
21922
|
-
freemem: freemem,
|
|
21923
|
-
getNetworkInterfaces: getNetworkInterfaces,
|
|
21924
|
-
homedir: homedir,
|
|
21925
|
-
hostname: hostname,
|
|
21926
|
-
loadavg: loadavg,
|
|
21927
|
-
networkInterfaces: networkInterfaces,
|
|
21928
|
-
platform: platform,
|
|
21929
|
-
release: release,
|
|
21930
|
-
tmpDir: tmpDir,
|
|
21931
|
-
tmpdir: tmpdir,
|
|
21932
|
-
totalmem: totalmem,
|
|
21933
|
-
type: type,
|
|
21934
|
-
uptime: uptime
|
|
21935
|
-
});
|
|
21848
|
+
const self = debug;
|
|
21936
21849
|
|
|
21937
|
-
|
|
21850
|
+
// Set `diff` timestamp
|
|
21851
|
+
const curr = Number(new Date());
|
|
21852
|
+
const ms = curr - (prevTime || curr);
|
|
21853
|
+
self.diff = ms;
|
|
21854
|
+
self.prev = prevTime;
|
|
21855
|
+
self.curr = curr;
|
|
21856
|
+
prevTime = curr;
|
|
21938
21857
|
|
|
21939
|
-
|
|
21940
|
-
var hasRequiredHasFlag;
|
|
21858
|
+
args[0] = createDebug.coerce(args[0]);
|
|
21941
21859
|
|
|
21942
|
-
|
|
21943
|
-
|
|
21944
|
-
|
|
21945
|
-
|
|
21946
|
-
argv = argv || browser$1$1.argv;
|
|
21947
|
-
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
|
|
21948
|
-
const pos = argv.indexOf(prefix + flag);
|
|
21949
|
-
const terminatorPos = argv.indexOf('--');
|
|
21950
|
-
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
21951
|
-
};
|
|
21952
|
-
return hasFlag;
|
|
21953
|
-
}
|
|
21860
|
+
if (typeof args[0] !== 'string') {
|
|
21861
|
+
// Anything else let's inspect with %O
|
|
21862
|
+
args.unshift('%O');
|
|
21863
|
+
}
|
|
21954
21864
|
|
|
21955
|
-
|
|
21956
|
-
|
|
21865
|
+
// Apply any `formatters` transformations
|
|
21866
|
+
let index = 0;
|
|
21867
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
21868
|
+
// If we encounter an escaped % then don't increase the array index
|
|
21869
|
+
if (match === '%%') {
|
|
21870
|
+
return '%';
|
|
21871
|
+
}
|
|
21872
|
+
index++;
|
|
21873
|
+
const formatter = createDebug.formatters[format];
|
|
21874
|
+
if (typeof formatter === 'function') {
|
|
21875
|
+
const val = args[index];
|
|
21876
|
+
match = formatter.call(self, val);
|
|
21957
21877
|
|
|
21958
|
-
|
|
21959
|
-
|
|
21960
|
-
|
|
21961
|
-
|
|
21962
|
-
|
|
21878
|
+
// Now we need to remove `args[index]` since it's inlined in the `format`
|
|
21879
|
+
args.splice(index, 1);
|
|
21880
|
+
index--;
|
|
21881
|
+
}
|
|
21882
|
+
return match;
|
|
21883
|
+
});
|
|
21963
21884
|
|
|
21964
|
-
|
|
21885
|
+
// Apply env-specific formatting (colors, etc.)
|
|
21886
|
+
createDebug.formatArgs.call(self, args);
|
|
21965
21887
|
|
|
21966
|
-
|
|
21967
|
-
|
|
21968
|
-
|
|
21969
|
-
hasFlag('color=false')) {
|
|
21970
|
-
forceColor = false;
|
|
21971
|
-
} else if (hasFlag('color') ||
|
|
21972
|
-
hasFlag('colors') ||
|
|
21973
|
-
hasFlag('color=true') ||
|
|
21974
|
-
hasFlag('color=always')) {
|
|
21975
|
-
forceColor = true;
|
|
21976
|
-
}
|
|
21977
|
-
if ('FORCE_COLOR' in env) {
|
|
21978
|
-
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
21979
|
-
}
|
|
21888
|
+
const logFn = self.log || createDebug.log;
|
|
21889
|
+
logFn.apply(self, args);
|
|
21890
|
+
}
|
|
21980
21891
|
|
|
21981
|
-
|
|
21982
|
-
|
|
21983
|
-
|
|
21984
|
-
|
|
21892
|
+
debug.namespace = namespace;
|
|
21893
|
+
debug.useColors = createDebug.useColors();
|
|
21894
|
+
debug.color = createDebug.selectColor(namespace);
|
|
21895
|
+
debug.extend = extend;
|
|
21896
|
+
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
|
21985
21897
|
|
|
21986
|
-
|
|
21987
|
-
|
|
21988
|
-
|
|
21989
|
-
|
|
21990
|
-
|
|
21991
|
-
|
|
21992
|
-
|
|
21898
|
+
Object.defineProperty(debug, 'enabled', {
|
|
21899
|
+
enumerable: true,
|
|
21900
|
+
configurable: false,
|
|
21901
|
+
get: () => {
|
|
21902
|
+
if (enableOverride !== null) {
|
|
21903
|
+
return enableOverride;
|
|
21904
|
+
}
|
|
21905
|
+
if (namespacesCache !== createDebug.namespaces) {
|
|
21906
|
+
namespacesCache = createDebug.namespaces;
|
|
21907
|
+
enabledCache = createDebug.enabled(namespace);
|
|
21908
|
+
}
|
|
21993
21909
|
|
|
21994
|
-
|
|
21995
|
-
|
|
21996
|
-
|
|
21997
|
-
|
|
21910
|
+
return enabledCache;
|
|
21911
|
+
},
|
|
21912
|
+
set: v => {
|
|
21913
|
+
enableOverride = v;
|
|
21914
|
+
}
|
|
21915
|
+
});
|
|
21998
21916
|
|
|
21999
|
-
|
|
22000
|
-
|
|
22001
|
-
|
|
22002
|
-
|
|
22003
|
-
}
|
|
21917
|
+
// Env-specific initialization logic for debug instances
|
|
21918
|
+
if (typeof createDebug.init === 'function') {
|
|
21919
|
+
createDebug.init(debug);
|
|
21920
|
+
}
|
|
22004
21921
|
|
|
22005
|
-
|
|
22006
|
-
return 2;
|
|
21922
|
+
return debug;
|
|
22007
21923
|
}
|
|
22008
21924
|
|
|
22009
|
-
|
|
22010
|
-
|
|
21925
|
+
function extend(namespace, delimiter) {
|
|
21926
|
+
const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
|
21927
|
+
newDebug.log = this.log;
|
|
21928
|
+
return newDebug;
|
|
22011
21929
|
}
|
|
22012
21930
|
|
|
22013
|
-
|
|
21931
|
+
/**
|
|
21932
|
+
* Enables a debug mode by namespaces. This can include modes
|
|
21933
|
+
* separated by a colon and wildcards.
|
|
21934
|
+
*
|
|
21935
|
+
* @param {String} namespaces
|
|
21936
|
+
* @api public
|
|
21937
|
+
*/
|
|
21938
|
+
function enable(namespaces) {
|
|
21939
|
+
createDebug.save(namespaces);
|
|
21940
|
+
createDebug.namespaces = namespaces;
|
|
22014
21941
|
|
|
22015
|
-
|
|
22016
|
-
|
|
22017
|
-
// libuv that enables 256 color output on Windows. Anything earlier and it
|
|
22018
|
-
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
|
|
22019
|
-
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
|
|
22020
|
-
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
|
22021
|
-
// that supports 16m/TrueColor.
|
|
22022
|
-
const osRelease = os.release().split('.');
|
|
22023
|
-
if (
|
|
22024
|
-
Number(browser$1$1.versions.node.split('.')[0]) >= 8 &&
|
|
22025
|
-
Number(osRelease[0]) >= 10 &&
|
|
22026
|
-
Number(osRelease[2]) >= 10586
|
|
22027
|
-
) {
|
|
22028
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
22029
|
-
}
|
|
21942
|
+
createDebug.names = [];
|
|
21943
|
+
createDebug.skips = [];
|
|
22030
21944
|
|
|
22031
|
-
|
|
22032
|
-
|
|
21945
|
+
let i;
|
|
21946
|
+
const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
|
21947
|
+
const len = split.length;
|
|
22033
21948
|
|
|
22034
|
-
|
|
22035
|
-
|
|
22036
|
-
|
|
22037
|
-
|
|
21949
|
+
for (i = 0; i < len; i++) {
|
|
21950
|
+
if (!split[i]) {
|
|
21951
|
+
// ignore empty strings
|
|
21952
|
+
continue;
|
|
21953
|
+
}
|
|
22038
21954
|
|
|
22039
|
-
|
|
22040
|
-
}
|
|
21955
|
+
namespaces = split[i].replace(/\*/g, '.*?');
|
|
22041
21956
|
|
|
22042
|
-
|
|
22043
|
-
|
|
21957
|
+
if (namespaces[0] === '-') {
|
|
21958
|
+
createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
|
|
21959
|
+
} else {
|
|
21960
|
+
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
|
21961
|
+
}
|
|
21962
|
+
}
|
|
22044
21963
|
}
|
|
22045
21964
|
|
|
22046
|
-
|
|
22047
|
-
|
|
21965
|
+
/**
|
|
21966
|
+
* Disable debug output.
|
|
21967
|
+
*
|
|
21968
|
+
* @return {String} namespaces
|
|
21969
|
+
* @api public
|
|
21970
|
+
*/
|
|
21971
|
+
function disable() {
|
|
21972
|
+
const namespaces = [
|
|
21973
|
+
...createDebug.names.map(toNamespace),
|
|
21974
|
+
...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
|
|
21975
|
+
].join(',');
|
|
21976
|
+
createDebug.enable('');
|
|
21977
|
+
return namespaces;
|
|
22048
21978
|
}
|
|
22049
21979
|
|
|
22050
|
-
|
|
22051
|
-
|
|
22052
|
-
|
|
22053
|
-
|
|
22054
|
-
|
|
22055
|
-
|
|
22056
|
-
|
|
22057
|
-
|
|
22058
|
-
|
|
21980
|
+
/**
|
|
21981
|
+
* Returns true if the given mode name is enabled, false otherwise.
|
|
21982
|
+
*
|
|
21983
|
+
* @param {String} name
|
|
21984
|
+
* @return {Boolean}
|
|
21985
|
+
* @api public
|
|
21986
|
+
*/
|
|
21987
|
+
function enabled(name) {
|
|
21988
|
+
if (name[name.length - 1] === '*') {
|
|
21989
|
+
return true;
|
|
22059
21990
|
}
|
|
22060
|
-
}
|
|
22061
|
-
|
|
22062
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
22063
|
-
return 2;
|
|
22064
|
-
}
|
|
22065
21991
|
|
|
22066
|
-
|
|
22067
|
-
|
|
22068
|
-
}
|
|
21992
|
+
let i;
|
|
21993
|
+
let len;
|
|
22069
21994
|
|
|
22070
|
-
|
|
22071
|
-
|
|
22072
|
-
|
|
21995
|
+
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
21996
|
+
if (createDebug.skips[i].test(name)) {
|
|
21997
|
+
return false;
|
|
21998
|
+
}
|
|
21999
|
+
}
|
|
22073
22000
|
|
|
22074
|
-
|
|
22075
|
-
|
|
22001
|
+
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
|
22002
|
+
if (createDebug.names[i].test(name)) {
|
|
22003
|
+
return true;
|
|
22004
|
+
}
|
|
22005
|
+
}
|
|
22006
|
+
|
|
22007
|
+
return false;
|
|
22076
22008
|
}
|
|
22077
22009
|
|
|
22078
|
-
|
|
22079
|
-
|
|
22010
|
+
/**
|
|
22011
|
+
* Convert regexp to namespace
|
|
22012
|
+
*
|
|
22013
|
+
* @param {RegExp} regxep
|
|
22014
|
+
* @return {String} namespace
|
|
22015
|
+
* @api private
|
|
22016
|
+
*/
|
|
22017
|
+
function toNamespace(regexp) {
|
|
22018
|
+
return regexp.toString()
|
|
22019
|
+
.substring(2, regexp.toString().length - 2)
|
|
22020
|
+
.replace(/\.\*\?$/, '*');
|
|
22021
|
+
}
|
|
22080
22022
|
|
|
22081
|
-
|
|
22082
|
-
|
|
22083
|
-
|
|
22084
|
-
|
|
22023
|
+
/**
|
|
22024
|
+
* Coerce `val`.
|
|
22025
|
+
*
|
|
22026
|
+
* @param {Mixed} val
|
|
22027
|
+
* @return {Mixed}
|
|
22028
|
+
* @api private
|
|
22029
|
+
*/
|
|
22030
|
+
function coerce(val) {
|
|
22031
|
+
if (val instanceof Error) {
|
|
22032
|
+
return val.stack || val.message;
|
|
22033
|
+
}
|
|
22034
|
+
return val;
|
|
22035
|
+
}
|
|
22085
22036
|
|
|
22086
|
-
|
|
22087
|
-
|
|
22088
|
-
|
|
22089
|
-
|
|
22090
|
-
|
|
22091
|
-
|
|
22092
|
-
}
|
|
22037
|
+
/**
|
|
22038
|
+
* XXX DO NOT USE. This is a temporary stub function.
|
|
22039
|
+
* XXX It WILL be removed in the next major release.
|
|
22040
|
+
*/
|
|
22041
|
+
function destroy() {
|
|
22042
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
22043
|
+
}
|
|
22093
22044
|
|
|
22094
|
-
|
|
22095
|
-
* Helpers.
|
|
22096
|
-
*/
|
|
22045
|
+
createDebug.enable(createDebug.load());
|
|
22097
22046
|
|
|
22098
|
-
|
|
22099
|
-
|
|
22047
|
+
return createDebug;
|
|
22048
|
+
}
|
|
22100
22049
|
|
|
22101
|
-
|
|
22102
|
-
|
|
22103
|
-
|
|
22104
|
-
var s = 1000;
|
|
22105
|
-
var m = s * 60;
|
|
22106
|
-
var h = m * 60;
|
|
22107
|
-
var d = h * 24;
|
|
22108
|
-
var w = d * 7;
|
|
22109
|
-
var y = d * 365.25;
|
|
22050
|
+
common = setup;
|
|
22051
|
+
return common;
|
|
22052
|
+
}
|
|
22110
22053
|
|
|
22111
|
-
|
|
22112
|
-
* Parse or format the given `val`.
|
|
22113
|
-
*
|
|
22114
|
-
* Options:
|
|
22115
|
-
*
|
|
22116
|
-
* - `long` verbose formatting [false]
|
|
22117
|
-
*
|
|
22118
|
-
* @param {String|Number} val
|
|
22119
|
-
* @param {Object} [options]
|
|
22120
|
-
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
22121
|
-
* @return {String|Number}
|
|
22122
|
-
* @api public
|
|
22123
|
-
*/
|
|
22054
|
+
var hasRequiredBrowser;
|
|
22124
22055
|
|
|
22125
|
-
|
|
22126
|
-
|
|
22127
|
-
|
|
22128
|
-
|
|
22129
|
-
|
|
22130
|
-
|
|
22131
|
-
|
|
22132
|
-
}
|
|
22133
|
-
throw new Error(
|
|
22134
|
-
'val is not a non-empty string or a valid number. val=' +
|
|
22135
|
-
JSON.stringify(val)
|
|
22136
|
-
);
|
|
22137
|
-
};
|
|
22056
|
+
function requireBrowser () {
|
|
22057
|
+
if (hasRequiredBrowser) return browser.exports;
|
|
22058
|
+
hasRequiredBrowser = 1;
|
|
22059
|
+
(function (module, exports) {
|
|
22060
|
+
/**
|
|
22061
|
+
* This is the web browser implementation of `debug()`.
|
|
22062
|
+
*/
|
|
22138
22063
|
|
|
22139
|
-
|
|
22140
|
-
|
|
22141
|
-
|
|
22142
|
-
|
|
22143
|
-
|
|
22144
|
-
|
|
22145
|
-
|
|
22064
|
+
exports.formatArgs = formatArgs;
|
|
22065
|
+
exports.save = save;
|
|
22066
|
+
exports.load = load;
|
|
22067
|
+
exports.useColors = useColors;
|
|
22068
|
+
exports.storage = localstorage();
|
|
22069
|
+
exports.destroy = (() => {
|
|
22070
|
+
let warned = false;
|
|
22146
22071
|
|
|
22147
|
-
|
|
22148
|
-
|
|
22149
|
-
|
|
22150
|
-
|
|
22151
|
-
|
|
22152
|
-
|
|
22153
|
-
|
|
22154
|
-
);
|
|
22155
|
-
if (!match) {
|
|
22156
|
-
return;
|
|
22157
|
-
}
|
|
22158
|
-
var n = parseFloat(match[1]);
|
|
22159
|
-
var type = (match[2] || 'ms').toLowerCase();
|
|
22160
|
-
switch (type) {
|
|
22161
|
-
case 'years':
|
|
22162
|
-
case 'year':
|
|
22163
|
-
case 'yrs':
|
|
22164
|
-
case 'yr':
|
|
22165
|
-
case 'y':
|
|
22166
|
-
return n * y;
|
|
22167
|
-
case 'weeks':
|
|
22168
|
-
case 'week':
|
|
22169
|
-
case 'w':
|
|
22170
|
-
return n * w;
|
|
22171
|
-
case 'days':
|
|
22172
|
-
case 'day':
|
|
22173
|
-
case 'd':
|
|
22174
|
-
return n * d;
|
|
22175
|
-
case 'hours':
|
|
22176
|
-
case 'hour':
|
|
22177
|
-
case 'hrs':
|
|
22178
|
-
case 'hr':
|
|
22179
|
-
case 'h':
|
|
22180
|
-
return n * h;
|
|
22181
|
-
case 'minutes':
|
|
22182
|
-
case 'minute':
|
|
22183
|
-
case 'mins':
|
|
22184
|
-
case 'min':
|
|
22185
|
-
case 'm':
|
|
22186
|
-
return n * m;
|
|
22187
|
-
case 'seconds':
|
|
22188
|
-
case 'second':
|
|
22189
|
-
case 'secs':
|
|
22190
|
-
case 'sec':
|
|
22191
|
-
case 's':
|
|
22192
|
-
return n * s;
|
|
22193
|
-
case 'milliseconds':
|
|
22194
|
-
case 'millisecond':
|
|
22195
|
-
case 'msecs':
|
|
22196
|
-
case 'msec':
|
|
22197
|
-
case 'ms':
|
|
22198
|
-
return n;
|
|
22199
|
-
default:
|
|
22200
|
-
return undefined;
|
|
22201
|
-
}
|
|
22202
|
-
}
|
|
22072
|
+
return () => {
|
|
22073
|
+
if (!warned) {
|
|
22074
|
+
warned = true;
|
|
22075
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
22076
|
+
}
|
|
22077
|
+
};
|
|
22078
|
+
})();
|
|
22203
22079
|
|
|
22204
|
-
|
|
22205
|
-
|
|
22206
|
-
|
|
22207
|
-
* @param {Number} ms
|
|
22208
|
-
* @return {String}
|
|
22209
|
-
* @api private
|
|
22210
|
-
*/
|
|
22080
|
+
/**
|
|
22081
|
+
* Colors.
|
|
22082
|
+
*/
|
|
22211
22083
|
|
|
22212
|
-
|
|
22213
|
-
|
|
22214
|
-
|
|
22215
|
-
|
|
22216
|
-
|
|
22217
|
-
|
|
22218
|
-
|
|
22219
|
-
|
|
22220
|
-
|
|
22221
|
-
|
|
22222
|
-
|
|
22223
|
-
|
|
22224
|
-
|
|
22225
|
-
|
|
22226
|
-
|
|
22227
|
-
|
|
22084
|
+
exports.colors = [
|
|
22085
|
+
'#0000CC',
|
|
22086
|
+
'#0000FF',
|
|
22087
|
+
'#0033CC',
|
|
22088
|
+
'#0033FF',
|
|
22089
|
+
'#0066CC',
|
|
22090
|
+
'#0066FF',
|
|
22091
|
+
'#0099CC',
|
|
22092
|
+
'#0099FF',
|
|
22093
|
+
'#00CC00',
|
|
22094
|
+
'#00CC33',
|
|
22095
|
+
'#00CC66',
|
|
22096
|
+
'#00CC99',
|
|
22097
|
+
'#00CCCC',
|
|
22098
|
+
'#00CCFF',
|
|
22099
|
+
'#3300CC',
|
|
22100
|
+
'#3300FF',
|
|
22101
|
+
'#3333CC',
|
|
22102
|
+
'#3333FF',
|
|
22103
|
+
'#3366CC',
|
|
22104
|
+
'#3366FF',
|
|
22105
|
+
'#3399CC',
|
|
22106
|
+
'#3399FF',
|
|
22107
|
+
'#33CC00',
|
|
22108
|
+
'#33CC33',
|
|
22109
|
+
'#33CC66',
|
|
22110
|
+
'#33CC99',
|
|
22111
|
+
'#33CCCC',
|
|
22112
|
+
'#33CCFF',
|
|
22113
|
+
'#6600CC',
|
|
22114
|
+
'#6600FF',
|
|
22115
|
+
'#6633CC',
|
|
22116
|
+
'#6633FF',
|
|
22117
|
+
'#66CC00',
|
|
22118
|
+
'#66CC33',
|
|
22119
|
+
'#9900CC',
|
|
22120
|
+
'#9900FF',
|
|
22121
|
+
'#9933CC',
|
|
22122
|
+
'#9933FF',
|
|
22123
|
+
'#99CC00',
|
|
22124
|
+
'#99CC33',
|
|
22125
|
+
'#CC0000',
|
|
22126
|
+
'#CC0033',
|
|
22127
|
+
'#CC0066',
|
|
22128
|
+
'#CC0099',
|
|
22129
|
+
'#CC00CC',
|
|
22130
|
+
'#CC00FF',
|
|
22131
|
+
'#CC3300',
|
|
22132
|
+
'#CC3333',
|
|
22133
|
+
'#CC3366',
|
|
22134
|
+
'#CC3399',
|
|
22135
|
+
'#CC33CC',
|
|
22136
|
+
'#CC33FF',
|
|
22137
|
+
'#CC6600',
|
|
22138
|
+
'#CC6633',
|
|
22139
|
+
'#CC9900',
|
|
22140
|
+
'#CC9933',
|
|
22141
|
+
'#CCCC00',
|
|
22142
|
+
'#CCCC33',
|
|
22143
|
+
'#FF0000',
|
|
22144
|
+
'#FF0033',
|
|
22145
|
+
'#FF0066',
|
|
22146
|
+
'#FF0099',
|
|
22147
|
+
'#FF00CC',
|
|
22148
|
+
'#FF00FF',
|
|
22149
|
+
'#FF3300',
|
|
22150
|
+
'#FF3333',
|
|
22151
|
+
'#FF3366',
|
|
22152
|
+
'#FF3399',
|
|
22153
|
+
'#FF33CC',
|
|
22154
|
+
'#FF33FF',
|
|
22155
|
+
'#FF6600',
|
|
22156
|
+
'#FF6633',
|
|
22157
|
+
'#FF9900',
|
|
22158
|
+
'#FF9933',
|
|
22159
|
+
'#FFCC00',
|
|
22160
|
+
'#FFCC33'
|
|
22161
|
+
];
|
|
22228
22162
|
|
|
22229
|
-
|
|
22230
|
-
|
|
22231
|
-
|
|
22232
|
-
|
|
22233
|
-
|
|
22234
|
-
|
|
22235
|
-
|
|
22163
|
+
/**
|
|
22164
|
+
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
22165
|
+
* and the Firebug extension (any Firefox version) are known
|
|
22166
|
+
* to support "%c" CSS customizations.
|
|
22167
|
+
*
|
|
22168
|
+
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
|
22169
|
+
*/
|
|
22236
22170
|
|
|
22237
|
-
|
|
22238
|
-
|
|
22239
|
-
|
|
22240
|
-
|
|
22241
|
-
|
|
22242
|
-
|
|
22243
|
-
|
|
22244
|
-
|
|
22245
|
-
if (msAbs >= m) {
|
|
22246
|
-
return plural(ms, msAbs, m, 'minute');
|
|
22247
|
-
}
|
|
22248
|
-
if (msAbs >= s) {
|
|
22249
|
-
return plural(ms, msAbs, s, 'second');
|
|
22250
|
-
}
|
|
22251
|
-
return ms + ' ms';
|
|
22252
|
-
}
|
|
22171
|
+
// eslint-disable-next-line complexity
|
|
22172
|
+
function useColors() {
|
|
22173
|
+
// NB: In an Electron preload script, document will be defined but not fully
|
|
22174
|
+
// initialized. Since we know we're in Chrome, we'll just detect this case
|
|
22175
|
+
// explicitly
|
|
22176
|
+
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
|
22177
|
+
return true;
|
|
22178
|
+
}
|
|
22253
22179
|
|
|
22254
|
-
|
|
22255
|
-
|
|
22256
|
-
|
|
22180
|
+
// Internet Explorer and Edge do not support colors.
|
|
22181
|
+
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
22182
|
+
return false;
|
|
22183
|
+
}
|
|
22257
22184
|
|
|
22258
|
-
|
|
22259
|
-
|
|
22260
|
-
|
|
22261
|
-
|
|
22262
|
-
|
|
22263
|
-
|
|
22185
|
+
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
|
22186
|
+
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
|
22187
|
+
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
|
22188
|
+
// Is firebug? http://stackoverflow.com/a/398120/376773
|
|
22189
|
+
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
|
22190
|
+
// Is firefox >= v31?
|
|
22191
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
22192
|
+
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
|
22193
|
+
// Double check webkit in userAgent just in case we are in a worker
|
|
22194
|
+
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
|
22195
|
+
}
|
|
22264
22196
|
|
|
22265
|
-
|
|
22266
|
-
|
|
22197
|
+
/**
|
|
22198
|
+
* Colorize log arguments if enabled.
|
|
22199
|
+
*
|
|
22200
|
+
* @api public
|
|
22201
|
+
*/
|
|
22267
22202
|
|
|
22268
|
-
function
|
|
22269
|
-
|
|
22270
|
-
|
|
22271
|
-
|
|
22272
|
-
|
|
22273
|
-
|
|
22274
|
-
|
|
22203
|
+
function formatArgs(args) {
|
|
22204
|
+
args[0] = (this.useColors ? '%c' : '') +
|
|
22205
|
+
this.namespace +
|
|
22206
|
+
(this.useColors ? ' %c' : ' ') +
|
|
22207
|
+
args[0] +
|
|
22208
|
+
(this.useColors ? '%c ' : ' ') +
|
|
22209
|
+
'+' + module.exports.humanize(this.diff);
|
|
22275
22210
|
|
|
22276
|
-
|
|
22277
|
-
|
|
22278
|
-
|
|
22279
|
-
createDebug.coerce = coerce;
|
|
22280
|
-
createDebug.disable = disable;
|
|
22281
|
-
createDebug.enable = enable;
|
|
22282
|
-
createDebug.enabled = enabled;
|
|
22283
|
-
createDebug.humanize = requireMs();
|
|
22284
|
-
createDebug.destroy = destroy;
|
|
22211
|
+
if (!this.useColors) {
|
|
22212
|
+
return;
|
|
22213
|
+
}
|
|
22285
22214
|
|
|
22286
|
-
|
|
22287
|
-
|
|
22288
|
-
});
|
|
22215
|
+
const c = 'color: ' + this.color;
|
|
22216
|
+
args.splice(1, 0, c, 'color: inherit');
|
|
22289
22217
|
|
|
22290
|
-
|
|
22291
|
-
|
|
22292
|
-
|
|
22218
|
+
// The final "%c" is somewhat tricky, because there could be other
|
|
22219
|
+
// arguments passed either before or after the %c, so we need to
|
|
22220
|
+
// figure out the correct index to insert the CSS into
|
|
22221
|
+
let index = 0;
|
|
22222
|
+
let lastC = 0;
|
|
22223
|
+
args[0].replace(/%[a-zA-Z%]/g, match => {
|
|
22224
|
+
if (match === '%%') {
|
|
22225
|
+
return;
|
|
22226
|
+
}
|
|
22227
|
+
index++;
|
|
22228
|
+
if (match === '%c') {
|
|
22229
|
+
// We only are interested in the *last* %c
|
|
22230
|
+
// (the user may have provided their own)
|
|
22231
|
+
lastC = index;
|
|
22232
|
+
}
|
|
22233
|
+
});
|
|
22293
22234
|
|
|
22294
|
-
|
|
22295
|
-
|
|
22235
|
+
args.splice(lastC, 0, c);
|
|
22236
|
+
}
|
|
22296
22237
|
|
|
22297
22238
|
/**
|
|
22298
|
-
|
|
22299
|
-
|
|
22300
|
-
|
|
22301
|
-
|
|
22302
|
-
|
|
22239
|
+
* Invokes `console.debug()` when available.
|
|
22240
|
+
* No-op when `console.debug` is not a "function".
|
|
22241
|
+
* If `console.debug` is not available, falls back
|
|
22242
|
+
* to `console.log`.
|
|
22243
|
+
*
|
|
22244
|
+
* @api public
|
|
22245
|
+
*/
|
|
22246
|
+
exports.log = console.debug || console.log || (() => {});
|
|
22303
22247
|
|
|
22304
22248
|
/**
|
|
22305
|
-
|
|
22306
|
-
|
|
22307
|
-
|
|
22308
|
-
|
|
22309
|
-
|
|
22310
|
-
function
|
|
22311
|
-
|
|
22249
|
+
* Save `namespaces`.
|
|
22250
|
+
*
|
|
22251
|
+
* @param {String} namespaces
|
|
22252
|
+
* @api private
|
|
22253
|
+
*/
|
|
22254
|
+
function save(namespaces) {
|
|
22255
|
+
try {
|
|
22256
|
+
if (namespaces) {
|
|
22257
|
+
exports.storage.setItem('debug', namespaces);
|
|
22258
|
+
} else {
|
|
22259
|
+
exports.storage.removeItem('debug');
|
|
22260
|
+
}
|
|
22261
|
+
} catch (error) {
|
|
22262
|
+
// Swallow
|
|
22263
|
+
// XXX (@Qix-) should we be logging these?
|
|
22264
|
+
}
|
|
22265
|
+
}
|
|
22312
22266
|
|
|
22313
|
-
|
|
22314
|
-
|
|
22315
|
-
|
|
22267
|
+
/**
|
|
22268
|
+
* Load `namespaces`.
|
|
22269
|
+
*
|
|
22270
|
+
* @return {String} returns the previously persisted debug modes
|
|
22271
|
+
* @api private
|
|
22272
|
+
*/
|
|
22273
|
+
function load() {
|
|
22274
|
+
let r;
|
|
22275
|
+
try {
|
|
22276
|
+
r = exports.storage.getItem('debug');
|
|
22277
|
+
} catch (error) {
|
|
22278
|
+
// Swallow
|
|
22279
|
+
// XXX (@Qix-) should we be logging these?
|
|
22316
22280
|
}
|
|
22317
22281
|
|
|
22318
|
-
|
|
22282
|
+
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
22283
|
+
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
|
22284
|
+
r = process.env.DEBUG;
|
|
22285
|
+
}
|
|
22286
|
+
|
|
22287
|
+
return r;
|
|
22319
22288
|
}
|
|
22320
|
-
createDebug.selectColor = selectColor;
|
|
22321
22289
|
|
|
22322
22290
|
/**
|
|
22323
|
-
|
|
22324
|
-
|
|
22325
|
-
|
|
22326
|
-
|
|
22327
|
-
|
|
22328
|
-
|
|
22329
|
-
|
|
22330
|
-
|
|
22331
|
-
|
|
22332
|
-
let namespacesCache;
|
|
22333
|
-
let enabledCache;
|
|
22334
|
-
|
|
22335
|
-
function debug(...args) {
|
|
22336
|
-
// Disabled?
|
|
22337
|
-
if (!debug.enabled) {
|
|
22338
|
-
return;
|
|
22339
|
-
}
|
|
22291
|
+
* Localstorage attempts to return the localstorage.
|
|
22292
|
+
*
|
|
22293
|
+
* This is necessary because safari throws
|
|
22294
|
+
* when a user disables cookies/localstorage
|
|
22295
|
+
* and you attempt to access it.
|
|
22296
|
+
*
|
|
22297
|
+
* @return {LocalStorage}
|
|
22298
|
+
* @api private
|
|
22299
|
+
*/
|
|
22340
22300
|
|
|
22341
|
-
|
|
22301
|
+
function localstorage() {
|
|
22302
|
+
try {
|
|
22303
|
+
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
|
22304
|
+
// The Browser also has localStorage in the global context.
|
|
22305
|
+
return localStorage;
|
|
22306
|
+
} catch (error) {
|
|
22307
|
+
// Swallow
|
|
22308
|
+
// XXX (@Qix-) should we be logging these?
|
|
22309
|
+
}
|
|
22310
|
+
}
|
|
22342
22311
|
|
|
22343
|
-
|
|
22344
|
-
const curr = Number(new Date());
|
|
22345
|
-
const ms = curr - (prevTime || curr);
|
|
22346
|
-
self.diff = ms;
|
|
22347
|
-
self.prev = prevTime;
|
|
22348
|
-
self.curr = curr;
|
|
22349
|
-
prevTime = curr;
|
|
22312
|
+
module.exports = requireCommon()(exports);
|
|
22350
22313
|
|
|
22351
|
-
|
|
22314
|
+
const {formatters} = module.exports;
|
|
22352
22315
|
|
|
22353
|
-
|
|
22354
|
-
|
|
22355
|
-
|
|
22356
|
-
}
|
|
22316
|
+
/**
|
|
22317
|
+
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
|
22318
|
+
*/
|
|
22357
22319
|
|
|
22358
|
-
|
|
22359
|
-
|
|
22360
|
-
|
|
22361
|
-
|
|
22362
|
-
|
|
22363
|
-
|
|
22364
|
-
|
|
22365
|
-
|
|
22366
|
-
|
|
22367
|
-
|
|
22368
|
-
const val = args[index];
|
|
22369
|
-
match = formatter.call(self, val);
|
|
22320
|
+
formatters.j = function (v) {
|
|
22321
|
+
try {
|
|
22322
|
+
return JSON.stringify(v);
|
|
22323
|
+
} catch (error) {
|
|
22324
|
+
return '[UnexpectedJSONParseError]: ' + error.message;
|
|
22325
|
+
}
|
|
22326
|
+
};
|
|
22327
|
+
} (browser, browser.exports));
|
|
22328
|
+
return browser.exports;
|
|
22329
|
+
}
|
|
22370
22330
|
|
|
22371
|
-
|
|
22372
|
-
args.splice(index, 1);
|
|
22373
|
-
index--;
|
|
22374
|
-
}
|
|
22375
|
-
return match;
|
|
22376
|
-
});
|
|
22331
|
+
var node = {exports: {}};
|
|
22377
22332
|
|
|
22378
|
-
|
|
22379
|
-
|
|
22333
|
+
// MIT lisence
|
|
22334
|
+
// from https://github.com/substack/tty-browserify/blob/1ba769a6429d242f36226538835b4034bf6b7886/index.js
|
|
22380
22335
|
|
|
22381
|
-
|
|
22382
|
-
|
|
22383
|
-
|
|
22336
|
+
function isatty() {
|
|
22337
|
+
return false;
|
|
22338
|
+
}
|
|
22384
22339
|
|
|
22385
|
-
|
|
22386
|
-
|
|
22387
|
-
|
|
22388
|
-
debug.extend = extend;
|
|
22389
|
-
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
|
22340
|
+
function ReadStream() {
|
|
22341
|
+
throw new Error('tty.ReadStream is not implemented');
|
|
22342
|
+
}
|
|
22390
22343
|
|
|
22391
|
-
|
|
22392
|
-
|
|
22393
|
-
|
|
22394
|
-
get: () => {
|
|
22395
|
-
if (enableOverride !== null) {
|
|
22396
|
-
return enableOverride;
|
|
22397
|
-
}
|
|
22398
|
-
if (namespacesCache !== createDebug.namespaces) {
|
|
22399
|
-
namespacesCache = createDebug.namespaces;
|
|
22400
|
-
enabledCache = createDebug.enabled(namespace);
|
|
22401
|
-
}
|
|
22344
|
+
function WriteStream() {
|
|
22345
|
+
throw new Error('tty.ReadStream is not implemented');
|
|
22346
|
+
}
|
|
22402
22347
|
|
|
22403
|
-
|
|
22404
|
-
|
|
22405
|
-
|
|
22406
|
-
|
|
22407
|
-
|
|
22408
|
-
});
|
|
22348
|
+
var tty = {
|
|
22349
|
+
isatty: isatty,
|
|
22350
|
+
ReadStream: ReadStream,
|
|
22351
|
+
WriteStream: WriteStream
|
|
22352
|
+
};
|
|
22409
22353
|
|
|
22410
|
-
|
|
22411
|
-
|
|
22412
|
-
|
|
22413
|
-
|
|
22354
|
+
var tty$1 = /*#__PURE__*/Object.freeze({
|
|
22355
|
+
__proto__: null,
|
|
22356
|
+
ReadStream: ReadStream,
|
|
22357
|
+
WriteStream: WriteStream,
|
|
22358
|
+
default: tty,
|
|
22359
|
+
isatty: isatty
|
|
22360
|
+
});
|
|
22414
22361
|
|
|
22415
|
-
|
|
22416
|
-
}
|
|
22362
|
+
var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(tty$1);
|
|
22417
22363
|
|
|
22418
|
-
|
|
22419
|
-
|
|
22420
|
-
newDebug.log = this.log;
|
|
22421
|
-
return newDebug;
|
|
22422
|
-
}
|
|
22364
|
+
/*
|
|
22365
|
+
The MIT License (MIT)
|
|
22423
22366
|
|
|
22424
|
-
|
|
22425
|
-
* Enables a debug mode by namespaces. This can include modes
|
|
22426
|
-
* separated by a colon and wildcards.
|
|
22427
|
-
*
|
|
22428
|
-
* @param {String} namespaces
|
|
22429
|
-
* @api public
|
|
22430
|
-
*/
|
|
22431
|
-
function enable(namespaces) {
|
|
22432
|
-
createDebug.save(namespaces);
|
|
22433
|
-
createDebug.namespaces = namespaces;
|
|
22367
|
+
Copyright (c) 2016 CoderPuppy
|
|
22434
22368
|
|
|
22435
|
-
|
|
22436
|
-
|
|
22369
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
22370
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
22371
|
+
in the Software without restriction, including without limitation the rights
|
|
22372
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
22373
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
22374
|
+
furnished to do so, subject to the following conditions:
|
|
22437
22375
|
|
|
22438
|
-
|
|
22439
|
-
|
|
22440
|
-
const len = split.length;
|
|
22376
|
+
The above copyright notice and this permission notice shall be included in all
|
|
22377
|
+
copies or substantial portions of the Software.
|
|
22441
22378
|
|
|
22442
|
-
|
|
22443
|
-
|
|
22444
|
-
|
|
22445
|
-
|
|
22446
|
-
|
|
22379
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22380
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22381
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22382
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22383
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22384
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22385
|
+
SOFTWARE.
|
|
22447
22386
|
|
|
22448
|
-
|
|
22387
|
+
*/
|
|
22388
|
+
var _endianness;
|
|
22389
|
+
function endianness() {
|
|
22390
|
+
if (typeof _endianness === 'undefined') {
|
|
22391
|
+
var a = new ArrayBuffer(2);
|
|
22392
|
+
var b = new Uint8Array(a);
|
|
22393
|
+
var c = new Uint16Array(a);
|
|
22394
|
+
b[0] = 1;
|
|
22395
|
+
b[1] = 2;
|
|
22396
|
+
if (c[0] === 258) {
|
|
22397
|
+
_endianness = 'BE';
|
|
22398
|
+
} else if (c[0] === 513){
|
|
22399
|
+
_endianness = 'LE';
|
|
22400
|
+
} else {
|
|
22401
|
+
throw new Error('unable to figure out endianess');
|
|
22402
|
+
}
|
|
22403
|
+
}
|
|
22404
|
+
return _endianness;
|
|
22405
|
+
}
|
|
22449
22406
|
|
|
22450
|
-
|
|
22451
|
-
|
|
22452
|
-
|
|
22453
|
-
|
|
22454
|
-
|
|
22455
|
-
}
|
|
22456
|
-
}
|
|
22407
|
+
function hostname() {
|
|
22408
|
+
if (typeof global$1.location !== 'undefined') {
|
|
22409
|
+
return global$1.location.hostname
|
|
22410
|
+
} else return '';
|
|
22411
|
+
}
|
|
22457
22412
|
|
|
22458
|
-
|
|
22459
|
-
|
|
22460
|
-
|
|
22461
|
-
* @return {String} namespaces
|
|
22462
|
-
* @api public
|
|
22463
|
-
*/
|
|
22464
|
-
function disable() {
|
|
22465
|
-
const namespaces = [
|
|
22466
|
-
...createDebug.names.map(toNamespace),
|
|
22467
|
-
...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
|
|
22468
|
-
].join(',');
|
|
22469
|
-
createDebug.enable('');
|
|
22470
|
-
return namespaces;
|
|
22471
|
-
}
|
|
22413
|
+
function loadavg() {
|
|
22414
|
+
return [];
|
|
22415
|
+
}
|
|
22472
22416
|
|
|
22473
|
-
|
|
22474
|
-
|
|
22475
|
-
|
|
22476
|
-
* @param {String} name
|
|
22477
|
-
* @return {Boolean}
|
|
22478
|
-
* @api public
|
|
22479
|
-
*/
|
|
22480
|
-
function enabled(name) {
|
|
22481
|
-
if (name[name.length - 1] === '*') {
|
|
22482
|
-
return true;
|
|
22483
|
-
}
|
|
22417
|
+
function uptime() {
|
|
22418
|
+
return 0;
|
|
22419
|
+
}
|
|
22484
22420
|
|
|
22485
|
-
|
|
22486
|
-
|
|
22421
|
+
function freemem() {
|
|
22422
|
+
return Number.MAX_VALUE;
|
|
22423
|
+
}
|
|
22487
22424
|
|
|
22488
|
-
|
|
22489
|
-
|
|
22490
|
-
|
|
22491
|
-
}
|
|
22492
|
-
}
|
|
22425
|
+
function totalmem() {
|
|
22426
|
+
return Number.MAX_VALUE;
|
|
22427
|
+
}
|
|
22493
22428
|
|
|
22494
|
-
|
|
22495
|
-
|
|
22496
|
-
|
|
22497
|
-
}
|
|
22498
|
-
}
|
|
22429
|
+
function cpus() {
|
|
22430
|
+
return [];
|
|
22431
|
+
}
|
|
22499
22432
|
|
|
22500
|
-
|
|
22501
|
-
|
|
22433
|
+
function type() {
|
|
22434
|
+
return 'Browser';
|
|
22435
|
+
}
|
|
22502
22436
|
|
|
22503
|
-
|
|
22504
|
-
|
|
22505
|
-
|
|
22506
|
-
|
|
22507
|
-
|
|
22508
|
-
|
|
22509
|
-
*/
|
|
22510
|
-
function toNamespace(regexp) {
|
|
22511
|
-
return regexp.toString()
|
|
22512
|
-
.substring(2, regexp.toString().length - 2)
|
|
22513
|
-
.replace(/\.\*\?$/, '*');
|
|
22514
|
-
}
|
|
22437
|
+
function release () {
|
|
22438
|
+
if (typeof global$1.navigator !== 'undefined') {
|
|
22439
|
+
return global$1.navigator.appVersion;
|
|
22440
|
+
}
|
|
22441
|
+
return '';
|
|
22442
|
+
}
|
|
22515
22443
|
|
|
22516
|
-
|
|
22517
|
-
|
|
22518
|
-
*
|
|
22519
|
-
* @param {Mixed} val
|
|
22520
|
-
* @return {Mixed}
|
|
22521
|
-
* @api private
|
|
22522
|
-
*/
|
|
22523
|
-
function coerce(val) {
|
|
22524
|
-
if (val instanceof Error) {
|
|
22525
|
-
return val.stack || val.message;
|
|
22526
|
-
}
|
|
22527
|
-
return val;
|
|
22528
|
-
}
|
|
22444
|
+
function networkInterfaces(){}
|
|
22445
|
+
function getNetworkInterfaces(){}
|
|
22529
22446
|
|
|
22530
|
-
|
|
22531
|
-
|
|
22532
|
-
|
|
22533
|
-
*/
|
|
22534
|
-
function destroy() {
|
|
22535
|
-
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
22536
|
-
}
|
|
22447
|
+
function arch() {
|
|
22448
|
+
return 'javascript';
|
|
22449
|
+
}
|
|
22537
22450
|
|
|
22538
|
-
|
|
22451
|
+
function platform() {
|
|
22452
|
+
return 'browser';
|
|
22453
|
+
}
|
|
22539
22454
|
|
|
22540
|
-
|
|
22541
|
-
|
|
22455
|
+
function tmpDir() {
|
|
22456
|
+
return '/tmp';
|
|
22457
|
+
}
|
|
22458
|
+
var tmpdir = tmpDir;
|
|
22459
|
+
|
|
22460
|
+
var EOL = '\n';
|
|
22461
|
+
var os = {
|
|
22462
|
+
EOL: EOL,
|
|
22463
|
+
tmpdir: tmpdir,
|
|
22464
|
+
tmpDir: tmpDir,
|
|
22465
|
+
networkInterfaces:networkInterfaces,
|
|
22466
|
+
getNetworkInterfaces: getNetworkInterfaces,
|
|
22467
|
+
release: release,
|
|
22468
|
+
type: type,
|
|
22469
|
+
cpus: cpus,
|
|
22470
|
+
totalmem: totalmem,
|
|
22471
|
+
freemem: freemem,
|
|
22472
|
+
uptime: uptime,
|
|
22473
|
+
loadavg: loadavg,
|
|
22474
|
+
hostname: hostname,
|
|
22475
|
+
endianness: endianness,
|
|
22476
|
+
};
|
|
22542
22477
|
|
|
22543
|
-
|
|
22544
|
-
|
|
22545
|
-
|
|
22478
|
+
var os$1 = /*#__PURE__*/Object.freeze({
|
|
22479
|
+
__proto__: null,
|
|
22480
|
+
EOL: EOL,
|
|
22481
|
+
arch: arch,
|
|
22482
|
+
cpus: cpus,
|
|
22483
|
+
default: os,
|
|
22484
|
+
endianness: endianness,
|
|
22485
|
+
freemem: freemem,
|
|
22486
|
+
getNetworkInterfaces: getNetworkInterfaces,
|
|
22487
|
+
hostname: hostname,
|
|
22488
|
+
loadavg: loadavg,
|
|
22489
|
+
networkInterfaces: networkInterfaces,
|
|
22490
|
+
platform: platform,
|
|
22491
|
+
release: release,
|
|
22492
|
+
tmpDir: tmpDir,
|
|
22493
|
+
tmpdir: tmpdir,
|
|
22494
|
+
totalmem: totalmem,
|
|
22495
|
+
type: type,
|
|
22496
|
+
uptime: uptime
|
|
22497
|
+
});
|
|
22546
22498
|
|
|
22547
|
-
var
|
|
22499
|
+
var require$$0 = /*@__PURE__*/getAugmentedNamespace(os$1);
|
|
22548
22500
|
|
|
22549
|
-
|
|
22550
|
-
|
|
22551
|
-
hasRequiredNode = 1;
|
|
22552
|
-
(function (module, exports) {
|
|
22553
|
-
const tty = require$$0$1;
|
|
22554
|
-
const util = text_min;
|
|
22501
|
+
var hasFlag;
|
|
22502
|
+
var hasRequiredHasFlag;
|
|
22555
22503
|
|
|
22556
|
-
|
|
22557
|
-
|
|
22558
|
-
|
|
22504
|
+
function requireHasFlag () {
|
|
22505
|
+
if (hasRequiredHasFlag) return hasFlag;
|
|
22506
|
+
hasRequiredHasFlag = 1;
|
|
22507
|
+
hasFlag = (flag, argv) => {
|
|
22508
|
+
argv = argv || process.argv;
|
|
22509
|
+
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
|
|
22510
|
+
const pos = argv.indexOf(prefix + flag);
|
|
22511
|
+
const terminatorPos = argv.indexOf('--');
|
|
22512
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
22513
|
+
};
|
|
22514
|
+
return hasFlag;
|
|
22515
|
+
}
|
|
22559
22516
|
|
|
22560
|
-
|
|
22561
|
-
|
|
22562
|
-
exports.formatArgs = formatArgs;
|
|
22563
|
-
exports.save = save;
|
|
22564
|
-
exports.load = load;
|
|
22565
|
-
exports.useColors = useColors;
|
|
22566
|
-
exports.destroy = util.deprecate(
|
|
22567
|
-
() => {},
|
|
22568
|
-
'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
|
|
22569
|
-
);
|
|
22517
|
+
var supportsColor_1;
|
|
22518
|
+
var hasRequiredSupportsColor;
|
|
22570
22519
|
|
|
22571
|
-
|
|
22572
|
-
|
|
22573
|
-
|
|
22520
|
+
function requireSupportsColor () {
|
|
22521
|
+
if (hasRequiredSupportsColor) return supportsColor_1;
|
|
22522
|
+
hasRequiredSupportsColor = 1;
|
|
22523
|
+
const os = require$$0;
|
|
22524
|
+
const hasFlag = requireHasFlag();
|
|
22574
22525
|
|
|
22575
|
-
|
|
22526
|
+
const env = process.env;
|
|
22576
22527
|
|
|
22577
|
-
|
|
22578
|
-
|
|
22579
|
-
|
|
22580
|
-
|
|
22528
|
+
let forceColor;
|
|
22529
|
+
if (hasFlag('no-color') ||
|
|
22530
|
+
hasFlag('no-colors') ||
|
|
22531
|
+
hasFlag('color=false')) {
|
|
22532
|
+
forceColor = false;
|
|
22533
|
+
} else if (hasFlag('color') ||
|
|
22534
|
+
hasFlag('colors') ||
|
|
22535
|
+
hasFlag('color=true') ||
|
|
22536
|
+
hasFlag('color=always')) {
|
|
22537
|
+
forceColor = true;
|
|
22538
|
+
}
|
|
22539
|
+
if ('FORCE_COLOR' in env) {
|
|
22540
|
+
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
22541
|
+
}
|
|
22581
22542
|
|
|
22582
|
-
|
|
22583
|
-
|
|
22584
|
-
|
|
22585
|
-
21,
|
|
22586
|
-
26,
|
|
22587
|
-
27,
|
|
22588
|
-
32,
|
|
22589
|
-
33,
|
|
22590
|
-
38,
|
|
22591
|
-
39,
|
|
22592
|
-
40,
|
|
22593
|
-
41,
|
|
22594
|
-
42,
|
|
22595
|
-
43,
|
|
22596
|
-
44,
|
|
22597
|
-
45,
|
|
22598
|
-
56,
|
|
22599
|
-
57,
|
|
22600
|
-
62,
|
|
22601
|
-
63,
|
|
22602
|
-
68,
|
|
22603
|
-
69,
|
|
22604
|
-
74,
|
|
22605
|
-
75,
|
|
22606
|
-
76,
|
|
22607
|
-
77,
|
|
22608
|
-
78,
|
|
22609
|
-
79,
|
|
22610
|
-
80,
|
|
22611
|
-
81,
|
|
22612
|
-
92,
|
|
22613
|
-
93,
|
|
22614
|
-
98,
|
|
22615
|
-
99,
|
|
22616
|
-
112,
|
|
22617
|
-
113,
|
|
22618
|
-
128,
|
|
22619
|
-
129,
|
|
22620
|
-
134,
|
|
22621
|
-
135,
|
|
22622
|
-
148,
|
|
22623
|
-
149,
|
|
22624
|
-
160,
|
|
22625
|
-
161,
|
|
22626
|
-
162,
|
|
22627
|
-
163,
|
|
22628
|
-
164,
|
|
22629
|
-
165,
|
|
22630
|
-
166,
|
|
22631
|
-
167,
|
|
22632
|
-
168,
|
|
22633
|
-
169,
|
|
22634
|
-
170,
|
|
22635
|
-
171,
|
|
22636
|
-
172,
|
|
22637
|
-
173,
|
|
22638
|
-
178,
|
|
22639
|
-
179,
|
|
22640
|
-
184,
|
|
22641
|
-
185,
|
|
22642
|
-
196,
|
|
22643
|
-
197,
|
|
22644
|
-
198,
|
|
22645
|
-
199,
|
|
22646
|
-
200,
|
|
22647
|
-
201,
|
|
22648
|
-
202,
|
|
22649
|
-
203,
|
|
22650
|
-
204,
|
|
22651
|
-
205,
|
|
22652
|
-
206,
|
|
22653
|
-
207,
|
|
22654
|
-
208,
|
|
22655
|
-
209,
|
|
22656
|
-
214,
|
|
22657
|
-
215,
|
|
22658
|
-
220,
|
|
22659
|
-
221
|
|
22660
|
-
];
|
|
22661
|
-
}
|
|
22662
|
-
} catch (error) {
|
|
22663
|
-
// Swallow - we only care if `supports-color` is available; it doesn't have to be.
|
|
22543
|
+
function translateLevel(level) {
|
|
22544
|
+
if (level === 0) {
|
|
22545
|
+
return false;
|
|
22664
22546
|
}
|
|
22665
22547
|
|
|
22666
|
-
|
|
22667
|
-
|
|
22668
|
-
|
|
22669
|
-
|
|
22670
|
-
|
|
22671
|
-
|
|
22672
|
-
|
|
22673
|
-
return /^debug_/i.test(key);
|
|
22674
|
-
}).reduce((obj, key) => {
|
|
22675
|
-
// Camel-case
|
|
22676
|
-
const prop = key
|
|
22677
|
-
.substring(6)
|
|
22678
|
-
.toLowerCase()
|
|
22679
|
-
.replace(/_([a-z])/g, (_, k) => {
|
|
22680
|
-
return k.toUpperCase();
|
|
22681
|
-
});
|
|
22682
|
-
|
|
22683
|
-
// Coerce string value into JS value
|
|
22684
|
-
let val = browser$1$1.env[key];
|
|
22685
|
-
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
22686
|
-
val = true;
|
|
22687
|
-
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
22688
|
-
val = false;
|
|
22689
|
-
} else if (val === 'null') {
|
|
22690
|
-
val = null;
|
|
22691
|
-
} else {
|
|
22692
|
-
val = Number(val);
|
|
22693
|
-
}
|
|
22694
|
-
|
|
22695
|
-
obj[prop] = val;
|
|
22696
|
-
return obj;
|
|
22697
|
-
}, {});
|
|
22548
|
+
return {
|
|
22549
|
+
level,
|
|
22550
|
+
hasBasic: true,
|
|
22551
|
+
has256: level >= 2,
|
|
22552
|
+
has16m: level >= 3
|
|
22553
|
+
};
|
|
22554
|
+
}
|
|
22698
22555
|
|
|
22699
|
-
|
|
22700
|
-
|
|
22701
|
-
|
|
22556
|
+
function supportsColor(stream) {
|
|
22557
|
+
if (forceColor === false) {
|
|
22558
|
+
return 0;
|
|
22559
|
+
}
|
|
22702
22560
|
|
|
22703
|
-
|
|
22704
|
-
|
|
22705
|
-
|
|
22706
|
-
|
|
22561
|
+
if (hasFlag('color=16m') ||
|
|
22562
|
+
hasFlag('color=full') ||
|
|
22563
|
+
hasFlag('color=truecolor')) {
|
|
22564
|
+
return 3;
|
|
22707
22565
|
}
|
|
22708
22566
|
|
|
22709
|
-
|
|
22710
|
-
|
|
22711
|
-
|
|
22712
|
-
* @api public
|
|
22713
|
-
*/
|
|
22567
|
+
if (hasFlag('color=256')) {
|
|
22568
|
+
return 2;
|
|
22569
|
+
}
|
|
22714
22570
|
|
|
22715
|
-
|
|
22716
|
-
|
|
22571
|
+
if (stream && !stream.isTTY && forceColor !== true) {
|
|
22572
|
+
return 0;
|
|
22573
|
+
}
|
|
22717
22574
|
|
|
22718
|
-
|
|
22719
|
-
const c = this.color;
|
|
22720
|
-
const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
|
|
22721
|
-
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
|
|
22575
|
+
const min = forceColor ? 1 : 0;
|
|
22722
22576
|
|
|
22723
|
-
|
|
22724
|
-
|
|
22725
|
-
|
|
22726
|
-
|
|
22577
|
+
if (process.platform === 'win32') {
|
|
22578
|
+
// Node.js 7.5.0 is the first version of Node.js to include a patch to
|
|
22579
|
+
// libuv that enables 256 color output on Windows. Anything earlier and it
|
|
22580
|
+
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
|
|
22581
|
+
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
|
|
22582
|
+
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
|
22583
|
+
// that supports 16m/TrueColor.
|
|
22584
|
+
const osRelease = os.release().split('.');
|
|
22585
|
+
if (
|
|
22586
|
+
Number(process.versions.node.split('.')[0]) >= 8 &&
|
|
22587
|
+
Number(osRelease[0]) >= 10 &&
|
|
22588
|
+
Number(osRelease[2]) >= 10586
|
|
22589
|
+
) {
|
|
22590
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
22727
22591
|
}
|
|
22728
|
-
}
|
|
22729
22592
|
|
|
22730
|
-
|
|
22731
|
-
if (exports.inspectOpts.hideDate) {
|
|
22732
|
-
return '';
|
|
22733
|
-
}
|
|
22734
|
-
return new Date().toISOString() + ' ';
|
|
22593
|
+
return 1;
|
|
22735
22594
|
}
|
|
22736
22595
|
|
|
22737
|
-
|
|
22738
|
-
|
|
22739
|
-
|
|
22596
|
+
if ('CI' in env) {
|
|
22597
|
+
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
|
22598
|
+
return 1;
|
|
22599
|
+
}
|
|
22740
22600
|
|
|
22741
|
-
|
|
22742
|
-
return browser$1$1.stderr.write(util.format(...args) + '\n');
|
|
22601
|
+
return min;
|
|
22743
22602
|
}
|
|
22744
22603
|
|
|
22745
|
-
|
|
22746
|
-
|
|
22747
|
-
*
|
|
22748
|
-
* @param {String} namespaces
|
|
22749
|
-
* @api private
|
|
22750
|
-
*/
|
|
22751
|
-
function save(namespaces) {
|
|
22752
|
-
if (namespaces) {
|
|
22753
|
-
browser$1$1.env.DEBUG = namespaces;
|
|
22754
|
-
} else {
|
|
22755
|
-
// If you set a process.env field to null or undefined, it gets cast to the
|
|
22756
|
-
// string 'null' or 'undefined'. Just delete instead.
|
|
22757
|
-
delete browser$1$1.env.DEBUG;
|
|
22758
|
-
}
|
|
22604
|
+
if ('TEAMCITY_VERSION' in env) {
|
|
22605
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
22759
22606
|
}
|
|
22760
22607
|
|
|
22761
|
-
|
|
22762
|
-
|
|
22763
|
-
*
|
|
22764
|
-
* @return {String} returns the previously persisted debug modes
|
|
22765
|
-
* @api private
|
|
22766
|
-
*/
|
|
22767
|
-
|
|
22768
|
-
function load() {
|
|
22769
|
-
return browser$1$1.env.DEBUG;
|
|
22608
|
+
if (env.COLORTERM === 'truecolor') {
|
|
22609
|
+
return 3;
|
|
22770
22610
|
}
|
|
22771
22611
|
|
|
22772
|
-
|
|
22773
|
-
|
|
22774
|
-
*
|
|
22775
|
-
* Create a new `inspectOpts` object in case `useColors` is set
|
|
22776
|
-
* differently for a particular `debug` instance.
|
|
22777
|
-
*/
|
|
22778
|
-
|
|
22779
|
-
function init(debug) {
|
|
22780
|
-
debug.inspectOpts = {};
|
|
22612
|
+
if ('TERM_PROGRAM' in env) {
|
|
22613
|
+
const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
|
22781
22614
|
|
|
22782
|
-
|
|
22783
|
-
|
|
22784
|
-
|
|
22615
|
+
switch (env.TERM_PROGRAM) {
|
|
22616
|
+
case 'iTerm.app':
|
|
22617
|
+
return version >= 3 ? 3 : 2;
|
|
22618
|
+
case 'Apple_Terminal':
|
|
22619
|
+
return 2;
|
|
22620
|
+
// No default
|
|
22785
22621
|
}
|
|
22786
22622
|
}
|
|
22787
22623
|
|
|
22788
|
-
|
|
22624
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
22625
|
+
return 2;
|
|
22626
|
+
}
|
|
22789
22627
|
|
|
22790
|
-
|
|
22628
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
22629
|
+
return 1;
|
|
22630
|
+
}
|
|
22791
22631
|
|
|
22792
|
-
|
|
22793
|
-
|
|
22794
|
-
|
|
22632
|
+
if ('COLORTERM' in env) {
|
|
22633
|
+
return 1;
|
|
22634
|
+
}
|
|
22795
22635
|
|
|
22796
|
-
|
|
22797
|
-
|
|
22798
|
-
|
|
22799
|
-
.split('\n')
|
|
22800
|
-
.map(str => str.trim())
|
|
22801
|
-
.join(' ');
|
|
22802
|
-
};
|
|
22636
|
+
if (env.TERM === 'dumb') {
|
|
22637
|
+
return min;
|
|
22638
|
+
}
|
|
22803
22639
|
|
|
22804
|
-
|
|
22805
|
-
|
|
22806
|
-
*/
|
|
22640
|
+
return min;
|
|
22641
|
+
}
|
|
22807
22642
|
|
|
22808
|
-
|
|
22809
|
-
|
|
22810
|
-
|
|
22811
|
-
|
|
22812
|
-
} (node, node.exports));
|
|
22813
|
-
return node.exports;
|
|
22814
|
-
}
|
|
22643
|
+
function getSupportLevel(stream) {
|
|
22644
|
+
const level = supportsColor(stream);
|
|
22645
|
+
return translateLevel(level);
|
|
22646
|
+
}
|
|
22815
22647
|
|
|
22816
|
-
|
|
22648
|
+
supportsColor_1 = {
|
|
22649
|
+
supportsColor: getSupportLevel,
|
|
22650
|
+
stdout: getSupportLevel(process.stdout),
|
|
22651
|
+
stderr: getSupportLevel(process.stderr)
|
|
22652
|
+
};
|
|
22653
|
+
return supportsColor_1;
|
|
22654
|
+
}
|
|
22817
22655
|
|
|
22818
|
-
var
|
|
22656
|
+
var hasRequiredNode;
|
|
22819
22657
|
|
|
22820
|
-
function
|
|
22821
|
-
if (
|
|
22822
|
-
|
|
22658
|
+
function requireNode () {
|
|
22659
|
+
if (hasRequiredNode) return node.exports;
|
|
22660
|
+
hasRequiredNode = 1;
|
|
22823
22661
|
(function (module, exports) {
|
|
22662
|
+
const tty = require$$0$1;
|
|
22663
|
+
const util = text_min;
|
|
22664
|
+
|
|
22824
22665
|
/**
|
|
22825
|
-
* This is the
|
|
22666
|
+
* This is the Node.js implementation of `debug()`.
|
|
22826
22667
|
*/
|
|
22827
22668
|
|
|
22669
|
+
exports.init = init;
|
|
22670
|
+
exports.log = log;
|
|
22828
22671
|
exports.formatArgs = formatArgs;
|
|
22829
22672
|
exports.save = save;
|
|
22830
22673
|
exports.load = load;
|
|
22831
22674
|
exports.useColors = useColors;
|
|
22832
|
-
exports.
|
|
22833
|
-
|
|
22834
|
-
|
|
22835
|
-
|
|
22836
|
-
return () => {
|
|
22837
|
-
if (!warned) {
|
|
22838
|
-
warned = true;
|
|
22839
|
-
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
22840
|
-
}
|
|
22841
|
-
};
|
|
22842
|
-
})();
|
|
22675
|
+
exports.destroy = util.deprecate(
|
|
22676
|
+
() => {},
|
|
22677
|
+
'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
|
|
22678
|
+
);
|
|
22843
22679
|
|
|
22844
22680
|
/**
|
|
22845
22681
|
* Colors.
|
|
22846
22682
|
*/
|
|
22847
22683
|
|
|
22848
|
-
exports.colors = [
|
|
22849
|
-
|
|
22850
|
-
|
|
22851
|
-
'
|
|
22852
|
-
|
|
22853
|
-
|
|
22854
|
-
|
|
22855
|
-
|
|
22856
|
-
|
|
22857
|
-
|
|
22858
|
-
|
|
22859
|
-
|
|
22860
|
-
|
|
22861
|
-
|
|
22862
|
-
|
|
22863
|
-
|
|
22864
|
-
|
|
22865
|
-
|
|
22866
|
-
|
|
22867
|
-
|
|
22868
|
-
|
|
22869
|
-
|
|
22870
|
-
|
|
22871
|
-
|
|
22872
|
-
|
|
22873
|
-
|
|
22874
|
-
|
|
22875
|
-
|
|
22876
|
-
|
|
22877
|
-
|
|
22878
|
-
|
|
22879
|
-
|
|
22880
|
-
|
|
22881
|
-
|
|
22882
|
-
|
|
22883
|
-
|
|
22884
|
-
|
|
22885
|
-
|
|
22886
|
-
|
|
22887
|
-
|
|
22888
|
-
|
|
22889
|
-
|
|
22890
|
-
|
|
22891
|
-
|
|
22892
|
-
|
|
22893
|
-
|
|
22894
|
-
|
|
22895
|
-
|
|
22896
|
-
|
|
22897
|
-
|
|
22898
|
-
|
|
22899
|
-
|
|
22900
|
-
|
|
22901
|
-
|
|
22902
|
-
|
|
22903
|
-
|
|
22904
|
-
|
|
22905
|
-
|
|
22906
|
-
|
|
22907
|
-
|
|
22908
|
-
|
|
22909
|
-
|
|
22910
|
-
|
|
22911
|
-
|
|
22912
|
-
|
|
22913
|
-
|
|
22914
|
-
|
|
22915
|
-
|
|
22916
|
-
|
|
22917
|
-
|
|
22918
|
-
|
|
22919
|
-
|
|
22920
|
-
|
|
22921
|
-
|
|
22922
|
-
|
|
22923
|
-
|
|
22924
|
-
|
|
22925
|
-
|
|
22684
|
+
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
22685
|
+
|
|
22686
|
+
try {
|
|
22687
|
+
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
|
|
22688
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
22689
|
+
const supportsColor = requireSupportsColor();
|
|
22690
|
+
|
|
22691
|
+
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
22692
|
+
exports.colors = [
|
|
22693
|
+
20,
|
|
22694
|
+
21,
|
|
22695
|
+
26,
|
|
22696
|
+
27,
|
|
22697
|
+
32,
|
|
22698
|
+
33,
|
|
22699
|
+
38,
|
|
22700
|
+
39,
|
|
22701
|
+
40,
|
|
22702
|
+
41,
|
|
22703
|
+
42,
|
|
22704
|
+
43,
|
|
22705
|
+
44,
|
|
22706
|
+
45,
|
|
22707
|
+
56,
|
|
22708
|
+
57,
|
|
22709
|
+
62,
|
|
22710
|
+
63,
|
|
22711
|
+
68,
|
|
22712
|
+
69,
|
|
22713
|
+
74,
|
|
22714
|
+
75,
|
|
22715
|
+
76,
|
|
22716
|
+
77,
|
|
22717
|
+
78,
|
|
22718
|
+
79,
|
|
22719
|
+
80,
|
|
22720
|
+
81,
|
|
22721
|
+
92,
|
|
22722
|
+
93,
|
|
22723
|
+
98,
|
|
22724
|
+
99,
|
|
22725
|
+
112,
|
|
22726
|
+
113,
|
|
22727
|
+
128,
|
|
22728
|
+
129,
|
|
22729
|
+
134,
|
|
22730
|
+
135,
|
|
22731
|
+
148,
|
|
22732
|
+
149,
|
|
22733
|
+
160,
|
|
22734
|
+
161,
|
|
22735
|
+
162,
|
|
22736
|
+
163,
|
|
22737
|
+
164,
|
|
22738
|
+
165,
|
|
22739
|
+
166,
|
|
22740
|
+
167,
|
|
22741
|
+
168,
|
|
22742
|
+
169,
|
|
22743
|
+
170,
|
|
22744
|
+
171,
|
|
22745
|
+
172,
|
|
22746
|
+
173,
|
|
22747
|
+
178,
|
|
22748
|
+
179,
|
|
22749
|
+
184,
|
|
22750
|
+
185,
|
|
22751
|
+
196,
|
|
22752
|
+
197,
|
|
22753
|
+
198,
|
|
22754
|
+
199,
|
|
22755
|
+
200,
|
|
22756
|
+
201,
|
|
22757
|
+
202,
|
|
22758
|
+
203,
|
|
22759
|
+
204,
|
|
22760
|
+
205,
|
|
22761
|
+
206,
|
|
22762
|
+
207,
|
|
22763
|
+
208,
|
|
22764
|
+
209,
|
|
22765
|
+
214,
|
|
22766
|
+
215,
|
|
22767
|
+
220,
|
|
22768
|
+
221
|
|
22769
|
+
];
|
|
22770
|
+
}
|
|
22771
|
+
} catch (error) {
|
|
22772
|
+
// Swallow - we only care if `supports-color` is available; it doesn't have to be.
|
|
22773
|
+
}
|
|
22926
22774
|
|
|
22927
22775
|
/**
|
|
22928
|
-
*
|
|
22929
|
-
* and the Firebug extension (any Firefox version) are known
|
|
22930
|
-
* to support "%c" CSS customizations.
|
|
22776
|
+
* Build up the default `inspectOpts` object from the environment variables.
|
|
22931
22777
|
*
|
|
22932
|
-
*
|
|
22778
|
+
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
|
22933
22779
|
*/
|
|
22934
22780
|
|
|
22935
|
-
|
|
22936
|
-
|
|
22937
|
-
|
|
22938
|
-
//
|
|
22939
|
-
|
|
22940
|
-
|
|
22941
|
-
|
|
22942
|
-
|
|
22781
|
+
exports.inspectOpts = Object.keys(process.env).filter(key => {
|
|
22782
|
+
return /^debug_/i.test(key);
|
|
22783
|
+
}).reduce((obj, key) => {
|
|
22784
|
+
// Camel-case
|
|
22785
|
+
const prop = key
|
|
22786
|
+
.substring(6)
|
|
22787
|
+
.toLowerCase()
|
|
22788
|
+
.replace(/_([a-z])/g, (_, k) => {
|
|
22789
|
+
return k.toUpperCase();
|
|
22790
|
+
});
|
|
22943
22791
|
|
|
22944
|
-
//
|
|
22945
|
-
|
|
22946
|
-
|
|
22792
|
+
// Coerce string value into JS value
|
|
22793
|
+
let val = process.env[key];
|
|
22794
|
+
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
22795
|
+
val = true;
|
|
22796
|
+
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
22797
|
+
val = false;
|
|
22798
|
+
} else if (val === 'null') {
|
|
22799
|
+
val = null;
|
|
22800
|
+
} else {
|
|
22801
|
+
val = Number(val);
|
|
22947
22802
|
}
|
|
22948
22803
|
|
|
22949
|
-
|
|
22950
|
-
|
|
22951
|
-
|
|
22952
|
-
|
|
22953
|
-
|
|
22954
|
-
|
|
22955
|
-
|
|
22956
|
-
|
|
22957
|
-
|
|
22958
|
-
|
|
22804
|
+
obj[prop] = val;
|
|
22805
|
+
return obj;
|
|
22806
|
+
}, {});
|
|
22807
|
+
|
|
22808
|
+
/**
|
|
22809
|
+
* Is stdout a TTY? Colored output is enabled when `true`.
|
|
22810
|
+
*/
|
|
22811
|
+
|
|
22812
|
+
function useColors() {
|
|
22813
|
+
return 'colors' in exports.inspectOpts ?
|
|
22814
|
+
Boolean(exports.inspectOpts.colors) :
|
|
22815
|
+
tty.isatty(process.stderr.fd);
|
|
22959
22816
|
}
|
|
22960
22817
|
|
|
22961
22818
|
/**
|
|
22962
|
-
*
|
|
22819
|
+
* Adds ANSI color escape codes if enabled.
|
|
22963
22820
|
*
|
|
22964
22821
|
* @api public
|
|
22965
22822
|
*/
|
|
22966
22823
|
|
|
22967
22824
|
function formatArgs(args) {
|
|
22968
|
-
|
|
22969
|
-
this.namespace +
|
|
22970
|
-
(this.useColors ? ' %c' : ' ') +
|
|
22971
|
-
args[0] +
|
|
22972
|
-
(this.useColors ? '%c ' : ' ') +
|
|
22973
|
-
'+' + module.exports.humanize(this.diff);
|
|
22974
|
-
|
|
22975
|
-
if (!this.useColors) {
|
|
22976
|
-
return;
|
|
22977
|
-
}
|
|
22825
|
+
const {namespace: name, useColors} = this;
|
|
22978
22826
|
|
|
22979
|
-
|
|
22980
|
-
|
|
22827
|
+
if (useColors) {
|
|
22828
|
+
const c = this.color;
|
|
22829
|
+
const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
|
|
22830
|
+
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
|
|
22981
22831
|
|
|
22982
|
-
|
|
22983
|
-
|
|
22984
|
-
|
|
22985
|
-
|
|
22986
|
-
|
|
22987
|
-
|
|
22988
|
-
if (match === '%%') {
|
|
22989
|
-
return;
|
|
22990
|
-
}
|
|
22991
|
-
index++;
|
|
22992
|
-
if (match === '%c') {
|
|
22993
|
-
// We only are interested in the *last* %c
|
|
22994
|
-
// (the user may have provided their own)
|
|
22995
|
-
lastC = index;
|
|
22996
|
-
}
|
|
22997
|
-
});
|
|
22832
|
+
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
|
|
22833
|
+
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
|
|
22834
|
+
} else {
|
|
22835
|
+
args[0] = getDate() + name + ' ' + args[0];
|
|
22836
|
+
}
|
|
22837
|
+
}
|
|
22998
22838
|
|
|
22999
|
-
|
|
22839
|
+
function getDate() {
|
|
22840
|
+
if (exports.inspectOpts.hideDate) {
|
|
22841
|
+
return '';
|
|
22842
|
+
}
|
|
22843
|
+
return new Date().toISOString() + ' ';
|
|
23000
22844
|
}
|
|
23001
22845
|
|
|
23002
22846
|
/**
|
|
23003
|
-
* Invokes `
|
|
23004
|
-
* No-op when `console.debug` is not a "function".
|
|
23005
|
-
* If `console.debug` is not available, falls back
|
|
23006
|
-
* to `console.log`.
|
|
23007
|
-
*
|
|
23008
|
-
* @api public
|
|
22847
|
+
* Invokes `util.format()` with the specified arguments and writes to stderr.
|
|
23009
22848
|
*/
|
|
23010
|
-
|
|
22849
|
+
|
|
22850
|
+
function log(...args) {
|
|
22851
|
+
return process.stderr.write(util.format(...args) + '\n');
|
|
22852
|
+
}
|
|
23011
22853
|
|
|
23012
22854
|
/**
|
|
23013
22855
|
* Save `namespaces`.
|
|
@@ -23016,15 +22858,12 @@ function requireBrowser () {
|
|
|
23016
22858
|
* @api private
|
|
23017
22859
|
*/
|
|
23018
22860
|
function save(namespaces) {
|
|
23019
|
-
|
|
23020
|
-
|
|
23021
|
-
|
|
23022
|
-
|
|
23023
|
-
|
|
23024
|
-
|
|
23025
|
-
} catch (error) {
|
|
23026
|
-
// Swallow
|
|
23027
|
-
// XXX (@Qix-) should we be logging these?
|
|
22861
|
+
if (namespaces) {
|
|
22862
|
+
process.env.DEBUG = namespaces;
|
|
22863
|
+
} else {
|
|
22864
|
+
// If you set a process.env field to null or undefined, it gets cast to the
|
|
22865
|
+
// string 'null' or 'undefined'. Just delete instead.
|
|
22866
|
+
delete process.env.DEBUG;
|
|
23028
22867
|
}
|
|
23029
22868
|
}
|
|
23030
22869
|
|
|
@@ -23034,42 +22873,24 @@ function requireBrowser () {
|
|
|
23034
22873
|
* @return {String} returns the previously persisted debug modes
|
|
23035
22874
|
* @api private
|
|
23036
22875
|
*/
|
|
23037
|
-
function load() {
|
|
23038
|
-
let r;
|
|
23039
|
-
try {
|
|
23040
|
-
r = exports.storage.getItem('debug');
|
|
23041
|
-
} catch (error) {
|
|
23042
|
-
// Swallow
|
|
23043
|
-
// XXX (@Qix-) should we be logging these?
|
|
23044
|
-
}
|
|
23045
|
-
|
|
23046
|
-
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
23047
|
-
if (!r && typeof browser$1$1 !== 'undefined' && 'env' in browser$1$1) {
|
|
23048
|
-
r = browser$1$1.env.DEBUG;
|
|
23049
|
-
}
|
|
23050
22876
|
|
|
23051
|
-
|
|
22877
|
+
function load() {
|
|
22878
|
+
return process.env.DEBUG;
|
|
23052
22879
|
}
|
|
23053
22880
|
|
|
23054
22881
|
/**
|
|
23055
|
-
*
|
|
23056
|
-
*
|
|
23057
|
-
* This is necessary because safari throws
|
|
23058
|
-
* when a user disables cookies/localstorage
|
|
23059
|
-
* and you attempt to access it.
|
|
22882
|
+
* Init logic for `debug` instances.
|
|
23060
22883
|
*
|
|
23061
|
-
*
|
|
23062
|
-
*
|
|
22884
|
+
* Create a new `inspectOpts` object in case `useColors` is set
|
|
22885
|
+
* differently for a particular `debug` instance.
|
|
23063
22886
|
*/
|
|
23064
22887
|
|
|
23065
|
-
function
|
|
23066
|
-
|
|
23067
|
-
|
|
23068
|
-
|
|
23069
|
-
|
|
23070
|
-
|
|
23071
|
-
// Swallow
|
|
23072
|
-
// XXX (@Qix-) should we be logging these?
|
|
22888
|
+
function init(debug) {
|
|
22889
|
+
debug.inspectOpts = {};
|
|
22890
|
+
|
|
22891
|
+
const keys = Object.keys(exports.inspectOpts);
|
|
22892
|
+
for (let i = 0; i < keys.length; i++) {
|
|
22893
|
+
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
23073
22894
|
}
|
|
23074
22895
|
}
|
|
23075
22896
|
|
|
@@ -23078,18 +22899,27 @@ function requireBrowser () {
|
|
|
23078
22899
|
const {formatters} = module.exports;
|
|
23079
22900
|
|
|
23080
22901
|
/**
|
|
23081
|
-
* Map %
|
|
22902
|
+
* Map %o to `util.inspect()`, all on a single line.
|
|
23082
22903
|
*/
|
|
23083
22904
|
|
|
23084
|
-
formatters.
|
|
23085
|
-
|
|
23086
|
-
|
|
23087
|
-
|
|
23088
|
-
|
|
23089
|
-
|
|
22905
|
+
formatters.o = function (v) {
|
|
22906
|
+
this.inspectOpts.colors = this.useColors;
|
|
22907
|
+
return util.inspect(v, this.inspectOpts)
|
|
22908
|
+
.split('\n')
|
|
22909
|
+
.map(str => str.trim())
|
|
22910
|
+
.join(' ');
|
|
22911
|
+
};
|
|
22912
|
+
|
|
22913
|
+
/**
|
|
22914
|
+
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
|
22915
|
+
*/
|
|
22916
|
+
|
|
22917
|
+
formatters.O = function (v) {
|
|
22918
|
+
this.inspectOpts.colors = this.useColors;
|
|
22919
|
+
return util.inspect(v, this.inspectOpts);
|
|
23090
22920
|
};
|
|
23091
|
-
} (
|
|
23092
|
-
return
|
|
22921
|
+
} (node, node.exports));
|
|
22922
|
+
return node.exports;
|
|
23093
22923
|
}
|
|
23094
22924
|
|
|
23095
22925
|
var hasRequiredSrc;
|
|
@@ -23097,7 +22927,7 @@ var hasRequiredSrc;
|
|
|
23097
22927
|
function requireSrc () {
|
|
23098
22928
|
if (hasRequiredSrc) return src.exports;
|
|
23099
22929
|
hasRequiredSrc = 1;
|
|
23100
|
-
if (typeof
|
|
22930
|
+
if (typeof process === 'undefined' || process.type === 'renderer' || browser$1 === true || process.__nwjs) {
|
|
23101
22931
|
src.exports = requireBrowser();
|
|
23102
22932
|
} else {
|
|
23103
22933
|
src.exports = requireNode();
|
|
@@ -23123,7 +22953,7 @@ var debug_1 = function () {
|
|
|
23123
22953
|
|
|
23124
22954
|
var url = require$$0$3;
|
|
23125
22955
|
var URL$1 = url.URL;
|
|
23126
|
-
var http = require$$
|
|
22956
|
+
var http = require$$2;
|
|
23127
22957
|
var https = require$$2;
|
|
23128
22958
|
var Writable = require$$3.Writable;
|
|
23129
22959
|
var assert$1 = require$$4;
|
|
@@ -29208,7 +29038,7 @@ Zlib$1.prototype.write = function(flush, input, in_off, in_len, out, out_off, ou
|
|
|
29208
29038
|
this.write_in_progress = true;
|
|
29209
29039
|
|
|
29210
29040
|
var self = this;
|
|
29211
|
-
|
|
29041
|
+
nextTick(function() {
|
|
29212
29042
|
self.write_in_progress = false;
|
|
29213
29043
|
var res = self._write(flush, input, in_off, in_len, out, out_off, out_len);
|
|
29214
29044
|
self.callback(res[0], res[1]);
|
|
@@ -29279,7 +29109,7 @@ Zlib$1.prototype._write = function(flush, input, in_off, in_len, out, out_off, o
|
|
|
29279
29109
|
throw new Error('Unknown mode ' + this.mode);
|
|
29280
29110
|
}
|
|
29281
29111
|
|
|
29282
|
-
if (
|
|
29112
|
+
if (status !== Z_STREAM_END && status !== Z_OK) {
|
|
29283
29113
|
this._error(status);
|
|
29284
29114
|
}
|
|
29285
29115
|
|
|
@@ -29287,27 +29117,6 @@ Zlib$1.prototype._write = function(flush, input, in_off, in_len, out, out_off, o
|
|
|
29287
29117
|
return [strm.avail_in, strm.avail_out];
|
|
29288
29118
|
};
|
|
29289
29119
|
|
|
29290
|
-
Zlib$1.prototype._checkError = function (status, strm, flush) {
|
|
29291
|
-
// Acceptable error states depend on the type of zlib stream.
|
|
29292
|
-
switch (status) {
|
|
29293
|
-
case Z_OK:
|
|
29294
|
-
case Z_BUF_ERROR:
|
|
29295
|
-
if (strm.avail_out !== 0 && flush === Z_FINISH) {
|
|
29296
|
-
return false
|
|
29297
|
-
}
|
|
29298
|
-
break
|
|
29299
|
-
case Z_STREAM_END:
|
|
29300
|
-
// normal statuses, not fatal
|
|
29301
|
-
break
|
|
29302
|
-
case Z_NEED_DICT:
|
|
29303
|
-
return false
|
|
29304
|
-
default:
|
|
29305
|
-
return false
|
|
29306
|
-
}
|
|
29307
|
-
|
|
29308
|
-
return true
|
|
29309
|
-
};
|
|
29310
|
-
|
|
29311
29120
|
Zlib$1.prototype.close = function() {
|
|
29312
29121
|
if (this.write_in_progress) {
|
|
29313
29122
|
this.pending_close = true;
|
|
@@ -29589,7 +29398,7 @@ function zlibBuffer(engine, buffer, callback) {
|
|
|
29589
29398
|
function zlibBufferSync(engine, buffer) {
|
|
29590
29399
|
if (typeof buffer === 'string')
|
|
29591
29400
|
buffer = new Buffer(buffer);
|
|
29592
|
-
if (!
|
|
29401
|
+
if (!isBuffer$1(buffer))
|
|
29593
29402
|
throw new TypeError('Not a string or buffer');
|
|
29594
29403
|
|
|
29595
29404
|
var flushFlag = binding.Z_FINISH;
|
|
@@ -29705,7 +29514,7 @@ function Zlib(opts, mode) {
|
|
|
29705
29514
|
}
|
|
29706
29515
|
|
|
29707
29516
|
if (opts.dictionary) {
|
|
29708
|
-
if (!
|
|
29517
|
+
if (!isBuffer$1(opts.dictionary)) {
|
|
29709
29518
|
throw new Error('Invalid dictionary: it should be a Buffer instance');
|
|
29710
29519
|
}
|
|
29711
29520
|
}
|
|
@@ -29722,7 +29531,7 @@ function Zlib(opts, mode) {
|
|
|
29722
29531
|
|
|
29723
29532
|
var error = new Error(message);
|
|
29724
29533
|
error.errno = errno;
|
|
29725
|
-
error.code = codes[errno];
|
|
29534
|
+
error.code = binding.codes[errno];
|
|
29726
29535
|
self.emit('error', error);
|
|
29727
29536
|
};
|
|
29728
29537
|
|
|
@@ -29773,7 +29582,7 @@ Zlib.prototype.params = function(level, strategy, callback) {
|
|
|
29773
29582
|
}
|
|
29774
29583
|
});
|
|
29775
29584
|
} else {
|
|
29776
|
-
|
|
29585
|
+
nextTick(callback);
|
|
29777
29586
|
}
|
|
29778
29587
|
};
|
|
29779
29588
|
|
|
@@ -29797,7 +29606,7 @@ Zlib.prototype.flush = function(kind, callback) {
|
|
|
29797
29606
|
|
|
29798
29607
|
if (ws.ended) {
|
|
29799
29608
|
if (callback)
|
|
29800
|
-
|
|
29609
|
+
nextTick(callback);
|
|
29801
29610
|
} else if (ws.ending) {
|
|
29802
29611
|
if (callback)
|
|
29803
29612
|
this.once('end', callback);
|
|
@@ -29814,7 +29623,7 @@ Zlib.prototype.flush = function(kind, callback) {
|
|
|
29814
29623
|
|
|
29815
29624
|
Zlib.prototype.close = function(callback) {
|
|
29816
29625
|
if (callback)
|
|
29817
|
-
|
|
29626
|
+
nextTick(callback);
|
|
29818
29627
|
|
|
29819
29628
|
if (this._closed)
|
|
29820
29629
|
return;
|
|
@@ -29824,7 +29633,7 @@ Zlib.prototype.close = function(callback) {
|
|
|
29824
29633
|
this._binding.close();
|
|
29825
29634
|
|
|
29826
29635
|
var self = this;
|
|
29827
|
-
|
|
29636
|
+
nextTick(function() {
|
|
29828
29637
|
self.emit('close');
|
|
29829
29638
|
});
|
|
29830
29639
|
};
|
|
@@ -29835,7 +29644,7 @@ Zlib.prototype._transform = function(chunk, encoding, cb) {
|
|
|
29835
29644
|
var ending = ws.ending || ws.ended;
|
|
29836
29645
|
var last = ending && (!chunk || ws.length === chunk.length);
|
|
29837
29646
|
|
|
29838
|
-
if (!chunk === null && !
|
|
29647
|
+
if (!chunk === null && !isBuffer$1(chunk))
|
|
29839
29648
|
return cb(new Error('invalid input'));
|
|
29840
29649
|
|
|
29841
29650
|
// If it's the last chunk, or a final flush, we use the Z_FINISH flush flag.
|
|
@@ -30197,7 +30006,7 @@ class AxiosTransformStream extends Stream$3.Transform{
|
|
|
30197
30006
|
|
|
30198
30007
|
bytesNotified = bytesTransferred;
|
|
30199
30008
|
|
|
30200
|
-
|
|
30009
|
+
nextTick(() => {
|
|
30201
30010
|
self.emit('progress', {
|
|
30202
30011
|
'loaded': bytesTransferred,
|
|
30203
30012
|
'total': totalBytes,
|
|
@@ -30251,11 +30060,11 @@ class AxiosTransformStream extends Stream$3.Transform{
|
|
|
30251
30060
|
}
|
|
30252
30061
|
|
|
30253
30062
|
if (self.push(_chunk)) {
|
|
30254
|
-
|
|
30063
|
+
nextTick(_callback);
|
|
30255
30064
|
} else {
|
|
30256
30065
|
internals.onReadCallback = () => {
|
|
30257
30066
|
internals.onReadCallback = null;
|
|
30258
|
-
|
|
30067
|
+
nextTick(_callback);
|
|
30259
30068
|
};
|
|
30260
30069
|
}
|
|
30261
30070
|
}
|
|
@@ -30299,7 +30108,7 @@ class AxiosTransformStream extends Stream$3.Transform{
|
|
|
30299
30108
|
}
|
|
30300
30109
|
|
|
30301
30110
|
pushChunk(_chunk, chunkRemainder ? () => {
|
|
30302
|
-
|
|
30111
|
+
nextTick(_callback, null, chunkRemainder);
|
|
30303
30112
|
} : _callback);
|
|
30304
30113
|
};
|
|
30305
30114
|
|
|
@@ -30577,7 +30386,7 @@ function setProxy(options, configProxy, location) {
|
|
|
30577
30386
|
};
|
|
30578
30387
|
}
|
|
30579
30388
|
|
|
30580
|
-
const isHttpAdapterSupported = typeof
|
|
30389
|
+
const isHttpAdapterSupported = typeof process !== 'undefined' && utils$1.kindOf(process) === 'process';
|
|
30581
30390
|
|
|
30582
30391
|
// temporary hotfix
|
|
30583
30392
|
|
|
@@ -30769,7 +30578,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30769
30578
|
headers.setContentLength(data.size || 0);
|
|
30770
30579
|
data = Stream$3.Readable.from(readBlob$1(data));
|
|
30771
30580
|
} else if (data && !utils$1.isStream(data)) {
|
|
30772
|
-
if (
|
|
30581
|
+
if (isBuffer$1(data)) ; else if (utils$1.isArrayBuffer(data)) {
|
|
30773
30582
|
data = Buffer.from(new Uint8Array(data));
|
|
30774
30583
|
} else if (utils$1.isString(data)) {
|
|
30775
30584
|
data = Buffer.from(data, 'utf-8');
|
|
@@ -30885,7 +30694,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30885
30694
|
if (config.transport) {
|
|
30886
30695
|
transport = config.transport;
|
|
30887
30696
|
} else if (config.maxRedirects === 0) {
|
|
30888
|
-
transport = isHttpsRequest ?
|
|
30697
|
+
transport = isHttpsRequest ? http$2 : http$2;
|
|
30889
30698
|
} else {
|
|
30890
30699
|
if (config.maxRedirects) {
|
|
30891
30700
|
options.maxRedirects = config.maxRedirects;
|