glitch-javascript-sdk 0.6.9 → 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 +1262 -1457
- 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) {
|
|
@@ -3890,10 +3895,6 @@ function base64DetectIncompleteChar(buffer) {
|
|
|
3890
3895
|
|
|
3891
3896
|
Readable.ReadableState = ReadableState;
|
|
3892
3897
|
|
|
3893
|
-
text_min.debuglog = function(empty) {
|
|
3894
|
-
|
|
3895
|
-
}
|
|
3896
|
-
|
|
3897
3898
|
var debug$2 = text_min.debuglog('stream');
|
|
3898
3899
|
text_min.inherits(Readable, EventEmitter);
|
|
3899
3900
|
|
|
@@ -4234,7 +4235,7 @@ Readable.prototype.read = function (n) {
|
|
|
4234
4235
|
|
|
4235
4236
|
function chunkInvalid(state, chunk) {
|
|
4236
4237
|
var er = null;
|
|
4237
|
-
if (!
|
|
4238
|
+
if (!isBuffer$1(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {
|
|
4238
4239
|
er = new TypeError('Invalid non-string/buffer chunk');
|
|
4239
4240
|
}
|
|
4240
4241
|
return er;
|
|
@@ -5573,7 +5574,7 @@ Stream$3.prototype.pipe = function(dest, options) {
|
|
|
5573
5574
|
return dest;
|
|
5574
5575
|
};
|
|
5575
5576
|
|
|
5576
|
-
var
|
|
5577
|
+
var stream = /*#__PURE__*/Object.freeze({
|
|
5577
5578
|
__proto__: null,
|
|
5578
5579
|
Duplex: Duplex,
|
|
5579
5580
|
PassThrough: PassThrough,
|
|
@@ -5584,7 +5585,7 @@ var _polyfillNode_stream = /*#__PURE__*/Object.freeze({
|
|
|
5584
5585
|
default: Stream$3
|
|
5585
5586
|
});
|
|
5586
5587
|
|
|
5587
|
-
var require$$3 = /*@__PURE__*/
|
|
5588
|
+
var require$$3 = /*@__PURE__*/getAugmentedNamespace(stream);
|
|
5588
5589
|
|
|
5589
5590
|
var Stream$2 = require$$3.Stream;
|
|
5590
5591
|
var util$2 = text_min;
|
|
@@ -5730,7 +5731,7 @@ CombinedStream$1.isStreamLike = function(stream) {
|
|
|
5730
5731
|
&& (typeof stream !== 'string')
|
|
5731
5732
|
&& (typeof stream !== 'boolean')
|
|
5732
5733
|
&& (typeof stream !== 'number')
|
|
5733
|
-
&& (!
|
|
5734
|
+
&& (!isBuffer$1(stream));
|
|
5734
5735
|
};
|
|
5735
5736
|
|
|
5736
5737
|
CombinedStream$1.prototype.append = function(stream) {
|
|
@@ -6106,7 +6107,7 @@ function basename(path, ext) {
|
|
|
6106
6107
|
function extname(path) {
|
|
6107
6108
|
return splitPath(path)[3];
|
|
6108
6109
|
}
|
|
6109
|
-
var
|
|
6110
|
+
var path$1 = {
|
|
6110
6111
|
extname: extname,
|
|
6111
6112
|
basename: basename,
|
|
6112
6113
|
dirname: dirname,
|
|
@@ -6136,10 +6137,10 @@ var substr = 'ab'.substr(-1) === 'b' ?
|
|
|
6136
6137
|
}
|
|
6137
6138
|
;
|
|
6138
6139
|
|
|
6139
|
-
var
|
|
6140
|
+
var path$2 = /*#__PURE__*/Object.freeze({
|
|
6140
6141
|
__proto__: null,
|
|
6141
6142
|
basename: basename,
|
|
6142
|
-
default:
|
|
6143
|
+
default: path$1,
|
|
6143
6144
|
delimiter: delimiter$1,
|
|
6144
6145
|
dirname: dirname,
|
|
6145
6146
|
extname: extname,
|
|
@@ -6151,7 +6152,7 @@ var _polyfillNode_path$1 = /*#__PURE__*/Object.freeze({
|
|
|
6151
6152
|
sep: sep
|
|
6152
6153
|
});
|
|
6153
6154
|
|
|
6154
|
-
var require$$2$1 = /*@__PURE__*/
|
|
6155
|
+
var require$$2$1 = /*@__PURE__*/getAugmentedNamespace(path$2);
|
|
6155
6156
|
|
|
6156
6157
|
var hasFetch = isFunction$1(global$1.fetch) && isFunction$1(global$1.ReadableStream);
|
|
6157
6158
|
|
|
@@ -6226,7 +6227,7 @@ function IncomingMessage(xhr, response, mode) {
|
|
|
6226
6227
|
// Fake the 'close' event, but only once 'end' fires
|
|
6227
6228
|
self.on('end', function() {
|
|
6228
6229
|
// The nextTick is necessary to prevent the 'request' module from causing an infinite loop
|
|
6229
|
-
|
|
6230
|
+
nextTick(function() {
|
|
6230
6231
|
self.emit('close');
|
|
6231
6232
|
});
|
|
6232
6233
|
});
|
|
@@ -6562,7 +6563,7 @@ ClientRequest.prototype._onFinish = function() {
|
|
|
6562
6563
|
try {
|
|
6563
6564
|
xhr.open(self._opts.method, self._opts.url, true);
|
|
6564
6565
|
} catch (err) {
|
|
6565
|
-
|
|
6566
|
+
nextTick(function() {
|
|
6566
6567
|
self.emit('error', err);
|
|
6567
6568
|
});
|
|
6568
6569
|
return
|
|
@@ -6608,7 +6609,7 @@ ClientRequest.prototype._onFinish = function() {
|
|
|
6608
6609
|
try {
|
|
6609
6610
|
xhr.send(body);
|
|
6610
6611
|
} catch (err) {
|
|
6611
|
-
|
|
6612
|
+
nextTick(function() {
|
|
6612
6613
|
self.emit('error', err);
|
|
6613
6614
|
});
|
|
6614
6615
|
return
|
|
@@ -7114,20 +7115,33 @@ function parse$1(qs, sep, eq, options) {
|
|
|
7114
7115
|
return obj;
|
|
7115
7116
|
}
|
|
7116
7117
|
|
|
7117
|
-
//
|
|
7118
|
-
|
|
7119
|
-
|
|
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
|
+
|
|
7120
7139
|
var url$1 = {
|
|
7121
7140
|
parse: urlParse,
|
|
7122
7141
|
resolve: urlResolve,
|
|
7123
7142
|
resolveObject: urlResolveObject,
|
|
7124
|
-
fileURLToPath: urlFileURLToPath,
|
|
7125
7143
|
format: urlFormat,
|
|
7126
|
-
Url: Url
|
|
7127
|
-
|
|
7128
|
-
// WHATWG API
|
|
7129
|
-
URL: URL$2,
|
|
7130
|
-
URLSearchParams: URLSearchParams$1,
|
|
7144
|
+
Url: Url
|
|
7131
7145
|
};
|
|
7132
7146
|
function Url() {
|
|
7133
7147
|
this.protocol = null;
|
|
@@ -7468,31 +7482,6 @@ function parse(self, url, parseQueryString, slashesDenoteHost) {
|
|
|
7468
7482
|
return self;
|
|
7469
7483
|
}
|
|
7470
7484
|
|
|
7471
|
-
function urlFileURLToPath(path) {
|
|
7472
|
-
if (typeof path === 'string')
|
|
7473
|
-
path = new Url().parse(path);
|
|
7474
|
-
else if (!(path instanceof Url))
|
|
7475
|
-
throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type ' + (typeof path) + String(path));
|
|
7476
|
-
if (path.protocol !== 'file:')
|
|
7477
|
-
throw new TypeError('The URL must be of scheme file');
|
|
7478
|
-
return getPathFromURLPosix(path);
|
|
7479
|
-
}
|
|
7480
|
-
|
|
7481
|
-
function getPathFromURLPosix(url) {
|
|
7482
|
-
const pathname = url.pathname;
|
|
7483
|
-
for (let n = 0; n < pathname.length; n++) {
|
|
7484
|
-
if (pathname[n] === '%') {
|
|
7485
|
-
const third = pathname.codePointAt(n + 2) | 0x20;
|
|
7486
|
-
if (pathname[n + 1] === '2' && third === 102) {
|
|
7487
|
-
throw new TypeError(
|
|
7488
|
-
'must not include encoded / characters'
|
|
7489
|
-
);
|
|
7490
|
-
}
|
|
7491
|
-
}
|
|
7492
|
-
}
|
|
7493
|
-
return decodeURIComponent(pathname);
|
|
7494
|
-
}
|
|
7495
|
-
|
|
7496
7485
|
// format a parsed object into a url string
|
|
7497
7486
|
function urlFormat(obj) {
|
|
7498
7487
|
// ensure it's an object, and not a string url.
|
|
@@ -7862,167 +7851,16 @@ function parseHost(self) {
|
|
|
7862
7851
|
if (host) self.hostname = host;
|
|
7863
7852
|
}
|
|
7864
7853
|
|
|
7865
|
-
var
|
|
7854
|
+
var url$2 = /*#__PURE__*/Object.freeze({
|
|
7866
7855
|
__proto__: null,
|
|
7867
|
-
URL: URL$2,
|
|
7868
|
-
URLSearchParams: URLSearchParams$1,
|
|
7869
7856
|
Url: Url,
|
|
7870
7857
|
default: url$1,
|
|
7871
|
-
fileURLToPath: urlFileURLToPath,
|
|
7872
7858
|
format: urlFormat,
|
|
7873
7859
|
parse: urlParse,
|
|
7874
7860
|
resolve: urlResolve,
|
|
7875
7861
|
resolveObject: urlResolveObject
|
|
7876
7862
|
});
|
|
7877
7863
|
|
|
7878
|
-
function request$1(opts, cb) {
|
|
7879
|
-
if (typeof opts === 'string')
|
|
7880
|
-
opts = urlParse(opts);
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
// Normally, the page is loaded from http or https, so not specifying a protocol
|
|
7884
|
-
// will result in a (valid) protocol-relative url. However, this won't work if
|
|
7885
|
-
// the protocol is something else, like 'file:'
|
|
7886
|
-
var defaultProtocol = global$1.location.protocol.search(/^https?:$/) === -1 ? 'http:' : '';
|
|
7887
|
-
|
|
7888
|
-
var protocol = opts.protocol || defaultProtocol;
|
|
7889
|
-
var host = opts.hostname || opts.host;
|
|
7890
|
-
var port = opts.port;
|
|
7891
|
-
var path = opts.path || '/';
|
|
7892
|
-
|
|
7893
|
-
// Necessary for IPv6 addresses
|
|
7894
|
-
if (host && host.indexOf(':') !== -1)
|
|
7895
|
-
host = '[' + host + ']';
|
|
7896
|
-
|
|
7897
|
-
// This may be a relative url. The browser should always be able to interpret it correctly.
|
|
7898
|
-
opts.url = (host ? (protocol + '//' + host) : '') + (port ? ':' + port : '') + path;
|
|
7899
|
-
opts.method = (opts.method || 'GET').toUpperCase();
|
|
7900
|
-
opts.headers = opts.headers || {};
|
|
7901
|
-
|
|
7902
|
-
// Also valid opts.auth, opts.mode
|
|
7903
|
-
|
|
7904
|
-
var req = new ClientRequest(opts);
|
|
7905
|
-
if (cb)
|
|
7906
|
-
req.on('response', cb);
|
|
7907
|
-
return req
|
|
7908
|
-
}
|
|
7909
|
-
|
|
7910
|
-
function get$1(opts, cb) {
|
|
7911
|
-
var req = request$1(opts, cb);
|
|
7912
|
-
req.end();
|
|
7913
|
-
return req
|
|
7914
|
-
}
|
|
7915
|
-
|
|
7916
|
-
function Agent$1() {}
|
|
7917
|
-
Agent$1.defaultMaxSockets = 4;
|
|
7918
|
-
|
|
7919
|
-
var METHODS$1 = [
|
|
7920
|
-
'CHECKOUT',
|
|
7921
|
-
'CONNECT',
|
|
7922
|
-
'COPY',
|
|
7923
|
-
'DELETE',
|
|
7924
|
-
'GET',
|
|
7925
|
-
'HEAD',
|
|
7926
|
-
'LOCK',
|
|
7927
|
-
'M-SEARCH',
|
|
7928
|
-
'MERGE',
|
|
7929
|
-
'MKACTIVITY',
|
|
7930
|
-
'MKCOL',
|
|
7931
|
-
'MOVE',
|
|
7932
|
-
'NOTIFY',
|
|
7933
|
-
'OPTIONS',
|
|
7934
|
-
'PATCH',
|
|
7935
|
-
'POST',
|
|
7936
|
-
'PROPFIND',
|
|
7937
|
-
'PROPPATCH',
|
|
7938
|
-
'PURGE',
|
|
7939
|
-
'PUT',
|
|
7940
|
-
'REPORT',
|
|
7941
|
-
'SEARCH',
|
|
7942
|
-
'SUBSCRIBE',
|
|
7943
|
-
'TRACE',
|
|
7944
|
-
'UNLOCK',
|
|
7945
|
-
'UNSUBSCRIBE'
|
|
7946
|
-
];
|
|
7947
|
-
var STATUS_CODES$1 = {
|
|
7948
|
-
100: 'Continue',
|
|
7949
|
-
101: 'Switching Protocols',
|
|
7950
|
-
102: 'Processing', // RFC 2518, obsoleted by RFC 4918
|
|
7951
|
-
200: 'OK',
|
|
7952
|
-
201: 'Created',
|
|
7953
|
-
202: 'Accepted',
|
|
7954
|
-
203: 'Non-Authoritative Information',
|
|
7955
|
-
204: 'No Content',
|
|
7956
|
-
205: 'Reset Content',
|
|
7957
|
-
206: 'Partial Content',
|
|
7958
|
-
207: 'Multi-Status', // RFC 4918
|
|
7959
|
-
300: 'Multiple Choices',
|
|
7960
|
-
301: 'Moved Permanently',
|
|
7961
|
-
302: 'Moved Temporarily',
|
|
7962
|
-
303: 'See Other',
|
|
7963
|
-
304: 'Not Modified',
|
|
7964
|
-
305: 'Use Proxy',
|
|
7965
|
-
307: 'Temporary Redirect',
|
|
7966
|
-
400: 'Bad Request',
|
|
7967
|
-
401: 'Unauthorized',
|
|
7968
|
-
402: 'Payment Required',
|
|
7969
|
-
403: 'Forbidden',
|
|
7970
|
-
404: 'Not Found',
|
|
7971
|
-
405: 'Method Not Allowed',
|
|
7972
|
-
406: 'Not Acceptable',
|
|
7973
|
-
407: 'Proxy Authentication Required',
|
|
7974
|
-
408: 'Request Time-out',
|
|
7975
|
-
409: 'Conflict',
|
|
7976
|
-
410: 'Gone',
|
|
7977
|
-
411: 'Length Required',
|
|
7978
|
-
412: 'Precondition Failed',
|
|
7979
|
-
413: 'Request Entity Too Large',
|
|
7980
|
-
414: 'Request-URI Too Large',
|
|
7981
|
-
415: 'Unsupported Media Type',
|
|
7982
|
-
416: 'Requested Range Not Satisfiable',
|
|
7983
|
-
417: 'Expectation Failed',
|
|
7984
|
-
418: 'I\'m a teapot', // RFC 2324
|
|
7985
|
-
422: 'Unprocessable Entity', // RFC 4918
|
|
7986
|
-
423: 'Locked', // RFC 4918
|
|
7987
|
-
424: 'Failed Dependency', // RFC 4918
|
|
7988
|
-
425: 'Unordered Collection', // RFC 4918
|
|
7989
|
-
426: 'Upgrade Required', // RFC 2817
|
|
7990
|
-
428: 'Precondition Required', // RFC 6585
|
|
7991
|
-
429: 'Too Many Requests', // RFC 6585
|
|
7992
|
-
431: 'Request Header Fields Too Large', // RFC 6585
|
|
7993
|
-
500: 'Internal Server Error',
|
|
7994
|
-
501: 'Not Implemented',
|
|
7995
|
-
502: 'Bad Gateway',
|
|
7996
|
-
503: 'Service Unavailable',
|
|
7997
|
-
504: 'Gateway Time-out',
|
|
7998
|
-
505: 'HTTP Version Not Supported',
|
|
7999
|
-
506: 'Variant Also Negotiates', // RFC 2295
|
|
8000
|
-
507: 'Insufficient Storage', // RFC 4918
|
|
8001
|
-
509: 'Bandwidth Limit Exceeded',
|
|
8002
|
-
510: 'Not Extended', // RFC 2774
|
|
8003
|
-
511: 'Network Authentication Required' // RFC 6585
|
|
8004
|
-
};
|
|
8005
|
-
|
|
8006
|
-
var http$2 = {
|
|
8007
|
-
request: request$1,
|
|
8008
|
-
get: get$1,
|
|
8009
|
-
Agent: Agent$1,
|
|
8010
|
-
METHODS: METHODS$1,
|
|
8011
|
-
STATUS_CODES: STATUS_CODES$1
|
|
8012
|
-
};
|
|
8013
|
-
|
|
8014
|
-
var _polyfillNode_http = /*#__PURE__*/Object.freeze({
|
|
8015
|
-
__proto__: null,
|
|
8016
|
-
Agent: Agent$1,
|
|
8017
|
-
METHODS: METHODS$1,
|
|
8018
|
-
STATUS_CODES: STATUS_CODES$1,
|
|
8019
|
-
default: http$2,
|
|
8020
|
-
get: get$1,
|
|
8021
|
-
request: request$1
|
|
8022
|
-
});
|
|
8023
|
-
|
|
8024
|
-
var require$$1 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_polyfillNode_http);
|
|
8025
|
-
|
|
8026
7864
|
function request(opts, cb) {
|
|
8027
7865
|
if (typeof opts === 'string')
|
|
8028
7866
|
opts = urlParse(opts);
|
|
@@ -8151,7 +7989,7 @@ var STATUS_CODES = {
|
|
|
8151
7989
|
511: 'Network Authentication Required' // RFC 6585
|
|
8152
7990
|
};
|
|
8153
7991
|
|
|
8154
|
-
var
|
|
7992
|
+
var http$2 = {
|
|
8155
7993
|
request,
|
|
8156
7994
|
get,
|
|
8157
7995
|
Agent,
|
|
@@ -8159,28 +7997,28 @@ var https$2 = {
|
|
|
8159
7997
|
STATUS_CODES
|
|
8160
7998
|
};
|
|
8161
7999
|
|
|
8162
|
-
var
|
|
8000
|
+
var http$3 = /*#__PURE__*/Object.freeze({
|
|
8163
8001
|
__proto__: null,
|
|
8164
8002
|
Agent: Agent,
|
|
8165
8003
|
METHODS: METHODS,
|
|
8166
8004
|
STATUS_CODES: STATUS_CODES,
|
|
8167
|
-
default:
|
|
8005
|
+
default: http$2,
|
|
8168
8006
|
get: get,
|
|
8169
8007
|
request: request
|
|
8170
8008
|
});
|
|
8171
8009
|
|
|
8172
|
-
var require$$2 = /*@__PURE__*/
|
|
8010
|
+
var require$$2 = /*@__PURE__*/getAugmentedNamespace(http$3);
|
|
8173
8011
|
|
|
8174
|
-
var require$$0$3 = /*@__PURE__*/
|
|
8012
|
+
var require$$0$3 = /*@__PURE__*/getAugmentedNamespace(url$2);
|
|
8175
8013
|
|
|
8176
|
-
var
|
|
8014
|
+
var empty = {};
|
|
8177
8015
|
|
|
8178
|
-
var
|
|
8016
|
+
var empty$1 = /*#__PURE__*/Object.freeze({
|
|
8179
8017
|
__proto__: null,
|
|
8180
|
-
default:
|
|
8018
|
+
default: empty
|
|
8181
8019
|
});
|
|
8182
8020
|
|
|
8183
|
-
var require$$6 = /*@__PURE__*/
|
|
8021
|
+
var require$$6 = /*@__PURE__*/getAugmentedNamespace(empty$1);
|
|
8184
8022
|
|
|
8185
8023
|
var mimeTypes = {};
|
|
8186
8024
|
|
|
@@ -19099,17 +18937,17 @@ var defer_1 = defer$1;
|
|
|
19099
18937
|
*/
|
|
19100
18938
|
function defer$1(fn)
|
|
19101
18939
|
{
|
|
19102
|
-
var nextTick = typeof setImmediate == 'function'
|
|
18940
|
+
var nextTick$1 = typeof setImmediate == 'function'
|
|
19103
18941
|
? setImmediate
|
|
19104
18942
|
: (
|
|
19105
|
-
typeof
|
|
19106
|
-
?
|
|
18943
|
+
typeof process == 'object' && typeof nextTick == 'function'
|
|
18944
|
+
? nextTick
|
|
19107
18945
|
: null
|
|
19108
18946
|
);
|
|
19109
18947
|
|
|
19110
|
-
if (nextTick)
|
|
18948
|
+
if (nextTick$1)
|
|
19111
18949
|
{
|
|
19112
|
-
nextTick(fn);
|
|
18950
|
+
nextTick$1(fn);
|
|
19113
18951
|
}
|
|
19114
18952
|
else
|
|
19115
18953
|
{
|
|
@@ -19489,7 +19327,7 @@ var populate$1 = function(dst, src) {
|
|
|
19489
19327
|
var CombinedStream = combined_stream;
|
|
19490
19328
|
var util = text_min;
|
|
19491
19329
|
var path = require$$2$1;
|
|
19492
|
-
var http$1 = require$$
|
|
19330
|
+
var http$1 = require$$2;
|
|
19493
19331
|
var https$1 = require$$2;
|
|
19494
19332
|
var parseUrl$1 = require$$0$3.parse;
|
|
19495
19333
|
var fs = require$$6;
|
|
@@ -19576,7 +19414,7 @@ FormData$1.prototype._trackLength = function(header, value, options) {
|
|
|
19576
19414
|
// incoming file to finish to get its size.
|
|
19577
19415
|
if (options.knownLength != null) {
|
|
19578
19416
|
valueLength += +options.knownLength;
|
|
19579
|
-
} else if (
|
|
19417
|
+
} else if (isBuffer$1(value)) {
|
|
19580
19418
|
valueLength = value.length;
|
|
19581
19419
|
} else if (typeof value === 'string') {
|
|
19582
19420
|
valueLength = Buffer.byteLength(value);
|
|
@@ -19815,7 +19653,7 @@ FormData$1.prototype.getBuffer = function() {
|
|
|
19815
19653
|
if (typeof this._streams[i] !== 'function') {
|
|
19816
19654
|
|
|
19817
19655
|
// Add content to the buffer.
|
|
19818
|
-
if(
|
|
19656
|
+
if(isBuffer$1(this._streams[i])) {
|
|
19819
19657
|
dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]);
|
|
19820
19658
|
}else {
|
|
19821
19659
|
dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]);
|
|
@@ -19887,7 +19725,7 @@ FormData$1.prototype.getLength = function(cb) {
|
|
|
19887
19725
|
}
|
|
19888
19726
|
|
|
19889
19727
|
if (!this._valuesToMeasure.length) {
|
|
19890
|
-
|
|
19728
|
+
nextTick(cb.bind(this, null, knownLength));
|
|
19891
19729
|
return;
|
|
19892
19730
|
}
|
|
19893
19731
|
|
|
@@ -21266,7 +21104,7 @@ function shouldProxy(hostname, port) {
|
|
|
21266
21104
|
* @private
|
|
21267
21105
|
*/
|
|
21268
21106
|
function getEnv(key) {
|
|
21269
|
-
return
|
|
21107
|
+
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || '';
|
|
21270
21108
|
}
|
|
21271
21109
|
|
|
21272
21110
|
var getProxyForUrl_1 = getProxyForUrl;
|
|
@@ -21732,7 +21570,7 @@ function ifError(err) {
|
|
|
21732
21570
|
if (err) throw err;
|
|
21733
21571
|
}
|
|
21734
21572
|
|
|
21735
|
-
var
|
|
21573
|
+
var assert$3 = /*#__PURE__*/Object.freeze({
|
|
21736
21574
|
__proto__: null,
|
|
21737
21575
|
AssertionError: AssertionError,
|
|
21738
21576
|
assert: ok,
|
|
@@ -21752,1266 +21590,1266 @@ var _polyfillNode_assert = /*#__PURE__*/Object.freeze({
|
|
|
21752
21590
|
throws: throws
|
|
21753
21591
|
});
|
|
21754
21592
|
|
|
21755
|
-
var require$$4 = /*@__PURE__*/
|
|
21756
|
-
|
|
21757
|
-
var src = {exports: {}};
|
|
21593
|
+
var require$$4 = /*@__PURE__*/getAugmentedNamespace(assert$3);
|
|
21758
21594
|
|
|
21759
|
-
var
|
|
21595
|
+
var browser$1 = true;
|
|
21760
21596
|
|
|
21761
|
-
|
|
21762
|
-
// from https://github.com/substack/tty-browserify/blob/1ba769a6429d242f36226538835b4034bf6b7886/index.js
|
|
21597
|
+
var src = {exports: {}};
|
|
21763
21598
|
|
|
21764
|
-
|
|
21765
|
-
return false;
|
|
21766
|
-
}
|
|
21599
|
+
var browser = {exports: {}};
|
|
21767
21600
|
|
|
21768
|
-
|
|
21769
|
-
|
|
21770
|
-
|
|
21601
|
+
/**
|
|
21602
|
+
* Helpers.
|
|
21603
|
+
*/
|
|
21771
21604
|
|
|
21772
|
-
|
|
21773
|
-
|
|
21774
|
-
}
|
|
21605
|
+
var ms;
|
|
21606
|
+
var hasRequiredMs;
|
|
21775
21607
|
|
|
21776
|
-
|
|
21777
|
-
|
|
21778
|
-
|
|
21779
|
-
|
|
21780
|
-
|
|
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;
|
|
21781
21617
|
|
|
21782
|
-
|
|
21783
|
-
|
|
21784
|
-
|
|
21785
|
-
|
|
21786
|
-
|
|
21787
|
-
|
|
21788
|
-
|
|
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
|
+
*/
|
|
21789
21631
|
|
|
21790
|
-
|
|
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
|
+
};
|
|
21791
21645
|
|
|
21792
|
-
|
|
21793
|
-
|
|
21794
|
-
|
|
21795
|
-
|
|
21646
|
+
/**
|
|
21647
|
+
* Parse the given `str` and return milliseconds.
|
|
21648
|
+
*
|
|
21649
|
+
* @param {String} str
|
|
21650
|
+
* @return {Number}
|
|
21651
|
+
* @api private
|
|
21652
|
+
*/
|
|
21796
21653
|
|
|
21797
|
-
|
|
21798
|
-
|
|
21799
|
-
|
|
21800
|
-
|
|
21801
|
-
|
|
21802
|
-
|
|
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
|
+
}
|
|
21803
21710
|
|
|
21804
|
-
|
|
21805
|
-
|
|
21711
|
+
/**
|
|
21712
|
+
* Short format for `ms`.
|
|
21713
|
+
*
|
|
21714
|
+
* @param {Number} ms
|
|
21715
|
+
* @return {String}
|
|
21716
|
+
* @api private
|
|
21717
|
+
*/
|
|
21806
21718
|
|
|
21807
|
-
|
|
21808
|
-
|
|
21809
|
-
|
|
21810
|
-
|
|
21811
|
-
|
|
21812
|
-
|
|
21813
|
-
|
|
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
|
+
}
|
|
21814
21735
|
|
|
21815
|
-
|
|
21816
|
-
|
|
21817
|
-
|
|
21818
|
-
|
|
21819
|
-
|
|
21820
|
-
|
|
21821
|
-
|
|
21822
|
-
b[0] = 1;
|
|
21823
|
-
b[1] = 2;
|
|
21824
|
-
if (c[0] === 258) {
|
|
21825
|
-
_endianness = 'BE';
|
|
21826
|
-
} else if (c[0] === 513){
|
|
21827
|
-
_endianness = 'LE';
|
|
21828
|
-
} else {
|
|
21829
|
-
throw new Error('unable to figure out endianess');
|
|
21830
|
-
}
|
|
21831
|
-
}
|
|
21832
|
-
return _endianness;
|
|
21833
|
-
}
|
|
21736
|
+
/**
|
|
21737
|
+
* Long format for `ms`.
|
|
21738
|
+
*
|
|
21739
|
+
* @param {Number} ms
|
|
21740
|
+
* @return {String}
|
|
21741
|
+
* @api private
|
|
21742
|
+
*/
|
|
21834
21743
|
|
|
21835
|
-
function
|
|
21836
|
-
|
|
21837
|
-
|
|
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
|
-
}
|
|
21793
|
+
Object.keys(env).forEach(key => {
|
|
21794
|
+
createDebug[key] = env[key];
|
|
21795
|
+
});
|
|
21864
21796
|
|
|
21865
|
-
|
|
21866
|
-
|
|
21867
|
-
|
|
21868
|
-
}
|
|
21869
|
-
return '';
|
|
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
|
-
|
|
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
|
+
}
|
|
21887
21824
|
|
|
21888
|
-
|
|
21889
|
-
|
|
21890
|
-
|
|
21891
|
-
var tmpdir = tmpDir;
|
|
21825
|
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
21826
|
+
}
|
|
21827
|
+
createDebug.selectColor = selectColor;
|
|
21892
21828
|
|
|
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
|
-
function
|
|
21896
|
-
|
|
21897
|
-
|
|
21842
|
+
function debug(...args) {
|
|
21843
|
+
// Disabled?
|
|
21844
|
+
if (!debug.enabled) {
|
|
21845
|
+
return;
|
|
21846
|
+
}
|
|
21898
21847
|
|
|
21899
|
-
|
|
21900
|
-
homedir: homedir,
|
|
21901
|
-
EOL: EOL,
|
|
21902
|
-
arch: arch,
|
|
21903
|
-
platform: platform,
|
|
21904
|
-
tmpdir: tmpdir,
|
|
21905
|
-
tmpDir: tmpDir,
|
|
21906
|
-
networkInterfaces:networkInterfaces,
|
|
21907
|
-
getNetworkInterfaces: getNetworkInterfaces,
|
|
21908
|
-
release: release,
|
|
21909
|
-
type: type,
|
|
21910
|
-
cpus: cpus,
|
|
21911
|
-
totalmem: totalmem,
|
|
21912
|
-
freemem: freemem,
|
|
21913
|
-
uptime: uptime,
|
|
21914
|
-
loadavg: loadavg,
|
|
21915
|
-
hostname: hostname,
|
|
21916
|
-
endianness: endianness,
|
|
21917
|
-
};
|
|
21848
|
+
const self = debug;
|
|
21918
21849
|
|
|
21919
|
-
|
|
21920
|
-
|
|
21921
|
-
|
|
21922
|
-
|
|
21923
|
-
|
|
21924
|
-
|
|
21925
|
-
|
|
21926
|
-
freemem: freemem,
|
|
21927
|
-
getNetworkInterfaces: getNetworkInterfaces,
|
|
21928
|
-
homedir: homedir,
|
|
21929
|
-
hostname: hostname,
|
|
21930
|
-
loadavg: loadavg,
|
|
21931
|
-
networkInterfaces: networkInterfaces,
|
|
21932
|
-
platform: platform,
|
|
21933
|
-
release: release,
|
|
21934
|
-
tmpDir: tmpDir,
|
|
21935
|
-
tmpdir: tmpdir,
|
|
21936
|
-
totalmem: totalmem,
|
|
21937
|
-
type: type,
|
|
21938
|
-
uptime: uptime
|
|
21939
|
-
});
|
|
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;
|
|
21940
21857
|
|
|
21941
|
-
|
|
21858
|
+
args[0] = createDebug.coerce(args[0]);
|
|
21942
21859
|
|
|
21943
|
-
|
|
21944
|
-
|
|
21860
|
+
if (typeof args[0] !== 'string') {
|
|
21861
|
+
// Anything else let's inspect with %O
|
|
21862
|
+
args.unshift('%O');
|
|
21863
|
+
}
|
|
21945
21864
|
|
|
21946
|
-
|
|
21947
|
-
|
|
21948
|
-
|
|
21949
|
-
|
|
21950
|
-
|
|
21951
|
-
|
|
21952
|
-
|
|
21953
|
-
|
|
21954
|
-
|
|
21955
|
-
|
|
21956
|
-
|
|
21957
|
-
|
|
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);
|
|
21958
21877
|
|
|
21959
|
-
|
|
21960
|
-
|
|
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
|
+
});
|
|
21961
21884
|
|
|
21962
|
-
|
|
21963
|
-
|
|
21964
|
-
hasRequiredSupportsColor = 1;
|
|
21965
|
-
const os = require$$0;
|
|
21966
|
-
const hasFlag = requireHasFlag();
|
|
21885
|
+
// Apply env-specific formatting (colors, etc.)
|
|
21886
|
+
createDebug.formatArgs.call(self, args);
|
|
21967
21887
|
|
|
21968
|
-
|
|
21888
|
+
const logFn = self.log || createDebug.log;
|
|
21889
|
+
logFn.apply(self, args);
|
|
21890
|
+
}
|
|
21969
21891
|
|
|
21970
|
-
|
|
21971
|
-
|
|
21972
|
-
|
|
21973
|
-
|
|
21974
|
-
|
|
21975
|
-
} else if (hasFlag('color') ||
|
|
21976
|
-
hasFlag('colors') ||
|
|
21977
|
-
hasFlag('color=true') ||
|
|
21978
|
-
hasFlag('color=always')) {
|
|
21979
|
-
forceColor = true;
|
|
21980
|
-
}
|
|
21981
|
-
if ('FORCE_COLOR' in env) {
|
|
21982
|
-
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
21983
|
-
}
|
|
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.
|
|
21984
21897
|
|
|
21985
|
-
|
|
21986
|
-
|
|
21987
|
-
|
|
21988
|
-
|
|
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
|
+
}
|
|
21989
21909
|
|
|
21990
|
-
|
|
21991
|
-
|
|
21992
|
-
|
|
21993
|
-
|
|
21994
|
-
|
|
21995
|
-
|
|
21996
|
-
}
|
|
21910
|
+
return enabledCache;
|
|
21911
|
+
},
|
|
21912
|
+
set: v => {
|
|
21913
|
+
enableOverride = v;
|
|
21914
|
+
}
|
|
21915
|
+
});
|
|
21997
21916
|
|
|
21998
|
-
|
|
21999
|
-
|
|
22000
|
-
|
|
22001
|
-
|
|
21917
|
+
// Env-specific initialization logic for debug instances
|
|
21918
|
+
if (typeof createDebug.init === 'function') {
|
|
21919
|
+
createDebug.init(debug);
|
|
21920
|
+
}
|
|
22002
21921
|
|
|
22003
|
-
|
|
22004
|
-
hasFlag('color=full') ||
|
|
22005
|
-
hasFlag('color=truecolor')) {
|
|
22006
|
-
return 3;
|
|
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
|
-
|
|
22014
|
-
|
|
22015
|
-
|
|
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;
|
|
22016
21941
|
|
|
22017
|
-
|
|
21942
|
+
createDebug.names = [];
|
|
21943
|
+
createDebug.skips = [];
|
|
22018
21944
|
|
|
22019
|
-
|
|
22020
|
-
|
|
22021
|
-
|
|
22022
|
-
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
|
|
22023
|
-
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
|
|
22024
|
-
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
|
22025
|
-
// that supports 16m/TrueColor.
|
|
22026
|
-
const osRelease = os.release().split('.');
|
|
22027
|
-
if (
|
|
22028
|
-
Number(browser$1$1.versions.node.split('.')[0]) >= 8 &&
|
|
22029
|
-
Number(osRelease[0]) >= 10 &&
|
|
22030
|
-
Number(osRelease[2]) >= 10586
|
|
22031
|
-
) {
|
|
22032
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
22033
|
-
}
|
|
21945
|
+
let i;
|
|
21946
|
+
const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
|
21947
|
+
const len = split.length;
|
|
22034
21948
|
|
|
22035
|
-
|
|
22036
|
-
|
|
21949
|
+
for (i = 0; i < len; i++) {
|
|
21950
|
+
if (!split[i]) {
|
|
21951
|
+
// ignore empty strings
|
|
21952
|
+
continue;
|
|
21953
|
+
}
|
|
22037
21954
|
|
|
22038
|
-
|
|
22039
|
-
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
|
22040
|
-
return 1;
|
|
22041
|
-
}
|
|
21955
|
+
namespaces = split[i].replace(/\*/g, '.*?');
|
|
22042
21956
|
|
|
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
|
-
|
|
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;
|
|
21990
|
+
}
|
|
22053
21991
|
|
|
22054
|
-
|
|
22055
|
-
|
|
21992
|
+
let i;
|
|
21993
|
+
let len;
|
|
22056
21994
|
|
|
22057
|
-
|
|
22058
|
-
|
|
22059
|
-
return
|
|
22060
|
-
|
|
22061
|
-
return 2;
|
|
22062
|
-
// No default
|
|
21995
|
+
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
21996
|
+
if (createDebug.skips[i].test(name)) {
|
|
21997
|
+
return false;
|
|
21998
|
+
}
|
|
22063
21999
|
}
|
|
22064
|
-
}
|
|
22065
22000
|
|
|
22066
|
-
|
|
22067
|
-
|
|
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;
|
|
22068
22008
|
}
|
|
22069
22009
|
|
|
22070
|
-
|
|
22071
|
-
|
|
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(/\.\*\?$/, '*');
|
|
22072
22021
|
}
|
|
22073
22022
|
|
|
22074
|
-
|
|
22075
|
-
|
|
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;
|
|
22076
22035
|
}
|
|
22077
22036
|
|
|
22078
|
-
|
|
22079
|
-
|
|
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`.');
|
|
22080
22043
|
}
|
|
22081
22044
|
|
|
22082
|
-
|
|
22083
|
-
}
|
|
22045
|
+
createDebug.enable(createDebug.load());
|
|
22084
22046
|
|
|
22085
|
-
|
|
22086
|
-
const level = supportsColor(stream);
|
|
22087
|
-
return translateLevel(level);
|
|
22047
|
+
return createDebug;
|
|
22088
22048
|
}
|
|
22089
22049
|
|
|
22090
|
-
|
|
22091
|
-
|
|
22092
|
-
stdout: getSupportLevel(browser$1$1.stdout),
|
|
22093
|
-
stderr: getSupportLevel(browser$1$1.stderr)
|
|
22094
|
-
};
|
|
22095
|
-
return supportsColor_1;
|
|
22050
|
+
common = setup;
|
|
22051
|
+
return common;
|
|
22096
22052
|
}
|
|
22097
22053
|
|
|
22098
|
-
|
|
22099
|
-
* Helpers.
|
|
22100
|
-
*/
|
|
22054
|
+
var hasRequiredBrowser;
|
|
22101
22055
|
|
|
22102
|
-
|
|
22103
|
-
|
|
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
|
+
*/
|
|
22104
22063
|
|
|
22105
|
-
|
|
22106
|
-
|
|
22107
|
-
|
|
22108
|
-
|
|
22109
|
-
|
|
22110
|
-
|
|
22111
|
-
|
|
22112
|
-
var w = d * 7;
|
|
22113
|
-
var y = d * 365.25;
|
|
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;
|
|
22114
22071
|
|
|
22115
|
-
|
|
22116
|
-
|
|
22117
|
-
|
|
22118
|
-
|
|
22119
|
-
|
|
22120
|
-
|
|
22121
|
-
|
|
22122
|
-
* @param {String|Number} val
|
|
22123
|
-
* @param {Object} [options]
|
|
22124
|
-
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
22125
|
-
* @return {String|Number}
|
|
22126
|
-
* @api public
|
|
22127
|
-
*/
|
|
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
|
+
})();
|
|
22128
22079
|
|
|
22129
|
-
|
|
22130
|
-
|
|
22131
|
-
|
|
22132
|
-
if (type === 'string' && val.length > 0) {
|
|
22133
|
-
return parse(val);
|
|
22134
|
-
} else if (type === 'number' && isFinite(val)) {
|
|
22135
|
-
return options.long ? fmtLong(val) : fmtShort(val);
|
|
22136
|
-
}
|
|
22137
|
-
throw new Error(
|
|
22138
|
-
'val is not a non-empty string or a valid number. val=' +
|
|
22139
|
-
JSON.stringify(val)
|
|
22140
|
-
);
|
|
22141
|
-
};
|
|
22080
|
+
/**
|
|
22081
|
+
* Colors.
|
|
22082
|
+
*/
|
|
22142
22083
|
|
|
22143
|
-
|
|
22144
|
-
|
|
22145
|
-
|
|
22146
|
-
|
|
22147
|
-
|
|
22148
|
-
|
|
22149
|
-
|
|
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
|
+
];
|
|
22150
22162
|
|
|
22151
|
-
|
|
22152
|
-
|
|
22153
|
-
|
|
22154
|
-
|
|
22155
|
-
|
|
22156
|
-
|
|
22157
|
-
|
|
22158
|
-
);
|
|
22159
|
-
if (!match) {
|
|
22160
|
-
return;
|
|
22161
|
-
}
|
|
22162
|
-
var n = parseFloat(match[1]);
|
|
22163
|
-
var type = (match[2] || 'ms').toLowerCase();
|
|
22164
|
-
switch (type) {
|
|
22165
|
-
case 'years':
|
|
22166
|
-
case 'year':
|
|
22167
|
-
case 'yrs':
|
|
22168
|
-
case 'yr':
|
|
22169
|
-
case 'y':
|
|
22170
|
-
return n * y;
|
|
22171
|
-
case 'weeks':
|
|
22172
|
-
case 'week':
|
|
22173
|
-
case 'w':
|
|
22174
|
-
return n * w;
|
|
22175
|
-
case 'days':
|
|
22176
|
-
case 'day':
|
|
22177
|
-
case 'd':
|
|
22178
|
-
return n * d;
|
|
22179
|
-
case 'hours':
|
|
22180
|
-
case 'hour':
|
|
22181
|
-
case 'hrs':
|
|
22182
|
-
case 'hr':
|
|
22183
|
-
case 'h':
|
|
22184
|
-
return n * h;
|
|
22185
|
-
case 'minutes':
|
|
22186
|
-
case 'minute':
|
|
22187
|
-
case 'mins':
|
|
22188
|
-
case 'min':
|
|
22189
|
-
case 'm':
|
|
22190
|
-
return n * m;
|
|
22191
|
-
case 'seconds':
|
|
22192
|
-
case 'second':
|
|
22193
|
-
case 'secs':
|
|
22194
|
-
case 'sec':
|
|
22195
|
-
case 's':
|
|
22196
|
-
return n * s;
|
|
22197
|
-
case 'milliseconds':
|
|
22198
|
-
case 'millisecond':
|
|
22199
|
-
case 'msecs':
|
|
22200
|
-
case 'msec':
|
|
22201
|
-
case 'ms':
|
|
22202
|
-
return n;
|
|
22203
|
-
default:
|
|
22204
|
-
return undefined;
|
|
22205
|
-
}
|
|
22206
|
-
}
|
|
22207
|
-
|
|
22208
|
-
/**
|
|
22209
|
-
* Short format for `ms`.
|
|
22210
|
-
*
|
|
22211
|
-
* @param {Number} ms
|
|
22212
|
-
* @return {String}
|
|
22213
|
-
* @api private
|
|
22214
|
-
*/
|
|
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
|
+
*/
|
|
22215
22170
|
|
|
22216
|
-
|
|
22217
|
-
|
|
22218
|
-
|
|
22219
|
-
|
|
22220
|
-
|
|
22221
|
-
|
|
22222
|
-
|
|
22223
|
-
|
|
22224
|
-
if (msAbs >= m) {
|
|
22225
|
-
return Math.round(ms / m) + 'm';
|
|
22226
|
-
}
|
|
22227
|
-
if (msAbs >= s) {
|
|
22228
|
-
return Math.round(ms / s) + 's';
|
|
22229
|
-
}
|
|
22230
|
-
return ms + 'ms';
|
|
22231
|
-
}
|
|
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
|
+
}
|
|
22232
22179
|
|
|
22233
|
-
|
|
22234
|
-
|
|
22235
|
-
|
|
22236
|
-
|
|
22237
|
-
* @return {String}
|
|
22238
|
-
* @api private
|
|
22239
|
-
*/
|
|
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
|
+
}
|
|
22240
22184
|
|
|
22241
|
-
|
|
22242
|
-
|
|
22243
|
-
|
|
22244
|
-
|
|
22245
|
-
|
|
22246
|
-
|
|
22247
|
-
|
|
22248
|
-
|
|
22249
|
-
|
|
22250
|
-
|
|
22251
|
-
|
|
22252
|
-
if (msAbs >= s) {
|
|
22253
|
-
return plural(ms, msAbs, s, 'second');
|
|
22254
|
-
}
|
|
22255
|
-
return ms + ' ms';
|
|
22256
|
-
}
|
|
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
|
+
}
|
|
22257
22196
|
|
|
22258
|
-
|
|
22259
|
-
|
|
22260
|
-
|
|
22197
|
+
/**
|
|
22198
|
+
* Colorize log arguments if enabled.
|
|
22199
|
+
*
|
|
22200
|
+
* @api public
|
|
22201
|
+
*/
|
|
22261
22202
|
|
|
22262
|
-
|
|
22263
|
-
|
|
22264
|
-
|
|
22265
|
-
|
|
22266
|
-
|
|
22267
|
-
|
|
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);
|
|
22268
22210
|
|
|
22269
|
-
|
|
22270
|
-
|
|
22211
|
+
if (!this.useColors) {
|
|
22212
|
+
return;
|
|
22213
|
+
}
|
|
22271
22214
|
|
|
22272
|
-
|
|
22273
|
-
|
|
22274
|
-
hasRequiredCommon = 1;
|
|
22275
|
-
/**
|
|
22276
|
-
* This is the common logic for both the Node.js and web browser
|
|
22277
|
-
* implementations of `debug()`.
|
|
22278
|
-
*/
|
|
22215
|
+
const c = 'color: ' + this.color;
|
|
22216
|
+
args.splice(1, 0, c, 'color: inherit');
|
|
22279
22217
|
|
|
22280
|
-
|
|
22281
|
-
|
|
22282
|
-
|
|
22283
|
-
|
|
22284
|
-
|
|
22285
|
-
|
|
22286
|
-
|
|
22287
|
-
|
|
22288
|
-
|
|
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
|
+
});
|
|
22289
22234
|
|
|
22290
|
-
|
|
22291
|
-
|
|
22292
|
-
});
|
|
22235
|
+
args.splice(lastC, 0, c);
|
|
22236
|
+
}
|
|
22293
22237
|
|
|
22294
22238
|
/**
|
|
22295
|
-
|
|
22296
|
-
|
|
22297
|
-
|
|
22298
|
-
|
|
22299
|
-
|
|
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 || (() => {});
|
|
22300
22247
|
|
|
22301
22248
|
/**
|
|
22302
|
-
|
|
22303
|
-
|
|
22304
|
-
|
|
22305
|
-
|
|
22306
|
-
|
|
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
|
+
}
|
|
22307
22266
|
|
|
22308
22267
|
/**
|
|
22309
|
-
|
|
22310
|
-
|
|
22311
|
-
|
|
22312
|
-
|
|
22313
|
-
|
|
22314
|
-
function
|
|
22315
|
-
let
|
|
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?
|
|
22280
|
+
}
|
|
22316
22281
|
|
|
22317
|
-
|
|
22318
|
-
|
|
22319
|
-
|
|
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;
|
|
22320
22285
|
}
|
|
22321
22286
|
|
|
22322
|
-
return
|
|
22287
|
+
return r;
|
|
22323
22288
|
}
|
|
22324
|
-
createDebug.selectColor = selectColor;
|
|
22325
22289
|
|
|
22326
22290
|
/**
|
|
22327
|
-
|
|
22328
|
-
|
|
22329
|
-
|
|
22330
|
-
|
|
22331
|
-
|
|
22332
|
-
|
|
22333
|
-
|
|
22334
|
-
|
|
22335
|
-
|
|
22336
|
-
let namespacesCache;
|
|
22337
|
-
let enabledCache;
|
|
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
|
+
*/
|
|
22338
22300
|
|
|
22339
|
-
|
|
22340
|
-
|
|
22341
|
-
|
|
22342
|
-
|
|
22343
|
-
|
|
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
|
+
}
|
|
22344
22311
|
|
|
22345
|
-
|
|
22312
|
+
module.exports = requireCommon()(exports);
|
|
22346
22313
|
|
|
22347
|
-
|
|
22348
|
-
const curr = Number(new Date());
|
|
22349
|
-
const ms = curr - (prevTime || curr);
|
|
22350
|
-
self.diff = ms;
|
|
22351
|
-
self.prev = prevTime;
|
|
22352
|
-
self.curr = curr;
|
|
22353
|
-
prevTime = curr;
|
|
22314
|
+
const {formatters} = module.exports;
|
|
22354
22315
|
|
|
22355
|
-
|
|
22316
|
+
/**
|
|
22317
|
+
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
|
22318
|
+
*/
|
|
22356
22319
|
|
|
22357
|
-
|
|
22358
|
-
|
|
22359
|
-
|
|
22360
|
-
|
|
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
|
+
}
|
|
22361
22330
|
|
|
22362
|
-
|
|
22363
|
-
let index = 0;
|
|
22364
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
22365
|
-
// If we encounter an escaped % then don't increase the array index
|
|
22366
|
-
if (match === '%%') {
|
|
22367
|
-
return '%';
|
|
22368
|
-
}
|
|
22369
|
-
index++;
|
|
22370
|
-
const formatter = createDebug.formatters[format];
|
|
22371
|
-
if (typeof formatter === 'function') {
|
|
22372
|
-
const val = args[index];
|
|
22373
|
-
match = formatter.call(self, val);
|
|
22331
|
+
var node = {exports: {}};
|
|
22374
22332
|
|
|
22375
|
-
|
|
22376
|
-
|
|
22377
|
-
index--;
|
|
22378
|
-
}
|
|
22379
|
-
return match;
|
|
22380
|
-
});
|
|
22333
|
+
// MIT lisence
|
|
22334
|
+
// from https://github.com/substack/tty-browserify/blob/1ba769a6429d242f36226538835b4034bf6b7886/index.js
|
|
22381
22335
|
|
|
22382
|
-
|
|
22383
|
-
|
|
22336
|
+
function isatty() {
|
|
22337
|
+
return false;
|
|
22338
|
+
}
|
|
22384
22339
|
|
|
22385
|
-
|
|
22386
|
-
|
|
22387
|
-
|
|
22340
|
+
function ReadStream() {
|
|
22341
|
+
throw new Error('tty.ReadStream is not implemented');
|
|
22342
|
+
}
|
|
22388
22343
|
|
|
22389
|
-
|
|
22390
|
-
|
|
22391
|
-
|
|
22392
|
-
debug.extend = extend;
|
|
22393
|
-
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
|
22344
|
+
function WriteStream() {
|
|
22345
|
+
throw new Error('tty.ReadStream is not implemented');
|
|
22346
|
+
}
|
|
22394
22347
|
|
|
22395
|
-
|
|
22396
|
-
|
|
22397
|
-
|
|
22398
|
-
|
|
22399
|
-
|
|
22400
|
-
return enableOverride;
|
|
22401
|
-
}
|
|
22402
|
-
if (namespacesCache !== createDebug.namespaces) {
|
|
22403
|
-
namespacesCache = createDebug.namespaces;
|
|
22404
|
-
enabledCache = createDebug.enabled(namespace);
|
|
22405
|
-
}
|
|
22348
|
+
var tty = {
|
|
22349
|
+
isatty: isatty,
|
|
22350
|
+
ReadStream: ReadStream,
|
|
22351
|
+
WriteStream: WriteStream
|
|
22352
|
+
};
|
|
22406
22353
|
|
|
22407
|
-
|
|
22408
|
-
|
|
22409
|
-
|
|
22410
|
-
|
|
22411
|
-
|
|
22412
|
-
|
|
22354
|
+
var tty$1 = /*#__PURE__*/Object.freeze({
|
|
22355
|
+
__proto__: null,
|
|
22356
|
+
ReadStream: ReadStream,
|
|
22357
|
+
WriteStream: WriteStream,
|
|
22358
|
+
default: tty,
|
|
22359
|
+
isatty: isatty
|
|
22360
|
+
});
|
|
22413
22361
|
|
|
22414
|
-
|
|
22415
|
-
if (typeof createDebug.init === 'function') {
|
|
22416
|
-
createDebug.init(debug);
|
|
22417
|
-
}
|
|
22362
|
+
var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(tty$1);
|
|
22418
22363
|
|
|
22419
|
-
|
|
22420
|
-
|
|
22364
|
+
/*
|
|
22365
|
+
The MIT License (MIT)
|
|
22421
22366
|
|
|
22422
|
-
|
|
22423
|
-
const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
|
22424
|
-
newDebug.log = this.log;
|
|
22425
|
-
return newDebug;
|
|
22426
|
-
}
|
|
22367
|
+
Copyright (c) 2016 CoderPuppy
|
|
22427
22368
|
|
|
22428
|
-
|
|
22429
|
-
|
|
22430
|
-
|
|
22431
|
-
|
|
22432
|
-
|
|
22433
|
-
|
|
22434
|
-
*/
|
|
22435
|
-
function enable(namespaces) {
|
|
22436
|
-
createDebug.save(namespaces);
|
|
22437
|
-
createDebug.namespaces = namespaces;
|
|
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:
|
|
22438
22375
|
|
|
22439
|
-
|
|
22440
|
-
|
|
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
|
-
|
|
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.
|
|
22445
22386
|
|
|
22446
|
-
|
|
22447
|
-
|
|
22448
|
-
|
|
22449
|
-
|
|
22450
|
-
|
|
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
|
+
}
|
|
22451
22406
|
|
|
22452
|
-
|
|
22407
|
+
function hostname() {
|
|
22408
|
+
if (typeof global$1.location !== 'undefined') {
|
|
22409
|
+
return global$1.location.hostname
|
|
22410
|
+
} else return '';
|
|
22411
|
+
}
|
|
22453
22412
|
|
|
22454
|
-
|
|
22455
|
-
|
|
22456
|
-
|
|
22457
|
-
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
|
22458
|
-
}
|
|
22459
|
-
}
|
|
22460
|
-
}
|
|
22413
|
+
function loadavg() {
|
|
22414
|
+
return [];
|
|
22415
|
+
}
|
|
22461
22416
|
|
|
22462
|
-
|
|
22463
|
-
|
|
22464
|
-
|
|
22465
|
-
* @return {String} namespaces
|
|
22466
|
-
* @api public
|
|
22467
|
-
*/
|
|
22468
|
-
function disable() {
|
|
22469
|
-
const namespaces = [
|
|
22470
|
-
...createDebug.names.map(toNamespace),
|
|
22471
|
-
...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
|
|
22472
|
-
].join(',');
|
|
22473
|
-
createDebug.enable('');
|
|
22474
|
-
return namespaces;
|
|
22475
|
-
}
|
|
22417
|
+
function uptime() {
|
|
22418
|
+
return 0;
|
|
22419
|
+
}
|
|
22476
22420
|
|
|
22477
|
-
|
|
22478
|
-
|
|
22479
|
-
|
|
22480
|
-
* @param {String} name
|
|
22481
|
-
* @return {Boolean}
|
|
22482
|
-
* @api public
|
|
22483
|
-
*/
|
|
22484
|
-
function enabled(name) {
|
|
22485
|
-
if (name[name.length - 1] === '*') {
|
|
22486
|
-
return true;
|
|
22487
|
-
}
|
|
22421
|
+
function freemem() {
|
|
22422
|
+
return Number.MAX_VALUE;
|
|
22423
|
+
}
|
|
22488
22424
|
|
|
22489
|
-
|
|
22490
|
-
|
|
22425
|
+
function totalmem() {
|
|
22426
|
+
return Number.MAX_VALUE;
|
|
22427
|
+
}
|
|
22491
22428
|
|
|
22492
|
-
|
|
22493
|
-
|
|
22494
|
-
|
|
22495
|
-
}
|
|
22496
|
-
}
|
|
22429
|
+
function cpus() {
|
|
22430
|
+
return [];
|
|
22431
|
+
}
|
|
22497
22432
|
|
|
22498
|
-
|
|
22499
|
-
|
|
22500
|
-
|
|
22501
|
-
}
|
|
22502
|
-
}
|
|
22433
|
+
function type() {
|
|
22434
|
+
return 'Browser';
|
|
22435
|
+
}
|
|
22503
22436
|
|
|
22504
|
-
|
|
22505
|
-
|
|
22437
|
+
function release () {
|
|
22438
|
+
if (typeof global$1.navigator !== 'undefined') {
|
|
22439
|
+
return global$1.navigator.appVersion;
|
|
22440
|
+
}
|
|
22441
|
+
return '';
|
|
22442
|
+
}
|
|
22506
22443
|
|
|
22507
|
-
|
|
22508
|
-
|
|
22509
|
-
*
|
|
22510
|
-
* @param {RegExp} regxep
|
|
22511
|
-
* @return {String} namespace
|
|
22512
|
-
* @api private
|
|
22513
|
-
*/
|
|
22514
|
-
function toNamespace(regexp) {
|
|
22515
|
-
return regexp.toString()
|
|
22516
|
-
.substring(2, regexp.toString().length - 2)
|
|
22517
|
-
.replace(/\.\*\?$/, '*');
|
|
22518
|
-
}
|
|
22444
|
+
function networkInterfaces(){}
|
|
22445
|
+
function getNetworkInterfaces(){}
|
|
22519
22446
|
|
|
22520
|
-
|
|
22521
|
-
|
|
22522
|
-
|
|
22523
|
-
* @param {Mixed} val
|
|
22524
|
-
* @return {Mixed}
|
|
22525
|
-
* @api private
|
|
22526
|
-
*/
|
|
22527
|
-
function coerce(val) {
|
|
22528
|
-
if (val instanceof Error) {
|
|
22529
|
-
return val.stack || val.message;
|
|
22530
|
-
}
|
|
22531
|
-
return val;
|
|
22532
|
-
}
|
|
22447
|
+
function arch() {
|
|
22448
|
+
return 'javascript';
|
|
22449
|
+
}
|
|
22533
22450
|
|
|
22534
|
-
|
|
22535
|
-
|
|
22536
|
-
|
|
22537
|
-
*/
|
|
22538
|
-
function destroy() {
|
|
22539
|
-
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
22540
|
-
}
|
|
22541
|
-
|
|
22542
|
-
createDebug.enable(createDebug.load());
|
|
22543
|
-
|
|
22544
|
-
return createDebug;
|
|
22545
|
-
}
|
|
22451
|
+
function platform() {
|
|
22452
|
+
return 'browser';
|
|
22453
|
+
}
|
|
22546
22454
|
|
|
22547
|
-
|
|
22548
|
-
|
|
22455
|
+
function tmpDir() {
|
|
22456
|
+
return '/tmp';
|
|
22549
22457
|
}
|
|
22458
|
+
var tmpdir = tmpDir;
|
|
22550
22459
|
|
|
22551
|
-
var
|
|
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
|
+
};
|
|
22552
22477
|
|
|
22553
|
-
|
|
22554
|
-
|
|
22555
|
-
|
|
22556
|
-
|
|
22557
|
-
|
|
22558
|
-
|
|
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
|
+
});
|
|
22559
22498
|
|
|
22560
|
-
|
|
22561
|
-
* This is the Node.js implementation of `debug()`.
|
|
22562
|
-
*/
|
|
22499
|
+
var require$$0 = /*@__PURE__*/getAugmentedNamespace(os$1);
|
|
22563
22500
|
|
|
22564
|
-
|
|
22565
|
-
|
|
22566
|
-
exports.formatArgs = formatArgs;
|
|
22567
|
-
exports.save = save;
|
|
22568
|
-
exports.load = load;
|
|
22569
|
-
exports.useColors = useColors;
|
|
22570
|
-
exports.destroy = util.deprecate(
|
|
22571
|
-
() => {},
|
|
22572
|
-
'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
|
|
22573
|
-
);
|
|
22574
|
-
|
|
22575
|
-
/**
|
|
22576
|
-
* Colors.
|
|
22577
|
-
*/
|
|
22501
|
+
var hasFlag;
|
|
22502
|
+
var hasRequiredHasFlag;
|
|
22578
22503
|
|
|
22579
|
-
|
|
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
|
+
}
|
|
22580
22516
|
|
|
22581
|
-
|
|
22582
|
-
|
|
22583
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
22584
|
-
const supportsColor = requireSupportsColor();
|
|
22517
|
+
var supportsColor_1;
|
|
22518
|
+
var hasRequiredSupportsColor;
|
|
22585
22519
|
|
|
22586
|
-
|
|
22587
|
-
|
|
22588
|
-
|
|
22589
|
-
|
|
22590
|
-
|
|
22591
|
-
27,
|
|
22592
|
-
32,
|
|
22593
|
-
33,
|
|
22594
|
-
38,
|
|
22595
|
-
39,
|
|
22596
|
-
40,
|
|
22597
|
-
41,
|
|
22598
|
-
42,
|
|
22599
|
-
43,
|
|
22600
|
-
44,
|
|
22601
|
-
45,
|
|
22602
|
-
56,
|
|
22603
|
-
57,
|
|
22604
|
-
62,
|
|
22605
|
-
63,
|
|
22606
|
-
68,
|
|
22607
|
-
69,
|
|
22608
|
-
74,
|
|
22609
|
-
75,
|
|
22610
|
-
76,
|
|
22611
|
-
77,
|
|
22612
|
-
78,
|
|
22613
|
-
79,
|
|
22614
|
-
80,
|
|
22615
|
-
81,
|
|
22616
|
-
92,
|
|
22617
|
-
93,
|
|
22618
|
-
98,
|
|
22619
|
-
99,
|
|
22620
|
-
112,
|
|
22621
|
-
113,
|
|
22622
|
-
128,
|
|
22623
|
-
129,
|
|
22624
|
-
134,
|
|
22625
|
-
135,
|
|
22626
|
-
148,
|
|
22627
|
-
149,
|
|
22628
|
-
160,
|
|
22629
|
-
161,
|
|
22630
|
-
162,
|
|
22631
|
-
163,
|
|
22632
|
-
164,
|
|
22633
|
-
165,
|
|
22634
|
-
166,
|
|
22635
|
-
167,
|
|
22636
|
-
168,
|
|
22637
|
-
169,
|
|
22638
|
-
170,
|
|
22639
|
-
171,
|
|
22640
|
-
172,
|
|
22641
|
-
173,
|
|
22642
|
-
178,
|
|
22643
|
-
179,
|
|
22644
|
-
184,
|
|
22645
|
-
185,
|
|
22646
|
-
196,
|
|
22647
|
-
197,
|
|
22648
|
-
198,
|
|
22649
|
-
199,
|
|
22650
|
-
200,
|
|
22651
|
-
201,
|
|
22652
|
-
202,
|
|
22653
|
-
203,
|
|
22654
|
-
204,
|
|
22655
|
-
205,
|
|
22656
|
-
206,
|
|
22657
|
-
207,
|
|
22658
|
-
208,
|
|
22659
|
-
209,
|
|
22660
|
-
214,
|
|
22661
|
-
215,
|
|
22662
|
-
220,
|
|
22663
|
-
221
|
|
22664
|
-
];
|
|
22665
|
-
}
|
|
22666
|
-
} catch (error) {
|
|
22667
|
-
// Swallow - we only care if `supports-color` is available; it doesn't have to be.
|
|
22668
|
-
}
|
|
22520
|
+
function requireSupportsColor () {
|
|
22521
|
+
if (hasRequiredSupportsColor) return supportsColor_1;
|
|
22522
|
+
hasRequiredSupportsColor = 1;
|
|
22523
|
+
const os = require$$0;
|
|
22524
|
+
const hasFlag = requireHasFlag();
|
|
22669
22525
|
|
|
22670
|
-
|
|
22671
|
-
* Build up the default `inspectOpts` object from the environment variables.
|
|
22672
|
-
*
|
|
22673
|
-
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
|
22674
|
-
*/
|
|
22526
|
+
const env = process.env;
|
|
22675
22527
|
|
|
22676
|
-
|
|
22677
|
-
|
|
22678
|
-
|
|
22679
|
-
|
|
22680
|
-
|
|
22681
|
-
|
|
22682
|
-
|
|
22683
|
-
|
|
22684
|
-
|
|
22685
|
-
|
|
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
|
+
}
|
|
22686
22542
|
|
|
22687
|
-
|
|
22688
|
-
|
|
22689
|
-
|
|
22690
|
-
|
|
22691
|
-
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
22692
|
-
val = false;
|
|
22693
|
-
} else if (val === 'null') {
|
|
22694
|
-
val = null;
|
|
22695
|
-
} else {
|
|
22696
|
-
val = Number(val);
|
|
22697
|
-
}
|
|
22543
|
+
function translateLevel(level) {
|
|
22544
|
+
if (level === 0) {
|
|
22545
|
+
return false;
|
|
22546
|
+
}
|
|
22698
22547
|
|
|
22699
|
-
|
|
22700
|
-
|
|
22701
|
-
|
|
22548
|
+
return {
|
|
22549
|
+
level,
|
|
22550
|
+
hasBasic: true,
|
|
22551
|
+
has256: level >= 2,
|
|
22552
|
+
has16m: level >= 3
|
|
22553
|
+
};
|
|
22554
|
+
}
|
|
22702
22555
|
|
|
22703
|
-
|
|
22704
|
-
|
|
22705
|
-
|
|
22556
|
+
function supportsColor(stream) {
|
|
22557
|
+
if (forceColor === false) {
|
|
22558
|
+
return 0;
|
|
22559
|
+
}
|
|
22706
22560
|
|
|
22707
|
-
|
|
22708
|
-
|
|
22709
|
-
|
|
22710
|
-
|
|
22561
|
+
if (hasFlag('color=16m') ||
|
|
22562
|
+
hasFlag('color=full') ||
|
|
22563
|
+
hasFlag('color=truecolor')) {
|
|
22564
|
+
return 3;
|
|
22711
22565
|
}
|
|
22712
22566
|
|
|
22713
|
-
|
|
22714
|
-
|
|
22715
|
-
|
|
22716
|
-
* @api public
|
|
22717
|
-
*/
|
|
22567
|
+
if (hasFlag('color=256')) {
|
|
22568
|
+
return 2;
|
|
22569
|
+
}
|
|
22718
22570
|
|
|
22719
|
-
|
|
22720
|
-
|
|
22571
|
+
if (stream && !stream.isTTY && forceColor !== true) {
|
|
22572
|
+
return 0;
|
|
22573
|
+
}
|
|
22721
22574
|
|
|
22722
|
-
|
|
22723
|
-
const c = this.color;
|
|
22724
|
-
const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
|
|
22725
|
-
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
|
|
22575
|
+
const min = forceColor ? 1 : 0;
|
|
22726
22576
|
|
|
22727
|
-
|
|
22728
|
-
|
|
22729
|
-
|
|
22730
|
-
|
|
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;
|
|
22731
22591
|
}
|
|
22732
|
-
}
|
|
22733
22592
|
|
|
22734
|
-
|
|
22735
|
-
if (exports.inspectOpts.hideDate) {
|
|
22736
|
-
return '';
|
|
22737
|
-
}
|
|
22738
|
-
return new Date().toISOString() + ' ';
|
|
22593
|
+
return 1;
|
|
22739
22594
|
}
|
|
22740
22595
|
|
|
22741
|
-
|
|
22742
|
-
|
|
22743
|
-
|
|
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
|
+
}
|
|
22744
22600
|
|
|
22745
|
-
|
|
22746
|
-
return browser$1$1.stderr.write(util.format(...args) + '\n');
|
|
22601
|
+
return min;
|
|
22747
22602
|
}
|
|
22748
22603
|
|
|
22749
|
-
|
|
22750
|
-
|
|
22751
|
-
*
|
|
22752
|
-
* @param {String} namespaces
|
|
22753
|
-
* @api private
|
|
22754
|
-
*/
|
|
22755
|
-
function save(namespaces) {
|
|
22756
|
-
if (namespaces) {
|
|
22757
|
-
browser$1$1.env.DEBUG = namespaces;
|
|
22758
|
-
} else {
|
|
22759
|
-
// If you set a process.env field to null or undefined, it gets cast to the
|
|
22760
|
-
// string 'null' or 'undefined'. Just delete instead.
|
|
22761
|
-
delete browser$1$1.env.DEBUG;
|
|
22762
|
-
}
|
|
22604
|
+
if ('TEAMCITY_VERSION' in env) {
|
|
22605
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
22763
22606
|
}
|
|
22764
22607
|
|
|
22765
|
-
|
|
22766
|
-
|
|
22767
|
-
*
|
|
22768
|
-
* @return {String} returns the previously persisted debug modes
|
|
22769
|
-
* @api private
|
|
22770
|
-
*/
|
|
22771
|
-
|
|
22772
|
-
function load() {
|
|
22773
|
-
return browser$1$1.env.DEBUG;
|
|
22608
|
+
if (env.COLORTERM === 'truecolor') {
|
|
22609
|
+
return 3;
|
|
22774
22610
|
}
|
|
22775
22611
|
|
|
22776
|
-
|
|
22777
|
-
|
|
22778
|
-
*
|
|
22779
|
-
* Create a new `inspectOpts` object in case `useColors` is set
|
|
22780
|
-
* differently for a particular `debug` instance.
|
|
22781
|
-
*/
|
|
22782
|
-
|
|
22783
|
-
function init(debug) {
|
|
22784
|
-
debug.inspectOpts = {};
|
|
22612
|
+
if ('TERM_PROGRAM' in env) {
|
|
22613
|
+
const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
|
22785
22614
|
|
|
22786
|
-
|
|
22787
|
-
|
|
22788
|
-
|
|
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
|
|
22789
22621
|
}
|
|
22790
22622
|
}
|
|
22791
22623
|
|
|
22792
|
-
|
|
22624
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
22625
|
+
return 2;
|
|
22626
|
+
}
|
|
22793
22627
|
|
|
22794
|
-
|
|
22628
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
22629
|
+
return 1;
|
|
22630
|
+
}
|
|
22795
22631
|
|
|
22796
|
-
|
|
22797
|
-
|
|
22798
|
-
|
|
22632
|
+
if ('COLORTERM' in env) {
|
|
22633
|
+
return 1;
|
|
22634
|
+
}
|
|
22799
22635
|
|
|
22800
|
-
|
|
22801
|
-
|
|
22802
|
-
|
|
22803
|
-
.split('\n')
|
|
22804
|
-
.map(str => str.trim())
|
|
22805
|
-
.join(' ');
|
|
22806
|
-
};
|
|
22636
|
+
if (env.TERM === 'dumb') {
|
|
22637
|
+
return min;
|
|
22638
|
+
}
|
|
22807
22639
|
|
|
22808
|
-
|
|
22809
|
-
|
|
22810
|
-
*/
|
|
22640
|
+
return min;
|
|
22641
|
+
}
|
|
22811
22642
|
|
|
22812
|
-
|
|
22813
|
-
|
|
22814
|
-
|
|
22815
|
-
|
|
22816
|
-
} (node, node.exports));
|
|
22817
|
-
return node.exports;
|
|
22818
|
-
}
|
|
22643
|
+
function getSupportLevel(stream) {
|
|
22644
|
+
const level = supportsColor(stream);
|
|
22645
|
+
return translateLevel(level);
|
|
22646
|
+
}
|
|
22819
22647
|
|
|
22820
|
-
|
|
22648
|
+
supportsColor_1 = {
|
|
22649
|
+
supportsColor: getSupportLevel,
|
|
22650
|
+
stdout: getSupportLevel(process.stdout),
|
|
22651
|
+
stderr: getSupportLevel(process.stderr)
|
|
22652
|
+
};
|
|
22653
|
+
return supportsColor_1;
|
|
22654
|
+
}
|
|
22821
22655
|
|
|
22822
|
-
var
|
|
22656
|
+
var hasRequiredNode;
|
|
22823
22657
|
|
|
22824
|
-
function
|
|
22825
|
-
if (
|
|
22826
|
-
|
|
22658
|
+
function requireNode () {
|
|
22659
|
+
if (hasRequiredNode) return node.exports;
|
|
22660
|
+
hasRequiredNode = 1;
|
|
22827
22661
|
(function (module, exports) {
|
|
22662
|
+
const tty = require$$0$1;
|
|
22663
|
+
const util = text_min;
|
|
22664
|
+
|
|
22828
22665
|
/**
|
|
22829
|
-
* This is the
|
|
22666
|
+
* This is the Node.js implementation of `debug()`.
|
|
22830
22667
|
*/
|
|
22831
22668
|
|
|
22669
|
+
exports.init = init;
|
|
22670
|
+
exports.log = log;
|
|
22832
22671
|
exports.formatArgs = formatArgs;
|
|
22833
22672
|
exports.save = save;
|
|
22834
22673
|
exports.load = load;
|
|
22835
22674
|
exports.useColors = useColors;
|
|
22836
|
-
exports.
|
|
22837
|
-
|
|
22838
|
-
|
|
22839
|
-
|
|
22840
|
-
return () => {
|
|
22841
|
-
if (!warned) {
|
|
22842
|
-
warned = true;
|
|
22843
|
-
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
22844
|
-
}
|
|
22845
|
-
};
|
|
22846
|
-
})();
|
|
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
|
+
);
|
|
22847
22679
|
|
|
22848
22680
|
/**
|
|
22849
22681
|
* Colors.
|
|
22850
22682
|
*/
|
|
22851
22683
|
|
|
22852
|
-
exports.colors = [
|
|
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
|
-
|
|
22926
|
-
|
|
22927
|
-
|
|
22928
|
-
|
|
22929
|
-
|
|
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
|
+
}
|
|
22930
22774
|
|
|
22931
22775
|
/**
|
|
22932
|
-
*
|
|
22933
|
-
* and the Firebug extension (any Firefox version) are known
|
|
22934
|
-
* to support "%c" CSS customizations.
|
|
22776
|
+
* Build up the default `inspectOpts` object from the environment variables.
|
|
22935
22777
|
*
|
|
22936
|
-
*
|
|
22778
|
+
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
|
22937
22779
|
*/
|
|
22938
22780
|
|
|
22939
|
-
|
|
22940
|
-
|
|
22941
|
-
|
|
22942
|
-
//
|
|
22943
|
-
|
|
22944
|
-
|
|
22945
|
-
|
|
22946
|
-
|
|
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
|
+
});
|
|
22947
22791
|
|
|
22948
|
-
//
|
|
22949
|
-
|
|
22950
|
-
|
|
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);
|
|
22951
22802
|
}
|
|
22952
22803
|
|
|
22953
|
-
|
|
22954
|
-
|
|
22955
|
-
|
|
22956
|
-
|
|
22957
|
-
|
|
22958
|
-
|
|
22959
|
-
|
|
22960
|
-
|
|
22961
|
-
|
|
22962
|
-
|
|
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);
|
|
22963
22816
|
}
|
|
22964
22817
|
|
|
22965
22818
|
/**
|
|
22966
|
-
*
|
|
22819
|
+
* Adds ANSI color escape codes if enabled.
|
|
22967
22820
|
*
|
|
22968
22821
|
* @api public
|
|
22969
22822
|
*/
|
|
22970
22823
|
|
|
22971
22824
|
function formatArgs(args) {
|
|
22972
|
-
|
|
22973
|
-
this.namespace +
|
|
22974
|
-
(this.useColors ? ' %c' : ' ') +
|
|
22975
|
-
args[0] +
|
|
22976
|
-
(this.useColors ? '%c ' : ' ') +
|
|
22977
|
-
'+' + module.exports.humanize(this.diff);
|
|
22978
|
-
|
|
22979
|
-
if (!this.useColors) {
|
|
22980
|
-
return;
|
|
22981
|
-
}
|
|
22825
|
+
const {namespace: name, useColors} = this;
|
|
22982
22826
|
|
|
22983
|
-
|
|
22984
|
-
|
|
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`;
|
|
22985
22831
|
|
|
22986
|
-
|
|
22987
|
-
|
|
22988
|
-
|
|
22989
|
-
|
|
22990
|
-
|
|
22991
|
-
|
|
22992
|
-
if (match === '%%') {
|
|
22993
|
-
return;
|
|
22994
|
-
}
|
|
22995
|
-
index++;
|
|
22996
|
-
if (match === '%c') {
|
|
22997
|
-
// We only are interested in the *last* %c
|
|
22998
|
-
// (the user may have provided their own)
|
|
22999
|
-
lastC = index;
|
|
23000
|
-
}
|
|
23001
|
-
});
|
|
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
|
+
}
|
|
23002
22838
|
|
|
23003
|
-
|
|
22839
|
+
function getDate() {
|
|
22840
|
+
if (exports.inspectOpts.hideDate) {
|
|
22841
|
+
return '';
|
|
22842
|
+
}
|
|
22843
|
+
return new Date().toISOString() + ' ';
|
|
23004
22844
|
}
|
|
23005
22845
|
|
|
23006
22846
|
/**
|
|
23007
|
-
* Invokes `
|
|
23008
|
-
* No-op when `console.debug` is not a "function".
|
|
23009
|
-
* If `console.debug` is not available, falls back
|
|
23010
|
-
* to `console.log`.
|
|
23011
|
-
*
|
|
23012
|
-
* @api public
|
|
22847
|
+
* Invokes `util.format()` with the specified arguments and writes to stderr.
|
|
23013
22848
|
*/
|
|
23014
|
-
|
|
22849
|
+
|
|
22850
|
+
function log(...args) {
|
|
22851
|
+
return process.stderr.write(util.format(...args) + '\n');
|
|
22852
|
+
}
|
|
23015
22853
|
|
|
23016
22854
|
/**
|
|
23017
22855
|
* Save `namespaces`.
|
|
@@ -23020,15 +22858,12 @@ function requireBrowser () {
|
|
|
23020
22858
|
* @api private
|
|
23021
22859
|
*/
|
|
23022
22860
|
function save(namespaces) {
|
|
23023
|
-
|
|
23024
|
-
|
|
23025
|
-
|
|
23026
|
-
|
|
23027
|
-
|
|
23028
|
-
|
|
23029
|
-
} catch (error) {
|
|
23030
|
-
// Swallow
|
|
23031
|
-
// 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;
|
|
23032
22867
|
}
|
|
23033
22868
|
}
|
|
23034
22869
|
|
|
@@ -23038,42 +22873,24 @@ function requireBrowser () {
|
|
|
23038
22873
|
* @return {String} returns the previously persisted debug modes
|
|
23039
22874
|
* @api private
|
|
23040
22875
|
*/
|
|
23041
|
-
function load() {
|
|
23042
|
-
let r;
|
|
23043
|
-
try {
|
|
23044
|
-
r = exports.storage.getItem('debug');
|
|
23045
|
-
} catch (error) {
|
|
23046
|
-
// Swallow
|
|
23047
|
-
// XXX (@Qix-) should we be logging these?
|
|
23048
|
-
}
|
|
23049
|
-
|
|
23050
|
-
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
23051
|
-
if (!r && typeof browser$1$1 !== 'undefined' && 'env' in browser$1$1) {
|
|
23052
|
-
r = browser$1$1.env.DEBUG;
|
|
23053
|
-
}
|
|
23054
22876
|
|
|
23055
|
-
|
|
22877
|
+
function load() {
|
|
22878
|
+
return process.env.DEBUG;
|
|
23056
22879
|
}
|
|
23057
22880
|
|
|
23058
22881
|
/**
|
|
23059
|
-
*
|
|
23060
|
-
*
|
|
23061
|
-
* This is necessary because safari throws
|
|
23062
|
-
* when a user disables cookies/localstorage
|
|
23063
|
-
* and you attempt to access it.
|
|
22882
|
+
* Init logic for `debug` instances.
|
|
23064
22883
|
*
|
|
23065
|
-
*
|
|
23066
|
-
*
|
|
22884
|
+
* Create a new `inspectOpts` object in case `useColors` is set
|
|
22885
|
+
* differently for a particular `debug` instance.
|
|
23067
22886
|
*/
|
|
23068
22887
|
|
|
23069
|
-
function
|
|
23070
|
-
|
|
23071
|
-
|
|
23072
|
-
|
|
23073
|
-
|
|
23074
|
-
|
|
23075
|
-
// Swallow
|
|
23076
|
-
// 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]];
|
|
23077
22894
|
}
|
|
23078
22895
|
}
|
|
23079
22896
|
|
|
@@ -23082,18 +22899,27 @@ function requireBrowser () {
|
|
|
23082
22899
|
const {formatters} = module.exports;
|
|
23083
22900
|
|
|
23084
22901
|
/**
|
|
23085
|
-
* Map %
|
|
22902
|
+
* Map %o to `util.inspect()`, all on a single line.
|
|
23086
22903
|
*/
|
|
23087
22904
|
|
|
23088
|
-
formatters.
|
|
23089
|
-
|
|
23090
|
-
|
|
23091
|
-
|
|
23092
|
-
|
|
23093
|
-
|
|
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);
|
|
23094
22920
|
};
|
|
23095
|
-
} (
|
|
23096
|
-
return
|
|
22921
|
+
} (node, node.exports));
|
|
22922
|
+
return node.exports;
|
|
23097
22923
|
}
|
|
23098
22924
|
|
|
23099
22925
|
var hasRequiredSrc;
|
|
@@ -23101,7 +22927,7 @@ var hasRequiredSrc;
|
|
|
23101
22927
|
function requireSrc () {
|
|
23102
22928
|
if (hasRequiredSrc) return src.exports;
|
|
23103
22929
|
hasRequiredSrc = 1;
|
|
23104
|
-
if (typeof
|
|
22930
|
+
if (typeof process === 'undefined' || process.type === 'renderer' || browser$1 === true || process.__nwjs) {
|
|
23105
22931
|
src.exports = requireBrowser();
|
|
23106
22932
|
} else {
|
|
23107
22933
|
src.exports = requireNode();
|
|
@@ -23127,7 +22953,7 @@ var debug_1 = function () {
|
|
|
23127
22953
|
|
|
23128
22954
|
var url = require$$0$3;
|
|
23129
22955
|
var URL$1 = url.URL;
|
|
23130
|
-
var http = require$$
|
|
22956
|
+
var http = require$$2;
|
|
23131
22957
|
var https = require$$2;
|
|
23132
22958
|
var Writable = require$$3.Writable;
|
|
23133
22959
|
var assert$1 = require$$4;
|
|
@@ -29212,7 +29038,7 @@ Zlib$1.prototype.write = function(flush, input, in_off, in_len, out, out_off, ou
|
|
|
29212
29038
|
this.write_in_progress = true;
|
|
29213
29039
|
|
|
29214
29040
|
var self = this;
|
|
29215
|
-
|
|
29041
|
+
nextTick(function() {
|
|
29216
29042
|
self.write_in_progress = false;
|
|
29217
29043
|
var res = self._write(flush, input, in_off, in_len, out, out_off, out_len);
|
|
29218
29044
|
self.callback(res[0], res[1]);
|
|
@@ -29283,7 +29109,7 @@ Zlib$1.prototype._write = function(flush, input, in_off, in_len, out, out_off, o
|
|
|
29283
29109
|
throw new Error('Unknown mode ' + this.mode);
|
|
29284
29110
|
}
|
|
29285
29111
|
|
|
29286
|
-
if (
|
|
29112
|
+
if (status !== Z_STREAM_END && status !== Z_OK) {
|
|
29287
29113
|
this._error(status);
|
|
29288
29114
|
}
|
|
29289
29115
|
|
|
@@ -29291,27 +29117,6 @@ Zlib$1.prototype._write = function(flush, input, in_off, in_len, out, out_off, o
|
|
|
29291
29117
|
return [strm.avail_in, strm.avail_out];
|
|
29292
29118
|
};
|
|
29293
29119
|
|
|
29294
|
-
Zlib$1.prototype._checkError = function (status, strm, flush) {
|
|
29295
|
-
// Acceptable error states depend on the type of zlib stream.
|
|
29296
|
-
switch (status) {
|
|
29297
|
-
case Z_OK:
|
|
29298
|
-
case Z_BUF_ERROR:
|
|
29299
|
-
if (strm.avail_out !== 0 && flush === Z_FINISH) {
|
|
29300
|
-
return false
|
|
29301
|
-
}
|
|
29302
|
-
break
|
|
29303
|
-
case Z_STREAM_END:
|
|
29304
|
-
// normal statuses, not fatal
|
|
29305
|
-
break
|
|
29306
|
-
case Z_NEED_DICT:
|
|
29307
|
-
return false
|
|
29308
|
-
default:
|
|
29309
|
-
return false
|
|
29310
|
-
}
|
|
29311
|
-
|
|
29312
|
-
return true
|
|
29313
|
-
};
|
|
29314
|
-
|
|
29315
29120
|
Zlib$1.prototype.close = function() {
|
|
29316
29121
|
if (this.write_in_progress) {
|
|
29317
29122
|
this.pending_close = true;
|
|
@@ -29593,7 +29398,7 @@ function zlibBuffer(engine, buffer, callback) {
|
|
|
29593
29398
|
function zlibBufferSync(engine, buffer) {
|
|
29594
29399
|
if (typeof buffer === 'string')
|
|
29595
29400
|
buffer = new Buffer(buffer);
|
|
29596
|
-
if (!
|
|
29401
|
+
if (!isBuffer$1(buffer))
|
|
29597
29402
|
throw new TypeError('Not a string or buffer');
|
|
29598
29403
|
|
|
29599
29404
|
var flushFlag = binding.Z_FINISH;
|
|
@@ -29709,7 +29514,7 @@ function Zlib(opts, mode) {
|
|
|
29709
29514
|
}
|
|
29710
29515
|
|
|
29711
29516
|
if (opts.dictionary) {
|
|
29712
|
-
if (!
|
|
29517
|
+
if (!isBuffer$1(opts.dictionary)) {
|
|
29713
29518
|
throw new Error('Invalid dictionary: it should be a Buffer instance');
|
|
29714
29519
|
}
|
|
29715
29520
|
}
|
|
@@ -29726,7 +29531,7 @@ function Zlib(opts, mode) {
|
|
|
29726
29531
|
|
|
29727
29532
|
var error = new Error(message);
|
|
29728
29533
|
error.errno = errno;
|
|
29729
|
-
error.code = codes[errno];
|
|
29534
|
+
error.code = binding.codes[errno];
|
|
29730
29535
|
self.emit('error', error);
|
|
29731
29536
|
};
|
|
29732
29537
|
|
|
@@ -29777,7 +29582,7 @@ Zlib.prototype.params = function(level, strategy, callback) {
|
|
|
29777
29582
|
}
|
|
29778
29583
|
});
|
|
29779
29584
|
} else {
|
|
29780
|
-
|
|
29585
|
+
nextTick(callback);
|
|
29781
29586
|
}
|
|
29782
29587
|
};
|
|
29783
29588
|
|
|
@@ -29801,7 +29606,7 @@ Zlib.prototype.flush = function(kind, callback) {
|
|
|
29801
29606
|
|
|
29802
29607
|
if (ws.ended) {
|
|
29803
29608
|
if (callback)
|
|
29804
|
-
|
|
29609
|
+
nextTick(callback);
|
|
29805
29610
|
} else if (ws.ending) {
|
|
29806
29611
|
if (callback)
|
|
29807
29612
|
this.once('end', callback);
|
|
@@ -29818,7 +29623,7 @@ Zlib.prototype.flush = function(kind, callback) {
|
|
|
29818
29623
|
|
|
29819
29624
|
Zlib.prototype.close = function(callback) {
|
|
29820
29625
|
if (callback)
|
|
29821
|
-
|
|
29626
|
+
nextTick(callback);
|
|
29822
29627
|
|
|
29823
29628
|
if (this._closed)
|
|
29824
29629
|
return;
|
|
@@ -29828,7 +29633,7 @@ Zlib.prototype.close = function(callback) {
|
|
|
29828
29633
|
this._binding.close();
|
|
29829
29634
|
|
|
29830
29635
|
var self = this;
|
|
29831
|
-
|
|
29636
|
+
nextTick(function() {
|
|
29832
29637
|
self.emit('close');
|
|
29833
29638
|
});
|
|
29834
29639
|
};
|
|
@@ -29839,7 +29644,7 @@ Zlib.prototype._transform = function(chunk, encoding, cb) {
|
|
|
29839
29644
|
var ending = ws.ending || ws.ended;
|
|
29840
29645
|
var last = ending && (!chunk || ws.length === chunk.length);
|
|
29841
29646
|
|
|
29842
|
-
if (!chunk === null && !
|
|
29647
|
+
if (!chunk === null && !isBuffer$1(chunk))
|
|
29843
29648
|
return cb(new Error('invalid input'));
|
|
29844
29649
|
|
|
29845
29650
|
// If it's the last chunk, or a final flush, we use the Z_FINISH flush flag.
|
|
@@ -30201,7 +30006,7 @@ class AxiosTransformStream extends Stream$3.Transform{
|
|
|
30201
30006
|
|
|
30202
30007
|
bytesNotified = bytesTransferred;
|
|
30203
30008
|
|
|
30204
|
-
|
|
30009
|
+
nextTick(() => {
|
|
30205
30010
|
self.emit('progress', {
|
|
30206
30011
|
'loaded': bytesTransferred,
|
|
30207
30012
|
'total': totalBytes,
|
|
@@ -30255,11 +30060,11 @@ class AxiosTransformStream extends Stream$3.Transform{
|
|
|
30255
30060
|
}
|
|
30256
30061
|
|
|
30257
30062
|
if (self.push(_chunk)) {
|
|
30258
|
-
|
|
30063
|
+
nextTick(_callback);
|
|
30259
30064
|
} else {
|
|
30260
30065
|
internals.onReadCallback = () => {
|
|
30261
30066
|
internals.onReadCallback = null;
|
|
30262
|
-
|
|
30067
|
+
nextTick(_callback);
|
|
30263
30068
|
};
|
|
30264
30069
|
}
|
|
30265
30070
|
}
|
|
@@ -30303,7 +30108,7 @@ class AxiosTransformStream extends Stream$3.Transform{
|
|
|
30303
30108
|
}
|
|
30304
30109
|
|
|
30305
30110
|
pushChunk(_chunk, chunkRemainder ? () => {
|
|
30306
|
-
|
|
30111
|
+
nextTick(_callback, null, chunkRemainder);
|
|
30307
30112
|
} : _callback);
|
|
30308
30113
|
};
|
|
30309
30114
|
|
|
@@ -30581,7 +30386,7 @@ function setProxy(options, configProxy, location) {
|
|
|
30581
30386
|
};
|
|
30582
30387
|
}
|
|
30583
30388
|
|
|
30584
|
-
const isHttpAdapterSupported = typeof
|
|
30389
|
+
const isHttpAdapterSupported = typeof process !== 'undefined' && utils$1.kindOf(process) === 'process';
|
|
30585
30390
|
|
|
30586
30391
|
// temporary hotfix
|
|
30587
30392
|
|
|
@@ -30773,7 +30578,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30773
30578
|
headers.setContentLength(data.size || 0);
|
|
30774
30579
|
data = Stream$3.Readable.from(readBlob$1(data));
|
|
30775
30580
|
} else if (data && !utils$1.isStream(data)) {
|
|
30776
|
-
if (
|
|
30581
|
+
if (isBuffer$1(data)) ; else if (utils$1.isArrayBuffer(data)) {
|
|
30777
30582
|
data = Buffer.from(new Uint8Array(data));
|
|
30778
30583
|
} else if (utils$1.isString(data)) {
|
|
30779
30584
|
data = Buffer.from(data, 'utf-8');
|
|
@@ -30889,7 +30694,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
30889
30694
|
if (config.transport) {
|
|
30890
30695
|
transport = config.transport;
|
|
30891
30696
|
} else if (config.maxRedirects === 0) {
|
|
30892
|
-
transport = isHttpsRequest ?
|
|
30697
|
+
transport = isHttpsRequest ? http$2 : http$2;
|
|
30893
30698
|
} else {
|
|
30894
30699
|
if (config.maxRedirects) {
|
|
30895
30700
|
options.maxRedirects = config.maxRedirects;
|