@jsenv/plugin-supervisor 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jsenv_plugin_supervisor.js +18 -10
- package/package.json +2 -2
|
@@ -27,15 +27,23 @@ if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false') || has
|
|
|
27
27
|
flagForceColor = 1;
|
|
28
28
|
}
|
|
29
29
|
function envForceColor() {
|
|
30
|
-
if ('FORCE_COLOR' in env) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return
|
|
30
|
+
if (!('FORCE_COLOR' in env)) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (env.FORCE_COLOR === 'true') {
|
|
34
|
+
return 1;
|
|
35
|
+
}
|
|
36
|
+
if (env.FORCE_COLOR === 'false') {
|
|
37
|
+
return 0;
|
|
38
|
+
}
|
|
39
|
+
if (env.FORCE_COLOR.length === 0) {
|
|
40
|
+
return 1;
|
|
41
|
+
}
|
|
42
|
+
const level = Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
43
|
+
if (![0, 1, 2, 3].includes(level)) {
|
|
44
|
+
return;
|
|
38
45
|
}
|
|
46
|
+
return level;
|
|
39
47
|
}
|
|
40
48
|
function translateLevel(level) {
|
|
41
49
|
if (level === 0) {
|
|
@@ -91,10 +99,10 @@ function _supportsColor(haveStream, {
|
|
|
91
99
|
return 1;
|
|
92
100
|
}
|
|
93
101
|
if ('CI' in env) {
|
|
94
|
-
if ('GITHUB_ACTIONS'
|
|
102
|
+
if (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) {
|
|
95
103
|
return 3;
|
|
96
104
|
}
|
|
97
|
-
if (['TRAVIS', '
|
|
105
|
+
if (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
|
98
106
|
return 1;
|
|
99
107
|
}
|
|
100
108
|
return min;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/plugin-supervisor",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@jsenv/ast": "6.4.1",
|
|
30
30
|
"@jsenv/urls": "2.5.4",
|
|
31
|
-
"@jsenv/sourcemap": "1.2.
|
|
31
|
+
"@jsenv/sourcemap": "1.2.29",
|
|
32
32
|
"launch-editor": "2.9.1"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|