@digipair/skill-git 0.92.2 → 0.93.0-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/README.md +7 -0
- package/{index.cjs.js → dist/index.cjs.js} +1242 -1271
- package/{index.esm.js → dist/index.esm.js} +1242 -1262
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -0
- package/{libs/skill-git → dist}/src/lib/skill-git.d.ts +1 -0
- package/dist/src/lib/skill-git.d.ts.map +1 -0
- package/dist/src/lib/skill-git.spec.d.ts +2 -0
- package/dist/src/lib/skill-git.spec.d.ts.map +1 -0
- package/package.json +21 -5
- package/index.d.ts +0 -1
- package/libs/skill-git/src/index.d.ts +0 -1
- /package/{index.cjs.d.ts → dist/index.d.ts} +0 -0
- /package/{schema.fr.json → dist/schema.fr.json} +0 -0
- /package/{schema.json → dist/schema.json} +0 -0
@@ -1,22 +1,16 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
var node_buffer = require('node:buffer');
|
5
4
|
var require$$0$1 = require('fs');
|
6
|
-
var require$$
|
7
|
-
var require$$1
|
8
|
-
var require$$0 = require('os');
|
5
|
+
var require$$0 = require('tty');
|
6
|
+
var require$$1 = require('util');
|
9
7
|
var child_process = require('child_process');
|
10
8
|
var node_events = require('node:events');
|
11
9
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
var require$$1__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$1$1);
|
17
|
-
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
|
18
|
-
|
19
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
10
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
11
|
+
function getDefaultExportFromCjs(x) {
|
12
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
13
|
+
}
|
20
14
|
|
21
15
|
var dist$1 = {};
|
22
16
|
|
@@ -26,7 +20,7 @@ var src = {
|
|
26
20
|
exports: {}
|
27
21
|
};
|
28
22
|
|
29
|
-
var browser = {
|
23
|
+
var browser$1 = {
|
30
24
|
exports: {}
|
31
25
|
};
|
32
26
|
|
@@ -34,147 +28,155 @@ var browser = {
|
|
34
28
|
* Helpers.
|
35
29
|
*/
|
36
30
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
*
|
50
|
-
*
|
51
|
-
*
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
31
|
+
var ms;
|
32
|
+
var hasRequiredMs;
|
33
|
+
|
34
|
+
function requireMs () {
|
35
|
+
if (hasRequiredMs) return ms;
|
36
|
+
hasRequiredMs = 1;
|
37
|
+
function _type_of(obj) {
|
38
|
+
"@swc/helpers - typeof";
|
39
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
40
|
+
}
|
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;
|
47
|
+
/**
|
48
|
+
* Parse or format the given `val`.
|
49
|
+
*
|
50
|
+
* Options:
|
51
|
+
*
|
52
|
+
* - `long` verbose formatting [false]
|
53
|
+
*
|
54
|
+
* @param {String|Number} val
|
55
|
+
* @param {Object} [options]
|
56
|
+
* @throws {Error} throw an error if val is not a non-empty string or a number
|
57
|
+
* @return {String|Number}
|
58
|
+
* @api public
|
59
|
+
*/ ms = function(val, options) {
|
60
|
+
options = options || {};
|
61
|
+
var type = typeof val === "undefined" ? "undefined" : _type_of(val);
|
62
|
+
if (type === 'string' && val.length > 0) {
|
63
|
+
return parse(val);
|
64
|
+
} else if (type === 'number' && isFinite(val)) {
|
65
|
+
return options.long ? fmtLong(val) : fmtShort(val);
|
66
|
+
}
|
67
|
+
throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
|
68
|
+
};
|
69
|
+
/**
|
70
|
+
* Parse the given `str` and return milliseconds.
|
71
|
+
*
|
72
|
+
* @param {String} str
|
73
|
+
* @return {Number}
|
74
|
+
* @api private
|
75
|
+
*/ function parse(str) {
|
76
|
+
str = String(str);
|
77
|
+
if (str.length > 100) {
|
78
|
+
return;
|
79
|
+
}
|
80
|
+
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);
|
81
|
+
if (!match) {
|
82
|
+
return;
|
83
|
+
}
|
84
|
+
var n = parseFloat(match[1]);
|
85
|
+
var type = (match[2] || 'ms').toLowerCase();
|
86
|
+
switch(type){
|
87
|
+
case 'years':
|
88
|
+
case 'year':
|
89
|
+
case 'yrs':
|
90
|
+
case 'yr':
|
91
|
+
case 'y':
|
92
|
+
return n * y;
|
93
|
+
case 'weeks':
|
94
|
+
case 'week':
|
95
|
+
case 'w':
|
96
|
+
return n * w;
|
97
|
+
case 'days':
|
98
|
+
case 'day':
|
99
|
+
case 'd':
|
100
|
+
return n * d;
|
101
|
+
case 'hours':
|
102
|
+
case 'hour':
|
103
|
+
case 'hrs':
|
104
|
+
case 'hr':
|
105
|
+
case 'h':
|
106
|
+
return n * h;
|
107
|
+
case 'minutes':
|
108
|
+
case 'minute':
|
109
|
+
case 'mins':
|
110
|
+
case 'min':
|
111
|
+
case 'm':
|
112
|
+
return n * m;
|
113
|
+
case 'seconds':
|
114
|
+
case 'second':
|
115
|
+
case 'secs':
|
116
|
+
case 'sec':
|
117
|
+
case 's':
|
118
|
+
return n * s;
|
119
|
+
case 'milliseconds':
|
120
|
+
case 'millisecond':
|
121
|
+
case 'msecs':
|
122
|
+
case 'msec':
|
123
|
+
case 'ms':
|
124
|
+
return n;
|
125
|
+
default:
|
126
|
+
return undefined;
|
127
|
+
}
|
128
|
+
}
|
129
|
+
/**
|
130
|
+
* Short format for `ms`.
|
131
|
+
*
|
132
|
+
* @param {Number} ms
|
133
|
+
* @return {String}
|
134
|
+
* @api private
|
135
|
+
*/ function fmtShort(ms) {
|
136
|
+
var msAbs = Math.abs(ms);
|
137
|
+
if (msAbs >= d) {
|
138
|
+
return Math.round(ms / d) + 'd';
|
139
|
+
}
|
140
|
+
if (msAbs >= h) {
|
141
|
+
return Math.round(ms / h) + 'h';
|
142
|
+
}
|
143
|
+
if (msAbs >= m) {
|
144
|
+
return Math.round(ms / m) + 'm';
|
145
|
+
}
|
146
|
+
if (msAbs >= s) {
|
147
|
+
return Math.round(ms / s) + 's';
|
148
|
+
}
|
149
|
+
return ms + 'ms';
|
150
|
+
}
|
151
|
+
/**
|
152
|
+
* Long format for `ms`.
|
153
|
+
*
|
154
|
+
* @param {Number} ms
|
155
|
+
* @return {String}
|
156
|
+
* @api private
|
157
|
+
*/ function fmtLong(ms) {
|
158
|
+
var msAbs = Math.abs(ms);
|
159
|
+
if (msAbs >= d) {
|
160
|
+
return plural(ms, msAbs, d, 'day');
|
161
|
+
}
|
162
|
+
if (msAbs >= h) {
|
163
|
+
return plural(ms, msAbs, h, 'hour');
|
164
|
+
}
|
165
|
+
if (msAbs >= m) {
|
166
|
+
return plural(ms, msAbs, m, 'minute');
|
167
|
+
}
|
168
|
+
if (msAbs >= s) {
|
169
|
+
return plural(ms, msAbs, s, 'second');
|
170
|
+
}
|
171
|
+
return ms + ' ms';
|
172
|
+
}
|
173
|
+
/**
|
174
|
+
* Pluralization helper.
|
175
|
+
*/ function plural(ms, msAbs, n, name) {
|
176
|
+
var isPlural = msAbs >= n * 1.5;
|
177
|
+
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
178
|
+
}
|
179
|
+
return ms;
|
178
180
|
}
|
179
181
|
|
180
182
|
/**
|
@@ -182,1006 +184,942 @@ var y = d * 365.25;
|
|
182
184
|
* implementations of `debug()`.
|
183
185
|
*/
|
184
186
|
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
}
|
203
|
-
|
204
|
-
|
205
|
-
}
|
206
|
-
function
|
207
|
-
|
208
|
-
}
|
209
|
-
function
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
187
|
+
var common;
|
188
|
+
var hasRequiredCommon;
|
189
|
+
|
190
|
+
function requireCommon () {
|
191
|
+
if (hasRequiredCommon) return common;
|
192
|
+
hasRequiredCommon = 1;
|
193
|
+
function _array_like_to_array(arr, len) {
|
194
|
+
if (len == null || len > arr.length) len = arr.length;
|
195
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
196
|
+
return arr2;
|
197
|
+
}
|
198
|
+
function _array_without_holes(arr) {
|
199
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
200
|
+
}
|
201
|
+
function _instanceof(left, right) {
|
202
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
203
|
+
return !!right[Symbol.hasInstance](left);
|
204
|
+
} else {
|
205
|
+
return left instanceof right;
|
206
|
+
}
|
207
|
+
}
|
208
|
+
function _iterable_to_array(iter) {
|
209
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
210
|
+
}
|
211
|
+
function _non_iterable_spread() {
|
212
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
213
|
+
}
|
214
|
+
function _to_consumable_array(arr) {
|
215
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
216
|
+
}
|
217
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
218
|
+
if (!o) return;
|
219
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
220
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
221
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
222
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
223
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
224
|
+
}
|
225
|
+
function setup(env) {
|
226
|
+
createDebug.debug = createDebug;
|
227
|
+
createDebug.default = createDebug;
|
228
|
+
createDebug.coerce = coerce;
|
229
|
+
createDebug.disable = disable;
|
230
|
+
createDebug.enable = enable;
|
231
|
+
createDebug.enabled = enabled;
|
232
|
+
createDebug.humanize = requireMs();
|
233
|
+
createDebug.destroy = destroy;
|
234
|
+
Object.keys(env).forEach(function(key) {
|
235
|
+
createDebug[key] = env[key];
|
236
|
+
});
|
237
|
+
/**
|
238
|
+
* The currently active debug mode names, and names to skip.
|
239
|
+
*/ createDebug.names = [];
|
240
|
+
createDebug.skips = [];
|
241
|
+
/**
|
242
|
+
* Map of special "%n" handling functions, for the debug "format" argument.
|
243
|
+
*
|
244
|
+
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
245
|
+
*/ createDebug.formatters = {};
|
246
|
+
/**
|
247
|
+
* Selects a color for a debug namespace
|
248
|
+
* @param {String} namespace The namespace string for the debug instance to be colored
|
249
|
+
* @return {Number|String} An ANSI color code for the given namespace
|
250
|
+
* @api private
|
251
|
+
*/ function selectColor(namespace) {
|
252
|
+
var hash = 0;
|
253
|
+
for(var i = 0; i < namespace.length; i++){
|
254
|
+
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
255
|
+
hash |= 0; // Convert to 32bit integer
|
256
|
+
}
|
257
|
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
258
|
+
}
|
259
|
+
createDebug.selectColor = selectColor;
|
260
|
+
/**
|
261
|
+
* Create a debugger with the given `namespace`.
|
262
|
+
*
|
263
|
+
* @param {String} namespace
|
264
|
+
* @return {Function}
|
265
|
+
* @api public
|
266
|
+
*/ function createDebug(namespace) {
|
267
|
+
var prevTime;
|
268
|
+
var enableOverride = null;
|
269
|
+
var namespacesCache;
|
270
|
+
var enabledCache;
|
271
|
+
function debug() {
|
272
|
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
273
|
+
args[_key] = arguments[_key];
|
274
|
+
}
|
275
|
+
// Disabled?
|
276
|
+
if (!debug.enabled) {
|
277
|
+
return;
|
278
|
+
}
|
279
|
+
var self = debug;
|
280
|
+
// Set `diff` timestamp
|
281
|
+
var curr = Number(new Date());
|
282
|
+
var ms = curr - (prevTime || curr);
|
283
|
+
self.diff = ms;
|
284
|
+
self.prev = prevTime;
|
285
|
+
self.curr = curr;
|
286
|
+
prevTime = curr;
|
287
|
+
args[0] = createDebug.coerce(args[0]);
|
288
|
+
if (typeof args[0] !== 'string') {
|
289
|
+
// Anything else let's inspect with %O
|
290
|
+
args.unshift('%O');
|
291
|
+
}
|
292
|
+
// Apply any `formatters` transformations
|
293
|
+
var index = 0;
|
294
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
|
295
|
+
// If we encounter an escaped % then don't increase the array index
|
296
|
+
if (match === '%%') {
|
297
|
+
return '%';
|
298
|
+
}
|
299
|
+
index++;
|
300
|
+
var formatter = createDebug.formatters[format];
|
301
|
+
if (typeof formatter === 'function') {
|
302
|
+
var val = args[index];
|
303
|
+
match = formatter.call(self, val);
|
304
|
+
// Now we need to remove `args[index]` since it's inlined in the `format`
|
305
|
+
args.splice(index, 1);
|
306
|
+
index--;
|
307
|
+
}
|
308
|
+
return match;
|
309
|
+
});
|
310
|
+
// Apply env-specific formatting (colors, etc.)
|
311
|
+
createDebug.formatArgs.call(self, args);
|
312
|
+
var logFn = self.log || createDebug.log;
|
313
|
+
logFn.apply(self, args);
|
314
|
+
}
|
315
|
+
debug.namespace = namespace;
|
316
|
+
debug.useColors = createDebug.useColors();
|
317
|
+
debug.color = createDebug.selectColor(namespace);
|
318
|
+
debug.extend = extend;
|
319
|
+
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
320
|
+
Object.defineProperty(debug, 'enabled', {
|
321
|
+
enumerable: true,
|
322
|
+
configurable: false,
|
323
|
+
get: function() {
|
324
|
+
if (enableOverride !== null) {
|
325
|
+
return enableOverride;
|
326
|
+
}
|
327
|
+
if (namespacesCache !== createDebug.namespaces) {
|
328
|
+
namespacesCache = createDebug.namespaces;
|
329
|
+
enabledCache = createDebug.enabled(namespace);
|
330
|
+
}
|
331
|
+
return enabledCache;
|
332
|
+
},
|
333
|
+
set: function(v) {
|
334
|
+
enableOverride = v;
|
335
|
+
}
|
336
|
+
});
|
337
|
+
// Env-specific initialization logic for debug instances
|
338
|
+
if (typeof createDebug.init === 'function') {
|
339
|
+
createDebug.init(debug);
|
340
|
+
}
|
341
|
+
return debug;
|
342
|
+
}
|
343
|
+
function extend(namespace, delimiter) {
|
344
|
+
var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
345
|
+
newDebug.log = this.log;
|
346
|
+
return newDebug;
|
347
|
+
}
|
348
|
+
/**
|
349
|
+
* Enables a debug mode by namespaces. This can include modes
|
350
|
+
* separated by a colon and wildcards.
|
351
|
+
*
|
352
|
+
* @param {String} namespaces
|
353
|
+
* @api public
|
354
|
+
*/ function enable(namespaces) {
|
355
|
+
createDebug.save(namespaces);
|
356
|
+
createDebug.namespaces = namespaces;
|
357
|
+
createDebug.names = [];
|
358
|
+
createDebug.skips = [];
|
359
|
+
var split = (typeof namespaces === 'string' ? namespaces : '').trim().replace(/\s+/g, ',').split(',').filter(Boolean);
|
360
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
361
|
+
try {
|
362
|
+
for(var _iterator = split[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
363
|
+
var ns = _step.value;
|
364
|
+
if (ns[0] === '-') {
|
365
|
+
createDebug.skips.push(ns.slice(1));
|
366
|
+
} else {
|
367
|
+
createDebug.names.push(ns);
|
368
|
+
}
|
369
|
+
}
|
370
|
+
} catch (err) {
|
371
|
+
_didIteratorError = true;
|
372
|
+
_iteratorError = err;
|
373
|
+
} finally{
|
374
|
+
try {
|
375
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
376
|
+
_iterator.return();
|
377
|
+
}
|
378
|
+
} finally{
|
379
|
+
if (_didIteratorError) {
|
380
|
+
throw _iteratorError;
|
381
|
+
}
|
382
|
+
}
|
383
|
+
}
|
384
|
+
}
|
385
|
+
/**
|
386
|
+
* Checks if the given string matches a namespace template, honoring
|
387
|
+
* asterisks as wildcards.
|
388
|
+
*
|
389
|
+
* @param {String} search
|
390
|
+
* @param {String} template
|
391
|
+
* @return {Boolean}
|
392
|
+
*/ function matchesTemplate(search, template) {
|
393
|
+
var searchIndex = 0;
|
394
|
+
var templateIndex = 0;
|
395
|
+
var starIndex = -1;
|
396
|
+
var matchIndex = 0;
|
397
|
+
while(searchIndex < search.length){
|
398
|
+
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {
|
399
|
+
// Match character or proceed with wildcard
|
400
|
+
if (template[templateIndex] === '*') {
|
401
|
+
starIndex = templateIndex;
|
402
|
+
matchIndex = searchIndex;
|
403
|
+
templateIndex++; // Skip the '*'
|
404
|
+
} else {
|
405
|
+
searchIndex++;
|
406
|
+
templateIndex++;
|
407
|
+
}
|
408
|
+
} else if (starIndex !== -1) {
|
409
|
+
// Backtrack to the last '*' and try to match more characters
|
410
|
+
templateIndex = starIndex + 1;
|
411
|
+
matchIndex++;
|
412
|
+
searchIndex = matchIndex;
|
413
|
+
} else {
|
414
|
+
return false; // No match
|
415
|
+
}
|
416
|
+
}
|
417
|
+
// Handle trailing '*' in template
|
418
|
+
while(templateIndex < template.length && template[templateIndex] === '*'){
|
419
|
+
templateIndex++;
|
420
|
+
}
|
421
|
+
return templateIndex === template.length;
|
422
|
+
}
|
423
|
+
/**
|
424
|
+
* Disable debug output.
|
425
|
+
*
|
426
|
+
* @return {String} namespaces
|
427
|
+
* @api public
|
428
|
+
*/ function disable() {
|
429
|
+
var namespaces = _to_consumable_array(createDebug.names).concat(_to_consumable_array(createDebug.skips.map(function(namespace) {
|
430
|
+
return '-' + namespace;
|
431
|
+
}))).join(',');
|
432
|
+
createDebug.enable('');
|
433
|
+
return namespaces;
|
434
|
+
}
|
435
|
+
/**
|
436
|
+
* Returns true if the given mode name is enabled, false otherwise.
|
437
|
+
*
|
438
|
+
* @param {String} name
|
439
|
+
* @return {Boolean}
|
440
|
+
* @api public
|
441
|
+
*/ function enabled(name) {
|
442
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
443
|
+
try {
|
444
|
+
for(var _iterator = createDebug.skips[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
445
|
+
var skip = _step.value;
|
446
|
+
if (matchesTemplate(name, skip)) {
|
447
|
+
return false;
|
448
|
+
}
|
449
|
+
}
|
450
|
+
} catch (err) {
|
451
|
+
_didIteratorError = true;
|
452
|
+
_iteratorError = err;
|
453
|
+
} finally{
|
454
|
+
try {
|
455
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
456
|
+
_iterator.return();
|
457
|
+
}
|
458
|
+
} finally{
|
459
|
+
if (_didIteratorError) {
|
460
|
+
throw _iteratorError;
|
461
|
+
}
|
462
|
+
}
|
463
|
+
}
|
464
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
465
|
+
try {
|
466
|
+
for(var _iterator1 = createDebug.names[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
467
|
+
var ns = _step1.value;
|
468
|
+
if (matchesTemplate(name, ns)) {
|
469
|
+
return true;
|
470
|
+
}
|
471
|
+
}
|
472
|
+
} catch (err) {
|
473
|
+
_didIteratorError1 = true;
|
474
|
+
_iteratorError1 = err;
|
475
|
+
} finally{
|
476
|
+
try {
|
477
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
478
|
+
_iterator1.return();
|
479
|
+
}
|
480
|
+
} finally{
|
481
|
+
if (_didIteratorError1) {
|
482
|
+
throw _iteratorError1;
|
483
|
+
}
|
484
|
+
}
|
485
|
+
}
|
486
|
+
return false;
|
487
|
+
}
|
488
|
+
/**
|
489
|
+
* Coerce `val`.
|
490
|
+
*
|
491
|
+
* @param {Mixed} val
|
492
|
+
* @return {Mixed}
|
493
|
+
* @api private
|
494
|
+
*/ function coerce(val) {
|
495
|
+
if (_instanceof(val, Error)) {
|
496
|
+
return val.stack || val.message;
|
497
|
+
}
|
498
|
+
return val;
|
499
|
+
}
|
500
|
+
/**
|
501
|
+
* XXX DO NOT USE. This is a temporary stub function.
|
502
|
+
* XXX It WILL be removed in the next major release.
|
503
|
+
*/ function destroy() {
|
504
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
505
|
+
}
|
506
|
+
createDebug.enable(createDebug.load());
|
507
|
+
return createDebug;
|
508
|
+
}
|
509
|
+
common = setup;
|
510
|
+
return common;
|
500
511
|
}
|
501
|
-
var common = setup;
|
502
512
|
|
503
513
|
/* eslint-env browser */
|
504
514
|
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
exports
|
511
|
-
|
512
|
-
|
513
|
-
exports.
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
}
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
515
|
+
var hasRequiredBrowser$1;
|
516
|
+
|
517
|
+
function requireBrowser$1 () {
|
518
|
+
if (hasRequiredBrowser$1) return browser$1.exports;
|
519
|
+
hasRequiredBrowser$1 = 1;
|
520
|
+
(function (module, exports) {
|
521
|
+
/**
|
522
|
+
* This is the web browser implementation of `debug()`.
|
523
|
+
*/ exports.formatArgs = formatArgs;
|
524
|
+
exports.save = save;
|
525
|
+
exports.load = load;
|
526
|
+
exports.useColors = useColors;
|
527
|
+
exports.storage = localstorage();
|
528
|
+
exports.destroy = function() {
|
529
|
+
var warned = false;
|
530
|
+
return function() {
|
531
|
+
if (!warned) {
|
532
|
+
warned = true;
|
533
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
534
|
+
}
|
535
|
+
};
|
536
|
+
}();
|
537
|
+
/**
|
538
|
+
* Colors.
|
539
|
+
*/ exports.colors = [
|
540
|
+
'#0000CC',
|
541
|
+
'#0000FF',
|
542
|
+
'#0033CC',
|
543
|
+
'#0033FF',
|
544
|
+
'#0066CC',
|
545
|
+
'#0066FF',
|
546
|
+
'#0099CC',
|
547
|
+
'#0099FF',
|
548
|
+
'#00CC00',
|
549
|
+
'#00CC33',
|
550
|
+
'#00CC66',
|
551
|
+
'#00CC99',
|
552
|
+
'#00CCCC',
|
553
|
+
'#00CCFF',
|
554
|
+
'#3300CC',
|
555
|
+
'#3300FF',
|
556
|
+
'#3333CC',
|
557
|
+
'#3333FF',
|
558
|
+
'#3366CC',
|
559
|
+
'#3366FF',
|
560
|
+
'#3399CC',
|
561
|
+
'#3399FF',
|
562
|
+
'#33CC00',
|
563
|
+
'#33CC33',
|
564
|
+
'#33CC66',
|
565
|
+
'#33CC99',
|
566
|
+
'#33CCCC',
|
567
|
+
'#33CCFF',
|
568
|
+
'#6600CC',
|
569
|
+
'#6600FF',
|
570
|
+
'#6633CC',
|
571
|
+
'#6633FF',
|
572
|
+
'#66CC00',
|
573
|
+
'#66CC33',
|
574
|
+
'#9900CC',
|
575
|
+
'#9900FF',
|
576
|
+
'#9933CC',
|
577
|
+
'#9933FF',
|
578
|
+
'#99CC00',
|
579
|
+
'#99CC33',
|
580
|
+
'#CC0000',
|
581
|
+
'#CC0033',
|
582
|
+
'#CC0066',
|
583
|
+
'#CC0099',
|
584
|
+
'#CC00CC',
|
585
|
+
'#CC00FF',
|
586
|
+
'#CC3300',
|
587
|
+
'#CC3333',
|
588
|
+
'#CC3366',
|
589
|
+
'#CC3399',
|
590
|
+
'#CC33CC',
|
591
|
+
'#CC33FF',
|
592
|
+
'#CC6600',
|
593
|
+
'#CC6633',
|
594
|
+
'#CC9900',
|
595
|
+
'#CC9933',
|
596
|
+
'#CCCC00',
|
597
|
+
'#CCCC33',
|
598
|
+
'#FF0000',
|
599
|
+
'#FF0033',
|
600
|
+
'#FF0066',
|
601
|
+
'#FF0099',
|
602
|
+
'#FF00CC',
|
603
|
+
'#FF00FF',
|
604
|
+
'#FF3300',
|
605
|
+
'#FF3333',
|
606
|
+
'#FF3366',
|
607
|
+
'#FF3399',
|
608
|
+
'#FF33CC',
|
609
|
+
'#FF33FF',
|
610
|
+
'#FF6600',
|
611
|
+
'#FF6633',
|
612
|
+
'#FF9900',
|
613
|
+
'#FF9933',
|
614
|
+
'#FFCC00',
|
615
|
+
'#FFCC33'
|
616
|
+
];
|
617
|
+
/**
|
618
|
+
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
619
|
+
* and the Firebug extension (any Firefox version) are known
|
620
|
+
* to support "%c" CSS customizations.
|
621
|
+
*
|
622
|
+
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
623
|
+
*/ // eslint-disable-next-line complexity
|
624
|
+
function useColors() {
|
625
|
+
// NB: In an Electron preload script, document will be defined but not fully
|
626
|
+
// initialized. Since we know we're in Chrome, we'll just detect this case
|
627
|
+
// explicitly
|
628
|
+
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
629
|
+
return true;
|
630
|
+
}
|
631
|
+
// Internet Explorer and Edge do not support colors.
|
632
|
+
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
633
|
+
return false;
|
634
|
+
}
|
635
|
+
var m;
|
636
|
+
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
637
|
+
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
638
|
+
// eslint-disable-next-line no-return-assign
|
639
|
+
return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
640
|
+
typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
641
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
642
|
+
typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
643
|
+
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
644
|
+
}
|
645
|
+
/**
|
646
|
+
* Colorize log arguments if enabled.
|
647
|
+
*
|
648
|
+
* @api public
|
649
|
+
*/ function formatArgs(args) {
|
650
|
+
args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
|
651
|
+
if (!this.useColors) {
|
652
|
+
return;
|
653
|
+
}
|
654
|
+
var c = 'color: ' + this.color;
|
655
|
+
args.splice(1, 0, c, 'color: inherit');
|
656
|
+
// The final "%c" is somewhat tricky, because there could be other
|
657
|
+
// arguments passed either before or after the %c, so we need to
|
658
|
+
// figure out the correct index to insert the CSS into
|
659
|
+
var index = 0;
|
660
|
+
var lastC = 0;
|
661
|
+
args[0].replace(/%[a-zA-Z%]/g, function(match) {
|
662
|
+
if (match === '%%') {
|
663
|
+
return;
|
664
|
+
}
|
665
|
+
index++;
|
666
|
+
if (match === '%c') {
|
667
|
+
// We only are interested in the *last* %c
|
668
|
+
// (the user may have provided their own)
|
669
|
+
lastC = index;
|
670
|
+
}
|
671
|
+
});
|
672
|
+
args.splice(lastC, 0, c);
|
673
|
+
}
|
674
|
+
/**
|
675
|
+
* Invokes `console.debug()` when available.
|
676
|
+
* No-op when `console.debug` is not a "function".
|
677
|
+
* If `console.debug` is not available, falls back
|
678
|
+
* to `console.log`.
|
679
|
+
*
|
680
|
+
* @api public
|
681
|
+
*/ exports.log = console.debug || console.log || function() {};
|
682
|
+
/**
|
683
|
+
* Save `namespaces`.
|
684
|
+
*
|
685
|
+
* @param {String} namespaces
|
686
|
+
* @api private
|
687
|
+
*/ function save(namespaces) {
|
688
|
+
try {
|
689
|
+
if (namespaces) {
|
690
|
+
exports.storage.setItem('debug', namespaces);
|
691
|
+
} else {
|
692
|
+
exports.storage.removeItem('debug');
|
693
|
+
}
|
694
|
+
} catch (error) {
|
695
|
+
// Swallow
|
696
|
+
// XXX (@Qix-) should we be logging these?
|
697
|
+
}
|
698
|
+
}
|
699
|
+
/**
|
700
|
+
* Load `namespaces`.
|
701
|
+
*
|
702
|
+
* @return {String} returns the previously persisted debug modes
|
703
|
+
* @api private
|
704
|
+
*/ function load() {
|
705
|
+
var r;
|
706
|
+
try {
|
707
|
+
r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG');
|
708
|
+
} catch (error) {
|
709
|
+
// Swallow
|
710
|
+
// XXX (@Qix-) should we be logging these?
|
711
|
+
}
|
712
|
+
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
713
|
+
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
714
|
+
r = process.env.DEBUG;
|
715
|
+
}
|
716
|
+
return r;
|
717
|
+
}
|
718
|
+
/**
|
719
|
+
* Localstorage attempts to return the localstorage.
|
720
|
+
*
|
721
|
+
* This is necessary because safari throws
|
722
|
+
* when a user disables cookies/localstorage
|
723
|
+
* and you attempt to access it.
|
724
|
+
*
|
725
|
+
* @return {LocalStorage}
|
726
|
+
* @api private
|
727
|
+
*/ function localstorage() {
|
728
|
+
try {
|
729
|
+
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
730
|
+
// The Browser also has localStorage in the global context.
|
731
|
+
return localStorage;
|
732
|
+
} catch (error) {
|
733
|
+
// Swallow
|
734
|
+
// XXX (@Qix-) should we be logging these?
|
735
|
+
}
|
736
|
+
}
|
737
|
+
module.exports = requireCommon()(exports);
|
738
|
+
var formatters = module.exports.formatters;
|
739
|
+
/**
|
740
|
+
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
741
|
+
*/ formatters.j = function(v) {
|
742
|
+
try {
|
743
|
+
return JSON.stringify(v);
|
744
|
+
} catch (error) {
|
745
|
+
return '[UnexpectedJSONParseError]: ' + error.message;
|
746
|
+
}
|
747
|
+
};
|
748
|
+
} (browser$1, browser$1.exports));
|
749
|
+
return browser$1.exports;
|
721
750
|
}
|
722
|
-
module.exports = common(exports);
|
723
|
-
var formatters = module.exports.formatters;
|
724
|
-
/**
|
725
|
-
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
726
|
-
*/ formatters.j = function(v) {
|
727
|
-
try {
|
728
|
-
return JSON.stringify(v);
|
729
|
-
} catch (error) {
|
730
|
-
return "[UnexpectedJSONParseError]: " + error.message;
|
731
|
-
}
|
732
|
-
};
|
733
|
-
}(browser, browser.exports));
|
734
751
|
|
735
752
|
var node = {
|
736
753
|
exports: {}
|
737
754
|
};
|
738
755
|
|
739
|
-
|
740
|
-
var argv = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : process.argv;
|
741
|
-
var prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
742
|
-
var position = argv.indexOf(prefix + flag);
|
743
|
-
var terminatorPosition = argv.indexOf("--");
|
744
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
745
|
-
};
|
756
|
+
/* eslint-env browser */
|
746
757
|
|
747
|
-
var
|
748
|
-
var
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
}
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
level: level,
|
772
|
-
hasBasic: true,
|
773
|
-
has256: level >= 2,
|
774
|
-
has16m: level >= 3
|
775
|
-
};
|
776
|
-
}
|
777
|
-
function supportsColor(haveStream, streamIsTTY) {
|
778
|
-
if (forceColor === 0) {
|
779
|
-
return 0;
|
780
|
-
}
|
781
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
782
|
-
return 3;
|
783
|
-
}
|
784
|
-
if (hasFlag("color=256")) {
|
785
|
-
return 2;
|
786
|
-
}
|
787
|
-
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
788
|
-
return 0;
|
789
|
-
}
|
790
|
-
var min = forceColor || 0;
|
791
|
-
if (env.TERM === "dumb") {
|
792
|
-
return min;
|
793
|
-
}
|
794
|
-
if (process.platform === "win32") {
|
795
|
-
// Windows 10 build 10586 is the first Windows release that supports 256 colors.
|
796
|
-
// Windows 10 build 14931 is the first release that supports 16m/TrueColor.
|
797
|
-
var osRelease = os.release().split(".");
|
798
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
799
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
800
|
-
}
|
801
|
-
return 1;
|
802
|
-
}
|
803
|
-
if ("CI" in env) {
|
804
|
-
if ([
|
805
|
-
"TRAVIS",
|
806
|
-
"CIRCLECI",
|
807
|
-
"APPVEYOR",
|
808
|
-
"GITLAB_CI",
|
809
|
-
"GITHUB_ACTIONS",
|
810
|
-
"BUILDKITE"
|
811
|
-
].some(function(sign) {
|
812
|
-
return sign in env;
|
813
|
-
}) || env.CI_NAME === "codeship") {
|
814
|
-
return 1;
|
815
|
-
}
|
816
|
-
return min;
|
817
|
-
}
|
818
|
-
if ("TEAMCITY_VERSION" in env) {
|
819
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
820
|
-
}
|
821
|
-
if (env.COLORTERM === "truecolor") {
|
822
|
-
return 3;
|
823
|
-
}
|
824
|
-
if ("TERM_PROGRAM" in env) {
|
825
|
-
var version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
826
|
-
switch(env.TERM_PROGRAM){
|
827
|
-
case "iTerm.app":
|
828
|
-
return version >= 3 ? 3 : 2;
|
829
|
-
case "Apple_Terminal":
|
830
|
-
return 2;
|
831
|
-
}
|
832
|
-
}
|
833
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
834
|
-
return 2;
|
835
|
-
}
|
836
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
837
|
-
return 1;
|
838
|
-
}
|
839
|
-
if ("COLORTERM" in env) {
|
840
|
-
return 1;
|
841
|
-
}
|
842
|
-
return min;
|
843
|
-
}
|
844
|
-
function getSupportLevel(stream) {
|
845
|
-
var level = supportsColor(stream, stream && stream.isTTY);
|
846
|
-
return translateLevel(level);
|
758
|
+
var browser;
|
759
|
+
var hasRequiredBrowser;
|
760
|
+
|
761
|
+
function requireBrowser () {
|
762
|
+
if (hasRequiredBrowser) return browser;
|
763
|
+
hasRequiredBrowser = 1;
|
764
|
+
function getChromeVersion() {
|
765
|
+
var matches = RegExp("(Chrome|Chromium)\\/(?<chromeVersion>\\d+)\\.").exec(navigator.userAgent);
|
766
|
+
if (!matches) {
|
767
|
+
return;
|
768
|
+
}
|
769
|
+
return Number.parseInt(matches.groups.chromeVersion, 10);
|
770
|
+
}
|
771
|
+
var colorSupport = getChromeVersion() >= 69 ? {
|
772
|
+
level: 1,
|
773
|
+
hasBasic: true,
|
774
|
+
has256: false,
|
775
|
+
has16m: false
|
776
|
+
} : false;
|
777
|
+
browser = {
|
778
|
+
stdout: colorSupport,
|
779
|
+
stderr: colorSupport
|
780
|
+
};
|
781
|
+
return browser;
|
847
782
|
}
|
848
|
-
var supportsColor_1 = {
|
849
|
-
supportsColor: getSupportLevel,
|
850
|
-
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
851
|
-
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
852
|
-
};
|
853
783
|
|
854
784
|
/**
|
855
785
|
* Module dependencies.
|
856
786
|
*/
|
857
787
|
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
function
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
var
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
exports.
|
894
|
-
exports.
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
}
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
}
|
1022
|
-
/**
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
}
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
}
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
788
|
+
var hasRequiredNode;
|
789
|
+
|
790
|
+
function requireNode () {
|
791
|
+
if (hasRequiredNode) return node.exports;
|
792
|
+
hasRequiredNode = 1;
|
793
|
+
(function (module, exports) {
|
794
|
+
function _array_like_to_array(arr, len) {
|
795
|
+
if (len == null || len > arr.length) len = arr.length;
|
796
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
797
|
+
return arr2;
|
798
|
+
}
|
799
|
+
function _array_without_holes(arr) {
|
800
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
801
|
+
}
|
802
|
+
function _iterable_to_array(iter) {
|
803
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
804
|
+
}
|
805
|
+
function _non_iterable_spread() {
|
806
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
807
|
+
}
|
808
|
+
function _to_consumable_array(arr) {
|
809
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
810
|
+
}
|
811
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
812
|
+
if (!o) return;
|
813
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
814
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
815
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
816
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
817
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
818
|
+
}
|
819
|
+
var tty = require$$0;
|
820
|
+
var util = require$$1;
|
821
|
+
/**
|
822
|
+
* This is the Node.js implementation of `debug()`.
|
823
|
+
*/ exports.init = init;
|
824
|
+
exports.log = log;
|
825
|
+
exports.formatArgs = formatArgs;
|
826
|
+
exports.save = save;
|
827
|
+
exports.load = load;
|
828
|
+
exports.useColors = useColors;
|
829
|
+
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`.');
|
830
|
+
/**
|
831
|
+
* Colors.
|
832
|
+
*/ exports.colors = [
|
833
|
+
6,
|
834
|
+
2,
|
835
|
+
3,
|
836
|
+
4,
|
837
|
+
5,
|
838
|
+
1
|
839
|
+
];
|
840
|
+
try {
|
841
|
+
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
|
842
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
843
|
+
var supportsColor = requireBrowser();
|
844
|
+
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
845
|
+
exports.colors = [
|
846
|
+
20,
|
847
|
+
21,
|
848
|
+
26,
|
849
|
+
27,
|
850
|
+
32,
|
851
|
+
33,
|
852
|
+
38,
|
853
|
+
39,
|
854
|
+
40,
|
855
|
+
41,
|
856
|
+
42,
|
857
|
+
43,
|
858
|
+
44,
|
859
|
+
45,
|
860
|
+
56,
|
861
|
+
57,
|
862
|
+
62,
|
863
|
+
63,
|
864
|
+
68,
|
865
|
+
69,
|
866
|
+
74,
|
867
|
+
75,
|
868
|
+
76,
|
869
|
+
77,
|
870
|
+
78,
|
871
|
+
79,
|
872
|
+
80,
|
873
|
+
81,
|
874
|
+
92,
|
875
|
+
93,
|
876
|
+
98,
|
877
|
+
99,
|
878
|
+
112,
|
879
|
+
113,
|
880
|
+
128,
|
881
|
+
129,
|
882
|
+
134,
|
883
|
+
135,
|
884
|
+
148,
|
885
|
+
149,
|
886
|
+
160,
|
887
|
+
161,
|
888
|
+
162,
|
889
|
+
163,
|
890
|
+
164,
|
891
|
+
165,
|
892
|
+
166,
|
893
|
+
167,
|
894
|
+
168,
|
895
|
+
169,
|
896
|
+
170,
|
897
|
+
171,
|
898
|
+
172,
|
899
|
+
173,
|
900
|
+
178,
|
901
|
+
179,
|
902
|
+
184,
|
903
|
+
185,
|
904
|
+
196,
|
905
|
+
197,
|
906
|
+
198,
|
907
|
+
199,
|
908
|
+
200,
|
909
|
+
201,
|
910
|
+
202,
|
911
|
+
203,
|
912
|
+
204,
|
913
|
+
205,
|
914
|
+
206,
|
915
|
+
207,
|
916
|
+
208,
|
917
|
+
209,
|
918
|
+
214,
|
919
|
+
215,
|
920
|
+
220,
|
921
|
+
221
|
922
|
+
];
|
923
|
+
}
|
924
|
+
} catch (error) {
|
925
|
+
// Swallow - we only care if `supports-color` is available; it doesn't have to be.
|
926
|
+
}
|
927
|
+
/**
|
928
|
+
* Build up the default `inspectOpts` object from the environment variables.
|
929
|
+
*
|
930
|
+
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
931
|
+
*/ exports.inspectOpts = Object.keys(process.env).filter(function(key) {
|
932
|
+
return /^debug_/i.test(key);
|
933
|
+
}).reduce(function(obj, key) {
|
934
|
+
// Camel-case
|
935
|
+
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) {
|
936
|
+
return k.toUpperCase();
|
937
|
+
});
|
938
|
+
// Coerce string value into JS value
|
939
|
+
var val = process.env[key];
|
940
|
+
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
941
|
+
val = true;
|
942
|
+
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
943
|
+
val = false;
|
944
|
+
} else if (val === 'null') {
|
945
|
+
val = null;
|
946
|
+
} else {
|
947
|
+
val = Number(val);
|
948
|
+
}
|
949
|
+
obj[prop] = val;
|
950
|
+
return obj;
|
951
|
+
}, {});
|
952
|
+
/**
|
953
|
+
* Is stdout a TTY? Colored output is enabled when `true`.
|
954
|
+
*/ function useColors() {
|
955
|
+
return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
956
|
+
}
|
957
|
+
/**
|
958
|
+
* Adds ANSI color escape codes if enabled.
|
959
|
+
*
|
960
|
+
* @api public
|
961
|
+
*/ function formatArgs(args) {
|
962
|
+
var _this = this, name = _this.namespace, _$useColors = _this.useColors;
|
963
|
+
if (_$useColors) {
|
964
|
+
var c = this.color;
|
965
|
+
var colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
|
966
|
+
var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1b[0m");
|
967
|
+
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
|
968
|
+
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
|
969
|
+
} else {
|
970
|
+
args[0] = getDate() + name + ' ' + args[0];
|
971
|
+
}
|
972
|
+
}
|
973
|
+
function getDate() {
|
974
|
+
if (exports.inspectOpts.hideDate) {
|
975
|
+
return '';
|
976
|
+
}
|
977
|
+
return new Date().toISOString() + ' ';
|
978
|
+
}
|
979
|
+
/**
|
980
|
+
* Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
|
981
|
+
*/ function log() {
|
982
|
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
983
|
+
args[_key] = arguments[_key];
|
984
|
+
}
|
985
|
+
var _util;
|
986
|
+
return process.stderr.write((_util = util).formatWithOptions.apply(_util, [
|
987
|
+
exports.inspectOpts
|
988
|
+
].concat(_to_consumable_array(args))) + '\n');
|
989
|
+
}
|
990
|
+
/**
|
991
|
+
* Save `namespaces`.
|
992
|
+
*
|
993
|
+
* @param {String} namespaces
|
994
|
+
* @api private
|
995
|
+
*/ function save(namespaces) {
|
996
|
+
if (namespaces) {
|
997
|
+
process.env.DEBUG = namespaces;
|
998
|
+
} else {
|
999
|
+
// If you set a process.env field to null or undefined, it gets cast to the
|
1000
|
+
// string 'null' or 'undefined'. Just delete instead.
|
1001
|
+
delete process.env.DEBUG;
|
1002
|
+
}
|
1003
|
+
}
|
1004
|
+
/**
|
1005
|
+
* Load `namespaces`.
|
1006
|
+
*
|
1007
|
+
* @return {String} returns the previously persisted debug modes
|
1008
|
+
* @api private
|
1009
|
+
*/ function load() {
|
1010
|
+
return process.env.DEBUG;
|
1011
|
+
}
|
1012
|
+
/**
|
1013
|
+
* Init logic for `debug` instances.
|
1014
|
+
*
|
1015
|
+
* Create a new `inspectOpts` object in case `useColors` is set
|
1016
|
+
* differently for a particular `debug` instance.
|
1017
|
+
*/ function init(debug) {
|
1018
|
+
debug.inspectOpts = {};
|
1019
|
+
var keys = Object.keys(exports.inspectOpts);
|
1020
|
+
for(var i = 0; i < keys.length; i++){
|
1021
|
+
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
1022
|
+
}
|
1023
|
+
}
|
1024
|
+
module.exports = requireCommon()(exports);
|
1025
|
+
var formatters = module.exports.formatters;
|
1026
|
+
/**
|
1027
|
+
* Map %o to `util.inspect()`, all on a single line.
|
1028
|
+
*/ formatters.o = function(v) {
|
1029
|
+
this.inspectOpts.colors = this.useColors;
|
1030
|
+
return util.inspect(v, this.inspectOpts).split('\n').map(function(str) {
|
1031
|
+
return str.trim();
|
1032
|
+
}).join(' ');
|
1033
|
+
};
|
1034
|
+
/**
|
1035
|
+
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
1036
|
+
*/ formatters.O = function(v) {
|
1037
|
+
this.inspectOpts.colors = this.useColors;
|
1038
|
+
return util.inspect(v, this.inspectOpts);
|
1039
|
+
};
|
1040
|
+
} (node, node.exports));
|
1041
|
+
return node.exports;
|
1088
1042
|
}
|
1089
|
-
module.exports = common(exports);
|
1090
|
-
var formatters = module.exports.formatters;
|
1091
|
-
/**
|
1092
|
-
* Map %o to `util.inspect()`, all on a single line.
|
1093
|
-
*/ formatters.o = function(v) {
|
1094
|
-
this.inspectOpts.colors = this.useColors;
|
1095
|
-
return util.inspect(v, this.inspectOpts).split("\n").map(function(str) {
|
1096
|
-
return str.trim();
|
1097
|
-
}).join(" ");
|
1098
|
-
};
|
1099
|
-
/**
|
1100
|
-
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
1101
|
-
*/ formatters.O = function(v) {
|
1102
|
-
this.inspectOpts.colors = this.useColors;
|
1103
|
-
return util.inspect(v, this.inspectOpts);
|
1104
|
-
};
|
1105
|
-
}(node, node.exports));
|
1106
1043
|
|
1107
1044
|
/**
|
1108
1045
|
* Detect Electron renderer / nwjs process, which is node, but we should
|
1109
1046
|
* treat as a browser.
|
1110
1047
|
*/
|
1111
1048
|
|
1112
|
-
if (typeof process ===
|
1113
|
-
src.exports =
|
1049
|
+
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
|
1050
|
+
src.exports = requireBrowser$1();
|
1114
1051
|
} else {
|
1115
|
-
src.exports =
|
1052
|
+
src.exports = requireNode();
|
1116
1053
|
}
|
1117
1054
|
|
1118
|
-
var
|
1055
|
+
var srcExports = src.exports;
|
1056
|
+
var debug = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
|
1119
1057
|
|
1120
1058
|
(function (exports) {
|
1121
|
-
var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
};
|
1126
|
-
Object.defineProperty(exports, "__esModule", {
|
1127
|
-
|
1128
|
-
});
|
1129
|
-
var fs_1 = require$$
|
1130
|
-
var debug_1 = __importDefault(
|
1131
|
-
var log = debug_1.default(
|
1132
|
-
function check(path, isFile, isDirectory) {
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
}
|
1155
|
-
/**
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
}
|
1164
|
-
exports.exists = exists;
|
1165
|
-
/**
|
1166
|
-
|
1167
|
-
|
1168
|
-
/**
|
1169
|
-
|
1170
|
-
|
1171
|
-
/**
|
1172
|
-
|
1173
|
-
|
1174
|
-
}(src$1));
|
1059
|
+
var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
|
1060
|
+
return mod && mod.__esModule ? mod : {
|
1061
|
+
"default": mod
|
1062
|
+
};
|
1063
|
+
};
|
1064
|
+
Object.defineProperty(exports, "__esModule", {
|
1065
|
+
value: true
|
1066
|
+
});
|
1067
|
+
var fs_1 = require$$0$1;
|
1068
|
+
var debug_1 = __importDefault(srcExports);
|
1069
|
+
var log = debug_1.default('@kwsites/file-exists');
|
1070
|
+
function check(path, isFile, isDirectory) {
|
1071
|
+
log("checking %s", path);
|
1072
|
+
try {
|
1073
|
+
var stat = fs_1.statSync(path);
|
1074
|
+
if (stat.isFile() && isFile) {
|
1075
|
+
log("[OK] path represents a file");
|
1076
|
+
return true;
|
1077
|
+
}
|
1078
|
+
if (stat.isDirectory() && isDirectory) {
|
1079
|
+
log("[OK] path represents a directory");
|
1080
|
+
return true;
|
1081
|
+
}
|
1082
|
+
log("[FAIL] path represents something other than a file or directory");
|
1083
|
+
return false;
|
1084
|
+
} catch (e) {
|
1085
|
+
if (e.code === 'ENOENT') {
|
1086
|
+
log("[FAIL] path is not accessible: %o", e);
|
1087
|
+
return false;
|
1088
|
+
}
|
1089
|
+
log("[FATAL] %o", e);
|
1090
|
+
throw e;
|
1091
|
+
}
|
1092
|
+
}
|
1093
|
+
/**
|
1094
|
+
* Synchronous validation of a path existing either as a file or as a directory.
|
1095
|
+
*
|
1096
|
+
* @param {string} path The path to check
|
1097
|
+
* @param {number} type One or both of the exported numeric constants
|
1098
|
+
*/ function exists(path) {
|
1099
|
+
var type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : exports.READABLE;
|
1100
|
+
return check(path, (type & exports.FILE) > 0, (type & exports.FOLDER) > 0);
|
1101
|
+
}
|
1102
|
+
exports.exists = exists;
|
1103
|
+
/**
|
1104
|
+
* Constant representing a file
|
1105
|
+
*/ exports.FILE = 1;
|
1106
|
+
/**
|
1107
|
+
* Constant representing a folder
|
1108
|
+
*/ exports.FOLDER = 2;
|
1109
|
+
/**
|
1110
|
+
* Constant representing either a file or a folder
|
1111
|
+
*/ exports.READABLE = exports.FILE + exports.FOLDER;
|
1112
|
+
} (src$1));
|
1175
1113
|
|
1176
1114
|
(function (exports) {
|
1177
|
-
function __export(m) {
|
1178
|
-
|
1179
|
-
}
|
1180
|
-
Object.defineProperty(exports, "__esModule", {
|
1181
|
-
|
1182
|
-
});
|
1183
|
-
__export(src$1);
|
1184
|
-
}(dist$1));
|
1115
|
+
function __export(m) {
|
1116
|
+
for(var p in m)if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
1117
|
+
}
|
1118
|
+
Object.defineProperty(exports, "__esModule", {
|
1119
|
+
value: true
|
1120
|
+
});
|
1121
|
+
__export(src$1);
|
1122
|
+
} (dist$1));
|
1185
1123
|
|
1186
1124
|
var dist = {};
|
1187
1125
|
|
@@ -1198,7 +1136,7 @@ var createDeferred = dist.createDeferred = deferred_1 = dist.deferred = void 0;
|
|
1198
1136
|
*/ function deferred() {
|
1199
1137
|
var done;
|
1200
1138
|
var fail;
|
1201
|
-
var status =
|
1139
|
+
var status = 'pending';
|
1202
1140
|
var promise = new Promise(function(_done, _fail) {
|
1203
1141
|
done = _done;
|
1204
1142
|
fail = _fail;
|
@@ -1206,19 +1144,19 @@ var createDeferred = dist.createDeferred = deferred_1 = dist.deferred = void 0;
|
|
1206
1144
|
return {
|
1207
1145
|
promise: promise,
|
1208
1146
|
done: function done1(result) {
|
1209
|
-
if (status ===
|
1210
|
-
status =
|
1147
|
+
if (status === 'pending') {
|
1148
|
+
status = 'resolved';
|
1211
1149
|
done(result);
|
1212
1150
|
}
|
1213
1151
|
},
|
1214
1152
|
fail: function fail1(error) {
|
1215
|
-
if (status ===
|
1216
|
-
status =
|
1153
|
+
if (status === 'pending') {
|
1154
|
+
status = 'rejected';
|
1217
1155
|
fail(error);
|
1218
1156
|
}
|
1219
1157
|
},
|
1220
1158
|
get fulfilled () {
|
1221
|
-
return status !==
|
1159
|
+
return status !== 'pending';
|
1222
1160
|
},
|
1223
1161
|
get status () {
|
1224
1162
|
return status;
|
@@ -1259,6 +1197,35 @@ function _assert_this_initialized(self) {
|
|
1259
1197
|
}
|
1260
1198
|
return self;
|
1261
1199
|
}
|
1200
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
1201
|
+
try {
|
1202
|
+
var info = gen[key](arg);
|
1203
|
+
var value = info.value;
|
1204
|
+
} catch (error) {
|
1205
|
+
reject(error);
|
1206
|
+
return;
|
1207
|
+
}
|
1208
|
+
if (info.done) {
|
1209
|
+
resolve(value);
|
1210
|
+
} else {
|
1211
|
+
Promise.resolve(value).then(_next, _throw);
|
1212
|
+
}
|
1213
|
+
}
|
1214
|
+
function _async_to_generator(fn) {
|
1215
|
+
return function() {
|
1216
|
+
var self = this, args = arguments;
|
1217
|
+
return new Promise(function(resolve, reject) {
|
1218
|
+
var gen = fn.apply(self, args);
|
1219
|
+
function _next(value) {
|
1220
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
1221
|
+
}
|
1222
|
+
function _throw(err) {
|
1223
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
1224
|
+
}
|
1225
|
+
_next(undefined);
|
1226
|
+
});
|
1227
|
+
};
|
1228
|
+
}
|
1262
1229
|
function _class_call_check(instance, Constructor) {
|
1263
1230
|
if (!(instance instanceof Constructor)) {
|
1264
1231
|
throw new TypeError("Cannot call a class as a function");
|
@@ -1386,6 +1353,40 @@ function _non_iterable_rest() {
|
|
1386
1353
|
function _non_iterable_spread() {
|
1387
1354
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
1388
1355
|
}
|
1356
|
+
function _object_spread(target) {
|
1357
|
+
for(var i = 1; i < arguments.length; i++){
|
1358
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
1359
|
+
var ownKeys = Object.keys(source);
|
1360
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
1361
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
1362
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
1363
|
+
}));
|
1364
|
+
}
|
1365
|
+
ownKeys.forEach(function(key) {
|
1366
|
+
_define_property(target, key, source[key]);
|
1367
|
+
});
|
1368
|
+
}
|
1369
|
+
return target;
|
1370
|
+
}
|
1371
|
+
function ownKeys(object, enumerableOnly) {
|
1372
|
+
var keys = Object.keys(object);
|
1373
|
+
if (Object.getOwnPropertySymbols) {
|
1374
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
1375
|
+
keys.push.apply(keys, symbols);
|
1376
|
+
}
|
1377
|
+
return keys;
|
1378
|
+
}
|
1379
|
+
function _object_spread_props(target, source) {
|
1380
|
+
source = source != null ? source : {};
|
1381
|
+
if (Object.getOwnPropertyDescriptors) {
|
1382
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
1383
|
+
} else {
|
1384
|
+
ownKeys(Object(source)).forEach(function(key) {
|
1385
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
1386
|
+
});
|
1387
|
+
}
|
1388
|
+
return target;
|
1389
|
+
}
|
1389
1390
|
function _possible_constructor_return(self, call) {
|
1390
1391
|
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
1391
1392
|
return call;
|
@@ -1570,48 +1571,9 @@ function _ts_generator(thisArg, body) {
|
|
1570
1571
|
}
|
1571
1572
|
}
|
1572
1573
|
var __defProp = Object.defineProperty;
|
1573
|
-
var __defProps = Object.defineProperties;
|
1574
1574
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
1575
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
1576
1575
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
1577
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
1578
1576
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
1579
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
1580
|
-
var __defNormalProp = function(obj, key, value) {
|
1581
|
-
return key in obj ? __defProp(obj, key, {
|
1582
|
-
enumerable: true,
|
1583
|
-
configurable: true,
|
1584
|
-
writable: true,
|
1585
|
-
value: value
|
1586
|
-
}) : obj[key] = value;
|
1587
|
-
};
|
1588
|
-
var __spreadValues = function(a, b) {
|
1589
|
-
for(var prop in b || (b = {}))if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
1590
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
1591
|
-
if (__getOwnPropSymbols) try {
|
1592
|
-
for(var _iterator = __getOwnPropSymbols(b)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
1593
|
-
var prop = _step.value;
|
1594
|
-
if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
1595
|
-
}
|
1596
|
-
} catch (err) {
|
1597
|
-
_didIteratorError = true;
|
1598
|
-
_iteratorError = err;
|
1599
|
-
} finally{
|
1600
|
-
try {
|
1601
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
1602
|
-
_iterator.return();
|
1603
|
-
}
|
1604
|
-
} finally{
|
1605
|
-
if (_didIteratorError) {
|
1606
|
-
throw _iteratorError;
|
1607
|
-
}
|
1608
|
-
}
|
1609
|
-
}
|
1610
|
-
return a;
|
1611
|
-
};
|
1612
|
-
var __spreadProps = function(a, b) {
|
1613
|
-
return __defProps(a, __getOwnPropDescs(b));
|
1614
|
-
};
|
1615
1577
|
var __esm = function(fn, res) {
|
1616
1578
|
return function __init() {
|
1617
1579
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
@@ -1631,7 +1593,7 @@ var __export = function(target, all) {
|
|
1631
1593
|
});
|
1632
1594
|
};
|
1633
1595
|
var __copyProps = function(to, from, except, desc) {
|
1634
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
1596
|
+
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
1635
1597
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
1636
1598
|
try {
|
1637
1599
|
var _loop = function() {
|
@@ -1666,28 +1628,6 @@ var __toCommonJS = function(mod) {
|
|
1666
1628
|
value: true
|
1667
1629
|
}), mod);
|
1668
1630
|
};
|
1669
|
-
var __async = function(__this, __arguments, generator) {
|
1670
|
-
return new Promise(function(resolve, reject) {
|
1671
|
-
var fulfilled = function(value) {
|
1672
|
-
try {
|
1673
|
-
step(generator.next(value));
|
1674
|
-
} catch (e) {
|
1675
|
-
reject(e);
|
1676
|
-
}
|
1677
|
-
};
|
1678
|
-
var rejected = function(value) {
|
1679
|
-
try {
|
1680
|
-
step(generator.throw(value));
|
1681
|
-
} catch (e) {
|
1682
|
-
reject(e);
|
1683
|
-
}
|
1684
|
-
};
|
1685
|
-
var step = function(x) {
|
1686
|
-
return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
1687
|
-
};
|
1688
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
1689
|
-
});
|
1690
|
-
};
|
1691
1631
|
// src/lib/args/pathspec.ts
|
1692
1632
|
function pathspec() {
|
1693
1633
|
for(var _len = arguments.length, paths = new Array(_len), _key = 0; _key < _len; _key++){
|
@@ -1764,7 +1704,10 @@ var init_task_configuration_error = __esm({
|
|
1764
1704
|
}
|
1765
1705
|
});
|
1766
1706
|
function asFunction(source) {
|
1767
|
-
|
1707
|
+
if (typeof source !== "function") {
|
1708
|
+
return NOOP;
|
1709
|
+
}
|
1710
|
+
return source;
|
1768
1711
|
}
|
1769
1712
|
function isUserFunction(source) {
|
1770
1713
|
return typeof source === "function" && source !== NOOP;
|
@@ -1869,7 +1812,7 @@ function prefixedArray(input, prefix) {
|
|
1869
1812
|
return output;
|
1870
1813
|
}
|
1871
1814
|
function bufferToString(input) {
|
1872
|
-
return (Array.isArray(input) ? Buffer.concat(input) : input).toString("utf-8");
|
1815
|
+
return (Array.isArray(input) ? node_buffer.Buffer.concat(input) : input).toString("utf-8");
|
1873
1816
|
}
|
1874
1817
|
function pick(source, properties) {
|
1875
1818
|
var _Object;
|
@@ -1959,20 +1902,20 @@ var GitOutputStreams;
|
|
1959
1902
|
var init_git_output_streams = __esm({
|
1960
1903
|
"src/lib/utils/git-output-streams.ts": function() {
|
1961
1904
|
GitOutputStreams = /*#__PURE__*/ function() {
|
1962
|
-
function
|
1963
|
-
_class_call_check(this,
|
1905
|
+
function _GitOutputStreams(stdOut, stdErr) {
|
1906
|
+
_class_call_check(this, _GitOutputStreams);
|
1964
1907
|
this.stdOut = stdOut;
|
1965
1908
|
this.stdErr = stdErr;
|
1966
1909
|
}
|
1967
|
-
_create_class(
|
1910
|
+
_create_class(_GitOutputStreams, [
|
1968
1911
|
{
|
1969
1912
|
key: "asStrings",
|
1970
1913
|
value: function asStrings() {
|
1971
|
-
return new
|
1914
|
+
return new _GitOutputStreams(this.stdOut.toString("utf8"), this.stdErr.toString("utf8"));
|
1972
1915
|
}
|
1973
1916
|
}
|
1974
1917
|
]);
|
1975
|
-
return
|
1918
|
+
return _GitOutputStreams;
|
1976
1919
|
}();
|
1977
1920
|
}
|
1978
1921
|
});
|
@@ -2003,6 +1946,7 @@ var init_line_parser = __esm({
|
|
2003
1946
|
}
|
2004
1947
|
_create_class(LineParser, [
|
2005
1948
|
{
|
1949
|
+
// @ts-ignore
|
2006
1950
|
key: "useMatches",
|
2007
1951
|
value: function useMatches(target, match) {
|
2008
1952
|
throw new Error("LineParser:useMatches not implemented");
|
@@ -2075,11 +2019,11 @@ function createInstanceConfig() {
|
|
2075
2019
|
var _Object;
|
2076
2020
|
var baseDir = process.cwd();
|
2077
2021
|
var config = (_Object = Object).assign.apply(_Object, [
|
2078
|
-
|
2022
|
+
_object_spread({
|
2079
2023
|
baseDir: baseDir
|
2080
2024
|
}, defaultOptions)
|
2081
2025
|
].concat(_to_consumable_array(options.filter(function(o) {
|
2082
|
-
return typeof o === "object" && o;
|
2026
|
+
return (typeof o === "undefined" ? "undefined" : _type_of(o)) === "object" && o;
|
2083
2027
|
}))));
|
2084
2028
|
config.baseDir = config.baseDir || baseDir;
|
2085
2029
|
config.trimmed = config.trimmed === true;
|
@@ -2110,6 +2054,32 @@ function appendTaskOptions(options) {
|
|
2110
2054
|
"boolean"
|
2111
2055
|
])) {
|
2112
2056
|
commands2.push(key + "=" + value);
|
2057
|
+
} else if (Array.isArray(value)) {
|
2058
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
2059
|
+
try {
|
2060
|
+
for(var _iterator = value[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
2061
|
+
var v = _step.value;
|
2062
|
+
if (!filterPrimitives(v, [
|
2063
|
+
"string",
|
2064
|
+
"number"
|
2065
|
+
])) {
|
2066
|
+
commands2.push(key + "=" + v);
|
2067
|
+
}
|
2068
|
+
}
|
2069
|
+
} catch (err) {
|
2070
|
+
_didIteratorError = true;
|
2071
|
+
_iteratorError = err;
|
2072
|
+
} finally{
|
2073
|
+
try {
|
2074
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
2075
|
+
_iterator.return();
|
2076
|
+
}
|
2077
|
+
} finally{
|
2078
|
+
if (_didIteratorError) {
|
2079
|
+
throw _iteratorError;
|
2080
|
+
}
|
2081
|
+
}
|
2082
|
+
}
|
2113
2083
|
} else {
|
2114
2084
|
commands2.push(key);
|
2115
2085
|
}
|
@@ -3232,19 +3202,20 @@ var init_git_logger = __esm({
|
|
3232
3202
|
}
|
3233
3203
|
});
|
3234
3204
|
// src/lib/runners/tasks-pending-queue.ts
|
3235
|
-
var
|
3205
|
+
var TasksPendingQueue;
|
3236
3206
|
var init_tasks_pending_queue = __esm({
|
3237
3207
|
"src/lib/runners/tasks-pending-queue.ts": function() {
|
3208
|
+
var __TasksPendingQueue;
|
3238
3209
|
init_git_error();
|
3239
3210
|
init_git_logger();
|
3240
|
-
|
3241
|
-
function
|
3211
|
+
TasksPendingQueue = (__TasksPendingQueue = /*#__PURE__*/ function() {
|
3212
|
+
function _TasksPendingQueue() {
|
3242
3213
|
var logLabel = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "GitExecutor";
|
3243
|
-
_class_call_check(this,
|
3214
|
+
_class_call_check(this, _TasksPendingQueue);
|
3244
3215
|
this.logLabel = logLabel;
|
3245
3216
|
this._queue = /* @__PURE__ */ new Map();
|
3246
3217
|
}
|
3247
|
-
_create_class(
|
3218
|
+
_create_class(_TasksPendingQueue, [
|
3248
3219
|
{
|
3249
3220
|
key: "withProgress",
|
3250
3221
|
value: function withProgress(task) {
|
@@ -3335,10 +3306,8 @@ var init_tasks_pending_queue = __esm({
|
|
3335
3306
|
}
|
3336
3307
|
}
|
3337
3308
|
]);
|
3338
|
-
return
|
3339
|
-
}();
|
3340
|
-
TasksPendingQueue = _TasksPendingQueue;
|
3341
|
-
TasksPendingQueue.counter = 0;
|
3309
|
+
return _TasksPendingQueue;
|
3310
|
+
}(), __TasksPendingQueue.counter = 0, __TasksPendingQueue);
|
3342
3311
|
}
|
3343
3312
|
});
|
3344
3313
|
function pluginContext(task, commands) {
|
@@ -3417,15 +3386,15 @@ var init_git_executor_chain = __esm({
|
|
3417
3386
|
{
|
3418
3387
|
key: "attemptTask",
|
3419
3388
|
value: function attemptTask(task) {
|
3420
|
-
|
3421
|
-
|
3389
|
+
var _this = this;
|
3390
|
+
return _async_to_generator(function() {
|
3391
|
+
var onScheduleComplete, onQueueComplete, logger, e;
|
3422
3392
|
return _ts_generator(this, function(_state) {
|
3423
3393
|
switch(_state.label){
|
3424
3394
|
case 0:
|
3425
|
-
_this = this;
|
3426
3395
|
return [
|
3427
3396
|
4,
|
3428
|
-
|
3397
|
+
_this._scheduler.next()
|
3429
3398
|
];
|
3430
3399
|
case 1:
|
3431
3400
|
onScheduleComplete = _state.sent();
|
@@ -3440,10 +3409,10 @@ var init_git_executor_chain = __esm({
|
|
3440
3409
|
5,
|
3441
3410
|
6
|
3442
3411
|
]);
|
3443
|
-
logger =
|
3412
|
+
logger = _this._queue.attempt(task).logger;
|
3444
3413
|
return [
|
3445
3414
|
4,
|
3446
|
-
isEmptyTask(task) ?
|
3415
|
+
isEmptyTask(task) ? _this.attemptEmptyTask(task, logger) : _this.attemptRemoteTask(task, logger)
|
3447
3416
|
];
|
3448
3417
|
case 3:
|
3449
3418
|
return [
|
@@ -3452,7 +3421,7 @@ var init_git_executor_chain = __esm({
|
|
3452
3421
|
];
|
3453
3422
|
case 4:
|
3454
3423
|
e = _state.sent();
|
3455
|
-
throw
|
3424
|
+
throw _this.onFatalException(task, e);
|
3456
3425
|
case 5:
|
3457
3426
|
onQueueComplete();
|
3458
3427
|
onScheduleComplete();
|
@@ -3465,7 +3434,7 @@ var init_git_executor_chain = __esm({
|
|
3465
3434
|
];
|
3466
3435
|
}
|
3467
3436
|
});
|
3468
|
-
});
|
3437
|
+
})();
|
3469
3438
|
}
|
3470
3439
|
},
|
3471
3440
|
{
|
@@ -3482,22 +3451,23 @@ var init_git_executor_chain = __esm({
|
|
3482
3451
|
{
|
3483
3452
|
key: "attemptRemoteTask",
|
3484
3453
|
value: function attemptRemoteTask(task, logger) {
|
3485
|
-
|
3454
|
+
var _this = this;
|
3455
|
+
return _async_to_generator(function() {
|
3486
3456
|
var binary, args, raw, outputStreams;
|
3487
3457
|
return _ts_generator(this, function(_state) {
|
3488
3458
|
switch(_state.label){
|
3489
3459
|
case 0:
|
3490
|
-
binary =
|
3491
|
-
args =
|
3460
|
+
binary = _this._plugins.exec("spawn.binary", "", pluginContext(task, task.commands));
|
3461
|
+
args = _this._plugins.exec("spawn.args", _to_consumable_array(task.commands), pluginContext(task, task.commands));
|
3492
3462
|
return [
|
3493
3463
|
4,
|
3494
|
-
|
3464
|
+
_this.gitResponse(task, binary, args, _this.outputHandler, logger.step("SPAWN"))
|
3495
3465
|
];
|
3496
3466
|
case 1:
|
3497
3467
|
raw = _state.sent();
|
3498
3468
|
return [
|
3499
3469
|
4,
|
3500
|
-
|
3470
|
+
_this.handleTaskData(task, args, raw, logger.step("HANDLE"))
|
3501
3471
|
];
|
3502
3472
|
case 2:
|
3503
3473
|
outputStreams = _state.sent();
|
@@ -3514,21 +3484,22 @@ var init_git_executor_chain = __esm({
|
|
3514
3484
|
];
|
3515
3485
|
}
|
3516
3486
|
});
|
3517
|
-
});
|
3487
|
+
})();
|
3518
3488
|
}
|
3519
3489
|
},
|
3520
3490
|
{
|
3521
3491
|
key: "attemptEmptyTask",
|
3522
3492
|
value: function attemptEmptyTask(task, logger) {
|
3523
|
-
|
3493
|
+
var _this = this;
|
3494
|
+
return _async_to_generator(function() {
|
3524
3495
|
return _ts_generator(this, function(_state) {
|
3525
3496
|
logger("empty task bypassing child process to call to task's parser");
|
3526
3497
|
return [
|
3527
3498
|
2,
|
3528
|
-
task.parser(
|
3499
|
+
task.parser(_this)
|
3529
3500
|
];
|
3530
3501
|
});
|
3531
|
-
});
|
3502
|
+
})();
|
3532
3503
|
}
|
3533
3504
|
},
|
3534
3505
|
{
|
@@ -3540,7 +3511,7 @@ var init_git_executor_chain = __esm({
|
|
3540
3511
|
logger("Preparing to handle process response exitCode=%d stdOut=", exitCode);
|
3541
3512
|
var error = _this._plugins.exec("task.error", {
|
3542
3513
|
error: rejection
|
3543
|
-
},
|
3514
|
+
}, _object_spread({}, pluginContext(task, args), result)).error;
|
3544
3515
|
if (error && task.onError) {
|
3545
3516
|
logger.info("exitCode=%s handling with custom error handler");
|
3546
3517
|
return task.onError(result, error, function(newStdOut) {
|
@@ -3561,14 +3532,14 @@ var init_git_executor_chain = __esm({
|
|
3561
3532
|
{
|
3562
3533
|
key: "gitResponse",
|
3563
3534
|
value: function gitResponse(task, command, args, outputHandler, logger) {
|
3564
|
-
|
3565
|
-
|
3535
|
+
var _this = this;
|
3536
|
+
return _async_to_generator(function() {
|
3537
|
+
var outputLogger, spawnOptions;
|
3566
3538
|
return _ts_generator(this, function(_state) {
|
3567
|
-
_this = this;
|
3568
3539
|
outputLogger = logger.sibling("output");
|
3569
|
-
spawnOptions =
|
3570
|
-
cwd:
|
3571
|
-
env:
|
3540
|
+
spawnOptions = _this._plugins.exec("spawn.options", {
|
3541
|
+
cwd: _this.cwd,
|
3542
|
+
env: _this.env,
|
3572
3543
|
windowsHide: true
|
3573
3544
|
}, pluginContext(task, task.commands));
|
3574
3545
|
return [
|
@@ -3587,7 +3558,7 @@ var init_git_executor_chain = __esm({
|
|
3587
3558
|
rejection: rejection
|
3588
3559
|
});
|
3589
3560
|
}
|
3590
|
-
_this._plugins.exec("spawn.before", void 0,
|
3561
|
+
_this._plugins.exec("spawn.before", void 0, _object_spread_props(_object_spread({}, pluginContext(task, args)), {
|
3591
3562
|
kill: function kill(reason) {
|
3592
3563
|
rejection = reason || rejection;
|
3593
3564
|
}
|
@@ -3600,7 +3571,7 @@ var init_git_executor_chain = __esm({
|
|
3600
3571
|
logger("Passing child process stdOut/stdErr to custom outputHandler");
|
3601
3572
|
outputHandler(command, spawned.stdout, spawned.stderr, _to_consumable_array(args));
|
3602
3573
|
}
|
3603
|
-
_this._plugins.exec("spawn.after", void 0,
|
3574
|
+
_this._plugins.exec("spawn.after", void 0, _object_spread_props(_object_spread({}, pluginContext(task, args)), {
|
3604
3575
|
spawned: spawned,
|
3605
3576
|
close: function close(exitCode, reason) {
|
3606
3577
|
done({
|
@@ -3621,14 +3592,14 @@ var init_git_executor_chain = __esm({
|
|
3621
3592
|
})
|
3622
3593
|
];
|
3623
3594
|
});
|
3624
|
-
});
|
3595
|
+
})();
|
3625
3596
|
}
|
3626
3597
|
},
|
3627
3598
|
{
|
3628
3599
|
key: "_beforeSpawn",
|
3629
3600
|
value: function _beforeSpawn(task, args) {
|
3630
3601
|
var rejection;
|
3631
|
-
this._plugins.exec("spawn.before", void 0,
|
3602
|
+
this._plugins.exec("spawn.before", void 0, _object_spread_props(_object_spread({}, pluginContext(task, args)), {
|
3632
3603
|
kill: function kill(reason) {
|
3633
3604
|
rejection = reason || rejection;
|
3634
3605
|
}
|
@@ -3685,7 +3656,7 @@ function taskCallback(task, response) {
|
|
3685
3656
|
callback(null, data);
|
3686
3657
|
};
|
3687
3658
|
var onError2 = function(err) {
|
3688
|
-
if ((err
|
3659
|
+
if ((err === null || err === void 0 ? void 0 : err.task) === task) {
|
3689
3660
|
callback(_instanceof(err, GitResponseError) ? addDeprecationNoticeToError(err) : err, void 0);
|
3690
3661
|
}
|
3691
3662
|
};
|
@@ -4073,8 +4044,8 @@ var init_parse_diff_summary = __esm({
|
|
4073
4044
|
var inserted = /(\d+) i/.exec(summary);
|
4074
4045
|
var deleted = /(\d+) d/.exec(summary);
|
4075
4046
|
result.changed = asNumber(changed);
|
4076
|
-
result.insertions = asNumber(inserted
|
4077
|
-
result.deletions = asNumber(deleted
|
4047
|
+
result.insertions = asNumber(inserted === null || inserted === void 0 ? void 0 : inserted[1]);
|
4048
|
+
result.deletions = asNumber(deleted === null || deleted === void 0 ? void 0 : deleted[1]);
|
4078
4049
|
})
|
4079
4050
|
];
|
4080
4051
|
numStatParser = [
|
@@ -4122,7 +4093,7 @@ var init_parse_diff_summary = __esm({
|
|
4122
4093
|
var _param = _sliced_to_array(param, 5), status = _param[0], similarity = _param[1], from = _param[2]; _param[3]; var to = _param[4];
|
4123
4094
|
result.changed++;
|
4124
4095
|
result.files.push({
|
4125
|
-
file: to
|
4096
|
+
file: to !== null && to !== void 0 ? to : from,
|
4126
4097
|
changes: 0,
|
4127
4098
|
insertions: 0,
|
4128
4099
|
deletions: 0,
|
@@ -4171,9 +4142,9 @@ var init_parse_list_log_summary = __esm({
|
|
4171
4142
|
init_utils();
|
4172
4143
|
init_parse_diff_summary();
|
4173
4144
|
init_log_format();
|
4174
|
-
START_BOUNDARY = "\
|
4175
|
-
COMMIT_BOUNDARY = " \
|
4176
|
-
SPLITTER = " \
|
4145
|
+
START_BOUNDARY = "\xF2\xF2\xF2\xF2\xF2\xF2 ";
|
4146
|
+
COMMIT_BOUNDARY = " \xF2\xF2";
|
4147
|
+
SPLITTER = " \xF2 ";
|
4177
4148
|
defaultFieldNames = [
|
4178
4149
|
"hash",
|
4179
4150
|
"date",
|
@@ -4251,7 +4222,7 @@ function userOptions(input) {
|
|
4251
4222
|
function parseLogOptions() {
|
4252
4223
|
var opt = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, customArgs = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
4253
4224
|
var splitter = filterType(opt.splitter, filterString, SPLITTER);
|
4254
|
-
var format =
|
4225
|
+
var format = filterPlainObject(opt.format) ? opt.format : {
|
4255
4226
|
hash: "%H",
|
4256
4227
|
date: opt.strictDate === false ? "%ai" : "%aI",
|
4257
4228
|
message: "%s",
|
@@ -4700,7 +4671,7 @@ var init_parse_push = __esm({
|
|
4700
4671
|
}),
|
4701
4672
|
new LineParser(/^updating local tracking ref '(.+)'/, function(result, param) {
|
4702
4673
|
var _param = _sliced_to_array(param, 1), local = _param[0];
|
4703
|
-
result.ref =
|
4674
|
+
result.ref = _object_spread_props(_object_spread({}, result.ref || {}), {
|
4704
4675
|
local: local
|
4705
4676
|
});
|
4706
4677
|
}),
|
@@ -4710,7 +4681,7 @@ var init_parse_push = __esm({
|
|
4710
4681
|
}),
|
4711
4682
|
new LineParser(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/, function(result, param) {
|
4712
4683
|
var _param = _sliced_to_array(param, 3), local = _param[0], remote = _param[1], remoteName = _param[2];
|
4713
|
-
result.branch =
|
4684
|
+
result.branch = _object_spread_props(_object_spread({}, result.branch || {}), {
|
4714
4685
|
local: local,
|
4715
4686
|
remote: remote,
|
4716
4687
|
remoteName: remoteName
|
@@ -4733,7 +4704,7 @@ var init_parse_push = __esm({
|
|
4733
4704
|
parsePushResult = function(stdOut, stdErr) {
|
4734
4705
|
var pushDetail = parsePushDetail(stdOut, stdErr);
|
4735
4706
|
var responseDetail = parseRemoteMessages(stdOut, stdErr);
|
4736
|
-
return
|
4707
|
+
return _object_spread({}, pushDetail, responseDetail);
|
4737
4708
|
};
|
4738
4709
|
parsePushDetail = function(stdOut, stdErr) {
|
4739
4710
|
return parseStringResponse({
|
@@ -5146,7 +5117,7 @@ var init_simple_git_api = __esm({
|
|
5146
5117
|
if (typeof directory === "string") {
|
5147
5118
|
return this._runTask(changeWorkingDirectoryTask(directory, this._executor), next);
|
5148
5119
|
}
|
5149
|
-
if (typeof (directory
|
5120
|
+
if (typeof (directory === null || directory === void 0 ? void 0 : directory.path) === "string") {
|
5150
5121
|
return this._runTask(changeWorkingDirectoryTask(directory.path, directory.root && this._executor || void 0), next);
|
5151
5122
|
}
|
5152
5123
|
return this._runTask(configurationErrorTask("Git.cwd: workingDirectory must be supplied as a string"), next);
|
@@ -5231,7 +5202,7 @@ var init_scheduler = __esm({
|
|
5231
5202
|
"src/lib/runners/scheduler.ts": function() {
|
5232
5203
|
init_utils();
|
5233
5204
|
init_git_logger();
|
5234
|
-
createScheduledTask = function() {
|
5205
|
+
createScheduledTask = /* @__PURE__ */ function() {
|
5235
5206
|
var id = 0;
|
5236
5207
|
return function() {
|
5237
5208
|
id++;
|
@@ -5425,7 +5396,7 @@ var init_parse_branch = __esm({
|
|
5425
5396
|
var _param = _sliced_to_array(param, 4), current = _param[0], name = _param[1], commit = _param[2], label = _param[3];
|
5426
5397
|
result.push(branchStatus(current), true, name, commit, label);
|
5427
5398
|
}),
|
5428
|
-
new LineParser(
|
5399
|
+
new LineParser(RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$", "s"), function(result, param) {
|
5429
5400
|
var _param = _sliced_to_array(param, 4), current = _param[0], name = _param[1], commit = _param[2], label = _param[3];
|
5430
5401
|
result.push(branchStatus(current), false, name, commit, label);
|
5431
5402
|
})
|
@@ -6124,7 +6095,7 @@ var require_git = __commonJS({
|
|
6124
6095
|
return this;
|
6125
6096
|
};
|
6126
6097
|
Git2.prototype.env = function(name, value) {
|
6127
|
-
if (arguments.length === 1 && typeof name === "object") {
|
6098
|
+
if (arguments.length === 1 && (typeof name === "undefined" ? "undefined" : _type_of(name)) === "object") {
|
6128
6099
|
this._executor.env = name;
|
6129
6100
|
} else {
|
6130
6101
|
(this._executor.env = this._executor.env || {})[name] = value;
|
@@ -6524,20 +6495,20 @@ function completionDetectionPlugin() {
|
|
6524
6495
|
}
|
6525
6496
|
return {
|
6526
6497
|
type: "spawn.after",
|
6527
|
-
action: function action(
|
6528
|
-
|
6529
|
-
|
6498
|
+
action: function action(_data, param) {
|
6499
|
+
var spawned = param.spawned, close = param.close;
|
6500
|
+
return _async_to_generator(function() {
|
6501
|
+
var _spawned_stdout, _spawned_stderr, events, deferClose, quickClose, err;
|
6530
6502
|
return _ts_generator(this, function(_state) {
|
6531
6503
|
switch(_state.label){
|
6532
6504
|
case 0:
|
6533
|
-
spawned = param.spawned, close = param.close;
|
6534
6505
|
events = createEvents();
|
6535
6506
|
deferClose = true;
|
6536
6507
|
quickClose = function() {
|
6537
6508
|
return void (deferClose = false);
|
6538
6509
|
};
|
6539
|
-
(
|
6540
|
-
(
|
6510
|
+
(_spawned_stdout = spawned.stdout) === null || _spawned_stdout === void 0 ? void 0 : _spawned_stdout.on("data", quickClose);
|
6511
|
+
(_spawned_stderr = spawned.stderr) === null || _spawned_stderr === void 0 ? void 0 : _spawned_stderr.on("data", quickClose);
|
6541
6512
|
spawned.on("error", quickClose);
|
6542
6513
|
spawned.on("close", function(code) {
|
6543
6514
|
return events.close(code);
|
@@ -6589,7 +6560,7 @@ function completionDetectionPlugin() {
|
|
6589
6560
|
];
|
6590
6561
|
}
|
6591
6562
|
});
|
6592
|
-
});
|
6563
|
+
})();
|
6593
6564
|
}
|
6594
6565
|
};
|
6595
6566
|
}
|
@@ -6768,11 +6739,11 @@ function progressMonitorPlugin(progress) {
|
|
6768
6739
|
var onProgress = {
|
6769
6740
|
type: "spawn.after",
|
6770
6741
|
action: function action(_data, context) {
|
6771
|
-
var
|
6742
|
+
var _context_spawned_stderr;
|
6772
6743
|
if (!context.commands.includes(progressCommand)) {
|
6773
6744
|
return;
|
6774
6745
|
}
|
6775
|
-
(
|
6746
|
+
(_context_spawned_stderr = context.spawned.stderr) === null || _context_spawned_stderr === void 0 ? void 0 : _context_spawned_stderr.on("data", function(chunk) {
|
6776
6747
|
var message = /^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(chunk.toString("utf8"));
|
6777
6748
|
if (!message) {
|
6778
6749
|
return;
|
@@ -6814,7 +6785,7 @@ function spawnOptionsPlugin(spawnOptions) {
|
|
6814
6785
|
return {
|
6815
6786
|
type: "spawn.options",
|
6816
6787
|
action: function action(data) {
|
6817
|
-
return
|
6788
|
+
return _object_spread({}, options, data);
|
6818
6789
|
}
|
6819
6790
|
};
|
6820
6791
|
}
|
@@ -6825,16 +6796,16 @@ function timeoutPlugin(param) {
|
|
6825
6796
|
return {
|
6826
6797
|
type: "spawn.after",
|
6827
6798
|
action: function action(_data, context) {
|
6828
|
-
var
|
6799
|
+
var _context_spawned_stdout, _context_spawned_stderr;
|
6829
6800
|
var timeout;
|
6830
6801
|
function wait() {
|
6831
6802
|
timeout && clearTimeout(timeout);
|
6832
6803
|
timeout = setTimeout(kill, block);
|
6833
6804
|
}
|
6834
6805
|
function stop() {
|
6835
|
-
var
|
6836
|
-
(
|
6837
|
-
(
|
6806
|
+
var _context_spawned_stdout, _context_spawned_stderr;
|
6807
|
+
(_context_spawned_stdout = context.spawned.stdout) === null || _context_spawned_stdout === void 0 ? void 0 : _context_spawned_stdout.off("data", wait);
|
6808
|
+
(_context_spawned_stderr = context.spawned.stderr) === null || _context_spawned_stderr === void 0 ? void 0 : _context_spawned_stderr.off("data", wait);
|
6838
6809
|
context.spawned.off("exit", stop);
|
6839
6810
|
context.spawned.off("close", stop);
|
6840
6811
|
timeout && clearTimeout(timeout);
|
@@ -6843,8 +6814,8 @@ function timeoutPlugin(param) {
|
|
6843
6814
|
stop();
|
6844
6815
|
context.kill(new GitPluginError(void 0, "timeout", "block timeout reached"));
|
6845
6816
|
}
|
6846
|
-
stdOut && ((
|
6847
|
-
stdErr && ((
|
6817
|
+
stdOut && ((_context_spawned_stdout = context.spawned.stdout) === null || _context_spawned_stdout === void 0 ? void 0 : _context_spawned_stdout.on("data", wait));
|
6818
|
+
stdErr && ((_context_spawned_stderr = context.spawned.stderr) === null || _context_spawned_stderr === void 0 ? void 0 : _context_spawned_stderr.on("data", wait));
|
6848
6819
|
context.spawned.on("exit", stop);
|
6849
6820
|
context.spawned.on("close", stop);
|
6850
6821
|
wait();
|
@@ -6888,7 +6859,7 @@ function suffixPathsPlugin() {
|
|
6888
6859
|
init_utils();
|
6889
6860
|
var Git = require_git();
|
6890
6861
|
function gitInstanceFactory(baseDir, options) {
|
6891
|
-
var
|
6862
|
+
var _config_unsafe;
|
6892
6863
|
var plugins = new PluginStore();
|
6893
6864
|
var config = createInstanceConfig(baseDir && (typeof baseDir === "string" ? {
|
6894
6865
|
baseDir: baseDir
|
@@ -6908,7 +6879,7 @@ function gitInstanceFactory(baseDir, options) {
|
|
6908
6879
|
config.spawnOptions && plugins.add(spawnOptionsPlugin(config.spawnOptions));
|
6909
6880
|
plugins.add(errorDetectionPlugin(errorDetectionHandler(true)));
|
6910
6881
|
config.errors && plugins.add(errorDetectionPlugin(config.errors));
|
6911
|
-
customBinaryPlugin(plugins, config.binary, (
|
6882
|
+
customBinaryPlugin(plugins, config.binary, (_config_unsafe = config.unsafe) === null || _config_unsafe === void 0 ? void 0 : _config_unsafe.allowUnsafeCustomBinary);
|
6912
6883
|
return new Git(config, plugins);
|
6913
6884
|
}
|
6914
6885
|
// src/lib/runners/promise-wrapped.ts
|