@digipair/skill-microsoft 0.21.15 → 0.22.2
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/index.cjs.js +1377 -626
- package/index.esm.js +1377 -626
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -2341,7 +2341,7 @@ function _create_class$E(Constructor, protoProps, staticProps) {
|
|
|
2341
2341
|
if (staticProps) _defineProperties$E(Constructor, staticProps);
|
|
2342
2342
|
return Constructor;
|
|
2343
2343
|
}
|
|
2344
|
-
function _ts_generator$
|
|
2344
|
+
function _ts_generator$p(thisArg, body) {
|
|
2345
2345
|
var f, y, t, g, _ = {
|
|
2346
2346
|
label: 0,
|
|
2347
2347
|
sent: function() {
|
|
@@ -2458,7 +2458,7 @@ function _ts_generator$o(thisArg, body) {
|
|
|
2458
2458
|
var _this = this;
|
|
2459
2459
|
return _async_to_generator$o(function() {
|
|
2460
2460
|
var _this_performanceClient, autodetectedRegionName, options, localIMDSVersionResponse, currentIMDSVersion, currentIMDSVersionResponse;
|
|
2461
|
-
return _ts_generator$
|
|
2461
|
+
return _ts_generator$p(this, function(_state) {
|
|
2462
2462
|
switch(_state.label){
|
|
2463
2463
|
case 0:
|
|
2464
2464
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RegionDiscoveryDetectRegion, _this.correlationId);
|
|
@@ -2560,7 +2560,7 @@ function _ts_generator$o(thisArg, body) {
|
|
|
2560
2560
|
var _this = this;
|
|
2561
2561
|
return _async_to_generator$o(function() {
|
|
2562
2562
|
var _this_performanceClient;
|
|
2563
|
-
return _ts_generator$
|
|
2563
|
+
return _ts_generator$p(this, function(_state) {
|
|
2564
2564
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, _this.correlationId);
|
|
2565
2565
|
return [
|
|
2566
2566
|
2,
|
|
@@ -2580,7 +2580,7 @@ function _ts_generator$o(thisArg, body) {
|
|
|
2580
2580
|
var _this = this;
|
|
2581
2581
|
return _async_to_generator$o(function() {
|
|
2582
2582
|
var _this_performanceClient, response;
|
|
2583
|
-
return _ts_generator$
|
|
2583
|
+
return _ts_generator$p(this, function(_state) {
|
|
2584
2584
|
switch(_state.label){
|
|
2585
2585
|
case 0:
|
|
2586
2586
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RegionDiscoveryGetCurrentVersion, _this.correlationId);
|
|
@@ -2993,7 +2993,7 @@ function _define_property$i(obj, key, value) {
|
|
|
2993
2993
|
}
|
|
2994
2994
|
return obj;
|
|
2995
2995
|
}
|
|
2996
|
-
function _instanceof$
|
|
2996
|
+
function _instanceof$j(left, right) {
|
|
2997
2997
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
2998
2998
|
return !!right[Symbol.hasInstance](left);
|
|
2999
2999
|
} else {
|
|
@@ -3039,7 +3039,7 @@ function _object_spread_props$8(target, source) {
|
|
|
3039
3039
|
}
|
|
3040
3040
|
return target;
|
|
3041
3041
|
}
|
|
3042
|
-
function _ts_generator$
|
|
3042
|
+
function _ts_generator$o(thisArg, body) {
|
|
3043
3043
|
var f, y, t, g, _ = {
|
|
3044
3044
|
label: 0,
|
|
3045
3045
|
sent: function() {
|
|
@@ -3403,7 +3403,7 @@ function _ts_generator$n(thisArg, body) {
|
|
|
3403
3403
|
var _this = this;
|
|
3404
3404
|
return _async_to_generator$n(function() {
|
|
3405
3405
|
var _this_performanceClient, _this_performanceClient1, metadataEntity, cloudDiscoverySource, endpointSource;
|
|
3406
|
-
return _ts_generator$
|
|
3406
|
+
return _ts_generator$o(this, function(_state) {
|
|
3407
3407
|
switch(_state.label){
|
|
3408
3408
|
case 0:
|
|
3409
3409
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityResolveEndpointsAsync, _this.correlationId);
|
|
@@ -3491,7 +3491,7 @@ function _ts_generator$n(thisArg, body) {
|
|
|
3491
3491
|
var _this = this;
|
|
3492
3492
|
return _async_to_generator$n(function() {
|
|
3493
3493
|
var _this_performanceClient, localMetadata, _this_authorityOptions_azureRegionConfiguration, hardcodedMetadata, metadata, _this_authorityOptions_azureRegionConfiguration1;
|
|
3494
|
-
return _ts_generator$
|
|
3494
|
+
return _ts_generator$o(this, function(_state) {
|
|
3495
3495
|
switch(_state.label){
|
|
3496
3496
|
case 0:
|
|
3497
3497
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityUpdateEndpointMetadata, _this.correlationId);
|
|
@@ -3651,7 +3651,7 @@ function _ts_generator$n(thisArg, body) {
|
|
|
3651
3651
|
var _this = this;
|
|
3652
3652
|
return _async_to_generator$n(function() {
|
|
3653
3653
|
var _this_performanceClient, options, openIdConfigurationEndpoint, response, isValidResponse, e;
|
|
3654
|
-
return _ts_generator$
|
|
3654
|
+
return _ts_generator$o(this, function(_state) {
|
|
3655
3655
|
switch(_state.label){
|
|
3656
3656
|
case 0:
|
|
3657
3657
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, _this.correlationId);
|
|
@@ -3724,7 +3724,7 @@ function _ts_generator$n(thisArg, body) {
|
|
|
3724
3724
|
var _this = this;
|
|
3725
3725
|
return _async_to_generator$n(function() {
|
|
3726
3726
|
var _this_performanceClient, _this_authorityOptions_azureRegionConfiguration, userConfiguredAzureRegion, _this_authorityOptions_azureRegionConfiguration1, autodetectedRegionName;
|
|
3727
|
-
return _ts_generator$
|
|
3727
|
+
return _ts_generator$o(this, function(_state) {
|
|
3728
3728
|
switch(_state.label){
|
|
3729
3729
|
case 0:
|
|
3730
3730
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, _this.correlationId);
|
|
@@ -3778,7 +3778,7 @@ function _ts_generator$n(thisArg, body) {
|
|
|
3778
3778
|
var _this = this;
|
|
3779
3779
|
return _async_to_generator$n(function() {
|
|
3780
3780
|
var _this_performanceClient, localMetadataSource, metadata;
|
|
3781
|
-
return _ts_generator$
|
|
3781
|
+
return _ts_generator$o(this, function(_state) {
|
|
3782
3782
|
switch(_state.label){
|
|
3783
3783
|
case 0:
|
|
3784
3784
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, _this.correlationId);
|
|
@@ -3893,7 +3893,7 @@ function _ts_generator$n(thisArg, body) {
|
|
|
3893
3893
|
var _this = this;
|
|
3894
3894
|
return _async_to_generator$n(function() {
|
|
3895
3895
|
var _this_performanceClient, instanceDiscoveryEndpoint, options, match, response, typedResponseBody, metadata, error, typedError;
|
|
3896
|
-
return _ts_generator$
|
|
3896
|
+
return _ts_generator$o(this, function(_state) {
|
|
3897
3897
|
switch(_state.label){
|
|
3898
3898
|
case 0:
|
|
3899
3899
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, _this.correlationId);
|
|
@@ -3950,7 +3950,7 @@ function _ts_generator$n(thisArg, body) {
|
|
|
3950
3950
|
];
|
|
3951
3951
|
case 3:
|
|
3952
3952
|
error = _state.sent();
|
|
3953
|
-
if (_instanceof$
|
|
3953
|
+
if (_instanceof$j(error, AuthError)) {
|
|
3954
3954
|
_this.logger.error("There was a network error while attempting to get the cloud discovery instance metadata.\nError: ".concat(error.errorCode, "\nError Description: ").concat(error.errorMessage));
|
|
3955
3955
|
} else {
|
|
3956
3956
|
typedError = error;
|
|
@@ -4209,7 +4209,7 @@ function _async_to_generator$m(fn) {
|
|
|
4209
4209
|
});
|
|
4210
4210
|
};
|
|
4211
4211
|
}
|
|
4212
|
-
function _ts_generator$
|
|
4212
|
+
function _ts_generator$n(thisArg, body) {
|
|
4213
4213
|
var f, y, t, g, _ = {
|
|
4214
4214
|
label: 0,
|
|
4215
4215
|
sent: function() {
|
|
@@ -4323,7 +4323,7 @@ function _createDiscoveredInstance() {
|
|
|
4323
4323
|
* @internal
|
|
4324
4324
|
*/ _async_to_generator$m(function(authorityUri, networkClient, cacheManager, authorityOptions, logger, correlationId, performanceClient) {
|
|
4325
4325
|
var authorityUriFinal, acquireTokenAuthority;
|
|
4326
|
-
return _ts_generator$
|
|
4326
|
+
return _ts_generator$n(this, function(_state) {
|
|
4327
4327
|
switch(_state.label){
|
|
4328
4328
|
case 0:
|
|
4329
4329
|
performanceClient === null || performanceClient === void 0 ? void 0 : performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, correlationId);
|
|
@@ -4390,7 +4390,7 @@ function _async_to_generator$l(fn) {
|
|
|
4390
4390
|
});
|
|
4391
4391
|
};
|
|
4392
4392
|
}
|
|
4393
|
-
function _ts_generator$
|
|
4393
|
+
function _ts_generator$m(thisArg, body) {
|
|
4394
4394
|
var f, y, t, g, _ = {
|
|
4395
4395
|
label: 0,
|
|
4396
4396
|
sent: function() {
|
|
@@ -4494,7 +4494,7 @@ function _getClientAssertion() {
|
|
|
4494
4494
|
* Licensed under the MIT License.
|
|
4495
4495
|
*/ _async_to_generator$l(function(clientAssertion, clientId, tokenEndpoint) {
|
|
4496
4496
|
var config;
|
|
4497
|
-
return _ts_generator$
|
|
4497
|
+
return _ts_generator$m(this, function(_state) {
|
|
4498
4498
|
if (typeof clientAssertion === "string") {
|
|
4499
4499
|
return [
|
|
4500
4500
|
2,
|
|
@@ -4590,7 +4590,7 @@ function _async_to_generator$k(fn) {
|
|
|
4590
4590
|
});
|
|
4591
4591
|
};
|
|
4592
4592
|
}
|
|
4593
|
-
function _ts_generator$
|
|
4593
|
+
function _ts_generator$l(thisArg, body) {
|
|
4594
4594
|
var f, y, t, g, _ = {
|
|
4595
4595
|
label: 0,
|
|
4596
4596
|
sent: function() {
|
|
@@ -4706,35 +4706,35 @@ function _ts_generator$k(thisArg, body) {
|
|
|
4706
4706
|
},
|
|
4707
4707
|
getPublicKeyThumbprint: function getPublicKeyThumbprint() {
|
|
4708
4708
|
return _async_to_generator$k(function() {
|
|
4709
|
-
return _ts_generator$
|
|
4709
|
+
return _ts_generator$l(this, function(_state) {
|
|
4710
4710
|
throw createClientAuthError(methodNotImplemented);
|
|
4711
4711
|
});
|
|
4712
4712
|
})();
|
|
4713
4713
|
},
|
|
4714
4714
|
removeTokenBindingKey: function removeTokenBindingKey() {
|
|
4715
4715
|
return _async_to_generator$k(function() {
|
|
4716
|
-
return _ts_generator$
|
|
4716
|
+
return _ts_generator$l(this, function(_state) {
|
|
4717
4717
|
throw createClientAuthError(methodNotImplemented);
|
|
4718
4718
|
});
|
|
4719
4719
|
})();
|
|
4720
4720
|
},
|
|
4721
4721
|
clearKeystore: function clearKeystore() {
|
|
4722
4722
|
return _async_to_generator$k(function() {
|
|
4723
|
-
return _ts_generator$
|
|
4723
|
+
return _ts_generator$l(this, function(_state) {
|
|
4724
4724
|
throw createClientAuthError(methodNotImplemented);
|
|
4725
4725
|
});
|
|
4726
4726
|
})();
|
|
4727
4727
|
},
|
|
4728
4728
|
signJwt: function signJwt() {
|
|
4729
4729
|
return _async_to_generator$k(function() {
|
|
4730
|
-
return _ts_generator$
|
|
4730
|
+
return _ts_generator$l(this, function(_state) {
|
|
4731
4731
|
throw createClientAuthError(methodNotImplemented);
|
|
4732
4732
|
});
|
|
4733
4733
|
})();
|
|
4734
4734
|
},
|
|
4735
4735
|
hashString: function hashString() {
|
|
4736
4736
|
return _async_to_generator$k(function() {
|
|
4737
|
-
return _ts_generator$
|
|
4737
|
+
return _ts_generator$l(this, function(_state) {
|
|
4738
4738
|
throw createClientAuthError(methodNotImplemented);
|
|
4739
4739
|
});
|
|
4740
4740
|
})();
|
|
@@ -4977,7 +4977,7 @@ function _create_class$C(Constructor, protoProps, staticProps) {
|
|
|
4977
4977
|
}();
|
|
4978
4978
|
|
|
4979
4979
|
/* eslint-disable header/header */ var name$1 = "@azure/msal-common";
|
|
4980
|
-
var version$1 = "14.13.
|
|
4980
|
+
var version$1 = "14.13.0";
|
|
4981
4981
|
|
|
4982
4982
|
function _array_like_to_array$a(arr, len) {
|
|
4983
4983
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -5386,35 +5386,20 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
5386
5386
|
*/ function tenantIdMatchesHomeTenant(tenantId, homeAccountId) {
|
|
5387
5387
|
return !!tenantId && !!homeAccountId && tenantId === homeAccountId.split(".")[1];
|
|
5388
5388
|
}
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
* acr - Authentication Context Class Reference claim used only with older B2C policies. Fallback in case tfp is not present, but likely won't be present anyway.
|
|
5404
|
-
*/ var _$tenantId = tid || tfp || acr || "";
|
|
5405
|
-
return {
|
|
5406
|
-
tenantId: _$tenantId,
|
|
5407
|
-
localAccountId: oid || sub || "",
|
|
5408
|
-
name: name,
|
|
5409
|
-
isHomeTenant: tenantIdMatchesHomeTenant(_$tenantId, homeAccountId)
|
|
5410
|
-
};
|
|
5411
|
-
} else {
|
|
5412
|
-
return {
|
|
5413
|
-
tenantId: tenantId,
|
|
5414
|
-
localAccountId: localAccountId,
|
|
5415
|
-
isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId)
|
|
5416
|
-
};
|
|
5417
|
-
}
|
|
5389
|
+
function buildTenantProfileFromIdTokenClaims(homeAccountId, idTokenClaims) {
|
|
5390
|
+
var oid = idTokenClaims.oid, sub = idTokenClaims.sub, tid = idTokenClaims.tid, name = idTokenClaims.name, tfp = idTokenClaims.tfp, acr = idTokenClaims.acr;
|
|
5391
|
+
/**
|
|
5392
|
+
* Since there is no way to determine if the authority is AAD or B2C, we exhaust all the possible claims that can serve as tenant ID with the following precedence:
|
|
5393
|
+
* tid - TenantID claim that identifies the tenant that issued the token in AAD. Expected in all AAD ID tokens, not present in B2C ID Tokens.
|
|
5394
|
+
* tfp - Trust Framework Policy claim that identifies the policy that was used to authenticate the user. Functions as tenant for B2C scenarios.
|
|
5395
|
+
* acr - Authentication Context Class Reference claim used only with older B2C policies. Fallback in case tfp is not present, but likely won't be present anyway.
|
|
5396
|
+
*/ var tenantId = tid || tfp || acr || "";
|
|
5397
|
+
return {
|
|
5398
|
+
tenantId: tenantId,
|
|
5399
|
+
localAccountId: oid || sub || "",
|
|
5400
|
+
name: name,
|
|
5401
|
+
isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId)
|
|
5402
|
+
};
|
|
5418
5403
|
}
|
|
5419
5404
|
/**
|
|
5420
5405
|
* Replaces account info that varies by tenant profile sourced from the ID token claims passed in with the tenant-specific account info
|
|
@@ -5435,7 +5420,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
5435
5420
|
if (idTokenClaims) {
|
|
5436
5421
|
// Ignore isHomeTenant, loginHint, and sid which are part of tenant profile but not base account info
|
|
5437
5422
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5438
|
-
var
|
|
5423
|
+
var _buildTenantProfileFromIdTokenClaims = buildTenantProfileFromIdTokenClaims(baseAccountInfo.homeAccountId, idTokenClaims); _buildTenantProfileFromIdTokenClaims.isHomeTenant; var claimsSourcedTenantProfile = _object_without_properties(_buildTenantProfileFromIdTokenClaims, [
|
|
5439
5424
|
"isHomeTenant"
|
|
5440
5425
|
]);
|
|
5441
5426
|
updatedAccountInfo = _object_spread_props$7(_object_spread$b({}, updatedAccountInfo, claimsSourcedTenantProfile), {
|
|
@@ -5633,10 +5618,12 @@ function _create_class$A(Constructor, protoProps, staticProps) {
|
|
|
5633
5618
|
if (accountDetails.tenantProfiles) {
|
|
5634
5619
|
account.tenantProfiles = accountDetails.tenantProfiles;
|
|
5635
5620
|
} else {
|
|
5636
|
-
var
|
|
5637
|
-
|
|
5638
|
-
tenantProfile
|
|
5639
|
-
|
|
5621
|
+
var tenantProfiles = [];
|
|
5622
|
+
if (accountDetails.idTokenClaims) {
|
|
5623
|
+
var tenantProfile = buildTenantProfileFromIdTokenClaims(accountDetails.homeAccountId, accountDetails.idTokenClaims);
|
|
5624
|
+
tenantProfiles.push(tenantProfile);
|
|
5625
|
+
}
|
|
5626
|
+
account.tenantProfiles = tenantProfiles;
|
|
5640
5627
|
}
|
|
5641
5628
|
return account;
|
|
5642
5629
|
}
|
|
@@ -5974,7 +5961,7 @@ function _inherits$c(subClass, superClass) {
|
|
|
5974
5961
|
});
|
|
5975
5962
|
if (superClass) _set_prototype_of$c(subClass, superClass);
|
|
5976
5963
|
}
|
|
5977
|
-
function _instanceof$
|
|
5964
|
+
function _instanceof$i(left, right) {
|
|
5978
5965
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
5979
5966
|
return !!right[Symbol.hasInstance](left);
|
|
5980
5967
|
} else {
|
|
@@ -6037,7 +6024,7 @@ function _create_super$c(Derived) {
|
|
|
6037
6024
|
return _possible_constructor_return$c(this, result);
|
|
6038
6025
|
};
|
|
6039
6026
|
}
|
|
6040
|
-
function _ts_generator$
|
|
6027
|
+
function _ts_generator$k(thisArg, body) {
|
|
6041
6028
|
var f, y, t, g, _ = {
|
|
6042
6029
|
label: 0,
|
|
6043
6030
|
sent: function() {
|
|
@@ -6203,10 +6190,16 @@ function _ts_generator$j(thisArg, body) {
|
|
|
6203
6190
|
value: function buildTenantProfiles(cachedAccounts, accountFilter) {
|
|
6204
6191
|
var _this = this;
|
|
6205
6192
|
return cachedAccounts.flatMap(function(accountEntity) {
|
|
6206
|
-
return _this.
|
|
6193
|
+
return _this.getAccountInfoForTenantProfiles(accountEntity, accountFilter);
|
|
6207
6194
|
});
|
|
6208
6195
|
}
|
|
6209
6196
|
},
|
|
6197
|
+
{
|
|
6198
|
+
key: "getAccountInfoForTenantProfiles",
|
|
6199
|
+
value: function getAccountInfoForTenantProfiles(accountEntity, accountFilter) {
|
|
6200
|
+
return this.getTenantProfilesFromAccountEntity(accountEntity, accountFilter === null || accountFilter === void 0 ? void 0 : accountFilter.tenantId, accountFilter);
|
|
6201
|
+
}
|
|
6202
|
+
},
|
|
6210
6203
|
{
|
|
6211
6204
|
key: "getTenantedAccountInfoByFilter",
|
|
6212
6205
|
value: function getTenantedAccountInfoByFilter(accountInfo, tokenKeys, tenantProfile, tenantProfileFilter) {
|
|
@@ -6313,7 +6306,7 @@ function _ts_generator$j(thisArg, body) {
|
|
|
6313
6306
|
var _this = this;
|
|
6314
6307
|
return _async_to_generator$j(function() {
|
|
6315
6308
|
var e, _this_commonLogger, _this_commonLogger1, _this_commonLogger2, _this_commonLogger3;
|
|
6316
|
-
return _ts_generator$
|
|
6309
|
+
return _ts_generator$k(this, function(_state) {
|
|
6317
6310
|
switch(_state.label){
|
|
6318
6311
|
case 0:
|
|
6319
6312
|
if (!cacheRecord) {
|
|
@@ -6358,7 +6351,7 @@ function _ts_generator$j(thisArg, body) {
|
|
|
6358
6351
|
case 4:
|
|
6359
6352
|
e = _state.sent();
|
|
6360
6353
|
(_this_commonLogger = _this.commonLogger) === null || _this_commonLogger === void 0 ? void 0 : _this_commonLogger.error("CacheManager.saveCacheRecord: failed");
|
|
6361
|
-
if (_instanceof$
|
|
6354
|
+
if (_instanceof$i(e, Error)) {
|
|
6362
6355
|
(_this_commonLogger1 = _this.commonLogger) === null || _this_commonLogger1 === void 0 ? void 0 : _this_commonLogger1.errorPii("CacheManager.saveCacheRecord: ".concat(e.message), correlationId);
|
|
6363
6356
|
if (e.name === "QuotaExceededError" || e.name === "NS_ERROR_DOM_QUOTA_REACHED" || e.message.includes("exceeded the quota")) {
|
|
6364
6357
|
(_this_commonLogger2 = _this.commonLogger) === null || _this_commonLogger2 === void 0 ? void 0 : _this_commonLogger2.error("CacheManager.saveCacheRecord: exceeded storage quota", correlationId);
|
|
@@ -6388,7 +6381,7 @@ function _ts_generator$j(thisArg, body) {
|
|
|
6388
6381
|
var _this = this;
|
|
6389
6382
|
return _async_to_generator$j(function() {
|
|
6390
6383
|
var accessTokenFilter, tokenKeys, currentScopes, removedAccessTokens;
|
|
6391
|
-
return _ts_generator$
|
|
6384
|
+
return _ts_generator$k(this, function(_state) {
|
|
6392
6385
|
switch(_state.label){
|
|
6393
6386
|
case 0:
|
|
6394
6387
|
accessTokenFilter = {
|
|
@@ -6663,7 +6656,7 @@ function _ts_generator$j(thisArg, body) {
|
|
|
6663
6656
|
var _this = this;
|
|
6664
6657
|
return _async_to_generator$j(function() {
|
|
6665
6658
|
var allAccountKeys, removedAccounts;
|
|
6666
|
-
return _ts_generator$
|
|
6659
|
+
return _ts_generator$k(this, function(_state) {
|
|
6667
6660
|
switch(_state.label){
|
|
6668
6661
|
case 0:
|
|
6669
6662
|
allAccountKeys = _this.getAccountKeys();
|
|
@@ -6694,7 +6687,7 @@ function _ts_generator$j(thisArg, body) {
|
|
|
6694
6687
|
var _this = this;
|
|
6695
6688
|
return _async_to_generator$j(function() {
|
|
6696
6689
|
var account;
|
|
6697
|
-
return _ts_generator$
|
|
6690
|
+
return _ts_generator$k(this, function(_state) {
|
|
6698
6691
|
switch(_state.label){
|
|
6699
6692
|
case 0:
|
|
6700
6693
|
account = _this.getAccount(accountKey, _this.commonLogger);
|
|
@@ -6727,7 +6720,7 @@ function _ts_generator$j(thisArg, body) {
|
|
|
6727
6720
|
var _this = this;
|
|
6728
6721
|
return _async_to_generator$j(function() {
|
|
6729
6722
|
var allTokenKeys, accountId, removedCredentials;
|
|
6730
|
-
return _ts_generator$
|
|
6723
|
+
return _ts_generator$k(this, function(_state) {
|
|
6731
6724
|
switch(_state.label){
|
|
6732
6725
|
case 0:
|
|
6733
6726
|
allTokenKeys = _this.getTokenKeys();
|
|
@@ -6828,7 +6821,7 @@ function _ts_generator$j(thisArg, body) {
|
|
|
6828
6821
|
var _this = this;
|
|
6829
6822
|
return _async_to_generator$j(function() {
|
|
6830
6823
|
var credential, accessTokenWithAuthSchemeEntity, kid;
|
|
6831
|
-
return _ts_generator$
|
|
6824
|
+
return _ts_generator$k(this, function(_state) {
|
|
6832
6825
|
switch(_state.label){
|
|
6833
6826
|
case 0:
|
|
6834
6827
|
credential = _this.getAccessTokenCredential(key);
|
|
@@ -7647,7 +7640,7 @@ function _ts_generator$j(thisArg, body) {
|
|
|
7647
7640
|
key: "clear",
|
|
7648
7641
|
value: function clear() {
|
|
7649
7642
|
return _async_to_generator$j(function() {
|
|
7650
|
-
return _ts_generator$
|
|
7643
|
+
return _ts_generator$k(this, function(_state) {
|
|
7651
7644
|
throw createClientAuthError(methodNotImplemented);
|
|
7652
7645
|
});
|
|
7653
7646
|
})();
|
|
@@ -7726,7 +7719,7 @@ function _object_spread$9(target) {
|
|
|
7726
7719
|
}
|
|
7727
7720
|
return target;
|
|
7728
7721
|
}
|
|
7729
|
-
function _ts_generator$
|
|
7722
|
+
function _ts_generator$j(thisArg, body) {
|
|
7730
7723
|
var f, y, t, g, _ = {
|
|
7731
7724
|
label: 0,
|
|
7732
7725
|
sent: function() {
|
|
@@ -7842,14 +7835,14 @@ var DEFAULT_CACHE_OPTIONS$1 = {
|
|
|
7842
7835
|
var DEFAULT_NETWORK_IMPLEMENTATION = {
|
|
7843
7836
|
sendGetRequestAsync: function sendGetRequestAsync() {
|
|
7844
7837
|
return _async_to_generator$i(function() {
|
|
7845
|
-
return _ts_generator$
|
|
7838
|
+
return _ts_generator$j(this, function(_state) {
|
|
7846
7839
|
throw createClientAuthError(methodNotImplemented);
|
|
7847
7840
|
});
|
|
7848
7841
|
})();
|
|
7849
7842
|
},
|
|
7850
7843
|
sendPostRequestAsync: function sendPostRequestAsync() {
|
|
7851
7844
|
return _async_to_generator$i(function() {
|
|
7852
|
-
return _ts_generator$
|
|
7845
|
+
return _ts_generator$j(this, function(_state) {
|
|
7853
7846
|
throw createClientAuthError(methodNotImplemented);
|
|
7854
7847
|
});
|
|
7855
7848
|
})();
|
|
@@ -8187,14 +8180,14 @@ function _create_class$x(Constructor, protoProps, staticProps) {
|
|
|
8187
8180
|
if (staticProps) _defineProperties$x(Constructor, staticProps);
|
|
8188
8181
|
return Constructor;
|
|
8189
8182
|
}
|
|
8190
|
-
function _instanceof$
|
|
8183
|
+
function _instanceof$h(left, right) {
|
|
8191
8184
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
8192
8185
|
return !!right[Symbol.hasInstance](left);
|
|
8193
8186
|
} else {
|
|
8194
8187
|
return left instanceof right;
|
|
8195
8188
|
}
|
|
8196
8189
|
}
|
|
8197
|
-
function _ts_generator$
|
|
8190
|
+
function _ts_generator$i(thisArg, body) {
|
|
8198
8191
|
var f, y, t, g, _ = {
|
|
8199
8192
|
label: 0,
|
|
8200
8193
|
sent: function() {
|
|
@@ -8310,7 +8303,7 @@ function _ts_generator$h(thisArg, body) {
|
|
|
8310
8303
|
var _this = this;
|
|
8311
8304
|
return _async_to_generator$h(function() {
|
|
8312
8305
|
var response, e;
|
|
8313
|
-
return _ts_generator$
|
|
8306
|
+
return _ts_generator$i(this, function(_state) {
|
|
8314
8307
|
switch(_state.label){
|
|
8315
8308
|
case 0:
|
|
8316
8309
|
ThrottlingUtils.preProcess(_this.cacheManager, thumbprint);
|
|
@@ -8334,7 +8327,7 @@ function _ts_generator$h(thisArg, body) {
|
|
|
8334
8327
|
];
|
|
8335
8328
|
case 3:
|
|
8336
8329
|
e = _state.sent();
|
|
8337
|
-
if (_instanceof$
|
|
8330
|
+
if (_instanceof$h(e, AuthError)) {
|
|
8338
8331
|
throw e;
|
|
8339
8332
|
} else {
|
|
8340
8333
|
throw createClientAuthError(networkError);
|
|
@@ -9052,7 +9045,7 @@ function _create_class$u(Constructor, protoProps, staticProps) {
|
|
|
9052
9045
|
if (staticProps) _defineProperties$u(Constructor, staticProps);
|
|
9053
9046
|
return Constructor;
|
|
9054
9047
|
}
|
|
9055
|
-
function _ts_generator$
|
|
9048
|
+
function _ts_generator$h(thisArg, body) {
|
|
9056
9049
|
var f, y, t, g, _ = {
|
|
9057
9050
|
label: 0,
|
|
9058
9051
|
sent: function() {
|
|
@@ -9213,7 +9206,7 @@ function _ts_generator$g(thisArg, body) {
|
|
|
9213
9206
|
var _this = this;
|
|
9214
9207
|
return _async_to_generator$g(function() {
|
|
9215
9208
|
var _response_body_refresh_token, _response_headers, _this_performanceClient, _this_performanceClient1, response;
|
|
9216
|
-
return _ts_generator$
|
|
9209
|
+
return _ts_generator$h(this, function(_state) {
|
|
9217
9210
|
switch(_state.label){
|
|
9218
9211
|
case 0:
|
|
9219
9212
|
if (queuedEvent) {
|
|
@@ -9254,7 +9247,7 @@ function _ts_generator$g(thisArg, body) {
|
|
|
9254
9247
|
var _this = this;
|
|
9255
9248
|
return _async_to_generator$g(function() {
|
|
9256
9249
|
var _this_performanceClient, cloudInstanceAuthorityUri, cloudInstanceAuthority;
|
|
9257
|
-
return _ts_generator$
|
|
9250
|
+
return _ts_generator$h(this, function(_state) {
|
|
9258
9251
|
switch(_state.label){
|
|
9259
9252
|
case 0:
|
|
9260
9253
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.UpdateTokenEndpointAuthority, correlationId);
|
|
@@ -9635,7 +9628,7 @@ function _object_spread$8(target) {
|
|
|
9635
9628
|
}
|
|
9636
9629
|
return target;
|
|
9637
9630
|
}
|
|
9638
|
-
function _ts_generator$
|
|
9631
|
+
function _ts_generator$g(thisArg, body) {
|
|
9639
9632
|
var f, y, t, g, _ = {
|
|
9640
9633
|
label: 0,
|
|
9641
9634
|
sent: function() {
|
|
@@ -9755,7 +9748,7 @@ function _ts_generator$f(thisArg, body) {
|
|
|
9755
9748
|
var _this = this;
|
|
9756
9749
|
return _async_to_generator$f(function() {
|
|
9757
9750
|
var _this_performanceClient, reqCnf, reqCnfString;
|
|
9758
|
-
return _ts_generator$
|
|
9751
|
+
return _ts_generator$g(this, function(_state) {
|
|
9759
9752
|
switch(_state.label){
|
|
9760
9753
|
case 0:
|
|
9761
9754
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.PopTokenGenerateCnf, request.correlationId);
|
|
@@ -9788,7 +9781,7 @@ function _ts_generator$f(thisArg, body) {
|
|
|
9788
9781
|
var _this = this;
|
|
9789
9782
|
return _async_to_generator$f(function() {
|
|
9790
9783
|
var _this_performanceClient, kidThumbprint;
|
|
9791
|
-
return _ts_generator$
|
|
9784
|
+
return _ts_generator$g(this, function(_state) {
|
|
9792
9785
|
switch(_state.label){
|
|
9793
9786
|
case 0:
|
|
9794
9787
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.PopTokenGenerateKid, request.correlationId);
|
|
@@ -9820,7 +9813,7 @@ function _ts_generator$f(thisArg, body) {
|
|
|
9820
9813
|
*/ function signPopToken(accessToken, keyId, request) {
|
|
9821
9814
|
var _this = this;
|
|
9822
9815
|
return _async_to_generator$f(function() {
|
|
9823
|
-
return _ts_generator$
|
|
9816
|
+
return _ts_generator$g(this, function(_state) {
|
|
9824
9817
|
return [
|
|
9825
9818
|
2,
|
|
9826
9819
|
_this.signPayload(accessToken, keyId, request)
|
|
@@ -9842,7 +9835,7 @@ function _ts_generator$f(thisArg, body) {
|
|
|
9842
9835
|
var _this = this;
|
|
9843
9836
|
return _async_to_generator$f(function() {
|
|
9844
9837
|
var resourceRequestMethod, resourceRequestUri, shrClaims, shrNonce, shrOptions, resourceUrlString, resourceUrlComponents;
|
|
9845
|
-
return _ts_generator$
|
|
9838
|
+
return _ts_generator$g(this, function(_state) {
|
|
9846
9839
|
// Deconstruct request to extract SHR parameters
|
|
9847
9840
|
resourceRequestMethod = request.resourceRequestMethod, resourceRequestUri = request.resourceRequestUri, shrClaims = request.shrClaims, shrNonce = request.shrNonce, shrOptions = request.shrOptions;
|
|
9848
9841
|
resourceUrlString = resourceRequestUri ? new UrlString(resourceRequestUri) : undefined;
|
|
@@ -9971,7 +9964,7 @@ function _create_class$q(Constructor, protoProps, staticProps) {
|
|
|
9971
9964
|
if (staticProps) _defineProperties$q(Constructor, staticProps);
|
|
9972
9965
|
return Constructor;
|
|
9973
9966
|
}
|
|
9974
|
-
function _ts_generator$
|
|
9967
|
+
function _ts_generator$f(thisArg, body) {
|
|
9975
9968
|
var f, y, t, g, _ = {
|
|
9976
9969
|
label: 0,
|
|
9977
9970
|
sent: function() {
|
|
@@ -10167,7 +10160,7 @@ function _ts_generator$e(thisArg, body) {
|
|
|
10167
10160
|
var _this = this;
|
|
10168
10161
|
return _async_to_generator$e(function() {
|
|
10169
10162
|
var _this_performanceClient, idTokenClaims, authTime, requestStateObj, cacheRecord, cacheContext, key, account;
|
|
10170
|
-
return _ts_generator$
|
|
10163
|
+
return _ts_generator$f(this, function(_state) {
|
|
10171
10164
|
switch(_state.label){
|
|
10172
10165
|
case 0:
|
|
10173
10166
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.HandleServerTokenResponse, serverTokenResponse.correlation_id);
|
|
@@ -10356,7 +10349,7 @@ function _ts_generator$e(thisArg, body) {
|
|
|
10356
10349
|
*/ function generateAuthenticationResult(cryptoObj, authority, cacheRecord, fromTokenCache, request, idTokenClaims, requestState, serverTokenResponse, requestId) {
|
|
10357
10350
|
return _async_to_generator$e(function() {
|
|
10358
10351
|
var _cacheRecord_idToken, _cacheRecord_idToken1, _cacheRecord_accessToken, _cacheRecord_account, _cacheRecord_account1, accessToken, responseScopes, expiresOn, extExpiresOn, refreshOn, familyId, popTokenGenerator, _cacheRecord_accessToken1, secret, keyId, uid, tid, accountInfo;
|
|
10359
|
-
return _ts_generator$
|
|
10352
|
+
return _ts_generator$f(this, function(_state) {
|
|
10360
10353
|
switch(_state.label){
|
|
10361
10354
|
case 0:
|
|
10362
10355
|
accessToken = Constants$1.EMPTY_STRING;
|
|
@@ -10463,11 +10456,10 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
10463
10456
|
nativeAccountId: nativeAccountId
|
|
10464
10457
|
}, authority, base64Decode);
|
|
10465
10458
|
var tenantProfiles = baseAccount.tenantProfiles || [];
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
return tenantProfile.tenantId === tenantId;
|
|
10459
|
+
if (claimsTenantId && idTokenClaims && !tenantProfiles.find(function(tenantProfile) {
|
|
10460
|
+
return tenantProfile.tenantId === claimsTenantId;
|
|
10469
10461
|
})) {
|
|
10470
|
-
var newTenantProfile =
|
|
10462
|
+
var newTenantProfile = buildTenantProfileFromIdTokenClaims(homeAccountId, idTokenClaims);
|
|
10471
10463
|
tenantProfiles.push(newTenantProfile);
|
|
10472
10464
|
}
|
|
10473
10465
|
baseAccount.tenantProfiles = tenantProfiles;
|
|
@@ -10626,7 +10618,7 @@ function _create_super$9(Derived) {
|
|
|
10626
10618
|
return _possible_constructor_return$9(this, result);
|
|
10627
10619
|
};
|
|
10628
10620
|
}
|
|
10629
|
-
function _ts_generator$
|
|
10621
|
+
function _ts_generator$e(thisArg, body) {
|
|
10630
10622
|
var f, y, t, g, _ = {
|
|
10631
10623
|
label: 0,
|
|
10632
10624
|
sent: function() {
|
|
@@ -10756,7 +10748,7 @@ function _ts_generator$d(thisArg, body) {
|
|
|
10756
10748
|
var _this = this;
|
|
10757
10749
|
return _async_to_generator$d(function() {
|
|
10758
10750
|
var _this_performanceClient, queryString;
|
|
10759
|
-
return _ts_generator$
|
|
10751
|
+
return _ts_generator$e(this, function(_state) {
|
|
10760
10752
|
switch(_state.label){
|
|
10761
10753
|
case 0:
|
|
10762
10754
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.GetAuthCodeUrl, request.correlationId);
|
|
@@ -10785,7 +10777,7 @@ function _ts_generator$d(thisArg, body) {
|
|
|
10785
10777
|
var _this = this;
|
|
10786
10778
|
return _async_to_generator$d(function() {
|
|
10787
10779
|
var _this_performanceClient, _response_headers, reqTimestamp, response, requestId, responseHandler;
|
|
10788
|
-
return _ts_generator$
|
|
10780
|
+
return _ts_generator$e(this, function(_state) {
|
|
10789
10781
|
switch(_state.label){
|
|
10790
10782
|
case 0:
|
|
10791
10783
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthClientAcquireToken, request.correlationId);
|
|
@@ -10857,7 +10849,7 @@ function _ts_generator$d(thisArg, body) {
|
|
|
10857
10849
|
var _this = this;
|
|
10858
10850
|
return _async_to_generator$d(function() {
|
|
10859
10851
|
var _this_performanceClient, _request_tokenBodyParameters, queryParametersString, endpoint, requestBody, ccsCredential, clientInfo, headers, thumbprint;
|
|
10860
|
-
return _ts_generator$
|
|
10852
|
+
return _ts_generator$e(this, function(_state) {
|
|
10861
10853
|
switch(_state.label){
|
|
10862
10854
|
case 0:
|
|
10863
10855
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthClientExecuteTokenRequest, request.correlationId);
|
|
@@ -10911,7 +10903,7 @@ function _ts_generator$d(thisArg, body) {
|
|
|
10911
10903
|
var _this = this;
|
|
10912
10904
|
return _async_to_generator$d(function() {
|
|
10913
10905
|
var _this_performanceClient, _request_tokenBodyParameters, parameterBuilder, clientAssertion, _, popTokenGenerator, reqCnfData, generatedReqCnfData, correlationId, ccsCred, clientInfo, clientInfo1;
|
|
10914
|
-
return _ts_generator$
|
|
10906
|
+
return _ts_generator$e(this, function(_state) {
|
|
10915
10907
|
switch(_state.label){
|
|
10916
10908
|
case 0:
|
|
10917
10909
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthClientCreateTokenRequestBody, request.correlationId);
|
|
@@ -11064,7 +11056,7 @@ function _ts_generator$d(thisArg, body) {
|
|
|
11064
11056
|
var _this = this;
|
|
11065
11057
|
return _async_to_generator$d(function() {
|
|
11066
11058
|
var _this_performanceClient, _request_extraQueryParameters, parameterBuilder, requestScopes, correlationId, accountSid, accountLoginHintClaim, clientInfo, clientInfo1, clientInfo2, popTokenGenerator, reqCnfData, generatedReqCnfData;
|
|
11067
|
-
return _ts_generator$
|
|
11059
|
+
return _ts_generator$e(this, function(_state) {
|
|
11068
11060
|
switch(_state.label){
|
|
11069
11061
|
case 0:
|
|
11070
11062
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthClientCreateQueryString, request.correlationId);
|
|
@@ -11345,7 +11337,7 @@ function _inherits$8(subClass, superClass) {
|
|
|
11345
11337
|
});
|
|
11346
11338
|
if (superClass) _set_prototype_of$8(subClass, superClass);
|
|
11347
11339
|
}
|
|
11348
|
-
function _instanceof$
|
|
11340
|
+
function _instanceof$g(left, right) {
|
|
11349
11341
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
11350
11342
|
return !!right[Symbol.hasInstance](left);
|
|
11351
11343
|
} else {
|
|
@@ -11432,7 +11424,7 @@ function _create_super$8(Derived) {
|
|
|
11432
11424
|
return _possible_constructor_return$8(this, result);
|
|
11433
11425
|
};
|
|
11434
11426
|
}
|
|
11435
|
-
function _ts_generator$
|
|
11427
|
+
function _ts_generator$d(thisArg, body) {
|
|
11436
11428
|
var f, y, t, g, _ = {
|
|
11437
11429
|
label: 0,
|
|
11438
11430
|
sent: function() {
|
|
@@ -11548,7 +11540,7 @@ function _ts_generator$c(thisArg, body) {
|
|
|
11548
11540
|
var _this = this;
|
|
11549
11541
|
return _async_to_generator$c(function() {
|
|
11550
11542
|
var _this_performanceClient, _response_headers, reqTimestamp, response, requestId, responseHandler;
|
|
11551
|
-
return _ts_generator$
|
|
11543
|
+
return _ts_generator$d(this, function(_state) {
|
|
11552
11544
|
switch(_state.label){
|
|
11553
11545
|
case 0:
|
|
11554
11546
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
|
|
@@ -11581,7 +11573,7 @@ function _ts_generator$c(thisArg, body) {
|
|
|
11581
11573
|
var _this = this;
|
|
11582
11574
|
return _async_to_generator$c(function() {
|
|
11583
11575
|
var _this_performanceClient, isFOCI, e, noFamilyRTInCache, clientMismatchErrorWithFamilyRT;
|
|
11584
|
-
return _ts_generator$
|
|
11576
|
+
return _ts_generator$d(this, function(_state) {
|
|
11585
11577
|
switch(_state.label){
|
|
11586
11578
|
case 0:
|
|
11587
11579
|
// Cannot renew token if no request object is given.
|
|
@@ -11618,8 +11610,8 @@ function _ts_generator$c(thisArg, body) {
|
|
|
11618
11610
|
];
|
|
11619
11611
|
case 3:
|
|
11620
11612
|
e = _state.sent();
|
|
11621
|
-
noFamilyRTInCache = _instanceof$
|
|
11622
|
-
clientMismatchErrorWithFamilyRT = _instanceof$
|
|
11613
|
+
noFamilyRTInCache = _instanceof$g(e, InteractionRequiredAuthError) && e.errorCode === noTokensFound;
|
|
11614
|
+
clientMismatchErrorWithFamilyRT = _instanceof$g(e, ServerError) && e.errorCode === Errors.INVALID_GRANT_ERROR && e.subError === Errors.CLIENT_MISMATCH_ERROR;
|
|
11623
11615
|
// if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART)
|
|
11624
11616
|
if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) {
|
|
11625
11617
|
return [
|
|
@@ -11650,7 +11642,7 @@ function _ts_generator$c(thisArg, body) {
|
|
|
11650
11642
|
var _this = this;
|
|
11651
11643
|
return _async_to_generator$c(function() {
|
|
11652
11644
|
var _this_performanceClient, refreshToken, refreshTokenRequest, e, badRefreshTokenKey;
|
|
11653
|
-
return _ts_generator$
|
|
11645
|
+
return _ts_generator$d(this, function(_state) {
|
|
11654
11646
|
switch(_state.label){
|
|
11655
11647
|
case 0:
|
|
11656
11648
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, request.correlationId);
|
|
@@ -11690,7 +11682,7 @@ function _ts_generator$c(thisArg, body) {
|
|
|
11690
11682
|
];
|
|
11691
11683
|
case 3:
|
|
11692
11684
|
e = _state.sent();
|
|
11693
|
-
if (_instanceof$
|
|
11685
|
+
if (_instanceof$g(e, InteractionRequiredAuthError) && e.subError === badToken) {
|
|
11694
11686
|
// Remove bad refresh token from cache
|
|
11695
11687
|
_this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");
|
|
11696
11688
|
badRefreshTokenKey = generateCredentialKey(refreshToken);
|
|
@@ -11716,7 +11708,7 @@ function _ts_generator$c(thisArg, body) {
|
|
|
11716
11708
|
var _this = this;
|
|
11717
11709
|
return _async_to_generator$c(function() {
|
|
11718
11710
|
var _this_performanceClient, _request_tokenBodyParameters, queryParametersString, endpoint, requestBody, headers, thumbprint;
|
|
11719
|
-
return _ts_generator$
|
|
11711
|
+
return _ts_generator$d(this, function(_state) {
|
|
11720
11712
|
switch(_state.label){
|
|
11721
11713
|
case 0:
|
|
11722
11714
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RefreshTokenClientExecuteTokenRequest, request.correlationId);
|
|
@@ -11758,7 +11750,7 @@ function _ts_generator$c(thisArg, body) {
|
|
|
11758
11750
|
var _this = this;
|
|
11759
11751
|
return _async_to_generator$c(function() {
|
|
11760
11752
|
var _this_performanceClient, _request_tokenBodyParameters, _this_config_authOptions_authority_options_OIDCOptions, correlationId, parameterBuilder, clientAssertion, _, popTokenGenerator, reqCnfData, generatedReqCnfData, clientInfo;
|
|
11761
|
-
return _ts_generator$
|
|
11753
|
+
return _ts_generator$d(this, function(_state) {
|
|
11762
11754
|
switch(_state.label){
|
|
11763
11755
|
case 0:
|
|
11764
11756
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, request.correlationId);
|
|
@@ -11970,7 +11962,7 @@ function _inherits$7(subClass, superClass) {
|
|
|
11970
11962
|
});
|
|
11971
11963
|
if (superClass) _set_prototype_of$7(subClass, superClass);
|
|
11972
11964
|
}
|
|
11973
|
-
function _instanceof$
|
|
11965
|
+
function _instanceof$f(left, right) {
|
|
11974
11966
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
11975
11967
|
return !!right[Symbol.hasInstance](left);
|
|
11976
11968
|
} else {
|
|
@@ -12104,7 +12096,7 @@ function _create_super$7(Derived) {
|
|
|
12104
12096
|
return _possible_constructor_return$7(this, result);
|
|
12105
12097
|
};
|
|
12106
12098
|
}
|
|
12107
|
-
function _ts_generator$
|
|
12099
|
+
function _ts_generator$c(thisArg, body) {
|
|
12108
12100
|
var f, y, t, g, _ = {
|
|
12109
12101
|
label: 0,
|
|
12110
12102
|
sent: function() {
|
|
@@ -12220,7 +12212,7 @@ function _ts_generator$b(thisArg, body) {
|
|
|
12220
12212
|
var _this = this;
|
|
12221
12213
|
return _async_to_generator$b(function() {
|
|
12222
12214
|
var _request_scopes, _ref, authResponse, cacheOutcome, refreshTokenClient, e, refreshTokenClient1;
|
|
12223
|
-
return _ts_generator$
|
|
12215
|
+
return _ts_generator$c(this, function(_state) {
|
|
12224
12216
|
switch(_state.label){
|
|
12225
12217
|
case 0:
|
|
12226
12218
|
_state.trys.push([
|
|
@@ -12256,7 +12248,7 @@ function _ts_generator$b(thisArg, body) {
|
|
|
12256
12248
|
];
|
|
12257
12249
|
case 2:
|
|
12258
12250
|
e = _state.sent();
|
|
12259
|
-
if (_instanceof$
|
|
12251
|
+
if (_instanceof$f(e, ClientAuthError) && e.errorCode === tokenRefreshRequired) {
|
|
12260
12252
|
refreshTokenClient1 = new RefreshTokenClient(_this.config, _this.performanceClient);
|
|
12261
12253
|
return [
|
|
12262
12254
|
2,
|
|
@@ -12283,7 +12275,7 @@ function _ts_generator$b(thisArg, body) {
|
|
|
12283
12275
|
var _this = this;
|
|
12284
12276
|
return _async_to_generator$b(function() {
|
|
12285
12277
|
var _this_performanceClient, lastCacheOutcome, requestTenantId, tokenKeys, cachedAccessToken, environment, cacheRecord;
|
|
12286
|
-
return _ts_generator$
|
|
12278
|
+
return _ts_generator$c(this, function(_state) {
|
|
12287
12279
|
switch(_state.label){
|
|
12288
12280
|
case 0:
|
|
12289
12281
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.SilentFlowClientAcquireCachedToken, request.correlationId);
|
|
@@ -12364,7 +12356,7 @@ function _ts_generator$b(thisArg, body) {
|
|
|
12364
12356
|
var _this = this;
|
|
12365
12357
|
return _async_to_generator$b(function() {
|
|
12366
12358
|
var _this_performanceClient, idTokenClaims, authTime;
|
|
12367
|
-
return _ts_generator$
|
|
12359
|
+
return _ts_generator$c(this, function(_state) {
|
|
12368
12360
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, request.correlationId);
|
|
12369
12361
|
if (cacheRecord.idToken) {
|
|
12370
12362
|
idTokenClaims = extractTokenClaims(cacheRecord.idToken.secret, _this.config.cryptoInterface.base64Decode);
|
|
@@ -12408,7 +12400,7 @@ function _create_class$m(Constructor, protoProps, staticProps) {
|
|
|
12408
12400
|
if (staticProps) _defineProperties$m(Constructor, staticProps);
|
|
12409
12401
|
return Constructor;
|
|
12410
12402
|
}
|
|
12411
|
-
function _instanceof$
|
|
12403
|
+
function _instanceof$e(left, right) {
|
|
12412
12404
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
12413
12405
|
return !!right[Symbol.hasInstance](left);
|
|
12414
12406
|
} else {
|
|
@@ -12491,8 +12483,8 @@ function _instanceof$d(left, right) {
|
|
|
12491
12483
|
lastRequests.errors.shift();
|
|
12492
12484
|
}
|
|
12493
12485
|
lastRequests.failedRequests.push(this.apiId, this.correlationId);
|
|
12494
|
-
if (_instanceof$
|
|
12495
|
-
if (_instanceof$
|
|
12486
|
+
if (_instanceof$e(error, Error) && !!error && error.toString()) {
|
|
12487
|
+
if (_instanceof$e(error, AuthError)) {
|
|
12496
12488
|
if (error.subError) {
|
|
12497
12489
|
lastRequests.errors.push(error.subError);
|
|
12498
12490
|
} else if (error.errorCode) {
|
|
@@ -12894,8 +12886,6 @@ var ProxyStatus = {
|
|
|
12894
12886
|
*/ var JwtConstants = {
|
|
12895
12887
|
ALGORITHM: "alg",
|
|
12896
12888
|
RSA_256: "RS256",
|
|
12897
|
-
PSS_256: "PS256",
|
|
12898
|
-
X5T_256: "x5t#S256",
|
|
12899
12889
|
X5T: "x5t",
|
|
12900
12890
|
X5C: "x5c",
|
|
12901
12891
|
AUDIENCE: "aud",
|
|
@@ -13105,7 +13095,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
13105
13095
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
13106
13096
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
|
|
13107
13097
|
}
|
|
13108
|
-
function _ts_generator$
|
|
13098
|
+
function _ts_generator$b(thisArg, body) {
|
|
13109
13099
|
var f, y, t, g, _ = {
|
|
13110
13100
|
label: 0,
|
|
13111
13101
|
sent: function() {
|
|
@@ -13221,7 +13211,7 @@ function _ts_generator$a(thisArg, body) {
|
|
|
13221
13211
|
*/ function sendGetRequestAsync(url, options, timeout) {
|
|
13222
13212
|
var _this = this;
|
|
13223
13213
|
return _async_to_generator$a(function() {
|
|
13224
|
-
return _ts_generator$
|
|
13214
|
+
return _ts_generator$b(this, function(_state) {
|
|
13225
13215
|
if (_this.proxyUrl) {
|
|
13226
13216
|
return [
|
|
13227
13217
|
2,
|
|
@@ -13246,7 +13236,7 @@ function _ts_generator$a(thisArg, body) {
|
|
|
13246
13236
|
*/ function sendPostRequestAsync(url, options) {
|
|
13247
13237
|
var _this = this;
|
|
13248
13238
|
return _async_to_generator$a(function() {
|
|
13249
|
-
return _ts_generator$
|
|
13239
|
+
return _ts_generator$b(this, function(_state) {
|
|
13250
13240
|
if (_this.proxyUrl) {
|
|
13251
13241
|
return [
|
|
13252
13242
|
2,
|
|
@@ -13618,274 +13608,70 @@ function createManagedIdentityError(errorCode) {
|
|
|
13618
13608
|
return new ManagedIdentityError(errorCode);
|
|
13619
13609
|
}
|
|
13620
13610
|
|
|
13621
|
-
function
|
|
13622
|
-
if (
|
|
13623
|
-
|
|
13624
|
-
|
|
13625
|
-
|
|
13626
|
-
|
|
13627
|
-
|
|
13628
|
-
|
|
13629
|
-
|
|
13611
|
+
function _define_property$5(obj, key, value) {
|
|
13612
|
+
if (key in obj) {
|
|
13613
|
+
Object.defineProperty(obj, key, {
|
|
13614
|
+
value: value,
|
|
13615
|
+
enumerable: true,
|
|
13616
|
+
configurable: true,
|
|
13617
|
+
writable: true
|
|
13618
|
+
});
|
|
13619
|
+
} else {
|
|
13620
|
+
obj[key] = value;
|
|
13630
13621
|
}
|
|
13622
|
+
return obj;
|
|
13631
13623
|
}
|
|
13632
|
-
function
|
|
13633
|
-
for(var i =
|
|
13634
|
-
var
|
|
13635
|
-
|
|
13636
|
-
|
|
13637
|
-
|
|
13638
|
-
|
|
13624
|
+
function _object_spread$4(target) {
|
|
13625
|
+
for(var i = 1; i < arguments.length; i++){
|
|
13626
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
13627
|
+
var ownKeys = Object.keys(source);
|
|
13628
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
13629
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
13630
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
13631
|
+
}));
|
|
13632
|
+
}
|
|
13633
|
+
ownKeys.forEach(function(key) {
|
|
13634
|
+
_define_property$5(target, key, source[key]);
|
|
13635
|
+
});
|
|
13639
13636
|
}
|
|
13637
|
+
return target;
|
|
13640
13638
|
}
|
|
13641
|
-
function
|
|
13642
|
-
|
|
13643
|
-
if (
|
|
13644
|
-
|
|
13645
|
-
|
|
13646
|
-
|
|
13647
|
-
|
|
13648
|
-
|
|
13649
|
-
};
|
|
13650
|
-
return _get_prototype_of$5(o);
|
|
13651
|
-
}
|
|
13652
|
-
function _inherits$5(subClass, superClass) {
|
|
13653
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
13654
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
13655
|
-
}
|
|
13656
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
13657
|
-
constructor: {
|
|
13658
|
-
value: subClass,
|
|
13659
|
-
writable: true,
|
|
13660
|
-
configurable: true
|
|
13639
|
+
function ownKeys$3(object, enumerableOnly) {
|
|
13640
|
+
var keys = Object.keys(object);
|
|
13641
|
+
if (Object.getOwnPropertySymbols) {
|
|
13642
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
13643
|
+
if (enumerableOnly) {
|
|
13644
|
+
symbols = symbols.filter(function(sym) {
|
|
13645
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
13646
|
+
});
|
|
13661
13647
|
}
|
|
13662
|
-
|
|
13663
|
-
if (superClass) _set_prototype_of$5(subClass, superClass);
|
|
13664
|
-
}
|
|
13665
|
-
function _possible_constructor_return$5(self, call) {
|
|
13666
|
-
if (call && (_type_of$d(call) === "object" || typeof call === "function")) {
|
|
13667
|
-
return call;
|
|
13648
|
+
keys.push.apply(keys, symbols);
|
|
13668
13649
|
}
|
|
13669
|
-
return
|
|
13670
|
-
}
|
|
13671
|
-
function _set_prototype_of$5(o, p) {
|
|
13672
|
-
_set_prototype_of$5 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
13673
|
-
o.__proto__ = p;
|
|
13674
|
-
return o;
|
|
13675
|
-
};
|
|
13676
|
-
return _set_prototype_of$5(o, p);
|
|
13677
|
-
}
|
|
13678
|
-
function _type_of$d(obj) {
|
|
13679
|
-
"@swc/helpers - typeof";
|
|
13680
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
13650
|
+
return keys;
|
|
13681
13651
|
}
|
|
13682
|
-
function
|
|
13683
|
-
|
|
13684
|
-
if (
|
|
13685
|
-
|
|
13686
|
-
|
|
13687
|
-
|
|
13688
|
-
|
|
13689
|
-
|
|
13690
|
-
return false;
|
|
13652
|
+
function _object_spread_props$3(target, source) {
|
|
13653
|
+
source = source != null ? source : {};
|
|
13654
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
13655
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
13656
|
+
} else {
|
|
13657
|
+
ownKeys$3(Object(source)).forEach(function(key) {
|
|
13658
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
13659
|
+
});
|
|
13691
13660
|
}
|
|
13692
|
-
|
|
13693
|
-
function _create_super$5(Derived) {
|
|
13694
|
-
var hasNativeReflectConstruct = _is_native_reflect_construct$5();
|
|
13695
|
-
return function _createSuperInternal() {
|
|
13696
|
-
var Super = _get_prototype_of$5(Derived), result;
|
|
13697
|
-
if (hasNativeReflectConstruct) {
|
|
13698
|
-
var NewTarget = _get_prototype_of$5(this).constructor;
|
|
13699
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
13700
|
-
} else {
|
|
13701
|
-
result = Super.apply(this, arguments);
|
|
13702
|
-
}
|
|
13703
|
-
return _possible_constructor_return$5(this, result);
|
|
13704
|
-
};
|
|
13661
|
+
return target;
|
|
13705
13662
|
}
|
|
13706
13663
|
/*
|
|
13707
13664
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13708
13665
|
* Licensed under the MIT License.
|
|
13709
|
-
*/
|
|
13710
|
-
|
|
13711
|
-
|
|
13712
|
-
|
|
13713
|
-
|
|
13714
|
-
|
|
13715
|
-
|
|
13716
|
-
|
|
13717
|
-
|
|
13718
|
-
desc: "Loopback server callback was invoked without a url. This is unexpected."
|
|
13719
|
-
},
|
|
13720
|
-
noAuthCodeInResponse: {
|
|
13721
|
-
code: "no_auth_code_in_response",
|
|
13722
|
-
desc: "No auth code found in the server response. Please check your network trace to determine what happened."
|
|
13723
|
-
},
|
|
13724
|
-
noLoopbackServerExists: {
|
|
13725
|
-
code: "no_loopback_server_exists",
|
|
13726
|
-
desc: "No loopback server exists yet."
|
|
13727
|
-
},
|
|
13728
|
-
loopbackServerAlreadyExists: {
|
|
13729
|
-
code: "loopback_server_already_exists",
|
|
13730
|
-
desc: "Loopback server already exists. Cannot create another."
|
|
13731
|
-
},
|
|
13732
|
-
loopbackServerTimeout: {
|
|
13733
|
-
code: "loopback_server_timeout",
|
|
13734
|
-
desc: "Timed out waiting for auth code listener to be registered."
|
|
13735
|
-
},
|
|
13736
|
-
stateNotFoundError: {
|
|
13737
|
-
code: "state_not_found",
|
|
13738
|
-
desc: "State not found. Please verify that the request originated from msal."
|
|
13739
|
-
},
|
|
13740
|
-
thumbprintMissing: {
|
|
13741
|
-
code: "thumbprint_missing_from_client_certificate",
|
|
13742
|
-
desc: "Client certificate does not contain a SHA-1 or SHA-256 thumbprint."
|
|
13743
|
-
}
|
|
13744
|
-
};
|
|
13745
|
-
var NodeAuthError = /*#__PURE__*/ function(AuthError) {
|
|
13746
|
-
_inherits$5(NodeAuthError, AuthError);
|
|
13747
|
-
var _super = _create_super$5(NodeAuthError);
|
|
13748
|
-
function NodeAuthError(errorCode, errorMessage) {
|
|
13749
|
-
_class_call_check$i(this, NodeAuthError);
|
|
13750
|
-
var _this;
|
|
13751
|
-
_this = _super.call(this, errorCode, errorMessage);
|
|
13752
|
-
_this.name = "NodeAuthError";
|
|
13753
|
-
return _this;
|
|
13754
|
-
}
|
|
13755
|
-
_create_class$i(NodeAuthError, null, [
|
|
13756
|
-
{
|
|
13757
|
-
key: "createInvalidLoopbackAddressTypeError",
|
|
13758
|
-
value: /**
|
|
13759
|
-
* Creates an error thrown if loopback server address is of type string.
|
|
13760
|
-
*/ function createInvalidLoopbackAddressTypeError() {
|
|
13761
|
-
return new NodeAuthError(NodeAuthErrorMessage.invalidLoopbackAddressType.code, "".concat(NodeAuthErrorMessage.invalidLoopbackAddressType.desc));
|
|
13762
|
-
}
|
|
13763
|
-
},
|
|
13764
|
-
{
|
|
13765
|
-
key: "createUnableToLoadRedirectUrlError",
|
|
13766
|
-
value: /**
|
|
13767
|
-
* Creates an error thrown if the loopback server is unable to get a url.
|
|
13768
|
-
*/ function createUnableToLoadRedirectUrlError() {
|
|
13769
|
-
return new NodeAuthError(NodeAuthErrorMessage.unableToLoadRedirectUri.code, "".concat(NodeAuthErrorMessage.unableToLoadRedirectUri.desc));
|
|
13770
|
-
}
|
|
13771
|
-
},
|
|
13772
|
-
{
|
|
13773
|
-
key: "createNoAuthCodeInResponseError",
|
|
13774
|
-
value: /**
|
|
13775
|
-
* Creates an error thrown if the server response does not contain an auth code.
|
|
13776
|
-
*/ function createNoAuthCodeInResponseError() {
|
|
13777
|
-
return new NodeAuthError(NodeAuthErrorMessage.noAuthCodeInResponse.code, "".concat(NodeAuthErrorMessage.noAuthCodeInResponse.desc));
|
|
13778
|
-
}
|
|
13779
|
-
},
|
|
13780
|
-
{
|
|
13781
|
-
key: "createNoLoopbackServerExistsError",
|
|
13782
|
-
value: /**
|
|
13783
|
-
* Creates an error thrown if the loopback server has not been spun up yet.
|
|
13784
|
-
*/ function createNoLoopbackServerExistsError() {
|
|
13785
|
-
return new NodeAuthError(NodeAuthErrorMessage.noLoopbackServerExists.code, "".concat(NodeAuthErrorMessage.noLoopbackServerExists.desc));
|
|
13786
|
-
}
|
|
13787
|
-
},
|
|
13788
|
-
{
|
|
13789
|
-
key: "createLoopbackServerAlreadyExistsError",
|
|
13790
|
-
value: /**
|
|
13791
|
-
* Creates an error thrown if a loopback server already exists when attempting to create another one.
|
|
13792
|
-
*/ function createLoopbackServerAlreadyExistsError() {
|
|
13793
|
-
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerAlreadyExists.code, "".concat(NodeAuthErrorMessage.loopbackServerAlreadyExists.desc));
|
|
13794
|
-
}
|
|
13795
|
-
},
|
|
13796
|
-
{
|
|
13797
|
-
key: "createLoopbackServerTimeoutError",
|
|
13798
|
-
value: /**
|
|
13799
|
-
* Creates an error thrown if the loopback server times out registering the auth code listener.
|
|
13800
|
-
*/ function createLoopbackServerTimeoutError() {
|
|
13801
|
-
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerTimeout.code, "".concat(NodeAuthErrorMessage.loopbackServerTimeout.desc));
|
|
13802
|
-
}
|
|
13803
|
-
},
|
|
13804
|
-
{
|
|
13805
|
-
key: "createStateNotFoundError",
|
|
13806
|
-
value: /**
|
|
13807
|
-
* Creates an error thrown when the state is not present.
|
|
13808
|
-
*/ function createStateNotFoundError() {
|
|
13809
|
-
return new NodeAuthError(NodeAuthErrorMessage.stateNotFoundError.code, NodeAuthErrorMessage.stateNotFoundError.desc);
|
|
13810
|
-
}
|
|
13811
|
-
},
|
|
13812
|
-
{
|
|
13813
|
-
key: "createThumbprintMissingError",
|
|
13814
|
-
value: /**
|
|
13815
|
-
* Creates an error thrown when client certificate was provided, but neither the SHA-1 or SHA-256 thumbprints were provided
|
|
13816
|
-
*/ function createThumbprintMissingError() {
|
|
13817
|
-
return new NodeAuthError(NodeAuthErrorMessage.thumbprintMissing.code, NodeAuthErrorMessage.thumbprintMissing.desc);
|
|
13818
|
-
}
|
|
13819
|
-
}
|
|
13820
|
-
]);
|
|
13821
|
-
return NodeAuthError;
|
|
13822
|
-
}(AuthError);
|
|
13823
|
-
|
|
13824
|
-
function _define_property$5(obj, key, value) {
|
|
13825
|
-
if (key in obj) {
|
|
13826
|
-
Object.defineProperty(obj, key, {
|
|
13827
|
-
value: value,
|
|
13828
|
-
enumerable: true,
|
|
13829
|
-
configurable: true,
|
|
13830
|
-
writable: true
|
|
13831
|
-
});
|
|
13832
|
-
} else {
|
|
13833
|
-
obj[key] = value;
|
|
13834
|
-
}
|
|
13835
|
-
return obj;
|
|
13836
|
-
}
|
|
13837
|
-
function _object_spread$4(target) {
|
|
13838
|
-
for(var i = 1; i < arguments.length; i++){
|
|
13839
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
13840
|
-
var ownKeys = Object.keys(source);
|
|
13841
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
13842
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
13843
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
13844
|
-
}));
|
|
13845
|
-
}
|
|
13846
|
-
ownKeys.forEach(function(key) {
|
|
13847
|
-
_define_property$5(target, key, source[key]);
|
|
13848
|
-
});
|
|
13849
|
-
}
|
|
13850
|
-
return target;
|
|
13851
|
-
}
|
|
13852
|
-
function ownKeys$3(object, enumerableOnly) {
|
|
13853
|
-
var keys = Object.keys(object);
|
|
13854
|
-
if (Object.getOwnPropertySymbols) {
|
|
13855
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
13856
|
-
if (enumerableOnly) {
|
|
13857
|
-
symbols = symbols.filter(function(sym) {
|
|
13858
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
13859
|
-
});
|
|
13860
|
-
}
|
|
13861
|
-
keys.push.apply(keys, symbols);
|
|
13862
|
-
}
|
|
13863
|
-
return keys;
|
|
13864
|
-
}
|
|
13865
|
-
function _object_spread_props$3(target, source) {
|
|
13866
|
-
source = source != null ? source : {};
|
|
13867
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
13868
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
13869
|
-
} else {
|
|
13870
|
-
ownKeys$3(Object(source)).forEach(function(key) {
|
|
13871
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
13872
|
-
});
|
|
13873
|
-
}
|
|
13874
|
-
return target;
|
|
13875
|
-
}
|
|
13876
|
-
/*
|
|
13877
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13878
|
-
* Licensed under the MIT License.
|
|
13879
|
-
*/ var DEFAULT_AUTH_OPTIONS = {
|
|
13880
|
-
clientId: Constants$1.EMPTY_STRING,
|
|
13881
|
-
authority: Constants$1.DEFAULT_AUTHORITY,
|
|
13882
|
-
clientSecret: Constants$1.EMPTY_STRING,
|
|
13883
|
-
clientAssertion: Constants$1.EMPTY_STRING,
|
|
13884
|
-
clientCertificate: {
|
|
13885
|
-
thumbprint: Constants$1.EMPTY_STRING,
|
|
13886
|
-
thumbprintSha256: Constants$1.EMPTY_STRING,
|
|
13887
|
-
privateKey: Constants$1.EMPTY_STRING,
|
|
13888
|
-
x5c: Constants$1.EMPTY_STRING
|
|
13666
|
+
*/ var DEFAULT_AUTH_OPTIONS = {
|
|
13667
|
+
clientId: Constants$1.EMPTY_STRING,
|
|
13668
|
+
authority: Constants$1.DEFAULT_AUTHORITY,
|
|
13669
|
+
clientSecret: Constants$1.EMPTY_STRING,
|
|
13670
|
+
clientAssertion: Constants$1.EMPTY_STRING,
|
|
13671
|
+
clientCertificate: {
|
|
13672
|
+
thumbprint: Constants$1.EMPTY_STRING,
|
|
13673
|
+
privateKey: Constants$1.EMPTY_STRING,
|
|
13674
|
+
x5c: Constants$1.EMPTY_STRING
|
|
13889
13675
|
},
|
|
13890
13676
|
knownAuthorities: [],
|
|
13891
13677
|
cloudDiscoveryMetadata: Constants$1.EMPTY_STRING,
|
|
@@ -13938,10 +13724,6 @@ var DEFAULT_TELEMETRY_OPTIONS = {
|
|
|
13938
13724
|
loggerOptions: (system === null || system === void 0 ? void 0 : system.loggerOptions) || DEFAULT_LOGGER_OPTIONS,
|
|
13939
13725
|
disableInternalRetries: (system === null || system === void 0 ? void 0 : system.disableInternalRetries) || false
|
|
13940
13726
|
});
|
|
13941
|
-
// if client certificate was provided, ensure that at least one of the SHA-1 or SHA-256 thumbprints were provided
|
|
13942
|
-
if (!!auth.clientCertificate && !!!auth.clientCertificate.thumbprint && !!!auth.clientCertificate.thumbprintSha256) {
|
|
13943
|
-
throw NodeAuthError.createStateNotFoundError();
|
|
13944
|
-
}
|
|
13945
13727
|
return {
|
|
13946
13728
|
auth: _object_spread$4({}, DEFAULT_AUTH_OPTIONS, auth),
|
|
13947
13729
|
broker: _object_spread$4({}, broker),
|
|
@@ -14012,12 +13794,12 @@ function v4(options, buf, offset) {
|
|
|
14012
13794
|
return stringify(rnds);
|
|
14013
13795
|
}
|
|
14014
13796
|
|
|
14015
|
-
function _class_call_check$
|
|
13797
|
+
function _class_call_check$i(instance, Constructor) {
|
|
14016
13798
|
if (!(instance instanceof Constructor)) {
|
|
14017
13799
|
throw new TypeError("Cannot call a class as a function");
|
|
14018
13800
|
}
|
|
14019
13801
|
}
|
|
14020
|
-
function _defineProperties$
|
|
13802
|
+
function _defineProperties$i(target, props) {
|
|
14021
13803
|
for(var i = 0; i < props.length; i++){
|
|
14022
13804
|
var descriptor = props[i];
|
|
14023
13805
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -14026,9 +13808,9 @@ function _defineProperties$h(target, props) {
|
|
|
14026
13808
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14027
13809
|
}
|
|
14028
13810
|
}
|
|
14029
|
-
function _create_class$
|
|
14030
|
-
if (protoProps) _defineProperties$
|
|
14031
|
-
if (staticProps) _defineProperties$
|
|
13811
|
+
function _create_class$i(Constructor, protoProps, staticProps) {
|
|
13812
|
+
if (protoProps) _defineProperties$i(Constructor.prototype, protoProps);
|
|
13813
|
+
if (staticProps) _defineProperties$i(Constructor, staticProps);
|
|
14032
13814
|
return Constructor;
|
|
14033
13815
|
}
|
|
14034
13816
|
/*
|
|
@@ -14036,9 +13818,9 @@ function _create_class$h(Constructor, protoProps, staticProps) {
|
|
|
14036
13818
|
* Licensed under the MIT License.
|
|
14037
13819
|
*/ var GuidGenerator = /*#__PURE__*/ function() {
|
|
14038
13820
|
function GuidGenerator() {
|
|
14039
|
-
_class_call_check$
|
|
13821
|
+
_class_call_check$i(this, GuidGenerator);
|
|
14040
13822
|
}
|
|
14041
|
-
_create_class$
|
|
13823
|
+
_create_class$i(GuidGenerator, [
|
|
14042
13824
|
{
|
|
14043
13825
|
/**
|
|
14044
13826
|
*
|
|
@@ -14063,12 +13845,12 @@ function _create_class$h(Constructor, protoProps, staticProps) {
|
|
|
14063
13845
|
return GuidGenerator;
|
|
14064
13846
|
}();
|
|
14065
13847
|
|
|
14066
|
-
function _class_call_check$
|
|
13848
|
+
function _class_call_check$h(instance, Constructor) {
|
|
14067
13849
|
if (!(instance instanceof Constructor)) {
|
|
14068
13850
|
throw new TypeError("Cannot call a class as a function");
|
|
14069
13851
|
}
|
|
14070
13852
|
}
|
|
14071
|
-
function _defineProperties$
|
|
13853
|
+
function _defineProperties$h(target, props) {
|
|
14072
13854
|
for(var i = 0; i < props.length; i++){
|
|
14073
13855
|
var descriptor = props[i];
|
|
14074
13856
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -14077,9 +13859,9 @@ function _defineProperties$g(target, props) {
|
|
|
14077
13859
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14078
13860
|
}
|
|
14079
13861
|
}
|
|
14080
|
-
function _create_class$
|
|
14081
|
-
if (protoProps) _defineProperties$
|
|
14082
|
-
if (staticProps) _defineProperties$
|
|
13862
|
+
function _create_class$h(Constructor, protoProps, staticProps) {
|
|
13863
|
+
if (protoProps) _defineProperties$h(Constructor.prototype, protoProps);
|
|
13864
|
+
if (staticProps) _defineProperties$h(Constructor, staticProps);
|
|
14083
13865
|
return Constructor;
|
|
14084
13866
|
}
|
|
14085
13867
|
/*
|
|
@@ -14087,9 +13869,9 @@ function _create_class$g(Constructor, protoProps, staticProps) {
|
|
|
14087
13869
|
* Licensed under the MIT License.
|
|
14088
13870
|
*/ var EncodingUtils = /*#__PURE__*/ function() {
|
|
14089
13871
|
function EncodingUtils() {
|
|
14090
|
-
_class_call_check$
|
|
13872
|
+
_class_call_check$h(this, EncodingUtils);
|
|
14091
13873
|
}
|
|
14092
|
-
_create_class$
|
|
13874
|
+
_create_class$h(EncodingUtils, null, [
|
|
14093
13875
|
{
|
|
14094
13876
|
key: "base64Encode",
|
|
14095
13877
|
value: /**
|
|
@@ -14137,12 +13919,12 @@ function _create_class$g(Constructor, protoProps, staticProps) {
|
|
|
14137
13919
|
return EncodingUtils;
|
|
14138
13920
|
}();
|
|
14139
13921
|
|
|
14140
|
-
function _class_call_check$
|
|
13922
|
+
function _class_call_check$g(instance, Constructor) {
|
|
14141
13923
|
if (!(instance instanceof Constructor)) {
|
|
14142
13924
|
throw new TypeError("Cannot call a class as a function");
|
|
14143
13925
|
}
|
|
14144
13926
|
}
|
|
14145
|
-
function _defineProperties$
|
|
13927
|
+
function _defineProperties$g(target, props) {
|
|
14146
13928
|
for(var i = 0; i < props.length; i++){
|
|
14147
13929
|
var descriptor = props[i];
|
|
14148
13930
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -14151,9 +13933,9 @@ function _defineProperties$f(target, props) {
|
|
|
14151
13933
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14152
13934
|
}
|
|
14153
13935
|
}
|
|
14154
|
-
function _create_class$
|
|
14155
|
-
if (protoProps) _defineProperties$
|
|
14156
|
-
if (staticProps) _defineProperties$
|
|
13936
|
+
function _create_class$g(Constructor, protoProps, staticProps) {
|
|
13937
|
+
if (protoProps) _defineProperties$g(Constructor.prototype, protoProps);
|
|
13938
|
+
if (staticProps) _defineProperties$g(Constructor, staticProps);
|
|
14157
13939
|
return Constructor;
|
|
14158
13940
|
}
|
|
14159
13941
|
/*
|
|
@@ -14161,9 +13943,9 @@ function _create_class$f(Constructor, protoProps, staticProps) {
|
|
|
14161
13943
|
* Licensed under the MIT License.
|
|
14162
13944
|
*/ var HashUtils = /*#__PURE__*/ function() {
|
|
14163
13945
|
function HashUtils() {
|
|
14164
|
-
_class_call_check$
|
|
13946
|
+
_class_call_check$g(this, HashUtils);
|
|
14165
13947
|
}
|
|
14166
|
-
_create_class$
|
|
13948
|
+
_create_class$g(HashUtils, [
|
|
14167
13949
|
{
|
|
14168
13950
|
/**
|
|
14169
13951
|
* generate 'SHA256' hash
|
|
@@ -14206,12 +13988,12 @@ function _async_to_generator$9(fn) {
|
|
|
14206
13988
|
});
|
|
14207
13989
|
};
|
|
14208
13990
|
}
|
|
14209
|
-
function _class_call_check$
|
|
13991
|
+
function _class_call_check$f(instance, Constructor) {
|
|
14210
13992
|
if (!(instance instanceof Constructor)) {
|
|
14211
13993
|
throw new TypeError("Cannot call a class as a function");
|
|
14212
13994
|
}
|
|
14213
13995
|
}
|
|
14214
|
-
function _defineProperties$
|
|
13996
|
+
function _defineProperties$f(target, props) {
|
|
14215
13997
|
for(var i = 0; i < props.length; i++){
|
|
14216
13998
|
var descriptor = props[i];
|
|
14217
13999
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -14220,12 +14002,12 @@ function _defineProperties$e(target, props) {
|
|
|
14220
14002
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14221
14003
|
}
|
|
14222
14004
|
}
|
|
14223
|
-
function _create_class$
|
|
14224
|
-
if (protoProps) _defineProperties$
|
|
14225
|
-
if (staticProps) _defineProperties$
|
|
14005
|
+
function _create_class$f(Constructor, protoProps, staticProps) {
|
|
14006
|
+
if (protoProps) _defineProperties$f(Constructor.prototype, protoProps);
|
|
14007
|
+
if (staticProps) _defineProperties$f(Constructor, staticProps);
|
|
14226
14008
|
return Constructor;
|
|
14227
14009
|
}
|
|
14228
|
-
function _ts_generator$
|
|
14010
|
+
function _ts_generator$a(thisArg, body) {
|
|
14229
14011
|
var f, y, t, g, _ = {
|
|
14230
14012
|
label: 0,
|
|
14231
14013
|
sent: function() {
|
|
@@ -14327,10 +14109,10 @@ function _ts_generator$9(thisArg, body) {
|
|
|
14327
14109
|
* https://tools.ietf.org/html/rfc7636#page-8
|
|
14328
14110
|
*/ var PkceGenerator = /*#__PURE__*/ function() {
|
|
14329
14111
|
function PkceGenerator() {
|
|
14330
|
-
_class_call_check$
|
|
14112
|
+
_class_call_check$f(this, PkceGenerator);
|
|
14331
14113
|
this.hashUtils = new HashUtils();
|
|
14332
14114
|
}
|
|
14333
|
-
_create_class$
|
|
14115
|
+
_create_class$f(PkceGenerator, [
|
|
14334
14116
|
{
|
|
14335
14117
|
key: "generatePkceCodes",
|
|
14336
14118
|
value: /**
|
|
@@ -14340,7 +14122,7 @@ function _ts_generator$9(thisArg, body) {
|
|
|
14340
14122
|
var _this = this;
|
|
14341
14123
|
return _async_to_generator$9(function() {
|
|
14342
14124
|
var verifier, challenge;
|
|
14343
|
-
return _ts_generator$
|
|
14125
|
+
return _ts_generator$a(this, function(_state) {
|
|
14344
14126
|
verifier = _this.generateCodeVerifier();
|
|
14345
14127
|
challenge = _this.generateCodeChallengeFromVerifier(verifier);
|
|
14346
14128
|
return [
|
|
@@ -14415,12 +14197,12 @@ function _async_to_generator$8(fn) {
|
|
|
14415
14197
|
});
|
|
14416
14198
|
};
|
|
14417
14199
|
}
|
|
14418
|
-
function _class_call_check$
|
|
14200
|
+
function _class_call_check$e(instance, Constructor) {
|
|
14419
14201
|
if (!(instance instanceof Constructor)) {
|
|
14420
14202
|
throw new TypeError("Cannot call a class as a function");
|
|
14421
14203
|
}
|
|
14422
14204
|
}
|
|
14423
|
-
function _defineProperties$
|
|
14205
|
+
function _defineProperties$e(target, props) {
|
|
14424
14206
|
for(var i = 0; i < props.length; i++){
|
|
14425
14207
|
var descriptor = props[i];
|
|
14426
14208
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -14429,12 +14211,12 @@ function _defineProperties$d(target, props) {
|
|
|
14429
14211
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14430
14212
|
}
|
|
14431
14213
|
}
|
|
14432
|
-
function _create_class$
|
|
14433
|
-
if (protoProps) _defineProperties$
|
|
14434
|
-
if (staticProps) _defineProperties$
|
|
14214
|
+
function _create_class$e(Constructor, protoProps, staticProps) {
|
|
14215
|
+
if (protoProps) _defineProperties$e(Constructor.prototype, protoProps);
|
|
14216
|
+
if (staticProps) _defineProperties$e(Constructor, staticProps);
|
|
14435
14217
|
return Constructor;
|
|
14436
14218
|
}
|
|
14437
|
-
function _ts_generator$
|
|
14219
|
+
function _ts_generator$9(thisArg, body) {
|
|
14438
14220
|
var f, y, t, g, _ = {
|
|
14439
14221
|
label: 0,
|
|
14440
14222
|
sent: function() {
|
|
@@ -14538,13 +14320,13 @@ function _ts_generator$8(thisArg, body) {
|
|
|
14538
14320
|
* @public
|
|
14539
14321
|
*/ var CryptoProvider = /*#__PURE__*/ function() {
|
|
14540
14322
|
function CryptoProvider() {
|
|
14541
|
-
_class_call_check$
|
|
14323
|
+
_class_call_check$e(this, CryptoProvider);
|
|
14542
14324
|
// Browser crypto needs to be validated first before any other classes can be set.
|
|
14543
14325
|
this.pkceGenerator = new PkceGenerator();
|
|
14544
14326
|
this.guidGenerator = new GuidGenerator();
|
|
14545
14327
|
this.hashUtils = new HashUtils();
|
|
14546
14328
|
}
|
|
14547
|
-
_create_class$
|
|
14329
|
+
_create_class$e(CryptoProvider, [
|
|
14548
14330
|
{
|
|
14549
14331
|
/**
|
|
14550
14332
|
* base64 URL safe encoded string
|
|
@@ -14638,7 +14420,7 @@ function _ts_generator$8(thisArg, body) {
|
|
|
14638
14420
|
*/ function hashString(plainText) {
|
|
14639
14421
|
var _this = this;
|
|
14640
14422
|
return _async_to_generator$8(function() {
|
|
14641
|
-
return _ts_generator$
|
|
14423
|
+
return _ts_generator$9(this, function(_state) {
|
|
14642
14424
|
return [
|
|
14643
14425
|
2,
|
|
14644
14426
|
EncodingUtils.base64EncodeUrl(_this.hashUtils.sha256(plainText).toString("base64"), "base64")
|
|
@@ -14659,7 +14441,7 @@ function _array_like_to_array$5(arr, len) {
|
|
|
14659
14441
|
function _array_without_holes$3(arr) {
|
|
14660
14442
|
if (Array.isArray(arr)) return _array_like_to_array$5(arr);
|
|
14661
14443
|
}
|
|
14662
|
-
function _assert_this_initialized$
|
|
14444
|
+
function _assert_this_initialized$5(self) {
|
|
14663
14445
|
if (self === void 0) {
|
|
14664
14446
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
14665
14447
|
}
|
|
@@ -14694,12 +14476,12 @@ function _async_to_generator$7(fn) {
|
|
|
14694
14476
|
});
|
|
14695
14477
|
};
|
|
14696
14478
|
}
|
|
14697
|
-
function _class_call_check$
|
|
14479
|
+
function _class_call_check$d(instance, Constructor) {
|
|
14698
14480
|
if (!(instance instanceof Constructor)) {
|
|
14699
14481
|
throw new TypeError("Cannot call a class as a function");
|
|
14700
14482
|
}
|
|
14701
14483
|
}
|
|
14702
|
-
function _defineProperties$
|
|
14484
|
+
function _defineProperties$d(target, props) {
|
|
14703
14485
|
for(var i = 0; i < props.length; i++){
|
|
14704
14486
|
var descriptor = props[i];
|
|
14705
14487
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -14708,9 +14490,9 @@ function _defineProperties$c(target, props) {
|
|
|
14708
14490
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14709
14491
|
}
|
|
14710
14492
|
}
|
|
14711
|
-
function _create_class$
|
|
14712
|
-
if (protoProps) _defineProperties$
|
|
14713
|
-
if (staticProps) _defineProperties$
|
|
14493
|
+
function _create_class$d(Constructor, protoProps, staticProps) {
|
|
14494
|
+
if (protoProps) _defineProperties$d(Constructor.prototype, protoProps);
|
|
14495
|
+
if (staticProps) _defineProperties$d(Constructor, staticProps);
|
|
14714
14496
|
return Constructor;
|
|
14715
14497
|
}
|
|
14716
14498
|
function _define_property$4(obj, key, value) {
|
|
@@ -14726,13 +14508,13 @@ function _define_property$4(obj, key, value) {
|
|
|
14726
14508
|
}
|
|
14727
14509
|
return obj;
|
|
14728
14510
|
}
|
|
14729
|
-
function _get_prototype_of$
|
|
14730
|
-
_get_prototype_of$
|
|
14511
|
+
function _get_prototype_of$5(o) {
|
|
14512
|
+
_get_prototype_of$5 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
14731
14513
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
14732
14514
|
};
|
|
14733
|
-
return _get_prototype_of$
|
|
14515
|
+
return _get_prototype_of$5(o);
|
|
14734
14516
|
}
|
|
14735
|
-
function _inherits$
|
|
14517
|
+
function _inherits$5(subClass, superClass) {
|
|
14736
14518
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
14737
14519
|
throw new TypeError("Super expression must either be null or a function");
|
|
14738
14520
|
}
|
|
@@ -14743,9 +14525,9 @@ function _inherits$4(subClass, superClass) {
|
|
|
14743
14525
|
configurable: true
|
|
14744
14526
|
}
|
|
14745
14527
|
});
|
|
14746
|
-
if (superClass) _set_prototype_of$
|
|
14528
|
+
if (superClass) _set_prototype_of$5(subClass, superClass);
|
|
14747
14529
|
}
|
|
14748
|
-
function _instanceof$
|
|
14530
|
+
function _instanceof$d(left, right) {
|
|
14749
14531
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
14750
14532
|
return !!right[Symbol.hasInstance](left);
|
|
14751
14533
|
} else {
|
|
@@ -14773,23 +14555,23 @@ function _object_spread$3(target) {
|
|
|
14773
14555
|
}
|
|
14774
14556
|
return target;
|
|
14775
14557
|
}
|
|
14776
|
-
function _possible_constructor_return$
|
|
14777
|
-
if (call && (_type_of$
|
|
14558
|
+
function _possible_constructor_return$5(self, call) {
|
|
14559
|
+
if (call && (_type_of$d(call) === "object" || typeof call === "function")) {
|
|
14778
14560
|
return call;
|
|
14779
14561
|
}
|
|
14780
|
-
return _assert_this_initialized$
|
|
14562
|
+
return _assert_this_initialized$5(self);
|
|
14781
14563
|
}
|
|
14782
|
-
function _set_prototype_of$
|
|
14783
|
-
_set_prototype_of$
|
|
14564
|
+
function _set_prototype_of$5(o, p) {
|
|
14565
|
+
_set_prototype_of$5 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
14784
14566
|
o.__proto__ = p;
|
|
14785
14567
|
return o;
|
|
14786
14568
|
};
|
|
14787
|
-
return _set_prototype_of$
|
|
14569
|
+
return _set_prototype_of$5(o, p);
|
|
14788
14570
|
}
|
|
14789
14571
|
function _to_consumable_array$3(arr) {
|
|
14790
14572
|
return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$3();
|
|
14791
14573
|
}
|
|
14792
|
-
function _type_of$
|
|
14574
|
+
function _type_of$d(obj) {
|
|
14793
14575
|
"@swc/helpers - typeof";
|
|
14794
14576
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
14795
14577
|
}
|
|
@@ -14801,7 +14583,7 @@ function _unsupported_iterable_to_array$5(o, minLen) {
|
|
|
14801
14583
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
14802
14584
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
|
|
14803
14585
|
}
|
|
14804
|
-
function _is_native_reflect_construct$
|
|
14586
|
+
function _is_native_reflect_construct$5() {
|
|
14805
14587
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
14806
14588
|
if (Reflect.construct.sham) return false;
|
|
14807
14589
|
if (typeof Proxy === "function") return true;
|
|
@@ -14812,20 +14594,20 @@ function _is_native_reflect_construct$4() {
|
|
|
14812
14594
|
return false;
|
|
14813
14595
|
}
|
|
14814
14596
|
}
|
|
14815
|
-
function _create_super$
|
|
14816
|
-
var hasNativeReflectConstruct = _is_native_reflect_construct$
|
|
14817
|
-
return function _createSuperInternal() {
|
|
14818
|
-
var Super = _get_prototype_of$
|
|
14597
|
+
function _create_super$5(Derived) {
|
|
14598
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct$5();
|
|
14599
|
+
return function _createSuperInternal() {
|
|
14600
|
+
var Super = _get_prototype_of$5(Derived), result;
|
|
14819
14601
|
if (hasNativeReflectConstruct) {
|
|
14820
|
-
var NewTarget = _get_prototype_of$
|
|
14602
|
+
var NewTarget = _get_prototype_of$5(this).constructor;
|
|
14821
14603
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
14822
14604
|
} else {
|
|
14823
14605
|
result = Super.apply(this, arguments);
|
|
14824
14606
|
}
|
|
14825
|
-
return _possible_constructor_return$
|
|
14607
|
+
return _possible_constructor_return$5(this, result);
|
|
14826
14608
|
};
|
|
14827
14609
|
}
|
|
14828
|
-
function _ts_generator$
|
|
14610
|
+
function _ts_generator$8(thisArg, body) {
|
|
14829
14611
|
var f, y, t, g, _ = {
|
|
14830
14612
|
label: 0,
|
|
14831
14613
|
sent: function() {
|
|
@@ -14927,10 +14709,10 @@ function _ts_generator$7(thisArg, body) {
|
|
|
14927
14709
|
* This class implements Storage for node, reading cache from user specified storage location or an extension library
|
|
14928
14710
|
* @public
|
|
14929
14711
|
*/ var NodeStorage = /*#__PURE__*/ function(CacheManager) {
|
|
14930
|
-
_inherits$
|
|
14931
|
-
var _super = _create_super$
|
|
14712
|
+
_inherits$5(NodeStorage, CacheManager);
|
|
14713
|
+
var _super = _create_super$5(NodeStorage);
|
|
14932
14714
|
function NodeStorage(logger, clientId, cryptoImpl, staticAuthorityOptions) {
|
|
14933
|
-
_class_call_check$
|
|
14715
|
+
_class_call_check$d(this, NodeStorage);
|
|
14934
14716
|
var _this;
|
|
14935
14717
|
_this = _super.call(this, clientId, cryptoImpl, logger, staticAuthorityOptions);
|
|
14936
14718
|
_this.cache = {};
|
|
@@ -14938,7 +14720,7 @@ function _ts_generator$7(thisArg, body) {
|
|
|
14938
14720
|
_this.logger = logger;
|
|
14939
14721
|
return _this;
|
|
14940
14722
|
}
|
|
14941
|
-
_create_class$
|
|
14723
|
+
_create_class$d(NodeStorage, [
|
|
14942
14724
|
{
|
|
14943
14725
|
/**
|
|
14944
14726
|
* Queue up callbacks
|
|
@@ -14976,7 +14758,7 @@ function _ts_generator$7(thisArg, body) {
|
|
|
14976
14758
|
if (typeof value !== "object") {
|
|
14977
14759
|
continue;
|
|
14978
14760
|
}
|
|
14979
|
-
if (_instanceof$
|
|
14761
|
+
if (_instanceof$d(value, AccountEntity)) {
|
|
14980
14762
|
inMemoryCache.accounts[key] = value;
|
|
14981
14763
|
} else if (isIdTokenEntity(value)) {
|
|
14982
14764
|
inMemoryCache.idTokens[key] = value;
|
|
@@ -15364,7 +15146,7 @@ function _ts_generator$7(thisArg, body) {
|
|
|
15364
15146
|
var _this = this;
|
|
15365
15147
|
return _async_to_generator$7(function() {
|
|
15366
15148
|
var cacheKeys;
|
|
15367
|
-
return _ts_generator$
|
|
15149
|
+
return _ts_generator$8(this, function(_state) {
|
|
15368
15150
|
_this.logger.trace("Clearing cache entries created by MSAL");
|
|
15369
15151
|
// read inMemoryCache
|
|
15370
15152
|
cacheKeys = _this.getKeys();
|
|
@@ -15452,12 +15234,12 @@ function _async_to_generator$6(fn) {
|
|
|
15452
15234
|
});
|
|
15453
15235
|
};
|
|
15454
15236
|
}
|
|
15455
|
-
function _class_call_check$
|
|
15237
|
+
function _class_call_check$c(instance, Constructor) {
|
|
15456
15238
|
if (!(instance instanceof Constructor)) {
|
|
15457
15239
|
throw new TypeError("Cannot call a class as a function");
|
|
15458
15240
|
}
|
|
15459
15241
|
}
|
|
15460
|
-
function _defineProperties$
|
|
15242
|
+
function _defineProperties$c(target, props) {
|
|
15461
15243
|
for(var i = 0; i < props.length; i++){
|
|
15462
15244
|
var descriptor = props[i];
|
|
15463
15245
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -15466,9 +15248,9 @@ function _defineProperties$b(target, props) {
|
|
|
15466
15248
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
15467
15249
|
}
|
|
15468
15250
|
}
|
|
15469
|
-
function _create_class$
|
|
15470
|
-
if (protoProps) _defineProperties$
|
|
15471
|
-
if (staticProps) _defineProperties$
|
|
15251
|
+
function _create_class$c(Constructor, protoProps, staticProps) {
|
|
15252
|
+
if (protoProps) _defineProperties$c(Constructor.prototype, protoProps);
|
|
15253
|
+
if (staticProps) _defineProperties$c(Constructor, staticProps);
|
|
15472
15254
|
return Constructor;
|
|
15473
15255
|
}
|
|
15474
15256
|
function _define_property$3(obj, key, value) {
|
|
@@ -15523,7 +15305,7 @@ function _object_spread_props$2(target, source) {
|
|
|
15523
15305
|
}
|
|
15524
15306
|
return target;
|
|
15525
15307
|
}
|
|
15526
|
-
function _ts_generator$
|
|
15308
|
+
function _ts_generator$7(thisArg, body) {
|
|
15527
15309
|
var f, y, t, g, _ = {
|
|
15528
15310
|
label: 0,
|
|
15529
15311
|
sent: function() {
|
|
@@ -15633,7 +15415,7 @@ function _ts_generator$6(thisArg, body) {
|
|
|
15633
15415
|
* @public
|
|
15634
15416
|
*/ var TokenCache = /*#__PURE__*/ function() {
|
|
15635
15417
|
function TokenCache(storage, logger, cachePlugin) {
|
|
15636
|
-
_class_call_check$
|
|
15418
|
+
_class_call_check$c(this, TokenCache);
|
|
15637
15419
|
this.cacheHasChanged = false;
|
|
15638
15420
|
this.storage = storage;
|
|
15639
15421
|
this.storage.registerChangeEmitter(this.handleChangeEvent.bind(this));
|
|
@@ -15642,7 +15424,7 @@ function _ts_generator$6(thisArg, body) {
|
|
|
15642
15424
|
}
|
|
15643
15425
|
this.logger = logger;
|
|
15644
15426
|
}
|
|
15645
|
-
_create_class$
|
|
15427
|
+
_create_class$c(TokenCache, [
|
|
15646
15428
|
{
|
|
15647
15429
|
/**
|
|
15648
15430
|
* Set to true if cache state has changed since last time serialize or writeToPersistence was called
|
|
@@ -15702,7 +15484,7 @@ function _ts_generator$6(thisArg, body) {
|
|
|
15702
15484
|
var _this = this;
|
|
15703
15485
|
return _async_to_generator$6(function() {
|
|
15704
15486
|
var cacheContext;
|
|
15705
|
-
return _ts_generator$
|
|
15487
|
+
return _ts_generator$7(this, function(_state) {
|
|
15706
15488
|
switch(_state.label){
|
|
15707
15489
|
case 0:
|
|
15708
15490
|
_this.logger.trace("getAllAccounts called");
|
|
@@ -15767,7 +15549,7 @@ function _ts_generator$6(thisArg, body) {
|
|
|
15767
15549
|
var _this = this;
|
|
15768
15550
|
return _async_to_generator$6(function() {
|
|
15769
15551
|
var allAccounts;
|
|
15770
|
-
return _ts_generator$
|
|
15552
|
+
return _ts_generator$7(this, function(_state) {
|
|
15771
15553
|
switch(_state.label){
|
|
15772
15554
|
case 0:
|
|
15773
15555
|
return [
|
|
@@ -15805,7 +15587,7 @@ function _ts_generator$6(thisArg, body) {
|
|
|
15805
15587
|
var _this = this;
|
|
15806
15588
|
return _async_to_generator$6(function() {
|
|
15807
15589
|
var allAccounts;
|
|
15808
|
-
return _ts_generator$
|
|
15590
|
+
return _ts_generator$7(this, function(_state) {
|
|
15809
15591
|
switch(_state.label){
|
|
15810
15592
|
case 0:
|
|
15811
15593
|
return [
|
|
@@ -15841,7 +15623,7 @@ function _ts_generator$6(thisArg, body) {
|
|
|
15841
15623
|
var _this = this;
|
|
15842
15624
|
return _async_to_generator$6(function() {
|
|
15843
15625
|
var cacheContext;
|
|
15844
|
-
return _ts_generator$
|
|
15626
|
+
return _ts_generator$7(this, function(_state) {
|
|
15845
15627
|
switch(_state.label){
|
|
15846
15628
|
case 0:
|
|
15847
15629
|
_this.logger.trace("removeAccount called");
|
|
@@ -16079,7 +15861,7 @@ SafeBuffer.allocUnsafeSlow = function(size) {
|
|
|
16079
15861
|
|
|
16080
15862
|
/*global module, process*/
|
|
16081
15863
|
|
|
16082
|
-
function _type_of$
|
|
15864
|
+
function _type_of$c(obj) {
|
|
16083
15865
|
"@swc/helpers - typeof";
|
|
16084
15866
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
16085
15867
|
}
|
|
@@ -16113,7 +15895,7 @@ function DataStream$2(data) {
|
|
|
16113
15895
|
}).bind(this));
|
|
16114
15896
|
return this;
|
|
16115
15897
|
}
|
|
16116
|
-
throw new TypeError("Unexpected data type (" + (typeof data === "undefined" ? "undefined" : _type_of$
|
|
15898
|
+
throw new TypeError("Unexpected data type (" + (typeof data === "undefined" ? "undefined" : _type_of$c(data)) + ")");
|
|
16117
15899
|
}
|
|
16118
15900
|
util$3.inherits(DataStream$2, Stream$2);
|
|
16119
15901
|
DataStream$2.prototype.write = function write(data) {
|
|
@@ -16798,7 +16580,7 @@ var TokenExpiredError_1 = TokenExpiredError$1;
|
|
|
16798
16580
|
* Helpers.
|
|
16799
16581
|
*/
|
|
16800
16582
|
|
|
16801
|
-
function _type_of$
|
|
16583
|
+
function _type_of$b(obj) {
|
|
16802
16584
|
"@swc/helpers - typeof";
|
|
16803
16585
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
16804
16586
|
}
|
|
@@ -16822,7 +16604,7 @@ var y = d * 365.25;
|
|
|
16822
16604
|
* @api public
|
|
16823
16605
|
*/ var ms$1 = function(val, options) {
|
|
16824
16606
|
options = options || {};
|
|
16825
|
-
var type = typeof val === "undefined" ? "undefined" : _type_of$
|
|
16607
|
+
var type = typeof val === "undefined" ? "undefined" : _type_of$b(val);
|
|
16826
16608
|
if (type === "string" && val.length > 0) {
|
|
16827
16609
|
return parse$7(val);
|
|
16828
16610
|
} else if (type === "number" && isFinite(val)) {
|
|
@@ -17265,12 +17047,12 @@ var identifiers$1 = {
|
|
|
17265
17047
|
rcompareIdentifiers: rcompareIdentifiers
|
|
17266
17048
|
};
|
|
17267
17049
|
|
|
17268
|
-
function _class_call_check$
|
|
17050
|
+
function _class_call_check$b(instance, Constructor) {
|
|
17269
17051
|
if (!(instance instanceof Constructor)) {
|
|
17270
17052
|
throw new TypeError("Cannot call a class as a function");
|
|
17271
17053
|
}
|
|
17272
17054
|
}
|
|
17273
|
-
function _defineProperties$
|
|
17055
|
+
function _defineProperties$b(target, props) {
|
|
17274
17056
|
for(var i = 0; i < props.length; i++){
|
|
17275
17057
|
var descriptor = props[i];
|
|
17276
17058
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -17279,19 +17061,19 @@ function _defineProperties$a(target, props) {
|
|
|
17279
17061
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
17280
17062
|
}
|
|
17281
17063
|
}
|
|
17282
|
-
function _create_class$
|
|
17283
|
-
if (protoProps) _defineProperties$
|
|
17284
|
-
if (staticProps) _defineProperties$
|
|
17064
|
+
function _create_class$b(Constructor, protoProps, staticProps) {
|
|
17065
|
+
if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
|
|
17066
|
+
if (staticProps) _defineProperties$b(Constructor, staticProps);
|
|
17285
17067
|
return Constructor;
|
|
17286
17068
|
}
|
|
17287
|
-
function _instanceof$
|
|
17069
|
+
function _instanceof$c(left, right) {
|
|
17288
17070
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
17289
17071
|
return !!right[Symbol.hasInstance](left);
|
|
17290
17072
|
} else {
|
|
17291
17073
|
return left instanceof right;
|
|
17292
17074
|
}
|
|
17293
17075
|
}
|
|
17294
|
-
function _type_of$
|
|
17076
|
+
function _type_of$a(obj) {
|
|
17295
17077
|
"@swc/helpers - typeof";
|
|
17296
17078
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
17297
17079
|
}
|
|
@@ -17302,16 +17084,16 @@ var parseOptions$2 = parseOptions_1;
|
|
|
17302
17084
|
var compareIdentifiers = identifiers$1.compareIdentifiers;
|
|
17303
17085
|
var SemVer$f = /*#__PURE__*/ function() {
|
|
17304
17086
|
function SemVer(version, options) {
|
|
17305
|
-
_class_call_check$
|
|
17087
|
+
_class_call_check$b(this, SemVer);
|
|
17306
17088
|
options = parseOptions$2(options);
|
|
17307
|
-
if (_instanceof$
|
|
17089
|
+
if (_instanceof$c(version, SemVer)) {
|
|
17308
17090
|
if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
|
|
17309
17091
|
return version;
|
|
17310
17092
|
} else {
|
|
17311
17093
|
version = version.version;
|
|
17312
17094
|
}
|
|
17313
17095
|
} else if (typeof version !== "string") {
|
|
17314
|
-
throw new TypeError('Invalid version. Must be a string. Got type "'.concat(typeof version === "undefined" ? "undefined" : _type_of$
|
|
17096
|
+
throw new TypeError('Invalid version. Must be a string. Got type "'.concat(typeof version === "undefined" ? "undefined" : _type_of$a(version), '".'));
|
|
17315
17097
|
}
|
|
17316
17098
|
if (version.length > MAX_LENGTH) {
|
|
17317
17099
|
throw new TypeError("version is longer than ".concat(MAX_LENGTH, " characters"));
|
|
@@ -17357,7 +17139,7 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17357
17139
|
this.build = m[5] ? m[5].split(".") : [];
|
|
17358
17140
|
this.format();
|
|
17359
17141
|
}
|
|
17360
|
-
_create_class$
|
|
17142
|
+
_create_class$b(SemVer, [
|
|
17361
17143
|
{
|
|
17362
17144
|
key: "format",
|
|
17363
17145
|
value: function format() {
|
|
@@ -17378,7 +17160,7 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17378
17160
|
key: "compare",
|
|
17379
17161
|
value: function compare(other) {
|
|
17380
17162
|
debug$2("SemVer.compare", this.version, this.options, other);
|
|
17381
|
-
if (!_instanceof$
|
|
17163
|
+
if (!_instanceof$c(other, SemVer)) {
|
|
17382
17164
|
if (typeof other === "string" && other === this.version) {
|
|
17383
17165
|
return 0;
|
|
17384
17166
|
}
|
|
@@ -17393,7 +17175,7 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17393
17175
|
{
|
|
17394
17176
|
key: "compareMain",
|
|
17395
17177
|
value: function compareMain(other) {
|
|
17396
|
-
if (!_instanceof$
|
|
17178
|
+
if (!_instanceof$c(other, SemVer)) {
|
|
17397
17179
|
other = new SemVer(other, this.options);
|
|
17398
17180
|
}
|
|
17399
17181
|
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
@@ -17402,7 +17184,7 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17402
17184
|
{
|
|
17403
17185
|
key: "comparePre",
|
|
17404
17186
|
value: function comparePre(other) {
|
|
17405
|
-
if (!_instanceof$
|
|
17187
|
+
if (!_instanceof$c(other, SemVer)) {
|
|
17406
17188
|
other = new SemVer(other, this.options);
|
|
17407
17189
|
}
|
|
17408
17190
|
// NOT having a prerelease is > having one
|
|
@@ -17435,14 +17217,14 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17435
17217
|
{
|
|
17436
17218
|
key: "compareBuild",
|
|
17437
17219
|
value: function compareBuild(other) {
|
|
17438
|
-
if (!_instanceof$
|
|
17220
|
+
if (!_instanceof$c(other, SemVer)) {
|
|
17439
17221
|
other = new SemVer(other, this.options);
|
|
17440
17222
|
}
|
|
17441
17223
|
var i = 0;
|
|
17442
17224
|
do {
|
|
17443
17225
|
var a = this.build[i];
|
|
17444
17226
|
var b = other.build[i];
|
|
17445
|
-
debug$2("
|
|
17227
|
+
debug$2("prerelease compare", i, a, b);
|
|
17446
17228
|
if (a === undefined && b === undefined) {
|
|
17447
17229
|
return 0;
|
|
17448
17230
|
} else if (b === undefined) {
|
|
@@ -17590,7 +17372,7 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17590
17372
|
}();
|
|
17591
17373
|
var semver$4 = SemVer$f;
|
|
17592
17374
|
|
|
17593
|
-
function _instanceof$
|
|
17375
|
+
function _instanceof$b(left, right) {
|
|
17594
17376
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
17595
17377
|
return !!right[Symbol.hasInstance](left);
|
|
17596
17378
|
} else {
|
|
@@ -17600,7 +17382,7 @@ function _instanceof$a(left, right) {
|
|
|
17600
17382
|
var SemVer$e = semver$4;
|
|
17601
17383
|
var parse$6 = function(version, options) {
|
|
17602
17384
|
var throwErrors = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
17603
|
-
if (_instanceof$
|
|
17385
|
+
if (_instanceof$b(version, SemVer$e)) {
|
|
17604
17386
|
return version;
|
|
17605
17387
|
}
|
|
17606
17388
|
try {
|
|
@@ -17628,7 +17410,7 @@ var clean$1 = function(version, options) {
|
|
|
17628
17410
|
};
|
|
17629
17411
|
var clean_1 = clean$1;
|
|
17630
17412
|
|
|
17631
|
-
function _instanceof$
|
|
17413
|
+
function _instanceof$a(left, right) {
|
|
17632
17414
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
17633
17415
|
return !!right[Symbol.hasInstance](left);
|
|
17634
17416
|
} else {
|
|
@@ -17643,7 +17425,7 @@ var inc$1 = function(version, release, options, identifier, identifierBase) {
|
|
|
17643
17425
|
options = undefined;
|
|
17644
17426
|
}
|
|
17645
17427
|
try {
|
|
17646
|
-
return new SemVer$d(_instanceof$
|
|
17428
|
+
return new SemVer$d(_instanceof$a(version, SemVer$d) ? version.version : version, options).inc(release, identifier, identifierBase).version;
|
|
17647
17429
|
} catch (er) {
|
|
17648
17430
|
return null;
|
|
17649
17431
|
}
|
|
@@ -17848,7 +17630,7 @@ var cmp$2 = function(a, op, b, loose) {
|
|
|
17848
17630
|
};
|
|
17849
17631
|
var cmp_1 = cmp$2;
|
|
17850
17632
|
|
|
17851
|
-
function _instanceof$
|
|
17633
|
+
function _instanceof$9(left, right) {
|
|
17852
17634
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
17853
17635
|
return !!right[Symbol.hasInstance](left);
|
|
17854
17636
|
} else {
|
|
@@ -17859,7 +17641,7 @@ var SemVer$7 = semver$4;
|
|
|
17859
17641
|
var parse$1 = parse_1;
|
|
17860
17642
|
var _require$4 = re$4.exports, re$2 = _require$4.safeRe, t$2 = _require$4.t;
|
|
17861
17643
|
var coerce$1 = function(version, options) {
|
|
17862
|
-
if (_instanceof$
|
|
17644
|
+
if (_instanceof$9(version, SemVer$7)) {
|
|
17863
17645
|
return version;
|
|
17864
17646
|
}
|
|
17865
17647
|
if (typeof version === "number") {
|
|
@@ -17905,12 +17687,517 @@ var coerce$1 = function(version, options) {
|
|
|
17905
17687
|
};
|
|
17906
17688
|
var coerce_1 = coerce$1;
|
|
17907
17689
|
|
|
17908
|
-
function
|
|
17690
|
+
function _ts_generator$6(thisArg, body) {
|
|
17691
|
+
var f, y, t, g, _ = {
|
|
17692
|
+
label: 0,
|
|
17693
|
+
sent: function() {
|
|
17694
|
+
if (t[0] & 1) throw t[1];
|
|
17695
|
+
return t[1];
|
|
17696
|
+
},
|
|
17697
|
+
trys: [],
|
|
17698
|
+
ops: []
|
|
17699
|
+
};
|
|
17700
|
+
return g = {
|
|
17701
|
+
next: verb(0),
|
|
17702
|
+
"throw": verb(1),
|
|
17703
|
+
"return": verb(2)
|
|
17704
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
17705
|
+
return this;
|
|
17706
|
+
}), g;
|
|
17707
|
+
function verb(n) {
|
|
17708
|
+
return function(v) {
|
|
17709
|
+
return step([
|
|
17710
|
+
n,
|
|
17711
|
+
v
|
|
17712
|
+
]);
|
|
17713
|
+
};
|
|
17714
|
+
}
|
|
17715
|
+
function step(op) {
|
|
17716
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17717
|
+
while(_)try {
|
|
17718
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
17719
|
+
if (y = 0, t) op = [
|
|
17720
|
+
op[0] & 2,
|
|
17721
|
+
t.value
|
|
17722
|
+
];
|
|
17723
|
+
switch(op[0]){
|
|
17724
|
+
case 0:
|
|
17725
|
+
case 1:
|
|
17726
|
+
t = op;
|
|
17727
|
+
break;
|
|
17728
|
+
case 4:
|
|
17729
|
+
_.label++;
|
|
17730
|
+
return {
|
|
17731
|
+
value: op[1],
|
|
17732
|
+
done: false
|
|
17733
|
+
};
|
|
17734
|
+
case 5:
|
|
17735
|
+
_.label++;
|
|
17736
|
+
y = op[1];
|
|
17737
|
+
op = [
|
|
17738
|
+
0
|
|
17739
|
+
];
|
|
17740
|
+
continue;
|
|
17741
|
+
case 7:
|
|
17742
|
+
op = _.ops.pop();
|
|
17743
|
+
_.trys.pop();
|
|
17744
|
+
continue;
|
|
17745
|
+
default:
|
|
17746
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
17747
|
+
_ = 0;
|
|
17748
|
+
continue;
|
|
17749
|
+
}
|
|
17750
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
17751
|
+
_.label = op[1];
|
|
17752
|
+
break;
|
|
17753
|
+
}
|
|
17754
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
17755
|
+
_.label = t[1];
|
|
17756
|
+
t = op;
|
|
17757
|
+
break;
|
|
17758
|
+
}
|
|
17759
|
+
if (t && _.label < t[2]) {
|
|
17760
|
+
_.label = t[2];
|
|
17761
|
+
_.ops.push(op);
|
|
17762
|
+
break;
|
|
17763
|
+
}
|
|
17764
|
+
if (t[2]) _.ops.pop();
|
|
17765
|
+
_.trys.pop();
|
|
17766
|
+
continue;
|
|
17767
|
+
}
|
|
17768
|
+
op = body.call(thisArg, _);
|
|
17769
|
+
} catch (e) {
|
|
17770
|
+
op = [
|
|
17771
|
+
6,
|
|
17772
|
+
e
|
|
17773
|
+
];
|
|
17774
|
+
y = 0;
|
|
17775
|
+
} finally{
|
|
17776
|
+
f = t = 0;
|
|
17777
|
+
}
|
|
17778
|
+
if (op[0] & 5) throw op[1];
|
|
17779
|
+
return {
|
|
17780
|
+
value: op[0] ? op[1] : void 0,
|
|
17781
|
+
done: true
|
|
17782
|
+
};
|
|
17783
|
+
}
|
|
17784
|
+
}
|
|
17785
|
+
var iterator = function(Yallist) {
|
|
17786
|
+
Yallist.prototype[Symbol.iterator] = function() {
|
|
17787
|
+
var walker;
|
|
17788
|
+
return _ts_generator$6(this, function(_state) {
|
|
17789
|
+
switch(_state.label){
|
|
17790
|
+
case 0:
|
|
17791
|
+
walker = this.head;
|
|
17792
|
+
_state.label = 1;
|
|
17793
|
+
case 1:
|
|
17794
|
+
if (!walker) return [
|
|
17795
|
+
3,
|
|
17796
|
+
4
|
|
17797
|
+
];
|
|
17798
|
+
return [
|
|
17799
|
+
4,
|
|
17800
|
+
walker.value
|
|
17801
|
+
];
|
|
17802
|
+
case 2:
|
|
17803
|
+
_state.sent();
|
|
17804
|
+
_state.label = 3;
|
|
17805
|
+
case 3:
|
|
17806
|
+
walker = walker.next;
|
|
17807
|
+
return [
|
|
17808
|
+
3,
|
|
17809
|
+
1
|
|
17810
|
+
];
|
|
17811
|
+
case 4:
|
|
17812
|
+
return [
|
|
17813
|
+
2
|
|
17814
|
+
];
|
|
17815
|
+
}
|
|
17816
|
+
});
|
|
17817
|
+
};
|
|
17818
|
+
};
|
|
17819
|
+
|
|
17820
|
+
function _instanceof$8(left, right) {
|
|
17821
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
17822
|
+
return !!right[Symbol.hasInstance](left);
|
|
17823
|
+
} else {
|
|
17824
|
+
return left instanceof right;
|
|
17825
|
+
}
|
|
17826
|
+
}
|
|
17827
|
+
var yallist = Yallist$1;
|
|
17828
|
+
Yallist$1.Node = Node;
|
|
17829
|
+
Yallist$1.create = Yallist$1;
|
|
17830
|
+
function Yallist$1(list) {
|
|
17831
|
+
var self = this;
|
|
17832
|
+
if (!_instanceof$8(self, Yallist$1)) {
|
|
17833
|
+
self = new Yallist$1();
|
|
17834
|
+
}
|
|
17835
|
+
self.tail = null;
|
|
17836
|
+
self.head = null;
|
|
17837
|
+
self.length = 0;
|
|
17838
|
+
if (list && typeof list.forEach === "function") {
|
|
17839
|
+
list.forEach(function(item) {
|
|
17840
|
+
self.push(item);
|
|
17841
|
+
});
|
|
17842
|
+
} else if (arguments.length > 0) {
|
|
17843
|
+
for(var i = 0, l = arguments.length; i < l; i++){
|
|
17844
|
+
self.push(arguments[i]);
|
|
17845
|
+
}
|
|
17846
|
+
}
|
|
17847
|
+
return self;
|
|
17848
|
+
}
|
|
17849
|
+
Yallist$1.prototype.removeNode = function(node) {
|
|
17850
|
+
if (node.list !== this) {
|
|
17851
|
+
throw new Error("removing node which does not belong to this list");
|
|
17852
|
+
}
|
|
17853
|
+
var next = node.next;
|
|
17854
|
+
var prev = node.prev;
|
|
17855
|
+
if (next) {
|
|
17856
|
+
next.prev = prev;
|
|
17857
|
+
}
|
|
17858
|
+
if (prev) {
|
|
17859
|
+
prev.next = next;
|
|
17860
|
+
}
|
|
17861
|
+
if (node === this.head) {
|
|
17862
|
+
this.head = next;
|
|
17863
|
+
}
|
|
17864
|
+
if (node === this.tail) {
|
|
17865
|
+
this.tail = prev;
|
|
17866
|
+
}
|
|
17867
|
+
node.list.length--;
|
|
17868
|
+
node.next = null;
|
|
17869
|
+
node.prev = null;
|
|
17870
|
+
node.list = null;
|
|
17871
|
+
return next;
|
|
17872
|
+
};
|
|
17873
|
+
Yallist$1.prototype.unshiftNode = function(node) {
|
|
17874
|
+
if (node === this.head) {
|
|
17875
|
+
return;
|
|
17876
|
+
}
|
|
17877
|
+
if (node.list) {
|
|
17878
|
+
node.list.removeNode(node);
|
|
17879
|
+
}
|
|
17880
|
+
var head = this.head;
|
|
17881
|
+
node.list = this;
|
|
17882
|
+
node.next = head;
|
|
17883
|
+
if (head) {
|
|
17884
|
+
head.prev = node;
|
|
17885
|
+
}
|
|
17886
|
+
this.head = node;
|
|
17887
|
+
if (!this.tail) {
|
|
17888
|
+
this.tail = node;
|
|
17889
|
+
}
|
|
17890
|
+
this.length++;
|
|
17891
|
+
};
|
|
17892
|
+
Yallist$1.prototype.pushNode = function(node) {
|
|
17893
|
+
if (node === this.tail) {
|
|
17894
|
+
return;
|
|
17895
|
+
}
|
|
17896
|
+
if (node.list) {
|
|
17897
|
+
node.list.removeNode(node);
|
|
17898
|
+
}
|
|
17899
|
+
var tail = this.tail;
|
|
17900
|
+
node.list = this;
|
|
17901
|
+
node.prev = tail;
|
|
17902
|
+
if (tail) {
|
|
17903
|
+
tail.next = node;
|
|
17904
|
+
}
|
|
17905
|
+
this.tail = node;
|
|
17906
|
+
if (!this.head) {
|
|
17907
|
+
this.head = node;
|
|
17908
|
+
}
|
|
17909
|
+
this.length++;
|
|
17910
|
+
};
|
|
17911
|
+
Yallist$1.prototype.push = function() {
|
|
17912
|
+
for(var i = 0, l = arguments.length; i < l; i++){
|
|
17913
|
+
push(this, arguments[i]);
|
|
17914
|
+
}
|
|
17915
|
+
return this.length;
|
|
17916
|
+
};
|
|
17917
|
+
Yallist$1.prototype.unshift = function() {
|
|
17918
|
+
for(var i = 0, l = arguments.length; i < l; i++){
|
|
17919
|
+
unshift(this, arguments[i]);
|
|
17920
|
+
}
|
|
17921
|
+
return this.length;
|
|
17922
|
+
};
|
|
17923
|
+
Yallist$1.prototype.pop = function() {
|
|
17924
|
+
if (!this.tail) {
|
|
17925
|
+
return undefined;
|
|
17926
|
+
}
|
|
17927
|
+
var res = this.tail.value;
|
|
17928
|
+
this.tail = this.tail.prev;
|
|
17929
|
+
if (this.tail) {
|
|
17930
|
+
this.tail.next = null;
|
|
17931
|
+
} else {
|
|
17932
|
+
this.head = null;
|
|
17933
|
+
}
|
|
17934
|
+
this.length--;
|
|
17935
|
+
return res;
|
|
17936
|
+
};
|
|
17937
|
+
Yallist$1.prototype.shift = function() {
|
|
17938
|
+
if (!this.head) {
|
|
17939
|
+
return undefined;
|
|
17940
|
+
}
|
|
17941
|
+
var res = this.head.value;
|
|
17942
|
+
this.head = this.head.next;
|
|
17943
|
+
if (this.head) {
|
|
17944
|
+
this.head.prev = null;
|
|
17945
|
+
} else {
|
|
17946
|
+
this.tail = null;
|
|
17947
|
+
}
|
|
17948
|
+
this.length--;
|
|
17949
|
+
return res;
|
|
17950
|
+
};
|
|
17951
|
+
Yallist$1.prototype.forEach = function(fn, thisp) {
|
|
17952
|
+
thisp = thisp || this;
|
|
17953
|
+
for(var walker = this.head, i = 0; walker !== null; i++){
|
|
17954
|
+
fn.call(thisp, walker.value, i, this);
|
|
17955
|
+
walker = walker.next;
|
|
17956
|
+
}
|
|
17957
|
+
};
|
|
17958
|
+
Yallist$1.prototype.forEachReverse = function(fn, thisp) {
|
|
17959
|
+
thisp = thisp || this;
|
|
17960
|
+
for(var walker = this.tail, i = this.length - 1; walker !== null; i--){
|
|
17961
|
+
fn.call(thisp, walker.value, i, this);
|
|
17962
|
+
walker = walker.prev;
|
|
17963
|
+
}
|
|
17964
|
+
};
|
|
17965
|
+
Yallist$1.prototype.get = function(n) {
|
|
17966
|
+
for(var i = 0, walker = this.head; walker !== null && i < n; i++){
|
|
17967
|
+
// abort out of the list early if we hit a cycle
|
|
17968
|
+
walker = walker.next;
|
|
17969
|
+
}
|
|
17970
|
+
if (i === n && walker !== null) {
|
|
17971
|
+
return walker.value;
|
|
17972
|
+
}
|
|
17973
|
+
};
|
|
17974
|
+
Yallist$1.prototype.getReverse = function(n) {
|
|
17975
|
+
for(var i = 0, walker = this.tail; walker !== null && i < n; i++){
|
|
17976
|
+
// abort out of the list early if we hit a cycle
|
|
17977
|
+
walker = walker.prev;
|
|
17978
|
+
}
|
|
17979
|
+
if (i === n && walker !== null) {
|
|
17980
|
+
return walker.value;
|
|
17981
|
+
}
|
|
17982
|
+
};
|
|
17983
|
+
Yallist$1.prototype.map = function(fn, thisp) {
|
|
17984
|
+
thisp = thisp || this;
|
|
17985
|
+
var res = new Yallist$1();
|
|
17986
|
+
for(var walker = this.head; walker !== null;){
|
|
17987
|
+
res.push(fn.call(thisp, walker.value, this));
|
|
17988
|
+
walker = walker.next;
|
|
17989
|
+
}
|
|
17990
|
+
return res;
|
|
17991
|
+
};
|
|
17992
|
+
Yallist$1.prototype.mapReverse = function(fn, thisp) {
|
|
17993
|
+
thisp = thisp || this;
|
|
17994
|
+
var res = new Yallist$1();
|
|
17995
|
+
for(var walker = this.tail; walker !== null;){
|
|
17996
|
+
res.push(fn.call(thisp, walker.value, this));
|
|
17997
|
+
walker = walker.prev;
|
|
17998
|
+
}
|
|
17999
|
+
return res;
|
|
18000
|
+
};
|
|
18001
|
+
Yallist$1.prototype.reduce = function(fn, initial) {
|
|
18002
|
+
var acc;
|
|
18003
|
+
var walker = this.head;
|
|
18004
|
+
if (arguments.length > 1) {
|
|
18005
|
+
acc = initial;
|
|
18006
|
+
} else if (this.head) {
|
|
18007
|
+
walker = this.head.next;
|
|
18008
|
+
acc = this.head.value;
|
|
18009
|
+
} else {
|
|
18010
|
+
throw new TypeError("Reduce of empty list with no initial value");
|
|
18011
|
+
}
|
|
18012
|
+
for(var i = 0; walker !== null; i++){
|
|
18013
|
+
acc = fn(acc, walker.value, i);
|
|
18014
|
+
walker = walker.next;
|
|
18015
|
+
}
|
|
18016
|
+
return acc;
|
|
18017
|
+
};
|
|
18018
|
+
Yallist$1.prototype.reduceReverse = function(fn, initial) {
|
|
18019
|
+
var acc;
|
|
18020
|
+
var walker = this.tail;
|
|
18021
|
+
if (arguments.length > 1) {
|
|
18022
|
+
acc = initial;
|
|
18023
|
+
} else if (this.tail) {
|
|
18024
|
+
walker = this.tail.prev;
|
|
18025
|
+
acc = this.tail.value;
|
|
18026
|
+
} else {
|
|
18027
|
+
throw new TypeError("Reduce of empty list with no initial value");
|
|
18028
|
+
}
|
|
18029
|
+
for(var i = this.length - 1; walker !== null; i--){
|
|
18030
|
+
acc = fn(acc, walker.value, i);
|
|
18031
|
+
walker = walker.prev;
|
|
18032
|
+
}
|
|
18033
|
+
return acc;
|
|
18034
|
+
};
|
|
18035
|
+
Yallist$1.prototype.toArray = function() {
|
|
18036
|
+
var arr = new Array(this.length);
|
|
18037
|
+
for(var i = 0, walker = this.head; walker !== null; i++){
|
|
18038
|
+
arr[i] = walker.value;
|
|
18039
|
+
walker = walker.next;
|
|
18040
|
+
}
|
|
18041
|
+
return arr;
|
|
18042
|
+
};
|
|
18043
|
+
Yallist$1.prototype.toArrayReverse = function() {
|
|
18044
|
+
var arr = new Array(this.length);
|
|
18045
|
+
for(var i = 0, walker = this.tail; walker !== null; i++){
|
|
18046
|
+
arr[i] = walker.value;
|
|
18047
|
+
walker = walker.prev;
|
|
18048
|
+
}
|
|
18049
|
+
return arr;
|
|
18050
|
+
};
|
|
18051
|
+
Yallist$1.prototype.slice = function(from, to) {
|
|
18052
|
+
to = to || this.length;
|
|
18053
|
+
if (to < 0) {
|
|
18054
|
+
to += this.length;
|
|
18055
|
+
}
|
|
18056
|
+
from = from || 0;
|
|
18057
|
+
if (from < 0) {
|
|
18058
|
+
from += this.length;
|
|
18059
|
+
}
|
|
18060
|
+
var ret = new Yallist$1();
|
|
18061
|
+
if (to < from || to < 0) {
|
|
18062
|
+
return ret;
|
|
18063
|
+
}
|
|
18064
|
+
if (from < 0) {
|
|
18065
|
+
from = 0;
|
|
18066
|
+
}
|
|
18067
|
+
if (to > this.length) {
|
|
18068
|
+
to = this.length;
|
|
18069
|
+
}
|
|
18070
|
+
for(var i = 0, walker = this.head; walker !== null && i < from; i++){
|
|
18071
|
+
walker = walker.next;
|
|
18072
|
+
}
|
|
18073
|
+
for(; walker !== null && i < to; i++, walker = walker.next){
|
|
18074
|
+
ret.push(walker.value);
|
|
18075
|
+
}
|
|
18076
|
+
return ret;
|
|
18077
|
+
};
|
|
18078
|
+
Yallist$1.prototype.sliceReverse = function(from, to) {
|
|
18079
|
+
to = to || this.length;
|
|
18080
|
+
if (to < 0) {
|
|
18081
|
+
to += this.length;
|
|
18082
|
+
}
|
|
18083
|
+
from = from || 0;
|
|
18084
|
+
if (from < 0) {
|
|
18085
|
+
from += this.length;
|
|
18086
|
+
}
|
|
18087
|
+
var ret = new Yallist$1();
|
|
18088
|
+
if (to < from || to < 0) {
|
|
18089
|
+
return ret;
|
|
18090
|
+
}
|
|
18091
|
+
if (from < 0) {
|
|
18092
|
+
from = 0;
|
|
18093
|
+
}
|
|
18094
|
+
if (to > this.length) {
|
|
18095
|
+
to = this.length;
|
|
18096
|
+
}
|
|
18097
|
+
for(var i = this.length, walker = this.tail; walker !== null && i > to; i--){
|
|
18098
|
+
walker = walker.prev;
|
|
18099
|
+
}
|
|
18100
|
+
for(; walker !== null && i > from; i--, walker = walker.prev){
|
|
18101
|
+
ret.push(walker.value);
|
|
18102
|
+
}
|
|
18103
|
+
return ret;
|
|
18104
|
+
};
|
|
18105
|
+
Yallist$1.prototype.splice = function(start, deleteCount) {
|
|
18106
|
+
for(var _len = arguments.length, nodes = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
|
|
18107
|
+
nodes[_key - 2] = arguments[_key];
|
|
18108
|
+
}
|
|
18109
|
+
if (start > this.length) {
|
|
18110
|
+
start = this.length - 1;
|
|
18111
|
+
}
|
|
18112
|
+
if (start < 0) {
|
|
18113
|
+
start = this.length + start;
|
|
18114
|
+
}
|
|
18115
|
+
for(var i = 0, walker = this.head; walker !== null && i < start; i++){
|
|
18116
|
+
walker = walker.next;
|
|
18117
|
+
}
|
|
18118
|
+
var ret = [];
|
|
18119
|
+
for(var i = 0; walker && i < deleteCount; i++){
|
|
18120
|
+
ret.push(walker.value);
|
|
18121
|
+
walker = this.removeNode(walker);
|
|
18122
|
+
}
|
|
18123
|
+
if (walker === null) {
|
|
18124
|
+
walker = this.tail;
|
|
18125
|
+
}
|
|
18126
|
+
if (walker !== this.head && walker !== this.tail) {
|
|
18127
|
+
walker = walker.prev;
|
|
18128
|
+
}
|
|
18129
|
+
for(var i = 0; i < nodes.length; i++){
|
|
18130
|
+
walker = insert(this, walker, nodes[i]);
|
|
18131
|
+
}
|
|
18132
|
+
return ret;
|
|
18133
|
+
};
|
|
18134
|
+
Yallist$1.prototype.reverse = function() {
|
|
18135
|
+
var head = this.head;
|
|
18136
|
+
var tail = this.tail;
|
|
18137
|
+
for(var walker = head; walker !== null; walker = walker.prev){
|
|
18138
|
+
var p = walker.prev;
|
|
18139
|
+
walker.prev = walker.next;
|
|
18140
|
+
walker.next = p;
|
|
18141
|
+
}
|
|
18142
|
+
this.head = tail;
|
|
18143
|
+
this.tail = head;
|
|
18144
|
+
return this;
|
|
18145
|
+
};
|
|
18146
|
+
function insert(self, node, value) {
|
|
18147
|
+
var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self);
|
|
18148
|
+
if (inserted.next === null) {
|
|
18149
|
+
self.tail = inserted;
|
|
18150
|
+
}
|
|
18151
|
+
if (inserted.prev === null) {
|
|
18152
|
+
self.head = inserted;
|
|
18153
|
+
}
|
|
18154
|
+
self.length++;
|
|
18155
|
+
return inserted;
|
|
18156
|
+
}
|
|
18157
|
+
function push(self, item) {
|
|
18158
|
+
self.tail = new Node(item, self.tail, null, self);
|
|
18159
|
+
if (!self.head) {
|
|
18160
|
+
self.head = self.tail;
|
|
18161
|
+
}
|
|
18162
|
+
self.length++;
|
|
18163
|
+
}
|
|
18164
|
+
function unshift(self, item) {
|
|
18165
|
+
self.head = new Node(item, null, self.head, self);
|
|
18166
|
+
if (!self.tail) {
|
|
18167
|
+
self.tail = self.head;
|
|
18168
|
+
}
|
|
18169
|
+
self.length++;
|
|
18170
|
+
}
|
|
18171
|
+
function Node(value, prev, next, list) {
|
|
18172
|
+
if (!_instanceof$8(this, Node)) {
|
|
18173
|
+
return new Node(value, prev, next, list);
|
|
18174
|
+
}
|
|
18175
|
+
this.list = list;
|
|
18176
|
+
this.value = value;
|
|
18177
|
+
if (prev) {
|
|
18178
|
+
prev.next = this;
|
|
18179
|
+
this.prev = prev;
|
|
18180
|
+
} else {
|
|
18181
|
+
this.prev = null;
|
|
18182
|
+
}
|
|
18183
|
+
if (next) {
|
|
18184
|
+
next.prev = this;
|
|
18185
|
+
this.next = next;
|
|
18186
|
+
} else {
|
|
18187
|
+
this.next = null;
|
|
18188
|
+
}
|
|
18189
|
+
}
|
|
18190
|
+
try {
|
|
18191
|
+
// add if support for Symbol.iterator is present
|
|
18192
|
+
iterator(Yallist$1);
|
|
18193
|
+
} catch (er) {}
|
|
18194
|
+
|
|
18195
|
+
function _class_call_check$a(instance, Constructor) {
|
|
17909
18196
|
if (!(instance instanceof Constructor)) {
|
|
17910
18197
|
throw new TypeError("Cannot call a class as a function");
|
|
17911
18198
|
}
|
|
17912
18199
|
}
|
|
17913
|
-
function _defineProperties$
|
|
18200
|
+
function _defineProperties$a(target, props) {
|
|
17914
18201
|
for(var i = 0; i < props.length; i++){
|
|
17915
18202
|
var descriptor = props[i];
|
|
17916
18203
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -17919,58 +18206,366 @@ function _defineProperties$9(target, props) {
|
|
|
17919
18206
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
17920
18207
|
}
|
|
17921
18208
|
}
|
|
17922
|
-
function _create_class$
|
|
17923
|
-
if (protoProps) _defineProperties$
|
|
17924
|
-
if (staticProps) _defineProperties$
|
|
18209
|
+
function _create_class$a(Constructor, protoProps, staticProps) {
|
|
18210
|
+
if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
|
|
18211
|
+
if (staticProps) _defineProperties$a(Constructor, staticProps);
|
|
17925
18212
|
return Constructor;
|
|
17926
18213
|
}
|
|
18214
|
+
// A linked list to keep track of recently-used-ness
|
|
18215
|
+
var Yallist = yallist;
|
|
18216
|
+
var MAX = Symbol("max");
|
|
18217
|
+
var LENGTH = Symbol("length");
|
|
18218
|
+
var LENGTH_CALCULATOR = Symbol("lengthCalculator");
|
|
18219
|
+
var ALLOW_STALE = Symbol("allowStale");
|
|
18220
|
+
var MAX_AGE = Symbol("maxAge");
|
|
18221
|
+
var DISPOSE = Symbol("dispose");
|
|
18222
|
+
var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet");
|
|
18223
|
+
var LRU_LIST = Symbol("lruList");
|
|
18224
|
+
var CACHE = Symbol("cache");
|
|
18225
|
+
var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet");
|
|
18226
|
+
var naiveLength = function() {
|
|
18227
|
+
return 1;
|
|
18228
|
+
};
|
|
18229
|
+
// lruList is a yallist where the head is the youngest
|
|
18230
|
+
// item, and the tail is the oldest. the list contains the Hit
|
|
18231
|
+
// objects as the entries.
|
|
18232
|
+
// Each Hit object has a reference to its Yallist.Node. This
|
|
18233
|
+
// never changes.
|
|
18234
|
+
//
|
|
18235
|
+
// cache is a Map (or PseudoMap) that matches the keys to
|
|
18236
|
+
// the Yallist.Node object.
|
|
17927
18237
|
var LRUCache = /*#__PURE__*/ function() {
|
|
17928
|
-
function LRUCache() {
|
|
17929
|
-
_class_call_check$
|
|
17930
|
-
|
|
17931
|
-
|
|
17932
|
-
|
|
17933
|
-
|
|
18238
|
+
function LRUCache(options) {
|
|
18239
|
+
_class_call_check$a(this, LRUCache);
|
|
18240
|
+
if (typeof options === "number") options = {
|
|
18241
|
+
max: options
|
|
18242
|
+
};
|
|
18243
|
+
if (!options) options = {};
|
|
18244
|
+
if (options.max && (typeof options.max !== "number" || options.max < 0)) throw new TypeError("max must be a non-negative number");
|
|
18245
|
+
// Kind of weird to have a default max of Infinity, but oh well.
|
|
18246
|
+
this[MAX] = options.max || Infinity;
|
|
18247
|
+
var lc = options.length || naiveLength;
|
|
18248
|
+
this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc;
|
|
18249
|
+
this[ALLOW_STALE] = options.stale || false;
|
|
18250
|
+
if (options.maxAge && typeof options.maxAge !== "number") throw new TypeError("maxAge must be a number");
|
|
18251
|
+
this[MAX_AGE] = options.maxAge || 0;
|
|
18252
|
+
this[DISPOSE] = options.dispose;
|
|
18253
|
+
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
|
|
18254
|
+
this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
|
|
18255
|
+
this.reset();
|
|
18256
|
+
}
|
|
18257
|
+
_create_class$a(LRUCache, [
|
|
18258
|
+
{
|
|
18259
|
+
key: "max",
|
|
18260
|
+
get: function get() {
|
|
18261
|
+
return this[MAX];
|
|
18262
|
+
},
|
|
18263
|
+
set: // resize the cache when the max changes.
|
|
18264
|
+
function set(mL) {
|
|
18265
|
+
if (typeof mL !== "number" || mL < 0) throw new TypeError("max must be a non-negative number");
|
|
18266
|
+
this[MAX] = mL || Infinity;
|
|
18267
|
+
trim(this);
|
|
18268
|
+
}
|
|
18269
|
+
},
|
|
17934
18270
|
{
|
|
17935
|
-
key: "
|
|
17936
|
-
|
|
17937
|
-
|
|
17938
|
-
|
|
17939
|
-
|
|
17940
|
-
|
|
17941
|
-
|
|
17942
|
-
|
|
17943
|
-
|
|
17944
|
-
|
|
18271
|
+
key: "allowStale",
|
|
18272
|
+
get: function get() {
|
|
18273
|
+
return this[ALLOW_STALE];
|
|
18274
|
+
},
|
|
18275
|
+
set: function set(allowStale) {
|
|
18276
|
+
this[ALLOW_STALE] = !!allowStale;
|
|
18277
|
+
}
|
|
18278
|
+
},
|
|
18279
|
+
{
|
|
18280
|
+
key: "maxAge",
|
|
18281
|
+
get: function get() {
|
|
18282
|
+
return this[MAX_AGE];
|
|
18283
|
+
},
|
|
18284
|
+
set: function set(mA) {
|
|
18285
|
+
if (typeof mA !== "number") throw new TypeError("maxAge must be a non-negative number");
|
|
18286
|
+
this[MAX_AGE] = mA;
|
|
18287
|
+
trim(this);
|
|
18288
|
+
}
|
|
18289
|
+
},
|
|
18290
|
+
{
|
|
18291
|
+
key: "lengthCalculator",
|
|
18292
|
+
get: function get() {
|
|
18293
|
+
return this[LENGTH_CALCULATOR];
|
|
18294
|
+
},
|
|
18295
|
+
set: // resize the cache when the lengthCalculator changes.
|
|
18296
|
+
function set(lC) {
|
|
18297
|
+
var _this = this;
|
|
18298
|
+
if (typeof lC !== "function") lC = naiveLength;
|
|
18299
|
+
if (lC !== this[LENGTH_CALCULATOR]) {
|
|
18300
|
+
this[LENGTH_CALCULATOR] = lC;
|
|
18301
|
+
this[LENGTH] = 0;
|
|
18302
|
+
this[LRU_LIST].forEach(function(hit) {
|
|
18303
|
+
hit.length = _this[LENGTH_CALCULATOR](hit.value, hit.key);
|
|
18304
|
+
_this[LENGTH] += hit.length;
|
|
18305
|
+
});
|
|
18306
|
+
}
|
|
18307
|
+
trim(this);
|
|
18308
|
+
}
|
|
18309
|
+
},
|
|
18310
|
+
{
|
|
18311
|
+
key: "length",
|
|
18312
|
+
get: function get() {
|
|
18313
|
+
return this[LENGTH];
|
|
18314
|
+
}
|
|
18315
|
+
},
|
|
18316
|
+
{
|
|
18317
|
+
key: "itemCount",
|
|
18318
|
+
get: function get() {
|
|
18319
|
+
return this[LRU_LIST].length;
|
|
18320
|
+
}
|
|
18321
|
+
},
|
|
18322
|
+
{
|
|
18323
|
+
key: "rforEach",
|
|
18324
|
+
value: function rforEach(fn, thisp) {
|
|
18325
|
+
thisp = thisp || this;
|
|
18326
|
+
for(var walker = this[LRU_LIST].tail; walker !== null;){
|
|
18327
|
+
var prev = walker.prev;
|
|
18328
|
+
forEachStep(this, fn, walker, thisp);
|
|
18329
|
+
walker = prev;
|
|
17945
18330
|
}
|
|
17946
18331
|
}
|
|
17947
18332
|
},
|
|
17948
18333
|
{
|
|
17949
|
-
key: "
|
|
17950
|
-
value: function
|
|
17951
|
-
|
|
18334
|
+
key: "forEach",
|
|
18335
|
+
value: function forEach(fn, thisp) {
|
|
18336
|
+
thisp = thisp || this;
|
|
18337
|
+
for(var walker = this[LRU_LIST].head; walker !== null;){
|
|
18338
|
+
var next = walker.next;
|
|
18339
|
+
forEachStep(this, fn, walker, thisp);
|
|
18340
|
+
walker = next;
|
|
18341
|
+
}
|
|
18342
|
+
}
|
|
18343
|
+
},
|
|
18344
|
+
{
|
|
18345
|
+
key: "keys",
|
|
18346
|
+
value: function keys() {
|
|
18347
|
+
return this[LRU_LIST].toArray().map(function(k) {
|
|
18348
|
+
return k.key;
|
|
18349
|
+
});
|
|
18350
|
+
}
|
|
18351
|
+
},
|
|
18352
|
+
{
|
|
18353
|
+
key: "values",
|
|
18354
|
+
value: function values() {
|
|
18355
|
+
return this[LRU_LIST].toArray().map(function(k) {
|
|
18356
|
+
return k.value;
|
|
18357
|
+
});
|
|
18358
|
+
}
|
|
18359
|
+
},
|
|
18360
|
+
{
|
|
18361
|
+
key: "reset",
|
|
18362
|
+
value: function reset() {
|
|
18363
|
+
var _this = this;
|
|
18364
|
+
if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
|
|
18365
|
+
this[LRU_LIST].forEach(function(hit) {
|
|
18366
|
+
return _this[DISPOSE](hit.key, hit.value);
|
|
18367
|
+
});
|
|
18368
|
+
}
|
|
18369
|
+
this[CACHE] = new Map() // hash of items by key
|
|
18370
|
+
;
|
|
18371
|
+
this[LRU_LIST] = new Yallist() // list of items in order of use recency
|
|
18372
|
+
;
|
|
18373
|
+
this[LENGTH] = 0 // length of items in the list
|
|
18374
|
+
;
|
|
18375
|
+
}
|
|
18376
|
+
},
|
|
18377
|
+
{
|
|
18378
|
+
key: "dump",
|
|
18379
|
+
value: function dump() {
|
|
18380
|
+
var _this = this;
|
|
18381
|
+
return this[LRU_LIST].map(function(hit) {
|
|
18382
|
+
return isStale(_this, hit) ? false : {
|
|
18383
|
+
k: hit.key,
|
|
18384
|
+
v: hit.value,
|
|
18385
|
+
e: hit.now + (hit.maxAge || 0)
|
|
18386
|
+
};
|
|
18387
|
+
}).toArray().filter(function(h) {
|
|
18388
|
+
return h;
|
|
18389
|
+
});
|
|
18390
|
+
}
|
|
18391
|
+
},
|
|
18392
|
+
{
|
|
18393
|
+
key: "dumpLru",
|
|
18394
|
+
value: function dumpLru() {
|
|
18395
|
+
return this[LRU_LIST];
|
|
17952
18396
|
}
|
|
17953
18397
|
},
|
|
17954
18398
|
{
|
|
17955
18399
|
key: "set",
|
|
17956
|
-
value: function set(key, value) {
|
|
17957
|
-
|
|
17958
|
-
if (
|
|
17959
|
-
|
|
17960
|
-
|
|
17961
|
-
|
|
17962
|
-
|
|
18400
|
+
value: function set(key, value, maxAge) {
|
|
18401
|
+
maxAge = maxAge || this[MAX_AGE];
|
|
18402
|
+
if (maxAge && typeof maxAge !== "number") throw new TypeError("maxAge must be a number");
|
|
18403
|
+
var now = maxAge ? Date.now() : 0;
|
|
18404
|
+
var len = this[LENGTH_CALCULATOR](value, key);
|
|
18405
|
+
if (this[CACHE].has(key)) {
|
|
18406
|
+
if (len > this[MAX]) {
|
|
18407
|
+
del(this, this[CACHE].get(key));
|
|
18408
|
+
return false;
|
|
18409
|
+
}
|
|
18410
|
+
var node = this[CACHE].get(key);
|
|
18411
|
+
var item = node.value;
|
|
18412
|
+
// dispose of the old one before overwriting
|
|
18413
|
+
// split out into 2 ifs for better coverage tracking
|
|
18414
|
+
if (this[DISPOSE]) {
|
|
18415
|
+
if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key, item.value);
|
|
17963
18416
|
}
|
|
17964
|
-
|
|
18417
|
+
item.now = now;
|
|
18418
|
+
item.maxAge = maxAge;
|
|
18419
|
+
item.value = value;
|
|
18420
|
+
this[LENGTH] += len - item.length;
|
|
18421
|
+
item.length = len;
|
|
18422
|
+
this.get(key);
|
|
18423
|
+
trim(this);
|
|
18424
|
+
return true;
|
|
17965
18425
|
}
|
|
17966
|
-
|
|
18426
|
+
var hit = new Entry(key, value, len, now, maxAge);
|
|
18427
|
+
// oversized objects fall out of cache automatically.
|
|
18428
|
+
if (hit.length > this[MAX]) {
|
|
18429
|
+
if (this[DISPOSE]) this[DISPOSE](key, value);
|
|
18430
|
+
return false;
|
|
18431
|
+
}
|
|
18432
|
+
this[LENGTH] += hit.length;
|
|
18433
|
+
this[LRU_LIST].unshift(hit);
|
|
18434
|
+
this[CACHE].set(key, this[LRU_LIST].head);
|
|
18435
|
+
trim(this);
|
|
18436
|
+
return true;
|
|
18437
|
+
}
|
|
18438
|
+
},
|
|
18439
|
+
{
|
|
18440
|
+
key: "has",
|
|
18441
|
+
value: function has(key) {
|
|
18442
|
+
if (!this[CACHE].has(key)) return false;
|
|
18443
|
+
var hit = this[CACHE].get(key).value;
|
|
18444
|
+
return !isStale(this, hit);
|
|
18445
|
+
}
|
|
18446
|
+
},
|
|
18447
|
+
{
|
|
18448
|
+
key: "get",
|
|
18449
|
+
value: function get1(key) {
|
|
18450
|
+
return get(this, key, true);
|
|
18451
|
+
}
|
|
18452
|
+
},
|
|
18453
|
+
{
|
|
18454
|
+
key: "peek",
|
|
18455
|
+
value: function peek(key) {
|
|
18456
|
+
return get(this, key, false);
|
|
18457
|
+
}
|
|
18458
|
+
},
|
|
18459
|
+
{
|
|
18460
|
+
key: "pop",
|
|
18461
|
+
value: function pop() {
|
|
18462
|
+
var node = this[LRU_LIST].tail;
|
|
18463
|
+
if (!node) return null;
|
|
18464
|
+
del(this, node);
|
|
18465
|
+
return node.value;
|
|
18466
|
+
}
|
|
18467
|
+
},
|
|
18468
|
+
{
|
|
18469
|
+
key: "del",
|
|
18470
|
+
value: function del1(key) {
|
|
18471
|
+
del(this, this[CACHE].get(key));
|
|
18472
|
+
}
|
|
18473
|
+
},
|
|
18474
|
+
{
|
|
18475
|
+
key: "load",
|
|
18476
|
+
value: function load(arr) {
|
|
18477
|
+
// reset the cache
|
|
18478
|
+
this.reset();
|
|
18479
|
+
var now = Date.now();
|
|
18480
|
+
// A previous serialized cache has the most recent items first
|
|
18481
|
+
for(var l = arr.length - 1; l >= 0; l--){
|
|
18482
|
+
var hit = arr[l];
|
|
18483
|
+
var expiresAt = hit.e || 0;
|
|
18484
|
+
if (expiresAt === 0) // the item was created without expiration in a non aged cache
|
|
18485
|
+
this.set(hit.k, hit.v);
|
|
18486
|
+
else {
|
|
18487
|
+
var maxAge = expiresAt - now;
|
|
18488
|
+
// dont add already expired items
|
|
18489
|
+
if (maxAge > 0) {
|
|
18490
|
+
this.set(hit.k, hit.v, maxAge);
|
|
18491
|
+
}
|
|
18492
|
+
}
|
|
18493
|
+
}
|
|
18494
|
+
}
|
|
18495
|
+
},
|
|
18496
|
+
{
|
|
18497
|
+
key: "prune",
|
|
18498
|
+
value: function prune() {
|
|
18499
|
+
var _this = this;
|
|
18500
|
+
this[CACHE].forEach(function(value, key) {
|
|
18501
|
+
return get(_this, key, false);
|
|
18502
|
+
});
|
|
17967
18503
|
}
|
|
17968
18504
|
}
|
|
17969
18505
|
]);
|
|
17970
18506
|
return LRUCache;
|
|
17971
18507
|
}();
|
|
17972
|
-
var
|
|
18508
|
+
var get = function(self, key, doUse) {
|
|
18509
|
+
var node = self[CACHE].get(key);
|
|
18510
|
+
if (node) {
|
|
18511
|
+
var hit = node.value;
|
|
18512
|
+
if (isStale(self, hit)) {
|
|
18513
|
+
del(self, node);
|
|
18514
|
+
if (!self[ALLOW_STALE]) return undefined;
|
|
18515
|
+
} else {
|
|
18516
|
+
if (doUse) {
|
|
18517
|
+
if (self[UPDATE_AGE_ON_GET]) node.value.now = Date.now();
|
|
18518
|
+
self[LRU_LIST].unshiftNode(node);
|
|
18519
|
+
}
|
|
18520
|
+
}
|
|
18521
|
+
return hit.value;
|
|
18522
|
+
}
|
|
18523
|
+
};
|
|
18524
|
+
var isStale = function(self, hit) {
|
|
18525
|
+
if (!hit || !hit.maxAge && !self[MAX_AGE]) return false;
|
|
18526
|
+
var diff = Date.now() - hit.now;
|
|
18527
|
+
return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE];
|
|
18528
|
+
};
|
|
18529
|
+
var trim = function(self) {
|
|
18530
|
+
if (self[LENGTH] > self[MAX]) {
|
|
18531
|
+
for(var walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null;){
|
|
18532
|
+
// We know that we're about to delete this one, and also
|
|
18533
|
+
// what the next least recently used key will be, so just
|
|
18534
|
+
// go ahead and set it now.
|
|
18535
|
+
var prev = walker.prev;
|
|
18536
|
+
del(self, walker);
|
|
18537
|
+
walker = prev;
|
|
18538
|
+
}
|
|
18539
|
+
}
|
|
18540
|
+
};
|
|
18541
|
+
var del = function(self, node) {
|
|
18542
|
+
if (node) {
|
|
18543
|
+
var hit = node.value;
|
|
18544
|
+
if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value);
|
|
18545
|
+
self[LENGTH] -= hit.length;
|
|
18546
|
+
self[CACHE].delete(hit.key);
|
|
18547
|
+
self[LRU_LIST].removeNode(node);
|
|
18548
|
+
}
|
|
18549
|
+
};
|
|
18550
|
+
var Entry = function Entry(key, value, length, now, maxAge) {
|
|
18551
|
+
_class_call_check$a(this, Entry);
|
|
18552
|
+
this.key = key;
|
|
18553
|
+
this.value = value;
|
|
18554
|
+
this.length = length;
|
|
18555
|
+
this.now = now;
|
|
18556
|
+
this.maxAge = maxAge || 0;
|
|
18557
|
+
};
|
|
18558
|
+
var forEachStep = function(self, fn, node, thisp) {
|
|
18559
|
+
var hit = node.value;
|
|
18560
|
+
if (isStale(self, hit)) {
|
|
18561
|
+
del(self, node);
|
|
18562
|
+
if (!self[ALLOW_STALE]) hit = undefined;
|
|
18563
|
+
}
|
|
18564
|
+
if (hit) fn.call(thisp, hit.value, hit.key, self);
|
|
18565
|
+
};
|
|
18566
|
+
var lruCache = LRUCache;
|
|
17973
18567
|
|
|
18568
|
+
// hoisted class for cyclic dependency
|
|
17974
18569
|
function _array_like_to_array$3(arr, len) {
|
|
17975
18570
|
if (len == null || len > arr.length) len = arr.length;
|
|
17976
18571
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -17979,12 +18574,12 @@ function _array_like_to_array$3(arr, len) {
|
|
|
17979
18574
|
function _array_without_holes$1(arr) {
|
|
17980
18575
|
if (Array.isArray(arr)) return _array_like_to_array$3(arr);
|
|
17981
18576
|
}
|
|
17982
|
-
function _class_call_check$
|
|
18577
|
+
function _class_call_check$9(instance, Constructor) {
|
|
17983
18578
|
if (!(instance instanceof Constructor)) {
|
|
17984
18579
|
throw new TypeError("Cannot call a class as a function");
|
|
17985
18580
|
}
|
|
17986
18581
|
}
|
|
17987
|
-
function _defineProperties$
|
|
18582
|
+
function _defineProperties$9(target, props) {
|
|
17988
18583
|
for(var i = 0; i < props.length; i++){
|
|
17989
18584
|
var descriptor = props[i];
|
|
17990
18585
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -17993,9 +18588,9 @@ function _defineProperties$8(target, props) {
|
|
|
17993
18588
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
17994
18589
|
}
|
|
17995
18590
|
}
|
|
17996
|
-
function _create_class$
|
|
17997
|
-
if (protoProps) _defineProperties$
|
|
17998
|
-
if (staticProps) _defineProperties$
|
|
18591
|
+
function _create_class$9(Constructor, protoProps, staticProps) {
|
|
18592
|
+
if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
|
|
18593
|
+
if (staticProps) _defineProperties$9(Constructor, staticProps);
|
|
17999
18594
|
return Constructor;
|
|
18000
18595
|
}
|
|
18001
18596
|
function _instanceof$7(left, right) {
|
|
@@ -18022,12 +18617,10 @@ function _unsupported_iterable_to_array$3(o, minLen) {
|
|
|
18022
18617
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
18023
18618
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
|
|
18024
18619
|
}
|
|
18025
|
-
var SPACE_CHARACTERS = /\s+/g;
|
|
18026
|
-
// hoisted class for cyclic dependency
|
|
18027
18620
|
var Range$b = /*#__PURE__*/ function() {
|
|
18028
18621
|
function Range(range, options) {
|
|
18029
18622
|
var _this = this;
|
|
18030
|
-
_class_call_check$
|
|
18623
|
+
_class_call_check$9(this, Range);
|
|
18031
18624
|
options = parseOptions$1(options);
|
|
18032
18625
|
if (_instanceof$7(range, Range)) {
|
|
18033
18626
|
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
|
|
@@ -18044,7 +18637,7 @@ var Range$b = /*#__PURE__*/ function() {
|
|
|
18044
18637
|
range
|
|
18045
18638
|
]
|
|
18046
18639
|
];
|
|
18047
|
-
this.
|
|
18640
|
+
this.format();
|
|
18048
18641
|
return this;
|
|
18049
18642
|
}
|
|
18050
18643
|
this.options = options;
|
|
@@ -18053,7 +18646,7 @@ var Range$b = /*#__PURE__*/ function() {
|
|
|
18053
18646
|
// First reduce all whitespace as much as possible so we do not have to rely
|
|
18054
18647
|
// on potentially slow regexes like \s*. This is then stored and used for
|
|
18055
18648
|
// future error messages as well.
|
|
18056
|
-
this.raw = range.trim().
|
|
18649
|
+
this.raw = range.trim().split(/\s+/).join(" ");
|
|
18057
18650
|
// First, split on ||
|
|
18058
18651
|
this.set = this.raw.split("||")// map the range to a 2d array of comparators
|
|
18059
18652
|
.map(function(r) {
|
|
@@ -18107,33 +18700,15 @@ var Range$b = /*#__PURE__*/ function() {
|
|
|
18107
18700
|
}
|
|
18108
18701
|
}
|
|
18109
18702
|
}
|
|
18110
|
-
this.
|
|
18703
|
+
this.format();
|
|
18111
18704
|
}
|
|
18112
|
-
_create_class$
|
|
18113
|
-
{
|
|
18114
|
-
key: "range",
|
|
18115
|
-
get: function get() {
|
|
18116
|
-
if (this.formatted === undefined) {
|
|
18117
|
-
this.formatted = "";
|
|
18118
|
-
for(var i = 0; i < this.set.length; i++){
|
|
18119
|
-
if (i > 0) {
|
|
18120
|
-
this.formatted += "||";
|
|
18121
|
-
}
|
|
18122
|
-
var comps = this.set[i];
|
|
18123
|
-
for(var k = 0; k < comps.length; k++){
|
|
18124
|
-
if (k > 0) {
|
|
18125
|
-
this.formatted += " ";
|
|
18126
|
-
}
|
|
18127
|
-
this.formatted += comps[k].toString().trim();
|
|
18128
|
-
}
|
|
18129
|
-
}
|
|
18130
|
-
}
|
|
18131
|
-
return this.formatted;
|
|
18132
|
-
}
|
|
18133
|
-
},
|
|
18705
|
+
_create_class$9(Range, [
|
|
18134
18706
|
{
|
|
18135
18707
|
key: "format",
|
|
18136
18708
|
value: function format() {
|
|
18709
|
+
this.range = this.set.map(function(comps) {
|
|
18710
|
+
return comps.join(" ").trim();
|
|
18711
|
+
}).join("||").trim();
|
|
18137
18712
|
return this.range;
|
|
18138
18713
|
}
|
|
18139
18714
|
},
|
|
@@ -18268,8 +18843,10 @@ var Range$b = /*#__PURE__*/ function() {
|
|
|
18268
18843
|
return Range;
|
|
18269
18844
|
}();
|
|
18270
18845
|
var range = Range$b;
|
|
18271
|
-
var LRU =
|
|
18272
|
-
var cache = new LRU(
|
|
18846
|
+
var LRU = lruCache;
|
|
18847
|
+
var cache = new LRU({
|
|
18848
|
+
max: 1000
|
|
18849
|
+
});
|
|
18273
18850
|
var parseOptions$1 = parseOptions_1;
|
|
18274
18851
|
var Comparator$4 = comparator;
|
|
18275
18852
|
var debug$1 = debug_1;
|
|
@@ -18493,9 +19070,8 @@ var replaceGTE0 = function(comp, options) {
|
|
|
18493
19070
|
// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
|
|
18494
19071
|
// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
|
|
18495
19072
|
// 1.2 - 3.4 => >=1.2.0 <3.5.0-0
|
|
18496
|
-
// TODO build?
|
|
18497
19073
|
var hyphenReplace = function(incPr) {
|
|
18498
|
-
return function($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) {
|
|
19074
|
+
return function($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
|
|
18499
19075
|
if (isX(fM)) {
|
|
18500
19076
|
from = "";
|
|
18501
19077
|
} else if (isX(fm)) {
|
|
@@ -18553,12 +19129,12 @@ var testSet = function(set, version, options) {
|
|
|
18553
19129
|
return true;
|
|
18554
19130
|
};
|
|
18555
19131
|
|
|
18556
|
-
function _class_call_check$
|
|
19132
|
+
function _class_call_check$8(instance, Constructor) {
|
|
18557
19133
|
if (!(instance instanceof Constructor)) {
|
|
18558
19134
|
throw new TypeError("Cannot call a class as a function");
|
|
18559
19135
|
}
|
|
18560
19136
|
}
|
|
18561
|
-
function _defineProperties$
|
|
19137
|
+
function _defineProperties$8(target, props) {
|
|
18562
19138
|
for(var i = 0; i < props.length; i++){
|
|
18563
19139
|
var descriptor = props[i];
|
|
18564
19140
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -18567,9 +19143,9 @@ function _defineProperties$7(target, props) {
|
|
|
18567
19143
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
18568
19144
|
}
|
|
18569
19145
|
}
|
|
18570
|
-
function _create_class$
|
|
18571
|
-
if (protoProps) _defineProperties$
|
|
18572
|
-
if (staticProps) _defineProperties$
|
|
19146
|
+
function _create_class$8(Constructor, protoProps, staticProps) {
|
|
19147
|
+
if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
|
|
19148
|
+
if (staticProps) _defineProperties$8(Constructor, staticProps);
|
|
18573
19149
|
return Constructor;
|
|
18574
19150
|
}
|
|
18575
19151
|
function _instanceof$6(left, right) {
|
|
@@ -18583,7 +19159,7 @@ var ANY$2 = Symbol("SemVer ANY");
|
|
|
18583
19159
|
// hoisted class for cyclic dependency
|
|
18584
19160
|
var Comparator$3 = /*#__PURE__*/ function() {
|
|
18585
19161
|
function Comparator(comp, options) {
|
|
18586
|
-
_class_call_check$
|
|
19162
|
+
_class_call_check$8(this, Comparator);
|
|
18587
19163
|
options = parseOptions(options);
|
|
18588
19164
|
if (_instanceof$6(comp, Comparator)) {
|
|
18589
19165
|
if (comp.loose === !!options.loose) {
|
|
@@ -18604,7 +19180,7 @@ var Comparator$3 = /*#__PURE__*/ function() {
|
|
|
18604
19180
|
}
|
|
18605
19181
|
debug("comp", this);
|
|
18606
19182
|
}
|
|
18607
|
-
_create_class$
|
|
19183
|
+
_create_class$8(Comparator, [
|
|
18608
19184
|
{
|
|
18609
19185
|
key: "parse",
|
|
18610
19186
|
value: function parse(comp) {
|
|
@@ -18851,7 +19427,7 @@ var validRange$1 = function(range, options) {
|
|
|
18851
19427
|
};
|
|
18852
19428
|
var valid$1 = validRange$1;
|
|
18853
19429
|
|
|
18854
|
-
function _type_of$
|
|
19430
|
+
function _type_of$9(obj) {
|
|
18855
19431
|
"@swc/helpers - typeof";
|
|
18856
19432
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
18857
19433
|
}
|
|
@@ -18929,7 +19505,7 @@ var outside$3 = function(version, range, hilo, options) {
|
|
|
18929
19505
|
// but note that everything is flipped for the "ltr" function.
|
|
18930
19506
|
for(var i = 0; i < range.set.length; ++i){
|
|
18931
19507
|
var _ret = _loop(i);
|
|
18932
|
-
if (_type_of$
|
|
19508
|
+
if (_type_of$9(_ret) === "object") return _ret.v;
|
|
18933
19509
|
}
|
|
18934
19510
|
return true;
|
|
18935
19511
|
};
|
|
@@ -19825,7 +20401,7 @@ var verify = function(jwtString, secretOrPublicKey, options, callback) {
|
|
|
19825
20401
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
19826
20402
|
*/
|
|
19827
20403
|
|
|
19828
|
-
/** Used as references for various `Number` constants. */ function _type_of$
|
|
20404
|
+
/** Used as references for various `Number` constants. */ function _type_of$8(obj) {
|
|
19829
20405
|
"@swc/helpers - typeof";
|
|
19830
20406
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
19831
20407
|
}
|
|
@@ -20219,7 +20795,7 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
20219
20795
|
* _.isObject(null);
|
|
20220
20796
|
* // => false
|
|
20221
20797
|
*/ function isObject$2(value) {
|
|
20222
|
-
var type = typeof value === "undefined" ? "undefined" : _type_of$
|
|
20798
|
+
var type = typeof value === "undefined" ? "undefined" : _type_of$8(value);
|
|
20223
20799
|
return !!value && (type == "object" || type == "function");
|
|
20224
20800
|
}
|
|
20225
20801
|
/**
|
|
@@ -20284,7 +20860,7 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
20284
20860
|
* _.isSymbol('abc');
|
|
20285
20861
|
* // => false
|
|
20286
20862
|
*/ function isSymbol$2(value) {
|
|
20287
|
-
return (typeof value === "undefined" ? "undefined" : _type_of$
|
|
20863
|
+
return (typeof value === "undefined" ? "undefined" : _type_of$8(value)) == "symbol" || isObjectLike$6(value) && objectToString$6.call(value) == symbolTag$2;
|
|
20288
20864
|
}
|
|
20289
20865
|
/**
|
|
20290
20866
|
* Converts `value` to a finite number.
|
|
@@ -20517,7 +21093,7 @@ var lodash_isboolean = isBoolean$1;
|
|
|
20517
21093
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
20518
21094
|
*/
|
|
20519
21095
|
|
|
20520
|
-
/** Used as references for various `Number` constants. */ function _type_of$
|
|
21096
|
+
/** Used as references for various `Number` constants. */ function _type_of$7(obj) {
|
|
20521
21097
|
"@swc/helpers - typeof";
|
|
20522
21098
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
20523
21099
|
}
|
|
@@ -20587,7 +21163,7 @@ var INFINITY$1 = 1 / 0, MAX_INTEGER$1 = 1.7976931348623157e+308, NAN$1 = 0 / 0;
|
|
|
20587
21163
|
* _.isObject(null);
|
|
20588
21164
|
* // => false
|
|
20589
21165
|
*/ function isObject$1(value) {
|
|
20590
|
-
var type = typeof value === "undefined" ? "undefined" : _type_of$
|
|
21166
|
+
var type = typeof value === "undefined" ? "undefined" : _type_of$7(value);
|
|
20591
21167
|
return !!value && (type == "object" || type == "function");
|
|
20592
21168
|
}
|
|
20593
21169
|
/**
|
|
@@ -20633,7 +21209,7 @@ var INFINITY$1 = 1 / 0, MAX_INTEGER$1 = 1.7976931348623157e+308, NAN$1 = 0 / 0;
|
|
|
20633
21209
|
* _.isSymbol('abc');
|
|
20634
21210
|
* // => false
|
|
20635
21211
|
*/ function isSymbol$1(value) {
|
|
20636
|
-
return (typeof value === "undefined" ? "undefined" : _type_of$
|
|
21212
|
+
return (typeof value === "undefined" ? "undefined" : _type_of$7(value)) == "symbol" || isObjectLike$4(value) && objectToString$4.call(value) == symbolTag$1;
|
|
20637
21213
|
}
|
|
20638
21214
|
/**
|
|
20639
21215
|
* Converts `value` to a finite number.
|
|
@@ -21022,7 +21598,7 @@ var lodash_isstring = isString$1;
|
|
|
21022
21598
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
21023
21599
|
*/
|
|
21024
21600
|
|
|
21025
|
-
/** Used as the `TypeError` message for "Functions" methods. */ function _type_of$
|
|
21601
|
+
/** Used as the `TypeError` message for "Functions" methods. */ function _type_of$6(obj) {
|
|
21026
21602
|
"@swc/helpers - typeof";
|
|
21027
21603
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
21028
21604
|
}
|
|
@@ -21117,7 +21693,7 @@ var FUNC_ERROR_TEXT = "Expected a function";
|
|
|
21117
21693
|
* _.isObject(null);
|
|
21118
21694
|
* // => false
|
|
21119
21695
|
*/ function isObject(value) {
|
|
21120
|
-
var type = typeof value === "undefined" ? "undefined" : _type_of$
|
|
21696
|
+
var type = typeof value === "undefined" ? "undefined" : _type_of$6(value);
|
|
21121
21697
|
return !!value && (type == "object" || type == "function");
|
|
21122
21698
|
}
|
|
21123
21699
|
/**
|
|
@@ -21163,7 +21739,7 @@ var FUNC_ERROR_TEXT = "Expected a function";
|
|
|
21163
21739
|
* _.isSymbol('abc');
|
|
21164
21740
|
* // => false
|
|
21165
21741
|
*/ function isSymbol(value) {
|
|
21166
|
-
return (typeof value === "undefined" ? "undefined" : _type_of$
|
|
21742
|
+
return (typeof value === "undefined" ? "undefined" : _type_of$6(value)) == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
21167
21743
|
}
|
|
21168
21744
|
/**
|
|
21169
21745
|
* Converts `value` to a finite number.
|
|
@@ -21276,7 +21852,7 @@ function _instanceof$3(left, right) {
|
|
|
21276
21852
|
return left instanceof right;
|
|
21277
21853
|
}
|
|
21278
21854
|
}
|
|
21279
|
-
function _type_of$
|
|
21855
|
+
function _type_of$5(obj) {
|
|
21280
21856
|
"@swc/helpers - typeof";
|
|
21281
21857
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
21282
21858
|
}
|
|
@@ -21483,7 +22059,7 @@ var sign = function(payload, secretOrPrivateKey, options, callback) {
|
|
|
21483
22059
|
return typeof options[opt] !== "undefined";
|
|
21484
22060
|
});
|
|
21485
22061
|
if (invalid_options.length > 0) {
|
|
21486
|
-
return failure(new Error("invalid " + invalid_options.join(",") + " option for " + (typeof payload === "undefined" ? "undefined" : _type_of$
|
|
22062
|
+
return failure(new Error("invalid " + invalid_options.join(",") + " option for " + (typeof payload === "undefined" ? "undefined" : _type_of$5(payload)) + " payload"));
|
|
21487
22063
|
}
|
|
21488
22064
|
}
|
|
21489
22065
|
if (typeof payload.exp !== "undefined" && typeof options.expiresIn !== "undefined") {
|
|
@@ -21578,12 +22154,12 @@ var jsonwebtoken = {
|
|
|
21578
22154
|
TokenExpiredError: TokenExpiredError_1
|
|
21579
22155
|
};
|
|
21580
22156
|
|
|
21581
|
-
function _class_call_check$
|
|
22157
|
+
function _class_call_check$7(instance, Constructor) {
|
|
21582
22158
|
if (!(instance instanceof Constructor)) {
|
|
21583
22159
|
throw new TypeError("Cannot call a class as a function");
|
|
21584
22160
|
}
|
|
21585
22161
|
}
|
|
21586
|
-
function _defineProperties$
|
|
22162
|
+
function _defineProperties$7(target, props) {
|
|
21587
22163
|
for(var i = 0; i < props.length; i++){
|
|
21588
22164
|
var descriptor = props[i];
|
|
21589
22165
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -21592,9 +22168,9 @@ function _defineProperties$6(target, props) {
|
|
|
21592
22168
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
21593
22169
|
}
|
|
21594
22170
|
}
|
|
21595
|
-
function _create_class$
|
|
21596
|
-
if (protoProps) _defineProperties$
|
|
21597
|
-
if (staticProps) _defineProperties$
|
|
22171
|
+
function _create_class$7(Constructor, protoProps, staticProps) {
|
|
22172
|
+
if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
|
|
22173
|
+
if (staticProps) _defineProperties$7(Constructor, staticProps);
|
|
21598
22174
|
return Constructor;
|
|
21599
22175
|
}
|
|
21600
22176
|
function _define_property$2(obj, key, value) {
|
|
@@ -21618,9 +22194,9 @@ function _define_property$2(obj, key, value) {
|
|
|
21618
22194
|
* @public
|
|
21619
22195
|
*/ var ClientAssertion = /*#__PURE__*/ function() {
|
|
21620
22196
|
function ClientAssertion() {
|
|
21621
|
-
_class_call_check$
|
|
22197
|
+
_class_call_check$7(this, ClientAssertion);
|
|
21622
22198
|
}
|
|
21623
|
-
_create_class$
|
|
22199
|
+
_create_class$7(ClientAssertion, [
|
|
21624
22200
|
{
|
|
21625
22201
|
/**
|
|
21626
22202
|
* Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
|
|
@@ -21654,14 +22230,14 @@ function _define_property$2(obj, key, value) {
|
|
|
21654
22230
|
this.jwtAudience = jwtAudience;
|
|
21655
22231
|
var issuedAt = nowSeconds();
|
|
21656
22232
|
this.expirationTime = issuedAt + 600;
|
|
21657
|
-
var algorithm = this.useSha256 ? JwtConstants.PSS_256 : JwtConstants.RSA_256;
|
|
21658
22233
|
var header = {
|
|
21659
|
-
alg:
|
|
22234
|
+
alg: JwtConstants.RSA_256,
|
|
22235
|
+
x5t: EncodingUtils.base64EncodeUrl(this.thumbprint, "hex")
|
|
21660
22236
|
};
|
|
21661
|
-
var thumbprintHeader = this.useSha256 ? JwtConstants.X5T_256 : JwtConstants.X5T;
|
|
21662
|
-
Object.assign(header, _define_property$2({}, thumbprintHeader, EncodingUtils.base64EncodeUrl(this.thumbprint, "hex")));
|
|
21663
22237
|
if (this.publicCertificate) {
|
|
21664
|
-
Object.assign(header,
|
|
22238
|
+
Object.assign(header, {
|
|
22239
|
+
x5c: this.publicCertificate
|
|
22240
|
+
});
|
|
21665
22241
|
}
|
|
21666
22242
|
var _obj;
|
|
21667
22243
|
var payload = (_obj = {}, _define_property$2(_obj, JwtConstants.AUDIENCE, this.jwtAudience), _define_property$2(_obj, JwtConstants.EXPIRATION_TIME, this.expirationTime), _define_property$2(_obj, JwtConstants.ISSUER, this.issuer), _define_property$2(_obj, JwtConstants.SUBJECT, this.issuer), _define_property$2(_obj, JwtConstants.NOT_BEFORE, issuedAt), _define_property$2(_obj, JwtConstants.JWT_ID, cryptoProvider.createNewGuid()), _obj);
|
|
@@ -21694,7 +22270,6 @@ function _define_property$2(obj, key, value) {
|
|
|
21694
22270
|
{
|
|
21695
22271
|
key: "fromCertificate",
|
|
21696
22272
|
value: /**
|
|
21697
|
-
* @deprecated Use fromCertificateWithSha256Thumbprint instead, with a SHA-256 thumprint
|
|
21698
22273
|
* Initialize the ClientAssertion class from the certificate passed by the user
|
|
21699
22274
|
* @param thumbprint - identifier of a certificate
|
|
21700
22275
|
* @param privateKey - secret key
|
|
@@ -21703,25 +22278,6 @@ function _define_property$2(obj, key, value) {
|
|
|
21703
22278
|
var clientAssertion = new ClientAssertion();
|
|
21704
22279
|
clientAssertion.privateKey = privateKey;
|
|
21705
22280
|
clientAssertion.thumbprint = thumbprint;
|
|
21706
|
-
clientAssertion.useSha256 = false;
|
|
21707
|
-
if (publicCertificate) {
|
|
21708
|
-
clientAssertion.publicCertificate = this.parseCertificate(publicCertificate);
|
|
21709
|
-
}
|
|
21710
|
-
return clientAssertion;
|
|
21711
|
-
}
|
|
21712
|
-
},
|
|
21713
|
-
{
|
|
21714
|
-
key: "fromCertificateWithSha256Thumbprint",
|
|
21715
|
-
value: /**
|
|
21716
|
-
* Initialize the ClientAssertion class from the certificate passed by the user
|
|
21717
|
-
* @param thumbprint - identifier of a certificate
|
|
21718
|
-
* @param privateKey - secret key
|
|
21719
|
-
* @param publicCertificate - electronic document provided to prove the ownership of the public key
|
|
21720
|
-
*/ function fromCertificateWithSha256Thumbprint(thumbprint, privateKey, publicCertificate) {
|
|
21721
|
-
var clientAssertion = new ClientAssertion();
|
|
21722
|
-
clientAssertion.privateKey = privateKey;
|
|
21723
|
-
clientAssertion.thumbprint = thumbprint;
|
|
21724
|
-
clientAssertion.useSha256 = true;
|
|
21725
22281
|
if (publicCertificate) {
|
|
21726
22282
|
clientAssertion.publicCertificate = this.parseCertificate(publicCertificate);
|
|
21727
22283
|
}
|
|
@@ -21755,7 +22311,198 @@ function _define_property$2(obj, key, value) {
|
|
|
21755
22311
|
}();
|
|
21756
22312
|
|
|
21757
22313
|
/* eslint-disable header/header */ var name = "@azure/msal-node";
|
|
21758
|
-
var version = "2.
|
|
22314
|
+
var version = "2.10.0";
|
|
22315
|
+
|
|
22316
|
+
function _assert_this_initialized$4(self) {
|
|
22317
|
+
if (self === void 0) {
|
|
22318
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
22319
|
+
}
|
|
22320
|
+
return self;
|
|
22321
|
+
}
|
|
22322
|
+
function _class_call_check$6(instance, Constructor) {
|
|
22323
|
+
if (!(instance instanceof Constructor)) {
|
|
22324
|
+
throw new TypeError("Cannot call a class as a function");
|
|
22325
|
+
}
|
|
22326
|
+
}
|
|
22327
|
+
function _defineProperties$6(target, props) {
|
|
22328
|
+
for(var i = 0; i < props.length; i++){
|
|
22329
|
+
var descriptor = props[i];
|
|
22330
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
22331
|
+
descriptor.configurable = true;
|
|
22332
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
22333
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
22334
|
+
}
|
|
22335
|
+
}
|
|
22336
|
+
function _create_class$6(Constructor, protoProps, staticProps) {
|
|
22337
|
+
if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
|
|
22338
|
+
if (staticProps) _defineProperties$6(Constructor, staticProps);
|
|
22339
|
+
return Constructor;
|
|
22340
|
+
}
|
|
22341
|
+
function _get_prototype_of$4(o) {
|
|
22342
|
+
_get_prototype_of$4 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
22343
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
22344
|
+
};
|
|
22345
|
+
return _get_prototype_of$4(o);
|
|
22346
|
+
}
|
|
22347
|
+
function _inherits$4(subClass, superClass) {
|
|
22348
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
22349
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
22350
|
+
}
|
|
22351
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
22352
|
+
constructor: {
|
|
22353
|
+
value: subClass,
|
|
22354
|
+
writable: true,
|
|
22355
|
+
configurable: true
|
|
22356
|
+
}
|
|
22357
|
+
});
|
|
22358
|
+
if (superClass) _set_prototype_of$4(subClass, superClass);
|
|
22359
|
+
}
|
|
22360
|
+
function _possible_constructor_return$4(self, call) {
|
|
22361
|
+
if (call && (_type_of$4(call) === "object" || typeof call === "function")) {
|
|
22362
|
+
return call;
|
|
22363
|
+
}
|
|
22364
|
+
return _assert_this_initialized$4(self);
|
|
22365
|
+
}
|
|
22366
|
+
function _set_prototype_of$4(o, p) {
|
|
22367
|
+
_set_prototype_of$4 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
22368
|
+
o.__proto__ = p;
|
|
22369
|
+
return o;
|
|
22370
|
+
};
|
|
22371
|
+
return _set_prototype_of$4(o, p);
|
|
22372
|
+
}
|
|
22373
|
+
function _type_of$4(obj) {
|
|
22374
|
+
"@swc/helpers - typeof";
|
|
22375
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
22376
|
+
}
|
|
22377
|
+
function _is_native_reflect_construct$4() {
|
|
22378
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
22379
|
+
if (Reflect.construct.sham) return false;
|
|
22380
|
+
if (typeof Proxy === "function") return true;
|
|
22381
|
+
try {
|
|
22382
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
22383
|
+
return true;
|
|
22384
|
+
} catch (e) {
|
|
22385
|
+
return false;
|
|
22386
|
+
}
|
|
22387
|
+
}
|
|
22388
|
+
function _create_super$4(Derived) {
|
|
22389
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct$4();
|
|
22390
|
+
return function _createSuperInternal() {
|
|
22391
|
+
var Super = _get_prototype_of$4(Derived), result;
|
|
22392
|
+
if (hasNativeReflectConstruct) {
|
|
22393
|
+
var NewTarget = _get_prototype_of$4(this).constructor;
|
|
22394
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
22395
|
+
} else {
|
|
22396
|
+
result = Super.apply(this, arguments);
|
|
22397
|
+
}
|
|
22398
|
+
return _possible_constructor_return$4(this, result);
|
|
22399
|
+
};
|
|
22400
|
+
}
|
|
22401
|
+
/*
|
|
22402
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
22403
|
+
* Licensed under the MIT License.
|
|
22404
|
+
*/ /**
|
|
22405
|
+
* NodeAuthErrorMessage class containing string constants used by error codes and messages.
|
|
22406
|
+
*/ var NodeAuthErrorMessage = {
|
|
22407
|
+
invalidLoopbackAddressType: {
|
|
22408
|
+
code: "invalid_loopback_server_address_type",
|
|
22409
|
+
desc: "Loopback server address is not type string. This is unexpected."
|
|
22410
|
+
},
|
|
22411
|
+
unableToLoadRedirectUri: {
|
|
22412
|
+
code: "unable_to_load_redirectUrl",
|
|
22413
|
+
desc: "Loopback server callback was invoked without a url. This is unexpected."
|
|
22414
|
+
},
|
|
22415
|
+
noAuthCodeInResponse: {
|
|
22416
|
+
code: "no_auth_code_in_response",
|
|
22417
|
+
desc: "No auth code found in the server response. Please check your network trace to determine what happened."
|
|
22418
|
+
},
|
|
22419
|
+
noLoopbackServerExists: {
|
|
22420
|
+
code: "no_loopback_server_exists",
|
|
22421
|
+
desc: "No loopback server exists yet."
|
|
22422
|
+
},
|
|
22423
|
+
loopbackServerAlreadyExists: {
|
|
22424
|
+
code: "loopback_server_already_exists",
|
|
22425
|
+
desc: "Loopback server already exists. Cannot create another."
|
|
22426
|
+
},
|
|
22427
|
+
loopbackServerTimeout: {
|
|
22428
|
+
code: "loopback_server_timeout",
|
|
22429
|
+
desc: "Timed out waiting for auth code listener to be registered."
|
|
22430
|
+
},
|
|
22431
|
+
stateNotFoundError: {
|
|
22432
|
+
code: "state_not_found",
|
|
22433
|
+
desc: "State not found. Please verify that the request originated from msal."
|
|
22434
|
+
}
|
|
22435
|
+
};
|
|
22436
|
+
var NodeAuthError = /*#__PURE__*/ function(AuthError) {
|
|
22437
|
+
_inherits$4(NodeAuthError, AuthError);
|
|
22438
|
+
var _super = _create_super$4(NodeAuthError);
|
|
22439
|
+
function NodeAuthError(errorCode, errorMessage) {
|
|
22440
|
+
_class_call_check$6(this, NodeAuthError);
|
|
22441
|
+
var _this;
|
|
22442
|
+
_this = _super.call(this, errorCode, errorMessage);
|
|
22443
|
+
_this.name = "NodeAuthError";
|
|
22444
|
+
return _this;
|
|
22445
|
+
}
|
|
22446
|
+
_create_class$6(NodeAuthError, null, [
|
|
22447
|
+
{
|
|
22448
|
+
key: "createInvalidLoopbackAddressTypeError",
|
|
22449
|
+
value: /**
|
|
22450
|
+
* Creates an error thrown if loopback server address is of type string.
|
|
22451
|
+
*/ function createInvalidLoopbackAddressTypeError() {
|
|
22452
|
+
return new NodeAuthError(NodeAuthErrorMessage.invalidLoopbackAddressType.code, "".concat(NodeAuthErrorMessage.invalidLoopbackAddressType.desc));
|
|
22453
|
+
}
|
|
22454
|
+
},
|
|
22455
|
+
{
|
|
22456
|
+
key: "createUnableToLoadRedirectUrlError",
|
|
22457
|
+
value: /**
|
|
22458
|
+
* Creates an error thrown if the loopback server is unable to get a url.
|
|
22459
|
+
*/ function createUnableToLoadRedirectUrlError() {
|
|
22460
|
+
return new NodeAuthError(NodeAuthErrorMessage.unableToLoadRedirectUri.code, "".concat(NodeAuthErrorMessage.unableToLoadRedirectUri.desc));
|
|
22461
|
+
}
|
|
22462
|
+
},
|
|
22463
|
+
{
|
|
22464
|
+
key: "createNoAuthCodeInResponseError",
|
|
22465
|
+
value: /**
|
|
22466
|
+
* Creates an error thrown if the server response does not contain an auth code.
|
|
22467
|
+
*/ function createNoAuthCodeInResponseError() {
|
|
22468
|
+
return new NodeAuthError(NodeAuthErrorMessage.noAuthCodeInResponse.code, "".concat(NodeAuthErrorMessage.noAuthCodeInResponse.desc));
|
|
22469
|
+
}
|
|
22470
|
+
},
|
|
22471
|
+
{
|
|
22472
|
+
key: "createNoLoopbackServerExistsError",
|
|
22473
|
+
value: /**
|
|
22474
|
+
* Creates an error thrown if the loopback server has not been spun up yet.
|
|
22475
|
+
*/ function createNoLoopbackServerExistsError() {
|
|
22476
|
+
return new NodeAuthError(NodeAuthErrorMessage.noLoopbackServerExists.code, "".concat(NodeAuthErrorMessage.noLoopbackServerExists.desc));
|
|
22477
|
+
}
|
|
22478
|
+
},
|
|
22479
|
+
{
|
|
22480
|
+
key: "createLoopbackServerAlreadyExistsError",
|
|
22481
|
+
value: /**
|
|
22482
|
+
* Creates an error thrown if a loopback server already exists when attempting to create another one.
|
|
22483
|
+
*/ function createLoopbackServerAlreadyExistsError() {
|
|
22484
|
+
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerAlreadyExists.code, "".concat(NodeAuthErrorMessage.loopbackServerAlreadyExists.desc));
|
|
22485
|
+
}
|
|
22486
|
+
},
|
|
22487
|
+
{
|
|
22488
|
+
key: "createLoopbackServerTimeoutError",
|
|
22489
|
+
value: /**
|
|
22490
|
+
* Creates an error thrown if the loopback server times out registering the auth code listener.
|
|
22491
|
+
*/ function createLoopbackServerTimeoutError() {
|
|
22492
|
+
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerTimeout.code, "".concat(NodeAuthErrorMessage.loopbackServerTimeout.desc));
|
|
22493
|
+
}
|
|
22494
|
+
},
|
|
22495
|
+
{
|
|
22496
|
+
key: "createStateNotFoundError",
|
|
22497
|
+
value: /**
|
|
22498
|
+
* Creates an error thrown when the state is not present.
|
|
22499
|
+
*/ function createStateNotFoundError() {
|
|
22500
|
+
return new NodeAuthError(NodeAuthErrorMessage.stateNotFoundError.code, NodeAuthErrorMessage.stateNotFoundError.desc);
|
|
22501
|
+
}
|
|
22502
|
+
}
|
|
22503
|
+
]);
|
|
22504
|
+
return NodeAuthError;
|
|
22505
|
+
}(AuthError);
|
|
21759
22506
|
|
|
21760
22507
|
function _assert_this_initialized$3(self) {
|
|
21761
22508
|
if (self === void 0) {
|
|
@@ -24381,7 +25128,7 @@ function _ts_generator$1(thisArg, body) {
|
|
|
24381
25128
|
_class_call_check$1(this, ConfidentialClientApplication);
|
|
24382
25129
|
var _this;
|
|
24383
25130
|
_this = _super.call(this, configuration);
|
|
24384
|
-
_this.setClientCredential();
|
|
25131
|
+
_this.setClientCredential(_this.config);
|
|
24385
25132
|
_this.appTokenProvider = undefined;
|
|
24386
25133
|
return _this;
|
|
24387
25134
|
}
|
|
@@ -24565,10 +25312,14 @@ function _ts_generator$1(thisArg, body) {
|
|
|
24565
25312
|
},
|
|
24566
25313
|
{
|
|
24567
25314
|
key: "setClientCredential",
|
|
24568
|
-
value: function setClientCredential() {
|
|
24569
|
-
var clientSecretNotEmpty = !!
|
|
24570
|
-
var clientAssertionNotEmpty = !!
|
|
24571
|
-
var
|
|
25315
|
+
value: function setClientCredential(configuration) {
|
|
25316
|
+
var clientSecretNotEmpty = !!configuration.auth.clientSecret;
|
|
25317
|
+
var clientAssertionNotEmpty = !!configuration.auth.clientAssertion;
|
|
25318
|
+
var certificate = configuration.auth.clientCertificate || {
|
|
25319
|
+
thumbprint: Constants$1.EMPTY_STRING,
|
|
25320
|
+
privateKey: Constants$1.EMPTY_STRING
|
|
25321
|
+
};
|
|
25322
|
+
var certificateNotEmpty = !!certificate.thumbprint || !!certificate.privateKey;
|
|
24572
25323
|
/*
|
|
24573
25324
|
* If app developer configures this callback, they don't need a credential
|
|
24574
25325
|
* i.e. AzureSDK can get token from Managed Identity without a cert / secret
|
|
@@ -24579,19 +25330,19 @@ function _ts_generator$1(thisArg, body) {
|
|
|
24579
25330
|
if (clientSecretNotEmpty && clientAssertionNotEmpty || clientAssertionNotEmpty && certificateNotEmpty || clientSecretNotEmpty && certificateNotEmpty) {
|
|
24580
25331
|
throw createClientAuthError(invalidClientCredential);
|
|
24581
25332
|
}
|
|
24582
|
-
if (
|
|
24583
|
-
this.clientSecret =
|
|
25333
|
+
if (configuration.auth.clientSecret) {
|
|
25334
|
+
this.clientSecret = configuration.auth.clientSecret;
|
|
24584
25335
|
return;
|
|
24585
25336
|
}
|
|
24586
|
-
if (
|
|
24587
|
-
this.developerProvidedClientAssertion =
|
|
25337
|
+
if (configuration.auth.clientAssertion) {
|
|
25338
|
+
this.developerProvidedClientAssertion = configuration.auth.clientAssertion;
|
|
24588
25339
|
return;
|
|
24589
25340
|
}
|
|
24590
25341
|
if (!certificateNotEmpty) {
|
|
24591
25342
|
throw createClientAuthError(invalidClientCredential);
|
|
24592
25343
|
} else {
|
|
24593
|
-
|
|
24594
|
-
this.
|
|
25344
|
+
var _configuration_auth_clientCertificate;
|
|
25345
|
+
this.clientAssertion = ClientAssertion.fromCertificate(certificate.thumbprint, certificate.privateKey, (_configuration_auth_clientCertificate = configuration.auth.clientCertificate) === null || _configuration_auth_clientCertificate === void 0 ? void 0 : _configuration_auth_clientCertificate.x5c);
|
|
24595
25346
|
}
|
|
24596
25347
|
}
|
|
24597
25348
|
}
|