@nsshunt/stsappframework 2.19.173 → 2.19.174
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/.github/workflows/npm-publish.yml +2 -2
- package/dist/authutilsnode.js +152 -178
- package/dist/authutilsnode.js.map +1 -1
- package/dist/masterprocessbase.js +454 -484
- package/dist/masterprocessbase.js.map +1 -1
- package/dist/processbase.js +161 -180
- package/dist/processbase.js.map +1 -1
- package/dist/server.js +3 -16
- package/dist/server.js.map +1 -1
- package/dist/singleprocessbase.js +216 -240
- package/dist/singleprocessbase.js.map +1 -1
- package/dist/socketioHelper.js +132 -145
- package/dist/socketioHelper.js.map +1 -1
- package/dist/stscontrollerbase.js +3 -16
- package/dist/stscontrollerbase.js.map +1 -1
- package/dist/stslatencycontroller.js +9 -20
- package/dist/stslatencycontroller.js.map +1 -1
- package/dist/stsrouterbase.js +6 -19
- package/dist/stsrouterbase.js.map +1 -1
- package/dist/testHelpers.js +238 -262
- package/dist/testHelpers.js.map +1 -1
- package/dist/workerprocessbase.js +297 -321
- package/dist/workerprocessbase.js.map +1 -1
- package/dist/workerprocessbase.test.js +2 -11
- package/dist/workerprocessbase.test.js.map +1 -1
- package/package.json +8 -7
- package/tsconfig.json +28 -9
|
@@ -16,7 +16,7 @@ jobs:
|
|
|
16
16
|
- uses: actions/checkout@v3
|
|
17
17
|
- uses: actions/setup-node@v3
|
|
18
18
|
with:
|
|
19
|
-
node-version:
|
|
19
|
+
node-version: 20
|
|
20
20
|
- run: npm ci
|
|
21
21
|
- run: npm run lint
|
|
22
22
|
- run: npm test
|
|
@@ -28,7 +28,7 @@ jobs:
|
|
|
28
28
|
- uses: actions/checkout@v3
|
|
29
29
|
- uses: actions/setup-node@v3
|
|
30
30
|
with:
|
|
31
|
-
node-version:
|
|
31
|
+
node-version: 20
|
|
32
32
|
registry-url: https://registry.npmjs.org/
|
|
33
33
|
- run: npm ci
|
|
34
34
|
- run: npm run build
|
package/dist/authutilsnode.js
CHANGED
|
@@ -1,28 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
12
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
13
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
14
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
16
|
-
};
|
|
17
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
18
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
19
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
20
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
21
|
-
};
|
|
22
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
4
|
};
|
|
25
|
-
var _AuthUtilsNode_cookiejar, _AuthUtilsNode_httpsAgent, _AuthUtilsNode_debug, _AuthUtilsNode_GetHttpsAgent;
|
|
26
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
6
|
exports.AuthUtilsNode = exports.STSClientID = void 0;
|
|
28
7
|
const tough_cookie_1 = __importDefault(require("tough-cookie"));
|
|
@@ -56,147 +35,44 @@ var STSClientID;
|
|
|
56
35
|
STSClientID["PowerPlatformCustomConnectorSPA"] = "fcdcebb5-d154-4699-b99d-87d29e5e148f";
|
|
57
36
|
})(STSClientID = exports.STSClientID || (exports.STSClientID = {}));
|
|
58
37
|
class AuthUtilsNode {
|
|
38
|
+
#cookiejar;
|
|
39
|
+
#httpsAgent = null;
|
|
40
|
+
#debug = (0, debug_1.default)(`proc:${process.pid}:AuthUtilsNode`);
|
|
59
41
|
constructor() {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
rejectUnauthorized: false
|
|
73
|
-
}), "f");
|
|
74
|
-
}
|
|
75
|
-
return __classPrivateFieldGet(this, _AuthUtilsNode_httpsAgent, "f");
|
|
76
|
-
});
|
|
77
|
-
this.SetCookiesToJar = (headers, endpoint) => __awaiter(this, void 0, void 0, function* () {
|
|
78
|
-
if (headers['set-cookie']) {
|
|
79
|
-
headers['set-cookie'].map((headerCookie) => {
|
|
80
|
-
const cookie = tough_cookie_1.default.Cookie.parse(headerCookie);
|
|
81
|
-
__classPrivateFieldGet(this, _AuthUtilsNode_cookiejar, "f").setCookieSync(cookie, endpoint);
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
const cookie = tough_cookie_1.default.Cookie.parse(headers['set-cookie']);
|
|
86
|
-
__classPrivateFieldGet(this, _AuthUtilsNode_cookiejar, "f").setCookieSync(cookie, endpoint);
|
|
87
|
-
}
|
|
88
|
-
return __classPrivateFieldGet(this, _AuthUtilsNode_cookiejar, "f").getCookies(endpoint);
|
|
89
|
-
});
|
|
90
|
-
this.GetCookiesFromJar = (endpoint) => __awaiter(this, void 0, void 0, function* () {
|
|
91
|
-
return __classPrivateFieldGet(this, _AuthUtilsNode_cookiejar, "f").getCookies(endpoint);
|
|
92
|
-
});
|
|
93
|
-
this.ValidateJWT = (token, audience, endpoint) => __awaiter(this, void 0, void 0, function* () {
|
|
94
|
-
const jwksClientUri = (endpoint
|
|
95
|
-
? `${endpoint}${goptions.asoauthapiroot}${goptions.asjwksjsonpath}`
|
|
96
|
-
: `${goptions.asendpoint}:${goptions.asport}${goptions.asoauthapiroot}${goptions.asjwksjsonpath}`);
|
|
97
|
-
const jwks = (0, jwks_rsa_1.default)({
|
|
98
|
-
cache: true,
|
|
99
|
-
cacheMaxEntries: 5,
|
|
100
|
-
cacheMaxAge: 600000,
|
|
101
|
-
rateLimit: true,
|
|
102
|
-
jwksRequestsPerMinute: 10,
|
|
103
|
-
jwksUri: jwksClientUri,
|
|
104
|
-
timeout: 30000,
|
|
105
|
-
requestAgent: __classPrivateFieldGet(this, _AuthUtilsNode_GetHttpsAgent, "f").call(this)
|
|
42
|
+
this.#cookiejar = new tough_cookie_1.default.CookieJar();
|
|
43
|
+
}
|
|
44
|
+
#GetHttpsAgent = () => {
|
|
45
|
+
if (this.#httpsAgent === null) {
|
|
46
|
+
// https://nodejs.org/api/http.html#class-httpagent
|
|
47
|
+
this.#httpsAgent = new https_1.default.Agent({
|
|
48
|
+
keepAlive: goptions.keepAlive,
|
|
49
|
+
maxSockets: goptions.maxSockets,
|
|
50
|
+
maxTotalSockets: goptions.maxTotalSockets,
|
|
51
|
+
maxFreeSockets: goptions.maxFreeSockets,
|
|
52
|
+
timeout: goptions.timeout,
|
|
53
|
+
rejectUnauthorized: false
|
|
106
54
|
});
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return jsonwebtoken_1.default.verify(token, signingKey, verifyOptions);
|
|
120
|
-
});
|
|
121
|
-
this.GetAPITokenFromAuthServer = (clientId, authClientSecret, audience, endPoint) => __awaiter(this, void 0, void 0, function* () {
|
|
122
|
-
try {
|
|
123
|
-
const headers = { 'Content-Type': 'application/json' };
|
|
124
|
-
const payload = {
|
|
125
|
-
client_id: clientId,
|
|
126
|
-
client_secret: authClientSecret,
|
|
127
|
-
//client_secret: goptions.brokerclientsecret, // Broker service client secret
|
|
128
|
-
audience: audience,
|
|
129
|
-
//@@ remove audience
|
|
130
|
-
//@@ need scope to be the API identifier
|
|
131
|
-
grant_type: "client_credentials"
|
|
132
|
-
};
|
|
133
|
-
const url = (endPoint
|
|
134
|
-
? `${endPoint}${goptions.asoauthapiroot}/token`
|
|
135
|
-
: `${goptions.asendpoint}:${goptions.asport}${goptions.asoauthapiroot}/token`);
|
|
136
|
-
const retVal = yield (0, axios_1.default)({
|
|
137
|
-
url,
|
|
138
|
-
method: 'post',
|
|
139
|
-
data: payload,
|
|
140
|
-
headers: headers,
|
|
141
|
-
httpsAgent: __classPrivateFieldGet(this, _AuthUtilsNode_GetHttpsAgent, "f").call(this)
|
|
142
|
-
});
|
|
143
|
-
if (retVal.status) {
|
|
144
|
-
if (retVal.status !== 200) {
|
|
145
|
-
// Just provide a warning here
|
|
146
|
-
__classPrivateFieldGet(this, _AuthUtilsNode_debug, "f").call(this, `Error (AuthUtilsNode:GetAPITokenFromServer): Invalid response from server: [${retVal.status}]`.magenta);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
const msg = `Error (AuthUtilsNode:GetAPITokenFromServer:No retVal.status)`.red;
|
|
151
|
-
__classPrivateFieldGet(this, _AuthUtilsNode_debug, "f").call(this, msg);
|
|
152
|
-
throw new Error(msg);
|
|
153
|
-
}
|
|
154
|
-
if (retVal.data) {
|
|
155
|
-
if (retVal.data.access_token) {
|
|
156
|
-
return retVal.data.access_token;
|
|
157
|
-
}
|
|
158
|
-
else {
|
|
159
|
-
const msg = `Error (AuthUtilsNode:GetAPITokenFromServer:No retVal.data.access_token)`.red;
|
|
160
|
-
__classPrivateFieldGet(this, _AuthUtilsNode_debug, "f").call(this, msg);
|
|
161
|
-
throw new Error(msg);
|
|
55
|
+
}
|
|
56
|
+
return this.#httpsAgent;
|
|
57
|
+
};
|
|
58
|
+
VerifyRequestMiddlewareFactory(options) {
|
|
59
|
+
return async function (req, res, next) {
|
|
60
|
+
if (options.permissions) {
|
|
61
|
+
const scopes = req.auth.scope.split(' ');
|
|
62
|
+
const requiredPermissions = [];
|
|
63
|
+
for (let i = 0; i < options.permissions.length; i++) {
|
|
64
|
+
const permission = options.permissions[i];
|
|
65
|
+
if (!scopes.includes(permission)) {
|
|
66
|
+
requiredPermissions.push(permission);
|
|
162
67
|
}
|
|
163
68
|
}
|
|
164
|
-
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
catch (error) {
|
|
171
|
-
__classPrivateFieldGet(this, _AuthUtilsNode_debug, "f").call(this, `Error (AuthUtilsNode:GetAPITokenFromServer:catch): ${error}`.red);
|
|
172
|
-
if (error.response && error.response.data) {
|
|
173
|
-
__classPrivateFieldGet(this, _AuthUtilsNode_debug, "f").call(this, `Details: [${JSON.stringify(error.response.data)}]`.red);
|
|
69
|
+
if (requiredPermissions.length > 0) {
|
|
70
|
+
const errorPayload = (0, stsutils_1.GetErrorPayload)(errors_1.AppFrameworkErrorCode.APPFRAMEWORK_MISSING_PERMISSION, requiredPermissions);
|
|
71
|
+
res.status(http_status_codes_1.StatusCodes.UNAUTHORIZED).send({ status: http_status_codes_1.StatusCodes.UNAUTHORIZED, error: errorPayload });
|
|
72
|
+
return;
|
|
174
73
|
}
|
|
175
|
-
throw error;
|
|
176
74
|
}
|
|
177
|
-
|
|
178
|
-
__classPrivateFieldSet(this, _AuthUtilsNode_cookiejar, new tough_cookie_1.default.CookieJar(), "f");
|
|
179
|
-
}
|
|
180
|
-
VerifyRequestMiddlewareFactory(options) {
|
|
181
|
-
return function (req, res, next) {
|
|
182
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
183
|
-
if (options.permissions) {
|
|
184
|
-
const scopes = req.auth.scope.split(' ');
|
|
185
|
-
const requiredPermissions = [];
|
|
186
|
-
for (let i = 0; i < options.permissions.length; i++) {
|
|
187
|
-
const permission = options.permissions[i];
|
|
188
|
-
if (!scopes.includes(permission)) {
|
|
189
|
-
requiredPermissions.push(permission);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
if (requiredPermissions.length > 0) {
|
|
193
|
-
const errorPayload = (0, stsutils_1.GetErrorPayload)(errors_1.AppFrameworkErrorCode.APPFRAMEWORK_MISSING_PERMISSION, requiredPermissions);
|
|
194
|
-
res.status(http_status_codes_1.StatusCodes.UNAUTHORIZED).send({ status: http_status_codes_1.StatusCodes.UNAUTHORIZED, error: errorPayload });
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
next();
|
|
199
|
-
});
|
|
75
|
+
next();
|
|
200
76
|
};
|
|
201
77
|
}
|
|
202
78
|
/*
|
|
@@ -215,31 +91,129 @@ class AuthUtilsNode {
|
|
|
215
91
|
}
|
|
216
92
|
}
|
|
217
93
|
*/
|
|
218
|
-
verifyRequestMiddleware(req, res, next) {
|
|
219
|
-
|
|
94
|
+
async verifyRequestMiddleware(req, res, next) {
|
|
95
|
+
next();
|
|
96
|
+
/*
|
|
97
|
+
|
|
98
|
+
let cookies = await this.GetCookiesFromJar();
|
|
99
|
+
|
|
100
|
+
const valid = this.#ValidateCookies(cookies);
|
|
101
|
+
|
|
102
|
+
if (valid) {
|
|
220
103
|
next();
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
} else {
|
|
230
|
-
const error = { }; //@@
|
|
231
|
-
const invalidToken = false; //@@
|
|
232
|
-
if (invalidToken)
|
|
233
|
-
{
|
|
234
|
-
res.status(StatusCodes.UNAUTHORIZED).send( { status: StatusCodes.UNAUTHORIZED, error: 'Invalid Token', detail: error } );
|
|
235
|
-
} else{
|
|
236
|
-
res.status(StatusCodes.INTERNAL_SERVER_ERROR).send( { status: StatusCodes.INTERNAL_SERVER_ERROR, error: 'Operation was not successful', detail: error } );
|
|
237
|
-
}
|
|
104
|
+
} else {
|
|
105
|
+
const error = { }; //@@
|
|
106
|
+
const invalidToken = false; //@@
|
|
107
|
+
if (invalidToken)
|
|
108
|
+
{
|
|
109
|
+
res.status(StatusCodes.UNAUTHORIZED).send( { status: StatusCodes.UNAUTHORIZED, error: 'Invalid Token', detail: error } );
|
|
110
|
+
} else{
|
|
111
|
+
res.status(StatusCodes.INTERNAL_SERVER_ERROR).send( { status: StatusCodes.INTERNAL_SERVER_ERROR, error: 'Operation was not successful', detail: error } );
|
|
238
112
|
}
|
|
239
|
-
|
|
240
|
-
|
|
113
|
+
}
|
|
114
|
+
*/
|
|
241
115
|
}
|
|
116
|
+
SetCookiesToJar = async (headers, endpoint) => {
|
|
117
|
+
if (headers['set-cookie']) {
|
|
118
|
+
headers['set-cookie'].map((headerCookie) => {
|
|
119
|
+
const cookie = tough_cookie_1.default.Cookie.parse(headerCookie);
|
|
120
|
+
this.#cookiejar.setCookieSync(cookie, endpoint);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
const cookie = tough_cookie_1.default.Cookie.parse(headers['set-cookie']);
|
|
125
|
+
this.#cookiejar.setCookieSync(cookie, endpoint);
|
|
126
|
+
}
|
|
127
|
+
return this.#cookiejar.getCookies(endpoint);
|
|
128
|
+
};
|
|
129
|
+
GetCookiesFromJar = async (endpoint) => {
|
|
130
|
+
return this.#cookiejar.getCookies(endpoint);
|
|
131
|
+
};
|
|
132
|
+
ValidateJWT = async (token, audience, endpoint) => {
|
|
133
|
+
const jwksClientUri = (endpoint
|
|
134
|
+
? `${endpoint}${goptions.asoauthapiroot}${goptions.asjwksjsonpath}`
|
|
135
|
+
: `${goptions.asendpoint}:${goptions.asport}${goptions.asoauthapiroot}${goptions.asjwksjsonpath}`);
|
|
136
|
+
const jwks = (0, jwks_rsa_1.default)({
|
|
137
|
+
cache: true,
|
|
138
|
+
cacheMaxEntries: 5,
|
|
139
|
+
cacheMaxAge: 600000,
|
|
140
|
+
rateLimit: true,
|
|
141
|
+
jwksRequestsPerMinute: 10,
|
|
142
|
+
jwksUri: jwksClientUri,
|
|
143
|
+
timeout: 30000,
|
|
144
|
+
requestAgent: this.#GetHttpsAgent()
|
|
145
|
+
});
|
|
146
|
+
// Use decode to get the kid
|
|
147
|
+
const decodedRefreshToken = (0, jwt_decode_1.default)(token, { header: true });
|
|
148
|
+
const kid = decodedRefreshToken.kid;
|
|
149
|
+
const key = await jwks.getSigningKey(kid);
|
|
150
|
+
const signingKey = key.getPublicKey();
|
|
151
|
+
const verifyOptions = {
|
|
152
|
+
issuer: 'https://stsmda.com.au/stsauth/',
|
|
153
|
+
//subject: s,
|
|
154
|
+
audience: audience,
|
|
155
|
+
//expiresIn: 600, // 10 minutes
|
|
156
|
+
algorithm: ["RS256"] // RSASSA [ "RS256", "RS384", "RS512" ]
|
|
157
|
+
};
|
|
158
|
+
return jsonwebtoken_1.default.verify(token, signingKey, verifyOptions);
|
|
159
|
+
};
|
|
160
|
+
GetAPITokenFromAuthServer = async (clientId, authClientSecret, audience, endPoint) => {
|
|
161
|
+
try {
|
|
162
|
+
const headers = { 'Content-Type': 'application/json' };
|
|
163
|
+
const payload = {
|
|
164
|
+
client_id: clientId,
|
|
165
|
+
client_secret: authClientSecret,
|
|
166
|
+
//client_secret: goptions.brokerclientsecret, // Broker service client secret
|
|
167
|
+
audience: audience,
|
|
168
|
+
//@@ remove audience
|
|
169
|
+
//@@ need scope to be the API identifier
|
|
170
|
+
grant_type: "client_credentials"
|
|
171
|
+
};
|
|
172
|
+
const url = (endPoint
|
|
173
|
+
? `${endPoint}${goptions.asoauthapiroot}/token`
|
|
174
|
+
: `${goptions.asendpoint}:${goptions.asport}${goptions.asoauthapiroot}/token`);
|
|
175
|
+
const retVal = await (0, axios_1.default)({
|
|
176
|
+
url,
|
|
177
|
+
method: 'post',
|
|
178
|
+
data: payload,
|
|
179
|
+
headers: headers,
|
|
180
|
+
httpsAgent: this.#GetHttpsAgent()
|
|
181
|
+
});
|
|
182
|
+
if (retVal.status) {
|
|
183
|
+
if (retVal.status !== 200) {
|
|
184
|
+
// Just provide a warning here
|
|
185
|
+
this.#debug(`Error (AuthUtilsNode:GetAPITokenFromServer): Invalid response from server: [${retVal.status}]`.magenta);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
const msg = `Error (AuthUtilsNode:GetAPITokenFromServer:No retVal.status)`.red;
|
|
190
|
+
this.#debug(msg);
|
|
191
|
+
throw new Error(msg);
|
|
192
|
+
}
|
|
193
|
+
if (retVal.data) {
|
|
194
|
+
if (retVal.data.access_token) {
|
|
195
|
+
return retVal.data.access_token;
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
const msg = `Error (AuthUtilsNode:GetAPITokenFromServer:No retVal.data.access_token)`.red;
|
|
199
|
+
this.#debug(msg);
|
|
200
|
+
throw new Error(msg);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
const msg = `Error (AuthUtilsNode:GetAPITokenFromServer:No retVal.data)`.red;
|
|
205
|
+
this.#debug(msg);
|
|
206
|
+
throw new Error(msg);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
catch (error) {
|
|
210
|
+
this.#debug(`Error (AuthUtilsNode:GetAPITokenFromServer:catch): ${error}`.red);
|
|
211
|
+
if (error.response && error.response.data) {
|
|
212
|
+
this.#debug(`Details: [${JSON.stringify(error.response.data)}]`.red);
|
|
213
|
+
}
|
|
214
|
+
throw error;
|
|
215
|
+
}
|
|
216
|
+
};
|
|
242
217
|
}
|
|
243
218
|
exports.AuthUtilsNode = AuthUtilsNode;
|
|
244
|
-
_AuthUtilsNode_cookiejar = new WeakMap(), _AuthUtilsNode_httpsAgent = new WeakMap(), _AuthUtilsNode_debug = new WeakMap(), _AuthUtilsNode_GetHttpsAgent = new WeakMap();
|
|
245
219
|
//# sourceMappingURL=authutilsnode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authutilsnode.js","sourceRoot":"","sources":["../src/authutilsnode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"authutilsnode.js","sourceRoot":"","sources":["../src/authutilsnode.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAiC;AACjC,kDAAyB;AACzB,gEAA+B;AAC/B,4DAAoC;AACpC,wDAAkC;AAElC,kDAA0B;AAE1B,kDAA6C;AAC7C,MAAM,QAAQ,GAAG,IAAA,oBAAQ,GAAE,CAAA;AAE3B,kDAA+B;AAE/B,gDAA+D;AAE/D,gDAA2D;AAE3D,yDAAgD;AAMhD,IAAY,WAgBX;AAhBD,WAAY,WAAW;IACnB,gFAAiE,CAAA;IACjE,8EAA+D,CAAA;IAC/D,6EAA8D,CAAA;IAC9D,sEAAuD,CAAA;IACvD,2EAA4D,CAAA;IAC5D,qFAAsE,CAAA;IACtE,2FAA4E,CAAA;IAC5E,0FAA2E,CAAA;IAC3E,iFAAkE,CAAA;IAClE,gFAAiE,CAAA;IACjE,iFAAkE,CAAA;IAClE,sFAAuE,CAAA;IACvE,qFAAsE,CAAA;IACtE,iFAAkE,CAAA;IAClE,uFAAwE,CAAA;AAC5E,CAAC,EAhBW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAgBtB;AAED,MAAa,aAAa;IAEtB,UAAU,CAAkB;IAC5B,WAAW,GAAuB,IAAI,CAAC;IACvC,MAAM,GAAG,IAAA,eAAW,EAAC,QAAQ,OAAO,CAAC,GAA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