@wix/bex-utils 1.33.0 → 1.35.0
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/@wix/bex-bundled-mini-essentials/dist/cjs/bex-bundled-mini-essentials.js +22 -34
- package/@wix/bex-bundled-mini-essentials/dist/cjs/bex-bundled-mini-essentials.js.map +1 -1
- package/@wix/bex-bundled-mini-essentials/dist/cjs/exports/http-client/testkit/client.js +22 -34
- package/@wix/bex-bundled-mini-essentials/dist/cjs/exports/http-client/testkit/client.js.map +1 -1
- package/@wix/bex-bundled-mini-essentials/dist/cjs/exports/testkit/index.js +22 -34
- package/@wix/bex-bundled-mini-essentials/dist/cjs/exports/testkit/index.js.map +1 -1
- package/@wix/bex-bundled-mini-essentials/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
|
@@ -1486,21 +1486,19 @@ var require_supports_color = __commonJS({
|
|
|
1486
1486
|
var tty = require("tty");
|
|
1487
1487
|
var hasFlag = require_has_flag();
|
|
1488
1488
|
var { env: env3 } = process;
|
|
1489
|
-
var
|
|
1489
|
+
var forceColor;
|
|
1490
1490
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
1491
|
-
|
|
1491
|
+
forceColor = 0;
|
|
1492
1492
|
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
1493
|
-
|
|
1493
|
+
forceColor = 1;
|
|
1494
1494
|
}
|
|
1495
|
-
|
|
1496
|
-
if (
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
}
|
|
1503
|
-
return env3.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env3.FORCE_COLOR, 10), 3);
|
|
1495
|
+
if ("FORCE_COLOR" in env3) {
|
|
1496
|
+
if (env3.FORCE_COLOR === "true") {
|
|
1497
|
+
forceColor = 1;
|
|
1498
|
+
} else if (env3.FORCE_COLOR === "false") {
|
|
1499
|
+
forceColor = 0;
|
|
1500
|
+
} else {
|
|
1501
|
+
forceColor = env3.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env3.FORCE_COLOR, 10), 3);
|
|
1504
1502
|
}
|
|
1505
1503
|
}
|
|
1506
1504
|
function translateLevel(level) {
|
|
@@ -1514,22 +1512,15 @@ var require_supports_color = __commonJS({
|
|
|
1514
1512
|
has16m: level >= 3
|
|
1515
1513
|
};
|
|
1516
1514
|
}
|
|
1517
|
-
function supportsColor(haveStream,
|
|
1518
|
-
const noFlagForceColor = envForceColor();
|
|
1519
|
-
if (noFlagForceColor !== void 0) {
|
|
1520
|
-
flagForceColor = noFlagForceColor;
|
|
1521
|
-
}
|
|
1522
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
1515
|
+
function supportsColor(haveStream, streamIsTTY) {
|
|
1523
1516
|
if (forceColor === 0) {
|
|
1524
1517
|
return 0;
|
|
1525
1518
|
}
|
|
1526
|
-
if (
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
return 2;
|
|
1532
|
-
}
|
|
1519
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
1520
|
+
return 3;
|
|
1521
|
+
}
|
|
1522
|
+
if (hasFlag("color=256")) {
|
|
1523
|
+
return 2;
|
|
1533
1524
|
}
|
|
1534
1525
|
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
1535
1526
|
return 0;
|
|
@@ -1546,7 +1537,7 @@ var require_supports_color = __commonJS({
|
|
|
1546
1537
|
return 1;
|
|
1547
1538
|
}
|
|
1548
1539
|
if ("CI" in env3) {
|
|
1549
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"
|
|
1540
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env3) || env3.CI_NAME === "codeship") {
|
|
1550
1541
|
return 1;
|
|
1551
1542
|
}
|
|
1552
1543
|
return min;
|
|
@@ -1558,7 +1549,7 @@ var require_supports_color = __commonJS({
|
|
|
1558
1549
|
return 3;
|
|
1559
1550
|
}
|
|
1560
1551
|
if ("TERM_PROGRAM" in env3) {
|
|
1561
|
-
const version =
|
|
1552
|
+
const version = parseInt((env3.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
1562
1553
|
switch (env3.TERM_PROGRAM) {
|
|
1563
1554
|
case "iTerm.app":
|
|
1564
1555
|
return version >= 3 ? 3 : 2;
|
|
@@ -1577,17 +1568,14 @@ var require_supports_color = __commonJS({
|
|
|
1577
1568
|
}
|
|
1578
1569
|
return min;
|
|
1579
1570
|
}
|
|
1580
|
-
function getSupportLevel(stream
|
|
1581
|
-
const level = supportsColor(stream,
|
|
1582
|
-
streamIsTTY: stream && stream.isTTY,
|
|
1583
|
-
...options
|
|
1584
|
-
});
|
|
1571
|
+
function getSupportLevel(stream) {
|
|
1572
|
+
const level = supportsColor(stream, stream && stream.isTTY);
|
|
1585
1573
|
return translateLevel(level);
|
|
1586
1574
|
}
|
|
1587
1575
|
module2.exports = {
|
|
1588
1576
|
supportsColor: getSupportLevel,
|
|
1589
|
-
stdout:
|
|
1590
|
-
stderr:
|
|
1577
|
+
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
1578
|
+
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
1591
1579
|
};
|
|
1592
1580
|
}
|
|
1593
1581
|
});
|