@digipair/skill-git 0.18.0 → 0.18.3
Sign up to get free protection for your applications and to get access to all the features.
- package/index.cjs.js +23 -121
- package/index.esm.js +22 -119
- package/package.json +1 -1
package/index.cjs.js
CHANGED
@@ -2,19 +2,17 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var require$$0$
|
5
|
+
var require$$0$1 = require('fs');
|
6
6
|
var require$$0 = require('tty');
|
7
7
|
var require$$1 = require('util');
|
8
|
-
var require$$0$1 = require('os');
|
9
8
|
var child_process = require('child_process');
|
10
9
|
var node_events = require('node:events');
|
11
10
|
|
12
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
13
12
|
|
14
|
-
var require$$0__default$
|
13
|
+
var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$1);
|
15
14
|
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
|
16
15
|
var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1);
|
17
|
-
var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$1);
|
18
16
|
|
19
17
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
20
18
|
|
@@ -26,7 +24,7 @@ var src$1 = {
|
|
26
24
|
exports: {}
|
27
25
|
};
|
28
26
|
|
29
|
-
var browser$
|
27
|
+
var browser$2 = {
|
30
28
|
exports: {}
|
31
29
|
};
|
32
30
|
|
@@ -659,125 +657,29 @@ var formatters = module.exports.formatters;
|
|
659
657
|
return "[UnexpectedJSONParseError]: " + error.message;
|
660
658
|
}
|
661
659
|
};
|
662
|
-
}(browser$
|
660
|
+
}(browser$2, browser$2.exports));
|
663
661
|
|
664
662
|
var node$1 = {
|
665
663
|
exports: {}
|
666
664
|
};
|
667
665
|
|
668
|
-
|
669
|
-
|
670
|
-
var
|
671
|
-
|
672
|
-
|
673
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
674
|
-
};
|
675
|
-
|
676
|
-
var os = require$$0__default$1["default"];
|
677
|
-
var tty = require$$0__default["default"];
|
678
|
-
var hasFlag = hasFlag$1;
|
679
|
-
var env = process.env;
|
680
|
-
var forceColor;
|
681
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
682
|
-
forceColor = 0;
|
683
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
684
|
-
forceColor = 1;
|
685
|
-
}
|
686
|
-
if ("FORCE_COLOR" in env) {
|
687
|
-
if (env.FORCE_COLOR === "true") {
|
688
|
-
forceColor = 1;
|
689
|
-
} else if (env.FORCE_COLOR === "false") {
|
690
|
-
forceColor = 0;
|
691
|
-
} else {
|
692
|
-
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
693
|
-
}
|
694
|
-
}
|
695
|
-
function translateLevel(level) {
|
696
|
-
if (level === 0) {
|
697
|
-
return false;
|
698
|
-
}
|
699
|
-
return {
|
700
|
-
level: level,
|
701
|
-
hasBasic: true,
|
702
|
-
has256: level >= 2,
|
703
|
-
has16m: level >= 3
|
704
|
-
};
|
705
|
-
}
|
706
|
-
function supportsColor(haveStream, streamIsTTY) {
|
707
|
-
if (forceColor === 0) {
|
708
|
-
return 0;
|
709
|
-
}
|
710
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
711
|
-
return 3;
|
712
|
-
}
|
713
|
-
if (hasFlag("color=256")) {
|
714
|
-
return 2;
|
715
|
-
}
|
716
|
-
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
717
|
-
return 0;
|
718
|
-
}
|
719
|
-
var min = forceColor || 0;
|
720
|
-
if (env.TERM === "dumb") {
|
721
|
-
return min;
|
722
|
-
}
|
723
|
-
if (process.platform === "win32") {
|
724
|
-
// Windows 10 build 10586 is the first Windows release that supports 256 colors.
|
725
|
-
// Windows 10 build 14931 is the first release that supports 16m/TrueColor.
|
726
|
-
var osRelease = os.release().split(".");
|
727
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
728
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
729
|
-
}
|
730
|
-
return 1;
|
731
|
-
}
|
732
|
-
if ("CI" in env) {
|
733
|
-
if ([
|
734
|
-
"TRAVIS",
|
735
|
-
"CIRCLECI",
|
736
|
-
"APPVEYOR",
|
737
|
-
"GITLAB_CI",
|
738
|
-
"GITHUB_ACTIONS",
|
739
|
-
"BUILDKITE"
|
740
|
-
].some(function(sign) {
|
741
|
-
return sign in env;
|
742
|
-
}) || env.CI_NAME === "codeship") {
|
743
|
-
return 1;
|
744
|
-
}
|
745
|
-
return min;
|
746
|
-
}
|
747
|
-
if ("TEAMCITY_VERSION" in env) {
|
748
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
749
|
-
}
|
750
|
-
if (env.COLORTERM === "truecolor") {
|
751
|
-
return 3;
|
752
|
-
}
|
753
|
-
if ("TERM_PROGRAM" in env) {
|
754
|
-
var version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
755
|
-
switch(env.TERM_PROGRAM){
|
756
|
-
case "iTerm.app":
|
757
|
-
return version >= 3 ? 3 : 2;
|
758
|
-
case "Apple_Terminal":
|
759
|
-
return 2;
|
760
|
-
}
|
761
|
-
}
|
762
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
763
|
-
return 2;
|
764
|
-
}
|
765
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
766
|
-
return 1;
|
767
|
-
}
|
768
|
-
if ("COLORTERM" in env) {
|
769
|
-
return 1;
|
666
|
+
/* eslint-env browser */
|
667
|
+
function getChromeVersion() {
|
668
|
+
var matches = RegExp("(Chrome|Chromium)\\/(?<chromeVersion>\\d+)\\.").exec(navigator.userAgent);
|
669
|
+
if (!matches) {
|
670
|
+
return;
|
770
671
|
}
|
771
|
-
return
|
672
|
+
return Number.parseInt(matches.groups.chromeVersion, 10);
|
772
673
|
}
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
674
|
+
var colorSupport = getChromeVersion() >= 69 ? {
|
675
|
+
level: 1,
|
676
|
+
hasBasic: true,
|
677
|
+
has256: false,
|
678
|
+
has16m: false
|
679
|
+
} : false;
|
680
|
+
var browser$1 = {
|
681
|
+
stdout: colorSupport,
|
682
|
+
stderr: colorSupport
|
781
683
|
};
|
782
684
|
|
783
685
|
/**
|
@@ -834,7 +736,7 @@ exports.destroy = util.deprecate(function() {}, "Instance method `debug.destroy(
|
|
834
736
|
try {
|
835
737
|
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
|
836
738
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
837
|
-
var supportsColor =
|
739
|
+
var supportsColor = browser$1;
|
838
740
|
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
839
741
|
exports.colors = [
|
840
742
|
20,
|
@@ -1037,7 +939,7 @@ var formatters = module.exports.formatters;
|
|
1037
939
|
*/
|
1038
940
|
|
1039
941
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
1040
|
-
src$1.exports = browser$
|
942
|
+
src$1.exports = browser$2.exports;
|
1041
943
|
} else {
|
1042
944
|
src$1.exports = node$1.exports;
|
1043
945
|
}
|
@@ -1051,7 +953,7 @@ var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || functi
|
|
1051
953
|
Object.defineProperty(exports, "__esModule", {
|
1052
954
|
value: true
|
1053
955
|
});
|
1054
|
-
var fs_1 = require$$0__default$
|
956
|
+
var fs_1 = require$$0__default$1["default"];
|
1055
957
|
var debug_1 = __importDefault(src$1.exports);
|
1056
958
|
var log = debug_1.default("@kwsites/file-exists");
|
1057
959
|
function check(path, isFile, isDirectory) {
|
@@ -1805,7 +1707,7 @@ exports.destroy = util.deprecate(function() {}, "Instance method `debug.destroy(
|
|
1805
1707
|
try {
|
1806
1708
|
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
|
1807
1709
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
1808
|
-
var supportsColor =
|
1710
|
+
var supportsColor = browser$1;
|
1809
1711
|
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
1810
1712
|
exports.colors = [
|
1811
1713
|
20,
|
package/index.esm.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
import require$$0$
|
1
|
+
import require$$0$1 from 'fs';
|
2
2
|
import require$$0 from 'tty';
|
3
3
|
import require$$1 from 'util';
|
4
|
-
import require$$0$1 from 'os';
|
5
4
|
import { spawn } from 'child_process';
|
6
5
|
import { EventEmitter } from 'node:events';
|
7
6
|
|
@@ -15,7 +14,7 @@ var src$1 = {
|
|
15
14
|
exports: {}
|
16
15
|
};
|
17
16
|
|
18
|
-
var browser$
|
17
|
+
var browser$2 = {
|
19
18
|
exports: {}
|
20
19
|
};
|
21
20
|
|
@@ -648,125 +647,29 @@ var formatters = module.exports.formatters;
|
|
648
647
|
return "[UnexpectedJSONParseError]: " + error.message;
|
649
648
|
}
|
650
649
|
};
|
651
|
-
}(browser$
|
650
|
+
}(browser$2, browser$2.exports));
|
652
651
|
|
653
652
|
var node$1 = {
|
654
653
|
exports: {}
|
655
654
|
};
|
656
655
|
|
657
|
-
|
658
|
-
|
659
|
-
var
|
660
|
-
|
661
|
-
|
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;
|
656
|
+
/* eslint-env browser */
|
657
|
+
function getChromeVersion() {
|
658
|
+
var matches = RegExp("(Chrome|Chromium)\\/(?<chromeVersion>\\d+)\\.").exec(navigator.userAgent);
|
659
|
+
if (!matches) {
|
660
|
+
return;
|
759
661
|
}
|
760
|
-
return
|
761
|
-
}
|
762
|
-
function getSupportLevel(stream) {
|
763
|
-
var level = supportsColor(stream, stream && stream.isTTY);
|
764
|
-
return translateLevel(level);
|
662
|
+
return Number.parseInt(matches.groups.chromeVersion, 10);
|
765
663
|
}
|
766
|
-
var
|
767
|
-
|
768
|
-
|
769
|
-
|
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
|
770
673
|
};
|
771
674
|
|
772
675
|
/**
|
@@ -823,7 +726,7 @@ exports.destroy = util.deprecate(function() {}, "Instance method `debug.destroy(
|
|
823
726
|
try {
|
824
727
|
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
|
825
728
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
826
|
-
var supportsColor =
|
729
|
+
var supportsColor = browser$1;
|
827
730
|
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
828
731
|
exports.colors = [
|
829
732
|
20,
|
@@ -1026,7 +929,7 @@ var formatters = module.exports.formatters;
|
|
1026
929
|
*/
|
1027
930
|
|
1028
931
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
1029
|
-
src$1.exports = browser$
|
932
|
+
src$1.exports = browser$2.exports;
|
1030
933
|
} else {
|
1031
934
|
src$1.exports = node$1.exports;
|
1032
935
|
}
|
@@ -1040,7 +943,7 @@ var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || functi
|
|
1040
943
|
Object.defineProperty(exports, "__esModule", {
|
1041
944
|
value: true
|
1042
945
|
});
|
1043
|
-
var fs_1 = require$$0$
|
946
|
+
var fs_1 = require$$0$1;
|
1044
947
|
var debug_1 = __importDefault(src$1.exports);
|
1045
948
|
var log = debug_1.default("@kwsites/file-exists");
|
1046
949
|
function check(path, isFile, isDirectory) {
|
@@ -1794,7 +1697,7 @@ exports.destroy = util.deprecate(function() {}, "Instance method `debug.destroy(
|
|
1794
1697
|
try {
|
1795
1698
|
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
|
1796
1699
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
1797
|
-
var supportsColor =
|
1700
|
+
var supportsColor = browser$1;
|
1798
1701
|
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
1799
1702
|
exports.colors = [
|
1800
1703
|
20,
|