@digipair/skill-microsoft 0.21.1 → 0.21.6
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 +634 -1385
- package/index.esm.js +634 -1385
- 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$o(thisArg, body) {
|
|
2345
2345
|
var f, y, t, g, _ = {
|
|
2346
2346
|
label: 0,
|
|
2347
2347
|
sent: function() {
|
|
@@ -2458,7 +2458,7 @@ function _ts_generator$p(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$o(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$p(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$o(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$p(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$o(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$i(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$n(thisArg, body) {
|
|
3043
3043
|
var f, y, t, g, _ = {
|
|
3044
3044
|
label: 0,
|
|
3045
3045
|
sent: function() {
|
|
@@ -3403,7 +3403,7 @@ function _ts_generator$o(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$n(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$o(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$n(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$o(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$n(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$o(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$n(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$o(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$n(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$o(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$n(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$o(thisArg, body) {
|
|
|
3950
3950
|
];
|
|
3951
3951
|
case 3:
|
|
3952
3952
|
error = _state.sent();
|
|
3953
|
-
if (_instanceof$
|
|
3953
|
+
if (_instanceof$i(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$m(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$m(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$l(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$l(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$k(thisArg, body) {
|
|
4594
4594
|
var f, y, t, g, _ = {
|
|
4595
4595
|
label: 0,
|
|
4596
4596
|
sent: function() {
|
|
@@ -4706,35 +4706,35 @@ function _ts_generator$l(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$k(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$k(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$k(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$k(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$k(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.1";
|
|
4981
4981
|
|
|
4982
4982
|
function _array_like_to_array$a(arr, len) {
|
|
4983
4983
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -5386,20 +5386,35 @@ 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
|
-
|
|
5389
|
+
/**
|
|
5390
|
+
* Build tenant profile
|
|
5391
|
+
* @param homeAccountId - Home account identifier for this account object
|
|
5392
|
+
* @param localAccountId - Local account identifer for this account object
|
|
5393
|
+
* @param tenantId - Full tenant or organizational id that this account belongs to
|
|
5394
|
+
* @param idTokenClaims - Claims from the ID token
|
|
5395
|
+
* @returns
|
|
5396
|
+
*/ function buildTenantProfile(homeAccountId, localAccountId, tenantId, idTokenClaims) {
|
|
5397
|
+
if (idTokenClaims) {
|
|
5398
|
+
var oid = idTokenClaims.oid, sub = idTokenClaims.sub, tid = idTokenClaims.tid, name = idTokenClaims.name, tfp = idTokenClaims.tfp, acr = idTokenClaims.acr;
|
|
5399
|
+
/**
|
|
5400
|
+
* 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:
|
|
5401
|
+
* 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.
|
|
5402
|
+
* tfp - Trust Framework Policy claim that identifies the policy that was used to authenticate the user. Functions as tenant for B2C scenarios.
|
|
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
|
+
}
|
|
5403
5418
|
}
|
|
5404
5419
|
/**
|
|
5405
5420
|
* Replaces account info that varies by tenant profile sourced from the ID token claims passed in with the tenant-specific account info
|
|
@@ -5420,7 +5435,7 @@ function buildTenantProfileFromIdTokenClaims(homeAccountId, idTokenClaims) {
|
|
|
5420
5435
|
if (idTokenClaims) {
|
|
5421
5436
|
// Ignore isHomeTenant, loginHint, and sid which are part of tenant profile but not base account info
|
|
5422
5437
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5423
|
-
var
|
|
5438
|
+
var _buildTenantProfile = buildTenantProfile(baseAccountInfo.homeAccountId, baseAccountInfo.localAccountId, baseAccountInfo.tenantId, idTokenClaims); _buildTenantProfile.isHomeTenant; var claimsSourcedTenantProfile = _object_without_properties(_buildTenantProfile, [
|
|
5424
5439
|
"isHomeTenant"
|
|
5425
5440
|
]);
|
|
5426
5441
|
updatedAccountInfo = _object_spread_props$7(_object_spread$b({}, updatedAccountInfo, claimsSourcedTenantProfile), {
|
|
@@ -5618,12 +5633,10 @@ function _create_class$A(Constructor, protoProps, staticProps) {
|
|
|
5618
5633
|
if (accountDetails.tenantProfiles) {
|
|
5619
5634
|
account.tenantProfiles = accountDetails.tenantProfiles;
|
|
5620
5635
|
} else {
|
|
5621
|
-
var
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
}
|
|
5626
|
-
account.tenantProfiles = tenantProfiles;
|
|
5636
|
+
var tenantProfile = buildTenantProfile(accountDetails.homeAccountId, account.localAccountId, account.realm, accountDetails.idTokenClaims);
|
|
5637
|
+
account.tenantProfiles = [
|
|
5638
|
+
tenantProfile
|
|
5639
|
+
];
|
|
5627
5640
|
}
|
|
5628
5641
|
return account;
|
|
5629
5642
|
}
|
|
@@ -5961,7 +5974,7 @@ function _inherits$c(subClass, superClass) {
|
|
|
5961
5974
|
});
|
|
5962
5975
|
if (superClass) _set_prototype_of$c(subClass, superClass);
|
|
5963
5976
|
}
|
|
5964
|
-
function _instanceof$
|
|
5977
|
+
function _instanceof$h(left, right) {
|
|
5965
5978
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
5966
5979
|
return !!right[Symbol.hasInstance](left);
|
|
5967
5980
|
} else {
|
|
@@ -6024,7 +6037,7 @@ function _create_super$c(Derived) {
|
|
|
6024
6037
|
return _possible_constructor_return$c(this, result);
|
|
6025
6038
|
};
|
|
6026
6039
|
}
|
|
6027
|
-
function _ts_generator$
|
|
6040
|
+
function _ts_generator$j(thisArg, body) {
|
|
6028
6041
|
var f, y, t, g, _ = {
|
|
6029
6042
|
label: 0,
|
|
6030
6043
|
sent: function() {
|
|
@@ -6190,16 +6203,10 @@ function _ts_generator$k(thisArg, body) {
|
|
|
6190
6203
|
value: function buildTenantProfiles(cachedAccounts, accountFilter) {
|
|
6191
6204
|
var _this = this;
|
|
6192
6205
|
return cachedAccounts.flatMap(function(accountEntity) {
|
|
6193
|
-
return _this.
|
|
6206
|
+
return _this.getTenantProfilesFromAccountEntity(accountEntity, accountFilter === null || accountFilter === void 0 ? void 0 : accountFilter.tenantId, accountFilter);
|
|
6194
6207
|
});
|
|
6195
6208
|
}
|
|
6196
6209
|
},
|
|
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
|
-
},
|
|
6203
6210
|
{
|
|
6204
6211
|
key: "getTenantedAccountInfoByFilter",
|
|
6205
6212
|
value: function getTenantedAccountInfoByFilter(accountInfo, tokenKeys, tenantProfile, tenantProfileFilter) {
|
|
@@ -6306,7 +6313,7 @@ function _ts_generator$k(thisArg, body) {
|
|
|
6306
6313
|
var _this = this;
|
|
6307
6314
|
return _async_to_generator$j(function() {
|
|
6308
6315
|
var e, _this_commonLogger, _this_commonLogger1, _this_commonLogger2, _this_commonLogger3;
|
|
6309
|
-
return _ts_generator$
|
|
6316
|
+
return _ts_generator$j(this, function(_state) {
|
|
6310
6317
|
switch(_state.label){
|
|
6311
6318
|
case 0:
|
|
6312
6319
|
if (!cacheRecord) {
|
|
@@ -6351,7 +6358,7 @@ function _ts_generator$k(thisArg, body) {
|
|
|
6351
6358
|
case 4:
|
|
6352
6359
|
e = _state.sent();
|
|
6353
6360
|
(_this_commonLogger = _this.commonLogger) === null || _this_commonLogger === void 0 ? void 0 : _this_commonLogger.error("CacheManager.saveCacheRecord: failed");
|
|
6354
|
-
if (_instanceof$
|
|
6361
|
+
if (_instanceof$h(e, Error)) {
|
|
6355
6362
|
(_this_commonLogger1 = _this.commonLogger) === null || _this_commonLogger1 === void 0 ? void 0 : _this_commonLogger1.errorPii("CacheManager.saveCacheRecord: ".concat(e.message), correlationId);
|
|
6356
6363
|
if (e.name === "QuotaExceededError" || e.name === "NS_ERROR_DOM_QUOTA_REACHED" || e.message.includes("exceeded the quota")) {
|
|
6357
6364
|
(_this_commonLogger2 = _this.commonLogger) === null || _this_commonLogger2 === void 0 ? void 0 : _this_commonLogger2.error("CacheManager.saveCacheRecord: exceeded storage quota", correlationId);
|
|
@@ -6381,7 +6388,7 @@ function _ts_generator$k(thisArg, body) {
|
|
|
6381
6388
|
var _this = this;
|
|
6382
6389
|
return _async_to_generator$j(function() {
|
|
6383
6390
|
var accessTokenFilter, tokenKeys, currentScopes, removedAccessTokens;
|
|
6384
|
-
return _ts_generator$
|
|
6391
|
+
return _ts_generator$j(this, function(_state) {
|
|
6385
6392
|
switch(_state.label){
|
|
6386
6393
|
case 0:
|
|
6387
6394
|
accessTokenFilter = {
|
|
@@ -6656,7 +6663,7 @@ function _ts_generator$k(thisArg, body) {
|
|
|
6656
6663
|
var _this = this;
|
|
6657
6664
|
return _async_to_generator$j(function() {
|
|
6658
6665
|
var allAccountKeys, removedAccounts;
|
|
6659
|
-
return _ts_generator$
|
|
6666
|
+
return _ts_generator$j(this, function(_state) {
|
|
6660
6667
|
switch(_state.label){
|
|
6661
6668
|
case 0:
|
|
6662
6669
|
allAccountKeys = _this.getAccountKeys();
|
|
@@ -6687,7 +6694,7 @@ function _ts_generator$k(thisArg, body) {
|
|
|
6687
6694
|
var _this = this;
|
|
6688
6695
|
return _async_to_generator$j(function() {
|
|
6689
6696
|
var account;
|
|
6690
|
-
return _ts_generator$
|
|
6697
|
+
return _ts_generator$j(this, function(_state) {
|
|
6691
6698
|
switch(_state.label){
|
|
6692
6699
|
case 0:
|
|
6693
6700
|
account = _this.getAccount(accountKey, _this.commonLogger);
|
|
@@ -6720,7 +6727,7 @@ function _ts_generator$k(thisArg, body) {
|
|
|
6720
6727
|
var _this = this;
|
|
6721
6728
|
return _async_to_generator$j(function() {
|
|
6722
6729
|
var allTokenKeys, accountId, removedCredentials;
|
|
6723
|
-
return _ts_generator$
|
|
6730
|
+
return _ts_generator$j(this, function(_state) {
|
|
6724
6731
|
switch(_state.label){
|
|
6725
6732
|
case 0:
|
|
6726
6733
|
allTokenKeys = _this.getTokenKeys();
|
|
@@ -6821,7 +6828,7 @@ function _ts_generator$k(thisArg, body) {
|
|
|
6821
6828
|
var _this = this;
|
|
6822
6829
|
return _async_to_generator$j(function() {
|
|
6823
6830
|
var credential, accessTokenWithAuthSchemeEntity, kid;
|
|
6824
|
-
return _ts_generator$
|
|
6831
|
+
return _ts_generator$j(this, function(_state) {
|
|
6825
6832
|
switch(_state.label){
|
|
6826
6833
|
case 0:
|
|
6827
6834
|
credential = _this.getAccessTokenCredential(key);
|
|
@@ -7640,7 +7647,7 @@ function _ts_generator$k(thisArg, body) {
|
|
|
7640
7647
|
key: "clear",
|
|
7641
7648
|
value: function clear() {
|
|
7642
7649
|
return _async_to_generator$j(function() {
|
|
7643
|
-
return _ts_generator$
|
|
7650
|
+
return _ts_generator$j(this, function(_state) {
|
|
7644
7651
|
throw createClientAuthError(methodNotImplemented);
|
|
7645
7652
|
});
|
|
7646
7653
|
})();
|
|
@@ -7719,7 +7726,7 @@ function _object_spread$9(target) {
|
|
|
7719
7726
|
}
|
|
7720
7727
|
return target;
|
|
7721
7728
|
}
|
|
7722
|
-
function _ts_generator$
|
|
7729
|
+
function _ts_generator$i(thisArg, body) {
|
|
7723
7730
|
var f, y, t, g, _ = {
|
|
7724
7731
|
label: 0,
|
|
7725
7732
|
sent: function() {
|
|
@@ -7835,14 +7842,14 @@ var DEFAULT_CACHE_OPTIONS$1 = {
|
|
|
7835
7842
|
var DEFAULT_NETWORK_IMPLEMENTATION = {
|
|
7836
7843
|
sendGetRequestAsync: function sendGetRequestAsync() {
|
|
7837
7844
|
return _async_to_generator$i(function() {
|
|
7838
|
-
return _ts_generator$
|
|
7845
|
+
return _ts_generator$i(this, function(_state) {
|
|
7839
7846
|
throw createClientAuthError(methodNotImplemented);
|
|
7840
7847
|
});
|
|
7841
7848
|
})();
|
|
7842
7849
|
},
|
|
7843
7850
|
sendPostRequestAsync: function sendPostRequestAsync() {
|
|
7844
7851
|
return _async_to_generator$i(function() {
|
|
7845
|
-
return _ts_generator$
|
|
7852
|
+
return _ts_generator$i(this, function(_state) {
|
|
7846
7853
|
throw createClientAuthError(methodNotImplemented);
|
|
7847
7854
|
});
|
|
7848
7855
|
})();
|
|
@@ -8180,14 +8187,14 @@ function _create_class$x(Constructor, protoProps, staticProps) {
|
|
|
8180
8187
|
if (staticProps) _defineProperties$x(Constructor, staticProps);
|
|
8181
8188
|
return Constructor;
|
|
8182
8189
|
}
|
|
8183
|
-
function _instanceof$
|
|
8190
|
+
function _instanceof$g(left, right) {
|
|
8184
8191
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
8185
8192
|
return !!right[Symbol.hasInstance](left);
|
|
8186
8193
|
} else {
|
|
8187
8194
|
return left instanceof right;
|
|
8188
8195
|
}
|
|
8189
8196
|
}
|
|
8190
|
-
function _ts_generator$
|
|
8197
|
+
function _ts_generator$h(thisArg, body) {
|
|
8191
8198
|
var f, y, t, g, _ = {
|
|
8192
8199
|
label: 0,
|
|
8193
8200
|
sent: function() {
|
|
@@ -8303,7 +8310,7 @@ function _ts_generator$i(thisArg, body) {
|
|
|
8303
8310
|
var _this = this;
|
|
8304
8311
|
return _async_to_generator$h(function() {
|
|
8305
8312
|
var response, e;
|
|
8306
|
-
return _ts_generator$
|
|
8313
|
+
return _ts_generator$h(this, function(_state) {
|
|
8307
8314
|
switch(_state.label){
|
|
8308
8315
|
case 0:
|
|
8309
8316
|
ThrottlingUtils.preProcess(_this.cacheManager, thumbprint);
|
|
@@ -8327,7 +8334,7 @@ function _ts_generator$i(thisArg, body) {
|
|
|
8327
8334
|
];
|
|
8328
8335
|
case 3:
|
|
8329
8336
|
e = _state.sent();
|
|
8330
|
-
if (_instanceof$
|
|
8337
|
+
if (_instanceof$g(e, AuthError)) {
|
|
8331
8338
|
throw e;
|
|
8332
8339
|
} else {
|
|
8333
8340
|
throw createClientAuthError(networkError);
|
|
@@ -9045,7 +9052,7 @@ function _create_class$u(Constructor, protoProps, staticProps) {
|
|
|
9045
9052
|
if (staticProps) _defineProperties$u(Constructor, staticProps);
|
|
9046
9053
|
return Constructor;
|
|
9047
9054
|
}
|
|
9048
|
-
function _ts_generator$
|
|
9055
|
+
function _ts_generator$g(thisArg, body) {
|
|
9049
9056
|
var f, y, t, g, _ = {
|
|
9050
9057
|
label: 0,
|
|
9051
9058
|
sent: function() {
|
|
@@ -9206,7 +9213,7 @@ function _ts_generator$h(thisArg, body) {
|
|
|
9206
9213
|
var _this = this;
|
|
9207
9214
|
return _async_to_generator$g(function() {
|
|
9208
9215
|
var _response_body_refresh_token, _response_headers, _this_performanceClient, _this_performanceClient1, response;
|
|
9209
|
-
return _ts_generator$
|
|
9216
|
+
return _ts_generator$g(this, function(_state) {
|
|
9210
9217
|
switch(_state.label){
|
|
9211
9218
|
case 0:
|
|
9212
9219
|
if (queuedEvent) {
|
|
@@ -9247,7 +9254,7 @@ function _ts_generator$h(thisArg, body) {
|
|
|
9247
9254
|
var _this = this;
|
|
9248
9255
|
return _async_to_generator$g(function() {
|
|
9249
9256
|
var _this_performanceClient, cloudInstanceAuthorityUri, cloudInstanceAuthority;
|
|
9250
|
-
return _ts_generator$
|
|
9257
|
+
return _ts_generator$g(this, function(_state) {
|
|
9251
9258
|
switch(_state.label){
|
|
9252
9259
|
case 0:
|
|
9253
9260
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.UpdateTokenEndpointAuthority, correlationId);
|
|
@@ -9628,7 +9635,7 @@ function _object_spread$8(target) {
|
|
|
9628
9635
|
}
|
|
9629
9636
|
return target;
|
|
9630
9637
|
}
|
|
9631
|
-
function _ts_generator$
|
|
9638
|
+
function _ts_generator$f(thisArg, body) {
|
|
9632
9639
|
var f, y, t, g, _ = {
|
|
9633
9640
|
label: 0,
|
|
9634
9641
|
sent: function() {
|
|
@@ -9748,7 +9755,7 @@ function _ts_generator$g(thisArg, body) {
|
|
|
9748
9755
|
var _this = this;
|
|
9749
9756
|
return _async_to_generator$f(function() {
|
|
9750
9757
|
var _this_performanceClient, reqCnf, reqCnfString;
|
|
9751
|
-
return _ts_generator$
|
|
9758
|
+
return _ts_generator$f(this, function(_state) {
|
|
9752
9759
|
switch(_state.label){
|
|
9753
9760
|
case 0:
|
|
9754
9761
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.PopTokenGenerateCnf, request.correlationId);
|
|
@@ -9781,7 +9788,7 @@ function _ts_generator$g(thisArg, body) {
|
|
|
9781
9788
|
var _this = this;
|
|
9782
9789
|
return _async_to_generator$f(function() {
|
|
9783
9790
|
var _this_performanceClient, kidThumbprint;
|
|
9784
|
-
return _ts_generator$
|
|
9791
|
+
return _ts_generator$f(this, function(_state) {
|
|
9785
9792
|
switch(_state.label){
|
|
9786
9793
|
case 0:
|
|
9787
9794
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.PopTokenGenerateKid, request.correlationId);
|
|
@@ -9813,7 +9820,7 @@ function _ts_generator$g(thisArg, body) {
|
|
|
9813
9820
|
*/ function signPopToken(accessToken, keyId, request) {
|
|
9814
9821
|
var _this = this;
|
|
9815
9822
|
return _async_to_generator$f(function() {
|
|
9816
|
-
return _ts_generator$
|
|
9823
|
+
return _ts_generator$f(this, function(_state) {
|
|
9817
9824
|
return [
|
|
9818
9825
|
2,
|
|
9819
9826
|
_this.signPayload(accessToken, keyId, request)
|
|
@@ -9835,7 +9842,7 @@ function _ts_generator$g(thisArg, body) {
|
|
|
9835
9842
|
var _this = this;
|
|
9836
9843
|
return _async_to_generator$f(function() {
|
|
9837
9844
|
var resourceRequestMethod, resourceRequestUri, shrClaims, shrNonce, shrOptions, resourceUrlString, resourceUrlComponents;
|
|
9838
|
-
return _ts_generator$
|
|
9845
|
+
return _ts_generator$f(this, function(_state) {
|
|
9839
9846
|
// Deconstruct request to extract SHR parameters
|
|
9840
9847
|
resourceRequestMethod = request.resourceRequestMethod, resourceRequestUri = request.resourceRequestUri, shrClaims = request.shrClaims, shrNonce = request.shrNonce, shrOptions = request.shrOptions;
|
|
9841
9848
|
resourceUrlString = resourceRequestUri ? new UrlString(resourceRequestUri) : undefined;
|
|
@@ -9964,7 +9971,7 @@ function _create_class$q(Constructor, protoProps, staticProps) {
|
|
|
9964
9971
|
if (staticProps) _defineProperties$q(Constructor, staticProps);
|
|
9965
9972
|
return Constructor;
|
|
9966
9973
|
}
|
|
9967
|
-
function _ts_generator$
|
|
9974
|
+
function _ts_generator$e(thisArg, body) {
|
|
9968
9975
|
var f, y, t, g, _ = {
|
|
9969
9976
|
label: 0,
|
|
9970
9977
|
sent: function() {
|
|
@@ -10160,7 +10167,7 @@ function _ts_generator$f(thisArg, body) {
|
|
|
10160
10167
|
var _this = this;
|
|
10161
10168
|
return _async_to_generator$e(function() {
|
|
10162
10169
|
var _this_performanceClient, idTokenClaims, authTime, requestStateObj, cacheRecord, cacheContext, key, account;
|
|
10163
|
-
return _ts_generator$
|
|
10170
|
+
return _ts_generator$e(this, function(_state) {
|
|
10164
10171
|
switch(_state.label){
|
|
10165
10172
|
case 0:
|
|
10166
10173
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.HandleServerTokenResponse, serverTokenResponse.correlation_id);
|
|
@@ -10349,7 +10356,7 @@ function _ts_generator$f(thisArg, body) {
|
|
|
10349
10356
|
*/ function generateAuthenticationResult(cryptoObj, authority, cacheRecord, fromTokenCache, request, idTokenClaims, requestState, serverTokenResponse, requestId) {
|
|
10350
10357
|
return _async_to_generator$e(function() {
|
|
10351
10358
|
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;
|
|
10352
|
-
return _ts_generator$
|
|
10359
|
+
return _ts_generator$e(this, function(_state) {
|
|
10353
10360
|
switch(_state.label){
|
|
10354
10361
|
case 0:
|
|
10355
10362
|
accessToken = Constants$1.EMPTY_STRING;
|
|
@@ -10456,10 +10463,11 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
10456
10463
|
nativeAccountId: nativeAccountId
|
|
10457
10464
|
}, authority, base64Decode);
|
|
10458
10465
|
var tenantProfiles = baseAccount.tenantProfiles || [];
|
|
10459
|
-
|
|
10460
|
-
|
|
10466
|
+
var tenantId = claimsTenantId || baseAccount.realm;
|
|
10467
|
+
if (tenantId && !tenantProfiles.find(function(tenantProfile) {
|
|
10468
|
+
return tenantProfile.tenantId === tenantId;
|
|
10461
10469
|
})) {
|
|
10462
|
-
var newTenantProfile =
|
|
10470
|
+
var newTenantProfile = buildTenantProfile(homeAccountId, baseAccount.localAccountId, tenantId, idTokenClaims);
|
|
10463
10471
|
tenantProfiles.push(newTenantProfile);
|
|
10464
10472
|
}
|
|
10465
10473
|
baseAccount.tenantProfiles = tenantProfiles;
|
|
@@ -10618,7 +10626,7 @@ function _create_super$9(Derived) {
|
|
|
10618
10626
|
return _possible_constructor_return$9(this, result);
|
|
10619
10627
|
};
|
|
10620
10628
|
}
|
|
10621
|
-
function _ts_generator$
|
|
10629
|
+
function _ts_generator$d(thisArg, body) {
|
|
10622
10630
|
var f, y, t, g, _ = {
|
|
10623
10631
|
label: 0,
|
|
10624
10632
|
sent: function() {
|
|
@@ -10748,7 +10756,7 @@ function _ts_generator$e(thisArg, body) {
|
|
|
10748
10756
|
var _this = this;
|
|
10749
10757
|
return _async_to_generator$d(function() {
|
|
10750
10758
|
var _this_performanceClient, queryString;
|
|
10751
|
-
return _ts_generator$
|
|
10759
|
+
return _ts_generator$d(this, function(_state) {
|
|
10752
10760
|
switch(_state.label){
|
|
10753
10761
|
case 0:
|
|
10754
10762
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.GetAuthCodeUrl, request.correlationId);
|
|
@@ -10777,7 +10785,7 @@ function _ts_generator$e(thisArg, body) {
|
|
|
10777
10785
|
var _this = this;
|
|
10778
10786
|
return _async_to_generator$d(function() {
|
|
10779
10787
|
var _this_performanceClient, _response_headers, reqTimestamp, response, requestId, responseHandler;
|
|
10780
|
-
return _ts_generator$
|
|
10788
|
+
return _ts_generator$d(this, function(_state) {
|
|
10781
10789
|
switch(_state.label){
|
|
10782
10790
|
case 0:
|
|
10783
10791
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthClientAcquireToken, request.correlationId);
|
|
@@ -10849,7 +10857,7 @@ function _ts_generator$e(thisArg, body) {
|
|
|
10849
10857
|
var _this = this;
|
|
10850
10858
|
return _async_to_generator$d(function() {
|
|
10851
10859
|
var _this_performanceClient, _request_tokenBodyParameters, queryParametersString, endpoint, requestBody, ccsCredential, clientInfo, headers, thumbprint;
|
|
10852
|
-
return _ts_generator$
|
|
10860
|
+
return _ts_generator$d(this, function(_state) {
|
|
10853
10861
|
switch(_state.label){
|
|
10854
10862
|
case 0:
|
|
10855
10863
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthClientExecuteTokenRequest, request.correlationId);
|
|
@@ -10903,7 +10911,7 @@ function _ts_generator$e(thisArg, body) {
|
|
|
10903
10911
|
var _this = this;
|
|
10904
10912
|
return _async_to_generator$d(function() {
|
|
10905
10913
|
var _this_performanceClient, _request_tokenBodyParameters, parameterBuilder, clientAssertion, _, popTokenGenerator, reqCnfData, generatedReqCnfData, correlationId, ccsCred, clientInfo, clientInfo1;
|
|
10906
|
-
return _ts_generator$
|
|
10914
|
+
return _ts_generator$d(this, function(_state) {
|
|
10907
10915
|
switch(_state.label){
|
|
10908
10916
|
case 0:
|
|
10909
10917
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthClientCreateTokenRequestBody, request.correlationId);
|
|
@@ -11056,7 +11064,7 @@ function _ts_generator$e(thisArg, body) {
|
|
|
11056
11064
|
var _this = this;
|
|
11057
11065
|
return _async_to_generator$d(function() {
|
|
11058
11066
|
var _this_performanceClient, _request_extraQueryParameters, parameterBuilder, requestScopes, correlationId, accountSid, accountLoginHintClaim, clientInfo, clientInfo1, clientInfo2, popTokenGenerator, reqCnfData, generatedReqCnfData;
|
|
11059
|
-
return _ts_generator$
|
|
11067
|
+
return _ts_generator$d(this, function(_state) {
|
|
11060
11068
|
switch(_state.label){
|
|
11061
11069
|
case 0:
|
|
11062
11070
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthClientCreateQueryString, request.correlationId);
|
|
@@ -11337,7 +11345,7 @@ function _inherits$8(subClass, superClass) {
|
|
|
11337
11345
|
});
|
|
11338
11346
|
if (superClass) _set_prototype_of$8(subClass, superClass);
|
|
11339
11347
|
}
|
|
11340
|
-
function _instanceof$
|
|
11348
|
+
function _instanceof$f(left, right) {
|
|
11341
11349
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
11342
11350
|
return !!right[Symbol.hasInstance](left);
|
|
11343
11351
|
} else {
|
|
@@ -11424,7 +11432,7 @@ function _create_super$8(Derived) {
|
|
|
11424
11432
|
return _possible_constructor_return$8(this, result);
|
|
11425
11433
|
};
|
|
11426
11434
|
}
|
|
11427
|
-
function _ts_generator$
|
|
11435
|
+
function _ts_generator$c(thisArg, body) {
|
|
11428
11436
|
var f, y, t, g, _ = {
|
|
11429
11437
|
label: 0,
|
|
11430
11438
|
sent: function() {
|
|
@@ -11540,7 +11548,7 @@ function _ts_generator$d(thisArg, body) {
|
|
|
11540
11548
|
var _this = this;
|
|
11541
11549
|
return _async_to_generator$c(function() {
|
|
11542
11550
|
var _this_performanceClient, _response_headers, reqTimestamp, response, requestId, responseHandler;
|
|
11543
|
-
return _ts_generator$
|
|
11551
|
+
return _ts_generator$c(this, function(_state) {
|
|
11544
11552
|
switch(_state.label){
|
|
11545
11553
|
case 0:
|
|
11546
11554
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
|
|
@@ -11573,7 +11581,7 @@ function _ts_generator$d(thisArg, body) {
|
|
|
11573
11581
|
var _this = this;
|
|
11574
11582
|
return _async_to_generator$c(function() {
|
|
11575
11583
|
var _this_performanceClient, isFOCI, e, noFamilyRTInCache, clientMismatchErrorWithFamilyRT;
|
|
11576
|
-
return _ts_generator$
|
|
11584
|
+
return _ts_generator$c(this, function(_state) {
|
|
11577
11585
|
switch(_state.label){
|
|
11578
11586
|
case 0:
|
|
11579
11587
|
// Cannot renew token if no request object is given.
|
|
@@ -11610,8 +11618,8 @@ function _ts_generator$d(thisArg, body) {
|
|
|
11610
11618
|
];
|
|
11611
11619
|
case 3:
|
|
11612
11620
|
e = _state.sent();
|
|
11613
|
-
noFamilyRTInCache = _instanceof$
|
|
11614
|
-
clientMismatchErrorWithFamilyRT = _instanceof$
|
|
11621
|
+
noFamilyRTInCache = _instanceof$f(e, InteractionRequiredAuthError) && e.errorCode === noTokensFound;
|
|
11622
|
+
clientMismatchErrorWithFamilyRT = _instanceof$f(e, ServerError) && e.errorCode === Errors.INVALID_GRANT_ERROR && e.subError === Errors.CLIENT_MISMATCH_ERROR;
|
|
11615
11623
|
// if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART)
|
|
11616
11624
|
if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) {
|
|
11617
11625
|
return [
|
|
@@ -11642,7 +11650,7 @@ function _ts_generator$d(thisArg, body) {
|
|
|
11642
11650
|
var _this = this;
|
|
11643
11651
|
return _async_to_generator$c(function() {
|
|
11644
11652
|
var _this_performanceClient, refreshToken, refreshTokenRequest, e, badRefreshTokenKey;
|
|
11645
|
-
return _ts_generator$
|
|
11653
|
+
return _ts_generator$c(this, function(_state) {
|
|
11646
11654
|
switch(_state.label){
|
|
11647
11655
|
case 0:
|
|
11648
11656
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, request.correlationId);
|
|
@@ -11682,7 +11690,7 @@ function _ts_generator$d(thisArg, body) {
|
|
|
11682
11690
|
];
|
|
11683
11691
|
case 3:
|
|
11684
11692
|
e = _state.sent();
|
|
11685
|
-
if (_instanceof$
|
|
11693
|
+
if (_instanceof$f(e, InteractionRequiredAuthError) && e.subError === badToken) {
|
|
11686
11694
|
// Remove bad refresh token from cache
|
|
11687
11695
|
_this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");
|
|
11688
11696
|
badRefreshTokenKey = generateCredentialKey(refreshToken);
|
|
@@ -11708,7 +11716,7 @@ function _ts_generator$d(thisArg, body) {
|
|
|
11708
11716
|
var _this = this;
|
|
11709
11717
|
return _async_to_generator$c(function() {
|
|
11710
11718
|
var _this_performanceClient, _request_tokenBodyParameters, queryParametersString, endpoint, requestBody, headers, thumbprint;
|
|
11711
|
-
return _ts_generator$
|
|
11719
|
+
return _ts_generator$c(this, function(_state) {
|
|
11712
11720
|
switch(_state.label){
|
|
11713
11721
|
case 0:
|
|
11714
11722
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RefreshTokenClientExecuteTokenRequest, request.correlationId);
|
|
@@ -11750,7 +11758,7 @@ function _ts_generator$d(thisArg, body) {
|
|
|
11750
11758
|
var _this = this;
|
|
11751
11759
|
return _async_to_generator$c(function() {
|
|
11752
11760
|
var _this_performanceClient, _request_tokenBodyParameters, _this_config_authOptions_authority_options_OIDCOptions, correlationId, parameterBuilder, clientAssertion, _, popTokenGenerator, reqCnfData, generatedReqCnfData, clientInfo;
|
|
11753
|
-
return _ts_generator$
|
|
11761
|
+
return _ts_generator$c(this, function(_state) {
|
|
11754
11762
|
switch(_state.label){
|
|
11755
11763
|
case 0:
|
|
11756
11764
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, request.correlationId);
|
|
@@ -11962,7 +11970,7 @@ function _inherits$7(subClass, superClass) {
|
|
|
11962
11970
|
});
|
|
11963
11971
|
if (superClass) _set_prototype_of$7(subClass, superClass);
|
|
11964
11972
|
}
|
|
11965
|
-
function _instanceof$
|
|
11973
|
+
function _instanceof$e(left, right) {
|
|
11966
11974
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
11967
11975
|
return !!right[Symbol.hasInstance](left);
|
|
11968
11976
|
} else {
|
|
@@ -12096,7 +12104,7 @@ function _create_super$7(Derived) {
|
|
|
12096
12104
|
return _possible_constructor_return$7(this, result);
|
|
12097
12105
|
};
|
|
12098
12106
|
}
|
|
12099
|
-
function _ts_generator$
|
|
12107
|
+
function _ts_generator$b(thisArg, body) {
|
|
12100
12108
|
var f, y, t, g, _ = {
|
|
12101
12109
|
label: 0,
|
|
12102
12110
|
sent: function() {
|
|
@@ -12212,7 +12220,7 @@ function _ts_generator$c(thisArg, body) {
|
|
|
12212
12220
|
var _this = this;
|
|
12213
12221
|
return _async_to_generator$b(function() {
|
|
12214
12222
|
var _request_scopes, _ref, authResponse, cacheOutcome, refreshTokenClient, e, refreshTokenClient1;
|
|
12215
|
-
return _ts_generator$
|
|
12223
|
+
return _ts_generator$b(this, function(_state) {
|
|
12216
12224
|
switch(_state.label){
|
|
12217
12225
|
case 0:
|
|
12218
12226
|
_state.trys.push([
|
|
@@ -12248,7 +12256,7 @@ function _ts_generator$c(thisArg, body) {
|
|
|
12248
12256
|
];
|
|
12249
12257
|
case 2:
|
|
12250
12258
|
e = _state.sent();
|
|
12251
|
-
if (_instanceof$
|
|
12259
|
+
if (_instanceof$e(e, ClientAuthError) && e.errorCode === tokenRefreshRequired) {
|
|
12252
12260
|
refreshTokenClient1 = new RefreshTokenClient(_this.config, _this.performanceClient);
|
|
12253
12261
|
return [
|
|
12254
12262
|
2,
|
|
@@ -12275,7 +12283,7 @@ function _ts_generator$c(thisArg, body) {
|
|
|
12275
12283
|
var _this = this;
|
|
12276
12284
|
return _async_to_generator$b(function() {
|
|
12277
12285
|
var _this_performanceClient, lastCacheOutcome, requestTenantId, tokenKeys, cachedAccessToken, environment, cacheRecord;
|
|
12278
|
-
return _ts_generator$
|
|
12286
|
+
return _ts_generator$b(this, function(_state) {
|
|
12279
12287
|
switch(_state.label){
|
|
12280
12288
|
case 0:
|
|
12281
12289
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.SilentFlowClientAcquireCachedToken, request.correlationId);
|
|
@@ -12356,7 +12364,7 @@ function _ts_generator$c(thisArg, body) {
|
|
|
12356
12364
|
var _this = this;
|
|
12357
12365
|
return _async_to_generator$b(function() {
|
|
12358
12366
|
var _this_performanceClient, idTokenClaims, authTime;
|
|
12359
|
-
return _ts_generator$
|
|
12367
|
+
return _ts_generator$b(this, function(_state) {
|
|
12360
12368
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, request.correlationId);
|
|
12361
12369
|
if (cacheRecord.idToken) {
|
|
12362
12370
|
idTokenClaims = extractTokenClaims(cacheRecord.idToken.secret, _this.config.cryptoInterface.base64Decode);
|
|
@@ -12400,7 +12408,7 @@ function _create_class$m(Constructor, protoProps, staticProps) {
|
|
|
12400
12408
|
if (staticProps) _defineProperties$m(Constructor, staticProps);
|
|
12401
12409
|
return Constructor;
|
|
12402
12410
|
}
|
|
12403
|
-
function _instanceof$
|
|
12411
|
+
function _instanceof$d(left, right) {
|
|
12404
12412
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
12405
12413
|
return !!right[Symbol.hasInstance](left);
|
|
12406
12414
|
} else {
|
|
@@ -12483,8 +12491,8 @@ function _instanceof$e(left, right) {
|
|
|
12483
12491
|
lastRequests.errors.shift();
|
|
12484
12492
|
}
|
|
12485
12493
|
lastRequests.failedRequests.push(this.apiId, this.correlationId);
|
|
12486
|
-
if (_instanceof$
|
|
12487
|
-
if (_instanceof$
|
|
12494
|
+
if (_instanceof$d(error, Error) && !!error && error.toString()) {
|
|
12495
|
+
if (_instanceof$d(error, AuthError)) {
|
|
12488
12496
|
if (error.subError) {
|
|
12489
12497
|
lastRequests.errors.push(error.subError);
|
|
12490
12498
|
} else if (error.errorCode) {
|
|
@@ -12886,6 +12894,8 @@ var ProxyStatus = {
|
|
|
12886
12894
|
*/ var JwtConstants = {
|
|
12887
12895
|
ALGORITHM: "alg",
|
|
12888
12896
|
RSA_256: "RS256",
|
|
12897
|
+
PSS_256: "PS256",
|
|
12898
|
+
X5T_256: "x5t#S256",
|
|
12889
12899
|
X5T: "x5t",
|
|
12890
12900
|
X5C: "x5c",
|
|
12891
12901
|
AUDIENCE: "aud",
|
|
@@ -13095,7 +13105,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
13095
13105
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
13096
13106
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
|
|
13097
13107
|
}
|
|
13098
|
-
function _ts_generator$
|
|
13108
|
+
function _ts_generator$a(thisArg, body) {
|
|
13099
13109
|
var f, y, t, g, _ = {
|
|
13100
13110
|
label: 0,
|
|
13101
13111
|
sent: function() {
|
|
@@ -13211,7 +13221,7 @@ function _ts_generator$b(thisArg, body) {
|
|
|
13211
13221
|
*/ function sendGetRequestAsync(url, options, timeout) {
|
|
13212
13222
|
var _this = this;
|
|
13213
13223
|
return _async_to_generator$a(function() {
|
|
13214
|
-
return _ts_generator$
|
|
13224
|
+
return _ts_generator$a(this, function(_state) {
|
|
13215
13225
|
if (_this.proxyUrl) {
|
|
13216
13226
|
return [
|
|
13217
13227
|
2,
|
|
@@ -13236,7 +13246,7 @@ function _ts_generator$b(thisArg, body) {
|
|
|
13236
13246
|
*/ function sendPostRequestAsync(url, options) {
|
|
13237
13247
|
var _this = this;
|
|
13238
13248
|
return _async_to_generator$a(function() {
|
|
13239
|
-
return _ts_generator$
|
|
13249
|
+
return _ts_generator$a(this, function(_state) {
|
|
13240
13250
|
if (_this.proxyUrl) {
|
|
13241
13251
|
return [
|
|
13242
13252
|
2,
|
|
@@ -13608,78 +13618,282 @@ function createManagedIdentityError(errorCode) {
|
|
|
13608
13618
|
return new ManagedIdentityError(errorCode);
|
|
13609
13619
|
}
|
|
13610
13620
|
|
|
13611
|
-
function
|
|
13612
|
-
if (
|
|
13613
|
-
|
|
13614
|
-
value: value,
|
|
13615
|
-
enumerable: true,
|
|
13616
|
-
configurable: true,
|
|
13617
|
-
writable: true
|
|
13618
|
-
});
|
|
13619
|
-
} else {
|
|
13620
|
-
obj[key] = value;
|
|
13621
|
+
function _assert_this_initialized$5(self) {
|
|
13622
|
+
if (self === void 0) {
|
|
13623
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
13621
13624
|
}
|
|
13622
|
-
return
|
|
13625
|
+
return self;
|
|
13623
13626
|
}
|
|
13624
|
-
function
|
|
13625
|
-
|
|
13626
|
-
|
|
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
|
-
});
|
|
13627
|
+
function _class_call_check$i(instance, Constructor) {
|
|
13628
|
+
if (!(instance instanceof Constructor)) {
|
|
13629
|
+
throw new TypeError("Cannot call a class as a function");
|
|
13636
13630
|
}
|
|
13637
|
-
return target;
|
|
13638
13631
|
}
|
|
13639
|
-
function
|
|
13640
|
-
var
|
|
13641
|
-
|
|
13642
|
-
|
|
13643
|
-
|
|
13644
|
-
|
|
13645
|
-
|
|
13646
|
-
|
|
13632
|
+
function _defineProperties$i(target, props) {
|
|
13633
|
+
for(var i = 0; i < props.length; i++){
|
|
13634
|
+
var descriptor = props[i];
|
|
13635
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
13636
|
+
descriptor.configurable = true;
|
|
13637
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
13638
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
13639
|
+
}
|
|
13640
|
+
}
|
|
13641
|
+
function _create_class$i(Constructor, protoProps, staticProps) {
|
|
13642
|
+
if (protoProps) _defineProperties$i(Constructor.prototype, protoProps);
|
|
13643
|
+
if (staticProps) _defineProperties$i(Constructor, staticProps);
|
|
13644
|
+
return Constructor;
|
|
13645
|
+
}
|
|
13646
|
+
function _get_prototype_of$5(o) {
|
|
13647
|
+
_get_prototype_of$5 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
13648
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
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
|
|
13647
13661
|
}
|
|
13648
|
-
|
|
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;
|
|
13649
13668
|
}
|
|
13650
|
-
return
|
|
13669
|
+
return _assert_this_initialized$5(self);
|
|
13651
13670
|
}
|
|
13652
|
-
function
|
|
13653
|
-
|
|
13654
|
-
|
|
13655
|
-
|
|
13656
|
-
}
|
|
13657
|
-
|
|
13658
|
-
|
|
13659
|
-
|
|
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;
|
|
13681
|
+
}
|
|
13682
|
+
function _is_native_reflect_construct$5() {
|
|
13683
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
13684
|
+
if (Reflect.construct.sham) return false;
|
|
13685
|
+
if (typeof Proxy === "function") return true;
|
|
13686
|
+
try {
|
|
13687
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
13688
|
+
return true;
|
|
13689
|
+
} catch (e) {
|
|
13690
|
+
return false;
|
|
13660
13691
|
}
|
|
13661
|
-
|
|
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
|
+
};
|
|
13662
13705
|
}
|
|
13663
13706
|
/*
|
|
13664
13707
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13665
13708
|
* Licensed under the MIT License.
|
|
13666
|
-
*/
|
|
13667
|
-
|
|
13668
|
-
|
|
13669
|
-
|
|
13670
|
-
|
|
13671
|
-
|
|
13672
|
-
thumbprint: Constants$1.EMPTY_STRING,
|
|
13673
|
-
privateKey: Constants$1.EMPTY_STRING,
|
|
13674
|
-
x5c: Constants$1.EMPTY_STRING
|
|
13709
|
+
*/ /**
|
|
13710
|
+
* NodeAuthErrorMessage class containing string constants used by error codes and messages.
|
|
13711
|
+
*/ var NodeAuthErrorMessage = {
|
|
13712
|
+
invalidLoopbackAddressType: {
|
|
13713
|
+
code: "invalid_loopback_server_address_type",
|
|
13714
|
+
desc: "Loopback server address is not type string. This is unexpected."
|
|
13675
13715
|
},
|
|
13676
|
-
|
|
13677
|
-
|
|
13678
|
-
|
|
13679
|
-
|
|
13680
|
-
|
|
13681
|
-
|
|
13682
|
-
|
|
13716
|
+
unableToLoadRedirectUri: {
|
|
13717
|
+
code: "unable_to_load_redirectUrl",
|
|
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
|
|
13889
|
+
},
|
|
13890
|
+
knownAuthorities: [],
|
|
13891
|
+
cloudDiscoveryMetadata: Constants$1.EMPTY_STRING,
|
|
13892
|
+
authorityMetadata: Constants$1.EMPTY_STRING,
|
|
13893
|
+
clientCapabilities: [],
|
|
13894
|
+
protocolMode: ProtocolMode.AAD,
|
|
13895
|
+
azureCloudOptions: {
|
|
13896
|
+
azureCloudInstance: AzureCloudInstance.None,
|
|
13683
13897
|
tenant: Constants$1.EMPTY_STRING
|
|
13684
13898
|
},
|
|
13685
13899
|
skipAuthorityMetadataCache: false
|
|
@@ -13724,6 +13938,10 @@ var DEFAULT_TELEMETRY_OPTIONS = {
|
|
|
13724
13938
|
loggerOptions: (system === null || system === void 0 ? void 0 : system.loggerOptions) || DEFAULT_LOGGER_OPTIONS,
|
|
13725
13939
|
disableInternalRetries: (system === null || system === void 0 ? void 0 : system.disableInternalRetries) || false
|
|
13726
13940
|
});
|
|
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
|
+
}
|
|
13727
13945
|
return {
|
|
13728
13946
|
auth: _object_spread$4({}, DEFAULT_AUTH_OPTIONS, auth),
|
|
13729
13947
|
broker: _object_spread$4({}, broker),
|
|
@@ -13794,12 +14012,12 @@ function v4(options, buf, offset) {
|
|
|
13794
14012
|
return stringify(rnds);
|
|
13795
14013
|
}
|
|
13796
14014
|
|
|
13797
|
-
function _class_call_check$
|
|
14015
|
+
function _class_call_check$h(instance, Constructor) {
|
|
13798
14016
|
if (!(instance instanceof Constructor)) {
|
|
13799
14017
|
throw new TypeError("Cannot call a class as a function");
|
|
13800
14018
|
}
|
|
13801
14019
|
}
|
|
13802
|
-
function _defineProperties$
|
|
14020
|
+
function _defineProperties$h(target, props) {
|
|
13803
14021
|
for(var i = 0; i < props.length; i++){
|
|
13804
14022
|
var descriptor = props[i];
|
|
13805
14023
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -13808,9 +14026,9 @@ function _defineProperties$i(target, props) {
|
|
|
13808
14026
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
13809
14027
|
}
|
|
13810
14028
|
}
|
|
13811
|
-
function _create_class$
|
|
13812
|
-
if (protoProps) _defineProperties$
|
|
13813
|
-
if (staticProps) _defineProperties$
|
|
14029
|
+
function _create_class$h(Constructor, protoProps, staticProps) {
|
|
14030
|
+
if (protoProps) _defineProperties$h(Constructor.prototype, protoProps);
|
|
14031
|
+
if (staticProps) _defineProperties$h(Constructor, staticProps);
|
|
13814
14032
|
return Constructor;
|
|
13815
14033
|
}
|
|
13816
14034
|
/*
|
|
@@ -13818,9 +14036,9 @@ function _create_class$i(Constructor, protoProps, staticProps) {
|
|
|
13818
14036
|
* Licensed under the MIT License.
|
|
13819
14037
|
*/ var GuidGenerator = /*#__PURE__*/ function() {
|
|
13820
14038
|
function GuidGenerator() {
|
|
13821
|
-
_class_call_check$
|
|
14039
|
+
_class_call_check$h(this, GuidGenerator);
|
|
13822
14040
|
}
|
|
13823
|
-
_create_class$
|
|
14041
|
+
_create_class$h(GuidGenerator, [
|
|
13824
14042
|
{
|
|
13825
14043
|
/**
|
|
13826
14044
|
*
|
|
@@ -13845,12 +14063,12 @@ function _create_class$i(Constructor, protoProps, staticProps) {
|
|
|
13845
14063
|
return GuidGenerator;
|
|
13846
14064
|
}();
|
|
13847
14065
|
|
|
13848
|
-
function _class_call_check$
|
|
14066
|
+
function _class_call_check$g(instance, Constructor) {
|
|
13849
14067
|
if (!(instance instanceof Constructor)) {
|
|
13850
14068
|
throw new TypeError("Cannot call a class as a function");
|
|
13851
14069
|
}
|
|
13852
14070
|
}
|
|
13853
|
-
function _defineProperties$
|
|
14071
|
+
function _defineProperties$g(target, props) {
|
|
13854
14072
|
for(var i = 0; i < props.length; i++){
|
|
13855
14073
|
var descriptor = props[i];
|
|
13856
14074
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -13859,9 +14077,9 @@ function _defineProperties$h(target, props) {
|
|
|
13859
14077
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
13860
14078
|
}
|
|
13861
14079
|
}
|
|
13862
|
-
function _create_class$
|
|
13863
|
-
if (protoProps) _defineProperties$
|
|
13864
|
-
if (staticProps) _defineProperties$
|
|
14080
|
+
function _create_class$g(Constructor, protoProps, staticProps) {
|
|
14081
|
+
if (protoProps) _defineProperties$g(Constructor.prototype, protoProps);
|
|
14082
|
+
if (staticProps) _defineProperties$g(Constructor, staticProps);
|
|
13865
14083
|
return Constructor;
|
|
13866
14084
|
}
|
|
13867
14085
|
/*
|
|
@@ -13869,9 +14087,9 @@ function _create_class$h(Constructor, protoProps, staticProps) {
|
|
|
13869
14087
|
* Licensed under the MIT License.
|
|
13870
14088
|
*/ var EncodingUtils = /*#__PURE__*/ function() {
|
|
13871
14089
|
function EncodingUtils() {
|
|
13872
|
-
_class_call_check$
|
|
14090
|
+
_class_call_check$g(this, EncodingUtils);
|
|
13873
14091
|
}
|
|
13874
|
-
_create_class$
|
|
14092
|
+
_create_class$g(EncodingUtils, null, [
|
|
13875
14093
|
{
|
|
13876
14094
|
key: "base64Encode",
|
|
13877
14095
|
value: /**
|
|
@@ -13919,12 +14137,12 @@ function _create_class$h(Constructor, protoProps, staticProps) {
|
|
|
13919
14137
|
return EncodingUtils;
|
|
13920
14138
|
}();
|
|
13921
14139
|
|
|
13922
|
-
function _class_call_check$
|
|
14140
|
+
function _class_call_check$f(instance, Constructor) {
|
|
13923
14141
|
if (!(instance instanceof Constructor)) {
|
|
13924
14142
|
throw new TypeError("Cannot call a class as a function");
|
|
13925
14143
|
}
|
|
13926
14144
|
}
|
|
13927
|
-
function _defineProperties$
|
|
14145
|
+
function _defineProperties$f(target, props) {
|
|
13928
14146
|
for(var i = 0; i < props.length; i++){
|
|
13929
14147
|
var descriptor = props[i];
|
|
13930
14148
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -13933,9 +14151,9 @@ function _defineProperties$g(target, props) {
|
|
|
13933
14151
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
13934
14152
|
}
|
|
13935
14153
|
}
|
|
13936
|
-
function _create_class$
|
|
13937
|
-
if (protoProps) _defineProperties$
|
|
13938
|
-
if (staticProps) _defineProperties$
|
|
14154
|
+
function _create_class$f(Constructor, protoProps, staticProps) {
|
|
14155
|
+
if (protoProps) _defineProperties$f(Constructor.prototype, protoProps);
|
|
14156
|
+
if (staticProps) _defineProperties$f(Constructor, staticProps);
|
|
13939
14157
|
return Constructor;
|
|
13940
14158
|
}
|
|
13941
14159
|
/*
|
|
@@ -13943,9 +14161,9 @@ function _create_class$g(Constructor, protoProps, staticProps) {
|
|
|
13943
14161
|
* Licensed under the MIT License.
|
|
13944
14162
|
*/ var HashUtils = /*#__PURE__*/ function() {
|
|
13945
14163
|
function HashUtils() {
|
|
13946
|
-
_class_call_check$
|
|
14164
|
+
_class_call_check$f(this, HashUtils);
|
|
13947
14165
|
}
|
|
13948
|
-
_create_class$
|
|
14166
|
+
_create_class$f(HashUtils, [
|
|
13949
14167
|
{
|
|
13950
14168
|
/**
|
|
13951
14169
|
* generate 'SHA256' hash
|
|
@@ -13988,12 +14206,12 @@ function _async_to_generator$9(fn) {
|
|
|
13988
14206
|
});
|
|
13989
14207
|
};
|
|
13990
14208
|
}
|
|
13991
|
-
function _class_call_check$
|
|
14209
|
+
function _class_call_check$e(instance, Constructor) {
|
|
13992
14210
|
if (!(instance instanceof Constructor)) {
|
|
13993
14211
|
throw new TypeError("Cannot call a class as a function");
|
|
13994
14212
|
}
|
|
13995
14213
|
}
|
|
13996
|
-
function _defineProperties$
|
|
14214
|
+
function _defineProperties$e(target, props) {
|
|
13997
14215
|
for(var i = 0; i < props.length; i++){
|
|
13998
14216
|
var descriptor = props[i];
|
|
13999
14217
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -14002,12 +14220,12 @@ function _defineProperties$f(target, props) {
|
|
|
14002
14220
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14003
14221
|
}
|
|
14004
14222
|
}
|
|
14005
|
-
function _create_class$
|
|
14006
|
-
if (protoProps) _defineProperties$
|
|
14007
|
-
if (staticProps) _defineProperties$
|
|
14223
|
+
function _create_class$e(Constructor, protoProps, staticProps) {
|
|
14224
|
+
if (protoProps) _defineProperties$e(Constructor.prototype, protoProps);
|
|
14225
|
+
if (staticProps) _defineProperties$e(Constructor, staticProps);
|
|
14008
14226
|
return Constructor;
|
|
14009
14227
|
}
|
|
14010
|
-
function _ts_generator$
|
|
14228
|
+
function _ts_generator$9(thisArg, body) {
|
|
14011
14229
|
var f, y, t, g, _ = {
|
|
14012
14230
|
label: 0,
|
|
14013
14231
|
sent: function() {
|
|
@@ -14109,10 +14327,10 @@ function _ts_generator$a(thisArg, body) {
|
|
|
14109
14327
|
* https://tools.ietf.org/html/rfc7636#page-8
|
|
14110
14328
|
*/ var PkceGenerator = /*#__PURE__*/ function() {
|
|
14111
14329
|
function PkceGenerator() {
|
|
14112
|
-
_class_call_check$
|
|
14330
|
+
_class_call_check$e(this, PkceGenerator);
|
|
14113
14331
|
this.hashUtils = new HashUtils();
|
|
14114
14332
|
}
|
|
14115
|
-
_create_class$
|
|
14333
|
+
_create_class$e(PkceGenerator, [
|
|
14116
14334
|
{
|
|
14117
14335
|
key: "generatePkceCodes",
|
|
14118
14336
|
value: /**
|
|
@@ -14122,7 +14340,7 @@ function _ts_generator$a(thisArg, body) {
|
|
|
14122
14340
|
var _this = this;
|
|
14123
14341
|
return _async_to_generator$9(function() {
|
|
14124
14342
|
var verifier, challenge;
|
|
14125
|
-
return _ts_generator$
|
|
14343
|
+
return _ts_generator$9(this, function(_state) {
|
|
14126
14344
|
verifier = _this.generateCodeVerifier();
|
|
14127
14345
|
challenge = _this.generateCodeChallengeFromVerifier(verifier);
|
|
14128
14346
|
return [
|
|
@@ -14197,12 +14415,12 @@ function _async_to_generator$8(fn) {
|
|
|
14197
14415
|
});
|
|
14198
14416
|
};
|
|
14199
14417
|
}
|
|
14200
|
-
function _class_call_check$
|
|
14418
|
+
function _class_call_check$d(instance, Constructor) {
|
|
14201
14419
|
if (!(instance instanceof Constructor)) {
|
|
14202
14420
|
throw new TypeError("Cannot call a class as a function");
|
|
14203
14421
|
}
|
|
14204
14422
|
}
|
|
14205
|
-
function _defineProperties$
|
|
14423
|
+
function _defineProperties$d(target, props) {
|
|
14206
14424
|
for(var i = 0; i < props.length; i++){
|
|
14207
14425
|
var descriptor = props[i];
|
|
14208
14426
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -14211,12 +14429,12 @@ function _defineProperties$e(target, props) {
|
|
|
14211
14429
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14212
14430
|
}
|
|
14213
14431
|
}
|
|
14214
|
-
function _create_class$
|
|
14215
|
-
if (protoProps) _defineProperties$
|
|
14216
|
-
if (staticProps) _defineProperties$
|
|
14432
|
+
function _create_class$d(Constructor, protoProps, staticProps) {
|
|
14433
|
+
if (protoProps) _defineProperties$d(Constructor.prototype, protoProps);
|
|
14434
|
+
if (staticProps) _defineProperties$d(Constructor, staticProps);
|
|
14217
14435
|
return Constructor;
|
|
14218
14436
|
}
|
|
14219
|
-
function _ts_generator$
|
|
14437
|
+
function _ts_generator$8(thisArg, body) {
|
|
14220
14438
|
var f, y, t, g, _ = {
|
|
14221
14439
|
label: 0,
|
|
14222
14440
|
sent: function() {
|
|
@@ -14320,13 +14538,13 @@ function _ts_generator$9(thisArg, body) {
|
|
|
14320
14538
|
* @public
|
|
14321
14539
|
*/ var CryptoProvider = /*#__PURE__*/ function() {
|
|
14322
14540
|
function CryptoProvider() {
|
|
14323
|
-
_class_call_check$
|
|
14541
|
+
_class_call_check$d(this, CryptoProvider);
|
|
14324
14542
|
// Browser crypto needs to be validated first before any other classes can be set.
|
|
14325
14543
|
this.pkceGenerator = new PkceGenerator();
|
|
14326
14544
|
this.guidGenerator = new GuidGenerator();
|
|
14327
14545
|
this.hashUtils = new HashUtils();
|
|
14328
14546
|
}
|
|
14329
|
-
_create_class$
|
|
14547
|
+
_create_class$d(CryptoProvider, [
|
|
14330
14548
|
{
|
|
14331
14549
|
/**
|
|
14332
14550
|
* base64 URL safe encoded string
|
|
@@ -14420,7 +14638,7 @@ function _ts_generator$9(thisArg, body) {
|
|
|
14420
14638
|
*/ function hashString(plainText) {
|
|
14421
14639
|
var _this = this;
|
|
14422
14640
|
return _async_to_generator$8(function() {
|
|
14423
|
-
return _ts_generator$
|
|
14641
|
+
return _ts_generator$8(this, function(_state) {
|
|
14424
14642
|
return [
|
|
14425
14643
|
2,
|
|
14426
14644
|
EncodingUtils.base64EncodeUrl(_this.hashUtils.sha256(plainText).toString("base64"), "base64")
|
|
@@ -14441,7 +14659,7 @@ function _array_like_to_array$5(arr, len) {
|
|
|
14441
14659
|
function _array_without_holes$3(arr) {
|
|
14442
14660
|
if (Array.isArray(arr)) return _array_like_to_array$5(arr);
|
|
14443
14661
|
}
|
|
14444
|
-
function _assert_this_initialized$
|
|
14662
|
+
function _assert_this_initialized$4(self) {
|
|
14445
14663
|
if (self === void 0) {
|
|
14446
14664
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
14447
14665
|
}
|
|
@@ -14476,12 +14694,12 @@ function _async_to_generator$7(fn) {
|
|
|
14476
14694
|
});
|
|
14477
14695
|
};
|
|
14478
14696
|
}
|
|
14479
|
-
function _class_call_check$
|
|
14697
|
+
function _class_call_check$c(instance, Constructor) {
|
|
14480
14698
|
if (!(instance instanceof Constructor)) {
|
|
14481
14699
|
throw new TypeError("Cannot call a class as a function");
|
|
14482
14700
|
}
|
|
14483
14701
|
}
|
|
14484
|
-
function _defineProperties$
|
|
14702
|
+
function _defineProperties$c(target, props) {
|
|
14485
14703
|
for(var i = 0; i < props.length; i++){
|
|
14486
14704
|
var descriptor = props[i];
|
|
14487
14705
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -14490,9 +14708,9 @@ function _defineProperties$d(target, props) {
|
|
|
14490
14708
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14491
14709
|
}
|
|
14492
14710
|
}
|
|
14493
|
-
function _create_class$
|
|
14494
|
-
if (protoProps) _defineProperties$
|
|
14495
|
-
if (staticProps) _defineProperties$
|
|
14711
|
+
function _create_class$c(Constructor, protoProps, staticProps) {
|
|
14712
|
+
if (protoProps) _defineProperties$c(Constructor.prototype, protoProps);
|
|
14713
|
+
if (staticProps) _defineProperties$c(Constructor, staticProps);
|
|
14496
14714
|
return Constructor;
|
|
14497
14715
|
}
|
|
14498
14716
|
function _define_property$4(obj, key, value) {
|
|
@@ -14508,13 +14726,13 @@ function _define_property$4(obj, key, value) {
|
|
|
14508
14726
|
}
|
|
14509
14727
|
return obj;
|
|
14510
14728
|
}
|
|
14511
|
-
function _get_prototype_of$
|
|
14512
|
-
_get_prototype_of$
|
|
14729
|
+
function _get_prototype_of$4(o) {
|
|
14730
|
+
_get_prototype_of$4 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
14513
14731
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
14514
14732
|
};
|
|
14515
|
-
return _get_prototype_of$
|
|
14733
|
+
return _get_prototype_of$4(o);
|
|
14516
14734
|
}
|
|
14517
|
-
function _inherits$
|
|
14735
|
+
function _inherits$4(subClass, superClass) {
|
|
14518
14736
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
14519
14737
|
throw new TypeError("Super expression must either be null or a function");
|
|
14520
14738
|
}
|
|
@@ -14525,9 +14743,9 @@ function _inherits$5(subClass, superClass) {
|
|
|
14525
14743
|
configurable: true
|
|
14526
14744
|
}
|
|
14527
14745
|
});
|
|
14528
|
-
if (superClass) _set_prototype_of$
|
|
14746
|
+
if (superClass) _set_prototype_of$4(subClass, superClass);
|
|
14529
14747
|
}
|
|
14530
|
-
function _instanceof$
|
|
14748
|
+
function _instanceof$c(left, right) {
|
|
14531
14749
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
14532
14750
|
return !!right[Symbol.hasInstance](left);
|
|
14533
14751
|
} else {
|
|
@@ -14555,23 +14773,23 @@ function _object_spread$3(target) {
|
|
|
14555
14773
|
}
|
|
14556
14774
|
return target;
|
|
14557
14775
|
}
|
|
14558
|
-
function _possible_constructor_return$
|
|
14559
|
-
if (call && (_type_of$
|
|
14776
|
+
function _possible_constructor_return$4(self, call) {
|
|
14777
|
+
if (call && (_type_of$c(call) === "object" || typeof call === "function")) {
|
|
14560
14778
|
return call;
|
|
14561
14779
|
}
|
|
14562
|
-
return _assert_this_initialized$
|
|
14780
|
+
return _assert_this_initialized$4(self);
|
|
14563
14781
|
}
|
|
14564
|
-
function _set_prototype_of$
|
|
14565
|
-
_set_prototype_of$
|
|
14782
|
+
function _set_prototype_of$4(o, p) {
|
|
14783
|
+
_set_prototype_of$4 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
14566
14784
|
o.__proto__ = p;
|
|
14567
14785
|
return o;
|
|
14568
14786
|
};
|
|
14569
|
-
return _set_prototype_of$
|
|
14787
|
+
return _set_prototype_of$4(o, p);
|
|
14570
14788
|
}
|
|
14571
14789
|
function _to_consumable_array$3(arr) {
|
|
14572
14790
|
return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$3();
|
|
14573
14791
|
}
|
|
14574
|
-
function _type_of$
|
|
14792
|
+
function _type_of$c(obj) {
|
|
14575
14793
|
"@swc/helpers - typeof";
|
|
14576
14794
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
14577
14795
|
}
|
|
@@ -14583,7 +14801,7 @@ function _unsupported_iterable_to_array$5(o, minLen) {
|
|
|
14583
14801
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
14584
14802
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
|
|
14585
14803
|
}
|
|
14586
|
-
function _is_native_reflect_construct$
|
|
14804
|
+
function _is_native_reflect_construct$4() {
|
|
14587
14805
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
14588
14806
|
if (Reflect.construct.sham) return false;
|
|
14589
14807
|
if (typeof Proxy === "function") return true;
|
|
@@ -14594,20 +14812,20 @@ function _is_native_reflect_construct$5() {
|
|
|
14594
14812
|
return false;
|
|
14595
14813
|
}
|
|
14596
14814
|
}
|
|
14597
|
-
function _create_super$
|
|
14598
|
-
var hasNativeReflectConstruct = _is_native_reflect_construct$
|
|
14815
|
+
function _create_super$4(Derived) {
|
|
14816
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct$4();
|
|
14599
14817
|
return function _createSuperInternal() {
|
|
14600
|
-
var Super = _get_prototype_of$
|
|
14818
|
+
var Super = _get_prototype_of$4(Derived), result;
|
|
14601
14819
|
if (hasNativeReflectConstruct) {
|
|
14602
|
-
var NewTarget = _get_prototype_of$
|
|
14820
|
+
var NewTarget = _get_prototype_of$4(this).constructor;
|
|
14603
14821
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
14604
14822
|
} else {
|
|
14605
14823
|
result = Super.apply(this, arguments);
|
|
14606
14824
|
}
|
|
14607
|
-
return _possible_constructor_return$
|
|
14825
|
+
return _possible_constructor_return$4(this, result);
|
|
14608
14826
|
};
|
|
14609
14827
|
}
|
|
14610
|
-
function _ts_generator$
|
|
14828
|
+
function _ts_generator$7(thisArg, body) {
|
|
14611
14829
|
var f, y, t, g, _ = {
|
|
14612
14830
|
label: 0,
|
|
14613
14831
|
sent: function() {
|
|
@@ -14709,10 +14927,10 @@ function _ts_generator$8(thisArg, body) {
|
|
|
14709
14927
|
* This class implements Storage for node, reading cache from user specified storage location or an extension library
|
|
14710
14928
|
* @public
|
|
14711
14929
|
*/ var NodeStorage = /*#__PURE__*/ function(CacheManager) {
|
|
14712
|
-
_inherits$
|
|
14713
|
-
var _super = _create_super$
|
|
14930
|
+
_inherits$4(NodeStorage, CacheManager);
|
|
14931
|
+
var _super = _create_super$4(NodeStorage);
|
|
14714
14932
|
function NodeStorage(logger, clientId, cryptoImpl, staticAuthorityOptions) {
|
|
14715
|
-
_class_call_check$
|
|
14933
|
+
_class_call_check$c(this, NodeStorage);
|
|
14716
14934
|
var _this;
|
|
14717
14935
|
_this = _super.call(this, clientId, cryptoImpl, logger, staticAuthorityOptions);
|
|
14718
14936
|
_this.cache = {};
|
|
@@ -14720,7 +14938,7 @@ function _ts_generator$8(thisArg, body) {
|
|
|
14720
14938
|
_this.logger = logger;
|
|
14721
14939
|
return _this;
|
|
14722
14940
|
}
|
|
14723
|
-
_create_class$
|
|
14941
|
+
_create_class$c(NodeStorage, [
|
|
14724
14942
|
{
|
|
14725
14943
|
/**
|
|
14726
14944
|
* Queue up callbacks
|
|
@@ -14758,7 +14976,7 @@ function _ts_generator$8(thisArg, body) {
|
|
|
14758
14976
|
if (typeof value !== "object") {
|
|
14759
14977
|
continue;
|
|
14760
14978
|
}
|
|
14761
|
-
if (_instanceof$
|
|
14979
|
+
if (_instanceof$c(value, AccountEntity)) {
|
|
14762
14980
|
inMemoryCache.accounts[key] = value;
|
|
14763
14981
|
} else if (isIdTokenEntity(value)) {
|
|
14764
14982
|
inMemoryCache.idTokens[key] = value;
|
|
@@ -15146,7 +15364,7 @@ function _ts_generator$8(thisArg, body) {
|
|
|
15146
15364
|
var _this = this;
|
|
15147
15365
|
return _async_to_generator$7(function() {
|
|
15148
15366
|
var cacheKeys;
|
|
15149
|
-
return _ts_generator$
|
|
15367
|
+
return _ts_generator$7(this, function(_state) {
|
|
15150
15368
|
_this.logger.trace("Clearing cache entries created by MSAL");
|
|
15151
15369
|
// read inMemoryCache
|
|
15152
15370
|
cacheKeys = _this.getKeys();
|
|
@@ -15234,12 +15452,12 @@ function _async_to_generator$6(fn) {
|
|
|
15234
15452
|
});
|
|
15235
15453
|
};
|
|
15236
15454
|
}
|
|
15237
|
-
function _class_call_check$
|
|
15455
|
+
function _class_call_check$b(instance, Constructor) {
|
|
15238
15456
|
if (!(instance instanceof Constructor)) {
|
|
15239
15457
|
throw new TypeError("Cannot call a class as a function");
|
|
15240
15458
|
}
|
|
15241
15459
|
}
|
|
15242
|
-
function _defineProperties$
|
|
15460
|
+
function _defineProperties$b(target, props) {
|
|
15243
15461
|
for(var i = 0; i < props.length; i++){
|
|
15244
15462
|
var descriptor = props[i];
|
|
15245
15463
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -15248,9 +15466,9 @@ function _defineProperties$c(target, props) {
|
|
|
15248
15466
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
15249
15467
|
}
|
|
15250
15468
|
}
|
|
15251
|
-
function _create_class$
|
|
15252
|
-
if (protoProps) _defineProperties$
|
|
15253
|
-
if (staticProps) _defineProperties$
|
|
15469
|
+
function _create_class$b(Constructor, protoProps, staticProps) {
|
|
15470
|
+
if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
|
|
15471
|
+
if (staticProps) _defineProperties$b(Constructor, staticProps);
|
|
15254
15472
|
return Constructor;
|
|
15255
15473
|
}
|
|
15256
15474
|
function _define_property$3(obj, key, value) {
|
|
@@ -15305,7 +15523,7 @@ function _object_spread_props$2(target, source) {
|
|
|
15305
15523
|
}
|
|
15306
15524
|
return target;
|
|
15307
15525
|
}
|
|
15308
|
-
function _ts_generator$
|
|
15526
|
+
function _ts_generator$6(thisArg, body) {
|
|
15309
15527
|
var f, y, t, g, _ = {
|
|
15310
15528
|
label: 0,
|
|
15311
15529
|
sent: function() {
|
|
@@ -15415,7 +15633,7 @@ function _ts_generator$7(thisArg, body) {
|
|
|
15415
15633
|
* @public
|
|
15416
15634
|
*/ var TokenCache = /*#__PURE__*/ function() {
|
|
15417
15635
|
function TokenCache(storage, logger, cachePlugin) {
|
|
15418
|
-
_class_call_check$
|
|
15636
|
+
_class_call_check$b(this, TokenCache);
|
|
15419
15637
|
this.cacheHasChanged = false;
|
|
15420
15638
|
this.storage = storage;
|
|
15421
15639
|
this.storage.registerChangeEmitter(this.handleChangeEvent.bind(this));
|
|
@@ -15424,7 +15642,7 @@ function _ts_generator$7(thisArg, body) {
|
|
|
15424
15642
|
}
|
|
15425
15643
|
this.logger = logger;
|
|
15426
15644
|
}
|
|
15427
|
-
_create_class$
|
|
15645
|
+
_create_class$b(TokenCache, [
|
|
15428
15646
|
{
|
|
15429
15647
|
/**
|
|
15430
15648
|
* Set to true if cache state has changed since last time serialize or writeToPersistence was called
|
|
@@ -15484,7 +15702,7 @@ function _ts_generator$7(thisArg, body) {
|
|
|
15484
15702
|
var _this = this;
|
|
15485
15703
|
return _async_to_generator$6(function() {
|
|
15486
15704
|
var cacheContext;
|
|
15487
|
-
return _ts_generator$
|
|
15705
|
+
return _ts_generator$6(this, function(_state) {
|
|
15488
15706
|
switch(_state.label){
|
|
15489
15707
|
case 0:
|
|
15490
15708
|
_this.logger.trace("getAllAccounts called");
|
|
@@ -15549,7 +15767,7 @@ function _ts_generator$7(thisArg, body) {
|
|
|
15549
15767
|
var _this = this;
|
|
15550
15768
|
return _async_to_generator$6(function() {
|
|
15551
15769
|
var allAccounts;
|
|
15552
|
-
return _ts_generator$
|
|
15770
|
+
return _ts_generator$6(this, function(_state) {
|
|
15553
15771
|
switch(_state.label){
|
|
15554
15772
|
case 0:
|
|
15555
15773
|
return [
|
|
@@ -15587,7 +15805,7 @@ function _ts_generator$7(thisArg, body) {
|
|
|
15587
15805
|
var _this = this;
|
|
15588
15806
|
return _async_to_generator$6(function() {
|
|
15589
15807
|
var allAccounts;
|
|
15590
|
-
return _ts_generator$
|
|
15808
|
+
return _ts_generator$6(this, function(_state) {
|
|
15591
15809
|
switch(_state.label){
|
|
15592
15810
|
case 0:
|
|
15593
15811
|
return [
|
|
@@ -15623,7 +15841,7 @@ function _ts_generator$7(thisArg, body) {
|
|
|
15623
15841
|
var _this = this;
|
|
15624
15842
|
return _async_to_generator$6(function() {
|
|
15625
15843
|
var cacheContext;
|
|
15626
|
-
return _ts_generator$
|
|
15844
|
+
return _ts_generator$6(this, function(_state) {
|
|
15627
15845
|
switch(_state.label){
|
|
15628
15846
|
case 0:
|
|
15629
15847
|
_this.logger.trace("removeAccount called");
|
|
@@ -15861,7 +16079,7 @@ SafeBuffer.allocUnsafeSlow = function(size) {
|
|
|
15861
16079
|
|
|
15862
16080
|
/*global module, process*/
|
|
15863
16081
|
|
|
15864
|
-
function _type_of$
|
|
16082
|
+
function _type_of$b(obj) {
|
|
15865
16083
|
"@swc/helpers - typeof";
|
|
15866
16084
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
15867
16085
|
}
|
|
@@ -15895,7 +16113,7 @@ function DataStream$2(data) {
|
|
|
15895
16113
|
}).bind(this));
|
|
15896
16114
|
return this;
|
|
15897
16115
|
}
|
|
15898
|
-
throw new TypeError("Unexpected data type (" + (typeof data === "undefined" ? "undefined" : _type_of$
|
|
16116
|
+
throw new TypeError("Unexpected data type (" + (typeof data === "undefined" ? "undefined" : _type_of$b(data)) + ")");
|
|
15899
16117
|
}
|
|
15900
16118
|
util$3.inherits(DataStream$2, Stream$2);
|
|
15901
16119
|
DataStream$2.prototype.write = function write(data) {
|
|
@@ -16580,7 +16798,7 @@ var TokenExpiredError_1 = TokenExpiredError$1;
|
|
|
16580
16798
|
* Helpers.
|
|
16581
16799
|
*/
|
|
16582
16800
|
|
|
16583
|
-
function _type_of$
|
|
16801
|
+
function _type_of$a(obj) {
|
|
16584
16802
|
"@swc/helpers - typeof";
|
|
16585
16803
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
16586
16804
|
}
|
|
@@ -16604,7 +16822,7 @@ var y = d * 365.25;
|
|
|
16604
16822
|
* @api public
|
|
16605
16823
|
*/ var ms$1 = function(val, options) {
|
|
16606
16824
|
options = options || {};
|
|
16607
|
-
var type = typeof val === "undefined" ? "undefined" : _type_of$
|
|
16825
|
+
var type = typeof val === "undefined" ? "undefined" : _type_of$a(val);
|
|
16608
16826
|
if (type === "string" && val.length > 0) {
|
|
16609
16827
|
return parse$7(val);
|
|
16610
16828
|
} else if (type === "number" && isFinite(val)) {
|
|
@@ -17047,12 +17265,12 @@ var identifiers$1 = {
|
|
|
17047
17265
|
rcompareIdentifiers: rcompareIdentifiers
|
|
17048
17266
|
};
|
|
17049
17267
|
|
|
17050
|
-
function _class_call_check$
|
|
17268
|
+
function _class_call_check$a(instance, Constructor) {
|
|
17051
17269
|
if (!(instance instanceof Constructor)) {
|
|
17052
17270
|
throw new TypeError("Cannot call a class as a function");
|
|
17053
17271
|
}
|
|
17054
17272
|
}
|
|
17055
|
-
function _defineProperties$
|
|
17273
|
+
function _defineProperties$a(target, props) {
|
|
17056
17274
|
for(var i = 0; i < props.length; i++){
|
|
17057
17275
|
var descriptor = props[i];
|
|
17058
17276
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -17061,19 +17279,19 @@ function _defineProperties$b(target, props) {
|
|
|
17061
17279
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
17062
17280
|
}
|
|
17063
17281
|
}
|
|
17064
|
-
function _create_class$
|
|
17065
|
-
if (protoProps) _defineProperties$
|
|
17066
|
-
if (staticProps) _defineProperties$
|
|
17282
|
+
function _create_class$a(Constructor, protoProps, staticProps) {
|
|
17283
|
+
if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
|
|
17284
|
+
if (staticProps) _defineProperties$a(Constructor, staticProps);
|
|
17067
17285
|
return Constructor;
|
|
17068
17286
|
}
|
|
17069
|
-
function _instanceof$
|
|
17287
|
+
function _instanceof$b(left, right) {
|
|
17070
17288
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
17071
17289
|
return !!right[Symbol.hasInstance](left);
|
|
17072
17290
|
} else {
|
|
17073
17291
|
return left instanceof right;
|
|
17074
17292
|
}
|
|
17075
17293
|
}
|
|
17076
|
-
function _type_of$
|
|
17294
|
+
function _type_of$9(obj) {
|
|
17077
17295
|
"@swc/helpers - typeof";
|
|
17078
17296
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
17079
17297
|
}
|
|
@@ -17084,16 +17302,16 @@ var parseOptions$2 = parseOptions_1;
|
|
|
17084
17302
|
var compareIdentifiers = identifiers$1.compareIdentifiers;
|
|
17085
17303
|
var SemVer$f = /*#__PURE__*/ function() {
|
|
17086
17304
|
function SemVer(version, options) {
|
|
17087
|
-
_class_call_check$
|
|
17305
|
+
_class_call_check$a(this, SemVer);
|
|
17088
17306
|
options = parseOptions$2(options);
|
|
17089
|
-
if (_instanceof$
|
|
17307
|
+
if (_instanceof$b(version, SemVer)) {
|
|
17090
17308
|
if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
|
|
17091
17309
|
return version;
|
|
17092
17310
|
} else {
|
|
17093
17311
|
version = version.version;
|
|
17094
17312
|
}
|
|
17095
17313
|
} else if (typeof version !== "string") {
|
|
17096
|
-
throw new TypeError('Invalid version. Must be a string. Got type "'.concat(typeof version === "undefined" ? "undefined" : _type_of$
|
|
17314
|
+
throw new TypeError('Invalid version. Must be a string. Got type "'.concat(typeof version === "undefined" ? "undefined" : _type_of$9(version), '".'));
|
|
17097
17315
|
}
|
|
17098
17316
|
if (version.length > MAX_LENGTH) {
|
|
17099
17317
|
throw new TypeError("version is longer than ".concat(MAX_LENGTH, " characters"));
|
|
@@ -17139,7 +17357,7 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17139
17357
|
this.build = m[5] ? m[5].split(".") : [];
|
|
17140
17358
|
this.format();
|
|
17141
17359
|
}
|
|
17142
|
-
_create_class$
|
|
17360
|
+
_create_class$a(SemVer, [
|
|
17143
17361
|
{
|
|
17144
17362
|
key: "format",
|
|
17145
17363
|
value: function format() {
|
|
@@ -17160,7 +17378,7 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17160
17378
|
key: "compare",
|
|
17161
17379
|
value: function compare(other) {
|
|
17162
17380
|
debug$2("SemVer.compare", this.version, this.options, other);
|
|
17163
|
-
if (!_instanceof$
|
|
17381
|
+
if (!_instanceof$b(other, SemVer)) {
|
|
17164
17382
|
if (typeof other === "string" && other === this.version) {
|
|
17165
17383
|
return 0;
|
|
17166
17384
|
}
|
|
@@ -17175,7 +17393,7 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17175
17393
|
{
|
|
17176
17394
|
key: "compareMain",
|
|
17177
17395
|
value: function compareMain(other) {
|
|
17178
|
-
if (!_instanceof$
|
|
17396
|
+
if (!_instanceof$b(other, SemVer)) {
|
|
17179
17397
|
other = new SemVer(other, this.options);
|
|
17180
17398
|
}
|
|
17181
17399
|
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
@@ -17184,7 +17402,7 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17184
17402
|
{
|
|
17185
17403
|
key: "comparePre",
|
|
17186
17404
|
value: function comparePre(other) {
|
|
17187
|
-
if (!_instanceof$
|
|
17405
|
+
if (!_instanceof$b(other, SemVer)) {
|
|
17188
17406
|
other = new SemVer(other, this.options);
|
|
17189
17407
|
}
|
|
17190
17408
|
// NOT having a prerelease is > having one
|
|
@@ -17217,14 +17435,14 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17217
17435
|
{
|
|
17218
17436
|
key: "compareBuild",
|
|
17219
17437
|
value: function compareBuild(other) {
|
|
17220
|
-
if (!_instanceof$
|
|
17438
|
+
if (!_instanceof$b(other, SemVer)) {
|
|
17221
17439
|
other = new SemVer(other, this.options);
|
|
17222
17440
|
}
|
|
17223
17441
|
var i = 0;
|
|
17224
17442
|
do {
|
|
17225
17443
|
var a = this.build[i];
|
|
17226
17444
|
var b = other.build[i];
|
|
17227
|
-
debug$2("
|
|
17445
|
+
debug$2("build compare", i, a, b);
|
|
17228
17446
|
if (a === undefined && b === undefined) {
|
|
17229
17447
|
return 0;
|
|
17230
17448
|
} else if (b === undefined) {
|
|
@@ -17372,7 +17590,7 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17372
17590
|
}();
|
|
17373
17591
|
var semver$4 = SemVer$f;
|
|
17374
17592
|
|
|
17375
|
-
function _instanceof$
|
|
17593
|
+
function _instanceof$a(left, right) {
|
|
17376
17594
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
17377
17595
|
return !!right[Symbol.hasInstance](left);
|
|
17378
17596
|
} else {
|
|
@@ -17382,7 +17600,7 @@ function _instanceof$b(left, right) {
|
|
|
17382
17600
|
var SemVer$e = semver$4;
|
|
17383
17601
|
var parse$6 = function(version, options) {
|
|
17384
17602
|
var throwErrors = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
17385
|
-
if (_instanceof$
|
|
17603
|
+
if (_instanceof$a(version, SemVer$e)) {
|
|
17386
17604
|
return version;
|
|
17387
17605
|
}
|
|
17388
17606
|
try {
|
|
@@ -17410,7 +17628,7 @@ var clean$1 = function(version, options) {
|
|
|
17410
17628
|
};
|
|
17411
17629
|
var clean_1 = clean$1;
|
|
17412
17630
|
|
|
17413
|
-
function _instanceof$
|
|
17631
|
+
function _instanceof$9(left, right) {
|
|
17414
17632
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
17415
17633
|
return !!right[Symbol.hasInstance](left);
|
|
17416
17634
|
} else {
|
|
@@ -17425,7 +17643,7 @@ var inc$1 = function(version, release, options, identifier, identifierBase) {
|
|
|
17425
17643
|
options = undefined;
|
|
17426
17644
|
}
|
|
17427
17645
|
try {
|
|
17428
|
-
return new SemVer$d(_instanceof$
|
|
17646
|
+
return new SemVer$d(_instanceof$9(version, SemVer$d) ? version.version : version, options).inc(release, identifier, identifierBase).version;
|
|
17429
17647
|
} catch (er) {
|
|
17430
17648
|
return null;
|
|
17431
17649
|
}
|
|
@@ -17630,7 +17848,7 @@ var cmp$2 = function(a, op, b, loose) {
|
|
|
17630
17848
|
};
|
|
17631
17849
|
var cmp_1 = cmp$2;
|
|
17632
17850
|
|
|
17633
|
-
function _instanceof$
|
|
17851
|
+
function _instanceof$8(left, right) {
|
|
17634
17852
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
17635
17853
|
return !!right[Symbol.hasInstance](left);
|
|
17636
17854
|
} else {
|
|
@@ -17641,7 +17859,7 @@ var SemVer$7 = semver$4;
|
|
|
17641
17859
|
var parse$1 = parse_1;
|
|
17642
17860
|
var _require$4 = re$4.exports, re$2 = _require$4.safeRe, t$2 = _require$4.t;
|
|
17643
17861
|
var coerce$1 = function(version, options) {
|
|
17644
|
-
if (_instanceof$
|
|
17862
|
+
if (_instanceof$8(version, SemVer$7)) {
|
|
17645
17863
|
return version;
|
|
17646
17864
|
}
|
|
17647
17865
|
if (typeof version === "number") {
|
|
@@ -17687,517 +17905,12 @@ var coerce$1 = function(version, options) {
|
|
|
17687
17905
|
};
|
|
17688
17906
|
var coerce_1 = coerce$1;
|
|
17689
17907
|
|
|
17690
|
-
function
|
|
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) {
|
|
17908
|
+
function _class_call_check$9(instance, Constructor) {
|
|
18196
17909
|
if (!(instance instanceof Constructor)) {
|
|
18197
17910
|
throw new TypeError("Cannot call a class as a function");
|
|
18198
17911
|
}
|
|
18199
17912
|
}
|
|
18200
|
-
function _defineProperties$
|
|
17913
|
+
function _defineProperties$9(target, props) {
|
|
18201
17914
|
for(var i = 0; i < props.length; i++){
|
|
18202
17915
|
var descriptor = props[i];
|
|
18203
17916
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -18206,366 +17919,58 @@ function _defineProperties$a(target, props) {
|
|
|
18206
17919
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
18207
17920
|
}
|
|
18208
17921
|
}
|
|
18209
|
-
function _create_class$
|
|
18210
|
-
if (protoProps) _defineProperties$
|
|
18211
|
-
if (staticProps) _defineProperties$
|
|
17922
|
+
function _create_class$9(Constructor, protoProps, staticProps) {
|
|
17923
|
+
if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
|
|
17924
|
+
if (staticProps) _defineProperties$9(Constructor, staticProps);
|
|
18212
17925
|
return Constructor;
|
|
18213
17926
|
}
|
|
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.
|
|
18237
17927
|
var LRUCache = /*#__PURE__*/ function() {
|
|
18238
|
-
function LRUCache(
|
|
18239
|
-
_class_call_check$
|
|
18240
|
-
|
|
18241
|
-
|
|
18242
|
-
|
|
18243
|
-
|
|
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
|
-
},
|
|
18270
|
-
{
|
|
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;
|
|
18330
|
-
}
|
|
18331
|
-
}
|
|
18332
|
-
},
|
|
18333
|
-
{
|
|
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
|
-
},
|
|
17928
|
+
function LRUCache() {
|
|
17929
|
+
_class_call_check$9(this, LRUCache);
|
|
17930
|
+
this.max = 1000;
|
|
17931
|
+
this.map = new Map();
|
|
17932
|
+
}
|
|
17933
|
+
_create_class$9(LRUCache, [
|
|
18360
17934
|
{
|
|
18361
|
-
key: "
|
|
18362
|
-
value: function
|
|
18363
|
-
var
|
|
18364
|
-
if (
|
|
18365
|
-
|
|
18366
|
-
|
|
18367
|
-
|
|
17935
|
+
key: "get",
|
|
17936
|
+
value: function get(key) {
|
|
17937
|
+
var value = this.map.get(key);
|
|
17938
|
+
if (value === undefined) {
|
|
17939
|
+
return undefined;
|
|
17940
|
+
} else {
|
|
17941
|
+
// Remove the key from the map and add it to the end
|
|
17942
|
+
this.map.delete(key);
|
|
17943
|
+
this.map.set(key, value);
|
|
17944
|
+
return value;
|
|
18368
17945
|
}
|
|
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
17946
|
}
|
|
18391
17947
|
},
|
|
18392
17948
|
{
|
|
18393
|
-
key: "
|
|
18394
|
-
value: function
|
|
18395
|
-
return this
|
|
17949
|
+
key: "delete",
|
|
17950
|
+
value: function _delete(key) {
|
|
17951
|
+
return this.map.delete(key);
|
|
18396
17952
|
}
|
|
18397
17953
|
},
|
|
18398
17954
|
{
|
|
18399
17955
|
key: "set",
|
|
18400
|
-
value: function set(key, value
|
|
18401
|
-
|
|
18402
|
-
if (
|
|
18403
|
-
|
|
18404
|
-
|
|
18405
|
-
|
|
18406
|
-
|
|
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);
|
|
18416
|
-
}
|
|
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;
|
|
18425
|
-
}
|
|
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
|
-
}
|
|
17956
|
+
value: function set(key, value) {
|
|
17957
|
+
var deleted = this.delete(key);
|
|
17958
|
+
if (!deleted && value !== undefined) {
|
|
17959
|
+
// If cache is full, delete the least recently used item
|
|
17960
|
+
if (this.map.size >= this.max) {
|
|
17961
|
+
var firstKey = this.map.keys().next().value;
|
|
17962
|
+
this.delete(firstKey);
|
|
18492
17963
|
}
|
|
17964
|
+
this.map.set(key, value);
|
|
18493
17965
|
}
|
|
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
|
-
});
|
|
17966
|
+
return this;
|
|
18503
17967
|
}
|
|
18504
17968
|
}
|
|
18505
17969
|
]);
|
|
18506
|
-
return LRUCache;
|
|
18507
|
-
}();
|
|
18508
|
-
var
|
|
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;
|
|
17970
|
+
return LRUCache;
|
|
17971
|
+
}();
|
|
17972
|
+
var lrucache = LRUCache;
|
|
18567
17973
|
|
|
18568
|
-
// hoisted class for cyclic dependency
|
|
18569
17974
|
function _array_like_to_array$3(arr, len) {
|
|
18570
17975
|
if (len == null || len > arr.length) len = arr.length;
|
|
18571
17976
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -18574,12 +17979,12 @@ function _array_like_to_array$3(arr, len) {
|
|
|
18574
17979
|
function _array_without_holes$1(arr) {
|
|
18575
17980
|
if (Array.isArray(arr)) return _array_like_to_array$3(arr);
|
|
18576
17981
|
}
|
|
18577
|
-
function _class_call_check$
|
|
17982
|
+
function _class_call_check$8(instance, Constructor) {
|
|
18578
17983
|
if (!(instance instanceof Constructor)) {
|
|
18579
17984
|
throw new TypeError("Cannot call a class as a function");
|
|
18580
17985
|
}
|
|
18581
17986
|
}
|
|
18582
|
-
function _defineProperties$
|
|
17987
|
+
function _defineProperties$8(target, props) {
|
|
18583
17988
|
for(var i = 0; i < props.length; i++){
|
|
18584
17989
|
var descriptor = props[i];
|
|
18585
17990
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -18588,9 +17993,9 @@ function _defineProperties$9(target, props) {
|
|
|
18588
17993
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
18589
17994
|
}
|
|
18590
17995
|
}
|
|
18591
|
-
function _create_class$
|
|
18592
|
-
if (protoProps) _defineProperties$
|
|
18593
|
-
if (staticProps) _defineProperties$
|
|
17996
|
+
function _create_class$8(Constructor, protoProps, staticProps) {
|
|
17997
|
+
if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
|
|
17998
|
+
if (staticProps) _defineProperties$8(Constructor, staticProps);
|
|
18594
17999
|
return Constructor;
|
|
18595
18000
|
}
|
|
18596
18001
|
function _instanceof$7(left, right) {
|
|
@@ -18617,10 +18022,12 @@ function _unsupported_iterable_to_array$3(o, minLen) {
|
|
|
18617
18022
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
18618
18023
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
|
|
18619
18024
|
}
|
|
18025
|
+
var SPACE_CHARACTERS = /\s+/g;
|
|
18026
|
+
// hoisted class for cyclic dependency
|
|
18620
18027
|
var Range$b = /*#__PURE__*/ function() {
|
|
18621
18028
|
function Range(range, options) {
|
|
18622
18029
|
var _this = this;
|
|
18623
|
-
_class_call_check$
|
|
18030
|
+
_class_call_check$8(this, Range);
|
|
18624
18031
|
options = parseOptions$1(options);
|
|
18625
18032
|
if (_instanceof$7(range, Range)) {
|
|
18626
18033
|
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
|
|
@@ -18637,7 +18044,7 @@ var Range$b = /*#__PURE__*/ function() {
|
|
|
18637
18044
|
range
|
|
18638
18045
|
]
|
|
18639
18046
|
];
|
|
18640
|
-
this.
|
|
18047
|
+
this.formatted = undefined;
|
|
18641
18048
|
return this;
|
|
18642
18049
|
}
|
|
18643
18050
|
this.options = options;
|
|
@@ -18646,7 +18053,7 @@ var Range$b = /*#__PURE__*/ function() {
|
|
|
18646
18053
|
// First reduce all whitespace as much as possible so we do not have to rely
|
|
18647
18054
|
// on potentially slow regexes like \s*. This is then stored and used for
|
|
18648
18055
|
// future error messages as well.
|
|
18649
|
-
this.raw = range.trim().
|
|
18056
|
+
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
|
|
18650
18057
|
// First, split on ||
|
|
18651
18058
|
this.set = this.raw.split("||")// map the range to a 2d array of comparators
|
|
18652
18059
|
.map(function(r) {
|
|
@@ -18700,15 +18107,33 @@ var Range$b = /*#__PURE__*/ function() {
|
|
|
18700
18107
|
}
|
|
18701
18108
|
}
|
|
18702
18109
|
}
|
|
18703
|
-
this.
|
|
18110
|
+
this.formatted = undefined;
|
|
18704
18111
|
}
|
|
18705
|
-
_create_class$
|
|
18112
|
+
_create_class$8(Range, [
|
|
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
|
+
},
|
|
18706
18134
|
{
|
|
18707
18135
|
key: "format",
|
|
18708
18136
|
value: function format() {
|
|
18709
|
-
this.range = this.set.map(function(comps) {
|
|
18710
|
-
return comps.join(" ").trim();
|
|
18711
|
-
}).join("||").trim();
|
|
18712
18137
|
return this.range;
|
|
18713
18138
|
}
|
|
18714
18139
|
},
|
|
@@ -18843,10 +18268,8 @@ var Range$b = /*#__PURE__*/ function() {
|
|
|
18843
18268
|
return Range;
|
|
18844
18269
|
}();
|
|
18845
18270
|
var range = Range$b;
|
|
18846
|
-
var LRU =
|
|
18847
|
-
var cache = new LRU(
|
|
18848
|
-
max: 1000
|
|
18849
|
-
});
|
|
18271
|
+
var LRU = lrucache;
|
|
18272
|
+
var cache = new LRU();
|
|
18850
18273
|
var parseOptions$1 = parseOptions_1;
|
|
18851
18274
|
var Comparator$4 = comparator;
|
|
18852
18275
|
var debug$1 = debug_1;
|
|
@@ -19070,8 +18493,9 @@ var replaceGTE0 = function(comp, options) {
|
|
|
19070
18493
|
// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
|
|
19071
18494
|
// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
|
|
19072
18495
|
// 1.2 - 3.4 => >=1.2.0 <3.5.0-0
|
|
18496
|
+
// TODO build?
|
|
19073
18497
|
var hyphenReplace = function(incPr) {
|
|
19074
|
-
return function($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr
|
|
18498
|
+
return function($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) {
|
|
19075
18499
|
if (isX(fM)) {
|
|
19076
18500
|
from = "";
|
|
19077
18501
|
} else if (isX(fm)) {
|
|
@@ -19129,12 +18553,12 @@ var testSet = function(set, version, options) {
|
|
|
19129
18553
|
return true;
|
|
19130
18554
|
};
|
|
19131
18555
|
|
|
19132
|
-
function _class_call_check$
|
|
18556
|
+
function _class_call_check$7(instance, Constructor) {
|
|
19133
18557
|
if (!(instance instanceof Constructor)) {
|
|
19134
18558
|
throw new TypeError("Cannot call a class as a function");
|
|
19135
18559
|
}
|
|
19136
18560
|
}
|
|
19137
|
-
function _defineProperties$
|
|
18561
|
+
function _defineProperties$7(target, props) {
|
|
19138
18562
|
for(var i = 0; i < props.length; i++){
|
|
19139
18563
|
var descriptor = props[i];
|
|
19140
18564
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -19143,9 +18567,9 @@ function _defineProperties$8(target, props) {
|
|
|
19143
18567
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
19144
18568
|
}
|
|
19145
18569
|
}
|
|
19146
|
-
function _create_class$
|
|
19147
|
-
if (protoProps) _defineProperties$
|
|
19148
|
-
if (staticProps) _defineProperties$
|
|
18570
|
+
function _create_class$7(Constructor, protoProps, staticProps) {
|
|
18571
|
+
if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
|
|
18572
|
+
if (staticProps) _defineProperties$7(Constructor, staticProps);
|
|
19149
18573
|
return Constructor;
|
|
19150
18574
|
}
|
|
19151
18575
|
function _instanceof$6(left, right) {
|
|
@@ -19159,7 +18583,7 @@ var ANY$2 = Symbol("SemVer ANY");
|
|
|
19159
18583
|
// hoisted class for cyclic dependency
|
|
19160
18584
|
var Comparator$3 = /*#__PURE__*/ function() {
|
|
19161
18585
|
function Comparator(comp, options) {
|
|
19162
|
-
_class_call_check$
|
|
18586
|
+
_class_call_check$7(this, Comparator);
|
|
19163
18587
|
options = parseOptions(options);
|
|
19164
18588
|
if (_instanceof$6(comp, Comparator)) {
|
|
19165
18589
|
if (comp.loose === !!options.loose) {
|
|
@@ -19180,7 +18604,7 @@ var Comparator$3 = /*#__PURE__*/ function() {
|
|
|
19180
18604
|
}
|
|
19181
18605
|
debug("comp", this);
|
|
19182
18606
|
}
|
|
19183
|
-
_create_class$
|
|
18607
|
+
_create_class$7(Comparator, [
|
|
19184
18608
|
{
|
|
19185
18609
|
key: "parse",
|
|
19186
18610
|
value: function parse(comp) {
|
|
@@ -19427,7 +18851,7 @@ var validRange$1 = function(range, options) {
|
|
|
19427
18851
|
};
|
|
19428
18852
|
var valid$1 = validRange$1;
|
|
19429
18853
|
|
|
19430
|
-
function _type_of$
|
|
18854
|
+
function _type_of$8(obj) {
|
|
19431
18855
|
"@swc/helpers - typeof";
|
|
19432
18856
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
19433
18857
|
}
|
|
@@ -19505,7 +18929,7 @@ var outside$3 = function(version, range, hilo, options) {
|
|
|
19505
18929
|
// but note that everything is flipped for the "ltr" function.
|
|
19506
18930
|
for(var i = 0; i < range.set.length; ++i){
|
|
19507
18931
|
var _ret = _loop(i);
|
|
19508
|
-
if (_type_of$
|
|
18932
|
+
if (_type_of$8(_ret) === "object") return _ret.v;
|
|
19509
18933
|
}
|
|
19510
18934
|
return true;
|
|
19511
18935
|
};
|
|
@@ -20401,7 +19825,7 @@ var verify = function(jwtString, secretOrPublicKey, options, callback) {
|
|
|
20401
19825
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
20402
19826
|
*/
|
|
20403
19827
|
|
|
20404
|
-
/** Used as references for various `Number` constants. */ function _type_of$
|
|
19828
|
+
/** Used as references for various `Number` constants. */ function _type_of$7(obj) {
|
|
20405
19829
|
"@swc/helpers - typeof";
|
|
20406
19830
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
20407
19831
|
}
|
|
@@ -20795,7 +20219,7 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
20795
20219
|
* _.isObject(null);
|
|
20796
20220
|
* // => false
|
|
20797
20221
|
*/ function isObject$2(value) {
|
|
20798
|
-
var type = typeof value === "undefined" ? "undefined" : _type_of$
|
|
20222
|
+
var type = typeof value === "undefined" ? "undefined" : _type_of$7(value);
|
|
20799
20223
|
return !!value && (type == "object" || type == "function");
|
|
20800
20224
|
}
|
|
20801
20225
|
/**
|
|
@@ -20860,7 +20284,7 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
20860
20284
|
* _.isSymbol('abc');
|
|
20861
20285
|
* // => false
|
|
20862
20286
|
*/ function isSymbol$2(value) {
|
|
20863
|
-
return (typeof value === "undefined" ? "undefined" : _type_of$
|
|
20287
|
+
return (typeof value === "undefined" ? "undefined" : _type_of$7(value)) == "symbol" || isObjectLike$6(value) && objectToString$6.call(value) == symbolTag$2;
|
|
20864
20288
|
}
|
|
20865
20289
|
/**
|
|
20866
20290
|
* Converts `value` to a finite number.
|
|
@@ -21093,7 +20517,7 @@ var lodash_isboolean = isBoolean$1;
|
|
|
21093
20517
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
21094
20518
|
*/
|
|
21095
20519
|
|
|
21096
|
-
/** Used as references for various `Number` constants. */ function _type_of$
|
|
20520
|
+
/** Used as references for various `Number` constants. */ function _type_of$6(obj) {
|
|
21097
20521
|
"@swc/helpers - typeof";
|
|
21098
20522
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
21099
20523
|
}
|
|
@@ -21163,7 +20587,7 @@ var INFINITY$1 = 1 / 0, MAX_INTEGER$1 = 1.7976931348623157e+308, NAN$1 = 0 / 0;
|
|
|
21163
20587
|
* _.isObject(null);
|
|
21164
20588
|
* // => false
|
|
21165
20589
|
*/ function isObject$1(value) {
|
|
21166
|
-
var type = typeof value === "undefined" ? "undefined" : _type_of$
|
|
20590
|
+
var type = typeof value === "undefined" ? "undefined" : _type_of$6(value);
|
|
21167
20591
|
return !!value && (type == "object" || type == "function");
|
|
21168
20592
|
}
|
|
21169
20593
|
/**
|
|
@@ -21209,7 +20633,7 @@ var INFINITY$1 = 1 / 0, MAX_INTEGER$1 = 1.7976931348623157e+308, NAN$1 = 0 / 0;
|
|
|
21209
20633
|
* _.isSymbol('abc');
|
|
21210
20634
|
* // => false
|
|
21211
20635
|
*/ function isSymbol$1(value) {
|
|
21212
|
-
return (typeof value === "undefined" ? "undefined" : _type_of$
|
|
20636
|
+
return (typeof value === "undefined" ? "undefined" : _type_of$6(value)) == "symbol" || isObjectLike$4(value) && objectToString$4.call(value) == symbolTag$1;
|
|
21213
20637
|
}
|
|
21214
20638
|
/**
|
|
21215
20639
|
* Converts `value` to a finite number.
|
|
@@ -21598,7 +21022,7 @@ var lodash_isstring = isString$1;
|
|
|
21598
21022
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
21599
21023
|
*/
|
|
21600
21024
|
|
|
21601
|
-
/** Used as the `TypeError` message for "Functions" methods. */ function _type_of$
|
|
21025
|
+
/** Used as the `TypeError` message for "Functions" methods. */ function _type_of$5(obj) {
|
|
21602
21026
|
"@swc/helpers - typeof";
|
|
21603
21027
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
21604
21028
|
}
|
|
@@ -21693,7 +21117,7 @@ var FUNC_ERROR_TEXT = "Expected a function";
|
|
|
21693
21117
|
* _.isObject(null);
|
|
21694
21118
|
* // => false
|
|
21695
21119
|
*/ function isObject(value) {
|
|
21696
|
-
var type = typeof value === "undefined" ? "undefined" : _type_of$
|
|
21120
|
+
var type = typeof value === "undefined" ? "undefined" : _type_of$5(value);
|
|
21697
21121
|
return !!value && (type == "object" || type == "function");
|
|
21698
21122
|
}
|
|
21699
21123
|
/**
|
|
@@ -21739,7 +21163,7 @@ var FUNC_ERROR_TEXT = "Expected a function";
|
|
|
21739
21163
|
* _.isSymbol('abc');
|
|
21740
21164
|
* // => false
|
|
21741
21165
|
*/ function isSymbol(value) {
|
|
21742
|
-
return (typeof value === "undefined" ? "undefined" : _type_of$
|
|
21166
|
+
return (typeof value === "undefined" ? "undefined" : _type_of$5(value)) == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
21743
21167
|
}
|
|
21744
21168
|
/**
|
|
21745
21169
|
* Converts `value` to a finite number.
|
|
@@ -21852,7 +21276,7 @@ function _instanceof$3(left, right) {
|
|
|
21852
21276
|
return left instanceof right;
|
|
21853
21277
|
}
|
|
21854
21278
|
}
|
|
21855
|
-
function _type_of$
|
|
21279
|
+
function _type_of$4(obj) {
|
|
21856
21280
|
"@swc/helpers - typeof";
|
|
21857
21281
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
21858
21282
|
}
|
|
@@ -22059,7 +21483,7 @@ var sign = function(payload, secretOrPrivateKey, options, callback) {
|
|
|
22059
21483
|
return typeof options[opt] !== "undefined";
|
|
22060
21484
|
});
|
|
22061
21485
|
if (invalid_options.length > 0) {
|
|
22062
|
-
return failure(new Error("invalid " + invalid_options.join(",") + " option for " + (typeof payload === "undefined" ? "undefined" : _type_of$
|
|
21486
|
+
return failure(new Error("invalid " + invalid_options.join(",") + " option for " + (typeof payload === "undefined" ? "undefined" : _type_of$4(payload)) + " payload"));
|
|
22063
21487
|
}
|
|
22064
21488
|
}
|
|
22065
21489
|
if (typeof payload.exp !== "undefined" && typeof options.expiresIn !== "undefined") {
|
|
@@ -22154,12 +21578,12 @@ var jsonwebtoken = {
|
|
|
22154
21578
|
TokenExpiredError: TokenExpiredError_1
|
|
22155
21579
|
};
|
|
22156
21580
|
|
|
22157
|
-
function _class_call_check$
|
|
21581
|
+
function _class_call_check$6(instance, Constructor) {
|
|
22158
21582
|
if (!(instance instanceof Constructor)) {
|
|
22159
21583
|
throw new TypeError("Cannot call a class as a function");
|
|
22160
21584
|
}
|
|
22161
21585
|
}
|
|
22162
|
-
function _defineProperties$
|
|
21586
|
+
function _defineProperties$6(target, props) {
|
|
22163
21587
|
for(var i = 0; i < props.length; i++){
|
|
22164
21588
|
var descriptor = props[i];
|
|
22165
21589
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -22168,9 +21592,9 @@ function _defineProperties$7(target, props) {
|
|
|
22168
21592
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
22169
21593
|
}
|
|
22170
21594
|
}
|
|
22171
|
-
function _create_class$
|
|
22172
|
-
if (protoProps) _defineProperties$
|
|
22173
|
-
if (staticProps) _defineProperties$
|
|
21595
|
+
function _create_class$6(Constructor, protoProps, staticProps) {
|
|
21596
|
+
if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
|
|
21597
|
+
if (staticProps) _defineProperties$6(Constructor, staticProps);
|
|
22174
21598
|
return Constructor;
|
|
22175
21599
|
}
|
|
22176
21600
|
function _define_property$2(obj, key, value) {
|
|
@@ -22194,9 +21618,9 @@ function _define_property$2(obj, key, value) {
|
|
|
22194
21618
|
* @public
|
|
22195
21619
|
*/ var ClientAssertion = /*#__PURE__*/ function() {
|
|
22196
21620
|
function ClientAssertion() {
|
|
22197
|
-
_class_call_check$
|
|
21621
|
+
_class_call_check$6(this, ClientAssertion);
|
|
22198
21622
|
}
|
|
22199
|
-
_create_class$
|
|
21623
|
+
_create_class$6(ClientAssertion, [
|
|
22200
21624
|
{
|
|
22201
21625
|
/**
|
|
22202
21626
|
* Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
|
|
@@ -22230,14 +21654,14 @@ function _define_property$2(obj, key, value) {
|
|
|
22230
21654
|
this.jwtAudience = jwtAudience;
|
|
22231
21655
|
var issuedAt = nowSeconds();
|
|
22232
21656
|
this.expirationTime = issuedAt + 600;
|
|
21657
|
+
var algorithm = this.useSha256 ? JwtConstants.PSS_256 : JwtConstants.RSA_256;
|
|
22233
21658
|
var header = {
|
|
22234
|
-
alg:
|
|
22235
|
-
x5t: EncodingUtils.base64EncodeUrl(this.thumbprint, "hex")
|
|
21659
|
+
alg: algorithm
|
|
22236
21660
|
};
|
|
21661
|
+
var thumbprintHeader = this.useSha256 ? JwtConstants.X5T_256 : JwtConstants.X5T;
|
|
21662
|
+
Object.assign(header, _define_property$2({}, thumbprintHeader, EncodingUtils.base64EncodeUrl(this.thumbprint, "hex")));
|
|
22237
21663
|
if (this.publicCertificate) {
|
|
22238
|
-
Object.assign(header, {
|
|
22239
|
-
x5c: this.publicCertificate
|
|
22240
|
-
});
|
|
21664
|
+
Object.assign(header, _define_property$2({}, JwtConstants.X5C, this.publicCertificate));
|
|
22241
21665
|
}
|
|
22242
21666
|
var _obj;
|
|
22243
21667
|
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);
|
|
@@ -22270,6 +21694,7 @@ function _define_property$2(obj, key, value) {
|
|
|
22270
21694
|
{
|
|
22271
21695
|
key: "fromCertificate",
|
|
22272
21696
|
value: /**
|
|
21697
|
+
* @deprecated Use fromCertificateWithSha256Thumbprint instead, with a SHA-256 thumprint
|
|
22273
21698
|
* Initialize the ClientAssertion class from the certificate passed by the user
|
|
22274
21699
|
* @param thumbprint - identifier of a certificate
|
|
22275
21700
|
* @param privateKey - secret key
|
|
@@ -22278,6 +21703,25 @@ function _define_property$2(obj, key, value) {
|
|
|
22278
21703
|
var clientAssertion = new ClientAssertion();
|
|
22279
21704
|
clientAssertion.privateKey = privateKey;
|
|
22280
21705
|
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;
|
|
22281
21725
|
if (publicCertificate) {
|
|
22282
21726
|
clientAssertion.publicCertificate = this.parseCertificate(publicCertificate);
|
|
22283
21727
|
}
|
|
@@ -22311,198 +21755,7 @@ function _define_property$2(obj, key, value) {
|
|
|
22311
21755
|
}();
|
|
22312
21756
|
|
|
22313
21757
|
/* eslint-disable header/header */ var name = "@azure/msal-node";
|
|
22314
|
-
var version = "2.
|
|
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);
|
|
21758
|
+
var version = "2.11.1";
|
|
22506
21759
|
|
|
22507
21760
|
function _assert_this_initialized$3(self) {
|
|
22508
21761
|
if (self === void 0) {
|
|
@@ -25128,7 +24381,7 @@ function _ts_generator$1(thisArg, body) {
|
|
|
25128
24381
|
_class_call_check$1(this, ConfidentialClientApplication);
|
|
25129
24382
|
var _this;
|
|
25130
24383
|
_this = _super.call(this, configuration);
|
|
25131
|
-
_this.setClientCredential(
|
|
24384
|
+
_this.setClientCredential();
|
|
25132
24385
|
_this.appTokenProvider = undefined;
|
|
25133
24386
|
return _this;
|
|
25134
24387
|
}
|
|
@@ -25312,14 +24565,10 @@ function _ts_generator$1(thisArg, body) {
|
|
|
25312
24565
|
},
|
|
25313
24566
|
{
|
|
25314
24567
|
key: "setClientCredential",
|
|
25315
|
-
value: function setClientCredential(
|
|
25316
|
-
var clientSecretNotEmpty = !!
|
|
25317
|
-
var clientAssertionNotEmpty = !!
|
|
25318
|
-
var
|
|
25319
|
-
thumbprint: Constants$1.EMPTY_STRING,
|
|
25320
|
-
privateKey: Constants$1.EMPTY_STRING
|
|
25321
|
-
};
|
|
25322
|
-
var certificateNotEmpty = !!certificate.thumbprint || !!certificate.privateKey;
|
|
24568
|
+
value: function setClientCredential() {
|
|
24569
|
+
var clientSecretNotEmpty = !!this.config.auth.clientSecret;
|
|
24570
|
+
var clientAssertionNotEmpty = !!this.config.auth.clientAssertion;
|
|
24571
|
+
var certificateNotEmpty = (!!this.config.auth.clientCertificate.thumbprint || !!this.config.auth.clientCertificate.thumbprintSha256) && !!this.config.auth.clientCertificate.privateKey;
|
|
25323
24572
|
/*
|
|
25324
24573
|
* If app developer configures this callback, they don't need a credential
|
|
25325
24574
|
* i.e. AzureSDK can get token from Managed Identity without a cert / secret
|
|
@@ -25330,19 +24579,19 @@ function _ts_generator$1(thisArg, body) {
|
|
|
25330
24579
|
if (clientSecretNotEmpty && clientAssertionNotEmpty || clientAssertionNotEmpty && certificateNotEmpty || clientSecretNotEmpty && certificateNotEmpty) {
|
|
25331
24580
|
throw createClientAuthError(invalidClientCredential);
|
|
25332
24581
|
}
|
|
25333
|
-
if (
|
|
25334
|
-
this.clientSecret =
|
|
24582
|
+
if (this.config.auth.clientSecret) {
|
|
24583
|
+
this.clientSecret = this.config.auth.clientSecret;
|
|
25335
24584
|
return;
|
|
25336
24585
|
}
|
|
25337
|
-
if (
|
|
25338
|
-
this.developerProvidedClientAssertion =
|
|
24586
|
+
if (this.config.auth.clientAssertion) {
|
|
24587
|
+
this.developerProvidedClientAssertion = this.config.auth.clientAssertion;
|
|
25339
24588
|
return;
|
|
25340
24589
|
}
|
|
25341
24590
|
if (!certificateNotEmpty) {
|
|
25342
24591
|
throw createClientAuthError(invalidClientCredential);
|
|
25343
24592
|
} else {
|
|
25344
|
-
|
|
25345
|
-
this.
|
|
24593
|
+
this.clientAssertion = !!this.config.auth.clientCertificate.thumbprintSha256 ? ClientAssertion.fromCertificateWithSha256Thumbprint(this.config.auth.clientCertificate.thumbprintSha256, this.config.auth.clientCertificate.privateKey, this.config.auth.clientCertificate.x5c) : ClientAssertion.fromCertificate(// guaranteed to be a string, due to prior error checking in this function
|
|
24594
|
+
this.config.auth.clientCertificate.thumbprint, this.config.auth.clientCertificate.privateKey, this.config.auth.clientCertificate.x5c);
|
|
25346
24595
|
}
|
|
25347
24596
|
}
|
|
25348
24597
|
}
|