@digipair/skill-git 0.8.37 → 0.8.41

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.
Files changed (3) hide show
  1. package/index.cjs.js +1180 -220
  2. package/index.esm.js +1177 -217
  3. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
- import require$$0$1 from 'fs';
2
- import require$$1 from 'tty';
3
- import require$$1$1 from 'util';
4
- import require$$0 from 'os';
1
+ import require$$0$2 from 'fs';
2
+ import require$$0 from 'tty';
3
+ import require$$1 from 'util';
4
+ import require$$0$1 from 'os';
5
5
  import { spawn } from 'child_process';
6
6
  import { EventEmitter } from 'node:events';
7
7
 
@@ -9,7 +9,1093 @@ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof win
9
9
 
10
10
  var dist$1 = {};
11
11
 
12
- var src$1 = {};
12
+ var src$2 = {};
13
+
14
+ var src$1 = {
15
+ exports: {}
16
+ };
17
+
18
+ var browser$1 = {
19
+ exports: {}
20
+ };
21
+
22
+ /**
23
+ * Helpers.
24
+ */
25
+
26
+ function _type_of$2(obj) {
27
+ "@swc/helpers - typeof";
28
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
29
+ }
30
+ var s$1 = 1000;
31
+ var m$1 = s$1 * 60;
32
+ var h$1 = m$1 * 60;
33
+ var d$1 = h$1 * 24;
34
+ var w$1 = d$1 * 7;
35
+ var y$1 = d$1 * 365.25;
36
+ /**
37
+ * Parse or format the given `val`.
38
+ *
39
+ * Options:
40
+ *
41
+ * - `long` verbose formatting [false]
42
+ *
43
+ * @param {String|Number} val
44
+ * @param {Object} [options]
45
+ * @throws {Error} throw an error if val is not a non-empty string or a number
46
+ * @return {String|Number}
47
+ * @api public
48
+ */ var ms$1 = function(val, options) {
49
+ options = options || {};
50
+ var type = typeof val === "undefined" ? "undefined" : _type_of$2(val);
51
+ if (type === "string" && val.length > 0) {
52
+ return parse$1(val);
53
+ } else if (type === "number" && isFinite(val)) {
54
+ return options.long ? fmtLong$1(val) : fmtShort$1(val);
55
+ }
56
+ throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
57
+ };
58
+ /**
59
+ * Parse the given `str` and return milliseconds.
60
+ *
61
+ * @param {String} str
62
+ * @return {Number}
63
+ * @api private
64
+ */ function parse$1(str) {
65
+ str = String(str);
66
+ if (str.length > 100) {
67
+ return;
68
+ }
69
+ 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);
70
+ if (!match) {
71
+ return;
72
+ }
73
+ var n = parseFloat(match[1]);
74
+ var type = (match[2] || "ms").toLowerCase();
75
+ switch(type){
76
+ case "years":
77
+ case "year":
78
+ case "yrs":
79
+ case "yr":
80
+ case "y":
81
+ return n * y$1;
82
+ case "weeks":
83
+ case "week":
84
+ case "w":
85
+ return n * w$1;
86
+ case "days":
87
+ case "day":
88
+ case "d":
89
+ return n * d$1;
90
+ case "hours":
91
+ case "hour":
92
+ case "hrs":
93
+ case "hr":
94
+ case "h":
95
+ return n * h$1;
96
+ case "minutes":
97
+ case "minute":
98
+ case "mins":
99
+ case "min":
100
+ case "m":
101
+ return n * m$1;
102
+ case "seconds":
103
+ case "second":
104
+ case "secs":
105
+ case "sec":
106
+ case "s":
107
+ return n * s$1;
108
+ case "milliseconds":
109
+ case "millisecond":
110
+ case "msecs":
111
+ case "msec":
112
+ case "ms":
113
+ return n;
114
+ default:
115
+ return undefined;
116
+ }
117
+ }
118
+ /**
119
+ * Short format for `ms`.
120
+ *
121
+ * @param {Number} ms
122
+ * @return {String}
123
+ * @api private
124
+ */ function fmtShort$1(ms) {
125
+ var msAbs = Math.abs(ms);
126
+ if (msAbs >= d$1) {
127
+ return Math.round(ms / d$1) + "d";
128
+ }
129
+ if (msAbs >= h$1) {
130
+ return Math.round(ms / h$1) + "h";
131
+ }
132
+ if (msAbs >= m$1) {
133
+ return Math.round(ms / m$1) + "m";
134
+ }
135
+ if (msAbs >= s$1) {
136
+ return Math.round(ms / s$1) + "s";
137
+ }
138
+ return ms + "ms";
139
+ }
140
+ /**
141
+ * Long format for `ms`.
142
+ *
143
+ * @param {Number} ms
144
+ * @return {String}
145
+ * @api private
146
+ */ function fmtLong$1(ms) {
147
+ var msAbs = Math.abs(ms);
148
+ if (msAbs >= d$1) {
149
+ return plural$1(ms, msAbs, d$1, "day");
150
+ }
151
+ if (msAbs >= h$1) {
152
+ return plural$1(ms, msAbs, h$1, "hour");
153
+ }
154
+ if (msAbs >= m$1) {
155
+ return plural$1(ms, msAbs, m$1, "minute");
156
+ }
157
+ if (msAbs >= s$1) {
158
+ return plural$1(ms, msAbs, s$1, "second");
159
+ }
160
+ return ms + " ms";
161
+ }
162
+ /**
163
+ * Pluralization helper.
164
+ */ function plural$1(ms, msAbs, n, name) {
165
+ var isPlural = msAbs >= n * 1.5;
166
+ return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
167
+ }
168
+
169
+ /**
170
+ * This is the common logic for both the Node.js and web browser
171
+ * implementations of `debug()`.
172
+ */
173
+
174
+ function _array_like_to_array$2(arr, len) {
175
+ if (len == null || len > arr.length) len = arr.length;
176
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
177
+ return arr2;
178
+ }
179
+ function _array_without_holes$2(arr) {
180
+ if (Array.isArray(arr)) return _array_like_to_array$2(arr);
181
+ }
182
+ function _instanceof$2(left, right) {
183
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
184
+ return !!right[Symbol.hasInstance](left);
185
+ } else {
186
+ return left instanceof right;
187
+ }
188
+ }
189
+ function _iterable_to_array$2(iter) {
190
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
191
+ }
192
+ function _non_iterable_spread$2() {
193
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
194
+ }
195
+ function _to_consumable_array$2(arr) {
196
+ return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$2();
197
+ }
198
+ function _unsupported_iterable_to_array$2(o, minLen) {
199
+ if (!o) return;
200
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
201
+ var n = Object.prototype.toString.call(o).slice(8, -1);
202
+ if (n === "Object" && o.constructor) n = o.constructor.name;
203
+ if (n === "Map" || n === "Set") return Array.from(n);
204
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
205
+ }
206
+ function setup$1(env) {
207
+ createDebug.debug = createDebug;
208
+ createDebug.default = createDebug;
209
+ createDebug.coerce = coerce;
210
+ createDebug.disable = disable;
211
+ createDebug.enable = enable;
212
+ createDebug.enabled = enabled;
213
+ createDebug.humanize = ms$1;
214
+ createDebug.destroy = destroy;
215
+ Object.keys(env).forEach(function(key) {
216
+ createDebug[key] = env[key];
217
+ });
218
+ /**
219
+ * The currently active debug mode names, and names to skip.
220
+ */ createDebug.names = [];
221
+ createDebug.skips = [];
222
+ /**
223
+ * Map of special "%n" handling functions, for the debug "format" argument.
224
+ *
225
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
226
+ */ createDebug.formatters = {};
227
+ /**
228
+ * Selects a color for a debug namespace
229
+ * @param {String} namespace The namespace string for the debug instance to be colored
230
+ * @return {Number|String} An ANSI color code for the given namespace
231
+ * @api private
232
+ */ function selectColor(namespace) {
233
+ var hash = 0;
234
+ for(var i = 0; i < namespace.length; i++){
235
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
236
+ hash |= 0; // Convert to 32bit integer
237
+ }
238
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
239
+ }
240
+ createDebug.selectColor = selectColor;
241
+ /**
242
+ * Create a debugger with the given `namespace`.
243
+ *
244
+ * @param {String} namespace
245
+ * @return {Function}
246
+ * @api public
247
+ */ function createDebug(namespace) {
248
+ var prevTime;
249
+ var enableOverride = null;
250
+ var namespacesCache;
251
+ var enabledCache;
252
+ function debug() {
253
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
254
+ args[_key] = arguments[_key];
255
+ }
256
+ // Disabled?
257
+ if (!debug.enabled) {
258
+ return;
259
+ }
260
+ var self = debug;
261
+ // Set `diff` timestamp
262
+ var curr = Number(new Date());
263
+ var ms = curr - (prevTime || curr);
264
+ self.diff = ms;
265
+ self.prev = prevTime;
266
+ self.curr = curr;
267
+ prevTime = curr;
268
+ args[0] = createDebug.coerce(args[0]);
269
+ if (typeof args[0] !== "string") {
270
+ // Anything else let's inspect with %O
271
+ args.unshift("%O");
272
+ }
273
+ // Apply any `formatters` transformations
274
+ var index = 0;
275
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
276
+ // If we encounter an escaped % then don't increase the array index
277
+ if (match === "%%") {
278
+ return "%";
279
+ }
280
+ index++;
281
+ var formatter = createDebug.formatters[format];
282
+ if (typeof formatter === "function") {
283
+ var val = args[index];
284
+ match = formatter.call(self, val);
285
+ // Now we need to remove `args[index]` since it's inlined in the `format`
286
+ args.splice(index, 1);
287
+ index--;
288
+ }
289
+ return match;
290
+ });
291
+ // Apply env-specific formatting (colors, etc.)
292
+ createDebug.formatArgs.call(self, args);
293
+ var logFn = self.log || createDebug.log;
294
+ logFn.apply(self, args);
295
+ }
296
+ debug.namespace = namespace;
297
+ debug.useColors = createDebug.useColors();
298
+ debug.color = createDebug.selectColor(namespace);
299
+ debug.extend = extend;
300
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
301
+ Object.defineProperty(debug, "enabled", {
302
+ enumerable: true,
303
+ configurable: false,
304
+ get: function() {
305
+ if (enableOverride !== null) {
306
+ return enableOverride;
307
+ }
308
+ if (namespacesCache !== createDebug.namespaces) {
309
+ namespacesCache = createDebug.namespaces;
310
+ enabledCache = createDebug.enabled(namespace);
311
+ }
312
+ return enabledCache;
313
+ },
314
+ set: function(v) {
315
+ enableOverride = v;
316
+ }
317
+ });
318
+ // Env-specific initialization logic for debug instances
319
+ if (typeof createDebug.init === "function") {
320
+ createDebug.init(debug);
321
+ }
322
+ return debug;
323
+ }
324
+ function extend(namespace, delimiter) {
325
+ var newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
326
+ newDebug.log = this.log;
327
+ return newDebug;
328
+ }
329
+ /**
330
+ * Enables a debug mode by namespaces. This can include modes
331
+ * separated by a colon and wildcards.
332
+ *
333
+ * @param {String} namespaces
334
+ * @api public
335
+ */ function enable(namespaces) {
336
+ createDebug.save(namespaces);
337
+ createDebug.namespaces = namespaces;
338
+ createDebug.names = [];
339
+ createDebug.skips = [];
340
+ var i;
341
+ var split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
342
+ var len = split.length;
343
+ for(i = 0; i < len; i++){
344
+ if (!split[i]) {
345
+ continue;
346
+ }
347
+ namespaces = split[i].replace(/\*/g, ".*?");
348
+ if (namespaces[0] === "-") {
349
+ createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
350
+ } else {
351
+ createDebug.names.push(new RegExp("^" + namespaces + "$"));
352
+ }
353
+ }
354
+ }
355
+ /**
356
+ * Disable debug output.
357
+ *
358
+ * @return {String} namespaces
359
+ * @api public
360
+ */ function disable() {
361
+ var namespaces = _to_consumable_array$2(createDebug.names.map(toNamespace)).concat(_to_consumable_array$2(createDebug.skips.map(toNamespace).map(function(namespace) {
362
+ return "-" + namespace;
363
+ }))).join(",");
364
+ createDebug.enable("");
365
+ return namespaces;
366
+ }
367
+ /**
368
+ * Returns true if the given mode name is enabled, false otherwise.
369
+ *
370
+ * @param {String} name
371
+ * @return {Boolean}
372
+ * @api public
373
+ */ function enabled(name) {
374
+ if (name[name.length - 1] === "*") {
375
+ return true;
376
+ }
377
+ var i;
378
+ var len;
379
+ for(i = 0, len = createDebug.skips.length; i < len; i++){
380
+ if (createDebug.skips[i].test(name)) {
381
+ return false;
382
+ }
383
+ }
384
+ for(i = 0, len = createDebug.names.length; i < len; i++){
385
+ if (createDebug.names[i].test(name)) {
386
+ return true;
387
+ }
388
+ }
389
+ return false;
390
+ }
391
+ /**
392
+ * Convert regexp to namespace
393
+ *
394
+ * @param {RegExp} regxep
395
+ * @return {String} namespace
396
+ * @api private
397
+ */ function toNamespace(regexp) {
398
+ return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
399
+ }
400
+ /**
401
+ * Coerce `val`.
402
+ *
403
+ * @param {Mixed} val
404
+ * @return {Mixed}
405
+ * @api private
406
+ */ function coerce(val) {
407
+ if (_instanceof$2(val, Error)) {
408
+ return val.stack || val.message;
409
+ }
410
+ return val;
411
+ }
412
+ /**
413
+ * XXX DO NOT USE. This is a temporary stub function.
414
+ * XXX It WILL be removed in the next major release.
415
+ */ function destroy() {
416
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
417
+ }
418
+ createDebug.enable(createDebug.load());
419
+ return createDebug;
420
+ }
421
+ var common$1 = setup$1;
422
+
423
+ /* eslint-env browser */
424
+
425
+ (function (module, exports) {
426
+ /**
427
+ * This is the web browser implementation of `debug()`.
428
+ */ exports.formatArgs = formatArgs;
429
+ exports.save = save;
430
+ exports.load = load;
431
+ exports.useColors = useColors;
432
+ exports.storage = localstorage();
433
+ exports.destroy = function() {
434
+ var warned = false;
435
+ return function() {
436
+ if (!warned) {
437
+ warned = true;
438
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
439
+ }
440
+ };
441
+ }();
442
+ /**
443
+ * Colors.
444
+ */ exports.colors = [
445
+ "#0000CC",
446
+ "#0000FF",
447
+ "#0033CC",
448
+ "#0033FF",
449
+ "#0066CC",
450
+ "#0066FF",
451
+ "#0099CC",
452
+ "#0099FF",
453
+ "#00CC00",
454
+ "#00CC33",
455
+ "#00CC66",
456
+ "#00CC99",
457
+ "#00CCCC",
458
+ "#00CCFF",
459
+ "#3300CC",
460
+ "#3300FF",
461
+ "#3333CC",
462
+ "#3333FF",
463
+ "#3366CC",
464
+ "#3366FF",
465
+ "#3399CC",
466
+ "#3399FF",
467
+ "#33CC00",
468
+ "#33CC33",
469
+ "#33CC66",
470
+ "#33CC99",
471
+ "#33CCCC",
472
+ "#33CCFF",
473
+ "#6600CC",
474
+ "#6600FF",
475
+ "#6633CC",
476
+ "#6633FF",
477
+ "#66CC00",
478
+ "#66CC33",
479
+ "#9900CC",
480
+ "#9900FF",
481
+ "#9933CC",
482
+ "#9933FF",
483
+ "#99CC00",
484
+ "#99CC33",
485
+ "#CC0000",
486
+ "#CC0033",
487
+ "#CC0066",
488
+ "#CC0099",
489
+ "#CC00CC",
490
+ "#CC00FF",
491
+ "#CC3300",
492
+ "#CC3333",
493
+ "#CC3366",
494
+ "#CC3399",
495
+ "#CC33CC",
496
+ "#CC33FF",
497
+ "#CC6600",
498
+ "#CC6633",
499
+ "#CC9900",
500
+ "#CC9933",
501
+ "#CCCC00",
502
+ "#CCCC33",
503
+ "#FF0000",
504
+ "#FF0033",
505
+ "#FF0066",
506
+ "#FF0099",
507
+ "#FF00CC",
508
+ "#FF00FF",
509
+ "#FF3300",
510
+ "#FF3333",
511
+ "#FF3366",
512
+ "#FF3399",
513
+ "#FF33CC",
514
+ "#FF33FF",
515
+ "#FF6600",
516
+ "#FF6633",
517
+ "#FF9900",
518
+ "#FF9933",
519
+ "#FFCC00",
520
+ "#FFCC33"
521
+ ];
522
+ /**
523
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
524
+ * and the Firebug extension (any Firefox version) are known
525
+ * to support "%c" CSS customizations.
526
+ *
527
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
528
+ */ // eslint-disable-next-line complexity
529
+ function useColors() {
530
+ // NB: In an Electron preload script, document will be defined but not fully
531
+ // initialized. Since we know we're in Chrome, we'll just detect this case
532
+ // explicitly
533
+ if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
534
+ return true;
535
+ }
536
+ // Internet Explorer and Edge do not support colors.
537
+ if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
538
+ return false;
539
+ }
540
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
541
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
542
+ return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
543
+ typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
544
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
545
+ 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
546
+ typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
547
+ }
548
+ /**
549
+ * Colorize log arguments if enabled.
550
+ *
551
+ * @api public
552
+ */ function formatArgs(args) {
553
+ args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
554
+ if (!this.useColors) {
555
+ return;
556
+ }
557
+ var c = "color: " + this.color;
558
+ args.splice(1, 0, c, "color: inherit");
559
+ // The final "%c" is somewhat tricky, because there could be other
560
+ // arguments passed either before or after the %c, so we need to
561
+ // figure out the correct index to insert the CSS into
562
+ var index = 0;
563
+ var lastC = 0;
564
+ args[0].replace(/%[a-zA-Z%]/g, function(match) {
565
+ if (match === "%%") {
566
+ return;
567
+ }
568
+ index++;
569
+ if (match === "%c") {
570
+ // We only are interested in the *last* %c
571
+ // (the user may have provided their own)
572
+ lastC = index;
573
+ }
574
+ });
575
+ args.splice(lastC, 0, c);
576
+ }
577
+ /**
578
+ * Invokes `console.debug()` when available.
579
+ * No-op when `console.debug` is not a "function".
580
+ * If `console.debug` is not available, falls back
581
+ * to `console.log`.
582
+ *
583
+ * @api public
584
+ */ exports.log = console.debug || console.log || function() {};
585
+ /**
586
+ * Save `namespaces`.
587
+ *
588
+ * @param {String} namespaces
589
+ * @api private
590
+ */ function save(namespaces) {
591
+ try {
592
+ if (namespaces) {
593
+ exports.storage.setItem("debug", namespaces);
594
+ } else {
595
+ exports.storage.removeItem("debug");
596
+ }
597
+ } catch (error) {
598
+ // Swallow
599
+ // XXX (@Qix-) should we be logging these?
600
+ }
601
+ }
602
+ /**
603
+ * Load `namespaces`.
604
+ *
605
+ * @return {String} returns the previously persisted debug modes
606
+ * @api private
607
+ */ function load() {
608
+ var r;
609
+ try {
610
+ r = exports.storage.getItem("debug");
611
+ } catch (error) {
612
+ // Swallow
613
+ // XXX (@Qix-) should we be logging these?
614
+ }
615
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
616
+ if (!r && typeof process !== "undefined" && "env" in process) {
617
+ r = process.env.DEBUG;
618
+ }
619
+ return r;
620
+ }
621
+ /**
622
+ * Localstorage attempts to return the localstorage.
623
+ *
624
+ * This is necessary because safari throws
625
+ * when a user disables cookies/localstorage
626
+ * and you attempt to access it.
627
+ *
628
+ * @return {LocalStorage}
629
+ * @api private
630
+ */ function localstorage() {
631
+ try {
632
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
633
+ // The Browser also has localStorage in the global context.
634
+ return localStorage;
635
+ } catch (error) {
636
+ // Swallow
637
+ // XXX (@Qix-) should we be logging these?
638
+ }
639
+ }
640
+ module.exports = common$1(exports);
641
+ var formatters = module.exports.formatters;
642
+ /**
643
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
644
+ */ formatters.j = function(v) {
645
+ try {
646
+ return JSON.stringify(v);
647
+ } catch (error) {
648
+ return "[UnexpectedJSONParseError]: " + error.message;
649
+ }
650
+ };
651
+ }(browser$1, browser$1.exports));
652
+
653
+ var node$1 = {
654
+ exports: {}
655
+ };
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$1;
666
+ var tty = require$$0;
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
+
772
+ /**
773
+ * Module dependencies.
774
+ */
775
+
776
+ (function (module, exports) {
777
+ function _array_like_to_array(arr, len) {
778
+ if (len == null || len > arr.length) len = arr.length;
779
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
780
+ return arr2;
781
+ }
782
+ function _array_without_holes(arr) {
783
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
784
+ }
785
+ function _iterable_to_array(iter) {
786
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
787
+ }
788
+ function _non_iterable_spread() {
789
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
790
+ }
791
+ function _to_consumable_array(arr) {
792
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
793
+ }
794
+ function _unsupported_iterable_to_array(o, minLen) {
795
+ if (!o) return;
796
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
797
+ var n = Object.prototype.toString.call(o).slice(8, -1);
798
+ if (n === "Object" && o.constructor) n = o.constructor.name;
799
+ if (n === "Map" || n === "Set") return Array.from(n);
800
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
801
+ }
802
+ var tty = require$$0;
803
+ var util = require$$1;
804
+ /**
805
+ * This is the Node.js implementation of `debug()`.
806
+ */ exports.init = init;
807
+ exports.log = log;
808
+ exports.formatArgs = formatArgs;
809
+ exports.save = save;
810
+ exports.load = load;
811
+ exports.useColors = useColors;
812
+ 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`.");
813
+ /**
814
+ * Colors.
815
+ */ exports.colors = [
816
+ 6,
817
+ 2,
818
+ 3,
819
+ 4,
820
+ 5,
821
+ 1
822
+ ];
823
+ try {
824
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
825
+ // eslint-disable-next-line import/no-extraneous-dependencies
826
+ var supportsColor = supportsColor_1;
827
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
828
+ exports.colors = [
829
+ 20,
830
+ 21,
831
+ 26,
832
+ 27,
833
+ 32,
834
+ 33,
835
+ 38,
836
+ 39,
837
+ 40,
838
+ 41,
839
+ 42,
840
+ 43,
841
+ 44,
842
+ 45,
843
+ 56,
844
+ 57,
845
+ 62,
846
+ 63,
847
+ 68,
848
+ 69,
849
+ 74,
850
+ 75,
851
+ 76,
852
+ 77,
853
+ 78,
854
+ 79,
855
+ 80,
856
+ 81,
857
+ 92,
858
+ 93,
859
+ 98,
860
+ 99,
861
+ 112,
862
+ 113,
863
+ 128,
864
+ 129,
865
+ 134,
866
+ 135,
867
+ 148,
868
+ 149,
869
+ 160,
870
+ 161,
871
+ 162,
872
+ 163,
873
+ 164,
874
+ 165,
875
+ 166,
876
+ 167,
877
+ 168,
878
+ 169,
879
+ 170,
880
+ 171,
881
+ 172,
882
+ 173,
883
+ 178,
884
+ 179,
885
+ 184,
886
+ 185,
887
+ 196,
888
+ 197,
889
+ 198,
890
+ 199,
891
+ 200,
892
+ 201,
893
+ 202,
894
+ 203,
895
+ 204,
896
+ 205,
897
+ 206,
898
+ 207,
899
+ 208,
900
+ 209,
901
+ 214,
902
+ 215,
903
+ 220,
904
+ 221
905
+ ];
906
+ }
907
+ } catch (error) {
908
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
909
+ }
910
+ /**
911
+ * Build up the default `inspectOpts` object from the environment variables.
912
+ *
913
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
914
+ */ exports.inspectOpts = Object.keys(process.env).filter(function(key) {
915
+ return /^debug_/i.test(key);
916
+ }).reduce(function(obj, key) {
917
+ // Camel-case
918
+ var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) {
919
+ return k.toUpperCase();
920
+ });
921
+ // Coerce string value into JS value
922
+ var val = process.env[key];
923
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
924
+ val = true;
925
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
926
+ val = false;
927
+ } else if (val === "null") {
928
+ val = null;
929
+ } else {
930
+ val = Number(val);
931
+ }
932
+ obj[prop] = val;
933
+ return obj;
934
+ }, {});
935
+ /**
936
+ * Is stdout a TTY? Colored output is enabled when `true`.
937
+ */ function useColors() {
938
+ return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
939
+ }
940
+ /**
941
+ * Adds ANSI color escape codes if enabled.
942
+ *
943
+ * @api public
944
+ */ function formatArgs(args) {
945
+ var _this = this, name = _this.namespace, _$useColors = _this.useColors;
946
+ if (_$useColors) {
947
+ var c = this.color;
948
+ var colorCode = "\x1b[3" + (c < 8 ? c : "8;5;" + c);
949
+ var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1b[0m");
950
+ args[0] = prefix + args[0].split("\n").join("\n" + prefix);
951
+ args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1b[0m");
952
+ } else {
953
+ args[0] = getDate() + name + " " + args[0];
954
+ }
955
+ }
956
+ function getDate() {
957
+ if (exports.inspectOpts.hideDate) {
958
+ return "";
959
+ }
960
+ return new Date().toISOString() + " ";
961
+ }
962
+ /**
963
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
964
+ */ function log() {
965
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
966
+ args[_key] = arguments[_key];
967
+ }
968
+ var _util;
969
+ return process.stderr.write((_util = util).format.apply(_util, _to_consumable_array(args)) + "\n");
970
+ }
971
+ /**
972
+ * Save `namespaces`.
973
+ *
974
+ * @param {String} namespaces
975
+ * @api private
976
+ */ function save(namespaces) {
977
+ if (namespaces) {
978
+ process.env.DEBUG = namespaces;
979
+ } else {
980
+ // If you set a process.env field to null or undefined, it gets cast to the
981
+ // string 'null' or 'undefined'. Just delete instead.
982
+ delete process.env.DEBUG;
983
+ }
984
+ }
985
+ /**
986
+ * Load `namespaces`.
987
+ *
988
+ * @return {String} returns the previously persisted debug modes
989
+ * @api private
990
+ */ function load() {
991
+ return process.env.DEBUG;
992
+ }
993
+ /**
994
+ * Init logic for `debug` instances.
995
+ *
996
+ * Create a new `inspectOpts` object in case `useColors` is set
997
+ * differently for a particular `debug` instance.
998
+ */ function init(debug) {
999
+ debug.inspectOpts = {};
1000
+ var keys = Object.keys(exports.inspectOpts);
1001
+ for(var i = 0; i < keys.length; i++){
1002
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
1003
+ }
1004
+ }
1005
+ module.exports = common$1(exports);
1006
+ var formatters = module.exports.formatters;
1007
+ /**
1008
+ * Map %o to `util.inspect()`, all on a single line.
1009
+ */ formatters.o = function(v) {
1010
+ this.inspectOpts.colors = this.useColors;
1011
+ return util.inspect(v, this.inspectOpts).split("\n").map(function(str) {
1012
+ return str.trim();
1013
+ }).join(" ");
1014
+ };
1015
+ /**
1016
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
1017
+ */ formatters.O = function(v) {
1018
+ this.inspectOpts.colors = this.useColors;
1019
+ return util.inspect(v, this.inspectOpts);
1020
+ };
1021
+ }(node$1, node$1.exports));
1022
+
1023
+ /**
1024
+ * Detect Electron renderer / nwjs process, which is node, but we should
1025
+ * treat as a browser.
1026
+ */
1027
+
1028
+ if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
1029
+ src$1.exports = browser$1.exports;
1030
+ } else {
1031
+ src$1.exports = node$1.exports;
1032
+ }
1033
+
1034
+ (function (exports) {
1035
+ var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
1036
+ return mod && mod.__esModule ? mod : {
1037
+ "default": mod
1038
+ };
1039
+ };
1040
+ Object.defineProperty(exports, "__esModule", {
1041
+ value: true
1042
+ });
1043
+ var fs_1 = require$$0$2;
1044
+ var debug_1 = __importDefault(src$1.exports);
1045
+ var log = debug_1.default("@kwsites/file-exists");
1046
+ function check(path, isFile, isDirectory) {
1047
+ log("checking %s", path);
1048
+ try {
1049
+ var stat = fs_1.statSync(path);
1050
+ if (stat.isFile() && isFile) {
1051
+ log("[OK] path represents a file");
1052
+ return true;
1053
+ }
1054
+ if (stat.isDirectory() && isDirectory) {
1055
+ log("[OK] path represents a directory");
1056
+ return true;
1057
+ }
1058
+ log("[FAIL] path represents something other than a file or directory");
1059
+ return false;
1060
+ } catch (e) {
1061
+ if (e.code === "ENOENT") {
1062
+ log("[FAIL] path is not accessible: %o", e);
1063
+ return false;
1064
+ }
1065
+ log("[FATAL] %o", e);
1066
+ throw e;
1067
+ }
1068
+ }
1069
+ /**
1070
+ * Synchronous validation of a path existing either as a file or as a directory.
1071
+ *
1072
+ * @param {string} path The path to check
1073
+ * @param {number} type One or both of the exported numeric constants
1074
+ */ function exists(path) {
1075
+ var type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : exports.READABLE;
1076
+ return check(path, (type & exports.FILE) > 0, (type & exports.FOLDER) > 0);
1077
+ }
1078
+ exports.exists = exists;
1079
+ /**
1080
+ * Constant representing a file
1081
+ */ exports.FILE = 1;
1082
+ /**
1083
+ * Constant representing a folder
1084
+ */ exports.FOLDER = 2;
1085
+ /**
1086
+ * Constant representing either a file or a folder
1087
+ */ exports.READABLE = exports.FILE + exports.FOLDER;
1088
+ }(src$2));
1089
+
1090
+ (function (exports) {
1091
+ function __export(m) {
1092
+ for(var p in m)if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1093
+ }
1094
+ Object.defineProperty(exports, "__esModule", {
1095
+ value: true
1096
+ });
1097
+ __export(src$2);
1098
+ }(dist$1));
13
1099
 
14
1100
  var src = {
15
1101
  exports: {}
@@ -654,121 +1740,6 @@ var node = {
654
1740
  exports: {}
655
1741
  };
656
1742
 
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
-
772
1743
  /**
773
1744
  * Module dependencies.
774
1745
  */
@@ -799,8 +1770,8 @@ function _unsupported_iterable_to_array(o, minLen) {
799
1770
  if (n === "Map" || n === "Set") return Array.from(n);
800
1771
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
801
1772
  }
802
- var tty = require$$1;
803
- var util = require$$1$1;
1773
+ var tty = require$$0;
1774
+ var util = require$$1;
804
1775
  /**
805
1776
  * This is the Node.js implementation of `debug()`.
806
1777
  */ exports.init = init;
@@ -960,13 +1931,15 @@ function getDate() {
960
1931
  return new Date().toISOString() + " ";
961
1932
  }
962
1933
  /**
963
- * Invokes `util.format()` with the specified arguments and writes to stderr.
1934
+ * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
964
1935
  */ function log() {
965
1936
  for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
966
1937
  args[_key] = arguments[_key];
967
1938
  }
968
1939
  var _util;
969
- return process.stderr.write((_util = util).format.apply(_util, _to_consumable_array(args)) + "\n");
1940
+ return process.stderr.write((_util = util).formatWithOptions.apply(_util, [
1941
+ exports.inspectOpts
1942
+ ].concat(_to_consumable_array(args))) + "\n");
970
1943
  }
971
1944
  /**
972
1945
  * Save `namespaces`.
@@ -1033,72 +2006,6 @@ if (typeof process === "undefined" || process.type === "renderer" || process.bro
1033
2006
 
1034
2007
  var debug = src.exports;
1035
2008
 
1036
- (function (exports) {
1037
- var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
1038
- return mod && mod.__esModule ? mod : {
1039
- "default": mod
1040
- };
1041
- };
1042
- Object.defineProperty(exports, "__esModule", {
1043
- value: true
1044
- });
1045
- var fs_1 = require$$0$1;
1046
- var debug_1 = __importDefault(src.exports);
1047
- var log = debug_1.default("@kwsites/file-exists");
1048
- function check(path, isFile, isDirectory) {
1049
- log("checking %s", path);
1050
- try {
1051
- var stat = fs_1.statSync(path);
1052
- if (stat.isFile() && isFile) {
1053
- log("[OK] path represents a file");
1054
- return true;
1055
- }
1056
- if (stat.isDirectory() && isDirectory) {
1057
- log("[OK] path represents a directory");
1058
- return true;
1059
- }
1060
- log("[FAIL] path represents something other than a file or directory");
1061
- return false;
1062
- } catch (e) {
1063
- if (e.code === "ENOENT") {
1064
- log("[FAIL] path is not accessible: %o", e);
1065
- return false;
1066
- }
1067
- log("[FATAL] %o", e);
1068
- throw e;
1069
- }
1070
- }
1071
- /**
1072
- * Synchronous validation of a path existing either as a file or as a directory.
1073
- *
1074
- * @param {string} path The path to check
1075
- * @param {number} type One or both of the exported numeric constants
1076
- */ function exists(path) {
1077
- var type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : exports.READABLE;
1078
- return check(path, (type & exports.FILE) > 0, (type & exports.FOLDER) > 0);
1079
- }
1080
- exports.exists = exists;
1081
- /**
1082
- * Constant representing a file
1083
- */ exports.FILE = 1;
1084
- /**
1085
- * Constant representing a folder
1086
- */ exports.FOLDER = 2;
1087
- /**
1088
- * Constant representing either a file or a folder
1089
- */ exports.READABLE = exports.FILE + exports.FOLDER;
1090
- }(src$1));
1091
-
1092
- (function (exports) {
1093
- function __export(m) {
1094
- for(var p in m)if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1095
- }
1096
- Object.defineProperty(exports, "__esModule", {
1097
- value: true
1098
- });
1099
- __export(src$1);
1100
- }(dist$1));
1101
-
1102
2009
  var dist = {};
1103
2010
 
1104
2011
  Object.defineProperty(dist, "__esModule", {
@@ -1761,6 +2668,11 @@ function asArray(source) {
1761
2668
  source
1762
2669
  ];
1763
2670
  }
2671
+ function asCamelCase(str) {
2672
+ return str.replace(/[\s-]+(.)/g, function(_all, chr) {
2673
+ return chr.toUpperCase();
2674
+ });
2675
+ }
1764
2676
  function asStringArray(source) {
1765
2677
  return asArray(source).map(String);
1766
2678
  }
@@ -2063,8 +2975,8 @@ var init_task_options = __esm({
2063
2975
  }
2064
2976
  });
2065
2977
  // src/lib/utils/task-parser.ts
2066
- function callTaskParser(parser3, streams) {
2067
- return parser3(streams.stdOut, streams.stdErr);
2978
+ function callTaskParser(parser4, streams) {
2979
+ return parser4(streams.stdOut, streams.stdErr);
2068
2980
  }
2069
2981
  function parseStringResponse(result, parsers12, texts) {
2070
2982
  var trim = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : true;
@@ -2121,6 +3033,9 @@ __export(utils_exports, {
2121
3033
  asArray: function() {
2122
3034
  return asArray;
2123
3035
  },
3036
+ asCamelCase: function() {
3037
+ return asCamelCase;
3038
+ },
2124
3039
  asFunction: function() {
2125
3040
  return asFunction;
2126
3041
  },
@@ -2370,11 +3285,11 @@ __export(task_exports, {
2370
3285
  return straightThroughStringTask;
2371
3286
  }
2372
3287
  });
2373
- function adhocExecTask(parser3) {
3288
+ function adhocExecTask(parser4) {
2374
3289
  return {
2375
3290
  commands: EMPTY_COMMANDS,
2376
3291
  format: "empty",
2377
- parser: parser3
3292
+ parser: parser4
2378
3293
  };
2379
3294
  }
2380
3295
  function configurationErrorTask(error) {
@@ -3677,6 +4592,50 @@ var init_checkout = __esm({
3677
4592
  init_task();
3678
4593
  }
3679
4594
  });
4595
+ // src/lib/tasks/count-objects.ts
4596
+ function countObjectsResponse() {
4597
+ return {
4598
+ count: 0,
4599
+ garbage: 0,
4600
+ inPack: 0,
4601
+ packs: 0,
4602
+ prunePackable: 0,
4603
+ size: 0,
4604
+ sizeGarbage: 0,
4605
+ sizePack: 0
4606
+ };
4607
+ }
4608
+ function count_objects_default() {
4609
+ return {
4610
+ countObjects: function countObjects() {
4611
+ return this._runTask({
4612
+ commands: [
4613
+ "count-objects",
4614
+ "--verbose"
4615
+ ],
4616
+ format: "utf-8",
4617
+ parser: function parser(stdOut) {
4618
+ return parseStringResponse(countObjectsResponse(), [
4619
+ parser2
4620
+ ], stdOut);
4621
+ }
4622
+ });
4623
+ }
4624
+ };
4625
+ }
4626
+ var parser2;
4627
+ var init_count_objects = __esm({
4628
+ "src/lib/tasks/count-objects.ts": function() {
4629
+ init_utils();
4630
+ parser2 = new LineParser(/([a-z-]+): (\d+)$/, function(result, param) {
4631
+ var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
4632
+ var property = asCamelCase(key);
4633
+ if (result.hasOwnProperty(property)) {
4634
+ result[property] = asNumber(value);
4635
+ }
4636
+ });
4637
+ }
4638
+ });
3680
4639
  // src/lib/parsers/parse-commit.ts
3681
4640
  function parseCommitResult(stdOut) {
3682
4641
  var result = {
@@ -3900,9 +4859,9 @@ var init_DiffSummary = __esm({
3900
4859
  // src/lib/parsers/parse-diff-summary.ts
3901
4860
  function getDiffParser() {
3902
4861
  var format = arguments.length > 0 && arguments[0] !== void 0 /* NONE */ ? arguments[0] : "";
3903
- var parser3 = diffSummaryParsers[format];
4862
+ var parser4 = diffSummaryParsers[format];
3904
4863
  return function(stdOut) {
3905
- return parseStringResponse(new DiffSummary(), parser3, stdOut, false);
4864
+ return parseStringResponse(new DiffSummary(), parser4, stdOut, false);
3906
4865
  };
3907
4866
  }
3908
4867
  var statParser, numStatParser, nameOnlyParser, nameStatusParser, diffSummaryParsers;
@@ -4146,13 +5105,13 @@ function parseLogOptions() {
4146
5105
  };
4147
5106
  }
4148
5107
  function logTask(splitter, fields, customArgs) {
4149
- var parser3 = createListLogSummaryParser(splitter, fields, logFormatFromCommand(customArgs));
5108
+ var parser4 = createListLogSummaryParser(splitter, fields, logFormatFromCommand(customArgs));
4150
5109
  return {
4151
5110
  commands: [
4152
5111
  "log"
4153
5112
  ].concat(_to_consumable_array(customArgs)),
4154
5113
  format: "utf-8",
4155
- parser: parser3
5114
+ parser: parser4
4156
5115
  };
4157
5116
  }
4158
5117
  function log_default() {
@@ -4704,7 +5663,7 @@ function renamedFile(line) {
4704
5663
  to: to
4705
5664
  };
4706
5665
  }
4707
- function parser2(indexX, indexY, handler) {
5666
+ function parser3(indexX, indexY, handler) {
4708
5667
  return [
4709
5668
  "".concat(indexX).concat(indexY),
4710
5669
  handler
@@ -4715,7 +5674,7 @@ function conflicts(indexX) {
4715
5674
  indexY[_key - 1] = arguments[_key];
4716
5675
  }
4717
5676
  return indexY.map(function(y) {
4718
- return parser2(indexX, y, function(result, file) {
5677
+ return parser3(indexX, y, function(result, file) {
4719
5678
  return append(result.conflicted, file);
4720
5679
  });
4721
5680
  });
@@ -4768,42 +5727,42 @@ var init_StatusSummary = __esm({
4768
5727
  };
4769
5728
  };
4770
5729
  parsers6 = new Map([
4771
- parser2(" " /* NONE */ , "A" /* ADDED */ , function(result, file) {
5730
+ parser3(" " /* NONE */ , "A" /* ADDED */ , function(result, file) {
4772
5731
  return append(result.created, file);
4773
5732
  }),
4774
- parser2(" " /* NONE */ , "D" /* DELETED */ , function(result, file) {
5733
+ parser3(" " /* NONE */ , "D" /* DELETED */ , function(result, file) {
4775
5734
  return append(result.deleted, file);
4776
5735
  }),
4777
- parser2(" " /* NONE */ , "M" /* MODIFIED */ , function(result, file) {
5736
+ parser3(" " /* NONE */ , "M" /* MODIFIED */ , function(result, file) {
4778
5737
  return append(result.modified, file);
4779
5738
  }),
4780
- parser2("A" /* ADDED */ , " " /* NONE */ , function(result, file) {
5739
+ parser3("A" /* ADDED */ , " " /* NONE */ , function(result, file) {
4781
5740
  return append(result.created, file) && append(result.staged, file);
4782
5741
  }),
4783
- parser2("A" /* ADDED */ , "M" /* MODIFIED */ , function(result, file) {
5742
+ parser3("A" /* ADDED */ , "M" /* MODIFIED */ , function(result, file) {
4784
5743
  return append(result.created, file) && append(result.staged, file) && append(result.modified, file);
4785
5744
  }),
4786
- parser2("D" /* DELETED */ , " " /* NONE */ , function(result, file) {
5745
+ parser3("D" /* DELETED */ , " " /* NONE */ , function(result, file) {
4787
5746
  return append(result.deleted, file) && append(result.staged, file);
4788
5747
  }),
4789
- parser2("M" /* MODIFIED */ , " " /* NONE */ , function(result, file) {
5748
+ parser3("M" /* MODIFIED */ , " " /* NONE */ , function(result, file) {
4790
5749
  return append(result.modified, file) && append(result.staged, file);
4791
5750
  }),
4792
- parser2("M" /* MODIFIED */ , "M" /* MODIFIED */ , function(result, file) {
5751
+ parser3("M" /* MODIFIED */ , "M" /* MODIFIED */ , function(result, file) {
4793
5752
  return append(result.modified, file) && append(result.staged, file);
4794
5753
  }),
4795
- parser2("R" /* RENAMED */ , " " /* NONE */ , function(result, file) {
5754
+ parser3("R" /* RENAMED */ , " " /* NONE */ , function(result, file) {
4796
5755
  append(result.renamed, renamedFile(file));
4797
5756
  }),
4798
- parser2("R" /* RENAMED */ , "M" /* MODIFIED */ , function(result, file) {
5757
+ parser3("R" /* RENAMED */ , "M" /* MODIFIED */ , function(result, file) {
4799
5758
  var renamed = renamedFile(file);
4800
5759
  append(result.renamed, renamed);
4801
5760
  append(result.modified, renamed.to);
4802
5761
  }),
4803
- parser2("!" /* IGNORED */ , "!" /* IGNORED */ , function(_result, _file) {
5762
+ parser3("!" /* IGNORED */ , "!" /* IGNORED */ , function(_result, _file) {
4804
5763
  append(_result.ignored = _result.ignored || [], _file);
4805
5764
  }),
4806
- parser2("?" /* UNTRACKED */ , "?" /* UNTRACKED */ , function(result, file) {
5765
+ parser3("?" /* UNTRACKED */ , "?" /* UNTRACKED */ , function(result, file) {
4807
5766
  return append(result.not_added, file);
4808
5767
  })
4809
5768
  ].concat(_to_consumable_array(conflicts("A" /* ADDED */ , "A" /* ADDED */ , "U" /* UNMERGED */ )), _to_consumable_array(conflicts("D" /* DELETED */ , "D" /* DELETED */ , "U" /* UNMERGED */ )), _to_consumable_array(conflicts("U" /* UNMERGED */ , "A" /* ADDED */ , "D" /* DELETED */ , "U" /* UNMERGED */ )), [
@@ -4951,6 +5910,7 @@ var init_simple_git_api = __esm({
4951
5910
  init_task_callback();
4952
5911
  init_change_working_directory();
4953
5912
  init_checkout();
5913
+ init_count_objects();
4954
5914
  init_commit();
4955
5915
  init_config();
4956
5916
  init_first_commit();
@@ -5077,7 +6037,7 @@ var init_simple_git_api = __esm({
5077
6037
  ]);
5078
6038
  return SimpleGitApi;
5079
6039
  }();
5080
- Object.assign(SimpleGitApi.prototype, checkout_default(), commit_default(), config_default(), first_commit_default(), grep_default(), log_default(), show_default(), version_default());
6040
+ Object.assign(SimpleGitApi.prototype, checkout_default(), commit_default(), config_default(), count_objects_default(), first_commit_default(), grep_default(), log_default(), show_default(), version_default());
5081
6041
  }
5082
6042
  });
5083
6043
  // src/lib/runners/scheduler.ts
@@ -5345,14 +6305,14 @@ function branchTask(customArgs) {
5345
6305
  };
5346
6306
  }
5347
6307
  function branchLocalTask() {
5348
- var parser3 = parseBranchSummary;
6308
+ var parser4 = parseBranchSummary;
5349
6309
  return {
5350
6310
  format: "utf-8",
5351
6311
  commands: [
5352
6312
  "branch",
5353
6313
  "-v"
5354
6314
  ],
5355
- parser: parser3
6315
+ parser: parser4
5356
6316
  };
5357
6317
  }
5358
6318
  function deleteBranchesTask(branches) {
@@ -5769,11 +6729,11 @@ function stashListTask() {
5769
6729
  "stash",
5770
6730
  "list"
5771
6731
  ].concat(_to_consumable_array(options.commands), _to_consumable_array(customArgs));
5772
- var parser3 = createListLogSummaryParser(options.splitter, options.fields, logFormatFromCommand(commands));
6732
+ var parser4 = createListLogSummaryParser(options.splitter, options.fields, logFormatFromCommand(commands));
5773
6733
  return validateLogFormatConfig(commands) || {
5774
6734
  commands: commands,
5775
6735
  format: "utf-8",
5776
- parser: parser3
6736
+ parser: parser4
5777
6737
  };
5778
6738
  }
5779
6739
  var init_stash_list = __esm({