@nsshunt/stsconfig 1.27.8 → 1.27.9
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/stsconfig.mjs +365 -338
- package/dist/stsconfig.mjs.map +1 -1
- package/dist/stsconfig.umd.js +365 -338
- package/dist/stsconfig.umd.js.map +1 -1
- package/package.json +4 -4
package/dist/stsconfig.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import dotenv from "dotenv";
|
|
|
3
3
|
function getDefaultExportFromCjs(x) {
|
|
4
4
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
5
5
|
}
|
|
6
|
-
var ansiStyles
|
|
6
|
+
var ansiStyles = { exports: {} };
|
|
7
7
|
var colorName;
|
|
8
8
|
var hasRequiredColorName;
|
|
9
9
|
function requireColorName() {
|
|
@@ -966,181 +966,200 @@ function requireColorConvert() {
|
|
|
966
966
|
colorConvert = convert;
|
|
967
967
|
return colorConvert;
|
|
968
968
|
}
|
|
969
|
-
ansiStyles
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
const
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
|
|
1009
|
-
if (sourceSpace === targetSpace) {
|
|
1010
|
-
styles2[name] = wrap(identity, offset);
|
|
1011
|
-
} else if (typeof suite === "object") {
|
|
1012
|
-
styles2[name] = wrap(suite[targetSpace], offset);
|
|
969
|
+
ansiStyles.exports;
|
|
970
|
+
var hasRequiredAnsiStyles;
|
|
971
|
+
function requireAnsiStyles() {
|
|
972
|
+
if (hasRequiredAnsiStyles) return ansiStyles.exports;
|
|
973
|
+
hasRequiredAnsiStyles = 1;
|
|
974
|
+
(function(module) {
|
|
975
|
+
const wrapAnsi16 = (fn, offset) => (...args) => {
|
|
976
|
+
const code = fn(...args);
|
|
977
|
+
return `\x1B[${code + offset}m`;
|
|
978
|
+
};
|
|
979
|
+
const wrapAnsi256 = (fn, offset) => (...args) => {
|
|
980
|
+
const code = fn(...args);
|
|
981
|
+
return `\x1B[${38 + offset};5;${code}m`;
|
|
982
|
+
};
|
|
983
|
+
const wrapAnsi16m = (fn, offset) => (...args) => {
|
|
984
|
+
const rgb = fn(...args);
|
|
985
|
+
return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
|
986
|
+
};
|
|
987
|
+
const ansi2ansi = (n) => n;
|
|
988
|
+
const rgb2rgb = (r, g, b) => [r, g, b];
|
|
989
|
+
const setLazyProperty = (object, property, get) => {
|
|
990
|
+
Object.defineProperty(object, property, {
|
|
991
|
+
get: () => {
|
|
992
|
+
const value = get();
|
|
993
|
+
Object.defineProperty(object, property, {
|
|
994
|
+
value,
|
|
995
|
+
enumerable: true,
|
|
996
|
+
configurable: true
|
|
997
|
+
});
|
|
998
|
+
return value;
|
|
999
|
+
},
|
|
1000
|
+
enumerable: true,
|
|
1001
|
+
configurable: true
|
|
1002
|
+
});
|
|
1003
|
+
};
|
|
1004
|
+
let colorConvert2;
|
|
1005
|
+
const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
|
|
1006
|
+
if (colorConvert2 === void 0) {
|
|
1007
|
+
colorConvert2 = requireColorConvert();
|
|
1013
1008
|
}
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
bold: [1, 22],
|
|
1024
|
-
dim: [2, 22],
|
|
1025
|
-
italic: [3, 23],
|
|
1026
|
-
underline: [4, 24],
|
|
1027
|
-
inverse: [7, 27],
|
|
1028
|
-
hidden: [8, 28],
|
|
1029
|
-
strikethrough: [9, 29]
|
|
1030
|
-
},
|
|
1031
|
-
color: {
|
|
1032
|
-
black: [30, 39],
|
|
1033
|
-
red: [31, 39],
|
|
1034
|
-
green: [32, 39],
|
|
1035
|
-
yellow: [33, 39],
|
|
1036
|
-
blue: [34, 39],
|
|
1037
|
-
magenta: [35, 39],
|
|
1038
|
-
cyan: [36, 39],
|
|
1039
|
-
white: [37, 39],
|
|
1040
|
-
// Bright color
|
|
1041
|
-
blackBright: [90, 39],
|
|
1042
|
-
redBright: [91, 39],
|
|
1043
|
-
greenBright: [92, 39],
|
|
1044
|
-
yellowBright: [93, 39],
|
|
1045
|
-
blueBright: [94, 39],
|
|
1046
|
-
magentaBright: [95, 39],
|
|
1047
|
-
cyanBright: [96, 39],
|
|
1048
|
-
whiteBright: [97, 39]
|
|
1049
|
-
},
|
|
1050
|
-
bgColor: {
|
|
1051
|
-
bgBlack: [40, 49],
|
|
1052
|
-
bgRed: [41, 49],
|
|
1053
|
-
bgGreen: [42, 49],
|
|
1054
|
-
bgYellow: [43, 49],
|
|
1055
|
-
bgBlue: [44, 49],
|
|
1056
|
-
bgMagenta: [45, 49],
|
|
1057
|
-
bgCyan: [46, 49],
|
|
1058
|
-
bgWhite: [47, 49],
|
|
1059
|
-
// Bright color
|
|
1060
|
-
bgBlackBright: [100, 49],
|
|
1061
|
-
bgRedBright: [101, 49],
|
|
1062
|
-
bgGreenBright: [102, 49],
|
|
1063
|
-
bgYellowBright: [103, 49],
|
|
1064
|
-
bgBlueBright: [104, 49],
|
|
1065
|
-
bgMagentaBright: [105, 49],
|
|
1066
|
-
bgCyanBright: [106, 49],
|
|
1067
|
-
bgWhiteBright: [107, 49]
|
|
1009
|
+
const offset = isBackground ? 10 : 0;
|
|
1010
|
+
const styles = {};
|
|
1011
|
+
for (const [sourceSpace, suite] of Object.entries(colorConvert2)) {
|
|
1012
|
+
const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
|
|
1013
|
+
if (sourceSpace === targetSpace) {
|
|
1014
|
+
styles[name] = wrap(identity, offset);
|
|
1015
|
+
} else if (typeof suite === "object") {
|
|
1016
|
+
styles[name] = wrap(suite[targetSpace], offset);
|
|
1017
|
+
}
|
|
1068
1018
|
}
|
|
1019
|
+
return styles;
|
|
1069
1020
|
};
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1021
|
+
function assembleStyles() {
|
|
1022
|
+
const codes = /* @__PURE__ */ new Map();
|
|
1023
|
+
const styles = {
|
|
1024
|
+
modifier: {
|
|
1025
|
+
reset: [0, 0],
|
|
1026
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
1027
|
+
bold: [1, 22],
|
|
1028
|
+
dim: [2, 22],
|
|
1029
|
+
italic: [3, 23],
|
|
1030
|
+
underline: [4, 24],
|
|
1031
|
+
inverse: [7, 27],
|
|
1032
|
+
hidden: [8, 28],
|
|
1033
|
+
strikethrough: [9, 29]
|
|
1034
|
+
},
|
|
1035
|
+
color: {
|
|
1036
|
+
black: [30, 39],
|
|
1037
|
+
red: [31, 39],
|
|
1038
|
+
green: [32, 39],
|
|
1039
|
+
yellow: [33, 39],
|
|
1040
|
+
blue: [34, 39],
|
|
1041
|
+
magenta: [35, 39],
|
|
1042
|
+
cyan: [36, 39],
|
|
1043
|
+
white: [37, 39],
|
|
1044
|
+
// Bright color
|
|
1045
|
+
blackBright: [90, 39],
|
|
1046
|
+
redBright: [91, 39],
|
|
1047
|
+
greenBright: [92, 39],
|
|
1048
|
+
yellowBright: [93, 39],
|
|
1049
|
+
blueBright: [94, 39],
|
|
1050
|
+
magentaBright: [95, 39],
|
|
1051
|
+
cyanBright: [96, 39],
|
|
1052
|
+
whiteBright: [97, 39]
|
|
1053
|
+
},
|
|
1054
|
+
bgColor: {
|
|
1055
|
+
bgBlack: [40, 49],
|
|
1056
|
+
bgRed: [41, 49],
|
|
1057
|
+
bgGreen: [42, 49],
|
|
1058
|
+
bgYellow: [43, 49],
|
|
1059
|
+
bgBlue: [44, 49],
|
|
1060
|
+
bgMagenta: [45, 49],
|
|
1061
|
+
bgCyan: [46, 49],
|
|
1062
|
+
bgWhite: [47, 49],
|
|
1063
|
+
// Bright color
|
|
1064
|
+
bgBlackBright: [100, 49],
|
|
1065
|
+
bgRedBright: [101, 49],
|
|
1066
|
+
bgGreenBright: [102, 49],
|
|
1067
|
+
bgYellowBright: [103, 49],
|
|
1068
|
+
bgBlueBright: [104, 49],
|
|
1069
|
+
bgMagentaBright: [105, 49],
|
|
1070
|
+
bgCyanBright: [106, 49],
|
|
1071
|
+
bgWhiteBright: [107, 49]
|
|
1072
|
+
}
|
|
1073
|
+
};
|
|
1074
|
+
styles.color.gray = styles.color.blackBright;
|
|
1075
|
+
styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
|
|
1076
|
+
styles.color.grey = styles.color.blackBright;
|
|
1077
|
+
styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
|
|
1078
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
1079
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
1080
|
+
styles[styleName] = {
|
|
1081
|
+
open: `\x1B[${style[0]}m`,
|
|
1082
|
+
close: `\x1B[${style[1]}m`
|
|
1083
|
+
};
|
|
1084
|
+
group[styleName] = styles[styleName];
|
|
1085
|
+
codes.set(style[0], style[1]);
|
|
1086
|
+
}
|
|
1087
|
+
Object.defineProperty(styles, groupName, {
|
|
1088
|
+
value: group,
|
|
1089
|
+
enumerable: false
|
|
1090
|
+
});
|
|
1082
1091
|
}
|
|
1083
|
-
Object.defineProperty(
|
|
1084
|
-
value:
|
|
1092
|
+
Object.defineProperty(styles, "codes", {
|
|
1093
|
+
value: codes,
|
|
1085
1094
|
enumerable: false
|
|
1086
1095
|
});
|
|
1096
|
+
styles.color.close = "\x1B[39m";
|
|
1097
|
+
styles.bgColor.close = "\x1B[49m";
|
|
1098
|
+
setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
|
|
1099
|
+
setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
|
|
1100
|
+
setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
|
|
1101
|
+
setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
|
|
1102
|
+
setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
|
|
1103
|
+
setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
|
|
1104
|
+
return styles;
|
|
1087
1105
|
}
|
|
1088
|
-
Object.defineProperty(
|
|
1089
|
-
|
|
1090
|
-
|
|
1106
|
+
Object.defineProperty(module, "exports", {
|
|
1107
|
+
enumerable: true,
|
|
1108
|
+
get: assembleStyles
|
|
1091
1109
|
});
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
var
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1110
|
+
})(ansiStyles);
|
|
1111
|
+
return ansiStyles.exports;
|
|
1112
|
+
}
|
|
1113
|
+
var browser;
|
|
1114
|
+
var hasRequiredBrowser;
|
|
1115
|
+
function requireBrowser() {
|
|
1116
|
+
if (hasRequiredBrowser) return browser;
|
|
1117
|
+
hasRequiredBrowser = 1;
|
|
1118
|
+
browser = {
|
|
1119
|
+
stdout: false,
|
|
1120
|
+
stderr: false
|
|
1121
|
+
};
|
|
1122
|
+
return browser;
|
|
1123
|
+
}
|
|
1124
|
+
var util;
|
|
1125
|
+
var hasRequiredUtil;
|
|
1126
|
+
function requireUtil() {
|
|
1127
|
+
if (hasRequiredUtil) return util;
|
|
1128
|
+
hasRequiredUtil = 1;
|
|
1129
|
+
const stringReplaceAll = (string, substring, replacer) => {
|
|
1130
|
+
let index = string.indexOf(substring);
|
|
1131
|
+
if (index === -1) {
|
|
1132
|
+
return string;
|
|
1133
|
+
}
|
|
1134
|
+
const substringLength = substring.length;
|
|
1135
|
+
let endIndex = 0;
|
|
1136
|
+
let returnValue = "";
|
|
1137
|
+
do {
|
|
1138
|
+
returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
|
|
1139
|
+
endIndex = index + substringLength;
|
|
1140
|
+
index = string.indexOf(substring, endIndex);
|
|
1141
|
+
} while (index !== -1);
|
|
1142
|
+
returnValue += string.substr(endIndex);
|
|
1143
|
+
return returnValue;
|
|
1144
|
+
};
|
|
1145
|
+
const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
|
|
1146
|
+
let endIndex = 0;
|
|
1147
|
+
let returnValue = "";
|
|
1148
|
+
do {
|
|
1149
|
+
const gotCR = string[index - 1] === "\r";
|
|
1150
|
+
returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
1151
|
+
endIndex = index + 1;
|
|
1152
|
+
index = string.indexOf("\n", endIndex);
|
|
1153
|
+
} while (index !== -1);
|
|
1154
|
+
returnValue += string.substr(endIndex);
|
|
1155
|
+
return returnValue;
|
|
1156
|
+
};
|
|
1157
|
+
util = {
|
|
1158
|
+
stringReplaceAll,
|
|
1159
|
+
stringEncaseCRLFWithFirstIndex
|
|
1160
|
+
};
|
|
1161
|
+
return util;
|
|
1162
|
+
}
|
|
1144
1163
|
var templates;
|
|
1145
1164
|
var hasRequiredTemplates;
|
|
1146
1165
|
function requireTemplates() {
|
|
@@ -1204,27 +1223,27 @@ function requireTemplates() {
|
|
|
1204
1223
|
}
|
|
1205
1224
|
return results;
|
|
1206
1225
|
}
|
|
1207
|
-
function buildStyle(chalk2,
|
|
1226
|
+
function buildStyle(chalk2, styles) {
|
|
1208
1227
|
const enabled = {};
|
|
1209
|
-
for (const layer of
|
|
1228
|
+
for (const layer of styles) {
|
|
1210
1229
|
for (const style of layer.styles) {
|
|
1211
1230
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
1212
1231
|
}
|
|
1213
1232
|
}
|
|
1214
1233
|
let current = chalk2;
|
|
1215
|
-
for (const [styleName,
|
|
1216
|
-
if (!Array.isArray(
|
|
1234
|
+
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
1235
|
+
if (!Array.isArray(styles2)) {
|
|
1217
1236
|
continue;
|
|
1218
1237
|
}
|
|
1219
1238
|
if (!(styleName in current)) {
|
|
1220
1239
|
throw new Error(`Unknown Chalk style: ${styleName}`);
|
|
1221
1240
|
}
|
|
1222
|
-
current =
|
|
1241
|
+
current = styles2.length > 0 ? current[styleName](...styles2) : current[styleName];
|
|
1223
1242
|
}
|
|
1224
1243
|
return current;
|
|
1225
1244
|
}
|
|
1226
1245
|
templates = (chalk2, temporary) => {
|
|
1227
|
-
const
|
|
1246
|
+
const styles = [];
|
|
1228
1247
|
const chunks = [];
|
|
1229
1248
|
let chunk = [];
|
|
1230
1249
|
temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
|
|
@@ -1233,200 +1252,208 @@ function requireTemplates() {
|
|
|
1233
1252
|
} else if (style) {
|
|
1234
1253
|
const string = chunk.join("");
|
|
1235
1254
|
chunk = [];
|
|
1236
|
-
chunks.push(
|
|
1237
|
-
|
|
1255
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk2, styles)(string));
|
|
1256
|
+
styles.push({ inverse, styles: parseStyle(style) });
|
|
1238
1257
|
} else if (close) {
|
|
1239
|
-
if (
|
|
1258
|
+
if (styles.length === 0) {
|
|
1240
1259
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
1241
1260
|
}
|
|
1242
|
-
chunks.push(buildStyle(chalk2,
|
|
1261
|
+
chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
|
|
1243
1262
|
chunk = [];
|
|
1244
|
-
|
|
1263
|
+
styles.pop();
|
|
1245
1264
|
} else {
|
|
1246
1265
|
chunk.push(character);
|
|
1247
1266
|
}
|
|
1248
1267
|
});
|
|
1249
1268
|
chunks.push(chunk.join(""));
|
|
1250
|
-
if (
|
|
1251
|
-
const errMessage = `Chalk template literal is missing ${
|
|
1269
|
+
if (styles.length > 0) {
|
|
1270
|
+
const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
|
|
1252
1271
|
throw new Error(errMessage);
|
|
1253
1272
|
}
|
|
1254
1273
|
return chunks.join("");
|
|
1255
1274
|
};
|
|
1256
1275
|
return templates;
|
|
1257
1276
|
}
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
const {
|
|
1265
|
-
const
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1277
|
+
var source;
|
|
1278
|
+
var hasRequiredSource;
|
|
1279
|
+
function requireSource() {
|
|
1280
|
+
if (hasRequiredSource) return source;
|
|
1281
|
+
hasRequiredSource = 1;
|
|
1282
|
+
const ansiStyles2 = requireAnsiStyles();
|
|
1283
|
+
const { stdout: stdoutColor, stderr: stderrColor } = requireBrowser();
|
|
1284
|
+
const {
|
|
1285
|
+
stringReplaceAll,
|
|
1286
|
+
stringEncaseCRLFWithFirstIndex
|
|
1287
|
+
} = requireUtil();
|
|
1288
|
+
const { isArray } = Array;
|
|
1289
|
+
const levelMapping = [
|
|
1290
|
+
"ansi",
|
|
1291
|
+
"ansi",
|
|
1292
|
+
"ansi256",
|
|
1293
|
+
"ansi16m"
|
|
1294
|
+
];
|
|
1295
|
+
const styles = /* @__PURE__ */ Object.create(null);
|
|
1296
|
+
const applyOptions = (object, options = {}) => {
|
|
1297
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
1298
|
+
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
1299
|
+
}
|
|
1300
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
1301
|
+
object.level = options.level === void 0 ? colorLevel : options.level;
|
|
1302
|
+
};
|
|
1303
|
+
class ChalkClass {
|
|
1304
|
+
constructor(options) {
|
|
1305
|
+
return chalkFactory(options);
|
|
1306
|
+
}
|
|
1275
1307
|
}
|
|
1276
|
-
const
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1308
|
+
const chalkFactory = (options) => {
|
|
1309
|
+
const chalk3 = {};
|
|
1310
|
+
applyOptions(chalk3, options);
|
|
1311
|
+
chalk3.template = (...arguments_) => chalkTag(chalk3.template, ...arguments_);
|
|
1312
|
+
Object.setPrototypeOf(chalk3, Chalk.prototype);
|
|
1313
|
+
Object.setPrototypeOf(chalk3.template, chalk3);
|
|
1314
|
+
chalk3.template.constructor = () => {
|
|
1315
|
+
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
1316
|
+
};
|
|
1317
|
+
chalk3.template.Instance = ChalkClass;
|
|
1318
|
+
return chalk3.template;
|
|
1319
|
+
};
|
|
1320
|
+
function Chalk(options) {
|
|
1281
1321
|
return chalkFactory(options);
|
|
1282
1322
|
}
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
chalk2.template.Instance = ChalkClass;
|
|
1294
|
-
return chalk2.template;
|
|
1295
|
-
};
|
|
1296
|
-
function Chalk(options) {
|
|
1297
|
-
return chalkFactory(options);
|
|
1298
|
-
}
|
|
1299
|
-
for (const [styleName, style] of Object.entries(ansiStyles)) {
|
|
1300
|
-
styles[styleName] = {
|
|
1323
|
+
for (const [styleName, style] of Object.entries(ansiStyles2)) {
|
|
1324
|
+
styles[styleName] = {
|
|
1325
|
+
get() {
|
|
1326
|
+
const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
|
|
1327
|
+
Object.defineProperty(this, styleName, { value: builder });
|
|
1328
|
+
return builder;
|
|
1329
|
+
}
|
|
1330
|
+
};
|
|
1331
|
+
}
|
|
1332
|
+
styles.visible = {
|
|
1301
1333
|
get() {
|
|
1302
|
-
const builder = createBuilder(this,
|
|
1303
|
-
Object.defineProperty(this,
|
|
1334
|
+
const builder = createBuilder(this, this._styler, true);
|
|
1335
|
+
Object.defineProperty(this, "visible", { value: builder });
|
|
1304
1336
|
return builder;
|
|
1305
1337
|
}
|
|
1306
1338
|
};
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1339
|
+
const usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
|
|
1340
|
+
for (const model of usedModels) {
|
|
1341
|
+
styles[model] = {
|
|
1342
|
+
get() {
|
|
1343
|
+
const { level } = this;
|
|
1344
|
+
return function(...arguments_) {
|
|
1345
|
+
const styler = createStyler(ansiStyles2.color[levelMapping[level]][model](...arguments_), ansiStyles2.color.close, this._styler);
|
|
1346
|
+
return createBuilder(this, styler, this._isEmpty);
|
|
1347
|
+
};
|
|
1348
|
+
}
|
|
1349
|
+
};
|
|
1313
1350
|
}
|
|
1314
|
-
|
|
1315
|
-
const
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
}
|
|
1351
|
+
for (const model of usedModels) {
|
|
1352
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
1353
|
+
styles[bgModel] = {
|
|
1354
|
+
get() {
|
|
1355
|
+
const { level } = this;
|
|
1356
|
+
return function(...arguments_) {
|
|
1357
|
+
const styler = createStyler(ansiStyles2.bgColor[levelMapping[level]][model](...arguments_), ansiStyles2.bgColor.close, this._styler);
|
|
1358
|
+
return createBuilder(this, styler, this._isEmpty);
|
|
1359
|
+
};
|
|
1360
|
+
}
|
|
1361
|
+
};
|
|
1362
|
+
}
|
|
1363
|
+
const proto = Object.defineProperties(() => {
|
|
1364
|
+
}, {
|
|
1365
|
+
...styles,
|
|
1366
|
+
level: {
|
|
1367
|
+
enumerable: true,
|
|
1368
|
+
get() {
|
|
1369
|
+
return this._generator.level;
|
|
1370
|
+
},
|
|
1371
|
+
set(level) {
|
|
1372
|
+
this._generator.level = level;
|
|
1373
|
+
}
|
|
1324
1374
|
}
|
|
1325
|
-
};
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
};
|
|
1375
|
+
});
|
|
1376
|
+
const createStyler = (open, close, parent) => {
|
|
1377
|
+
let openAll;
|
|
1378
|
+
let closeAll;
|
|
1379
|
+
if (parent === void 0) {
|
|
1380
|
+
openAll = open;
|
|
1381
|
+
closeAll = close;
|
|
1382
|
+
} else {
|
|
1383
|
+
openAll = parent.openAll + open;
|
|
1384
|
+
closeAll = close + parent.closeAll;
|
|
1336
1385
|
}
|
|
1386
|
+
return {
|
|
1387
|
+
open,
|
|
1388
|
+
close,
|
|
1389
|
+
openAll,
|
|
1390
|
+
closeAll,
|
|
1391
|
+
parent
|
|
1392
|
+
};
|
|
1337
1393
|
};
|
|
1338
|
-
|
|
1339
|
-
const
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
}
|
|
1351
|
-
});
|
|
1352
|
-
const createStyler = (open, close, parent) => {
|
|
1353
|
-
let openAll;
|
|
1354
|
-
let closeAll;
|
|
1355
|
-
if (parent === void 0) {
|
|
1356
|
-
openAll = open;
|
|
1357
|
-
closeAll = close;
|
|
1358
|
-
} else {
|
|
1359
|
-
openAll = parent.openAll + open;
|
|
1360
|
-
closeAll = close + parent.closeAll;
|
|
1361
|
-
}
|
|
1362
|
-
return {
|
|
1363
|
-
open,
|
|
1364
|
-
close,
|
|
1365
|
-
openAll,
|
|
1366
|
-
closeAll,
|
|
1367
|
-
parent
|
|
1394
|
+
const createBuilder = (self, _styler, _isEmpty) => {
|
|
1395
|
+
const builder = (...arguments_) => {
|
|
1396
|
+
if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
|
|
1397
|
+
return applyStyle(builder, chalkTag(builder, ...arguments_));
|
|
1398
|
+
}
|
|
1399
|
+
return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
1400
|
+
};
|
|
1401
|
+
Object.setPrototypeOf(builder, proto);
|
|
1402
|
+
builder._generator = self;
|
|
1403
|
+
builder._styler = _styler;
|
|
1404
|
+
builder._isEmpty = _isEmpty;
|
|
1405
|
+
return builder;
|
|
1368
1406
|
};
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
|
|
1373
|
-
return applyStyle(builder, chalkTag(builder, ...arguments_));
|
|
1407
|
+
const applyStyle = (self, string) => {
|
|
1408
|
+
if (self.level <= 0 || !string) {
|
|
1409
|
+
return self._isEmpty ? "" : string;
|
|
1374
1410
|
}
|
|
1375
|
-
|
|
1411
|
+
let styler = self._styler;
|
|
1412
|
+
if (styler === void 0) {
|
|
1413
|
+
return string;
|
|
1414
|
+
}
|
|
1415
|
+
const { openAll, closeAll } = styler;
|
|
1416
|
+
if (string.indexOf("\x1B") !== -1) {
|
|
1417
|
+
while (styler !== void 0) {
|
|
1418
|
+
string = stringReplaceAll(string, styler.close, styler.open);
|
|
1419
|
+
styler = styler.parent;
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
const lfIndex = string.indexOf("\n");
|
|
1423
|
+
if (lfIndex !== -1) {
|
|
1424
|
+
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
1425
|
+
}
|
|
1426
|
+
return openAll + string + closeAll;
|
|
1376
1427
|
};
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
};
|
|
1383
|
-
const applyStyle = (self, string) => {
|
|
1384
|
-
if (self.level <= 0 || !string) {
|
|
1385
|
-
return self._isEmpty ? "" : string;
|
|
1386
|
-
}
|
|
1387
|
-
let styler = self._styler;
|
|
1388
|
-
if (styler === void 0) {
|
|
1389
|
-
return string;
|
|
1390
|
-
}
|
|
1391
|
-
const { openAll, closeAll } = styler;
|
|
1392
|
-
if (string.indexOf("\x1B") !== -1) {
|
|
1393
|
-
while (styler !== void 0) {
|
|
1394
|
-
string = stringReplaceAll(string, styler.close, styler.open);
|
|
1395
|
-
styler = styler.parent;
|
|
1428
|
+
let template;
|
|
1429
|
+
const chalkTag = (chalk3, ...strings) => {
|
|
1430
|
+
const [firstString] = strings;
|
|
1431
|
+
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
1432
|
+
return strings.join(" ");
|
|
1396
1433
|
}
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
return
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
const
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
}
|
|
1421
|
-
return template(chalk2, parts.join(""));
|
|
1422
|
-
};
|
|
1423
|
-
Object.defineProperties(Chalk.prototype, styles);
|
|
1424
|
-
const chalk = Chalk();
|
|
1425
|
-
chalk.supportsColor = stdoutColor;
|
|
1426
|
-
chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
1427
|
-
chalk.stderr.supportsColor = stderrColor;
|
|
1428
|
-
var source = chalk;
|
|
1429
|
-
const chalk$1 = /* @__PURE__ */ getDefaultExportFromCjs(source);
|
|
1434
|
+
const arguments_ = strings.slice(1);
|
|
1435
|
+
const parts = [firstString.raw[0]];
|
|
1436
|
+
for (let i = 1; i < firstString.length; i++) {
|
|
1437
|
+
parts.push(
|
|
1438
|
+
String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
|
|
1439
|
+
String(firstString.raw[i])
|
|
1440
|
+
);
|
|
1441
|
+
}
|
|
1442
|
+
if (template === void 0) {
|
|
1443
|
+
template = requireTemplates();
|
|
1444
|
+
}
|
|
1445
|
+
return template(chalk3, parts.join(""));
|
|
1446
|
+
};
|
|
1447
|
+
Object.defineProperties(Chalk.prototype, styles);
|
|
1448
|
+
const chalk2 = Chalk();
|
|
1449
|
+
chalk2.supportsColor = stdoutColor;
|
|
1450
|
+
chalk2.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
1451
|
+
chalk2.stderr.supportsColor = stderrColor;
|
|
1452
|
+
source = chalk2;
|
|
1453
|
+
return source;
|
|
1454
|
+
}
|
|
1455
|
+
var sourceExports = requireSource();
|
|
1456
|
+
const chalk = /* @__PURE__ */ getDefaultExportFromCjs(sourceExports);
|
|
1430
1457
|
const envOptions = {};
|
|
1431
1458
|
function SetupConfig(envOptions2, logger) {
|
|
1432
1459
|
const envfile = process.env.STSENVFILE === void 0 ? "/.env" : process.env.STSENVFILE;
|