Skip to content

Commit 9651853

Browse files
committed
[ML] update packages/kbn-pm/dist/index.js
1 parent d4b7b54 commit 9651853

File tree

1 file changed

+12
-19
lines changed

1 file changed

+12
-19
lines changed

packages/kbn-pm/dist/index.js

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42623,28 +42623,21 @@ module.exports = require("tty");
4262342623
const os = __webpack_require__(11);
4262442624
const hasFlag = __webpack_require__(12);
4262542625

42626-
const {env} = process;
42626+
const env = process.env;
4262742627

4262842628
let forceColor;
4262942629
if (hasFlag('no-color') ||
4263042630
hasFlag('no-colors') ||
42631-
hasFlag('color=false') ||
42632-
hasFlag('color=never')) {
42633-
forceColor = 0;
42631+
hasFlag('color=false')) {
42632+
forceColor = false;
4263442633
} else if (hasFlag('color') ||
4263542634
hasFlag('colors') ||
4263642635
hasFlag('color=true') ||
4263742636
hasFlag('color=always')) {
42638-
forceColor = 1;
42637+
forceColor = true;
4263942638
}
4264042639
if ('FORCE_COLOR' in env) {
42641-
if (env.FORCE_COLOR === true || env.FORCE_COLOR === 'true') {
42642-
forceColor = 1;
42643-
} else if (env.FORCE_COLOR === false || env.FORCE_COLOR === 'false') {
42644-
forceColor = 0;
42645-
} else {
42646-
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
42647-
}
42640+
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
4264842641
}
4264942642

4265042643
function translateLevel(level) {
@@ -42661,7 +42654,7 @@ function translateLevel(level) {
4266142654
}
4266242655

4266342656
function supportsColor(stream) {
42664-
if (forceColor === 0) {
42657+
if (forceColor === false) {
4266542658
return 0;
4266642659
}
4266742660

@@ -42675,15 +42668,11 @@ function supportsColor(stream) {
4267542668
return 2;
4267642669
}
4267742670

42678-
if (stream && !stream.isTTY && forceColor === undefined) {
42671+
if (stream && !stream.isTTY && forceColor !== true) {
4267942672
return 0;
4268042673
}
4268142674

42682-
const min = forceColor || 0;
42683-
42684-
if (env.TERM === 'dumb') {
42685-
return min;
42686-
}
42675+
const min = forceColor ? 1 : 0;
4268742676

4268842677
if (process.platform === 'win32') {
4268942678
// Node.js 7.5.0 is the first version of Node.js to include a patch to
@@ -42744,6 +42733,10 @@ function supportsColor(stream) {
4274442733
return 1;
4274542734
}
4274642735

42736+
if (env.TERM === 'dumb') {
42737+
return min;
42738+
}
42739+
4274742740
return min;
4274842741
}
4274942742

0 commit comments

Comments
 (0)