@nsshunt/stsoauth2plugin 1.0.122 → 1.0.124
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/stsoauth2plugin.mjs +639 -596
- package/dist/stsoauth2plugin.mjs.map +1 -1
- package/dist/stsoauth2plugin.umd.js +639 -596
- package/dist/stsoauth2plugin.umd.js.map +1 -1
- package/package.json +8 -11
|
@@ -44,7 +44,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
44
44
|
function getDefaultExportFromCjs(x) {
|
|
45
45
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
46
46
|
}
|
|
47
|
-
var ansiStyles
|
|
47
|
+
var ansiStyles = { exports: {} };
|
|
48
48
|
var colorName;
|
|
49
49
|
var hasRequiredColorName;
|
|
50
50
|
function requireColorName() {
|
|
@@ -1007,181 +1007,200 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1007
1007
|
colorConvert = convert;
|
|
1008
1008
|
return colorConvert;
|
|
1009
1009
|
}
|
|
1010
|
-
ansiStyles
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
const
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
|
|
1050
|
-
if (sourceSpace === targetSpace) {
|
|
1051
|
-
styles2[name] = wrap(identity, offset);
|
|
1052
|
-
} else if (typeof suite === "object") {
|
|
1053
|
-
styles2[name] = wrap(suite[targetSpace], offset);
|
|
1010
|
+
ansiStyles.exports;
|
|
1011
|
+
var hasRequiredAnsiStyles;
|
|
1012
|
+
function requireAnsiStyles() {
|
|
1013
|
+
if (hasRequiredAnsiStyles) return ansiStyles.exports;
|
|
1014
|
+
hasRequiredAnsiStyles = 1;
|
|
1015
|
+
(function(module2) {
|
|
1016
|
+
const wrapAnsi16 = (fn, offset) => (...args) => {
|
|
1017
|
+
const code = fn(...args);
|
|
1018
|
+
return `\x1B[${code + offset}m`;
|
|
1019
|
+
};
|
|
1020
|
+
const wrapAnsi256 = (fn, offset) => (...args) => {
|
|
1021
|
+
const code = fn(...args);
|
|
1022
|
+
return `\x1B[${38 + offset};5;${code}m`;
|
|
1023
|
+
};
|
|
1024
|
+
const wrapAnsi16m = (fn, offset) => (...args) => {
|
|
1025
|
+
const rgb = fn(...args);
|
|
1026
|
+
return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
|
|
1027
|
+
};
|
|
1028
|
+
const ansi2ansi = (n) => n;
|
|
1029
|
+
const rgb2rgb = (r, g, b) => [r, g, b];
|
|
1030
|
+
const setLazyProperty = (object, property, get) => {
|
|
1031
|
+
Object.defineProperty(object, property, {
|
|
1032
|
+
get: () => {
|
|
1033
|
+
const value = get();
|
|
1034
|
+
Object.defineProperty(object, property, {
|
|
1035
|
+
value,
|
|
1036
|
+
enumerable: true,
|
|
1037
|
+
configurable: true
|
|
1038
|
+
});
|
|
1039
|
+
return value;
|
|
1040
|
+
},
|
|
1041
|
+
enumerable: true,
|
|
1042
|
+
configurable: true
|
|
1043
|
+
});
|
|
1044
|
+
};
|
|
1045
|
+
let colorConvert2;
|
|
1046
|
+
const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
|
|
1047
|
+
if (colorConvert2 === void 0) {
|
|
1048
|
+
colorConvert2 = requireColorConvert();
|
|
1054
1049
|
}
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
bold: [1, 22],
|
|
1065
|
-
dim: [2, 22],
|
|
1066
|
-
italic: [3, 23],
|
|
1067
|
-
underline: [4, 24],
|
|
1068
|
-
inverse: [7, 27],
|
|
1069
|
-
hidden: [8, 28],
|
|
1070
|
-
strikethrough: [9, 29]
|
|
1071
|
-
},
|
|
1072
|
-
color: {
|
|
1073
|
-
black: [30, 39],
|
|
1074
|
-
red: [31, 39],
|
|
1075
|
-
green: [32, 39],
|
|
1076
|
-
yellow: [33, 39],
|
|
1077
|
-
blue: [34, 39],
|
|
1078
|
-
magenta: [35, 39],
|
|
1079
|
-
cyan: [36, 39],
|
|
1080
|
-
white: [37, 39],
|
|
1081
|
-
// Bright color
|
|
1082
|
-
blackBright: [90, 39],
|
|
1083
|
-
redBright: [91, 39],
|
|
1084
|
-
greenBright: [92, 39],
|
|
1085
|
-
yellowBright: [93, 39],
|
|
1086
|
-
blueBright: [94, 39],
|
|
1087
|
-
magentaBright: [95, 39],
|
|
1088
|
-
cyanBright: [96, 39],
|
|
1089
|
-
whiteBright: [97, 39]
|
|
1090
|
-
},
|
|
1091
|
-
bgColor: {
|
|
1092
|
-
bgBlack: [40, 49],
|
|
1093
|
-
bgRed: [41, 49],
|
|
1094
|
-
bgGreen: [42, 49],
|
|
1095
|
-
bgYellow: [43, 49],
|
|
1096
|
-
bgBlue: [44, 49],
|
|
1097
|
-
bgMagenta: [45, 49],
|
|
1098
|
-
bgCyan: [46, 49],
|
|
1099
|
-
bgWhite: [47, 49],
|
|
1100
|
-
// Bright color
|
|
1101
|
-
bgBlackBright: [100, 49],
|
|
1102
|
-
bgRedBright: [101, 49],
|
|
1103
|
-
bgGreenBright: [102, 49],
|
|
1104
|
-
bgYellowBright: [103, 49],
|
|
1105
|
-
bgBlueBright: [104, 49],
|
|
1106
|
-
bgMagentaBright: [105, 49],
|
|
1107
|
-
bgCyanBright: [106, 49],
|
|
1108
|
-
bgWhiteBright: [107, 49]
|
|
1050
|
+
const offset = isBackground ? 10 : 0;
|
|
1051
|
+
const styles = {};
|
|
1052
|
+
for (const [sourceSpace, suite] of Object.entries(colorConvert2)) {
|
|
1053
|
+
const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
|
|
1054
|
+
if (sourceSpace === targetSpace) {
|
|
1055
|
+
styles[name] = wrap(identity, offset);
|
|
1056
|
+
} else if (typeof suite === "object") {
|
|
1057
|
+
styles[name] = wrap(suite[targetSpace], offset);
|
|
1058
|
+
}
|
|
1109
1059
|
}
|
|
1060
|
+
return styles;
|
|
1110
1061
|
};
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1062
|
+
function assembleStyles() {
|
|
1063
|
+
const codes = /* @__PURE__ */ new Map();
|
|
1064
|
+
const styles = {
|
|
1065
|
+
modifier: {
|
|
1066
|
+
reset: [0, 0],
|
|
1067
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
1068
|
+
bold: [1, 22],
|
|
1069
|
+
dim: [2, 22],
|
|
1070
|
+
italic: [3, 23],
|
|
1071
|
+
underline: [4, 24],
|
|
1072
|
+
inverse: [7, 27],
|
|
1073
|
+
hidden: [8, 28],
|
|
1074
|
+
strikethrough: [9, 29]
|
|
1075
|
+
},
|
|
1076
|
+
color: {
|
|
1077
|
+
black: [30, 39],
|
|
1078
|
+
red: [31, 39],
|
|
1079
|
+
green: [32, 39],
|
|
1080
|
+
yellow: [33, 39],
|
|
1081
|
+
blue: [34, 39],
|
|
1082
|
+
magenta: [35, 39],
|
|
1083
|
+
cyan: [36, 39],
|
|
1084
|
+
white: [37, 39],
|
|
1085
|
+
// Bright color
|
|
1086
|
+
blackBright: [90, 39],
|
|
1087
|
+
redBright: [91, 39],
|
|
1088
|
+
greenBright: [92, 39],
|
|
1089
|
+
yellowBright: [93, 39],
|
|
1090
|
+
blueBright: [94, 39],
|
|
1091
|
+
magentaBright: [95, 39],
|
|
1092
|
+
cyanBright: [96, 39],
|
|
1093
|
+
whiteBright: [97, 39]
|
|
1094
|
+
},
|
|
1095
|
+
bgColor: {
|
|
1096
|
+
bgBlack: [40, 49],
|
|
1097
|
+
bgRed: [41, 49],
|
|
1098
|
+
bgGreen: [42, 49],
|
|
1099
|
+
bgYellow: [43, 49],
|
|
1100
|
+
bgBlue: [44, 49],
|
|
1101
|
+
bgMagenta: [45, 49],
|
|
1102
|
+
bgCyan: [46, 49],
|
|
1103
|
+
bgWhite: [47, 49],
|
|
1104
|
+
// Bright color
|
|
1105
|
+
bgBlackBright: [100, 49],
|
|
1106
|
+
bgRedBright: [101, 49],
|
|
1107
|
+
bgGreenBright: [102, 49],
|
|
1108
|
+
bgYellowBright: [103, 49],
|
|
1109
|
+
bgBlueBright: [104, 49],
|
|
1110
|
+
bgMagentaBright: [105, 49],
|
|
1111
|
+
bgCyanBright: [106, 49],
|
|
1112
|
+
bgWhiteBright: [107, 49]
|
|
1113
|
+
}
|
|
1114
|
+
};
|
|
1115
|
+
styles.color.gray = styles.color.blackBright;
|
|
1116
|
+
styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
|
|
1117
|
+
styles.color.grey = styles.color.blackBright;
|
|
1118
|
+
styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
|
|
1119
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
1120
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
1121
|
+
styles[styleName] = {
|
|
1122
|
+
open: `\x1B[${style[0]}m`,
|
|
1123
|
+
close: `\x1B[${style[1]}m`
|
|
1124
|
+
};
|
|
1125
|
+
group[styleName] = styles[styleName];
|
|
1126
|
+
codes.set(style[0], style[1]);
|
|
1127
|
+
}
|
|
1128
|
+
Object.defineProperty(styles, groupName, {
|
|
1129
|
+
value: group,
|
|
1130
|
+
enumerable: false
|
|
1131
|
+
});
|
|
1123
1132
|
}
|
|
1124
|
-
Object.defineProperty(
|
|
1125
|
-
value:
|
|
1133
|
+
Object.defineProperty(styles, "codes", {
|
|
1134
|
+
value: codes,
|
|
1126
1135
|
enumerable: false
|
|
1127
1136
|
});
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1137
|
+
styles.color.close = "\x1B[39m";
|
|
1138
|
+
styles.bgColor.close = "\x1B[49m";
|
|
1139
|
+
setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
|
|
1140
|
+
setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
|
|
1141
|
+
setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
|
|
1142
|
+
setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
|
|
1143
|
+
setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
|
|
1144
|
+
setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
|
|
1145
|
+
return styles;
|
|
1146
|
+
}
|
|
1147
|
+
Object.defineProperty(module2, "exports", {
|
|
1148
|
+
enumerable: true,
|
|
1149
|
+
get: assembleStyles
|
|
1132
1150
|
});
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
var
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1151
|
+
})(ansiStyles);
|
|
1152
|
+
return ansiStyles.exports;
|
|
1153
|
+
}
|
|
1154
|
+
var browser;
|
|
1155
|
+
var hasRequiredBrowser;
|
|
1156
|
+
function requireBrowser() {
|
|
1157
|
+
if (hasRequiredBrowser) return browser;
|
|
1158
|
+
hasRequiredBrowser = 1;
|
|
1159
|
+
browser = {
|
|
1160
|
+
stdout: false,
|
|
1161
|
+
stderr: false
|
|
1162
|
+
};
|
|
1163
|
+
return browser;
|
|
1164
|
+
}
|
|
1165
|
+
var util;
|
|
1166
|
+
var hasRequiredUtil;
|
|
1167
|
+
function requireUtil() {
|
|
1168
|
+
if (hasRequiredUtil) return util;
|
|
1169
|
+
hasRequiredUtil = 1;
|
|
1170
|
+
const stringReplaceAll = (string, substring, replacer) => {
|
|
1171
|
+
let index = string.indexOf(substring);
|
|
1172
|
+
if (index === -1) {
|
|
1173
|
+
return string;
|
|
1174
|
+
}
|
|
1175
|
+
const substringLength = substring.length;
|
|
1176
|
+
let endIndex = 0;
|
|
1177
|
+
let returnValue = "";
|
|
1178
|
+
do {
|
|
1179
|
+
returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
|
|
1180
|
+
endIndex = index + substringLength;
|
|
1181
|
+
index = string.indexOf(substring, endIndex);
|
|
1182
|
+
} while (index !== -1);
|
|
1183
|
+
returnValue += string.substr(endIndex);
|
|
1184
|
+
return returnValue;
|
|
1185
|
+
};
|
|
1186
|
+
const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
|
|
1187
|
+
let endIndex = 0;
|
|
1188
|
+
let returnValue = "";
|
|
1189
|
+
do {
|
|
1190
|
+
const gotCR = string[index - 1] === "\r";
|
|
1191
|
+
returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
1192
|
+
endIndex = index + 1;
|
|
1193
|
+
index = string.indexOf("\n", endIndex);
|
|
1194
|
+
} while (index !== -1);
|
|
1195
|
+
returnValue += string.substr(endIndex);
|
|
1196
|
+
return returnValue;
|
|
1197
|
+
};
|
|
1198
|
+
util = {
|
|
1199
|
+
stringReplaceAll,
|
|
1200
|
+
stringEncaseCRLFWithFirstIndex
|
|
1201
|
+
};
|
|
1202
|
+
return util;
|
|
1203
|
+
}
|
|
1185
1204
|
var templates;
|
|
1186
1205
|
var hasRequiredTemplates;
|
|
1187
1206
|
function requireTemplates() {
|
|
@@ -1245,27 +1264,27 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1245
1264
|
}
|
|
1246
1265
|
return results;
|
|
1247
1266
|
}
|
|
1248
|
-
function buildStyle(chalk2,
|
|
1267
|
+
function buildStyle(chalk2, styles) {
|
|
1249
1268
|
const enabled = {};
|
|
1250
|
-
for (const layer of
|
|
1269
|
+
for (const layer of styles) {
|
|
1251
1270
|
for (const style of layer.styles) {
|
|
1252
1271
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
1253
1272
|
}
|
|
1254
1273
|
}
|
|
1255
1274
|
let current = chalk2;
|
|
1256
|
-
for (const [styleName,
|
|
1257
|
-
if (!Array.isArray(
|
|
1275
|
+
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
1276
|
+
if (!Array.isArray(styles2)) {
|
|
1258
1277
|
continue;
|
|
1259
1278
|
}
|
|
1260
1279
|
if (!(styleName in current)) {
|
|
1261
1280
|
throw new Error(`Unknown Chalk style: ${styleName}`);
|
|
1262
1281
|
}
|
|
1263
|
-
current =
|
|
1282
|
+
current = styles2.length > 0 ? current[styleName](...styles2) : current[styleName];
|
|
1264
1283
|
}
|
|
1265
1284
|
return current;
|
|
1266
1285
|
}
|
|
1267
1286
|
templates = (chalk2, temporary) => {
|
|
1268
|
-
const
|
|
1287
|
+
const styles = [];
|
|
1269
1288
|
const chunks = [];
|
|
1270
1289
|
let chunk = [];
|
|
1271
1290
|
temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
|
|
@@ -1274,200 +1293,208 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1274
1293
|
} else if (style) {
|
|
1275
1294
|
const string = chunk.join("");
|
|
1276
1295
|
chunk = [];
|
|
1277
|
-
chunks.push(
|
|
1278
|
-
|
|
1296
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk2, styles)(string));
|
|
1297
|
+
styles.push({ inverse, styles: parseStyle(style) });
|
|
1279
1298
|
} else if (close) {
|
|
1280
|
-
if (
|
|
1299
|
+
if (styles.length === 0) {
|
|
1281
1300
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
1282
1301
|
}
|
|
1283
|
-
chunks.push(buildStyle(chalk2,
|
|
1302
|
+
chunks.push(buildStyle(chalk2, styles)(chunk.join("")));
|
|
1284
1303
|
chunk = [];
|
|
1285
|
-
|
|
1304
|
+
styles.pop();
|
|
1286
1305
|
} else {
|
|
1287
1306
|
chunk.push(character);
|
|
1288
1307
|
}
|
|
1289
1308
|
});
|
|
1290
1309
|
chunks.push(chunk.join(""));
|
|
1291
|
-
if (
|
|
1292
|
-
const errMessage = `Chalk template literal is missing ${
|
|
1310
|
+
if (styles.length > 0) {
|
|
1311
|
+
const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
|
|
1293
1312
|
throw new Error(errMessage);
|
|
1294
1313
|
}
|
|
1295
1314
|
return chunks.join("");
|
|
1296
1315
|
};
|
|
1297
1316
|
return templates;
|
|
1298
1317
|
}
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1318
|
+
var source;
|
|
1319
|
+
var hasRequiredSource;
|
|
1320
|
+
function requireSource() {
|
|
1321
|
+
if (hasRequiredSource) return source;
|
|
1322
|
+
hasRequiredSource = 1;
|
|
1323
|
+
const ansiStyles2 = requireAnsiStyles();
|
|
1324
|
+
const { stdout: stdoutColor, stderr: stderrColor } = requireBrowser();
|
|
1325
|
+
const {
|
|
1326
|
+
stringReplaceAll,
|
|
1327
|
+
stringEncaseCRLFWithFirstIndex
|
|
1328
|
+
} = requireUtil();
|
|
1329
|
+
const { isArray } = Array;
|
|
1330
|
+
const levelMapping = [
|
|
1331
|
+
"ansi",
|
|
1332
|
+
"ansi",
|
|
1333
|
+
"ansi256",
|
|
1334
|
+
"ansi16m"
|
|
1335
|
+
];
|
|
1336
|
+
const styles = /* @__PURE__ */ Object.create(null);
|
|
1337
|
+
const applyOptions = (object, options = {}) => {
|
|
1338
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
1339
|
+
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
1340
|
+
}
|
|
1341
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
1342
|
+
object.level = options.level === void 0 ? colorLevel : options.level;
|
|
1343
|
+
};
|
|
1344
|
+
class ChalkClass {
|
|
1345
|
+
constructor(options) {
|
|
1346
|
+
return chalkFactory(options);
|
|
1347
|
+
}
|
|
1316
1348
|
}
|
|
1317
|
-
const
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1349
|
+
const chalkFactory = (options) => {
|
|
1350
|
+
const chalk3 = {};
|
|
1351
|
+
applyOptions(chalk3, options);
|
|
1352
|
+
chalk3.template = (...arguments_) => chalkTag(chalk3.template, ...arguments_);
|
|
1353
|
+
Object.setPrototypeOf(chalk3, Chalk.prototype);
|
|
1354
|
+
Object.setPrototypeOf(chalk3.template, chalk3);
|
|
1355
|
+
chalk3.template.constructor = () => {
|
|
1356
|
+
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
1357
|
+
};
|
|
1358
|
+
chalk3.template.Instance = ChalkClass;
|
|
1359
|
+
return chalk3.template;
|
|
1360
|
+
};
|
|
1361
|
+
function Chalk(options) {
|
|
1322
1362
|
return chalkFactory(options);
|
|
1323
1363
|
}
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
chalk2.template.Instance = ChalkClass;
|
|
1335
|
-
return chalk2.template;
|
|
1336
|
-
};
|
|
1337
|
-
function Chalk(options) {
|
|
1338
|
-
return chalkFactory(options);
|
|
1339
|
-
}
|
|
1340
|
-
for (const [styleName, style] of Object.entries(ansiStyles)) {
|
|
1341
|
-
styles[styleName] = {
|
|
1364
|
+
for (const [styleName, style] of Object.entries(ansiStyles2)) {
|
|
1365
|
+
styles[styleName] = {
|
|
1366
|
+
get() {
|
|
1367
|
+
const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
|
|
1368
|
+
Object.defineProperty(this, styleName, { value: builder });
|
|
1369
|
+
return builder;
|
|
1370
|
+
}
|
|
1371
|
+
};
|
|
1372
|
+
}
|
|
1373
|
+
styles.visible = {
|
|
1342
1374
|
get() {
|
|
1343
|
-
const builder = createBuilder(this,
|
|
1344
|
-
Object.defineProperty(this,
|
|
1375
|
+
const builder = createBuilder(this, this._styler, true);
|
|
1376
|
+
Object.defineProperty(this, "visible", { value: builder });
|
|
1345
1377
|
return builder;
|
|
1346
1378
|
}
|
|
1347
1379
|
};
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1380
|
+
const usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
|
|
1381
|
+
for (const model of usedModels) {
|
|
1382
|
+
styles[model] = {
|
|
1383
|
+
get() {
|
|
1384
|
+
const { level } = this;
|
|
1385
|
+
return function(...arguments_) {
|
|
1386
|
+
const styler = createStyler(ansiStyles2.color[levelMapping[level]][model](...arguments_), ansiStyles2.color.close, this._styler);
|
|
1387
|
+
return createBuilder(this, styler, this._isEmpty);
|
|
1388
|
+
};
|
|
1389
|
+
}
|
|
1390
|
+
};
|
|
1354
1391
|
}
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
}
|
|
1392
|
+
for (const model of usedModels) {
|
|
1393
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
1394
|
+
styles[bgModel] = {
|
|
1395
|
+
get() {
|
|
1396
|
+
const { level } = this;
|
|
1397
|
+
return function(...arguments_) {
|
|
1398
|
+
const styler = createStyler(ansiStyles2.bgColor[levelMapping[level]][model](...arguments_), ansiStyles2.bgColor.close, this._styler);
|
|
1399
|
+
return createBuilder(this, styler, this._isEmpty);
|
|
1400
|
+
};
|
|
1401
|
+
}
|
|
1402
|
+
};
|
|
1403
|
+
}
|
|
1404
|
+
const proto = Object.defineProperties(() => {
|
|
1405
|
+
}, {
|
|
1406
|
+
...styles,
|
|
1407
|
+
level: {
|
|
1408
|
+
enumerable: true,
|
|
1409
|
+
get() {
|
|
1410
|
+
return this._generator.level;
|
|
1411
|
+
},
|
|
1412
|
+
set(level) {
|
|
1413
|
+
this._generator.level = level;
|
|
1414
|
+
}
|
|
1365
1415
|
}
|
|
1366
|
-
};
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
};
|
|
1416
|
+
});
|
|
1417
|
+
const createStyler = (open, close, parent) => {
|
|
1418
|
+
let openAll;
|
|
1419
|
+
let closeAll;
|
|
1420
|
+
if (parent === void 0) {
|
|
1421
|
+
openAll = open;
|
|
1422
|
+
closeAll = close;
|
|
1423
|
+
} else {
|
|
1424
|
+
openAll = parent.openAll + open;
|
|
1425
|
+
closeAll = close + parent.closeAll;
|
|
1377
1426
|
}
|
|
1427
|
+
return {
|
|
1428
|
+
open,
|
|
1429
|
+
close,
|
|
1430
|
+
openAll,
|
|
1431
|
+
closeAll,
|
|
1432
|
+
parent
|
|
1433
|
+
};
|
|
1378
1434
|
};
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
}
|
|
1392
|
-
});
|
|
1393
|
-
const createStyler = (open, close, parent) => {
|
|
1394
|
-
let openAll;
|
|
1395
|
-
let closeAll;
|
|
1396
|
-
if (parent === void 0) {
|
|
1397
|
-
openAll = open;
|
|
1398
|
-
closeAll = close;
|
|
1399
|
-
} else {
|
|
1400
|
-
openAll = parent.openAll + open;
|
|
1401
|
-
closeAll = close + parent.closeAll;
|
|
1402
|
-
}
|
|
1403
|
-
return {
|
|
1404
|
-
open,
|
|
1405
|
-
close,
|
|
1406
|
-
openAll,
|
|
1407
|
-
closeAll,
|
|
1408
|
-
parent
|
|
1435
|
+
const createBuilder = (self2, _styler, _isEmpty) => {
|
|
1436
|
+
const builder = (...arguments_) => {
|
|
1437
|
+
if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
|
|
1438
|
+
return applyStyle(builder, chalkTag(builder, ...arguments_));
|
|
1439
|
+
}
|
|
1440
|
+
return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
1441
|
+
};
|
|
1442
|
+
Object.setPrototypeOf(builder, proto);
|
|
1443
|
+
builder._generator = self2;
|
|
1444
|
+
builder._styler = _styler;
|
|
1445
|
+
builder._isEmpty = _isEmpty;
|
|
1446
|
+
return builder;
|
|
1409
1447
|
};
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1448
|
+
const applyStyle = (self2, string) => {
|
|
1449
|
+
if (self2.level <= 0 || !string) {
|
|
1450
|
+
return self2._isEmpty ? "" : string;
|
|
1451
|
+
}
|
|
1452
|
+
let styler = self2._styler;
|
|
1453
|
+
if (styler === void 0) {
|
|
1454
|
+
return string;
|
|
1455
|
+
}
|
|
1456
|
+
const { openAll, closeAll } = styler;
|
|
1457
|
+
if (string.indexOf("\x1B") !== -1) {
|
|
1458
|
+
while (styler !== void 0) {
|
|
1459
|
+
string = stringReplaceAll(string, styler.close, styler.open);
|
|
1460
|
+
styler = styler.parent;
|
|
1461
|
+
}
|
|
1415
1462
|
}
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
builder._generator = self2;
|
|
1420
|
-
builder._styler = _styler;
|
|
1421
|
-
builder._isEmpty = _isEmpty;
|
|
1422
|
-
return builder;
|
|
1423
|
-
};
|
|
1424
|
-
const applyStyle = (self2, string) => {
|
|
1425
|
-
if (self2.level <= 0 || !string) {
|
|
1426
|
-
return self2._isEmpty ? "" : string;
|
|
1427
|
-
}
|
|
1428
|
-
let styler = self2._styler;
|
|
1429
|
-
if (styler === void 0) {
|
|
1430
|
-
return string;
|
|
1431
|
-
}
|
|
1432
|
-
const { openAll, closeAll } = styler;
|
|
1433
|
-
if (string.indexOf("\x1B") !== -1) {
|
|
1434
|
-
while (styler !== void 0) {
|
|
1435
|
-
string = stringReplaceAll(string, styler.close, styler.open);
|
|
1436
|
-
styler = styler.parent;
|
|
1463
|
+
const lfIndex = string.indexOf("\n");
|
|
1464
|
+
if (lfIndex !== -1) {
|
|
1465
|
+
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
1437
1466
|
}
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
);
|
|
1458
|
-
}
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
chalk
|
|
1469
|
-
var source = chalk;
|
|
1470
|
-
const chalk$1 = /* @__PURE__ */ getDefaultExportFromCjs(source);
|
|
1467
|
+
return openAll + string + closeAll;
|
|
1468
|
+
};
|
|
1469
|
+
let template;
|
|
1470
|
+
const chalkTag = (chalk3, ...strings) => {
|
|
1471
|
+
const [firstString] = strings;
|
|
1472
|
+
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
1473
|
+
return strings.join(" ");
|
|
1474
|
+
}
|
|
1475
|
+
const arguments_ = strings.slice(1);
|
|
1476
|
+
const parts = [firstString.raw[0]];
|
|
1477
|
+
for (let i = 1; i < firstString.length; i++) {
|
|
1478
|
+
parts.push(
|
|
1479
|
+
String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
|
|
1480
|
+
String(firstString.raw[i])
|
|
1481
|
+
);
|
|
1482
|
+
}
|
|
1483
|
+
if (template === void 0) {
|
|
1484
|
+
template = requireTemplates();
|
|
1485
|
+
}
|
|
1486
|
+
return template(chalk3, parts.join(""));
|
|
1487
|
+
};
|
|
1488
|
+
Object.defineProperties(Chalk.prototype, styles);
|
|
1489
|
+
const chalk2 = Chalk();
|
|
1490
|
+
chalk2.supportsColor = stdoutColor;
|
|
1491
|
+
chalk2.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
1492
|
+
chalk2.stderr.supportsColor = stderrColor;
|
|
1493
|
+
source = chalk2;
|
|
1494
|
+
return source;
|
|
1495
|
+
}
|
|
1496
|
+
var sourceExports = requireSource();
|
|
1497
|
+
const chalk = /* @__PURE__ */ getDefaultExportFromCjs(sourceExports);
|
|
1471
1498
|
const isNode = Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]";
|
|
1472
1499
|
var AuthorizeOptionsResponseType = /* @__PURE__ */ ((AuthorizeOptionsResponseType2) => {
|
|
1473
1500
|
AuthorizeOptionsResponseType2["CODE"] = "code";
|
|
@@ -1625,7 +1652,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1625
1652
|
__privateAdd(this, _semaphoreRetrySleep, 50);
|
|
1626
1653
|
__privateAdd(this, _ProcessMessageResponse, (data) => {
|
|
1627
1654
|
const messageResponse = data;
|
|
1628
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk
|
|
1655
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk.yellow(`STSOAuth2Manager:#ProcessMessageResponse: message data = [${JSON.stringify(messageResponse)}]`));
|
|
1629
1656
|
if (messageResponse.messageId === -1) {
|
|
1630
1657
|
switch (messageResponse.command) {
|
|
1631
1658
|
case IOauth2ListenerCommand.AUTHENTICATE_EVENT:
|
|
@@ -1662,10 +1689,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1662
1689
|
__privateGet(this, _messageHandlers)[message.messageId] = (response) => {
|
|
1663
1690
|
clearTimeout(timeout);
|
|
1664
1691
|
delete __privateGet(this, _messageHandlers)[message.messageId];
|
|
1665
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk
|
|
1692
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk.yellow(`STSOAuth2Manager:#PostMessage: resolve callback response= [${JSON.stringify(response)}]`));
|
|
1666
1693
|
resolve(response);
|
|
1667
1694
|
};
|
|
1668
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk
|
|
1695
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk.yellow(`STSOAuth2Manager:#PostMessage: posting message = [${JSON.stringify(message)}]`));
|
|
1669
1696
|
__privateGet(this, _oauth2ManagerPort).postMessage(message);
|
|
1670
1697
|
});
|
|
1671
1698
|
});
|
|
@@ -1707,10 +1734,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1707
1734
|
}
|
|
1708
1735
|
});
|
|
1709
1736
|
__privateAdd(this, _SetupRoute, (app, router) => {
|
|
1710
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk
|
|
1737
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk.gray(`STSOAuth2Manager:#SetupRoute`));
|
|
1711
1738
|
router.beforeEach(async (to, from, next) => {
|
|
1712
1739
|
const oAuth2Manager = app.config.globalProperties.$sts[STSOAuth2ManagerPluginKey];
|
|
1713
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk
|
|
1740
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk.gray(`beforeEach: from: [${from.path}], to: [${to.path}]`));
|
|
1714
1741
|
if (__privateGet(this, _GetStore).call(this).LoggedIn === false) {
|
|
1715
1742
|
__privateMethod(this, _STSOAuth2Manager_instances, LogInfoMessage_fn).call(this, `Not logged in`);
|
|
1716
1743
|
if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}authorize`) === 0) {
|
|
@@ -1741,9 +1768,9 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1741
1768
|
}
|
|
1742
1769
|
const str = to.query;
|
|
1743
1770
|
if (str[stsutils.OAuth2ParameterType.CODE] || str[stsutils.OAuth2ParameterType.ERROR]) {
|
|
1744
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk
|
|
1771
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk.magenta(`STSOAuth2Manager:#SetupRoute:Processing redirect: [${JSON.stringify(str)}]`));
|
|
1745
1772
|
const retVal = await oAuth2Manager.HandleRedirect(str);
|
|
1746
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk
|
|
1773
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk.magenta(`STSOAuth2Manager:#SetupRoute:Redirect result: [${retVal}]`));
|
|
1747
1774
|
if (retVal) {
|
|
1748
1775
|
next({
|
|
1749
1776
|
path: `${__privateGet(this, _options).uriBase}`,
|
|
@@ -1799,7 +1826,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1799
1826
|
throw new Error(`STSOAuth2Manager:ExecuteRefreshToken:maxSemaphoreRetries: [${__privateGet(this, _maxSemaphoreRetries)}] exceeded.`);
|
|
1800
1827
|
}
|
|
1801
1828
|
await stsutils.Sleep(__privateGet(this, _semaphoreRetrySleep));
|
|
1802
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk
|
|
1829
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk.cyan(`STSOAuth2Manager:ExecuteRefreshToken:locked by operationSemaphore, retry count: [${retryCount}]`));
|
|
1803
1830
|
return await this.ExecuteRefreshToken(retryCount + 1);
|
|
1804
1831
|
} else {
|
|
1805
1832
|
__privateSet(this, _operationSemaphore, true);
|
|
@@ -1819,7 +1846,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1819
1846
|
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, `STSOAuth2Manager:RestoreSession:response: [${JSON.stringify(response.payload)}]`);
|
|
1820
1847
|
return response.payload;
|
|
1821
1848
|
} catch (error) {
|
|
1822
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogErrorMessage_fn).call(this, chalk
|
|
1849
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogErrorMessage_fn).call(this, chalk.red(`RestoreSession Error: ${error}`));
|
|
1823
1850
|
return false;
|
|
1824
1851
|
}
|
|
1825
1852
|
});
|
|
@@ -1834,18 +1861,18 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1834
1861
|
return response.payload.authorizeOptionsClientCopy;
|
|
1835
1862
|
}
|
|
1836
1863
|
} catch (error) {
|
|
1837
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogErrorMessage_fn).call(this, chalk
|
|
1864
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogErrorMessage_fn).call(this, chalk.red(`Authorize Error: ${error}`));
|
|
1838
1865
|
}
|
|
1839
1866
|
return {};
|
|
1840
1867
|
});
|
|
1841
1868
|
__publicField(this, "HandleRedirect", async (queryVars) => {
|
|
1842
1869
|
try {
|
|
1843
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk
|
|
1870
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk.magenta(`STSOAuth2Manager:HandleRedirect`));
|
|
1844
1871
|
let response = null;
|
|
1845
1872
|
if (queryVars[stsutils.OAuth2ParameterType.CODE]) {
|
|
1846
1873
|
const authorizeOptions = __privateGet(this, _transactionStore).get(__privateGet(this, _STORAGE_AUTHORIZE_OPTIONS_KEY));
|
|
1847
1874
|
__privateGet(this, _transactionStore).remove(__privateGet(this, _STORAGE_AUTHORIZE_OPTIONS_KEY));
|
|
1848
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk
|
|
1875
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk.magenta(`STSOAuth2Manager:HandleRedirect: sending HANDLE_REDIRECT command`));
|
|
1849
1876
|
response = await __privateGet(this, _PostMessage).call(this, { command: IOauth2ListenerCommand.HANDLE_REDIRECT, payload: {
|
|
1850
1877
|
queryVars,
|
|
1851
1878
|
authorizeOptions
|
|
@@ -1853,10 +1880,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1853
1880
|
} else {
|
|
1854
1881
|
response = await __privateGet(this, _PostMessage).call(this, { command: IOauth2ListenerCommand.HANDLE_REDIRECT, payload: queryVars });
|
|
1855
1882
|
}
|
|
1856
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk
|
|
1883
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogDebugMessage_fn).call(this, chalk.magenta(`STSOAuth2Manager:HandleRedirect: HANDLE_REDIRECT response: [${JSON.stringify(response)}]`));
|
|
1857
1884
|
return response.payload;
|
|
1858
1885
|
} catch (error) {
|
|
1859
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogErrorMessage_fn).call(this, chalk
|
|
1886
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogErrorMessage_fn).call(this, chalk.red(`HandleRedirect Error: ${error}`));
|
|
1860
1887
|
return false;
|
|
1861
1888
|
}
|
|
1862
1889
|
});
|
|
@@ -1865,7 +1892,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1865
1892
|
const response = await __privateGet(this, _PostMessage).call(this, { command: IOauth2ListenerCommand.LOGOUT });
|
|
1866
1893
|
return response.payload;
|
|
1867
1894
|
} catch (error) {
|
|
1868
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogErrorMessage_fn).call(this, chalk
|
|
1895
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogErrorMessage_fn).call(this, chalk.red(`Logout Error: ${error}`));
|
|
1869
1896
|
return false;
|
|
1870
1897
|
}
|
|
1871
1898
|
});
|
|
@@ -1874,7 +1901,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1874
1901
|
const response = await __privateGet(this, _PostMessage).call(this, { command: IOauth2ListenerCommand.LOGOUT });
|
|
1875
1902
|
return response.payload;
|
|
1876
1903
|
} catch (error) {
|
|
1877
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogErrorMessage_fn).call(this, chalk
|
|
1904
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogErrorMessage_fn).call(this, chalk.red(`InvokeExternalAPI Error: ${error}`));
|
|
1878
1905
|
return null;
|
|
1879
1906
|
}
|
|
1880
1907
|
});
|
|
@@ -1905,10 +1932,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1905
1932
|
}
|
|
1906
1933
|
if (!isNode) {
|
|
1907
1934
|
__privateGet(this, _worker).onmessage = (data) => {
|
|
1908
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogInfoMessage_fn).call(this, chalk
|
|
1935
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogInfoMessage_fn).call(this, chalk.green(`this.#worker.onmessage = [${data}]`));
|
|
1909
1936
|
};
|
|
1910
1937
|
__privateGet(this, _worker).onerror = (error) => {
|
|
1911
|
-
__privateMethod(this, _STSOAuth2Manager_instances, LogInfoMessage_fn).call(this, chalk
|
|
1938
|
+
__privateMethod(this, _STSOAuth2Manager_instances, LogInfoMessage_fn).call(this, chalk.green(`this.#worker.onerror = [${JSON.stringify(error)}]`));
|
|
1912
1939
|
};
|
|
1913
1940
|
}
|
|
1914
1941
|
let workerMessage;
|
|
@@ -1979,21 +2006,22 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
1979
2006
|
_HandleErrorEvent = new WeakMap();
|
|
1980
2007
|
_HandleAuthenticateEvent = new WeakMap();
|
|
1981
2008
|
_SetupRoute = new WeakMap();
|
|
1982
|
-
var sha256$
|
|
2009
|
+
var sha256$2 = { exports: {} };
|
|
1983
2010
|
function commonjsRequire(path) {
|
|
1984
2011
|
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
1985
2012
|
}
|
|
1986
|
-
var core = { exports: {} };
|
|
2013
|
+
var core$1 = { exports: {} };
|
|
2014
|
+
var core = core$1.exports;
|
|
1987
2015
|
var hasRequiredCore;
|
|
1988
2016
|
function requireCore() {
|
|
1989
|
-
if (hasRequiredCore) return core.exports;
|
|
2017
|
+
if (hasRequiredCore) return core$1.exports;
|
|
1990
2018
|
hasRequiredCore = 1;
|
|
1991
2019
|
(function(module2, exports3) {
|
|
1992
2020
|
(function(root, factory) {
|
|
1993
2021
|
{
|
|
1994
2022
|
module2.exports = factory();
|
|
1995
2023
|
}
|
|
1996
|
-
})(
|
|
2024
|
+
})(core, function() {
|
|
1997
2025
|
var CryptoJS = CryptoJS || function(Math2, undefined$1) {
|
|
1998
2026
|
var crypto2;
|
|
1999
2027
|
if (typeof window !== "undefined" && window.crypto) {
|
|
@@ -2587,226 +2615,240 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
2587
2615
|
}(Math);
|
|
2588
2616
|
return CryptoJS;
|
|
2589
2617
|
});
|
|
2590
|
-
})(core);
|
|
2591
|
-
return core.exports;
|
|
2618
|
+
})(core$1);
|
|
2619
|
+
return core$1.exports;
|
|
2592
2620
|
}
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
(function(
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2621
|
+
var sha256$1 = sha256$2.exports;
|
|
2622
|
+
var hasRequiredSha256;
|
|
2623
|
+
function requireSha256() {
|
|
2624
|
+
if (hasRequiredSha256) return sha256$2.exports;
|
|
2625
|
+
hasRequiredSha256 = 1;
|
|
2626
|
+
(function(module2, exports3) {
|
|
2627
|
+
(function(root, factory) {
|
|
2628
|
+
{
|
|
2629
|
+
module2.exports = factory(requireCore());
|
|
2630
|
+
}
|
|
2631
|
+
})(sha256$1, function(CryptoJS) {
|
|
2632
|
+
(function(Math2) {
|
|
2633
|
+
var C = CryptoJS;
|
|
2634
|
+
var C_lib = C.lib;
|
|
2635
|
+
var WordArray = C_lib.WordArray;
|
|
2636
|
+
var Hasher = C_lib.Hasher;
|
|
2637
|
+
var C_algo = C.algo;
|
|
2638
|
+
var H = [];
|
|
2639
|
+
var K = [];
|
|
2640
|
+
(function() {
|
|
2641
|
+
function isPrime(n2) {
|
|
2642
|
+
var sqrtN = Math2.sqrt(n2);
|
|
2643
|
+
for (var factor = 2; factor <= sqrtN; factor++) {
|
|
2644
|
+
if (!(n2 % factor)) {
|
|
2645
|
+
return false;
|
|
2646
|
+
}
|
|
2613
2647
|
}
|
|
2648
|
+
return true;
|
|
2614
2649
|
}
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2650
|
+
function getFractionalBits(n2) {
|
|
2651
|
+
return (n2 - (n2 | 0)) * 4294967296 | 0;
|
|
2652
|
+
}
|
|
2653
|
+
var n = 2;
|
|
2654
|
+
var nPrime = 0;
|
|
2655
|
+
while (nPrime < 64) {
|
|
2656
|
+
if (isPrime(n)) {
|
|
2657
|
+
if (nPrime < 8) {
|
|
2658
|
+
H[nPrime] = getFractionalBits(Math2.pow(n, 1 / 2));
|
|
2659
|
+
}
|
|
2660
|
+
K[nPrime] = getFractionalBits(Math2.pow(n, 1 / 3));
|
|
2661
|
+
nPrime++;
|
|
2626
2662
|
}
|
|
2627
|
-
|
|
2628
|
-
nPrime++;
|
|
2663
|
+
n++;
|
|
2629
2664
|
}
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2665
|
+
})();
|
|
2666
|
+
var W = [];
|
|
2667
|
+
var SHA256 = C_algo.SHA256 = Hasher.extend({
|
|
2668
|
+
_doReset: function() {
|
|
2669
|
+
this._hash = new WordArray.init(H.slice(0));
|
|
2670
|
+
},
|
|
2671
|
+
_doProcessBlock: function(M, offset) {
|
|
2672
|
+
var H2 = this._hash.words;
|
|
2673
|
+
var a = H2[0];
|
|
2674
|
+
var b = H2[1];
|
|
2675
|
+
var c = H2[2];
|
|
2676
|
+
var d = H2[3];
|
|
2677
|
+
var e = H2[4];
|
|
2678
|
+
var f = H2[5];
|
|
2679
|
+
var g = H2[6];
|
|
2680
|
+
var h = H2[7];
|
|
2681
|
+
for (var i = 0; i < 64; i++) {
|
|
2682
|
+
if (i < 16) {
|
|
2683
|
+
W[i] = M[offset + i] | 0;
|
|
2684
|
+
} else {
|
|
2685
|
+
var gamma0x = W[i - 15];
|
|
2686
|
+
var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3;
|
|
2687
|
+
var gamma1x = W[i - 2];
|
|
2688
|
+
var gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10;
|
|
2689
|
+
W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
|
|
2690
|
+
}
|
|
2691
|
+
var ch = e & f ^ ~e & g;
|
|
2692
|
+
var maj = a & b ^ a & c ^ b & c;
|
|
2693
|
+
var sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22);
|
|
2694
|
+
var sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25);
|
|
2695
|
+
var t1 = h + sigma1 + ch + K[i] + W[i];
|
|
2696
|
+
var t2 = sigma0 + maj;
|
|
2697
|
+
h = g;
|
|
2698
|
+
g = f;
|
|
2699
|
+
f = e;
|
|
2700
|
+
e = d + t1 | 0;
|
|
2701
|
+
d = c;
|
|
2702
|
+
c = b;
|
|
2703
|
+
b = a;
|
|
2704
|
+
a = t1 + t2 | 0;
|
|
2657
2705
|
}
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2706
|
+
H2[0] = H2[0] + a | 0;
|
|
2707
|
+
H2[1] = H2[1] + b | 0;
|
|
2708
|
+
H2[2] = H2[2] + c | 0;
|
|
2709
|
+
H2[3] = H2[3] + d | 0;
|
|
2710
|
+
H2[4] = H2[4] + e | 0;
|
|
2711
|
+
H2[5] = H2[5] + f | 0;
|
|
2712
|
+
H2[6] = H2[6] + g | 0;
|
|
2713
|
+
H2[7] = H2[7] + h | 0;
|
|
2714
|
+
},
|
|
2715
|
+
_doFinalize: function() {
|
|
2716
|
+
var data = this._data;
|
|
2717
|
+
var dataWords = data.words;
|
|
2718
|
+
var nBitsTotal = this._nDataBytes * 8;
|
|
2719
|
+
var nBitsLeft = data.sigBytes * 8;
|
|
2720
|
+
dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
|
|
2721
|
+
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math2.floor(nBitsTotal / 4294967296);
|
|
2722
|
+
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
|
|
2723
|
+
data.sigBytes = dataWords.length * 4;
|
|
2724
|
+
this._process();
|
|
2725
|
+
return this._hash;
|
|
2726
|
+
},
|
|
2727
|
+
clone: function() {
|
|
2728
|
+
var clone = Hasher.clone.call(this);
|
|
2729
|
+
clone._hash = this._hash.clone();
|
|
2730
|
+
return clone;
|
|
2672
2731
|
}
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
var data = this._data;
|
|
2684
|
-
var dataWords = data.words;
|
|
2685
|
-
var nBitsTotal = this._nDataBytes * 8;
|
|
2686
|
-
var nBitsLeft = data.sigBytes * 8;
|
|
2687
|
-
dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
|
|
2688
|
-
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math2.floor(nBitsTotal / 4294967296);
|
|
2689
|
-
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
|
|
2690
|
-
data.sigBytes = dataWords.length * 4;
|
|
2691
|
-
this._process();
|
|
2692
|
-
return this._hash;
|
|
2693
|
-
},
|
|
2694
|
-
clone: function() {
|
|
2695
|
-
var clone = Hasher.clone.call(this);
|
|
2696
|
-
clone._hash = this._hash.clone();
|
|
2697
|
-
return clone;
|
|
2698
|
-
}
|
|
2699
|
-
});
|
|
2700
|
-
C.SHA256 = Hasher._createHelper(SHA256);
|
|
2701
|
-
C.HmacSHA256 = Hasher._createHmacHelper(SHA256);
|
|
2702
|
-
})(Math);
|
|
2703
|
-
return CryptoJS.SHA256;
|
|
2704
|
-
});
|
|
2705
|
-
})(sha256$1);
|
|
2706
|
-
var sha256Exports = sha256$1.exports;
|
|
2732
|
+
});
|
|
2733
|
+
C.SHA256 = Hasher._createHelper(SHA256);
|
|
2734
|
+
C.HmacSHA256 = Hasher._createHmacHelper(SHA256);
|
|
2735
|
+
})(Math);
|
|
2736
|
+
return CryptoJS.SHA256;
|
|
2737
|
+
});
|
|
2738
|
+
})(sha256$2);
|
|
2739
|
+
return sha256$2.exports;
|
|
2740
|
+
}
|
|
2741
|
+
var sha256Exports = requireSha256();
|
|
2707
2742
|
const sha256 = /* @__PURE__ */ getDefaultExportFromCjs(sha256Exports);
|
|
2708
|
-
var encBase64 = { exports: {} };
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
(function() {
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
var
|
|
2742
|
-
var
|
|
2743
|
-
|
|
2744
|
-
var
|
|
2745
|
-
for (var
|
|
2746
|
-
|
|
2743
|
+
var encBase64$1 = { exports: {} };
|
|
2744
|
+
var encBase64 = encBase64$1.exports;
|
|
2745
|
+
var hasRequiredEncBase64;
|
|
2746
|
+
function requireEncBase64() {
|
|
2747
|
+
if (hasRequiredEncBase64) return encBase64$1.exports;
|
|
2748
|
+
hasRequiredEncBase64 = 1;
|
|
2749
|
+
(function(module2, exports3) {
|
|
2750
|
+
(function(root, factory) {
|
|
2751
|
+
{
|
|
2752
|
+
module2.exports = factory(requireCore());
|
|
2753
|
+
}
|
|
2754
|
+
})(encBase64, function(CryptoJS) {
|
|
2755
|
+
(function() {
|
|
2756
|
+
var C = CryptoJS;
|
|
2757
|
+
var C_lib = C.lib;
|
|
2758
|
+
var WordArray = C_lib.WordArray;
|
|
2759
|
+
var C_enc = C.enc;
|
|
2760
|
+
C_enc.Base64 = {
|
|
2761
|
+
/**
|
|
2762
|
+
* Converts a word array to a Base64 string.
|
|
2763
|
+
*
|
|
2764
|
+
* @param {WordArray} wordArray The word array.
|
|
2765
|
+
*
|
|
2766
|
+
* @return {string} The Base64 string.
|
|
2767
|
+
*
|
|
2768
|
+
* @static
|
|
2769
|
+
*
|
|
2770
|
+
* @example
|
|
2771
|
+
*
|
|
2772
|
+
* var base64String = CryptoJS.enc.Base64.stringify(wordArray);
|
|
2773
|
+
*/
|
|
2774
|
+
stringify: function(wordArray) {
|
|
2775
|
+
var words = wordArray.words;
|
|
2776
|
+
var sigBytes = wordArray.sigBytes;
|
|
2777
|
+
var map = this._map;
|
|
2778
|
+
wordArray.clamp();
|
|
2779
|
+
var base64Chars = [];
|
|
2780
|
+
for (var i = 0; i < sigBytes; i += 3) {
|
|
2781
|
+
var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
|
|
2782
|
+
var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255;
|
|
2783
|
+
var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255;
|
|
2784
|
+
var triplet = byte1 << 16 | byte2 << 8 | byte3;
|
|
2785
|
+
for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) {
|
|
2786
|
+
base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 63));
|
|
2787
|
+
}
|
|
2747
2788
|
}
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2789
|
+
var paddingChar = map.charAt(64);
|
|
2790
|
+
if (paddingChar) {
|
|
2791
|
+
while (base64Chars.length % 4) {
|
|
2792
|
+
base64Chars.push(paddingChar);
|
|
2793
|
+
}
|
|
2753
2794
|
}
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2795
|
+
return base64Chars.join("");
|
|
2796
|
+
},
|
|
2797
|
+
/**
|
|
2798
|
+
* Converts a Base64 string to a word array.
|
|
2799
|
+
*
|
|
2800
|
+
* @param {string} base64Str The Base64 string.
|
|
2801
|
+
*
|
|
2802
|
+
* @return {WordArray} The word array.
|
|
2803
|
+
*
|
|
2804
|
+
* @static
|
|
2805
|
+
*
|
|
2806
|
+
* @example
|
|
2807
|
+
*
|
|
2808
|
+
* var wordArray = CryptoJS.enc.Base64.parse(base64String);
|
|
2809
|
+
*/
|
|
2810
|
+
parse: function(base64Str) {
|
|
2811
|
+
var base64StrLength = base64Str.length;
|
|
2812
|
+
var map = this._map;
|
|
2813
|
+
var reverseMap = this._reverseMap;
|
|
2814
|
+
if (!reverseMap) {
|
|
2815
|
+
reverseMap = this._reverseMap = [];
|
|
2816
|
+
for (var j = 0; j < map.length; j++) {
|
|
2817
|
+
reverseMap[map.charCodeAt(j)] = j;
|
|
2818
|
+
}
|
|
2778
2819
|
}
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2820
|
+
var paddingChar = map.charAt(64);
|
|
2821
|
+
if (paddingChar) {
|
|
2822
|
+
var paddingIndex = base64Str.indexOf(paddingChar);
|
|
2823
|
+
if (paddingIndex !== -1) {
|
|
2824
|
+
base64StrLength = paddingIndex;
|
|
2825
|
+
}
|
|
2826
|
+
}
|
|
2827
|
+
return parseLoop(base64Str, base64StrLength, reverseMap);
|
|
2828
|
+
},
|
|
2829
|
+
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
|
|
2830
|
+
};
|
|
2831
|
+
function parseLoop(base64Str, base64StrLength, reverseMap) {
|
|
2832
|
+
var words = [];
|
|
2833
|
+
var nBytes = 0;
|
|
2834
|
+
for (var i = 0; i < base64StrLength; i++) {
|
|
2835
|
+
if (i % 4) {
|
|
2836
|
+
var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
|
|
2837
|
+
var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
|
|
2838
|
+
var bitsCombined = bits1 | bits2;
|
|
2839
|
+
words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
|
|
2840
|
+
nBytes++;
|
|
2785
2841
|
}
|
|
2786
2842
|
}
|
|
2787
|
-
return
|
|
2788
|
-
},
|
|
2789
|
-
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
|
|
2790
|
-
};
|
|
2791
|
-
function parseLoop(base64Str, base64StrLength, reverseMap) {
|
|
2792
|
-
var words = [];
|
|
2793
|
-
var nBytes = 0;
|
|
2794
|
-
for (var i = 0; i < base64StrLength; i++) {
|
|
2795
|
-
if (i % 4) {
|
|
2796
|
-
var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
|
|
2797
|
-
var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
|
|
2798
|
-
var bitsCombined = bits1 | bits2;
|
|
2799
|
-
words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
|
|
2800
|
-
nBytes++;
|
|
2801
|
-
}
|
|
2843
|
+
return WordArray.create(words, nBytes);
|
|
2802
2844
|
}
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
})
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
}
|
|
2809
|
-
var encBase64Exports =
|
|
2845
|
+
})();
|
|
2846
|
+
return CryptoJS.enc.Base64;
|
|
2847
|
+
});
|
|
2848
|
+
})(encBase64$1);
|
|
2849
|
+
return encBase64$1.exports;
|
|
2850
|
+
}
|
|
2851
|
+
var encBase64Exports = requireEncBase64();
|
|
2810
2852
|
const Base64 = /* @__PURE__ */ getDefaultExportFromCjs(encBase64Exports);
|
|
2811
2853
|
class CryptoUtils {
|
|
2812
2854
|
constructor() {
|
|
@@ -3043,6 +3085,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3043
3085
|
case IOauth2ListenerCommand.LOGOUT:
|
|
3044
3086
|
__privateGet(this, _ProcessCommand).call(this, auth2ListenerMessage, await __privateGet(this, _Logout).call(this));
|
|
3045
3087
|
break;
|
|
3088
|
+
//@@ Need a way of keeping this out of the main thread - should always stay within the worker
|
|
3046
3089
|
case IOauth2ListenerCommand.ACCESS_TOKEN:
|
|
3047
3090
|
__privateGet(this, _ProcessCommand).call(this, auth2ListenerMessage, await __privateGet(this, _GetAccessToken).call(this));
|
|
3048
3091
|
break;
|
|
@@ -3086,7 +3129,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3086
3129
|
[stsutils.OAuth2ParameterType.REDIRECT_URI]: __privateGet(this, _options2).redirect_uri,
|
|
3087
3130
|
[stsutils.OAuth2ParameterType.AUDIENCE]: __privateGet(this, _options2).audience
|
|
3088
3131
|
}).withDefaultHeaders().withCredentials().withTimeout(__privateGet(this, _options2).timeout);
|
|
3089
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk
|
|
3132
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk.magenta(`#RestoreSession:session request detail: [${JSON.stringify(rConfig)}]`));
|
|
3090
3133
|
if (isNode && __privateGet(this, _agentManager)) {
|
|
3091
3134
|
rConfig.withAgentManager(__privateGet(this, _agentManager));
|
|
3092
3135
|
}
|
|
@@ -3163,29 +3206,29 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3163
3206
|
__privateAdd(this, _HandleRedirect, async (payload) => {
|
|
3164
3207
|
const queryVars = payload.queryVars;
|
|
3165
3208
|
const authorizeOptions = payload.authorizeOptions;
|
|
3166
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk
|
|
3167
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk
|
|
3209
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk.magenta(`#HandleRedirect: HandleRedirect`));
|
|
3210
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk.magenta(`#HandleRedirect: HandleRedirect:Query Vars: [${JSON.stringify(queryVars)}]`));
|
|
3168
3211
|
if (queryVars[stsutils.OAuth2ParameterType.CODE]) {
|
|
3169
3212
|
const response = queryVars;
|
|
3170
3213
|
__privateMethod(this, _STSOAuth2Worker_instances, LogInfoMessage_fn2).call(this, `authorizeOptions from transaction state: [${JSON.stringify(authorizeOptions)}]`);
|
|
3171
3214
|
const redirectState = response.state;
|
|
3172
3215
|
const authorizeOptionsState = authorizeOptions.state;
|
|
3173
3216
|
if (authorizeOptionsState.localeCompare(redirectState) === 0) {
|
|
3174
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogInfoMessage_fn2).call(this, chalk
|
|
3217
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogInfoMessage_fn2).call(this, chalk.green("redirected state (from queryVars) matched previously saved transaction authorizeOptions state"));
|
|
3175
3218
|
return await __privateGet(this, _GetToken).call(this, authorizeOptions, response);
|
|
3176
3219
|
} else {
|
|
3177
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk
|
|
3178
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk
|
|
3179
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk
|
|
3220
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk.red("redirected state (from queryVars) did NOT match previously saved transaction authorizeOptions state"));
|
|
3221
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk.red(`authorizeOptionsState: [${authorizeOptionsState}]`));
|
|
3222
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk.red(`redirectState: [${redirectState}]`));
|
|
3180
3223
|
__privateGet(this, _HandleErrorEvent2).call(this, { message: "State un-matched" });
|
|
3181
3224
|
return false;
|
|
3182
3225
|
}
|
|
3183
3226
|
} else if (queryVars[stsutils.OAuth2ParameterType.ERROR]) {
|
|
3184
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk
|
|
3227
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk.red(`State un-matched (1)`));
|
|
3185
3228
|
__privateGet(this, _HandleErrorEvent2).call(this, { message: "State un-matched" });
|
|
3186
3229
|
return false;
|
|
3187
3230
|
} else {
|
|
3188
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk
|
|
3231
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk.red(`State un-matched (2)`));
|
|
3189
3232
|
__privateGet(this, _HandleErrorEvent2).call(this, { message: "State un-matched" });
|
|
3190
3233
|
return false;
|
|
3191
3234
|
}
|
|
@@ -3211,20 +3254,20 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3211
3254
|
*/
|
|
3212
3255
|
// Get access_token, refresh_token and id_token using OAuth2 Authorization Code Flow
|
|
3213
3256
|
__privateAdd(this, _GetTokenFromBroker, async (authorizationCodeFlowParameters) => {
|
|
3214
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk
|
|
3257
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk.magenta(`#GetTokenFromBroker`));
|
|
3215
3258
|
__privateGet(this, _clientSessionStore).remove(__privateGet(this, _STORAGE_SESSION_KEY));
|
|
3216
3259
|
const url = `${__privateGet(this, _options2).brokerendpoint}:${__privateGet(this, _options2).brokerport}${__privateGet(this, _options2).brokerapiroot}/token`;
|
|
3217
3260
|
try {
|
|
3218
3261
|
const rConfig = new stsutils.STSAxiosConfig(url, "post").withDefaultHeaders().withData(authorizationCodeFlowParameters).withCredentials().withTimeout(__privateGet(this, _options2).timeout);
|
|
3219
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk
|
|
3262
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk.magenta(`#GetTokenFromBroker: request config: [${JSON.stringify(rConfig)}]`));
|
|
3220
3263
|
if (isNode && __privateGet(this, _agentManager)) {
|
|
3221
3264
|
rConfig.withAgentManager(__privateGet(this, _agentManager));
|
|
3222
3265
|
}
|
|
3223
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk
|
|
3266
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk.magenta(`#GetTokenFromBroker: axios API call`));
|
|
3224
3267
|
const retVal = await axios(rConfig.config);
|
|
3225
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk
|
|
3268
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk.magenta(`#GetTokenFromBroker: axios API call result: [${retVal.status}]`));
|
|
3226
3269
|
if (retVal.status === StatusCodes.OK) {
|
|
3227
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk
|
|
3270
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk.magenta(`#GetTokenFromBroker: storing tokens`));
|
|
3228
3271
|
const tokenResponse = retVal.data;
|
|
3229
3272
|
__privateGet(this, _HandleAuthenticateEvent2).call(this, tokenResponse.id_token);
|
|
3230
3273
|
const newSessionData = {
|
|
@@ -3236,18 +3279,18 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3236
3279
|
__privateGet(this, _clientSessionStore).set(__privateGet(this, _STORAGE_SESSION_KEY), newSessionData);
|
|
3237
3280
|
return true;
|
|
3238
3281
|
} else if (retVal.status === StatusCodes.UNAUTHORIZED) {
|
|
3239
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk
|
|
3282
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk.magenta(`#GetTokenFromBroker: NOT storing tokens, status: [${retVal.status}]`));
|
|
3240
3283
|
__privateGet(this, _HandleAuthenticateEvent2).call(this, null);
|
|
3241
3284
|
return false;
|
|
3242
3285
|
} else {
|
|
3243
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk
|
|
3286
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk.magenta(`#GetTokenFromBroker: NOT storing tokens (general error 1), status: [${retVal.status}]`));
|
|
3244
3287
|
__privateGet(this, _HandleAuthenticateEvent2).call(this, null);
|
|
3245
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk
|
|
3246
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk
|
|
3288
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk.red("Could not obtain access_token from token end-point:-"));
|
|
3289
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk.red(JSON.stringify(retVal.data)));
|
|
3247
3290
|
return false;
|
|
3248
3291
|
}
|
|
3249
3292
|
} catch (error) {
|
|
3250
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk
|
|
3293
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk.red(`#GetTokenFromBroker: NOT storing tokens (general error 2), status: [${error}]`));
|
|
3251
3294
|
__privateGet(this, _HandleAuthenticateEvent2).call(this, null);
|
|
3252
3295
|
return false;
|
|
3253
3296
|
}
|
|
@@ -3293,10 +3336,10 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3293
3336
|
}
|
|
3294
3337
|
*/
|
|
3295
3338
|
__privateAdd(this, _RefreshToken, async () => {
|
|
3296
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk
|
|
3339
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk.cyan(`STSOAuth2Worker:#RefreshToken:start`));
|
|
3297
3340
|
const sessionData = __privateGet(this, _clientSessionStore).get(__privateGet(this, _STORAGE_SESSION_KEY));
|
|
3298
3341
|
if (sessionData) {
|
|
3299
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk
|
|
3342
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk.cyan(`STSOAuth2Worker:#RefreshToken:sessionData: [${JSON.stringify(sessionData)}]`));
|
|
3300
3343
|
const currentSessionData = sessionData.tokenResponse;
|
|
3301
3344
|
const refreshFlowParameters = {
|
|
3302
3345
|
client_id: __privateGet(this, _options2).client_id,
|
|
@@ -3306,7 +3349,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3306
3349
|
};
|
|
3307
3350
|
return await __privateGet(this, _GetTokenFromBroker).call(this, refreshFlowParameters);
|
|
3308
3351
|
} else {
|
|
3309
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk
|
|
3352
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk.red(`STSOAuth2Worker:#RefreshToken:sessionData not found within clientSessionStore`));
|
|
3310
3353
|
return false;
|
|
3311
3354
|
}
|
|
3312
3355
|
});
|
|
@@ -3337,19 +3380,19 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
3337
3380
|
if (isNode && __privateGet(this, _agentManager)) {
|
|
3338
3381
|
rConfig.withAgentManager(__privateGet(this, _agentManager));
|
|
3339
3382
|
}
|
|
3340
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk
|
|
3383
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogDebugMessage_fn2).call(this, chalk.magenta(`#Logout: request config: [${rConfig}]`));
|
|
3341
3384
|
const retVal = await axios(rConfig.config);
|
|
3342
3385
|
if (retVal.data.status === StatusCodes.OK) {
|
|
3343
3386
|
return true;
|
|
3344
3387
|
} else {
|
|
3345
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk
|
|
3346
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk
|
|
3388
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk.red("Error during logout (1: server side)"));
|
|
3389
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk.red(JSON.stringify(retVal.data)));
|
|
3347
3390
|
return false;
|
|
3348
3391
|
}
|
|
3349
3392
|
} catch (error) {
|
|
3350
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk
|
|
3351
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk
|
|
3352
|
-
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk
|
|
3393
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk.red("Error during logout (2: server side)"));
|
|
3394
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk.red(error));
|
|
3395
|
+
__privateMethod(this, _STSOAuth2Worker_instances, LogErrorMessage_fn2).call(this, chalk.red(JSON.stringify(error)));
|
|
3353
3396
|
return false;
|
|
3354
3397
|
}
|
|
3355
3398
|
} else {
|