@nsshunt/stsutils 1.19.16 → 1.19.18

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