@digipair/skill-git 0.22.2 → 0.23.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/index.cjs.js +192 -999
  2. package/index.esm.js +188 -996
  3. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import require$$0$1 from 'fs';
2
- import require$$0 from 'tty';
3
- import require$$1 from 'util';
2
+ import require$$1 from 'tty';
3
+ import require$$1$1 from 'util';
4
+ import require$$0 from 'os';
4
5
  import { spawn } from 'child_process';
5
6
  import { EventEmitter } from 'node:events';
6
7
 
@@ -8,997 +9,7 @@ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof win
8
9
 
9
10
  var dist$1 = {};
10
11
 
11
- var src$2 = {};
12
-
13
- var src$1 = {
14
- exports: {}
15
- };
16
-
17
- var browser$2 = {
18
- exports: {}
19
- };
20
-
21
- /**
22
- * Helpers.
23
- */
24
-
25
- function _type_of$2(obj) {
26
- "@swc/helpers - typeof";
27
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
28
- }
29
- var s$1 = 1000;
30
- var m$1 = s$1 * 60;
31
- var h$1 = m$1 * 60;
32
- var d$1 = h$1 * 24;
33
- var w$1 = d$1 * 7;
34
- var y$1 = d$1 * 365.25;
35
- /**
36
- * Parse or format the given `val`.
37
- *
38
- * Options:
39
- *
40
- * - `long` verbose formatting [false]
41
- *
42
- * @param {String|Number} val
43
- * @param {Object} [options]
44
- * @throws {Error} throw an error if val is not a non-empty string or a number
45
- * @return {String|Number}
46
- * @api public
47
- */ var ms$1 = function(val, options) {
48
- options = options || {};
49
- var type = typeof val === "undefined" ? "undefined" : _type_of$2(val);
50
- if (type === "string" && val.length > 0) {
51
- return parse$1(val);
52
- } else if (type === "number" && isFinite(val)) {
53
- return options.long ? fmtLong$1(val) : fmtShort$1(val);
54
- }
55
- throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
56
- };
57
- /**
58
- * Parse the given `str` and return milliseconds.
59
- *
60
- * @param {String} str
61
- * @return {Number}
62
- * @api private
63
- */ function parse$1(str) {
64
- str = String(str);
65
- if (str.length > 100) {
66
- return;
67
- }
68
- 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);
69
- if (!match) {
70
- return;
71
- }
72
- var n = parseFloat(match[1]);
73
- var type = (match[2] || "ms").toLowerCase();
74
- switch(type){
75
- case "years":
76
- case "year":
77
- case "yrs":
78
- case "yr":
79
- case "y":
80
- return n * y$1;
81
- case "weeks":
82
- case "week":
83
- case "w":
84
- return n * w$1;
85
- case "days":
86
- case "day":
87
- case "d":
88
- return n * d$1;
89
- case "hours":
90
- case "hour":
91
- case "hrs":
92
- case "hr":
93
- case "h":
94
- return n * h$1;
95
- case "minutes":
96
- case "minute":
97
- case "mins":
98
- case "min":
99
- case "m":
100
- return n * m$1;
101
- case "seconds":
102
- case "second":
103
- case "secs":
104
- case "sec":
105
- case "s":
106
- return n * s$1;
107
- case "milliseconds":
108
- case "millisecond":
109
- case "msecs":
110
- case "msec":
111
- case "ms":
112
- return n;
113
- default:
114
- return undefined;
115
- }
116
- }
117
- /**
118
- * Short format for `ms`.
119
- *
120
- * @param {Number} ms
121
- * @return {String}
122
- * @api private
123
- */ function fmtShort$1(ms) {
124
- var msAbs = Math.abs(ms);
125
- if (msAbs >= d$1) {
126
- return Math.round(ms / d$1) + "d";
127
- }
128
- if (msAbs >= h$1) {
129
- return Math.round(ms / h$1) + "h";
130
- }
131
- if (msAbs >= m$1) {
132
- return Math.round(ms / m$1) + "m";
133
- }
134
- if (msAbs >= s$1) {
135
- return Math.round(ms / s$1) + "s";
136
- }
137
- return ms + "ms";
138
- }
139
- /**
140
- * Long format for `ms`.
141
- *
142
- * @param {Number} ms
143
- * @return {String}
144
- * @api private
145
- */ function fmtLong$1(ms) {
146
- var msAbs = Math.abs(ms);
147
- if (msAbs >= d$1) {
148
- return plural$1(ms, msAbs, d$1, "day");
149
- }
150
- if (msAbs >= h$1) {
151
- return plural$1(ms, msAbs, h$1, "hour");
152
- }
153
- if (msAbs >= m$1) {
154
- return plural$1(ms, msAbs, m$1, "minute");
155
- }
156
- if (msAbs >= s$1) {
157
- return plural$1(ms, msAbs, s$1, "second");
158
- }
159
- return ms + " ms";
160
- }
161
- /**
162
- * Pluralization helper.
163
- */ function plural$1(ms, msAbs, n, name) {
164
- var isPlural = msAbs >= n * 1.5;
165
- return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
166
- }
167
-
168
- /**
169
- * This is the common logic for both the Node.js and web browser
170
- * implementations of `debug()`.
171
- */
172
-
173
- function _array_like_to_array$2(arr, len) {
174
- if (len == null || len > arr.length) len = arr.length;
175
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
176
- return arr2;
177
- }
178
- function _array_without_holes$2(arr) {
179
- if (Array.isArray(arr)) return _array_like_to_array$2(arr);
180
- }
181
- function _instanceof$2(left, right) {
182
- if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
183
- return !!right[Symbol.hasInstance](left);
184
- } else {
185
- return left instanceof right;
186
- }
187
- }
188
- function _iterable_to_array$2(iter) {
189
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
190
- }
191
- function _non_iterable_spread$2() {
192
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
193
- }
194
- function _to_consumable_array$2(arr) {
195
- return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$2();
196
- }
197
- function _unsupported_iterable_to_array$2(o, minLen) {
198
- if (!o) return;
199
- if (typeof o === "string") return _array_like_to_array$2(o, minLen);
200
- var n = Object.prototype.toString.call(o).slice(8, -1);
201
- if (n === "Object" && o.constructor) n = o.constructor.name;
202
- if (n === "Map" || n === "Set") return Array.from(n);
203
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
204
- }
205
- function setup$1(env) {
206
- createDebug.debug = createDebug;
207
- createDebug.default = createDebug;
208
- createDebug.coerce = coerce;
209
- createDebug.disable = disable;
210
- createDebug.enable = enable;
211
- createDebug.enabled = enabled;
212
- createDebug.humanize = ms$1;
213
- createDebug.destroy = destroy;
214
- Object.keys(env).forEach(function(key) {
215
- createDebug[key] = env[key];
216
- });
217
- /**
218
- * The currently active debug mode names, and names to skip.
219
- */ createDebug.names = [];
220
- createDebug.skips = [];
221
- /**
222
- * Map of special "%n" handling functions, for the debug "format" argument.
223
- *
224
- * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
225
- */ createDebug.formatters = {};
226
- /**
227
- * Selects a color for a debug namespace
228
- * @param {String} namespace The namespace string for the debug instance to be colored
229
- * @return {Number|String} An ANSI color code for the given namespace
230
- * @api private
231
- */ function selectColor(namespace) {
232
- var hash = 0;
233
- for(var i = 0; i < namespace.length; i++){
234
- hash = (hash << 5) - hash + namespace.charCodeAt(i);
235
- hash |= 0; // Convert to 32bit integer
236
- }
237
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
238
- }
239
- createDebug.selectColor = selectColor;
240
- /**
241
- * Create a debugger with the given `namespace`.
242
- *
243
- * @param {String} namespace
244
- * @return {Function}
245
- * @api public
246
- */ function createDebug(namespace) {
247
- var prevTime;
248
- var enableOverride = null;
249
- var namespacesCache;
250
- var enabledCache;
251
- function debug() {
252
- for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
253
- args[_key] = arguments[_key];
254
- }
255
- // Disabled?
256
- if (!debug.enabled) {
257
- return;
258
- }
259
- var self = debug;
260
- // Set `diff` timestamp
261
- var curr = Number(new Date());
262
- var ms = curr - (prevTime || curr);
263
- self.diff = ms;
264
- self.prev = prevTime;
265
- self.curr = curr;
266
- prevTime = curr;
267
- args[0] = createDebug.coerce(args[0]);
268
- if (typeof args[0] !== "string") {
269
- // Anything else let's inspect with %O
270
- args.unshift("%O");
271
- }
272
- // Apply any `formatters` transformations
273
- var index = 0;
274
- args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
275
- // If we encounter an escaped % then don't increase the array index
276
- if (match === "%%") {
277
- return "%";
278
- }
279
- index++;
280
- var formatter = createDebug.formatters[format];
281
- if (typeof formatter === "function") {
282
- var val = args[index];
283
- match = formatter.call(self, val);
284
- // Now we need to remove `args[index]` since it's inlined in the `format`
285
- args.splice(index, 1);
286
- index--;
287
- }
288
- return match;
289
- });
290
- // Apply env-specific formatting (colors, etc.)
291
- createDebug.formatArgs.call(self, args);
292
- var logFn = self.log || createDebug.log;
293
- logFn.apply(self, args);
294
- }
295
- debug.namespace = namespace;
296
- debug.useColors = createDebug.useColors();
297
- debug.color = createDebug.selectColor(namespace);
298
- debug.extend = extend;
299
- debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
300
- Object.defineProperty(debug, "enabled", {
301
- enumerable: true,
302
- configurable: false,
303
- get: function() {
304
- if (enableOverride !== null) {
305
- return enableOverride;
306
- }
307
- if (namespacesCache !== createDebug.namespaces) {
308
- namespacesCache = createDebug.namespaces;
309
- enabledCache = createDebug.enabled(namespace);
310
- }
311
- return enabledCache;
312
- },
313
- set: function(v) {
314
- enableOverride = v;
315
- }
316
- });
317
- // Env-specific initialization logic for debug instances
318
- if (typeof createDebug.init === "function") {
319
- createDebug.init(debug);
320
- }
321
- return debug;
322
- }
323
- function extend(namespace, delimiter) {
324
- var newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
325
- newDebug.log = this.log;
326
- return newDebug;
327
- }
328
- /**
329
- * Enables a debug mode by namespaces. This can include modes
330
- * separated by a colon and wildcards.
331
- *
332
- * @param {String} namespaces
333
- * @api public
334
- */ function enable(namespaces) {
335
- createDebug.save(namespaces);
336
- createDebug.namespaces = namespaces;
337
- createDebug.names = [];
338
- createDebug.skips = [];
339
- var i;
340
- var split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
341
- var len = split.length;
342
- for(i = 0; i < len; i++){
343
- if (!split[i]) {
344
- continue;
345
- }
346
- namespaces = split[i].replace(/\*/g, ".*?");
347
- if (namespaces[0] === "-") {
348
- createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
349
- } else {
350
- createDebug.names.push(new RegExp("^" + namespaces + "$"));
351
- }
352
- }
353
- }
354
- /**
355
- * Disable debug output.
356
- *
357
- * @return {String} namespaces
358
- * @api public
359
- */ function disable() {
360
- var namespaces = _to_consumable_array$2(createDebug.names.map(toNamespace)).concat(_to_consumable_array$2(createDebug.skips.map(toNamespace).map(function(namespace) {
361
- return "-" + namespace;
362
- }))).join(",");
363
- createDebug.enable("");
364
- return namespaces;
365
- }
366
- /**
367
- * Returns true if the given mode name is enabled, false otherwise.
368
- *
369
- * @param {String} name
370
- * @return {Boolean}
371
- * @api public
372
- */ function enabled(name) {
373
- if (name[name.length - 1] === "*") {
374
- return true;
375
- }
376
- var i;
377
- var len;
378
- for(i = 0, len = createDebug.skips.length; i < len; i++){
379
- if (createDebug.skips[i].test(name)) {
380
- return false;
381
- }
382
- }
383
- for(i = 0, len = createDebug.names.length; i < len; i++){
384
- if (createDebug.names[i].test(name)) {
385
- return true;
386
- }
387
- }
388
- return false;
389
- }
390
- /**
391
- * Convert regexp to namespace
392
- *
393
- * @param {RegExp} regxep
394
- * @return {String} namespace
395
- * @api private
396
- */ function toNamespace(regexp) {
397
- return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
398
- }
399
- /**
400
- * Coerce `val`.
401
- *
402
- * @param {Mixed} val
403
- * @return {Mixed}
404
- * @api private
405
- */ function coerce(val) {
406
- if (_instanceof$2(val, Error)) {
407
- return val.stack || val.message;
408
- }
409
- return val;
410
- }
411
- /**
412
- * XXX DO NOT USE. This is a temporary stub function.
413
- * XXX It WILL be removed in the next major release.
414
- */ function destroy() {
415
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
416
- }
417
- createDebug.enable(createDebug.load());
418
- return createDebug;
419
- }
420
- var common$1 = setup$1;
421
-
422
- /* eslint-env browser */
423
-
424
- (function (module, exports) {
425
- /**
426
- * This is the web browser implementation of `debug()`.
427
- */ exports.formatArgs = formatArgs;
428
- exports.save = save;
429
- exports.load = load;
430
- exports.useColors = useColors;
431
- exports.storage = localstorage();
432
- exports.destroy = function() {
433
- var warned = false;
434
- return function() {
435
- if (!warned) {
436
- warned = true;
437
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
438
- }
439
- };
440
- }();
441
- /**
442
- * Colors.
443
- */ exports.colors = [
444
- "#0000CC",
445
- "#0000FF",
446
- "#0033CC",
447
- "#0033FF",
448
- "#0066CC",
449
- "#0066FF",
450
- "#0099CC",
451
- "#0099FF",
452
- "#00CC00",
453
- "#00CC33",
454
- "#00CC66",
455
- "#00CC99",
456
- "#00CCCC",
457
- "#00CCFF",
458
- "#3300CC",
459
- "#3300FF",
460
- "#3333CC",
461
- "#3333FF",
462
- "#3366CC",
463
- "#3366FF",
464
- "#3399CC",
465
- "#3399FF",
466
- "#33CC00",
467
- "#33CC33",
468
- "#33CC66",
469
- "#33CC99",
470
- "#33CCCC",
471
- "#33CCFF",
472
- "#6600CC",
473
- "#6600FF",
474
- "#6633CC",
475
- "#6633FF",
476
- "#66CC00",
477
- "#66CC33",
478
- "#9900CC",
479
- "#9900FF",
480
- "#9933CC",
481
- "#9933FF",
482
- "#99CC00",
483
- "#99CC33",
484
- "#CC0000",
485
- "#CC0033",
486
- "#CC0066",
487
- "#CC0099",
488
- "#CC00CC",
489
- "#CC00FF",
490
- "#CC3300",
491
- "#CC3333",
492
- "#CC3366",
493
- "#CC3399",
494
- "#CC33CC",
495
- "#CC33FF",
496
- "#CC6600",
497
- "#CC6633",
498
- "#CC9900",
499
- "#CC9933",
500
- "#CCCC00",
501
- "#CCCC33",
502
- "#FF0000",
503
- "#FF0033",
504
- "#FF0066",
505
- "#FF0099",
506
- "#FF00CC",
507
- "#FF00FF",
508
- "#FF3300",
509
- "#FF3333",
510
- "#FF3366",
511
- "#FF3399",
512
- "#FF33CC",
513
- "#FF33FF",
514
- "#FF6600",
515
- "#FF6633",
516
- "#FF9900",
517
- "#FF9933",
518
- "#FFCC00",
519
- "#FFCC33"
520
- ];
521
- /**
522
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
523
- * and the Firebug extension (any Firefox version) are known
524
- * to support "%c" CSS customizations.
525
- *
526
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
527
- */ // eslint-disable-next-line complexity
528
- function useColors() {
529
- // NB: In an Electron preload script, document will be defined but not fully
530
- // initialized. Since we know we're in Chrome, we'll just detect this case
531
- // explicitly
532
- if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
533
- return true;
534
- }
535
- // Internet Explorer and Edge do not support colors.
536
- if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
537
- return false;
538
- }
539
- // Is webkit? http://stackoverflow.com/a/16459606/376773
540
- // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
541
- return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
542
- typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
543
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
544
- 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
545
- typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
546
- }
547
- /**
548
- * Colorize log arguments if enabled.
549
- *
550
- * @api public
551
- */ function formatArgs(args) {
552
- args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
553
- if (!this.useColors) {
554
- return;
555
- }
556
- var c = "color: " + this.color;
557
- args.splice(1, 0, c, "color: inherit");
558
- // The final "%c" is somewhat tricky, because there could be other
559
- // arguments passed either before or after the %c, so we need to
560
- // figure out the correct index to insert the CSS into
561
- var index = 0;
562
- var lastC = 0;
563
- args[0].replace(/%[a-zA-Z%]/g, function(match) {
564
- if (match === "%%") {
565
- return;
566
- }
567
- index++;
568
- if (match === "%c") {
569
- // We only are interested in the *last* %c
570
- // (the user may have provided their own)
571
- lastC = index;
572
- }
573
- });
574
- args.splice(lastC, 0, c);
575
- }
576
- /**
577
- * Invokes `console.debug()` when available.
578
- * No-op when `console.debug` is not a "function".
579
- * If `console.debug` is not available, falls back
580
- * to `console.log`.
581
- *
582
- * @api public
583
- */ exports.log = console.debug || console.log || function() {};
584
- /**
585
- * Save `namespaces`.
586
- *
587
- * @param {String} namespaces
588
- * @api private
589
- */ function save(namespaces) {
590
- try {
591
- if (namespaces) {
592
- exports.storage.setItem("debug", namespaces);
593
- } else {
594
- exports.storage.removeItem("debug");
595
- }
596
- } catch (error) {
597
- // Swallow
598
- // XXX (@Qix-) should we be logging these?
599
- }
600
- }
601
- /**
602
- * Load `namespaces`.
603
- *
604
- * @return {String} returns the previously persisted debug modes
605
- * @api private
606
- */ function load() {
607
- var r;
608
- try {
609
- r = exports.storage.getItem("debug");
610
- } catch (error) {
611
- // Swallow
612
- // XXX (@Qix-) should we be logging these?
613
- }
614
- // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
615
- if (!r && typeof process !== "undefined" && "env" in process) {
616
- r = process.env.DEBUG;
617
- }
618
- return r;
619
- }
620
- /**
621
- * Localstorage attempts to return the localstorage.
622
- *
623
- * This is necessary because safari throws
624
- * when a user disables cookies/localstorage
625
- * and you attempt to access it.
626
- *
627
- * @return {LocalStorage}
628
- * @api private
629
- */ function localstorage() {
630
- try {
631
- // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
632
- // The Browser also has localStorage in the global context.
633
- return localStorage;
634
- } catch (error) {
635
- // Swallow
636
- // XXX (@Qix-) should we be logging these?
637
- }
638
- }
639
- module.exports = common$1(exports);
640
- var formatters = module.exports.formatters;
641
- /**
642
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
643
- */ formatters.j = function(v) {
644
- try {
645
- return JSON.stringify(v);
646
- } catch (error) {
647
- return "[UnexpectedJSONParseError]: " + error.message;
648
- }
649
- };
650
- }(browser$2, browser$2.exports));
651
-
652
- var node$1 = {
653
- exports: {}
654
- };
655
-
656
- /* eslint-env browser */
657
- function getChromeVersion() {
658
- var matches = RegExp("(Chrome|Chromium)\\/(?<chromeVersion>\\d+)\\.").exec(navigator.userAgent);
659
- if (!matches) {
660
- return;
661
- }
662
- return Number.parseInt(matches.groups.chromeVersion, 10);
663
- }
664
- var colorSupport = getChromeVersion() >= 69 ? {
665
- level: 1,
666
- hasBasic: true,
667
- has256: false,
668
- has16m: false
669
- } : false;
670
- var browser$1 = {
671
- stdout: colorSupport,
672
- stderr: colorSupport
673
- };
674
-
675
- /**
676
- * Module dependencies.
677
- */
678
-
679
- (function (module, exports) {
680
- function _array_like_to_array(arr, len) {
681
- if (len == null || len > arr.length) len = arr.length;
682
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
683
- return arr2;
684
- }
685
- function _array_without_holes(arr) {
686
- if (Array.isArray(arr)) return _array_like_to_array(arr);
687
- }
688
- function _iterable_to_array(iter) {
689
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
690
- }
691
- function _non_iterable_spread() {
692
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
693
- }
694
- function _to_consumable_array(arr) {
695
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
696
- }
697
- function _unsupported_iterable_to_array(o, minLen) {
698
- if (!o) return;
699
- if (typeof o === "string") return _array_like_to_array(o, minLen);
700
- var n = Object.prototype.toString.call(o).slice(8, -1);
701
- if (n === "Object" && o.constructor) n = o.constructor.name;
702
- if (n === "Map" || n === "Set") return Array.from(n);
703
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
704
- }
705
- var tty = require$$0;
706
- var util = require$$1;
707
- /**
708
- * This is the Node.js implementation of `debug()`.
709
- */ exports.init = init;
710
- exports.log = log;
711
- exports.formatArgs = formatArgs;
712
- exports.save = save;
713
- exports.load = load;
714
- exports.useColors = useColors;
715
- 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`.");
716
- /**
717
- * Colors.
718
- */ exports.colors = [
719
- 6,
720
- 2,
721
- 3,
722
- 4,
723
- 5,
724
- 1
725
- ];
726
- try {
727
- // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
728
- // eslint-disable-next-line import/no-extraneous-dependencies
729
- var supportsColor = browser$1;
730
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
731
- exports.colors = [
732
- 20,
733
- 21,
734
- 26,
735
- 27,
736
- 32,
737
- 33,
738
- 38,
739
- 39,
740
- 40,
741
- 41,
742
- 42,
743
- 43,
744
- 44,
745
- 45,
746
- 56,
747
- 57,
748
- 62,
749
- 63,
750
- 68,
751
- 69,
752
- 74,
753
- 75,
754
- 76,
755
- 77,
756
- 78,
757
- 79,
758
- 80,
759
- 81,
760
- 92,
761
- 93,
762
- 98,
763
- 99,
764
- 112,
765
- 113,
766
- 128,
767
- 129,
768
- 134,
769
- 135,
770
- 148,
771
- 149,
772
- 160,
773
- 161,
774
- 162,
775
- 163,
776
- 164,
777
- 165,
778
- 166,
779
- 167,
780
- 168,
781
- 169,
782
- 170,
783
- 171,
784
- 172,
785
- 173,
786
- 178,
787
- 179,
788
- 184,
789
- 185,
790
- 196,
791
- 197,
792
- 198,
793
- 199,
794
- 200,
795
- 201,
796
- 202,
797
- 203,
798
- 204,
799
- 205,
800
- 206,
801
- 207,
802
- 208,
803
- 209,
804
- 214,
805
- 215,
806
- 220,
807
- 221
808
- ];
809
- }
810
- } catch (error) {
811
- // Swallow - we only care if `supports-color` is available; it doesn't have to be.
812
- }
813
- /**
814
- * Build up the default `inspectOpts` object from the environment variables.
815
- *
816
- * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
817
- */ exports.inspectOpts = Object.keys(process.env).filter(function(key) {
818
- return /^debug_/i.test(key);
819
- }).reduce(function(obj, key) {
820
- // Camel-case
821
- var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) {
822
- return k.toUpperCase();
823
- });
824
- // Coerce string value into JS value
825
- var val = process.env[key];
826
- if (/^(yes|on|true|enabled)$/i.test(val)) {
827
- val = true;
828
- } else if (/^(no|off|false|disabled)$/i.test(val)) {
829
- val = false;
830
- } else if (val === "null") {
831
- val = null;
832
- } else {
833
- val = Number(val);
834
- }
835
- obj[prop] = val;
836
- return obj;
837
- }, {});
838
- /**
839
- * Is stdout a TTY? Colored output is enabled when `true`.
840
- */ function useColors() {
841
- return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
842
- }
843
- /**
844
- * Adds ANSI color escape codes if enabled.
845
- *
846
- * @api public
847
- */ function formatArgs(args) {
848
- var _this = this, name = _this.namespace, _$useColors = _this.useColors;
849
- if (_$useColors) {
850
- var c = this.color;
851
- var colorCode = "\x1b[3" + (c < 8 ? c : "8;5;" + c);
852
- var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1b[0m");
853
- args[0] = prefix + args[0].split("\n").join("\n" + prefix);
854
- args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1b[0m");
855
- } else {
856
- args[0] = getDate() + name + " " + args[0];
857
- }
858
- }
859
- function getDate() {
860
- if (exports.inspectOpts.hideDate) {
861
- return "";
862
- }
863
- return new Date().toISOString() + " ";
864
- }
865
- /**
866
- * Invokes `util.format()` with the specified arguments and writes to stderr.
867
- */ function log() {
868
- for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
869
- args[_key] = arguments[_key];
870
- }
871
- var _util;
872
- return process.stderr.write((_util = util).format.apply(_util, _to_consumable_array(args)) + "\n");
873
- }
874
- /**
875
- * Save `namespaces`.
876
- *
877
- * @param {String} namespaces
878
- * @api private
879
- */ function save(namespaces) {
880
- if (namespaces) {
881
- process.env.DEBUG = namespaces;
882
- } else {
883
- // If you set a process.env field to null or undefined, it gets cast to the
884
- // string 'null' or 'undefined'. Just delete instead.
885
- delete process.env.DEBUG;
886
- }
887
- }
888
- /**
889
- * Load `namespaces`.
890
- *
891
- * @return {String} returns the previously persisted debug modes
892
- * @api private
893
- */ function load() {
894
- return process.env.DEBUG;
895
- }
896
- /**
897
- * Init logic for `debug` instances.
898
- *
899
- * Create a new `inspectOpts` object in case `useColors` is set
900
- * differently for a particular `debug` instance.
901
- */ function init(debug) {
902
- debug.inspectOpts = {};
903
- var keys = Object.keys(exports.inspectOpts);
904
- for(var i = 0; i < keys.length; i++){
905
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
906
- }
907
- }
908
- module.exports = common$1(exports);
909
- var formatters = module.exports.formatters;
910
- /**
911
- * Map %o to `util.inspect()`, all on a single line.
912
- */ formatters.o = function(v) {
913
- this.inspectOpts.colors = this.useColors;
914
- return util.inspect(v, this.inspectOpts).split("\n").map(function(str) {
915
- return str.trim();
916
- }).join(" ");
917
- };
918
- /**
919
- * Map %O to `util.inspect()`, allowing multiple lines if needed.
920
- */ formatters.O = function(v) {
921
- this.inspectOpts.colors = this.useColors;
922
- return util.inspect(v, this.inspectOpts);
923
- };
924
- }(node$1, node$1.exports));
925
-
926
- /**
927
- * Detect Electron renderer / nwjs process, which is node, but we should
928
- * treat as a browser.
929
- */
930
-
931
- if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
932
- src$1.exports = browser$2.exports;
933
- } else {
934
- src$1.exports = node$1.exports;
935
- }
936
-
937
- (function (exports) {
938
- var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
939
- return mod && mod.__esModule ? mod : {
940
- "default": mod
941
- };
942
- };
943
- Object.defineProperty(exports, "__esModule", {
944
- value: true
945
- });
946
- var fs_1 = require$$0$1;
947
- var debug_1 = __importDefault(src$1.exports);
948
- var log = debug_1.default("@kwsites/file-exists");
949
- function check(path, isFile, isDirectory) {
950
- log("checking %s", path);
951
- try {
952
- var stat = fs_1.statSync(path);
953
- if (stat.isFile() && isFile) {
954
- log("[OK] path represents a file");
955
- return true;
956
- }
957
- if (stat.isDirectory() && isDirectory) {
958
- log("[OK] path represents a directory");
959
- return true;
960
- }
961
- log("[FAIL] path represents something other than a file or directory");
962
- return false;
963
- } catch (e) {
964
- if (e.code === "ENOENT") {
965
- log("[FAIL] path is not accessible: %o", e);
966
- return false;
967
- }
968
- log("[FATAL] %o", e);
969
- throw e;
970
- }
971
- }
972
- /**
973
- * Synchronous validation of a path existing either as a file or as a directory.
974
- *
975
- * @param {string} path The path to check
976
- * @param {number} type One or both of the exported numeric constants
977
- */ function exists(path) {
978
- var type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : exports.READABLE;
979
- return check(path, (type & exports.FILE) > 0, (type & exports.FOLDER) > 0);
980
- }
981
- exports.exists = exists;
982
- /**
983
- * Constant representing a file
984
- */ exports.FILE = 1;
985
- /**
986
- * Constant representing a folder
987
- */ exports.FOLDER = 2;
988
- /**
989
- * Constant representing either a file or a folder
990
- */ exports.READABLE = exports.FILE + exports.FOLDER;
991
- }(src$2));
992
-
993
- (function (exports) {
994
- function __export(m) {
995
- for(var p in m)if (!exports.hasOwnProperty(p)) exports[p] = m[p];
996
- }
997
- Object.defineProperty(exports, "__esModule", {
998
- value: true
999
- });
1000
- __export(src$2);
1001
- }(dist$1));
12
+ var src$1 = {};
1002
13
 
1003
14
  var src = {
1004
15
  exports: {}
@@ -1643,6 +654,121 @@ var node = {
1643
654
  exports: {}
1644
655
  };
1645
656
 
657
+ var hasFlag$1 = function(flag) {
658
+ var argv = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : process.argv;
659
+ var prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
660
+ var position = argv.indexOf(prefix + flag);
661
+ var terminatorPosition = argv.indexOf("--");
662
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
663
+ };
664
+
665
+ var os = require$$0;
666
+ var tty = require$$1;
667
+ var hasFlag = hasFlag$1;
668
+ var env = process.env;
669
+ var forceColor;
670
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
671
+ forceColor = 0;
672
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
673
+ forceColor = 1;
674
+ }
675
+ if ("FORCE_COLOR" in env) {
676
+ if (env.FORCE_COLOR === "true") {
677
+ forceColor = 1;
678
+ } else if (env.FORCE_COLOR === "false") {
679
+ forceColor = 0;
680
+ } else {
681
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
682
+ }
683
+ }
684
+ function translateLevel(level) {
685
+ if (level === 0) {
686
+ return false;
687
+ }
688
+ return {
689
+ level: level,
690
+ hasBasic: true,
691
+ has256: level >= 2,
692
+ has16m: level >= 3
693
+ };
694
+ }
695
+ function supportsColor(haveStream, streamIsTTY) {
696
+ if (forceColor === 0) {
697
+ return 0;
698
+ }
699
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
700
+ return 3;
701
+ }
702
+ if (hasFlag("color=256")) {
703
+ return 2;
704
+ }
705
+ if (haveStream && !streamIsTTY && forceColor === undefined) {
706
+ return 0;
707
+ }
708
+ var min = forceColor || 0;
709
+ if (env.TERM === "dumb") {
710
+ return min;
711
+ }
712
+ if (process.platform === "win32") {
713
+ // Windows 10 build 10586 is the first Windows release that supports 256 colors.
714
+ // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
715
+ var osRelease = os.release().split(".");
716
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
717
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
718
+ }
719
+ return 1;
720
+ }
721
+ if ("CI" in env) {
722
+ if ([
723
+ "TRAVIS",
724
+ "CIRCLECI",
725
+ "APPVEYOR",
726
+ "GITLAB_CI",
727
+ "GITHUB_ACTIONS",
728
+ "BUILDKITE"
729
+ ].some(function(sign) {
730
+ return sign in env;
731
+ }) || env.CI_NAME === "codeship") {
732
+ return 1;
733
+ }
734
+ return min;
735
+ }
736
+ if ("TEAMCITY_VERSION" in env) {
737
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
738
+ }
739
+ if (env.COLORTERM === "truecolor") {
740
+ return 3;
741
+ }
742
+ if ("TERM_PROGRAM" in env) {
743
+ var version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
744
+ switch(env.TERM_PROGRAM){
745
+ case "iTerm.app":
746
+ return version >= 3 ? 3 : 2;
747
+ case "Apple_Terminal":
748
+ return 2;
749
+ }
750
+ }
751
+ if (/-256(color)?$/i.test(env.TERM)) {
752
+ return 2;
753
+ }
754
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
755
+ return 1;
756
+ }
757
+ if ("COLORTERM" in env) {
758
+ return 1;
759
+ }
760
+ return min;
761
+ }
762
+ function getSupportLevel(stream) {
763
+ var level = supportsColor(stream, stream && stream.isTTY);
764
+ return translateLevel(level);
765
+ }
766
+ var supportsColor_1 = {
767
+ supportsColor: getSupportLevel,
768
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
769
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
770
+ };
771
+
1646
772
  /**
1647
773
  * Module dependencies.
1648
774
  */
@@ -1673,8 +799,8 @@ function _unsupported_iterable_to_array(o, minLen) {
1673
799
  if (n === "Map" || n === "Set") return Array.from(n);
1674
800
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
1675
801
  }
1676
- var tty = require$$0;
1677
- var util = require$$1;
802
+ var tty = require$$1;
803
+ var util = require$$1$1;
1678
804
  /**
1679
805
  * This is the Node.js implementation of `debug()`.
1680
806
  */ exports.init = init;
@@ -1697,7 +823,7 @@ exports.destroy = util.deprecate(function() {}, "Instance method `debug.destroy(
1697
823
  try {
1698
824
  // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
1699
825
  // eslint-disable-next-line import/no-extraneous-dependencies
1700
- var supportsColor = browser$1;
826
+ var supportsColor = supportsColor_1;
1701
827
  if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
1702
828
  exports.colors = [
1703
829
  20,
@@ -1909,6 +1035,72 @@ if (typeof process === "undefined" || process.type === "renderer" || process.bro
1909
1035
 
1910
1036
  var debug = src.exports;
1911
1037
 
1038
+ (function (exports) {
1039
+ var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
1040
+ return mod && mod.__esModule ? mod : {
1041
+ "default": mod
1042
+ };
1043
+ };
1044
+ Object.defineProperty(exports, "__esModule", {
1045
+ value: true
1046
+ });
1047
+ var fs_1 = require$$0$1;
1048
+ var debug_1 = __importDefault(src.exports);
1049
+ var log = debug_1.default("@kwsites/file-exists");
1050
+ function check(path, isFile, isDirectory) {
1051
+ log("checking %s", path);
1052
+ try {
1053
+ var stat = fs_1.statSync(path);
1054
+ if (stat.isFile() && isFile) {
1055
+ log("[OK] path represents a file");
1056
+ return true;
1057
+ }
1058
+ if (stat.isDirectory() && isDirectory) {
1059
+ log("[OK] path represents a directory");
1060
+ return true;
1061
+ }
1062
+ log("[FAIL] path represents something other than a file or directory");
1063
+ return false;
1064
+ } catch (e) {
1065
+ if (e.code === "ENOENT") {
1066
+ log("[FAIL] path is not accessible: %o", e);
1067
+ return false;
1068
+ }
1069
+ log("[FATAL] %o", e);
1070
+ throw e;
1071
+ }
1072
+ }
1073
+ /**
1074
+ * Synchronous validation of a path existing either as a file or as a directory.
1075
+ *
1076
+ * @param {string} path The path to check
1077
+ * @param {number} type One or both of the exported numeric constants
1078
+ */ function exists(path) {
1079
+ var type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : exports.READABLE;
1080
+ return check(path, (type & exports.FILE) > 0, (type & exports.FOLDER) > 0);
1081
+ }
1082
+ exports.exists = exists;
1083
+ /**
1084
+ * Constant representing a file
1085
+ */ exports.FILE = 1;
1086
+ /**
1087
+ * Constant representing a folder
1088
+ */ exports.FOLDER = 2;
1089
+ /**
1090
+ * Constant representing either a file or a folder
1091
+ */ exports.READABLE = exports.FILE + exports.FOLDER;
1092
+ }(src$1));
1093
+
1094
+ (function (exports) {
1095
+ function __export(m) {
1096
+ for(var p in m)if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1097
+ }
1098
+ Object.defineProperty(exports, "__esModule", {
1099
+ value: true
1100
+ });
1101
+ __export(src$1);
1102
+ }(dist$1));
1103
+
1912
1104
  var dist = {};
1913
1105
 
1914
1106
  Object.defineProperty(dist, "__esModule", {