@digipair/skill-git 0.22.1 → 0.22.2
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/index.cjs.js +999 -192
- package/index.esm.js +996 -188
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -3,30 +3,28 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var require$$0$1 = require('fs');
|
|
6
|
-
var require$$
|
|
7
|
-
var require$$1
|
|
8
|
-
var require$$0 = require('os');
|
|
6
|
+
var require$$0 = require('tty');
|
|
7
|
+
var require$$1 = require('util');
|
|
9
8
|
var child_process = require('child_process');
|
|
10
9
|
var node_events = require('node:events');
|
|
11
10
|
|
|
12
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
12
|
|
|
14
13
|
var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$1);
|
|
15
|
-
var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1);
|
|
16
|
-
var require$$1__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$1$1);
|
|
17
14
|
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
|
|
15
|
+
var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1);
|
|
18
16
|
|
|
19
17
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
20
18
|
|
|
21
19
|
var dist$1 = {};
|
|
22
20
|
|
|
23
|
-
var src$
|
|
21
|
+
var src$2 = {};
|
|
24
22
|
|
|
25
|
-
var src = {
|
|
23
|
+
var src$1 = {
|
|
26
24
|
exports: {}
|
|
27
25
|
};
|
|
28
26
|
|
|
29
|
-
var browser = {
|
|
27
|
+
var browser$2 = {
|
|
30
28
|
exports: {}
|
|
31
29
|
};
|
|
32
30
|
|
|
@@ -34,16 +32,16 @@ var browser = {
|
|
|
34
32
|
* Helpers.
|
|
35
33
|
*/
|
|
36
34
|
|
|
37
|
-
function _type_of$
|
|
35
|
+
function _type_of$2(obj) {
|
|
38
36
|
"@swc/helpers - typeof";
|
|
39
37
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
40
38
|
}
|
|
41
|
-
var s = 1000;
|
|
42
|
-
var m = s * 60;
|
|
43
|
-
var h = m * 60;
|
|
44
|
-
var d = h * 24;
|
|
45
|
-
var w = d * 7;
|
|
46
|
-
var y = d * 365.25;
|
|
39
|
+
var s$1 = 1000;
|
|
40
|
+
var m$1 = s$1 * 60;
|
|
41
|
+
var h$1 = m$1 * 60;
|
|
42
|
+
var d$1 = h$1 * 24;
|
|
43
|
+
var w$1 = d$1 * 7;
|
|
44
|
+
var y$1 = d$1 * 365.25;
|
|
47
45
|
/**
|
|
48
46
|
* Parse or format the given `val`.
|
|
49
47
|
*
|
|
@@ -56,13 +54,13 @@ var y = d * 365.25;
|
|
|
56
54
|
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
57
55
|
* @return {String|Number}
|
|
58
56
|
* @api public
|
|
59
|
-
*/ var ms = function(val, options) {
|
|
57
|
+
*/ var ms$1 = function(val, options) {
|
|
60
58
|
options = options || {};
|
|
61
|
-
var type = typeof val === "undefined" ? "undefined" : _type_of$
|
|
59
|
+
var type = typeof val === "undefined" ? "undefined" : _type_of$2(val);
|
|
62
60
|
if (type === "string" && val.length > 0) {
|
|
63
|
-
return parse(val);
|
|
61
|
+
return parse$1(val);
|
|
64
62
|
} else if (type === "number" && isFinite(val)) {
|
|
65
|
-
return options.long ? fmtLong(val) : fmtShort(val);
|
|
63
|
+
return options.long ? fmtLong$1(val) : fmtShort$1(val);
|
|
66
64
|
}
|
|
67
65
|
throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
|
|
68
66
|
};
|
|
@@ -72,7 +70,7 @@ var y = d * 365.25;
|
|
|
72
70
|
* @param {String} str
|
|
73
71
|
* @return {Number}
|
|
74
72
|
* @api private
|
|
75
|
-
*/ function parse(str) {
|
|
73
|
+
*/ function parse$1(str) {
|
|
76
74
|
str = String(str);
|
|
77
75
|
if (str.length > 100) {
|
|
78
76
|
return;
|
|
@@ -89,33 +87,33 @@ var y = d * 365.25;
|
|
|
89
87
|
case "yrs":
|
|
90
88
|
case "yr":
|
|
91
89
|
case "y":
|
|
92
|
-
return n * y;
|
|
90
|
+
return n * y$1;
|
|
93
91
|
case "weeks":
|
|
94
92
|
case "week":
|
|
95
93
|
case "w":
|
|
96
|
-
return n * w;
|
|
94
|
+
return n * w$1;
|
|
97
95
|
case "days":
|
|
98
96
|
case "day":
|
|
99
97
|
case "d":
|
|
100
|
-
return n * d;
|
|
98
|
+
return n * d$1;
|
|
101
99
|
case "hours":
|
|
102
100
|
case "hour":
|
|
103
101
|
case "hrs":
|
|
104
102
|
case "hr":
|
|
105
103
|
case "h":
|
|
106
|
-
return n * h;
|
|
104
|
+
return n * h$1;
|
|
107
105
|
case "minutes":
|
|
108
106
|
case "minute":
|
|
109
107
|
case "mins":
|
|
110
108
|
case "min":
|
|
111
109
|
case "m":
|
|
112
|
-
return n * m;
|
|
110
|
+
return n * m$1;
|
|
113
111
|
case "seconds":
|
|
114
112
|
case "second":
|
|
115
113
|
case "secs":
|
|
116
114
|
case "sec":
|
|
117
115
|
case "s":
|
|
118
|
-
return n * s;
|
|
116
|
+
return n * s$1;
|
|
119
117
|
case "milliseconds":
|
|
120
118
|
case "millisecond":
|
|
121
119
|
case "msecs":
|
|
@@ -132,19 +130,19 @@ var y = d * 365.25;
|
|
|
132
130
|
* @param {Number} ms
|
|
133
131
|
* @return {String}
|
|
134
132
|
* @api private
|
|
135
|
-
*/ function fmtShort(ms) {
|
|
133
|
+
*/ function fmtShort$1(ms) {
|
|
136
134
|
var msAbs = Math.abs(ms);
|
|
137
|
-
if (msAbs >= d) {
|
|
138
|
-
return Math.round(ms / d) + "d";
|
|
135
|
+
if (msAbs >= d$1) {
|
|
136
|
+
return Math.round(ms / d$1) + "d";
|
|
139
137
|
}
|
|
140
|
-
if (msAbs >= h) {
|
|
141
|
-
return Math.round(ms / h) + "h";
|
|
138
|
+
if (msAbs >= h$1) {
|
|
139
|
+
return Math.round(ms / h$1) + "h";
|
|
142
140
|
}
|
|
143
|
-
if (msAbs >= m) {
|
|
144
|
-
return Math.round(ms / m) + "m";
|
|
141
|
+
if (msAbs >= m$1) {
|
|
142
|
+
return Math.round(ms / m$1) + "m";
|
|
145
143
|
}
|
|
146
|
-
if (msAbs >= s) {
|
|
147
|
-
return Math.round(ms / s) + "s";
|
|
144
|
+
if (msAbs >= s$1) {
|
|
145
|
+
return Math.round(ms / s$1) + "s";
|
|
148
146
|
}
|
|
149
147
|
return ms + "ms";
|
|
150
148
|
}
|
|
@@ -154,25 +152,25 @@ var y = d * 365.25;
|
|
|
154
152
|
* @param {Number} ms
|
|
155
153
|
* @return {String}
|
|
156
154
|
* @api private
|
|
157
|
-
*/ function fmtLong(ms) {
|
|
155
|
+
*/ function fmtLong$1(ms) {
|
|
158
156
|
var msAbs = Math.abs(ms);
|
|
159
|
-
if (msAbs >= d) {
|
|
160
|
-
return plural(ms, msAbs, d, "day");
|
|
157
|
+
if (msAbs >= d$1) {
|
|
158
|
+
return plural$1(ms, msAbs, d$1, "day");
|
|
161
159
|
}
|
|
162
|
-
if (msAbs >= h) {
|
|
163
|
-
return plural(ms, msAbs, h, "hour");
|
|
160
|
+
if (msAbs >= h$1) {
|
|
161
|
+
return plural$1(ms, msAbs, h$1, "hour");
|
|
164
162
|
}
|
|
165
|
-
if (msAbs >= m) {
|
|
166
|
-
return plural(ms, msAbs, m, "minute");
|
|
163
|
+
if (msAbs >= m$1) {
|
|
164
|
+
return plural$1(ms, msAbs, m$1, "minute");
|
|
167
165
|
}
|
|
168
|
-
if (msAbs >= s) {
|
|
169
|
-
return plural(ms, msAbs, s, "second");
|
|
166
|
+
if (msAbs >= s$1) {
|
|
167
|
+
return plural$1(ms, msAbs, s$1, "second");
|
|
170
168
|
}
|
|
171
169
|
return ms + " ms";
|
|
172
170
|
}
|
|
173
171
|
/**
|
|
174
172
|
* Pluralization helper.
|
|
175
|
-
*/ function plural(ms, msAbs, n, name) {
|
|
173
|
+
*/ function plural$1(ms, msAbs, n, name) {
|
|
176
174
|
var isPlural = msAbs >= n * 1.5;
|
|
177
175
|
return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
|
|
178
176
|
}
|
|
@@ -182,46 +180,46 @@ var y = d * 365.25;
|
|
|
182
180
|
* implementations of `debug()`.
|
|
183
181
|
*/
|
|
184
182
|
|
|
185
|
-
function _array_like_to_array$
|
|
183
|
+
function _array_like_to_array$2(arr, len) {
|
|
186
184
|
if (len == null || len > arr.length) len = arr.length;
|
|
187
185
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
188
186
|
return arr2;
|
|
189
187
|
}
|
|
190
|
-
function _array_without_holes$
|
|
191
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
188
|
+
function _array_without_holes$2(arr) {
|
|
189
|
+
if (Array.isArray(arr)) return _array_like_to_array$2(arr);
|
|
192
190
|
}
|
|
193
|
-
function _instanceof$
|
|
191
|
+
function _instanceof$2(left, right) {
|
|
194
192
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
195
193
|
return !!right[Symbol.hasInstance](left);
|
|
196
194
|
} else {
|
|
197
195
|
return left instanceof right;
|
|
198
196
|
}
|
|
199
197
|
}
|
|
200
|
-
function _iterable_to_array$
|
|
198
|
+
function _iterable_to_array$2(iter) {
|
|
201
199
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
202
200
|
}
|
|
203
|
-
function _non_iterable_spread$
|
|
201
|
+
function _non_iterable_spread$2() {
|
|
204
202
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
205
203
|
}
|
|
206
|
-
function _to_consumable_array$
|
|
207
|
-
return _array_without_holes$
|
|
204
|
+
function _to_consumable_array$2(arr) {
|
|
205
|
+
return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$2();
|
|
208
206
|
}
|
|
209
|
-
function _unsupported_iterable_to_array$
|
|
207
|
+
function _unsupported_iterable_to_array$2(o, minLen) {
|
|
210
208
|
if (!o) return;
|
|
211
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
209
|
+
if (typeof o === "string") return _array_like_to_array$2(o, minLen);
|
|
212
210
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
213
211
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
214
212
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
215
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
213
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
|
|
216
214
|
}
|
|
217
|
-
function setup(env) {
|
|
215
|
+
function setup$1(env) {
|
|
218
216
|
createDebug.debug = createDebug;
|
|
219
217
|
createDebug.default = createDebug;
|
|
220
218
|
createDebug.coerce = coerce;
|
|
221
219
|
createDebug.disable = disable;
|
|
222
220
|
createDebug.enable = enable;
|
|
223
221
|
createDebug.enabled = enabled;
|
|
224
|
-
createDebug.humanize = ms;
|
|
222
|
+
createDebug.humanize = ms$1;
|
|
225
223
|
createDebug.destroy = destroy;
|
|
226
224
|
Object.keys(env).forEach(function(key) {
|
|
227
225
|
createDebug[key] = env[key];
|
|
@@ -369,7 +367,7 @@ function setup(env) {
|
|
|
369
367
|
* @return {String} namespaces
|
|
370
368
|
* @api public
|
|
371
369
|
*/ function disable() {
|
|
372
|
-
var namespaces = _to_consumable_array$
|
|
370
|
+
var namespaces = _to_consumable_array$2(createDebug.names.map(toNamespace)).concat(_to_consumable_array$2(createDebug.skips.map(toNamespace).map(function(namespace) {
|
|
373
371
|
return "-" + namespace;
|
|
374
372
|
}))).join(",");
|
|
375
373
|
createDebug.enable("");
|
|
@@ -415,7 +413,7 @@ function setup(env) {
|
|
|
415
413
|
* @return {Mixed}
|
|
416
414
|
* @api private
|
|
417
415
|
*/ function coerce(val) {
|
|
418
|
-
if (_instanceof$
|
|
416
|
+
if (_instanceof$2(val, Error)) {
|
|
419
417
|
return val.stack || val.message;
|
|
420
418
|
}
|
|
421
419
|
return val;
|
|
@@ -429,7 +427,7 @@ function setup(env) {
|
|
|
429
427
|
createDebug.enable(createDebug.load());
|
|
430
428
|
return createDebug;
|
|
431
429
|
}
|
|
432
|
-
var common = setup;
|
|
430
|
+
var common$1 = setup$1;
|
|
433
431
|
|
|
434
432
|
/* eslint-env browser */
|
|
435
433
|
|
|
@@ -648,7 +646,7 @@ function useColors() {
|
|
|
648
646
|
// XXX (@Qix-) should we be logging these?
|
|
649
647
|
}
|
|
650
648
|
}
|
|
651
|
-
module.exports = common(exports);
|
|
649
|
+
module.exports = common$1(exports);
|
|
652
650
|
var formatters = module.exports.formatters;
|
|
653
651
|
/**
|
|
654
652
|
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
|
@@ -659,125 +657,29 @@ var formatters = module.exports.formatters;
|
|
|
659
657
|
return "[UnexpectedJSONParseError]: " + error.message;
|
|
660
658
|
}
|
|
661
659
|
};
|
|
662
|
-
}(browser, browser.exports));
|
|
660
|
+
}(browser$2, browser$2.exports));
|
|
663
661
|
|
|
664
|
-
var node = {
|
|
662
|
+
var node$1 = {
|
|
665
663
|
exports: {}
|
|
666
664
|
};
|
|
667
665
|
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
var
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
674
|
-
};
|
|
675
|
-
|
|
676
|
-
var os = require$$0__default["default"];
|
|
677
|
-
var tty = require$$1__default["default"];
|
|
678
|
-
var hasFlag = hasFlag$1;
|
|
679
|
-
var env = process.env;
|
|
680
|
-
var forceColor;
|
|
681
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
682
|
-
forceColor = 0;
|
|
683
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
684
|
-
forceColor = 1;
|
|
685
|
-
}
|
|
686
|
-
if ("FORCE_COLOR" in env) {
|
|
687
|
-
if (env.FORCE_COLOR === "true") {
|
|
688
|
-
forceColor = 1;
|
|
689
|
-
} else if (env.FORCE_COLOR === "false") {
|
|
690
|
-
forceColor = 0;
|
|
691
|
-
} else {
|
|
692
|
-
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
function translateLevel(level) {
|
|
696
|
-
if (level === 0) {
|
|
697
|
-
return false;
|
|
698
|
-
}
|
|
699
|
-
return {
|
|
700
|
-
level: level,
|
|
701
|
-
hasBasic: true,
|
|
702
|
-
has256: level >= 2,
|
|
703
|
-
has16m: level >= 3
|
|
704
|
-
};
|
|
705
|
-
}
|
|
706
|
-
function supportsColor(haveStream, streamIsTTY) {
|
|
707
|
-
if (forceColor === 0) {
|
|
708
|
-
return 0;
|
|
709
|
-
}
|
|
710
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
711
|
-
return 3;
|
|
712
|
-
}
|
|
713
|
-
if (hasFlag("color=256")) {
|
|
714
|
-
return 2;
|
|
715
|
-
}
|
|
716
|
-
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
717
|
-
return 0;
|
|
718
|
-
}
|
|
719
|
-
var min = forceColor || 0;
|
|
720
|
-
if (env.TERM === "dumb") {
|
|
721
|
-
return min;
|
|
722
|
-
}
|
|
723
|
-
if (process.platform === "win32") {
|
|
724
|
-
// Windows 10 build 10586 is the first Windows release that supports 256 colors.
|
|
725
|
-
// Windows 10 build 14931 is the first release that supports 16m/TrueColor.
|
|
726
|
-
var osRelease = os.release().split(".");
|
|
727
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
728
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
729
|
-
}
|
|
730
|
-
return 1;
|
|
731
|
-
}
|
|
732
|
-
if ("CI" in env) {
|
|
733
|
-
if ([
|
|
734
|
-
"TRAVIS",
|
|
735
|
-
"CIRCLECI",
|
|
736
|
-
"APPVEYOR",
|
|
737
|
-
"GITLAB_CI",
|
|
738
|
-
"GITHUB_ACTIONS",
|
|
739
|
-
"BUILDKITE"
|
|
740
|
-
].some(function(sign) {
|
|
741
|
-
return sign in env;
|
|
742
|
-
}) || env.CI_NAME === "codeship") {
|
|
743
|
-
return 1;
|
|
744
|
-
}
|
|
745
|
-
return min;
|
|
746
|
-
}
|
|
747
|
-
if ("TEAMCITY_VERSION" in env) {
|
|
748
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
749
|
-
}
|
|
750
|
-
if (env.COLORTERM === "truecolor") {
|
|
751
|
-
return 3;
|
|
752
|
-
}
|
|
753
|
-
if ("TERM_PROGRAM" in env) {
|
|
754
|
-
var version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
755
|
-
switch(env.TERM_PROGRAM){
|
|
756
|
-
case "iTerm.app":
|
|
757
|
-
return version >= 3 ? 3 : 2;
|
|
758
|
-
case "Apple_Terminal":
|
|
759
|
-
return 2;
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
763
|
-
return 2;
|
|
764
|
-
}
|
|
765
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
766
|
-
return 1;
|
|
767
|
-
}
|
|
768
|
-
if ("COLORTERM" in env) {
|
|
769
|
-
return 1;
|
|
666
|
+
/* eslint-env browser */
|
|
667
|
+
function getChromeVersion() {
|
|
668
|
+
var matches = RegExp("(Chrome|Chromium)\\/(?<chromeVersion>\\d+)\\.").exec(navigator.userAgent);
|
|
669
|
+
if (!matches) {
|
|
670
|
+
return;
|
|
770
671
|
}
|
|
771
|
-
return
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
672
|
+
return Number.parseInt(matches.groups.chromeVersion, 10);
|
|
673
|
+
}
|
|
674
|
+
var colorSupport = getChromeVersion() >= 69 ? {
|
|
675
|
+
level: 1,
|
|
676
|
+
hasBasic: true,
|
|
677
|
+
has256: false,
|
|
678
|
+
has16m: false
|
|
679
|
+
} : false;
|
|
680
|
+
var browser$1 = {
|
|
681
|
+
stdout: colorSupport,
|
|
682
|
+
stderr: colorSupport
|
|
781
683
|
};
|
|
782
684
|
|
|
783
685
|
/**
|
|
@@ -810,8 +712,8 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
810
712
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
811
713
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
812
714
|
}
|
|
813
|
-
var tty = require$$
|
|
814
|
-
var util = require$$1__default
|
|
715
|
+
var tty = require$$0__default["default"];
|
|
716
|
+
var util = require$$1__default["default"];
|
|
815
717
|
/**
|
|
816
718
|
* This is the Node.js implementation of `debug()`.
|
|
817
719
|
*/ exports.init = init;
|
|
@@ -834,7 +736,7 @@ exports.destroy = util.deprecate(function() {}, "Instance method `debug.destroy(
|
|
|
834
736
|
try {
|
|
835
737
|
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
|
|
836
738
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
837
|
-
var supportsColor =
|
|
739
|
+
var supportsColor = browser$1;
|
|
838
740
|
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
839
741
|
exports.colors = [
|
|
840
742
|
20,
|
|
@@ -971,15 +873,13 @@ function getDate() {
|
|
|
971
873
|
return new Date().toISOString() + " ";
|
|
972
874
|
}
|
|
973
875
|
/**
|
|
974
|
-
* Invokes `util.
|
|
876
|
+
* Invokes `util.format()` with the specified arguments and writes to stderr.
|
|
975
877
|
*/ function log() {
|
|
976
878
|
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
977
879
|
args[_key] = arguments[_key];
|
|
978
880
|
}
|
|
979
881
|
var _util;
|
|
980
|
-
return process.stderr.write((_util = util).
|
|
981
|
-
exports.inspectOpts
|
|
982
|
-
].concat(_to_consumable_array(args))) + "\n");
|
|
882
|
+
return process.stderr.write((_util = util).format.apply(_util, _to_consumable_array(args)) + "\n");
|
|
983
883
|
}
|
|
984
884
|
/**
|
|
985
885
|
* Save `namespaces`.
|
|
@@ -1015,7 +915,7 @@ function getDate() {
|
|
|
1015
915
|
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
1016
916
|
}
|
|
1017
917
|
}
|
|
1018
|
-
module.exports = common(exports);
|
|
918
|
+
module.exports = common$1(exports);
|
|
1019
919
|
var formatters = module.exports.formatters;
|
|
1020
920
|
/**
|
|
1021
921
|
* Map %o to `util.inspect()`, all on a single line.
|
|
@@ -1031,7 +931,7 @@ var formatters = module.exports.formatters;
|
|
|
1031
931
|
this.inspectOpts.colors = this.useColors;
|
|
1032
932
|
return util.inspect(v, this.inspectOpts);
|
|
1033
933
|
};
|
|
1034
|
-
}(node, node.exports));
|
|
934
|
+
}(node$1, node$1.exports));
|
|
1035
935
|
|
|
1036
936
|
/**
|
|
1037
937
|
* Detect Electron renderer / nwjs process, which is node, but we should
|
|
@@ -1039,13 +939,11 @@ var formatters = module.exports.formatters;
|
|
|
1039
939
|
*/
|
|
1040
940
|
|
|
1041
941
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
1042
|
-
src.exports = browser.exports;
|
|
942
|
+
src$1.exports = browser$2.exports;
|
|
1043
943
|
} else {
|
|
1044
|
-
src.exports = node.exports;
|
|
944
|
+
src$1.exports = node$1.exports;
|
|
1045
945
|
}
|
|
1046
946
|
|
|
1047
|
-
var debug = src.exports;
|
|
1048
|
-
|
|
1049
947
|
(function (exports) {
|
|
1050
948
|
var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
|
|
1051
949
|
return mod && mod.__esModule ? mod : {
|
|
@@ -1056,7 +954,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1056
954
|
value: true
|
|
1057
955
|
});
|
|
1058
956
|
var fs_1 = require$$0__default$1["default"];
|
|
1059
|
-
var debug_1 = __importDefault(src.exports);
|
|
957
|
+
var debug_1 = __importDefault(src$1.exports);
|
|
1060
958
|
var log = debug_1.default("@kwsites/file-exists");
|
|
1061
959
|
function check(path, isFile, isDirectory) {
|
|
1062
960
|
log("checking %s", path);
|
|
@@ -1100,7 +998,7 @@ exports.exists = exists;
|
|
|
1100
998
|
/**
|
|
1101
999
|
* Constant representing either a file or a folder
|
|
1102
1000
|
*/ exports.READABLE = exports.FILE + exports.FOLDER;
|
|
1103
|
-
}(src$
|
|
1001
|
+
}(src$2));
|
|
1104
1002
|
|
|
1105
1003
|
(function (exports) {
|
|
1106
1004
|
function __export(m) {
|
|
@@ -1109,9 +1007,918 @@ function __export(m) {
|
|
|
1109
1007
|
Object.defineProperty(exports, "__esModule", {
|
|
1110
1008
|
value: true
|
|
1111
1009
|
});
|
|
1112
|
-
__export(src$
|
|
1010
|
+
__export(src$2);
|
|
1113
1011
|
}(dist$1));
|
|
1114
1012
|
|
|
1013
|
+
var src = {
|
|
1014
|
+
exports: {}
|
|
1015
|
+
};
|
|
1016
|
+
|
|
1017
|
+
var browser = {
|
|
1018
|
+
exports: {}
|
|
1019
|
+
};
|
|
1020
|
+
|
|
1021
|
+
/**
|
|
1022
|
+
* Helpers.
|
|
1023
|
+
*/
|
|
1024
|
+
|
|
1025
|
+
function _type_of$1(obj) {
|
|
1026
|
+
"@swc/helpers - typeof";
|
|
1027
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
1028
|
+
}
|
|
1029
|
+
var s = 1000;
|
|
1030
|
+
var m = s * 60;
|
|
1031
|
+
var h = m * 60;
|
|
1032
|
+
var d = h * 24;
|
|
1033
|
+
var w = d * 7;
|
|
1034
|
+
var y = d * 365.25;
|
|
1035
|
+
/**
|
|
1036
|
+
* Parse or format the given `val`.
|
|
1037
|
+
*
|
|
1038
|
+
* Options:
|
|
1039
|
+
*
|
|
1040
|
+
* - `long` verbose formatting [false]
|
|
1041
|
+
*
|
|
1042
|
+
* @param {String|Number} val
|
|
1043
|
+
* @param {Object} [options]
|
|
1044
|
+
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
1045
|
+
* @return {String|Number}
|
|
1046
|
+
* @api public
|
|
1047
|
+
*/ var ms = function(val, options) {
|
|
1048
|
+
options = options || {};
|
|
1049
|
+
var type = typeof val === "undefined" ? "undefined" : _type_of$1(val);
|
|
1050
|
+
if (type === "string" && val.length > 0) {
|
|
1051
|
+
return parse(val);
|
|
1052
|
+
} else if (type === "number" && isFinite(val)) {
|
|
1053
|
+
return options.long ? fmtLong(val) : fmtShort(val);
|
|
1054
|
+
}
|
|
1055
|
+
throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
|
|
1056
|
+
};
|
|
1057
|
+
/**
|
|
1058
|
+
* Parse the given `str` and return milliseconds.
|
|
1059
|
+
*
|
|
1060
|
+
* @param {String} str
|
|
1061
|
+
* @return {Number}
|
|
1062
|
+
* @api private
|
|
1063
|
+
*/ function parse(str) {
|
|
1064
|
+
str = String(str);
|
|
1065
|
+
if (str.length > 100) {
|
|
1066
|
+
return;
|
|
1067
|
+
}
|
|
1068
|
+
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(str);
|
|
1069
|
+
if (!match) {
|
|
1070
|
+
return;
|
|
1071
|
+
}
|
|
1072
|
+
var n = parseFloat(match[1]);
|
|
1073
|
+
var type = (match[2] || "ms").toLowerCase();
|
|
1074
|
+
switch(type){
|
|
1075
|
+
case "years":
|
|
1076
|
+
case "year":
|
|
1077
|
+
case "yrs":
|
|
1078
|
+
case "yr":
|
|
1079
|
+
case "y":
|
|
1080
|
+
return n * y;
|
|
1081
|
+
case "weeks":
|
|
1082
|
+
case "week":
|
|
1083
|
+
case "w":
|
|
1084
|
+
return n * w;
|
|
1085
|
+
case "days":
|
|
1086
|
+
case "day":
|
|
1087
|
+
case "d":
|
|
1088
|
+
return n * d;
|
|
1089
|
+
case "hours":
|
|
1090
|
+
case "hour":
|
|
1091
|
+
case "hrs":
|
|
1092
|
+
case "hr":
|
|
1093
|
+
case "h":
|
|
1094
|
+
return n * h;
|
|
1095
|
+
case "minutes":
|
|
1096
|
+
case "minute":
|
|
1097
|
+
case "mins":
|
|
1098
|
+
case "min":
|
|
1099
|
+
case "m":
|
|
1100
|
+
return n * m;
|
|
1101
|
+
case "seconds":
|
|
1102
|
+
case "second":
|
|
1103
|
+
case "secs":
|
|
1104
|
+
case "sec":
|
|
1105
|
+
case "s":
|
|
1106
|
+
return n * s;
|
|
1107
|
+
case "milliseconds":
|
|
1108
|
+
case "millisecond":
|
|
1109
|
+
case "msecs":
|
|
1110
|
+
case "msec":
|
|
1111
|
+
case "ms":
|
|
1112
|
+
return n;
|
|
1113
|
+
default:
|
|
1114
|
+
return undefined;
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
/**
|
|
1118
|
+
* Short format for `ms`.
|
|
1119
|
+
*
|
|
1120
|
+
* @param {Number} ms
|
|
1121
|
+
* @return {String}
|
|
1122
|
+
* @api private
|
|
1123
|
+
*/ function fmtShort(ms) {
|
|
1124
|
+
var msAbs = Math.abs(ms);
|
|
1125
|
+
if (msAbs >= d) {
|
|
1126
|
+
return Math.round(ms / d) + "d";
|
|
1127
|
+
}
|
|
1128
|
+
if (msAbs >= h) {
|
|
1129
|
+
return Math.round(ms / h) + "h";
|
|
1130
|
+
}
|
|
1131
|
+
if (msAbs >= m) {
|
|
1132
|
+
return Math.round(ms / m) + "m";
|
|
1133
|
+
}
|
|
1134
|
+
if (msAbs >= s) {
|
|
1135
|
+
return Math.round(ms / s) + "s";
|
|
1136
|
+
}
|
|
1137
|
+
return ms + "ms";
|
|
1138
|
+
}
|
|
1139
|
+
/**
|
|
1140
|
+
* Long format for `ms`.
|
|
1141
|
+
*
|
|
1142
|
+
* @param {Number} ms
|
|
1143
|
+
* @return {String}
|
|
1144
|
+
* @api private
|
|
1145
|
+
*/ function fmtLong(ms) {
|
|
1146
|
+
var msAbs = Math.abs(ms);
|
|
1147
|
+
if (msAbs >= d) {
|
|
1148
|
+
return plural(ms, msAbs, d, "day");
|
|
1149
|
+
}
|
|
1150
|
+
if (msAbs >= h) {
|
|
1151
|
+
return plural(ms, msAbs, h, "hour");
|
|
1152
|
+
}
|
|
1153
|
+
if (msAbs >= m) {
|
|
1154
|
+
return plural(ms, msAbs, m, "minute");
|
|
1155
|
+
}
|
|
1156
|
+
if (msAbs >= s) {
|
|
1157
|
+
return plural(ms, msAbs, s, "second");
|
|
1158
|
+
}
|
|
1159
|
+
return ms + " ms";
|
|
1160
|
+
}
|
|
1161
|
+
/**
|
|
1162
|
+
* Pluralization helper.
|
|
1163
|
+
*/ function plural(ms, msAbs, n, name) {
|
|
1164
|
+
var isPlural = msAbs >= n * 1.5;
|
|
1165
|
+
return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* This is the common logic for both the Node.js and web browser
|
|
1170
|
+
* implementations of `debug()`.
|
|
1171
|
+
*/
|
|
1172
|
+
|
|
1173
|
+
function _array_like_to_array$1(arr, len) {
|
|
1174
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
1175
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
1176
|
+
return arr2;
|
|
1177
|
+
}
|
|
1178
|
+
function _array_without_holes$1(arr) {
|
|
1179
|
+
if (Array.isArray(arr)) return _array_like_to_array$1(arr);
|
|
1180
|
+
}
|
|
1181
|
+
function _instanceof$1(left, right) {
|
|
1182
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
1183
|
+
return !!right[Symbol.hasInstance](left);
|
|
1184
|
+
} else {
|
|
1185
|
+
return left instanceof right;
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
function _iterable_to_array$1(iter) {
|
|
1189
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1190
|
+
}
|
|
1191
|
+
function _non_iterable_spread$1() {
|
|
1192
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1193
|
+
}
|
|
1194
|
+
function _to_consumable_array$1(arr) {
|
|
1195
|
+
return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread$1();
|
|
1196
|
+
}
|
|
1197
|
+
function _unsupported_iterable_to_array$1(o, minLen) {
|
|
1198
|
+
if (!o) return;
|
|
1199
|
+
if (typeof o === "string") return _array_like_to_array$1(o, minLen);
|
|
1200
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1201
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1202
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
1203
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
|
|
1204
|
+
}
|
|
1205
|
+
function setup(env) {
|
|
1206
|
+
createDebug.debug = createDebug;
|
|
1207
|
+
createDebug.default = createDebug;
|
|
1208
|
+
createDebug.coerce = coerce;
|
|
1209
|
+
createDebug.disable = disable;
|
|
1210
|
+
createDebug.enable = enable;
|
|
1211
|
+
createDebug.enabled = enabled;
|
|
1212
|
+
createDebug.humanize = ms;
|
|
1213
|
+
createDebug.destroy = destroy;
|
|
1214
|
+
Object.keys(env).forEach(function(key) {
|
|
1215
|
+
createDebug[key] = env[key];
|
|
1216
|
+
});
|
|
1217
|
+
/**
|
|
1218
|
+
* The currently active debug mode names, and names to skip.
|
|
1219
|
+
*/ createDebug.names = [];
|
|
1220
|
+
createDebug.skips = [];
|
|
1221
|
+
/**
|
|
1222
|
+
* Map of special "%n" handling functions, for the debug "format" argument.
|
|
1223
|
+
*
|
|
1224
|
+
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
1225
|
+
*/ createDebug.formatters = {};
|
|
1226
|
+
/**
|
|
1227
|
+
* Selects a color for a debug namespace
|
|
1228
|
+
* @param {String} namespace The namespace string for the debug instance to be colored
|
|
1229
|
+
* @return {Number|String} An ANSI color code for the given namespace
|
|
1230
|
+
* @api private
|
|
1231
|
+
*/ function selectColor(namespace) {
|
|
1232
|
+
var hash = 0;
|
|
1233
|
+
for(var i = 0; i < namespace.length; i++){
|
|
1234
|
+
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
1235
|
+
hash |= 0; // Convert to 32bit integer
|
|
1236
|
+
}
|
|
1237
|
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
1238
|
+
}
|
|
1239
|
+
createDebug.selectColor = selectColor;
|
|
1240
|
+
/**
|
|
1241
|
+
* Create a debugger with the given `namespace`.
|
|
1242
|
+
*
|
|
1243
|
+
* @param {String} namespace
|
|
1244
|
+
* @return {Function}
|
|
1245
|
+
* @api public
|
|
1246
|
+
*/ function createDebug(namespace) {
|
|
1247
|
+
var prevTime;
|
|
1248
|
+
var enableOverride = null;
|
|
1249
|
+
var namespacesCache;
|
|
1250
|
+
var enabledCache;
|
|
1251
|
+
function debug() {
|
|
1252
|
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
1253
|
+
args[_key] = arguments[_key];
|
|
1254
|
+
}
|
|
1255
|
+
// Disabled?
|
|
1256
|
+
if (!debug.enabled) {
|
|
1257
|
+
return;
|
|
1258
|
+
}
|
|
1259
|
+
var self = debug;
|
|
1260
|
+
// Set `diff` timestamp
|
|
1261
|
+
var curr = Number(new Date());
|
|
1262
|
+
var ms = curr - (prevTime || curr);
|
|
1263
|
+
self.diff = ms;
|
|
1264
|
+
self.prev = prevTime;
|
|
1265
|
+
self.curr = curr;
|
|
1266
|
+
prevTime = curr;
|
|
1267
|
+
args[0] = createDebug.coerce(args[0]);
|
|
1268
|
+
if (typeof args[0] !== "string") {
|
|
1269
|
+
// Anything else let's inspect with %O
|
|
1270
|
+
args.unshift("%O");
|
|
1271
|
+
}
|
|
1272
|
+
// Apply any `formatters` transformations
|
|
1273
|
+
var index = 0;
|
|
1274
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
|
|
1275
|
+
// If we encounter an escaped % then don't increase the array index
|
|
1276
|
+
if (match === "%%") {
|
|
1277
|
+
return "%";
|
|
1278
|
+
}
|
|
1279
|
+
index++;
|
|
1280
|
+
var formatter = createDebug.formatters[format];
|
|
1281
|
+
if (typeof formatter === "function") {
|
|
1282
|
+
var val = args[index];
|
|
1283
|
+
match = formatter.call(self, val);
|
|
1284
|
+
// Now we need to remove `args[index]` since it's inlined in the `format`
|
|
1285
|
+
args.splice(index, 1);
|
|
1286
|
+
index--;
|
|
1287
|
+
}
|
|
1288
|
+
return match;
|
|
1289
|
+
});
|
|
1290
|
+
// Apply env-specific formatting (colors, etc.)
|
|
1291
|
+
createDebug.formatArgs.call(self, args);
|
|
1292
|
+
var logFn = self.log || createDebug.log;
|
|
1293
|
+
logFn.apply(self, args);
|
|
1294
|
+
}
|
|
1295
|
+
debug.namespace = namespace;
|
|
1296
|
+
debug.useColors = createDebug.useColors();
|
|
1297
|
+
debug.color = createDebug.selectColor(namespace);
|
|
1298
|
+
debug.extend = extend;
|
|
1299
|
+
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
|
1300
|
+
Object.defineProperty(debug, "enabled", {
|
|
1301
|
+
enumerable: true,
|
|
1302
|
+
configurable: false,
|
|
1303
|
+
get: function() {
|
|
1304
|
+
if (enableOverride !== null) {
|
|
1305
|
+
return enableOverride;
|
|
1306
|
+
}
|
|
1307
|
+
if (namespacesCache !== createDebug.namespaces) {
|
|
1308
|
+
namespacesCache = createDebug.namespaces;
|
|
1309
|
+
enabledCache = createDebug.enabled(namespace);
|
|
1310
|
+
}
|
|
1311
|
+
return enabledCache;
|
|
1312
|
+
},
|
|
1313
|
+
set: function(v) {
|
|
1314
|
+
enableOverride = v;
|
|
1315
|
+
}
|
|
1316
|
+
});
|
|
1317
|
+
// Env-specific initialization logic for debug instances
|
|
1318
|
+
if (typeof createDebug.init === "function") {
|
|
1319
|
+
createDebug.init(debug);
|
|
1320
|
+
}
|
|
1321
|
+
return debug;
|
|
1322
|
+
}
|
|
1323
|
+
function extend(namespace, delimiter) {
|
|
1324
|
+
var newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
1325
|
+
newDebug.log = this.log;
|
|
1326
|
+
return newDebug;
|
|
1327
|
+
}
|
|
1328
|
+
/**
|
|
1329
|
+
* Enables a debug mode by namespaces. This can include modes
|
|
1330
|
+
* separated by a colon and wildcards.
|
|
1331
|
+
*
|
|
1332
|
+
* @param {String} namespaces
|
|
1333
|
+
* @api public
|
|
1334
|
+
*/ function enable(namespaces) {
|
|
1335
|
+
createDebug.save(namespaces);
|
|
1336
|
+
createDebug.namespaces = namespaces;
|
|
1337
|
+
createDebug.names = [];
|
|
1338
|
+
createDebug.skips = [];
|
|
1339
|
+
var i;
|
|
1340
|
+
var split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
|
|
1341
|
+
var len = split.length;
|
|
1342
|
+
for(i = 0; i < len; i++){
|
|
1343
|
+
if (!split[i]) {
|
|
1344
|
+
continue;
|
|
1345
|
+
}
|
|
1346
|
+
namespaces = split[i].replace(/\*/g, ".*?");
|
|
1347
|
+
if (namespaces[0] === "-") {
|
|
1348
|
+
createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
|
|
1349
|
+
} else {
|
|
1350
|
+
createDebug.names.push(new RegExp("^" + namespaces + "$"));
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
/**
|
|
1355
|
+
* Disable debug output.
|
|
1356
|
+
*
|
|
1357
|
+
* @return {String} namespaces
|
|
1358
|
+
* @api public
|
|
1359
|
+
*/ function disable() {
|
|
1360
|
+
var namespaces = _to_consumable_array$1(createDebug.names.map(toNamespace)).concat(_to_consumable_array$1(createDebug.skips.map(toNamespace).map(function(namespace) {
|
|
1361
|
+
return "-" + namespace;
|
|
1362
|
+
}))).join(",");
|
|
1363
|
+
createDebug.enable("");
|
|
1364
|
+
return namespaces;
|
|
1365
|
+
}
|
|
1366
|
+
/**
|
|
1367
|
+
* Returns true if the given mode name is enabled, false otherwise.
|
|
1368
|
+
*
|
|
1369
|
+
* @param {String} name
|
|
1370
|
+
* @return {Boolean}
|
|
1371
|
+
* @api public
|
|
1372
|
+
*/ function enabled(name) {
|
|
1373
|
+
if (name[name.length - 1] === "*") {
|
|
1374
|
+
return true;
|
|
1375
|
+
}
|
|
1376
|
+
var i;
|
|
1377
|
+
var len;
|
|
1378
|
+
for(i = 0, len = createDebug.skips.length; i < len; i++){
|
|
1379
|
+
if (createDebug.skips[i].test(name)) {
|
|
1380
|
+
return false;
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
for(i = 0, len = createDebug.names.length; i < len; i++){
|
|
1384
|
+
if (createDebug.names[i].test(name)) {
|
|
1385
|
+
return true;
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
return false;
|
|
1389
|
+
}
|
|
1390
|
+
/**
|
|
1391
|
+
* Convert regexp to namespace
|
|
1392
|
+
*
|
|
1393
|
+
* @param {RegExp} regxep
|
|
1394
|
+
* @return {String} namespace
|
|
1395
|
+
* @api private
|
|
1396
|
+
*/ function toNamespace(regexp) {
|
|
1397
|
+
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
|
|
1398
|
+
}
|
|
1399
|
+
/**
|
|
1400
|
+
* Coerce `val`.
|
|
1401
|
+
*
|
|
1402
|
+
* @param {Mixed} val
|
|
1403
|
+
* @return {Mixed}
|
|
1404
|
+
* @api private
|
|
1405
|
+
*/ function coerce(val) {
|
|
1406
|
+
if (_instanceof$1(val, Error)) {
|
|
1407
|
+
return val.stack || val.message;
|
|
1408
|
+
}
|
|
1409
|
+
return val;
|
|
1410
|
+
}
|
|
1411
|
+
/**
|
|
1412
|
+
* XXX DO NOT USE. This is a temporary stub function.
|
|
1413
|
+
* XXX It WILL be removed in the next major release.
|
|
1414
|
+
*/ function destroy() {
|
|
1415
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
1416
|
+
}
|
|
1417
|
+
createDebug.enable(createDebug.load());
|
|
1418
|
+
return createDebug;
|
|
1419
|
+
}
|
|
1420
|
+
var common = setup;
|
|
1421
|
+
|
|
1422
|
+
/* eslint-env browser */
|
|
1423
|
+
|
|
1424
|
+
(function (module, exports) {
|
|
1425
|
+
/**
|
|
1426
|
+
* This is the web browser implementation of `debug()`.
|
|
1427
|
+
*/ exports.formatArgs = formatArgs;
|
|
1428
|
+
exports.save = save;
|
|
1429
|
+
exports.load = load;
|
|
1430
|
+
exports.useColors = useColors;
|
|
1431
|
+
exports.storage = localstorage();
|
|
1432
|
+
exports.destroy = function() {
|
|
1433
|
+
var warned = false;
|
|
1434
|
+
return function() {
|
|
1435
|
+
if (!warned) {
|
|
1436
|
+
warned = true;
|
|
1437
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
1438
|
+
}
|
|
1439
|
+
};
|
|
1440
|
+
}();
|
|
1441
|
+
/**
|
|
1442
|
+
* Colors.
|
|
1443
|
+
*/ exports.colors = [
|
|
1444
|
+
"#0000CC",
|
|
1445
|
+
"#0000FF",
|
|
1446
|
+
"#0033CC",
|
|
1447
|
+
"#0033FF",
|
|
1448
|
+
"#0066CC",
|
|
1449
|
+
"#0066FF",
|
|
1450
|
+
"#0099CC",
|
|
1451
|
+
"#0099FF",
|
|
1452
|
+
"#00CC00",
|
|
1453
|
+
"#00CC33",
|
|
1454
|
+
"#00CC66",
|
|
1455
|
+
"#00CC99",
|
|
1456
|
+
"#00CCCC",
|
|
1457
|
+
"#00CCFF",
|
|
1458
|
+
"#3300CC",
|
|
1459
|
+
"#3300FF",
|
|
1460
|
+
"#3333CC",
|
|
1461
|
+
"#3333FF",
|
|
1462
|
+
"#3366CC",
|
|
1463
|
+
"#3366FF",
|
|
1464
|
+
"#3399CC",
|
|
1465
|
+
"#3399FF",
|
|
1466
|
+
"#33CC00",
|
|
1467
|
+
"#33CC33",
|
|
1468
|
+
"#33CC66",
|
|
1469
|
+
"#33CC99",
|
|
1470
|
+
"#33CCCC",
|
|
1471
|
+
"#33CCFF",
|
|
1472
|
+
"#6600CC",
|
|
1473
|
+
"#6600FF",
|
|
1474
|
+
"#6633CC",
|
|
1475
|
+
"#6633FF",
|
|
1476
|
+
"#66CC00",
|
|
1477
|
+
"#66CC33",
|
|
1478
|
+
"#9900CC",
|
|
1479
|
+
"#9900FF",
|
|
1480
|
+
"#9933CC",
|
|
1481
|
+
"#9933FF",
|
|
1482
|
+
"#99CC00",
|
|
1483
|
+
"#99CC33",
|
|
1484
|
+
"#CC0000",
|
|
1485
|
+
"#CC0033",
|
|
1486
|
+
"#CC0066",
|
|
1487
|
+
"#CC0099",
|
|
1488
|
+
"#CC00CC",
|
|
1489
|
+
"#CC00FF",
|
|
1490
|
+
"#CC3300",
|
|
1491
|
+
"#CC3333",
|
|
1492
|
+
"#CC3366",
|
|
1493
|
+
"#CC3399",
|
|
1494
|
+
"#CC33CC",
|
|
1495
|
+
"#CC33FF",
|
|
1496
|
+
"#CC6600",
|
|
1497
|
+
"#CC6633",
|
|
1498
|
+
"#CC9900",
|
|
1499
|
+
"#CC9933",
|
|
1500
|
+
"#CCCC00",
|
|
1501
|
+
"#CCCC33",
|
|
1502
|
+
"#FF0000",
|
|
1503
|
+
"#FF0033",
|
|
1504
|
+
"#FF0066",
|
|
1505
|
+
"#FF0099",
|
|
1506
|
+
"#FF00CC",
|
|
1507
|
+
"#FF00FF",
|
|
1508
|
+
"#FF3300",
|
|
1509
|
+
"#FF3333",
|
|
1510
|
+
"#FF3366",
|
|
1511
|
+
"#FF3399",
|
|
1512
|
+
"#FF33CC",
|
|
1513
|
+
"#FF33FF",
|
|
1514
|
+
"#FF6600",
|
|
1515
|
+
"#FF6633",
|
|
1516
|
+
"#FF9900",
|
|
1517
|
+
"#FF9933",
|
|
1518
|
+
"#FFCC00",
|
|
1519
|
+
"#FFCC33"
|
|
1520
|
+
];
|
|
1521
|
+
/**
|
|
1522
|
+
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
1523
|
+
* and the Firebug extension (any Firefox version) are known
|
|
1524
|
+
* to support "%c" CSS customizations.
|
|
1525
|
+
*
|
|
1526
|
+
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
|
1527
|
+
*/ // eslint-disable-next-line complexity
|
|
1528
|
+
function useColors() {
|
|
1529
|
+
// NB: In an Electron preload script, document will be defined but not fully
|
|
1530
|
+
// initialized. Since we know we're in Chrome, we'll just detect this case
|
|
1531
|
+
// explicitly
|
|
1532
|
+
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
1533
|
+
return true;
|
|
1534
|
+
}
|
|
1535
|
+
// Internet Explorer and Edge do not support colors.
|
|
1536
|
+
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
1537
|
+
return false;
|
|
1538
|
+
}
|
|
1539
|
+
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
|
1540
|
+
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
|
1541
|
+
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
1542
|
+
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
1543
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
1544
|
+
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
1545
|
+
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
1546
|
+
}
|
|
1547
|
+
/**
|
|
1548
|
+
* Colorize log arguments if enabled.
|
|
1549
|
+
*
|
|
1550
|
+
* @api public
|
|
1551
|
+
*/ function formatArgs(args) {
|
|
1552
|
+
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
|
|
1553
|
+
if (!this.useColors) {
|
|
1554
|
+
return;
|
|
1555
|
+
}
|
|
1556
|
+
var c = "color: " + this.color;
|
|
1557
|
+
args.splice(1, 0, c, "color: inherit");
|
|
1558
|
+
// The final "%c" is somewhat tricky, because there could be other
|
|
1559
|
+
// arguments passed either before or after the %c, so we need to
|
|
1560
|
+
// figure out the correct index to insert the CSS into
|
|
1561
|
+
var index = 0;
|
|
1562
|
+
var lastC = 0;
|
|
1563
|
+
args[0].replace(/%[a-zA-Z%]/g, function(match) {
|
|
1564
|
+
if (match === "%%") {
|
|
1565
|
+
return;
|
|
1566
|
+
}
|
|
1567
|
+
index++;
|
|
1568
|
+
if (match === "%c") {
|
|
1569
|
+
// We only are interested in the *last* %c
|
|
1570
|
+
// (the user may have provided their own)
|
|
1571
|
+
lastC = index;
|
|
1572
|
+
}
|
|
1573
|
+
});
|
|
1574
|
+
args.splice(lastC, 0, c);
|
|
1575
|
+
}
|
|
1576
|
+
/**
|
|
1577
|
+
* Invokes `console.debug()` when available.
|
|
1578
|
+
* No-op when `console.debug` is not a "function".
|
|
1579
|
+
* If `console.debug` is not available, falls back
|
|
1580
|
+
* to `console.log`.
|
|
1581
|
+
*
|
|
1582
|
+
* @api public
|
|
1583
|
+
*/ exports.log = console.debug || console.log || function() {};
|
|
1584
|
+
/**
|
|
1585
|
+
* Save `namespaces`.
|
|
1586
|
+
*
|
|
1587
|
+
* @param {String} namespaces
|
|
1588
|
+
* @api private
|
|
1589
|
+
*/ function save(namespaces) {
|
|
1590
|
+
try {
|
|
1591
|
+
if (namespaces) {
|
|
1592
|
+
exports.storage.setItem("debug", namespaces);
|
|
1593
|
+
} else {
|
|
1594
|
+
exports.storage.removeItem("debug");
|
|
1595
|
+
}
|
|
1596
|
+
} catch (error) {
|
|
1597
|
+
// Swallow
|
|
1598
|
+
// XXX (@Qix-) should we be logging these?
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
/**
|
|
1602
|
+
* Load `namespaces`.
|
|
1603
|
+
*
|
|
1604
|
+
* @return {String} returns the previously persisted debug modes
|
|
1605
|
+
* @api private
|
|
1606
|
+
*/ function load() {
|
|
1607
|
+
var r;
|
|
1608
|
+
try {
|
|
1609
|
+
r = exports.storage.getItem("debug");
|
|
1610
|
+
} catch (error) {
|
|
1611
|
+
// Swallow
|
|
1612
|
+
// XXX (@Qix-) should we be logging these?
|
|
1613
|
+
}
|
|
1614
|
+
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
1615
|
+
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
1616
|
+
r = process.env.DEBUG;
|
|
1617
|
+
}
|
|
1618
|
+
return r;
|
|
1619
|
+
}
|
|
1620
|
+
/**
|
|
1621
|
+
* Localstorage attempts to return the localstorage.
|
|
1622
|
+
*
|
|
1623
|
+
* This is necessary because safari throws
|
|
1624
|
+
* when a user disables cookies/localstorage
|
|
1625
|
+
* and you attempt to access it.
|
|
1626
|
+
*
|
|
1627
|
+
* @return {LocalStorage}
|
|
1628
|
+
* @api private
|
|
1629
|
+
*/ function localstorage() {
|
|
1630
|
+
try {
|
|
1631
|
+
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
|
1632
|
+
// The Browser also has localStorage in the global context.
|
|
1633
|
+
return localStorage;
|
|
1634
|
+
} catch (error) {
|
|
1635
|
+
// Swallow
|
|
1636
|
+
// XXX (@Qix-) should we be logging these?
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
module.exports = common(exports);
|
|
1640
|
+
var formatters = module.exports.formatters;
|
|
1641
|
+
/**
|
|
1642
|
+
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
|
1643
|
+
*/ formatters.j = function(v) {
|
|
1644
|
+
try {
|
|
1645
|
+
return JSON.stringify(v);
|
|
1646
|
+
} catch (error) {
|
|
1647
|
+
return "[UnexpectedJSONParseError]: " + error.message;
|
|
1648
|
+
}
|
|
1649
|
+
};
|
|
1650
|
+
}(browser, browser.exports));
|
|
1651
|
+
|
|
1652
|
+
var node = {
|
|
1653
|
+
exports: {}
|
|
1654
|
+
};
|
|
1655
|
+
|
|
1656
|
+
/**
|
|
1657
|
+
* Module dependencies.
|
|
1658
|
+
*/
|
|
1659
|
+
|
|
1660
|
+
(function (module, exports) {
|
|
1661
|
+
function _array_like_to_array(arr, len) {
|
|
1662
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
1663
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
1664
|
+
return arr2;
|
|
1665
|
+
}
|
|
1666
|
+
function _array_without_holes(arr) {
|
|
1667
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
1668
|
+
}
|
|
1669
|
+
function _iterable_to_array(iter) {
|
|
1670
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1671
|
+
}
|
|
1672
|
+
function _non_iterable_spread() {
|
|
1673
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1674
|
+
}
|
|
1675
|
+
function _to_consumable_array(arr) {
|
|
1676
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
1677
|
+
}
|
|
1678
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
1679
|
+
if (!o) return;
|
|
1680
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
1681
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1682
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1683
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
1684
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
1685
|
+
}
|
|
1686
|
+
var tty = require$$0__default["default"];
|
|
1687
|
+
var util = require$$1__default["default"];
|
|
1688
|
+
/**
|
|
1689
|
+
* This is the Node.js implementation of `debug()`.
|
|
1690
|
+
*/ exports.init = init;
|
|
1691
|
+
exports.log = log;
|
|
1692
|
+
exports.formatArgs = formatArgs;
|
|
1693
|
+
exports.save = save;
|
|
1694
|
+
exports.load = load;
|
|
1695
|
+
exports.useColors = useColors;
|
|
1696
|
+
exports.destroy = util.deprecate(function() {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
1697
|
+
/**
|
|
1698
|
+
* Colors.
|
|
1699
|
+
*/ exports.colors = [
|
|
1700
|
+
6,
|
|
1701
|
+
2,
|
|
1702
|
+
3,
|
|
1703
|
+
4,
|
|
1704
|
+
5,
|
|
1705
|
+
1
|
|
1706
|
+
];
|
|
1707
|
+
try {
|
|
1708
|
+
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
|
|
1709
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
1710
|
+
var supportsColor = browser$1;
|
|
1711
|
+
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
1712
|
+
exports.colors = [
|
|
1713
|
+
20,
|
|
1714
|
+
21,
|
|
1715
|
+
26,
|
|
1716
|
+
27,
|
|
1717
|
+
32,
|
|
1718
|
+
33,
|
|
1719
|
+
38,
|
|
1720
|
+
39,
|
|
1721
|
+
40,
|
|
1722
|
+
41,
|
|
1723
|
+
42,
|
|
1724
|
+
43,
|
|
1725
|
+
44,
|
|
1726
|
+
45,
|
|
1727
|
+
56,
|
|
1728
|
+
57,
|
|
1729
|
+
62,
|
|
1730
|
+
63,
|
|
1731
|
+
68,
|
|
1732
|
+
69,
|
|
1733
|
+
74,
|
|
1734
|
+
75,
|
|
1735
|
+
76,
|
|
1736
|
+
77,
|
|
1737
|
+
78,
|
|
1738
|
+
79,
|
|
1739
|
+
80,
|
|
1740
|
+
81,
|
|
1741
|
+
92,
|
|
1742
|
+
93,
|
|
1743
|
+
98,
|
|
1744
|
+
99,
|
|
1745
|
+
112,
|
|
1746
|
+
113,
|
|
1747
|
+
128,
|
|
1748
|
+
129,
|
|
1749
|
+
134,
|
|
1750
|
+
135,
|
|
1751
|
+
148,
|
|
1752
|
+
149,
|
|
1753
|
+
160,
|
|
1754
|
+
161,
|
|
1755
|
+
162,
|
|
1756
|
+
163,
|
|
1757
|
+
164,
|
|
1758
|
+
165,
|
|
1759
|
+
166,
|
|
1760
|
+
167,
|
|
1761
|
+
168,
|
|
1762
|
+
169,
|
|
1763
|
+
170,
|
|
1764
|
+
171,
|
|
1765
|
+
172,
|
|
1766
|
+
173,
|
|
1767
|
+
178,
|
|
1768
|
+
179,
|
|
1769
|
+
184,
|
|
1770
|
+
185,
|
|
1771
|
+
196,
|
|
1772
|
+
197,
|
|
1773
|
+
198,
|
|
1774
|
+
199,
|
|
1775
|
+
200,
|
|
1776
|
+
201,
|
|
1777
|
+
202,
|
|
1778
|
+
203,
|
|
1779
|
+
204,
|
|
1780
|
+
205,
|
|
1781
|
+
206,
|
|
1782
|
+
207,
|
|
1783
|
+
208,
|
|
1784
|
+
209,
|
|
1785
|
+
214,
|
|
1786
|
+
215,
|
|
1787
|
+
220,
|
|
1788
|
+
221
|
|
1789
|
+
];
|
|
1790
|
+
}
|
|
1791
|
+
} catch (error) {
|
|
1792
|
+
// Swallow - we only care if `supports-color` is available; it doesn't have to be.
|
|
1793
|
+
}
|
|
1794
|
+
/**
|
|
1795
|
+
* Build up the default `inspectOpts` object from the environment variables.
|
|
1796
|
+
*
|
|
1797
|
+
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
|
1798
|
+
*/ exports.inspectOpts = Object.keys(process.env).filter(function(key) {
|
|
1799
|
+
return /^debug_/i.test(key);
|
|
1800
|
+
}).reduce(function(obj, key) {
|
|
1801
|
+
// Camel-case
|
|
1802
|
+
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) {
|
|
1803
|
+
return k.toUpperCase();
|
|
1804
|
+
});
|
|
1805
|
+
// Coerce string value into JS value
|
|
1806
|
+
var val = process.env[key];
|
|
1807
|
+
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
1808
|
+
val = true;
|
|
1809
|
+
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
1810
|
+
val = false;
|
|
1811
|
+
} else if (val === "null") {
|
|
1812
|
+
val = null;
|
|
1813
|
+
} else {
|
|
1814
|
+
val = Number(val);
|
|
1815
|
+
}
|
|
1816
|
+
obj[prop] = val;
|
|
1817
|
+
return obj;
|
|
1818
|
+
}, {});
|
|
1819
|
+
/**
|
|
1820
|
+
* Is stdout a TTY? Colored output is enabled when `true`.
|
|
1821
|
+
*/ function useColors() {
|
|
1822
|
+
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
1823
|
+
}
|
|
1824
|
+
/**
|
|
1825
|
+
* Adds ANSI color escape codes if enabled.
|
|
1826
|
+
*
|
|
1827
|
+
* @api public
|
|
1828
|
+
*/ function formatArgs(args) {
|
|
1829
|
+
var _this = this, name = _this.namespace, _$useColors = _this.useColors;
|
|
1830
|
+
if (_$useColors) {
|
|
1831
|
+
var c = this.color;
|
|
1832
|
+
var colorCode = "\x1b[3" + (c < 8 ? c : "8;5;" + c);
|
|
1833
|
+
var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1b[0m");
|
|
1834
|
+
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
1835
|
+
args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1b[0m");
|
|
1836
|
+
} else {
|
|
1837
|
+
args[0] = getDate() + name + " " + args[0];
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
function getDate() {
|
|
1841
|
+
if (exports.inspectOpts.hideDate) {
|
|
1842
|
+
return "";
|
|
1843
|
+
}
|
|
1844
|
+
return new Date().toISOString() + " ";
|
|
1845
|
+
}
|
|
1846
|
+
/**
|
|
1847
|
+
* Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
|
|
1848
|
+
*/ function log() {
|
|
1849
|
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
1850
|
+
args[_key] = arguments[_key];
|
|
1851
|
+
}
|
|
1852
|
+
var _util;
|
|
1853
|
+
return process.stderr.write((_util = util).formatWithOptions.apply(_util, [
|
|
1854
|
+
exports.inspectOpts
|
|
1855
|
+
].concat(_to_consumable_array(args))) + "\n");
|
|
1856
|
+
}
|
|
1857
|
+
/**
|
|
1858
|
+
* Save `namespaces`.
|
|
1859
|
+
*
|
|
1860
|
+
* @param {String} namespaces
|
|
1861
|
+
* @api private
|
|
1862
|
+
*/ function save(namespaces) {
|
|
1863
|
+
if (namespaces) {
|
|
1864
|
+
process.env.DEBUG = namespaces;
|
|
1865
|
+
} else {
|
|
1866
|
+
// If you set a process.env field to null or undefined, it gets cast to the
|
|
1867
|
+
// string 'null' or 'undefined'. Just delete instead.
|
|
1868
|
+
delete process.env.DEBUG;
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
/**
|
|
1872
|
+
* Load `namespaces`.
|
|
1873
|
+
*
|
|
1874
|
+
* @return {String} returns the previously persisted debug modes
|
|
1875
|
+
* @api private
|
|
1876
|
+
*/ function load() {
|
|
1877
|
+
return process.env.DEBUG;
|
|
1878
|
+
}
|
|
1879
|
+
/**
|
|
1880
|
+
* Init logic for `debug` instances.
|
|
1881
|
+
*
|
|
1882
|
+
* Create a new `inspectOpts` object in case `useColors` is set
|
|
1883
|
+
* differently for a particular `debug` instance.
|
|
1884
|
+
*/ function init(debug) {
|
|
1885
|
+
debug.inspectOpts = {};
|
|
1886
|
+
var keys = Object.keys(exports.inspectOpts);
|
|
1887
|
+
for(var i = 0; i < keys.length; i++){
|
|
1888
|
+
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1891
|
+
module.exports = common(exports);
|
|
1892
|
+
var formatters = module.exports.formatters;
|
|
1893
|
+
/**
|
|
1894
|
+
* Map %o to `util.inspect()`, all on a single line.
|
|
1895
|
+
*/ formatters.o = function(v) {
|
|
1896
|
+
this.inspectOpts.colors = this.useColors;
|
|
1897
|
+
return util.inspect(v, this.inspectOpts).split("\n").map(function(str) {
|
|
1898
|
+
return str.trim();
|
|
1899
|
+
}).join(" ");
|
|
1900
|
+
};
|
|
1901
|
+
/**
|
|
1902
|
+
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
|
1903
|
+
*/ formatters.O = function(v) {
|
|
1904
|
+
this.inspectOpts.colors = this.useColors;
|
|
1905
|
+
return util.inspect(v, this.inspectOpts);
|
|
1906
|
+
};
|
|
1907
|
+
}(node, node.exports));
|
|
1908
|
+
|
|
1909
|
+
/**
|
|
1910
|
+
* Detect Electron renderer / nwjs process, which is node, but we should
|
|
1911
|
+
* treat as a browser.
|
|
1912
|
+
*/
|
|
1913
|
+
|
|
1914
|
+
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
1915
|
+
src.exports = browser.exports;
|
|
1916
|
+
} else {
|
|
1917
|
+
src.exports = node.exports;
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
var debug = src.exports;
|
|
1921
|
+
|
|
1115
1922
|
var dist = {};
|
|
1116
1923
|
|
|
1117
1924
|
Object.defineProperty(dist, "__esModule", {
|