@digipair/skill-microsoft 0.21.15 → 0.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +1377 -626
- package/index.esm.js +1377 -626
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -2354,7 +2354,7 @@ function _create_class$E(Constructor, protoProps, staticProps) {
|
|
|
2354
2354
|
if (staticProps) _defineProperties$E(Constructor, staticProps);
|
|
2355
2355
|
return Constructor;
|
|
2356
2356
|
}
|
|
2357
|
-
function _ts_generator$
|
|
2357
|
+
function _ts_generator$p(thisArg, body) {
|
|
2358
2358
|
var f, y, t, g, _ = {
|
|
2359
2359
|
label: 0,
|
|
2360
2360
|
sent: function() {
|
|
@@ -2471,7 +2471,7 @@ function _ts_generator$o(thisArg, body) {
|
|
|
2471
2471
|
var _this = this;
|
|
2472
2472
|
return _async_to_generator$o(function() {
|
|
2473
2473
|
var _this_performanceClient, autodetectedRegionName, options, localIMDSVersionResponse, currentIMDSVersion, currentIMDSVersionResponse;
|
|
2474
|
-
return _ts_generator$
|
|
2474
|
+
return _ts_generator$p(this, function(_state) {
|
|
2475
2475
|
switch(_state.label){
|
|
2476
2476
|
case 0:
|
|
2477
2477
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RegionDiscoveryDetectRegion, _this.correlationId);
|
|
@@ -2573,7 +2573,7 @@ function _ts_generator$o(thisArg, body) {
|
|
|
2573
2573
|
var _this = this;
|
|
2574
2574
|
return _async_to_generator$o(function() {
|
|
2575
2575
|
var _this_performanceClient;
|
|
2576
|
-
return _ts_generator$
|
|
2576
|
+
return _ts_generator$p(this, function(_state) {
|
|
2577
2577
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, _this.correlationId);
|
|
2578
2578
|
return [
|
|
2579
2579
|
2,
|
|
@@ -2593,7 +2593,7 @@ function _ts_generator$o(thisArg, body) {
|
|
|
2593
2593
|
var _this = this;
|
|
2594
2594
|
return _async_to_generator$o(function() {
|
|
2595
2595
|
var _this_performanceClient, response;
|
|
2596
|
-
return _ts_generator$
|
|
2596
|
+
return _ts_generator$p(this, function(_state) {
|
|
2597
2597
|
switch(_state.label){
|
|
2598
2598
|
case 0:
|
|
2599
2599
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RegionDiscoveryGetCurrentVersion, _this.correlationId);
|
|
@@ -3006,7 +3006,7 @@ function _define_property$i(obj, key, value) {
|
|
|
3006
3006
|
}
|
|
3007
3007
|
return obj;
|
|
3008
3008
|
}
|
|
3009
|
-
function _instanceof$
|
|
3009
|
+
function _instanceof$j(left, right) {
|
|
3010
3010
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
3011
3011
|
return !!right[Symbol.hasInstance](left);
|
|
3012
3012
|
} else {
|
|
@@ -3052,7 +3052,7 @@ function _object_spread_props$8(target, source) {
|
|
|
3052
3052
|
}
|
|
3053
3053
|
return target;
|
|
3054
3054
|
}
|
|
3055
|
-
function _ts_generator$
|
|
3055
|
+
function _ts_generator$o(thisArg, body) {
|
|
3056
3056
|
var f, y, t, g, _ = {
|
|
3057
3057
|
label: 0,
|
|
3058
3058
|
sent: function() {
|
|
@@ -3416,7 +3416,7 @@ function _ts_generator$n(thisArg, body) {
|
|
|
3416
3416
|
var _this = this;
|
|
3417
3417
|
return _async_to_generator$n(function() {
|
|
3418
3418
|
var _this_performanceClient, _this_performanceClient1, metadataEntity, cloudDiscoverySource, endpointSource;
|
|
3419
|
-
return _ts_generator$
|
|
3419
|
+
return _ts_generator$o(this, function(_state) {
|
|
3420
3420
|
switch(_state.label){
|
|
3421
3421
|
case 0:
|
|
3422
3422
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityResolveEndpointsAsync, _this.correlationId);
|
|
@@ -3504,7 +3504,7 @@ function _ts_generator$n(thisArg, body) {
|
|
|
3504
3504
|
var _this = this;
|
|
3505
3505
|
return _async_to_generator$n(function() {
|
|
3506
3506
|
var _this_performanceClient, localMetadata, _this_authorityOptions_azureRegionConfiguration, hardcodedMetadata, metadata, _this_authorityOptions_azureRegionConfiguration1;
|
|
3507
|
-
return _ts_generator$
|
|
3507
|
+
return _ts_generator$o(this, function(_state) {
|
|
3508
3508
|
switch(_state.label){
|
|
3509
3509
|
case 0:
|
|
3510
3510
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityUpdateEndpointMetadata, _this.correlationId);
|
|
@@ -3664,7 +3664,7 @@ function _ts_generator$n(thisArg, body) {
|
|
|
3664
3664
|
var _this = this;
|
|
3665
3665
|
return _async_to_generator$n(function() {
|
|
3666
3666
|
var _this_performanceClient, options, openIdConfigurationEndpoint, response, isValidResponse, e;
|
|
3667
|
-
return _ts_generator$
|
|
3667
|
+
return _ts_generator$o(this, function(_state) {
|
|
3668
3668
|
switch(_state.label){
|
|
3669
3669
|
case 0:
|
|
3670
3670
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, _this.correlationId);
|
|
@@ -3737,7 +3737,7 @@ function _ts_generator$n(thisArg, body) {
|
|
|
3737
3737
|
var _this = this;
|
|
3738
3738
|
return _async_to_generator$n(function() {
|
|
3739
3739
|
var _this_performanceClient, _this_authorityOptions_azureRegionConfiguration, userConfiguredAzureRegion, _this_authorityOptions_azureRegionConfiguration1, autodetectedRegionName;
|
|
3740
|
-
return _ts_generator$
|
|
3740
|
+
return _ts_generator$o(this, function(_state) {
|
|
3741
3741
|
switch(_state.label){
|
|
3742
3742
|
case 0:
|
|
3743
3743
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, _this.correlationId);
|
|
@@ -3791,7 +3791,7 @@ function _ts_generator$n(thisArg, body) {
|
|
|
3791
3791
|
var _this = this;
|
|
3792
3792
|
return _async_to_generator$n(function() {
|
|
3793
3793
|
var _this_performanceClient, localMetadataSource, metadata;
|
|
3794
|
-
return _ts_generator$
|
|
3794
|
+
return _ts_generator$o(this, function(_state) {
|
|
3795
3795
|
switch(_state.label){
|
|
3796
3796
|
case 0:
|
|
3797
3797
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, _this.correlationId);
|
|
@@ -3906,7 +3906,7 @@ function _ts_generator$n(thisArg, body) {
|
|
|
3906
3906
|
var _this = this;
|
|
3907
3907
|
return _async_to_generator$n(function() {
|
|
3908
3908
|
var _this_performanceClient, instanceDiscoveryEndpoint, options, match, response, typedResponseBody, metadata, error, typedError;
|
|
3909
|
-
return _ts_generator$
|
|
3909
|
+
return _ts_generator$o(this, function(_state) {
|
|
3910
3910
|
switch(_state.label){
|
|
3911
3911
|
case 0:
|
|
3912
3912
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, _this.correlationId);
|
|
@@ -3963,7 +3963,7 @@ function _ts_generator$n(thisArg, body) {
|
|
|
3963
3963
|
];
|
|
3964
3964
|
case 3:
|
|
3965
3965
|
error = _state.sent();
|
|
3966
|
-
if (_instanceof$
|
|
3966
|
+
if (_instanceof$j(error, AuthError)) {
|
|
3967
3967
|
_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));
|
|
3968
3968
|
} else {
|
|
3969
3969
|
typedError = error;
|
|
@@ -4222,7 +4222,7 @@ function _async_to_generator$m(fn) {
|
|
|
4222
4222
|
});
|
|
4223
4223
|
};
|
|
4224
4224
|
}
|
|
4225
|
-
function _ts_generator$
|
|
4225
|
+
function _ts_generator$n(thisArg, body) {
|
|
4226
4226
|
var f, y, t, g, _ = {
|
|
4227
4227
|
label: 0,
|
|
4228
4228
|
sent: function() {
|
|
@@ -4336,7 +4336,7 @@ function _createDiscoveredInstance() {
|
|
|
4336
4336
|
* @internal
|
|
4337
4337
|
*/ _async_to_generator$m(function(authorityUri, networkClient, cacheManager, authorityOptions, logger, correlationId, performanceClient) {
|
|
4338
4338
|
var authorityUriFinal, acquireTokenAuthority;
|
|
4339
|
-
return _ts_generator$
|
|
4339
|
+
return _ts_generator$n(this, function(_state) {
|
|
4340
4340
|
switch(_state.label){
|
|
4341
4341
|
case 0:
|
|
4342
4342
|
performanceClient === null || performanceClient === void 0 ? void 0 : performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, correlationId);
|
|
@@ -4403,7 +4403,7 @@ function _async_to_generator$l(fn) {
|
|
|
4403
4403
|
});
|
|
4404
4404
|
};
|
|
4405
4405
|
}
|
|
4406
|
-
function _ts_generator$
|
|
4406
|
+
function _ts_generator$m(thisArg, body) {
|
|
4407
4407
|
var f, y, t, g, _ = {
|
|
4408
4408
|
label: 0,
|
|
4409
4409
|
sent: function() {
|
|
@@ -4507,7 +4507,7 @@ function _getClientAssertion() {
|
|
|
4507
4507
|
* Licensed under the MIT License.
|
|
4508
4508
|
*/ _async_to_generator$l(function(clientAssertion, clientId, tokenEndpoint) {
|
|
4509
4509
|
var config;
|
|
4510
|
-
return _ts_generator$
|
|
4510
|
+
return _ts_generator$m(this, function(_state) {
|
|
4511
4511
|
if (typeof clientAssertion === "string") {
|
|
4512
4512
|
return [
|
|
4513
4513
|
2,
|
|
@@ -4603,7 +4603,7 @@ function _async_to_generator$k(fn) {
|
|
|
4603
4603
|
});
|
|
4604
4604
|
};
|
|
4605
4605
|
}
|
|
4606
|
-
function _ts_generator$
|
|
4606
|
+
function _ts_generator$l(thisArg, body) {
|
|
4607
4607
|
var f, y, t, g, _ = {
|
|
4608
4608
|
label: 0,
|
|
4609
4609
|
sent: function() {
|
|
@@ -4719,35 +4719,35 @@ function _ts_generator$k(thisArg, body) {
|
|
|
4719
4719
|
},
|
|
4720
4720
|
getPublicKeyThumbprint: function getPublicKeyThumbprint() {
|
|
4721
4721
|
return _async_to_generator$k(function() {
|
|
4722
|
-
return _ts_generator$
|
|
4722
|
+
return _ts_generator$l(this, function(_state) {
|
|
4723
4723
|
throw createClientAuthError(methodNotImplemented);
|
|
4724
4724
|
});
|
|
4725
4725
|
})();
|
|
4726
4726
|
},
|
|
4727
4727
|
removeTokenBindingKey: function removeTokenBindingKey() {
|
|
4728
4728
|
return _async_to_generator$k(function() {
|
|
4729
|
-
return _ts_generator$
|
|
4729
|
+
return _ts_generator$l(this, function(_state) {
|
|
4730
4730
|
throw createClientAuthError(methodNotImplemented);
|
|
4731
4731
|
});
|
|
4732
4732
|
})();
|
|
4733
4733
|
},
|
|
4734
4734
|
clearKeystore: function clearKeystore() {
|
|
4735
4735
|
return _async_to_generator$k(function() {
|
|
4736
|
-
return _ts_generator$
|
|
4736
|
+
return _ts_generator$l(this, function(_state) {
|
|
4737
4737
|
throw createClientAuthError(methodNotImplemented);
|
|
4738
4738
|
});
|
|
4739
4739
|
})();
|
|
4740
4740
|
},
|
|
4741
4741
|
signJwt: function signJwt() {
|
|
4742
4742
|
return _async_to_generator$k(function() {
|
|
4743
|
-
return _ts_generator$
|
|
4743
|
+
return _ts_generator$l(this, function(_state) {
|
|
4744
4744
|
throw createClientAuthError(methodNotImplemented);
|
|
4745
4745
|
});
|
|
4746
4746
|
})();
|
|
4747
4747
|
},
|
|
4748
4748
|
hashString: function hashString() {
|
|
4749
4749
|
return _async_to_generator$k(function() {
|
|
4750
|
-
return _ts_generator$
|
|
4750
|
+
return _ts_generator$l(this, function(_state) {
|
|
4751
4751
|
throw createClientAuthError(methodNotImplemented);
|
|
4752
4752
|
});
|
|
4753
4753
|
})();
|
|
@@ -4990,7 +4990,7 @@ function _create_class$C(Constructor, protoProps, staticProps) {
|
|
|
4990
4990
|
}();
|
|
4991
4991
|
|
|
4992
4992
|
/* eslint-disable header/header */ var name$1 = "@azure/msal-common";
|
|
4993
|
-
var version$1 = "14.13.
|
|
4993
|
+
var version$1 = "14.13.0";
|
|
4994
4994
|
|
|
4995
4995
|
function _array_like_to_array$a(arr, len) {
|
|
4996
4996
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -5399,35 +5399,20 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
5399
5399
|
*/ function tenantIdMatchesHomeTenant(tenantId, homeAccountId) {
|
|
5400
5400
|
return !!tenantId && !!homeAccountId && tenantId === homeAccountId.split(".")[1];
|
|
5401
5401
|
}
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
* 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.
|
|
5417
|
-
*/ var _$tenantId = tid || tfp || acr || "";
|
|
5418
|
-
return {
|
|
5419
|
-
tenantId: _$tenantId,
|
|
5420
|
-
localAccountId: oid || sub || "",
|
|
5421
|
-
name: name,
|
|
5422
|
-
isHomeTenant: tenantIdMatchesHomeTenant(_$tenantId, homeAccountId)
|
|
5423
|
-
};
|
|
5424
|
-
} else {
|
|
5425
|
-
return {
|
|
5426
|
-
tenantId: tenantId,
|
|
5427
|
-
localAccountId: localAccountId,
|
|
5428
|
-
isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId)
|
|
5429
|
-
};
|
|
5430
|
-
}
|
|
5402
|
+
function buildTenantProfileFromIdTokenClaims(homeAccountId, idTokenClaims) {
|
|
5403
|
+
var oid = idTokenClaims.oid, sub = idTokenClaims.sub, tid = idTokenClaims.tid, name = idTokenClaims.name, tfp = idTokenClaims.tfp, acr = idTokenClaims.acr;
|
|
5404
|
+
/**
|
|
5405
|
+
* 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:
|
|
5406
|
+
* 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.
|
|
5407
|
+
* tfp - Trust Framework Policy claim that identifies the policy that was used to authenticate the user. Functions as tenant for B2C scenarios.
|
|
5408
|
+
* 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.
|
|
5409
|
+
*/ var tenantId = tid || tfp || acr || "";
|
|
5410
|
+
return {
|
|
5411
|
+
tenantId: tenantId,
|
|
5412
|
+
localAccountId: oid || sub || "",
|
|
5413
|
+
name: name,
|
|
5414
|
+
isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId)
|
|
5415
|
+
};
|
|
5431
5416
|
}
|
|
5432
5417
|
/**
|
|
5433
5418
|
* Replaces account info that varies by tenant profile sourced from the ID token claims passed in with the tenant-specific account info
|
|
@@ -5448,7 +5433,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
5448
5433
|
if (idTokenClaims) {
|
|
5449
5434
|
// Ignore isHomeTenant, loginHint, and sid which are part of tenant profile but not base account info
|
|
5450
5435
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5451
|
-
var
|
|
5436
|
+
var _buildTenantProfileFromIdTokenClaims = buildTenantProfileFromIdTokenClaims(baseAccountInfo.homeAccountId, idTokenClaims); _buildTenantProfileFromIdTokenClaims.isHomeTenant; var claimsSourcedTenantProfile = _object_without_properties(_buildTenantProfileFromIdTokenClaims, [
|
|
5452
5437
|
"isHomeTenant"
|
|
5453
5438
|
]);
|
|
5454
5439
|
updatedAccountInfo = _object_spread_props$7(_object_spread$b({}, updatedAccountInfo, claimsSourcedTenantProfile), {
|
|
@@ -5646,10 +5631,12 @@ function _create_class$A(Constructor, protoProps, staticProps) {
|
|
|
5646
5631
|
if (accountDetails.tenantProfiles) {
|
|
5647
5632
|
account.tenantProfiles = accountDetails.tenantProfiles;
|
|
5648
5633
|
} else {
|
|
5649
|
-
var
|
|
5650
|
-
|
|
5651
|
-
tenantProfile
|
|
5652
|
-
|
|
5634
|
+
var tenantProfiles = [];
|
|
5635
|
+
if (accountDetails.idTokenClaims) {
|
|
5636
|
+
var tenantProfile = buildTenantProfileFromIdTokenClaims(accountDetails.homeAccountId, accountDetails.idTokenClaims);
|
|
5637
|
+
tenantProfiles.push(tenantProfile);
|
|
5638
|
+
}
|
|
5639
|
+
account.tenantProfiles = tenantProfiles;
|
|
5653
5640
|
}
|
|
5654
5641
|
return account;
|
|
5655
5642
|
}
|
|
@@ -5987,7 +5974,7 @@ function _inherits$c(subClass, superClass) {
|
|
|
5987
5974
|
});
|
|
5988
5975
|
if (superClass) _set_prototype_of$c(subClass, superClass);
|
|
5989
5976
|
}
|
|
5990
|
-
function _instanceof$
|
|
5977
|
+
function _instanceof$i(left, right) {
|
|
5991
5978
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
5992
5979
|
return !!right[Symbol.hasInstance](left);
|
|
5993
5980
|
} else {
|
|
@@ -6050,7 +6037,7 @@ function _create_super$c(Derived) {
|
|
|
6050
6037
|
return _possible_constructor_return$c(this, result);
|
|
6051
6038
|
};
|
|
6052
6039
|
}
|
|
6053
|
-
function _ts_generator$
|
|
6040
|
+
function _ts_generator$k(thisArg, body) {
|
|
6054
6041
|
var f, y, t, g, _ = {
|
|
6055
6042
|
label: 0,
|
|
6056
6043
|
sent: function() {
|
|
@@ -6216,10 +6203,16 @@ function _ts_generator$j(thisArg, body) {
|
|
|
6216
6203
|
value: function buildTenantProfiles(cachedAccounts, accountFilter) {
|
|
6217
6204
|
var _this = this;
|
|
6218
6205
|
return cachedAccounts.flatMap(function(accountEntity) {
|
|
6219
|
-
return _this.
|
|
6206
|
+
return _this.getAccountInfoForTenantProfiles(accountEntity, accountFilter);
|
|
6220
6207
|
});
|
|
6221
6208
|
}
|
|
6222
6209
|
},
|
|
6210
|
+
{
|
|
6211
|
+
key: "getAccountInfoForTenantProfiles",
|
|
6212
|
+
value: function getAccountInfoForTenantProfiles(accountEntity, accountFilter) {
|
|
6213
|
+
return this.getTenantProfilesFromAccountEntity(accountEntity, accountFilter === null || accountFilter === void 0 ? void 0 : accountFilter.tenantId, accountFilter);
|
|
6214
|
+
}
|
|
6215
|
+
},
|
|
6223
6216
|
{
|
|
6224
6217
|
key: "getTenantedAccountInfoByFilter",
|
|
6225
6218
|
value: function getTenantedAccountInfoByFilter(accountInfo, tokenKeys, tenantProfile, tenantProfileFilter) {
|
|
@@ -6326,7 +6319,7 @@ function _ts_generator$j(thisArg, body) {
|
|
|
6326
6319
|
var _this = this;
|
|
6327
6320
|
return _async_to_generator$j(function() {
|
|
6328
6321
|
var e, _this_commonLogger, _this_commonLogger1, _this_commonLogger2, _this_commonLogger3;
|
|
6329
|
-
return _ts_generator$
|
|
6322
|
+
return _ts_generator$k(this, function(_state) {
|
|
6330
6323
|
switch(_state.label){
|
|
6331
6324
|
case 0:
|
|
6332
6325
|
if (!cacheRecord) {
|
|
@@ -6371,7 +6364,7 @@ function _ts_generator$j(thisArg, body) {
|
|
|
6371
6364
|
case 4:
|
|
6372
6365
|
e = _state.sent();
|
|
6373
6366
|
(_this_commonLogger = _this.commonLogger) === null || _this_commonLogger === void 0 ? void 0 : _this_commonLogger.error("CacheManager.saveCacheRecord: failed");
|
|
6374
|
-
if (_instanceof$
|
|
6367
|
+
if (_instanceof$i(e, Error)) {
|
|
6375
6368
|
(_this_commonLogger1 = _this.commonLogger) === null || _this_commonLogger1 === void 0 ? void 0 : _this_commonLogger1.errorPii("CacheManager.saveCacheRecord: ".concat(e.message), correlationId);
|
|
6376
6369
|
if (e.name === "QuotaExceededError" || e.name === "NS_ERROR_DOM_QUOTA_REACHED" || e.message.includes("exceeded the quota")) {
|
|
6377
6370
|
(_this_commonLogger2 = _this.commonLogger) === null || _this_commonLogger2 === void 0 ? void 0 : _this_commonLogger2.error("CacheManager.saveCacheRecord: exceeded storage quota", correlationId);
|
|
@@ -6401,7 +6394,7 @@ function _ts_generator$j(thisArg, body) {
|
|
|
6401
6394
|
var _this = this;
|
|
6402
6395
|
return _async_to_generator$j(function() {
|
|
6403
6396
|
var accessTokenFilter, tokenKeys, currentScopes, removedAccessTokens;
|
|
6404
|
-
return _ts_generator$
|
|
6397
|
+
return _ts_generator$k(this, function(_state) {
|
|
6405
6398
|
switch(_state.label){
|
|
6406
6399
|
case 0:
|
|
6407
6400
|
accessTokenFilter = {
|
|
@@ -6676,7 +6669,7 @@ function _ts_generator$j(thisArg, body) {
|
|
|
6676
6669
|
var _this = this;
|
|
6677
6670
|
return _async_to_generator$j(function() {
|
|
6678
6671
|
var allAccountKeys, removedAccounts;
|
|
6679
|
-
return _ts_generator$
|
|
6672
|
+
return _ts_generator$k(this, function(_state) {
|
|
6680
6673
|
switch(_state.label){
|
|
6681
6674
|
case 0:
|
|
6682
6675
|
allAccountKeys = _this.getAccountKeys();
|
|
@@ -6707,7 +6700,7 @@ function _ts_generator$j(thisArg, body) {
|
|
|
6707
6700
|
var _this = this;
|
|
6708
6701
|
return _async_to_generator$j(function() {
|
|
6709
6702
|
var account;
|
|
6710
|
-
return _ts_generator$
|
|
6703
|
+
return _ts_generator$k(this, function(_state) {
|
|
6711
6704
|
switch(_state.label){
|
|
6712
6705
|
case 0:
|
|
6713
6706
|
account = _this.getAccount(accountKey, _this.commonLogger);
|
|
@@ -6740,7 +6733,7 @@ function _ts_generator$j(thisArg, body) {
|
|
|
6740
6733
|
var _this = this;
|
|
6741
6734
|
return _async_to_generator$j(function() {
|
|
6742
6735
|
var allTokenKeys, accountId, removedCredentials;
|
|
6743
|
-
return _ts_generator$
|
|
6736
|
+
return _ts_generator$k(this, function(_state) {
|
|
6744
6737
|
switch(_state.label){
|
|
6745
6738
|
case 0:
|
|
6746
6739
|
allTokenKeys = _this.getTokenKeys();
|
|
@@ -6841,7 +6834,7 @@ function _ts_generator$j(thisArg, body) {
|
|
|
6841
6834
|
var _this = this;
|
|
6842
6835
|
return _async_to_generator$j(function() {
|
|
6843
6836
|
var credential, accessTokenWithAuthSchemeEntity, kid;
|
|
6844
|
-
return _ts_generator$
|
|
6837
|
+
return _ts_generator$k(this, function(_state) {
|
|
6845
6838
|
switch(_state.label){
|
|
6846
6839
|
case 0:
|
|
6847
6840
|
credential = _this.getAccessTokenCredential(key);
|
|
@@ -7660,7 +7653,7 @@ function _ts_generator$j(thisArg, body) {
|
|
|
7660
7653
|
key: "clear",
|
|
7661
7654
|
value: function clear() {
|
|
7662
7655
|
return _async_to_generator$j(function() {
|
|
7663
|
-
return _ts_generator$
|
|
7656
|
+
return _ts_generator$k(this, function(_state) {
|
|
7664
7657
|
throw createClientAuthError(methodNotImplemented);
|
|
7665
7658
|
});
|
|
7666
7659
|
})();
|
|
@@ -7739,7 +7732,7 @@ function _object_spread$9(target) {
|
|
|
7739
7732
|
}
|
|
7740
7733
|
return target;
|
|
7741
7734
|
}
|
|
7742
|
-
function _ts_generator$
|
|
7735
|
+
function _ts_generator$j(thisArg, body) {
|
|
7743
7736
|
var f, y, t, g, _ = {
|
|
7744
7737
|
label: 0,
|
|
7745
7738
|
sent: function() {
|
|
@@ -7855,14 +7848,14 @@ var DEFAULT_CACHE_OPTIONS$1 = {
|
|
|
7855
7848
|
var DEFAULT_NETWORK_IMPLEMENTATION = {
|
|
7856
7849
|
sendGetRequestAsync: function sendGetRequestAsync() {
|
|
7857
7850
|
return _async_to_generator$i(function() {
|
|
7858
|
-
return _ts_generator$
|
|
7851
|
+
return _ts_generator$j(this, function(_state) {
|
|
7859
7852
|
throw createClientAuthError(methodNotImplemented);
|
|
7860
7853
|
});
|
|
7861
7854
|
})();
|
|
7862
7855
|
},
|
|
7863
7856
|
sendPostRequestAsync: function sendPostRequestAsync() {
|
|
7864
7857
|
return _async_to_generator$i(function() {
|
|
7865
|
-
return _ts_generator$
|
|
7858
|
+
return _ts_generator$j(this, function(_state) {
|
|
7866
7859
|
throw createClientAuthError(methodNotImplemented);
|
|
7867
7860
|
});
|
|
7868
7861
|
})();
|
|
@@ -8200,14 +8193,14 @@ function _create_class$x(Constructor, protoProps, staticProps) {
|
|
|
8200
8193
|
if (staticProps) _defineProperties$x(Constructor, staticProps);
|
|
8201
8194
|
return Constructor;
|
|
8202
8195
|
}
|
|
8203
|
-
function _instanceof$
|
|
8196
|
+
function _instanceof$h(left, right) {
|
|
8204
8197
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
8205
8198
|
return !!right[Symbol.hasInstance](left);
|
|
8206
8199
|
} else {
|
|
8207
8200
|
return left instanceof right;
|
|
8208
8201
|
}
|
|
8209
8202
|
}
|
|
8210
|
-
function _ts_generator$
|
|
8203
|
+
function _ts_generator$i(thisArg, body) {
|
|
8211
8204
|
var f, y, t, g, _ = {
|
|
8212
8205
|
label: 0,
|
|
8213
8206
|
sent: function() {
|
|
@@ -8323,7 +8316,7 @@ function _ts_generator$h(thisArg, body) {
|
|
|
8323
8316
|
var _this = this;
|
|
8324
8317
|
return _async_to_generator$h(function() {
|
|
8325
8318
|
var response, e;
|
|
8326
|
-
return _ts_generator$
|
|
8319
|
+
return _ts_generator$i(this, function(_state) {
|
|
8327
8320
|
switch(_state.label){
|
|
8328
8321
|
case 0:
|
|
8329
8322
|
ThrottlingUtils.preProcess(_this.cacheManager, thumbprint);
|
|
@@ -8347,7 +8340,7 @@ function _ts_generator$h(thisArg, body) {
|
|
|
8347
8340
|
];
|
|
8348
8341
|
case 3:
|
|
8349
8342
|
e = _state.sent();
|
|
8350
|
-
if (_instanceof$
|
|
8343
|
+
if (_instanceof$h(e, AuthError)) {
|
|
8351
8344
|
throw e;
|
|
8352
8345
|
} else {
|
|
8353
8346
|
throw createClientAuthError(networkError);
|
|
@@ -9065,7 +9058,7 @@ function _create_class$u(Constructor, protoProps, staticProps) {
|
|
|
9065
9058
|
if (staticProps) _defineProperties$u(Constructor, staticProps);
|
|
9066
9059
|
return Constructor;
|
|
9067
9060
|
}
|
|
9068
|
-
function _ts_generator$
|
|
9061
|
+
function _ts_generator$h(thisArg, body) {
|
|
9069
9062
|
var f, y, t, g, _ = {
|
|
9070
9063
|
label: 0,
|
|
9071
9064
|
sent: function() {
|
|
@@ -9226,7 +9219,7 @@ function _ts_generator$g(thisArg, body) {
|
|
|
9226
9219
|
var _this = this;
|
|
9227
9220
|
return _async_to_generator$g(function() {
|
|
9228
9221
|
var _response_body_refresh_token, _response_headers, _this_performanceClient, _this_performanceClient1, response;
|
|
9229
|
-
return _ts_generator$
|
|
9222
|
+
return _ts_generator$h(this, function(_state) {
|
|
9230
9223
|
switch(_state.label){
|
|
9231
9224
|
case 0:
|
|
9232
9225
|
if (queuedEvent) {
|
|
@@ -9267,7 +9260,7 @@ function _ts_generator$g(thisArg, body) {
|
|
|
9267
9260
|
var _this = this;
|
|
9268
9261
|
return _async_to_generator$g(function() {
|
|
9269
9262
|
var _this_performanceClient, cloudInstanceAuthorityUri, cloudInstanceAuthority;
|
|
9270
|
-
return _ts_generator$
|
|
9263
|
+
return _ts_generator$h(this, function(_state) {
|
|
9271
9264
|
switch(_state.label){
|
|
9272
9265
|
case 0:
|
|
9273
9266
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.UpdateTokenEndpointAuthority, correlationId);
|
|
@@ -9648,7 +9641,7 @@ function _object_spread$8(target) {
|
|
|
9648
9641
|
}
|
|
9649
9642
|
return target;
|
|
9650
9643
|
}
|
|
9651
|
-
function _ts_generator$
|
|
9644
|
+
function _ts_generator$g(thisArg, body) {
|
|
9652
9645
|
var f, y, t, g, _ = {
|
|
9653
9646
|
label: 0,
|
|
9654
9647
|
sent: function() {
|
|
@@ -9768,7 +9761,7 @@ function _ts_generator$f(thisArg, body) {
|
|
|
9768
9761
|
var _this = this;
|
|
9769
9762
|
return _async_to_generator$f(function() {
|
|
9770
9763
|
var _this_performanceClient, reqCnf, reqCnfString;
|
|
9771
|
-
return _ts_generator$
|
|
9764
|
+
return _ts_generator$g(this, function(_state) {
|
|
9772
9765
|
switch(_state.label){
|
|
9773
9766
|
case 0:
|
|
9774
9767
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.PopTokenGenerateCnf, request.correlationId);
|
|
@@ -9801,7 +9794,7 @@ function _ts_generator$f(thisArg, body) {
|
|
|
9801
9794
|
var _this = this;
|
|
9802
9795
|
return _async_to_generator$f(function() {
|
|
9803
9796
|
var _this_performanceClient, kidThumbprint;
|
|
9804
|
-
return _ts_generator$
|
|
9797
|
+
return _ts_generator$g(this, function(_state) {
|
|
9805
9798
|
switch(_state.label){
|
|
9806
9799
|
case 0:
|
|
9807
9800
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.PopTokenGenerateKid, request.correlationId);
|
|
@@ -9833,7 +9826,7 @@ function _ts_generator$f(thisArg, body) {
|
|
|
9833
9826
|
*/ function signPopToken(accessToken, keyId, request) {
|
|
9834
9827
|
var _this = this;
|
|
9835
9828
|
return _async_to_generator$f(function() {
|
|
9836
|
-
return _ts_generator$
|
|
9829
|
+
return _ts_generator$g(this, function(_state) {
|
|
9837
9830
|
return [
|
|
9838
9831
|
2,
|
|
9839
9832
|
_this.signPayload(accessToken, keyId, request)
|
|
@@ -9855,7 +9848,7 @@ function _ts_generator$f(thisArg, body) {
|
|
|
9855
9848
|
var _this = this;
|
|
9856
9849
|
return _async_to_generator$f(function() {
|
|
9857
9850
|
var resourceRequestMethod, resourceRequestUri, shrClaims, shrNonce, shrOptions, resourceUrlString, resourceUrlComponents;
|
|
9858
|
-
return _ts_generator$
|
|
9851
|
+
return _ts_generator$g(this, function(_state) {
|
|
9859
9852
|
// Deconstruct request to extract SHR parameters
|
|
9860
9853
|
resourceRequestMethod = request.resourceRequestMethod, resourceRequestUri = request.resourceRequestUri, shrClaims = request.shrClaims, shrNonce = request.shrNonce, shrOptions = request.shrOptions;
|
|
9861
9854
|
resourceUrlString = resourceRequestUri ? new UrlString(resourceRequestUri) : undefined;
|
|
@@ -9984,7 +9977,7 @@ function _create_class$q(Constructor, protoProps, staticProps) {
|
|
|
9984
9977
|
if (staticProps) _defineProperties$q(Constructor, staticProps);
|
|
9985
9978
|
return Constructor;
|
|
9986
9979
|
}
|
|
9987
|
-
function _ts_generator$
|
|
9980
|
+
function _ts_generator$f(thisArg, body) {
|
|
9988
9981
|
var f, y, t, g, _ = {
|
|
9989
9982
|
label: 0,
|
|
9990
9983
|
sent: function() {
|
|
@@ -10180,7 +10173,7 @@ function _ts_generator$e(thisArg, body) {
|
|
|
10180
10173
|
var _this = this;
|
|
10181
10174
|
return _async_to_generator$e(function() {
|
|
10182
10175
|
var _this_performanceClient, idTokenClaims, authTime, requestStateObj, cacheRecord, cacheContext, key, account;
|
|
10183
|
-
return _ts_generator$
|
|
10176
|
+
return _ts_generator$f(this, function(_state) {
|
|
10184
10177
|
switch(_state.label){
|
|
10185
10178
|
case 0:
|
|
10186
10179
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.HandleServerTokenResponse, serverTokenResponse.correlation_id);
|
|
@@ -10369,7 +10362,7 @@ function _ts_generator$e(thisArg, body) {
|
|
|
10369
10362
|
*/ function generateAuthenticationResult(cryptoObj, authority, cacheRecord, fromTokenCache, request, idTokenClaims, requestState, serverTokenResponse, requestId) {
|
|
10370
10363
|
return _async_to_generator$e(function() {
|
|
10371
10364
|
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;
|
|
10372
|
-
return _ts_generator$
|
|
10365
|
+
return _ts_generator$f(this, function(_state) {
|
|
10373
10366
|
switch(_state.label){
|
|
10374
10367
|
case 0:
|
|
10375
10368
|
accessToken = Constants$1.EMPTY_STRING;
|
|
@@ -10476,11 +10469,10 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
|
|
|
10476
10469
|
nativeAccountId: nativeAccountId
|
|
10477
10470
|
}, authority, base64Decode);
|
|
10478
10471
|
var tenantProfiles = baseAccount.tenantProfiles || [];
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
return tenantProfile.tenantId === tenantId;
|
|
10472
|
+
if (claimsTenantId && idTokenClaims && !tenantProfiles.find(function(tenantProfile) {
|
|
10473
|
+
return tenantProfile.tenantId === claimsTenantId;
|
|
10482
10474
|
})) {
|
|
10483
|
-
var newTenantProfile =
|
|
10475
|
+
var newTenantProfile = buildTenantProfileFromIdTokenClaims(homeAccountId, idTokenClaims);
|
|
10484
10476
|
tenantProfiles.push(newTenantProfile);
|
|
10485
10477
|
}
|
|
10486
10478
|
baseAccount.tenantProfiles = tenantProfiles;
|
|
@@ -10639,7 +10631,7 @@ function _create_super$9(Derived) {
|
|
|
10639
10631
|
return _possible_constructor_return$9(this, result);
|
|
10640
10632
|
};
|
|
10641
10633
|
}
|
|
10642
|
-
function _ts_generator$
|
|
10634
|
+
function _ts_generator$e(thisArg, body) {
|
|
10643
10635
|
var f, y, t, g, _ = {
|
|
10644
10636
|
label: 0,
|
|
10645
10637
|
sent: function() {
|
|
@@ -10769,7 +10761,7 @@ function _ts_generator$d(thisArg, body) {
|
|
|
10769
10761
|
var _this = this;
|
|
10770
10762
|
return _async_to_generator$d(function() {
|
|
10771
10763
|
var _this_performanceClient, queryString;
|
|
10772
|
-
return _ts_generator$
|
|
10764
|
+
return _ts_generator$e(this, function(_state) {
|
|
10773
10765
|
switch(_state.label){
|
|
10774
10766
|
case 0:
|
|
10775
10767
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.GetAuthCodeUrl, request.correlationId);
|
|
@@ -10798,7 +10790,7 @@ function _ts_generator$d(thisArg, body) {
|
|
|
10798
10790
|
var _this = this;
|
|
10799
10791
|
return _async_to_generator$d(function() {
|
|
10800
10792
|
var _this_performanceClient, _response_headers, reqTimestamp, response, requestId, responseHandler;
|
|
10801
|
-
return _ts_generator$
|
|
10793
|
+
return _ts_generator$e(this, function(_state) {
|
|
10802
10794
|
switch(_state.label){
|
|
10803
10795
|
case 0:
|
|
10804
10796
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthClientAcquireToken, request.correlationId);
|
|
@@ -10870,7 +10862,7 @@ function _ts_generator$d(thisArg, body) {
|
|
|
10870
10862
|
var _this = this;
|
|
10871
10863
|
return _async_to_generator$d(function() {
|
|
10872
10864
|
var _this_performanceClient, _request_tokenBodyParameters, queryParametersString, endpoint, requestBody, ccsCredential, clientInfo, headers, thumbprint;
|
|
10873
|
-
return _ts_generator$
|
|
10865
|
+
return _ts_generator$e(this, function(_state) {
|
|
10874
10866
|
switch(_state.label){
|
|
10875
10867
|
case 0:
|
|
10876
10868
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthClientExecuteTokenRequest, request.correlationId);
|
|
@@ -10924,7 +10916,7 @@ function _ts_generator$d(thisArg, body) {
|
|
|
10924
10916
|
var _this = this;
|
|
10925
10917
|
return _async_to_generator$d(function() {
|
|
10926
10918
|
var _this_performanceClient, _request_tokenBodyParameters, parameterBuilder, clientAssertion, _, popTokenGenerator, reqCnfData, generatedReqCnfData, correlationId, ccsCred, clientInfo, clientInfo1;
|
|
10927
|
-
return _ts_generator$
|
|
10919
|
+
return _ts_generator$e(this, function(_state) {
|
|
10928
10920
|
switch(_state.label){
|
|
10929
10921
|
case 0:
|
|
10930
10922
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthClientCreateTokenRequestBody, request.correlationId);
|
|
@@ -11077,7 +11069,7 @@ function _ts_generator$d(thisArg, body) {
|
|
|
11077
11069
|
var _this = this;
|
|
11078
11070
|
return _async_to_generator$d(function() {
|
|
11079
11071
|
var _this_performanceClient, _request_extraQueryParameters, parameterBuilder, requestScopes, correlationId, accountSid, accountLoginHintClaim, clientInfo, clientInfo1, clientInfo2, popTokenGenerator, reqCnfData, generatedReqCnfData;
|
|
11080
|
-
return _ts_generator$
|
|
11072
|
+
return _ts_generator$e(this, function(_state) {
|
|
11081
11073
|
switch(_state.label){
|
|
11082
11074
|
case 0:
|
|
11083
11075
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthClientCreateQueryString, request.correlationId);
|
|
@@ -11358,7 +11350,7 @@ function _inherits$8(subClass, superClass) {
|
|
|
11358
11350
|
});
|
|
11359
11351
|
if (superClass) _set_prototype_of$8(subClass, superClass);
|
|
11360
11352
|
}
|
|
11361
|
-
function _instanceof$
|
|
11353
|
+
function _instanceof$g(left, right) {
|
|
11362
11354
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
11363
11355
|
return !!right[Symbol.hasInstance](left);
|
|
11364
11356
|
} else {
|
|
@@ -11445,7 +11437,7 @@ function _create_super$8(Derived) {
|
|
|
11445
11437
|
return _possible_constructor_return$8(this, result);
|
|
11446
11438
|
};
|
|
11447
11439
|
}
|
|
11448
|
-
function _ts_generator$
|
|
11440
|
+
function _ts_generator$d(thisArg, body) {
|
|
11449
11441
|
var f, y, t, g, _ = {
|
|
11450
11442
|
label: 0,
|
|
11451
11443
|
sent: function() {
|
|
@@ -11561,7 +11553,7 @@ function _ts_generator$c(thisArg, body) {
|
|
|
11561
11553
|
var _this = this;
|
|
11562
11554
|
return _async_to_generator$c(function() {
|
|
11563
11555
|
var _this_performanceClient, _response_headers, reqTimestamp, response, requestId, responseHandler;
|
|
11564
|
-
return _ts_generator$
|
|
11556
|
+
return _ts_generator$d(this, function(_state) {
|
|
11565
11557
|
switch(_state.label){
|
|
11566
11558
|
case 0:
|
|
11567
11559
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
|
|
@@ -11594,7 +11586,7 @@ function _ts_generator$c(thisArg, body) {
|
|
|
11594
11586
|
var _this = this;
|
|
11595
11587
|
return _async_to_generator$c(function() {
|
|
11596
11588
|
var _this_performanceClient, isFOCI, e, noFamilyRTInCache, clientMismatchErrorWithFamilyRT;
|
|
11597
|
-
return _ts_generator$
|
|
11589
|
+
return _ts_generator$d(this, function(_state) {
|
|
11598
11590
|
switch(_state.label){
|
|
11599
11591
|
case 0:
|
|
11600
11592
|
// Cannot renew token if no request object is given.
|
|
@@ -11631,8 +11623,8 @@ function _ts_generator$c(thisArg, body) {
|
|
|
11631
11623
|
];
|
|
11632
11624
|
case 3:
|
|
11633
11625
|
e = _state.sent();
|
|
11634
|
-
noFamilyRTInCache = _instanceof$
|
|
11635
|
-
clientMismatchErrorWithFamilyRT = _instanceof$
|
|
11626
|
+
noFamilyRTInCache = _instanceof$g(e, InteractionRequiredAuthError) && e.errorCode === noTokensFound;
|
|
11627
|
+
clientMismatchErrorWithFamilyRT = _instanceof$g(e, ServerError) && e.errorCode === Errors.INVALID_GRANT_ERROR && e.subError === Errors.CLIENT_MISMATCH_ERROR;
|
|
11636
11628
|
// if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART)
|
|
11637
11629
|
if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) {
|
|
11638
11630
|
return [
|
|
@@ -11663,7 +11655,7 @@ function _ts_generator$c(thisArg, body) {
|
|
|
11663
11655
|
var _this = this;
|
|
11664
11656
|
return _async_to_generator$c(function() {
|
|
11665
11657
|
var _this_performanceClient, refreshToken, refreshTokenRequest, e, badRefreshTokenKey;
|
|
11666
|
-
return _ts_generator$
|
|
11658
|
+
return _ts_generator$d(this, function(_state) {
|
|
11667
11659
|
switch(_state.label){
|
|
11668
11660
|
case 0:
|
|
11669
11661
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, request.correlationId);
|
|
@@ -11703,7 +11695,7 @@ function _ts_generator$c(thisArg, body) {
|
|
|
11703
11695
|
];
|
|
11704
11696
|
case 3:
|
|
11705
11697
|
e = _state.sent();
|
|
11706
|
-
if (_instanceof$
|
|
11698
|
+
if (_instanceof$g(e, InteractionRequiredAuthError) && e.subError === badToken) {
|
|
11707
11699
|
// Remove bad refresh token from cache
|
|
11708
11700
|
_this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");
|
|
11709
11701
|
badRefreshTokenKey = generateCredentialKey(refreshToken);
|
|
@@ -11729,7 +11721,7 @@ function _ts_generator$c(thisArg, body) {
|
|
|
11729
11721
|
var _this = this;
|
|
11730
11722
|
return _async_to_generator$c(function() {
|
|
11731
11723
|
var _this_performanceClient, _request_tokenBodyParameters, queryParametersString, endpoint, requestBody, headers, thumbprint;
|
|
11732
|
-
return _ts_generator$
|
|
11724
|
+
return _ts_generator$d(this, function(_state) {
|
|
11733
11725
|
switch(_state.label){
|
|
11734
11726
|
case 0:
|
|
11735
11727
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RefreshTokenClientExecuteTokenRequest, request.correlationId);
|
|
@@ -11771,7 +11763,7 @@ function _ts_generator$c(thisArg, body) {
|
|
|
11771
11763
|
var _this = this;
|
|
11772
11764
|
return _async_to_generator$c(function() {
|
|
11773
11765
|
var _this_performanceClient, _request_tokenBodyParameters, _this_config_authOptions_authority_options_OIDCOptions, correlationId, parameterBuilder, clientAssertion, _, popTokenGenerator, reqCnfData, generatedReqCnfData, clientInfo;
|
|
11774
|
-
return _ts_generator$
|
|
11766
|
+
return _ts_generator$d(this, function(_state) {
|
|
11775
11767
|
switch(_state.label){
|
|
11776
11768
|
case 0:
|
|
11777
11769
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, request.correlationId);
|
|
@@ -11983,7 +11975,7 @@ function _inherits$7(subClass, superClass) {
|
|
|
11983
11975
|
});
|
|
11984
11976
|
if (superClass) _set_prototype_of$7(subClass, superClass);
|
|
11985
11977
|
}
|
|
11986
|
-
function _instanceof$
|
|
11978
|
+
function _instanceof$f(left, right) {
|
|
11987
11979
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
11988
11980
|
return !!right[Symbol.hasInstance](left);
|
|
11989
11981
|
} else {
|
|
@@ -12117,7 +12109,7 @@ function _create_super$7(Derived) {
|
|
|
12117
12109
|
return _possible_constructor_return$7(this, result);
|
|
12118
12110
|
};
|
|
12119
12111
|
}
|
|
12120
|
-
function _ts_generator$
|
|
12112
|
+
function _ts_generator$c(thisArg, body) {
|
|
12121
12113
|
var f, y, t, g, _ = {
|
|
12122
12114
|
label: 0,
|
|
12123
12115
|
sent: function() {
|
|
@@ -12233,7 +12225,7 @@ function _ts_generator$b(thisArg, body) {
|
|
|
12233
12225
|
var _this = this;
|
|
12234
12226
|
return _async_to_generator$b(function() {
|
|
12235
12227
|
var _request_scopes, _ref, authResponse, cacheOutcome, refreshTokenClient, e, refreshTokenClient1;
|
|
12236
|
-
return _ts_generator$
|
|
12228
|
+
return _ts_generator$c(this, function(_state) {
|
|
12237
12229
|
switch(_state.label){
|
|
12238
12230
|
case 0:
|
|
12239
12231
|
_state.trys.push([
|
|
@@ -12269,7 +12261,7 @@ function _ts_generator$b(thisArg, body) {
|
|
|
12269
12261
|
];
|
|
12270
12262
|
case 2:
|
|
12271
12263
|
e = _state.sent();
|
|
12272
|
-
if (_instanceof$
|
|
12264
|
+
if (_instanceof$f(e, ClientAuthError) && e.errorCode === tokenRefreshRequired) {
|
|
12273
12265
|
refreshTokenClient1 = new RefreshTokenClient(_this.config, _this.performanceClient);
|
|
12274
12266
|
return [
|
|
12275
12267
|
2,
|
|
@@ -12296,7 +12288,7 @@ function _ts_generator$b(thisArg, body) {
|
|
|
12296
12288
|
var _this = this;
|
|
12297
12289
|
return _async_to_generator$b(function() {
|
|
12298
12290
|
var _this_performanceClient, lastCacheOutcome, requestTenantId, tokenKeys, cachedAccessToken, environment, cacheRecord;
|
|
12299
|
-
return _ts_generator$
|
|
12291
|
+
return _ts_generator$c(this, function(_state) {
|
|
12300
12292
|
switch(_state.label){
|
|
12301
12293
|
case 0:
|
|
12302
12294
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.SilentFlowClientAcquireCachedToken, request.correlationId);
|
|
@@ -12377,7 +12369,7 @@ function _ts_generator$b(thisArg, body) {
|
|
|
12377
12369
|
var _this = this;
|
|
12378
12370
|
return _async_to_generator$b(function() {
|
|
12379
12371
|
var _this_performanceClient, idTokenClaims, authTime;
|
|
12380
|
-
return _ts_generator$
|
|
12372
|
+
return _ts_generator$c(this, function(_state) {
|
|
12381
12373
|
(_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, request.correlationId);
|
|
12382
12374
|
if (cacheRecord.idToken) {
|
|
12383
12375
|
idTokenClaims = extractTokenClaims(cacheRecord.idToken.secret, _this.config.cryptoInterface.base64Decode);
|
|
@@ -12421,7 +12413,7 @@ function _create_class$m(Constructor, protoProps, staticProps) {
|
|
|
12421
12413
|
if (staticProps) _defineProperties$m(Constructor, staticProps);
|
|
12422
12414
|
return Constructor;
|
|
12423
12415
|
}
|
|
12424
|
-
function _instanceof$
|
|
12416
|
+
function _instanceof$e(left, right) {
|
|
12425
12417
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
12426
12418
|
return !!right[Symbol.hasInstance](left);
|
|
12427
12419
|
} else {
|
|
@@ -12504,8 +12496,8 @@ function _instanceof$d(left, right) {
|
|
|
12504
12496
|
lastRequests.errors.shift();
|
|
12505
12497
|
}
|
|
12506
12498
|
lastRequests.failedRequests.push(this.apiId, this.correlationId);
|
|
12507
|
-
if (_instanceof$
|
|
12508
|
-
if (_instanceof$
|
|
12499
|
+
if (_instanceof$e(error, Error) && !!error && error.toString()) {
|
|
12500
|
+
if (_instanceof$e(error, AuthError)) {
|
|
12509
12501
|
if (error.subError) {
|
|
12510
12502
|
lastRequests.errors.push(error.subError);
|
|
12511
12503
|
} else if (error.errorCode) {
|
|
@@ -12907,8 +12899,6 @@ var ProxyStatus = {
|
|
|
12907
12899
|
*/ var JwtConstants = {
|
|
12908
12900
|
ALGORITHM: "alg",
|
|
12909
12901
|
RSA_256: "RS256",
|
|
12910
|
-
PSS_256: "PS256",
|
|
12911
|
-
X5T_256: "x5t#S256",
|
|
12912
12902
|
X5T: "x5t",
|
|
12913
12903
|
X5C: "x5c",
|
|
12914
12904
|
AUDIENCE: "aud",
|
|
@@ -13118,7 +13108,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
13118
13108
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
13119
13109
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
|
|
13120
13110
|
}
|
|
13121
|
-
function _ts_generator$
|
|
13111
|
+
function _ts_generator$b(thisArg, body) {
|
|
13122
13112
|
var f, y, t, g, _ = {
|
|
13123
13113
|
label: 0,
|
|
13124
13114
|
sent: function() {
|
|
@@ -13234,7 +13224,7 @@ function _ts_generator$a(thisArg, body) {
|
|
|
13234
13224
|
*/ function sendGetRequestAsync(url, options, timeout) {
|
|
13235
13225
|
var _this = this;
|
|
13236
13226
|
return _async_to_generator$a(function() {
|
|
13237
|
-
return _ts_generator$
|
|
13227
|
+
return _ts_generator$b(this, function(_state) {
|
|
13238
13228
|
if (_this.proxyUrl) {
|
|
13239
13229
|
return [
|
|
13240
13230
|
2,
|
|
@@ -13259,7 +13249,7 @@ function _ts_generator$a(thisArg, body) {
|
|
|
13259
13249
|
*/ function sendPostRequestAsync(url, options) {
|
|
13260
13250
|
var _this = this;
|
|
13261
13251
|
return _async_to_generator$a(function() {
|
|
13262
|
-
return _ts_generator$
|
|
13252
|
+
return _ts_generator$b(this, function(_state) {
|
|
13263
13253
|
if (_this.proxyUrl) {
|
|
13264
13254
|
return [
|
|
13265
13255
|
2,
|
|
@@ -13631,274 +13621,70 @@ function createManagedIdentityError(errorCode) {
|
|
|
13631
13621
|
return new ManagedIdentityError(errorCode);
|
|
13632
13622
|
}
|
|
13633
13623
|
|
|
13634
|
-
function
|
|
13635
|
-
if (
|
|
13636
|
-
|
|
13637
|
-
|
|
13638
|
-
|
|
13639
|
-
|
|
13640
|
-
|
|
13641
|
-
|
|
13642
|
-
|
|
13624
|
+
function _define_property$5(obj, key, value) {
|
|
13625
|
+
if (key in obj) {
|
|
13626
|
+
Object.defineProperty(obj, key, {
|
|
13627
|
+
value: value,
|
|
13628
|
+
enumerable: true,
|
|
13629
|
+
configurable: true,
|
|
13630
|
+
writable: true
|
|
13631
|
+
});
|
|
13632
|
+
} else {
|
|
13633
|
+
obj[key] = value;
|
|
13643
13634
|
}
|
|
13635
|
+
return obj;
|
|
13644
13636
|
}
|
|
13645
|
-
function
|
|
13646
|
-
for(var i =
|
|
13647
|
-
var
|
|
13648
|
-
|
|
13649
|
-
|
|
13650
|
-
|
|
13651
|
-
|
|
13637
|
+
function _object_spread$4(target) {
|
|
13638
|
+
for(var i = 1; i < arguments.length; i++){
|
|
13639
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
13640
|
+
var ownKeys = Object.keys(source);
|
|
13641
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
13642
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
13643
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
13644
|
+
}));
|
|
13645
|
+
}
|
|
13646
|
+
ownKeys.forEach(function(key) {
|
|
13647
|
+
_define_property$5(target, key, source[key]);
|
|
13648
|
+
});
|
|
13652
13649
|
}
|
|
13650
|
+
return target;
|
|
13653
13651
|
}
|
|
13654
|
-
function
|
|
13655
|
-
|
|
13656
|
-
if (
|
|
13657
|
-
|
|
13658
|
-
|
|
13659
|
-
|
|
13660
|
-
|
|
13661
|
-
|
|
13662
|
-
};
|
|
13663
|
-
return _get_prototype_of$5(o);
|
|
13664
|
-
}
|
|
13665
|
-
function _inherits$5(subClass, superClass) {
|
|
13666
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
13667
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
13668
|
-
}
|
|
13669
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
13670
|
-
constructor: {
|
|
13671
|
-
value: subClass,
|
|
13672
|
-
writable: true,
|
|
13673
|
-
configurable: true
|
|
13652
|
+
function ownKeys$3(object, enumerableOnly) {
|
|
13653
|
+
var keys = Object.keys(object);
|
|
13654
|
+
if (Object.getOwnPropertySymbols) {
|
|
13655
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
13656
|
+
if (enumerableOnly) {
|
|
13657
|
+
symbols = symbols.filter(function(sym) {
|
|
13658
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
13659
|
+
});
|
|
13674
13660
|
}
|
|
13675
|
-
|
|
13676
|
-
if (superClass) _set_prototype_of$5(subClass, superClass);
|
|
13677
|
-
}
|
|
13678
|
-
function _possible_constructor_return$5(self, call) {
|
|
13679
|
-
if (call && (_type_of$d(call) === "object" || typeof call === "function")) {
|
|
13680
|
-
return call;
|
|
13661
|
+
keys.push.apply(keys, symbols);
|
|
13681
13662
|
}
|
|
13682
|
-
return
|
|
13683
|
-
}
|
|
13684
|
-
function _set_prototype_of$5(o, p) {
|
|
13685
|
-
_set_prototype_of$5 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
13686
|
-
o.__proto__ = p;
|
|
13687
|
-
return o;
|
|
13688
|
-
};
|
|
13689
|
-
return _set_prototype_of$5(o, p);
|
|
13690
|
-
}
|
|
13691
|
-
function _type_of$d(obj) {
|
|
13692
|
-
"@swc/helpers - typeof";
|
|
13693
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
13663
|
+
return keys;
|
|
13694
13664
|
}
|
|
13695
|
-
function
|
|
13696
|
-
|
|
13697
|
-
if (
|
|
13698
|
-
|
|
13699
|
-
|
|
13700
|
-
|
|
13701
|
-
|
|
13702
|
-
|
|
13703
|
-
return false;
|
|
13665
|
+
function _object_spread_props$3(target, source) {
|
|
13666
|
+
source = source != null ? source : {};
|
|
13667
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
13668
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
13669
|
+
} else {
|
|
13670
|
+
ownKeys$3(Object(source)).forEach(function(key) {
|
|
13671
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
13672
|
+
});
|
|
13704
13673
|
}
|
|
13705
|
-
|
|
13706
|
-
function _create_super$5(Derived) {
|
|
13707
|
-
var hasNativeReflectConstruct = _is_native_reflect_construct$5();
|
|
13708
|
-
return function _createSuperInternal() {
|
|
13709
|
-
var Super = _get_prototype_of$5(Derived), result;
|
|
13710
|
-
if (hasNativeReflectConstruct) {
|
|
13711
|
-
var NewTarget = _get_prototype_of$5(this).constructor;
|
|
13712
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
13713
|
-
} else {
|
|
13714
|
-
result = Super.apply(this, arguments);
|
|
13715
|
-
}
|
|
13716
|
-
return _possible_constructor_return$5(this, result);
|
|
13717
|
-
};
|
|
13674
|
+
return target;
|
|
13718
13675
|
}
|
|
13719
13676
|
/*
|
|
13720
13677
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13721
13678
|
* Licensed under the MIT License.
|
|
13722
|
-
*/
|
|
13723
|
-
|
|
13724
|
-
|
|
13725
|
-
|
|
13726
|
-
|
|
13727
|
-
|
|
13728
|
-
|
|
13729
|
-
|
|
13730
|
-
|
|
13731
|
-
desc: "Loopback server callback was invoked without a url. This is unexpected."
|
|
13732
|
-
},
|
|
13733
|
-
noAuthCodeInResponse: {
|
|
13734
|
-
code: "no_auth_code_in_response",
|
|
13735
|
-
desc: "No auth code found in the server response. Please check your network trace to determine what happened."
|
|
13736
|
-
},
|
|
13737
|
-
noLoopbackServerExists: {
|
|
13738
|
-
code: "no_loopback_server_exists",
|
|
13739
|
-
desc: "No loopback server exists yet."
|
|
13740
|
-
},
|
|
13741
|
-
loopbackServerAlreadyExists: {
|
|
13742
|
-
code: "loopback_server_already_exists",
|
|
13743
|
-
desc: "Loopback server already exists. Cannot create another."
|
|
13744
|
-
},
|
|
13745
|
-
loopbackServerTimeout: {
|
|
13746
|
-
code: "loopback_server_timeout",
|
|
13747
|
-
desc: "Timed out waiting for auth code listener to be registered."
|
|
13748
|
-
},
|
|
13749
|
-
stateNotFoundError: {
|
|
13750
|
-
code: "state_not_found",
|
|
13751
|
-
desc: "State not found. Please verify that the request originated from msal."
|
|
13752
|
-
},
|
|
13753
|
-
thumbprintMissing: {
|
|
13754
|
-
code: "thumbprint_missing_from_client_certificate",
|
|
13755
|
-
desc: "Client certificate does not contain a SHA-1 or SHA-256 thumbprint."
|
|
13756
|
-
}
|
|
13757
|
-
};
|
|
13758
|
-
var NodeAuthError = /*#__PURE__*/ function(AuthError) {
|
|
13759
|
-
_inherits$5(NodeAuthError, AuthError);
|
|
13760
|
-
var _super = _create_super$5(NodeAuthError);
|
|
13761
|
-
function NodeAuthError(errorCode, errorMessage) {
|
|
13762
|
-
_class_call_check$i(this, NodeAuthError);
|
|
13763
|
-
var _this;
|
|
13764
|
-
_this = _super.call(this, errorCode, errorMessage);
|
|
13765
|
-
_this.name = "NodeAuthError";
|
|
13766
|
-
return _this;
|
|
13767
|
-
}
|
|
13768
|
-
_create_class$i(NodeAuthError, null, [
|
|
13769
|
-
{
|
|
13770
|
-
key: "createInvalidLoopbackAddressTypeError",
|
|
13771
|
-
value: /**
|
|
13772
|
-
* Creates an error thrown if loopback server address is of type string.
|
|
13773
|
-
*/ function createInvalidLoopbackAddressTypeError() {
|
|
13774
|
-
return new NodeAuthError(NodeAuthErrorMessage.invalidLoopbackAddressType.code, "".concat(NodeAuthErrorMessage.invalidLoopbackAddressType.desc));
|
|
13775
|
-
}
|
|
13776
|
-
},
|
|
13777
|
-
{
|
|
13778
|
-
key: "createUnableToLoadRedirectUrlError",
|
|
13779
|
-
value: /**
|
|
13780
|
-
* Creates an error thrown if the loopback server is unable to get a url.
|
|
13781
|
-
*/ function createUnableToLoadRedirectUrlError() {
|
|
13782
|
-
return new NodeAuthError(NodeAuthErrorMessage.unableToLoadRedirectUri.code, "".concat(NodeAuthErrorMessage.unableToLoadRedirectUri.desc));
|
|
13783
|
-
}
|
|
13784
|
-
},
|
|
13785
|
-
{
|
|
13786
|
-
key: "createNoAuthCodeInResponseError",
|
|
13787
|
-
value: /**
|
|
13788
|
-
* Creates an error thrown if the server response does not contain an auth code.
|
|
13789
|
-
*/ function createNoAuthCodeInResponseError() {
|
|
13790
|
-
return new NodeAuthError(NodeAuthErrorMessage.noAuthCodeInResponse.code, "".concat(NodeAuthErrorMessage.noAuthCodeInResponse.desc));
|
|
13791
|
-
}
|
|
13792
|
-
},
|
|
13793
|
-
{
|
|
13794
|
-
key: "createNoLoopbackServerExistsError",
|
|
13795
|
-
value: /**
|
|
13796
|
-
* Creates an error thrown if the loopback server has not been spun up yet.
|
|
13797
|
-
*/ function createNoLoopbackServerExistsError() {
|
|
13798
|
-
return new NodeAuthError(NodeAuthErrorMessage.noLoopbackServerExists.code, "".concat(NodeAuthErrorMessage.noLoopbackServerExists.desc));
|
|
13799
|
-
}
|
|
13800
|
-
},
|
|
13801
|
-
{
|
|
13802
|
-
key: "createLoopbackServerAlreadyExistsError",
|
|
13803
|
-
value: /**
|
|
13804
|
-
* Creates an error thrown if a loopback server already exists when attempting to create another one.
|
|
13805
|
-
*/ function createLoopbackServerAlreadyExistsError() {
|
|
13806
|
-
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerAlreadyExists.code, "".concat(NodeAuthErrorMessage.loopbackServerAlreadyExists.desc));
|
|
13807
|
-
}
|
|
13808
|
-
},
|
|
13809
|
-
{
|
|
13810
|
-
key: "createLoopbackServerTimeoutError",
|
|
13811
|
-
value: /**
|
|
13812
|
-
* Creates an error thrown if the loopback server times out registering the auth code listener.
|
|
13813
|
-
*/ function createLoopbackServerTimeoutError() {
|
|
13814
|
-
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerTimeout.code, "".concat(NodeAuthErrorMessage.loopbackServerTimeout.desc));
|
|
13815
|
-
}
|
|
13816
|
-
},
|
|
13817
|
-
{
|
|
13818
|
-
key: "createStateNotFoundError",
|
|
13819
|
-
value: /**
|
|
13820
|
-
* Creates an error thrown when the state is not present.
|
|
13821
|
-
*/ function createStateNotFoundError() {
|
|
13822
|
-
return new NodeAuthError(NodeAuthErrorMessage.stateNotFoundError.code, NodeAuthErrorMessage.stateNotFoundError.desc);
|
|
13823
|
-
}
|
|
13824
|
-
},
|
|
13825
|
-
{
|
|
13826
|
-
key: "createThumbprintMissingError",
|
|
13827
|
-
value: /**
|
|
13828
|
-
* Creates an error thrown when client certificate was provided, but neither the SHA-1 or SHA-256 thumbprints were provided
|
|
13829
|
-
*/ function createThumbprintMissingError() {
|
|
13830
|
-
return new NodeAuthError(NodeAuthErrorMessage.thumbprintMissing.code, NodeAuthErrorMessage.thumbprintMissing.desc);
|
|
13831
|
-
}
|
|
13832
|
-
}
|
|
13833
|
-
]);
|
|
13834
|
-
return NodeAuthError;
|
|
13835
|
-
}(AuthError);
|
|
13836
|
-
|
|
13837
|
-
function _define_property$5(obj, key, value) {
|
|
13838
|
-
if (key in obj) {
|
|
13839
|
-
Object.defineProperty(obj, key, {
|
|
13840
|
-
value: value,
|
|
13841
|
-
enumerable: true,
|
|
13842
|
-
configurable: true,
|
|
13843
|
-
writable: true
|
|
13844
|
-
});
|
|
13845
|
-
} else {
|
|
13846
|
-
obj[key] = value;
|
|
13847
|
-
}
|
|
13848
|
-
return obj;
|
|
13849
|
-
}
|
|
13850
|
-
function _object_spread$4(target) {
|
|
13851
|
-
for(var i = 1; i < arguments.length; i++){
|
|
13852
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
13853
|
-
var ownKeys = Object.keys(source);
|
|
13854
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
13855
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
13856
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
13857
|
-
}));
|
|
13858
|
-
}
|
|
13859
|
-
ownKeys.forEach(function(key) {
|
|
13860
|
-
_define_property$5(target, key, source[key]);
|
|
13861
|
-
});
|
|
13862
|
-
}
|
|
13863
|
-
return target;
|
|
13864
|
-
}
|
|
13865
|
-
function ownKeys$3(object, enumerableOnly) {
|
|
13866
|
-
var keys = Object.keys(object);
|
|
13867
|
-
if (Object.getOwnPropertySymbols) {
|
|
13868
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
13869
|
-
if (enumerableOnly) {
|
|
13870
|
-
symbols = symbols.filter(function(sym) {
|
|
13871
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
13872
|
-
});
|
|
13873
|
-
}
|
|
13874
|
-
keys.push.apply(keys, symbols);
|
|
13875
|
-
}
|
|
13876
|
-
return keys;
|
|
13877
|
-
}
|
|
13878
|
-
function _object_spread_props$3(target, source) {
|
|
13879
|
-
source = source != null ? source : {};
|
|
13880
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
13881
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
13882
|
-
} else {
|
|
13883
|
-
ownKeys$3(Object(source)).forEach(function(key) {
|
|
13884
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
13885
|
-
});
|
|
13886
|
-
}
|
|
13887
|
-
return target;
|
|
13888
|
-
}
|
|
13889
|
-
/*
|
|
13890
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
13891
|
-
* Licensed under the MIT License.
|
|
13892
|
-
*/ var DEFAULT_AUTH_OPTIONS = {
|
|
13893
|
-
clientId: Constants$1.EMPTY_STRING,
|
|
13894
|
-
authority: Constants$1.DEFAULT_AUTHORITY,
|
|
13895
|
-
clientSecret: Constants$1.EMPTY_STRING,
|
|
13896
|
-
clientAssertion: Constants$1.EMPTY_STRING,
|
|
13897
|
-
clientCertificate: {
|
|
13898
|
-
thumbprint: Constants$1.EMPTY_STRING,
|
|
13899
|
-
thumbprintSha256: Constants$1.EMPTY_STRING,
|
|
13900
|
-
privateKey: Constants$1.EMPTY_STRING,
|
|
13901
|
-
x5c: Constants$1.EMPTY_STRING
|
|
13679
|
+
*/ var DEFAULT_AUTH_OPTIONS = {
|
|
13680
|
+
clientId: Constants$1.EMPTY_STRING,
|
|
13681
|
+
authority: Constants$1.DEFAULT_AUTHORITY,
|
|
13682
|
+
clientSecret: Constants$1.EMPTY_STRING,
|
|
13683
|
+
clientAssertion: Constants$1.EMPTY_STRING,
|
|
13684
|
+
clientCertificate: {
|
|
13685
|
+
thumbprint: Constants$1.EMPTY_STRING,
|
|
13686
|
+
privateKey: Constants$1.EMPTY_STRING,
|
|
13687
|
+
x5c: Constants$1.EMPTY_STRING
|
|
13902
13688
|
},
|
|
13903
13689
|
knownAuthorities: [],
|
|
13904
13690
|
cloudDiscoveryMetadata: Constants$1.EMPTY_STRING,
|
|
@@ -13951,10 +13737,6 @@ var DEFAULT_TELEMETRY_OPTIONS = {
|
|
|
13951
13737
|
loggerOptions: (system === null || system === void 0 ? void 0 : system.loggerOptions) || DEFAULT_LOGGER_OPTIONS,
|
|
13952
13738
|
disableInternalRetries: (system === null || system === void 0 ? void 0 : system.disableInternalRetries) || false
|
|
13953
13739
|
});
|
|
13954
|
-
// if client certificate was provided, ensure that at least one of the SHA-1 or SHA-256 thumbprints were provided
|
|
13955
|
-
if (!!auth.clientCertificate && !!!auth.clientCertificate.thumbprint && !!!auth.clientCertificate.thumbprintSha256) {
|
|
13956
|
-
throw NodeAuthError.createStateNotFoundError();
|
|
13957
|
-
}
|
|
13958
13740
|
return {
|
|
13959
13741
|
auth: _object_spread$4({}, DEFAULT_AUTH_OPTIONS, auth),
|
|
13960
13742
|
broker: _object_spread$4({}, broker),
|
|
@@ -14025,12 +13807,12 @@ function v4(options, buf, offset) {
|
|
|
14025
13807
|
return stringify(rnds);
|
|
14026
13808
|
}
|
|
14027
13809
|
|
|
14028
|
-
function _class_call_check$
|
|
13810
|
+
function _class_call_check$i(instance, Constructor) {
|
|
14029
13811
|
if (!(instance instanceof Constructor)) {
|
|
14030
13812
|
throw new TypeError("Cannot call a class as a function");
|
|
14031
13813
|
}
|
|
14032
13814
|
}
|
|
14033
|
-
function _defineProperties$
|
|
13815
|
+
function _defineProperties$i(target, props) {
|
|
14034
13816
|
for(var i = 0; i < props.length; i++){
|
|
14035
13817
|
var descriptor = props[i];
|
|
14036
13818
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -14039,9 +13821,9 @@ function _defineProperties$h(target, props) {
|
|
|
14039
13821
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14040
13822
|
}
|
|
14041
13823
|
}
|
|
14042
|
-
function _create_class$
|
|
14043
|
-
if (protoProps) _defineProperties$
|
|
14044
|
-
if (staticProps) _defineProperties$
|
|
13824
|
+
function _create_class$i(Constructor, protoProps, staticProps) {
|
|
13825
|
+
if (protoProps) _defineProperties$i(Constructor.prototype, protoProps);
|
|
13826
|
+
if (staticProps) _defineProperties$i(Constructor, staticProps);
|
|
14045
13827
|
return Constructor;
|
|
14046
13828
|
}
|
|
14047
13829
|
/*
|
|
@@ -14049,9 +13831,9 @@ function _create_class$h(Constructor, protoProps, staticProps) {
|
|
|
14049
13831
|
* Licensed under the MIT License.
|
|
14050
13832
|
*/ var GuidGenerator = /*#__PURE__*/ function() {
|
|
14051
13833
|
function GuidGenerator() {
|
|
14052
|
-
_class_call_check$
|
|
13834
|
+
_class_call_check$i(this, GuidGenerator);
|
|
14053
13835
|
}
|
|
14054
|
-
_create_class$
|
|
13836
|
+
_create_class$i(GuidGenerator, [
|
|
14055
13837
|
{
|
|
14056
13838
|
/**
|
|
14057
13839
|
*
|
|
@@ -14076,12 +13858,12 @@ function _create_class$h(Constructor, protoProps, staticProps) {
|
|
|
14076
13858
|
return GuidGenerator;
|
|
14077
13859
|
}();
|
|
14078
13860
|
|
|
14079
|
-
function _class_call_check$
|
|
13861
|
+
function _class_call_check$h(instance, Constructor) {
|
|
14080
13862
|
if (!(instance instanceof Constructor)) {
|
|
14081
13863
|
throw new TypeError("Cannot call a class as a function");
|
|
14082
13864
|
}
|
|
14083
13865
|
}
|
|
14084
|
-
function _defineProperties$
|
|
13866
|
+
function _defineProperties$h(target, props) {
|
|
14085
13867
|
for(var i = 0; i < props.length; i++){
|
|
14086
13868
|
var descriptor = props[i];
|
|
14087
13869
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -14090,9 +13872,9 @@ function _defineProperties$g(target, props) {
|
|
|
14090
13872
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14091
13873
|
}
|
|
14092
13874
|
}
|
|
14093
|
-
function _create_class$
|
|
14094
|
-
if (protoProps) _defineProperties$
|
|
14095
|
-
if (staticProps) _defineProperties$
|
|
13875
|
+
function _create_class$h(Constructor, protoProps, staticProps) {
|
|
13876
|
+
if (protoProps) _defineProperties$h(Constructor.prototype, protoProps);
|
|
13877
|
+
if (staticProps) _defineProperties$h(Constructor, staticProps);
|
|
14096
13878
|
return Constructor;
|
|
14097
13879
|
}
|
|
14098
13880
|
/*
|
|
@@ -14100,9 +13882,9 @@ function _create_class$g(Constructor, protoProps, staticProps) {
|
|
|
14100
13882
|
* Licensed under the MIT License.
|
|
14101
13883
|
*/ var EncodingUtils = /*#__PURE__*/ function() {
|
|
14102
13884
|
function EncodingUtils() {
|
|
14103
|
-
_class_call_check$
|
|
13885
|
+
_class_call_check$h(this, EncodingUtils);
|
|
14104
13886
|
}
|
|
14105
|
-
_create_class$
|
|
13887
|
+
_create_class$h(EncodingUtils, null, [
|
|
14106
13888
|
{
|
|
14107
13889
|
key: "base64Encode",
|
|
14108
13890
|
value: /**
|
|
@@ -14150,12 +13932,12 @@ function _create_class$g(Constructor, protoProps, staticProps) {
|
|
|
14150
13932
|
return EncodingUtils;
|
|
14151
13933
|
}();
|
|
14152
13934
|
|
|
14153
|
-
function _class_call_check$
|
|
13935
|
+
function _class_call_check$g(instance, Constructor) {
|
|
14154
13936
|
if (!(instance instanceof Constructor)) {
|
|
14155
13937
|
throw new TypeError("Cannot call a class as a function");
|
|
14156
13938
|
}
|
|
14157
13939
|
}
|
|
14158
|
-
function _defineProperties$
|
|
13940
|
+
function _defineProperties$g(target, props) {
|
|
14159
13941
|
for(var i = 0; i < props.length; i++){
|
|
14160
13942
|
var descriptor = props[i];
|
|
14161
13943
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -14164,9 +13946,9 @@ function _defineProperties$f(target, props) {
|
|
|
14164
13946
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14165
13947
|
}
|
|
14166
13948
|
}
|
|
14167
|
-
function _create_class$
|
|
14168
|
-
if (protoProps) _defineProperties$
|
|
14169
|
-
if (staticProps) _defineProperties$
|
|
13949
|
+
function _create_class$g(Constructor, protoProps, staticProps) {
|
|
13950
|
+
if (protoProps) _defineProperties$g(Constructor.prototype, protoProps);
|
|
13951
|
+
if (staticProps) _defineProperties$g(Constructor, staticProps);
|
|
14170
13952
|
return Constructor;
|
|
14171
13953
|
}
|
|
14172
13954
|
/*
|
|
@@ -14174,9 +13956,9 @@ function _create_class$f(Constructor, protoProps, staticProps) {
|
|
|
14174
13956
|
* Licensed under the MIT License.
|
|
14175
13957
|
*/ var HashUtils = /*#__PURE__*/ function() {
|
|
14176
13958
|
function HashUtils() {
|
|
14177
|
-
_class_call_check$
|
|
13959
|
+
_class_call_check$g(this, HashUtils);
|
|
14178
13960
|
}
|
|
14179
|
-
_create_class$
|
|
13961
|
+
_create_class$g(HashUtils, [
|
|
14180
13962
|
{
|
|
14181
13963
|
/**
|
|
14182
13964
|
* generate 'SHA256' hash
|
|
@@ -14219,12 +14001,12 @@ function _async_to_generator$9(fn) {
|
|
|
14219
14001
|
});
|
|
14220
14002
|
};
|
|
14221
14003
|
}
|
|
14222
|
-
function _class_call_check$
|
|
14004
|
+
function _class_call_check$f(instance, Constructor) {
|
|
14223
14005
|
if (!(instance instanceof Constructor)) {
|
|
14224
14006
|
throw new TypeError("Cannot call a class as a function");
|
|
14225
14007
|
}
|
|
14226
14008
|
}
|
|
14227
|
-
function _defineProperties$
|
|
14009
|
+
function _defineProperties$f(target, props) {
|
|
14228
14010
|
for(var i = 0; i < props.length; i++){
|
|
14229
14011
|
var descriptor = props[i];
|
|
14230
14012
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -14233,12 +14015,12 @@ function _defineProperties$e(target, props) {
|
|
|
14233
14015
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14234
14016
|
}
|
|
14235
14017
|
}
|
|
14236
|
-
function _create_class$
|
|
14237
|
-
if (protoProps) _defineProperties$
|
|
14238
|
-
if (staticProps) _defineProperties$
|
|
14018
|
+
function _create_class$f(Constructor, protoProps, staticProps) {
|
|
14019
|
+
if (protoProps) _defineProperties$f(Constructor.prototype, protoProps);
|
|
14020
|
+
if (staticProps) _defineProperties$f(Constructor, staticProps);
|
|
14239
14021
|
return Constructor;
|
|
14240
14022
|
}
|
|
14241
|
-
function _ts_generator$
|
|
14023
|
+
function _ts_generator$a(thisArg, body) {
|
|
14242
14024
|
var f, y, t, g, _ = {
|
|
14243
14025
|
label: 0,
|
|
14244
14026
|
sent: function() {
|
|
@@ -14340,10 +14122,10 @@ function _ts_generator$9(thisArg, body) {
|
|
|
14340
14122
|
* https://tools.ietf.org/html/rfc7636#page-8
|
|
14341
14123
|
*/ var PkceGenerator = /*#__PURE__*/ function() {
|
|
14342
14124
|
function PkceGenerator() {
|
|
14343
|
-
_class_call_check$
|
|
14125
|
+
_class_call_check$f(this, PkceGenerator);
|
|
14344
14126
|
this.hashUtils = new HashUtils();
|
|
14345
14127
|
}
|
|
14346
|
-
_create_class$
|
|
14128
|
+
_create_class$f(PkceGenerator, [
|
|
14347
14129
|
{
|
|
14348
14130
|
key: "generatePkceCodes",
|
|
14349
14131
|
value: /**
|
|
@@ -14353,7 +14135,7 @@ function _ts_generator$9(thisArg, body) {
|
|
|
14353
14135
|
var _this = this;
|
|
14354
14136
|
return _async_to_generator$9(function() {
|
|
14355
14137
|
var verifier, challenge;
|
|
14356
|
-
return _ts_generator$
|
|
14138
|
+
return _ts_generator$a(this, function(_state) {
|
|
14357
14139
|
verifier = _this.generateCodeVerifier();
|
|
14358
14140
|
challenge = _this.generateCodeChallengeFromVerifier(verifier);
|
|
14359
14141
|
return [
|
|
@@ -14428,12 +14210,12 @@ function _async_to_generator$8(fn) {
|
|
|
14428
14210
|
});
|
|
14429
14211
|
};
|
|
14430
14212
|
}
|
|
14431
|
-
function _class_call_check$
|
|
14213
|
+
function _class_call_check$e(instance, Constructor) {
|
|
14432
14214
|
if (!(instance instanceof Constructor)) {
|
|
14433
14215
|
throw new TypeError("Cannot call a class as a function");
|
|
14434
14216
|
}
|
|
14435
14217
|
}
|
|
14436
|
-
function _defineProperties$
|
|
14218
|
+
function _defineProperties$e(target, props) {
|
|
14437
14219
|
for(var i = 0; i < props.length; i++){
|
|
14438
14220
|
var descriptor = props[i];
|
|
14439
14221
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -14442,12 +14224,12 @@ function _defineProperties$d(target, props) {
|
|
|
14442
14224
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14443
14225
|
}
|
|
14444
14226
|
}
|
|
14445
|
-
function _create_class$
|
|
14446
|
-
if (protoProps) _defineProperties$
|
|
14447
|
-
if (staticProps) _defineProperties$
|
|
14227
|
+
function _create_class$e(Constructor, protoProps, staticProps) {
|
|
14228
|
+
if (protoProps) _defineProperties$e(Constructor.prototype, protoProps);
|
|
14229
|
+
if (staticProps) _defineProperties$e(Constructor, staticProps);
|
|
14448
14230
|
return Constructor;
|
|
14449
14231
|
}
|
|
14450
|
-
function _ts_generator$
|
|
14232
|
+
function _ts_generator$9(thisArg, body) {
|
|
14451
14233
|
var f, y, t, g, _ = {
|
|
14452
14234
|
label: 0,
|
|
14453
14235
|
sent: function() {
|
|
@@ -14551,13 +14333,13 @@ function _ts_generator$8(thisArg, body) {
|
|
|
14551
14333
|
* @public
|
|
14552
14334
|
*/ var CryptoProvider = /*#__PURE__*/ function() {
|
|
14553
14335
|
function CryptoProvider() {
|
|
14554
|
-
_class_call_check$
|
|
14336
|
+
_class_call_check$e(this, CryptoProvider);
|
|
14555
14337
|
// Browser crypto needs to be validated first before any other classes can be set.
|
|
14556
14338
|
this.pkceGenerator = new PkceGenerator();
|
|
14557
14339
|
this.guidGenerator = new GuidGenerator();
|
|
14558
14340
|
this.hashUtils = new HashUtils();
|
|
14559
14341
|
}
|
|
14560
|
-
_create_class$
|
|
14342
|
+
_create_class$e(CryptoProvider, [
|
|
14561
14343
|
{
|
|
14562
14344
|
/**
|
|
14563
14345
|
* base64 URL safe encoded string
|
|
@@ -14651,7 +14433,7 @@ function _ts_generator$8(thisArg, body) {
|
|
|
14651
14433
|
*/ function hashString(plainText) {
|
|
14652
14434
|
var _this = this;
|
|
14653
14435
|
return _async_to_generator$8(function() {
|
|
14654
|
-
return _ts_generator$
|
|
14436
|
+
return _ts_generator$9(this, function(_state) {
|
|
14655
14437
|
return [
|
|
14656
14438
|
2,
|
|
14657
14439
|
EncodingUtils.base64EncodeUrl(_this.hashUtils.sha256(plainText).toString("base64"), "base64")
|
|
@@ -14672,7 +14454,7 @@ function _array_like_to_array$5(arr, len) {
|
|
|
14672
14454
|
function _array_without_holes$3(arr) {
|
|
14673
14455
|
if (Array.isArray(arr)) return _array_like_to_array$5(arr);
|
|
14674
14456
|
}
|
|
14675
|
-
function _assert_this_initialized$
|
|
14457
|
+
function _assert_this_initialized$5(self) {
|
|
14676
14458
|
if (self === void 0) {
|
|
14677
14459
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
14678
14460
|
}
|
|
@@ -14707,12 +14489,12 @@ function _async_to_generator$7(fn) {
|
|
|
14707
14489
|
});
|
|
14708
14490
|
};
|
|
14709
14491
|
}
|
|
14710
|
-
function _class_call_check$
|
|
14492
|
+
function _class_call_check$d(instance, Constructor) {
|
|
14711
14493
|
if (!(instance instanceof Constructor)) {
|
|
14712
14494
|
throw new TypeError("Cannot call a class as a function");
|
|
14713
14495
|
}
|
|
14714
14496
|
}
|
|
14715
|
-
function _defineProperties$
|
|
14497
|
+
function _defineProperties$d(target, props) {
|
|
14716
14498
|
for(var i = 0; i < props.length; i++){
|
|
14717
14499
|
var descriptor = props[i];
|
|
14718
14500
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -14721,9 +14503,9 @@ function _defineProperties$c(target, props) {
|
|
|
14721
14503
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
14722
14504
|
}
|
|
14723
14505
|
}
|
|
14724
|
-
function _create_class$
|
|
14725
|
-
if (protoProps) _defineProperties$
|
|
14726
|
-
if (staticProps) _defineProperties$
|
|
14506
|
+
function _create_class$d(Constructor, protoProps, staticProps) {
|
|
14507
|
+
if (protoProps) _defineProperties$d(Constructor.prototype, protoProps);
|
|
14508
|
+
if (staticProps) _defineProperties$d(Constructor, staticProps);
|
|
14727
14509
|
return Constructor;
|
|
14728
14510
|
}
|
|
14729
14511
|
function _define_property$4(obj, key, value) {
|
|
@@ -14739,13 +14521,13 @@ function _define_property$4(obj, key, value) {
|
|
|
14739
14521
|
}
|
|
14740
14522
|
return obj;
|
|
14741
14523
|
}
|
|
14742
|
-
function _get_prototype_of$
|
|
14743
|
-
_get_prototype_of$
|
|
14524
|
+
function _get_prototype_of$5(o) {
|
|
14525
|
+
_get_prototype_of$5 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
14744
14526
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
14745
14527
|
};
|
|
14746
|
-
return _get_prototype_of$
|
|
14528
|
+
return _get_prototype_of$5(o);
|
|
14747
14529
|
}
|
|
14748
|
-
function _inherits$
|
|
14530
|
+
function _inherits$5(subClass, superClass) {
|
|
14749
14531
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
14750
14532
|
throw new TypeError("Super expression must either be null or a function");
|
|
14751
14533
|
}
|
|
@@ -14756,9 +14538,9 @@ function _inherits$4(subClass, superClass) {
|
|
|
14756
14538
|
configurable: true
|
|
14757
14539
|
}
|
|
14758
14540
|
});
|
|
14759
|
-
if (superClass) _set_prototype_of$
|
|
14541
|
+
if (superClass) _set_prototype_of$5(subClass, superClass);
|
|
14760
14542
|
}
|
|
14761
|
-
function _instanceof$
|
|
14543
|
+
function _instanceof$d(left, right) {
|
|
14762
14544
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
14763
14545
|
return !!right[Symbol.hasInstance](left);
|
|
14764
14546
|
} else {
|
|
@@ -14786,23 +14568,23 @@ function _object_spread$3(target) {
|
|
|
14786
14568
|
}
|
|
14787
14569
|
return target;
|
|
14788
14570
|
}
|
|
14789
|
-
function _possible_constructor_return$
|
|
14790
|
-
if (call && (_type_of$
|
|
14571
|
+
function _possible_constructor_return$5(self, call) {
|
|
14572
|
+
if (call && (_type_of$d(call) === "object" || typeof call === "function")) {
|
|
14791
14573
|
return call;
|
|
14792
14574
|
}
|
|
14793
|
-
return _assert_this_initialized$
|
|
14575
|
+
return _assert_this_initialized$5(self);
|
|
14794
14576
|
}
|
|
14795
|
-
function _set_prototype_of$
|
|
14796
|
-
_set_prototype_of$
|
|
14577
|
+
function _set_prototype_of$5(o, p) {
|
|
14578
|
+
_set_prototype_of$5 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
14797
14579
|
o.__proto__ = p;
|
|
14798
14580
|
return o;
|
|
14799
14581
|
};
|
|
14800
|
-
return _set_prototype_of$
|
|
14582
|
+
return _set_prototype_of$5(o, p);
|
|
14801
14583
|
}
|
|
14802
14584
|
function _to_consumable_array$3(arr) {
|
|
14803
14585
|
return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$3();
|
|
14804
14586
|
}
|
|
14805
|
-
function _type_of$
|
|
14587
|
+
function _type_of$d(obj) {
|
|
14806
14588
|
"@swc/helpers - typeof";
|
|
14807
14589
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
14808
14590
|
}
|
|
@@ -14814,7 +14596,7 @@ function _unsupported_iterable_to_array$5(o, minLen) {
|
|
|
14814
14596
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
14815
14597
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
|
|
14816
14598
|
}
|
|
14817
|
-
function _is_native_reflect_construct$
|
|
14599
|
+
function _is_native_reflect_construct$5() {
|
|
14818
14600
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
14819
14601
|
if (Reflect.construct.sham) return false;
|
|
14820
14602
|
if (typeof Proxy === "function") return true;
|
|
@@ -14825,20 +14607,20 @@ function _is_native_reflect_construct$4() {
|
|
|
14825
14607
|
return false;
|
|
14826
14608
|
}
|
|
14827
14609
|
}
|
|
14828
|
-
function _create_super$
|
|
14829
|
-
var hasNativeReflectConstruct = _is_native_reflect_construct$
|
|
14830
|
-
return function _createSuperInternal() {
|
|
14831
|
-
var Super = _get_prototype_of$
|
|
14610
|
+
function _create_super$5(Derived) {
|
|
14611
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct$5();
|
|
14612
|
+
return function _createSuperInternal() {
|
|
14613
|
+
var Super = _get_prototype_of$5(Derived), result;
|
|
14832
14614
|
if (hasNativeReflectConstruct) {
|
|
14833
|
-
var NewTarget = _get_prototype_of$
|
|
14615
|
+
var NewTarget = _get_prototype_of$5(this).constructor;
|
|
14834
14616
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
14835
14617
|
} else {
|
|
14836
14618
|
result = Super.apply(this, arguments);
|
|
14837
14619
|
}
|
|
14838
|
-
return _possible_constructor_return$
|
|
14620
|
+
return _possible_constructor_return$5(this, result);
|
|
14839
14621
|
};
|
|
14840
14622
|
}
|
|
14841
|
-
function _ts_generator$
|
|
14623
|
+
function _ts_generator$8(thisArg, body) {
|
|
14842
14624
|
var f, y, t, g, _ = {
|
|
14843
14625
|
label: 0,
|
|
14844
14626
|
sent: function() {
|
|
@@ -14940,10 +14722,10 @@ function _ts_generator$7(thisArg, body) {
|
|
|
14940
14722
|
* This class implements Storage for node, reading cache from user specified storage location or an extension library
|
|
14941
14723
|
* @public
|
|
14942
14724
|
*/ var NodeStorage = /*#__PURE__*/ function(CacheManager) {
|
|
14943
|
-
_inherits$
|
|
14944
|
-
var _super = _create_super$
|
|
14725
|
+
_inherits$5(NodeStorage, CacheManager);
|
|
14726
|
+
var _super = _create_super$5(NodeStorage);
|
|
14945
14727
|
function NodeStorage(logger, clientId, cryptoImpl, staticAuthorityOptions) {
|
|
14946
|
-
_class_call_check$
|
|
14728
|
+
_class_call_check$d(this, NodeStorage);
|
|
14947
14729
|
var _this;
|
|
14948
14730
|
_this = _super.call(this, clientId, cryptoImpl, logger, staticAuthorityOptions);
|
|
14949
14731
|
_this.cache = {};
|
|
@@ -14951,7 +14733,7 @@ function _ts_generator$7(thisArg, body) {
|
|
|
14951
14733
|
_this.logger = logger;
|
|
14952
14734
|
return _this;
|
|
14953
14735
|
}
|
|
14954
|
-
_create_class$
|
|
14736
|
+
_create_class$d(NodeStorage, [
|
|
14955
14737
|
{
|
|
14956
14738
|
/**
|
|
14957
14739
|
* Queue up callbacks
|
|
@@ -14989,7 +14771,7 @@ function _ts_generator$7(thisArg, body) {
|
|
|
14989
14771
|
if (typeof value !== "object") {
|
|
14990
14772
|
continue;
|
|
14991
14773
|
}
|
|
14992
|
-
if (_instanceof$
|
|
14774
|
+
if (_instanceof$d(value, AccountEntity)) {
|
|
14993
14775
|
inMemoryCache.accounts[key] = value;
|
|
14994
14776
|
} else if (isIdTokenEntity(value)) {
|
|
14995
14777
|
inMemoryCache.idTokens[key] = value;
|
|
@@ -15377,7 +15159,7 @@ function _ts_generator$7(thisArg, body) {
|
|
|
15377
15159
|
var _this = this;
|
|
15378
15160
|
return _async_to_generator$7(function() {
|
|
15379
15161
|
var cacheKeys;
|
|
15380
|
-
return _ts_generator$
|
|
15162
|
+
return _ts_generator$8(this, function(_state) {
|
|
15381
15163
|
_this.logger.trace("Clearing cache entries created by MSAL");
|
|
15382
15164
|
// read inMemoryCache
|
|
15383
15165
|
cacheKeys = _this.getKeys();
|
|
@@ -15465,12 +15247,12 @@ function _async_to_generator$6(fn) {
|
|
|
15465
15247
|
});
|
|
15466
15248
|
};
|
|
15467
15249
|
}
|
|
15468
|
-
function _class_call_check$
|
|
15250
|
+
function _class_call_check$c(instance, Constructor) {
|
|
15469
15251
|
if (!(instance instanceof Constructor)) {
|
|
15470
15252
|
throw new TypeError("Cannot call a class as a function");
|
|
15471
15253
|
}
|
|
15472
15254
|
}
|
|
15473
|
-
function _defineProperties$
|
|
15255
|
+
function _defineProperties$c(target, props) {
|
|
15474
15256
|
for(var i = 0; i < props.length; i++){
|
|
15475
15257
|
var descriptor = props[i];
|
|
15476
15258
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -15479,9 +15261,9 @@ function _defineProperties$b(target, props) {
|
|
|
15479
15261
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
15480
15262
|
}
|
|
15481
15263
|
}
|
|
15482
|
-
function _create_class$
|
|
15483
|
-
if (protoProps) _defineProperties$
|
|
15484
|
-
if (staticProps) _defineProperties$
|
|
15264
|
+
function _create_class$c(Constructor, protoProps, staticProps) {
|
|
15265
|
+
if (protoProps) _defineProperties$c(Constructor.prototype, protoProps);
|
|
15266
|
+
if (staticProps) _defineProperties$c(Constructor, staticProps);
|
|
15485
15267
|
return Constructor;
|
|
15486
15268
|
}
|
|
15487
15269
|
function _define_property$3(obj, key, value) {
|
|
@@ -15536,7 +15318,7 @@ function _object_spread_props$2(target, source) {
|
|
|
15536
15318
|
}
|
|
15537
15319
|
return target;
|
|
15538
15320
|
}
|
|
15539
|
-
function _ts_generator$
|
|
15321
|
+
function _ts_generator$7(thisArg, body) {
|
|
15540
15322
|
var f, y, t, g, _ = {
|
|
15541
15323
|
label: 0,
|
|
15542
15324
|
sent: function() {
|
|
@@ -15646,7 +15428,7 @@ function _ts_generator$6(thisArg, body) {
|
|
|
15646
15428
|
* @public
|
|
15647
15429
|
*/ var TokenCache = /*#__PURE__*/ function() {
|
|
15648
15430
|
function TokenCache(storage, logger, cachePlugin) {
|
|
15649
|
-
_class_call_check$
|
|
15431
|
+
_class_call_check$c(this, TokenCache);
|
|
15650
15432
|
this.cacheHasChanged = false;
|
|
15651
15433
|
this.storage = storage;
|
|
15652
15434
|
this.storage.registerChangeEmitter(this.handleChangeEvent.bind(this));
|
|
@@ -15655,7 +15437,7 @@ function _ts_generator$6(thisArg, body) {
|
|
|
15655
15437
|
}
|
|
15656
15438
|
this.logger = logger;
|
|
15657
15439
|
}
|
|
15658
|
-
_create_class$
|
|
15440
|
+
_create_class$c(TokenCache, [
|
|
15659
15441
|
{
|
|
15660
15442
|
/**
|
|
15661
15443
|
* Set to true if cache state has changed since last time serialize or writeToPersistence was called
|
|
@@ -15715,7 +15497,7 @@ function _ts_generator$6(thisArg, body) {
|
|
|
15715
15497
|
var _this = this;
|
|
15716
15498
|
return _async_to_generator$6(function() {
|
|
15717
15499
|
var cacheContext;
|
|
15718
|
-
return _ts_generator$
|
|
15500
|
+
return _ts_generator$7(this, function(_state) {
|
|
15719
15501
|
switch(_state.label){
|
|
15720
15502
|
case 0:
|
|
15721
15503
|
_this.logger.trace("getAllAccounts called");
|
|
@@ -15780,7 +15562,7 @@ function _ts_generator$6(thisArg, body) {
|
|
|
15780
15562
|
var _this = this;
|
|
15781
15563
|
return _async_to_generator$6(function() {
|
|
15782
15564
|
var allAccounts;
|
|
15783
|
-
return _ts_generator$
|
|
15565
|
+
return _ts_generator$7(this, function(_state) {
|
|
15784
15566
|
switch(_state.label){
|
|
15785
15567
|
case 0:
|
|
15786
15568
|
return [
|
|
@@ -15818,7 +15600,7 @@ function _ts_generator$6(thisArg, body) {
|
|
|
15818
15600
|
var _this = this;
|
|
15819
15601
|
return _async_to_generator$6(function() {
|
|
15820
15602
|
var allAccounts;
|
|
15821
|
-
return _ts_generator$
|
|
15603
|
+
return _ts_generator$7(this, function(_state) {
|
|
15822
15604
|
switch(_state.label){
|
|
15823
15605
|
case 0:
|
|
15824
15606
|
return [
|
|
@@ -15854,7 +15636,7 @@ function _ts_generator$6(thisArg, body) {
|
|
|
15854
15636
|
var _this = this;
|
|
15855
15637
|
return _async_to_generator$6(function() {
|
|
15856
15638
|
var cacheContext;
|
|
15857
|
-
return _ts_generator$
|
|
15639
|
+
return _ts_generator$7(this, function(_state) {
|
|
15858
15640
|
switch(_state.label){
|
|
15859
15641
|
case 0:
|
|
15860
15642
|
_this.logger.trace("removeAccount called");
|
|
@@ -16092,7 +15874,7 @@ SafeBuffer.allocUnsafeSlow = function(size) {
|
|
|
16092
15874
|
|
|
16093
15875
|
/*global module, process*/
|
|
16094
15876
|
|
|
16095
|
-
function _type_of$
|
|
15877
|
+
function _type_of$c(obj) {
|
|
16096
15878
|
"@swc/helpers - typeof";
|
|
16097
15879
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
16098
15880
|
}
|
|
@@ -16126,7 +15908,7 @@ function DataStream$2(data) {
|
|
|
16126
15908
|
}).bind(this));
|
|
16127
15909
|
return this;
|
|
16128
15910
|
}
|
|
16129
|
-
throw new TypeError("Unexpected data type (" + (typeof data === "undefined" ? "undefined" : _type_of$
|
|
15911
|
+
throw new TypeError("Unexpected data type (" + (typeof data === "undefined" ? "undefined" : _type_of$c(data)) + ")");
|
|
16130
15912
|
}
|
|
16131
15913
|
util$3.inherits(DataStream$2, Stream$2);
|
|
16132
15914
|
DataStream$2.prototype.write = function write(data) {
|
|
@@ -16811,7 +16593,7 @@ var TokenExpiredError_1 = TokenExpiredError$1;
|
|
|
16811
16593
|
* Helpers.
|
|
16812
16594
|
*/
|
|
16813
16595
|
|
|
16814
|
-
function _type_of$
|
|
16596
|
+
function _type_of$b(obj) {
|
|
16815
16597
|
"@swc/helpers - typeof";
|
|
16816
16598
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
16817
16599
|
}
|
|
@@ -16835,7 +16617,7 @@ var y = d * 365.25;
|
|
|
16835
16617
|
* @api public
|
|
16836
16618
|
*/ var ms$1 = function(val, options) {
|
|
16837
16619
|
options = options || {};
|
|
16838
|
-
var type = typeof val === "undefined" ? "undefined" : _type_of$
|
|
16620
|
+
var type = typeof val === "undefined" ? "undefined" : _type_of$b(val);
|
|
16839
16621
|
if (type === "string" && val.length > 0) {
|
|
16840
16622
|
return parse$7(val);
|
|
16841
16623
|
} else if (type === "number" && isFinite(val)) {
|
|
@@ -17278,12 +17060,12 @@ var identifiers$1 = {
|
|
|
17278
17060
|
rcompareIdentifiers: rcompareIdentifiers
|
|
17279
17061
|
};
|
|
17280
17062
|
|
|
17281
|
-
function _class_call_check$
|
|
17063
|
+
function _class_call_check$b(instance, Constructor) {
|
|
17282
17064
|
if (!(instance instanceof Constructor)) {
|
|
17283
17065
|
throw new TypeError("Cannot call a class as a function");
|
|
17284
17066
|
}
|
|
17285
17067
|
}
|
|
17286
|
-
function _defineProperties$
|
|
17068
|
+
function _defineProperties$b(target, props) {
|
|
17287
17069
|
for(var i = 0; i < props.length; i++){
|
|
17288
17070
|
var descriptor = props[i];
|
|
17289
17071
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -17292,19 +17074,19 @@ function _defineProperties$a(target, props) {
|
|
|
17292
17074
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
17293
17075
|
}
|
|
17294
17076
|
}
|
|
17295
|
-
function _create_class$
|
|
17296
|
-
if (protoProps) _defineProperties$
|
|
17297
|
-
if (staticProps) _defineProperties$
|
|
17077
|
+
function _create_class$b(Constructor, protoProps, staticProps) {
|
|
17078
|
+
if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
|
|
17079
|
+
if (staticProps) _defineProperties$b(Constructor, staticProps);
|
|
17298
17080
|
return Constructor;
|
|
17299
17081
|
}
|
|
17300
|
-
function _instanceof$
|
|
17082
|
+
function _instanceof$c(left, right) {
|
|
17301
17083
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
17302
17084
|
return !!right[Symbol.hasInstance](left);
|
|
17303
17085
|
} else {
|
|
17304
17086
|
return left instanceof right;
|
|
17305
17087
|
}
|
|
17306
17088
|
}
|
|
17307
|
-
function _type_of$
|
|
17089
|
+
function _type_of$a(obj) {
|
|
17308
17090
|
"@swc/helpers - typeof";
|
|
17309
17091
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
17310
17092
|
}
|
|
@@ -17315,16 +17097,16 @@ var parseOptions$2 = parseOptions_1;
|
|
|
17315
17097
|
var compareIdentifiers = identifiers$1.compareIdentifiers;
|
|
17316
17098
|
var SemVer$f = /*#__PURE__*/ function() {
|
|
17317
17099
|
function SemVer(version, options) {
|
|
17318
|
-
_class_call_check$
|
|
17100
|
+
_class_call_check$b(this, SemVer);
|
|
17319
17101
|
options = parseOptions$2(options);
|
|
17320
|
-
if (_instanceof$
|
|
17102
|
+
if (_instanceof$c(version, SemVer)) {
|
|
17321
17103
|
if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
|
|
17322
17104
|
return version;
|
|
17323
17105
|
} else {
|
|
17324
17106
|
version = version.version;
|
|
17325
17107
|
}
|
|
17326
17108
|
} else if (typeof version !== "string") {
|
|
17327
|
-
throw new TypeError('Invalid version. Must be a string. Got type "'.concat(typeof version === "undefined" ? "undefined" : _type_of$
|
|
17109
|
+
throw new TypeError('Invalid version. Must be a string. Got type "'.concat(typeof version === "undefined" ? "undefined" : _type_of$a(version), '".'));
|
|
17328
17110
|
}
|
|
17329
17111
|
if (version.length > MAX_LENGTH) {
|
|
17330
17112
|
throw new TypeError("version is longer than ".concat(MAX_LENGTH, " characters"));
|
|
@@ -17370,7 +17152,7 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17370
17152
|
this.build = m[5] ? m[5].split(".") : [];
|
|
17371
17153
|
this.format();
|
|
17372
17154
|
}
|
|
17373
|
-
_create_class$
|
|
17155
|
+
_create_class$b(SemVer, [
|
|
17374
17156
|
{
|
|
17375
17157
|
key: "format",
|
|
17376
17158
|
value: function format() {
|
|
@@ -17391,7 +17173,7 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17391
17173
|
key: "compare",
|
|
17392
17174
|
value: function compare(other) {
|
|
17393
17175
|
debug$2("SemVer.compare", this.version, this.options, other);
|
|
17394
|
-
if (!_instanceof$
|
|
17176
|
+
if (!_instanceof$c(other, SemVer)) {
|
|
17395
17177
|
if (typeof other === "string" && other === this.version) {
|
|
17396
17178
|
return 0;
|
|
17397
17179
|
}
|
|
@@ -17406,7 +17188,7 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17406
17188
|
{
|
|
17407
17189
|
key: "compareMain",
|
|
17408
17190
|
value: function compareMain(other) {
|
|
17409
|
-
if (!_instanceof$
|
|
17191
|
+
if (!_instanceof$c(other, SemVer)) {
|
|
17410
17192
|
other = new SemVer(other, this.options);
|
|
17411
17193
|
}
|
|
17412
17194
|
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
@@ -17415,7 +17197,7 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17415
17197
|
{
|
|
17416
17198
|
key: "comparePre",
|
|
17417
17199
|
value: function comparePre(other) {
|
|
17418
|
-
if (!_instanceof$
|
|
17200
|
+
if (!_instanceof$c(other, SemVer)) {
|
|
17419
17201
|
other = new SemVer(other, this.options);
|
|
17420
17202
|
}
|
|
17421
17203
|
// NOT having a prerelease is > having one
|
|
@@ -17448,14 +17230,14 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17448
17230
|
{
|
|
17449
17231
|
key: "compareBuild",
|
|
17450
17232
|
value: function compareBuild(other) {
|
|
17451
|
-
if (!_instanceof$
|
|
17233
|
+
if (!_instanceof$c(other, SemVer)) {
|
|
17452
17234
|
other = new SemVer(other, this.options);
|
|
17453
17235
|
}
|
|
17454
17236
|
var i = 0;
|
|
17455
17237
|
do {
|
|
17456
17238
|
var a = this.build[i];
|
|
17457
17239
|
var b = other.build[i];
|
|
17458
|
-
debug$2("
|
|
17240
|
+
debug$2("prerelease compare", i, a, b);
|
|
17459
17241
|
if (a === undefined && b === undefined) {
|
|
17460
17242
|
return 0;
|
|
17461
17243
|
} else if (b === undefined) {
|
|
@@ -17603,7 +17385,7 @@ var SemVer$f = /*#__PURE__*/ function() {
|
|
|
17603
17385
|
}();
|
|
17604
17386
|
var semver$4 = SemVer$f;
|
|
17605
17387
|
|
|
17606
|
-
function _instanceof$
|
|
17388
|
+
function _instanceof$b(left, right) {
|
|
17607
17389
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
17608
17390
|
return !!right[Symbol.hasInstance](left);
|
|
17609
17391
|
} else {
|
|
@@ -17613,7 +17395,7 @@ function _instanceof$a(left, right) {
|
|
|
17613
17395
|
var SemVer$e = semver$4;
|
|
17614
17396
|
var parse$6 = function(version, options) {
|
|
17615
17397
|
var throwErrors = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
17616
|
-
if (_instanceof$
|
|
17398
|
+
if (_instanceof$b(version, SemVer$e)) {
|
|
17617
17399
|
return version;
|
|
17618
17400
|
}
|
|
17619
17401
|
try {
|
|
@@ -17641,7 +17423,7 @@ var clean$1 = function(version, options) {
|
|
|
17641
17423
|
};
|
|
17642
17424
|
var clean_1 = clean$1;
|
|
17643
17425
|
|
|
17644
|
-
function _instanceof$
|
|
17426
|
+
function _instanceof$a(left, right) {
|
|
17645
17427
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
17646
17428
|
return !!right[Symbol.hasInstance](left);
|
|
17647
17429
|
} else {
|
|
@@ -17656,7 +17438,7 @@ var inc$1 = function(version, release, options, identifier, identifierBase) {
|
|
|
17656
17438
|
options = undefined;
|
|
17657
17439
|
}
|
|
17658
17440
|
try {
|
|
17659
|
-
return new SemVer$d(_instanceof$
|
|
17441
|
+
return new SemVer$d(_instanceof$a(version, SemVer$d) ? version.version : version, options).inc(release, identifier, identifierBase).version;
|
|
17660
17442
|
} catch (er) {
|
|
17661
17443
|
return null;
|
|
17662
17444
|
}
|
|
@@ -17861,7 +17643,7 @@ var cmp$2 = function(a, op, b, loose) {
|
|
|
17861
17643
|
};
|
|
17862
17644
|
var cmp_1 = cmp$2;
|
|
17863
17645
|
|
|
17864
|
-
function _instanceof$
|
|
17646
|
+
function _instanceof$9(left, right) {
|
|
17865
17647
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
17866
17648
|
return !!right[Symbol.hasInstance](left);
|
|
17867
17649
|
} else {
|
|
@@ -17872,7 +17654,7 @@ var SemVer$7 = semver$4;
|
|
|
17872
17654
|
var parse$1 = parse_1;
|
|
17873
17655
|
var _require$4 = re$4.exports, re$2 = _require$4.safeRe, t$2 = _require$4.t;
|
|
17874
17656
|
var coerce$1 = function(version, options) {
|
|
17875
|
-
if (_instanceof$
|
|
17657
|
+
if (_instanceof$9(version, SemVer$7)) {
|
|
17876
17658
|
return version;
|
|
17877
17659
|
}
|
|
17878
17660
|
if (typeof version === "number") {
|
|
@@ -17918,12 +17700,517 @@ var coerce$1 = function(version, options) {
|
|
|
17918
17700
|
};
|
|
17919
17701
|
var coerce_1 = coerce$1;
|
|
17920
17702
|
|
|
17921
|
-
function
|
|
17703
|
+
function _ts_generator$6(thisArg, body) {
|
|
17704
|
+
var f, y, t, g, _ = {
|
|
17705
|
+
label: 0,
|
|
17706
|
+
sent: function() {
|
|
17707
|
+
if (t[0] & 1) throw t[1];
|
|
17708
|
+
return t[1];
|
|
17709
|
+
},
|
|
17710
|
+
trys: [],
|
|
17711
|
+
ops: []
|
|
17712
|
+
};
|
|
17713
|
+
return g = {
|
|
17714
|
+
next: verb(0),
|
|
17715
|
+
"throw": verb(1),
|
|
17716
|
+
"return": verb(2)
|
|
17717
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
17718
|
+
return this;
|
|
17719
|
+
}), g;
|
|
17720
|
+
function verb(n) {
|
|
17721
|
+
return function(v) {
|
|
17722
|
+
return step([
|
|
17723
|
+
n,
|
|
17724
|
+
v
|
|
17725
|
+
]);
|
|
17726
|
+
};
|
|
17727
|
+
}
|
|
17728
|
+
function step(op) {
|
|
17729
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17730
|
+
while(_)try {
|
|
17731
|
+
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;
|
|
17732
|
+
if (y = 0, t) op = [
|
|
17733
|
+
op[0] & 2,
|
|
17734
|
+
t.value
|
|
17735
|
+
];
|
|
17736
|
+
switch(op[0]){
|
|
17737
|
+
case 0:
|
|
17738
|
+
case 1:
|
|
17739
|
+
t = op;
|
|
17740
|
+
break;
|
|
17741
|
+
case 4:
|
|
17742
|
+
_.label++;
|
|
17743
|
+
return {
|
|
17744
|
+
value: op[1],
|
|
17745
|
+
done: false
|
|
17746
|
+
};
|
|
17747
|
+
case 5:
|
|
17748
|
+
_.label++;
|
|
17749
|
+
y = op[1];
|
|
17750
|
+
op = [
|
|
17751
|
+
0
|
|
17752
|
+
];
|
|
17753
|
+
continue;
|
|
17754
|
+
case 7:
|
|
17755
|
+
op = _.ops.pop();
|
|
17756
|
+
_.trys.pop();
|
|
17757
|
+
continue;
|
|
17758
|
+
default:
|
|
17759
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
17760
|
+
_ = 0;
|
|
17761
|
+
continue;
|
|
17762
|
+
}
|
|
17763
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
17764
|
+
_.label = op[1];
|
|
17765
|
+
break;
|
|
17766
|
+
}
|
|
17767
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
17768
|
+
_.label = t[1];
|
|
17769
|
+
t = op;
|
|
17770
|
+
break;
|
|
17771
|
+
}
|
|
17772
|
+
if (t && _.label < t[2]) {
|
|
17773
|
+
_.label = t[2];
|
|
17774
|
+
_.ops.push(op);
|
|
17775
|
+
break;
|
|
17776
|
+
}
|
|
17777
|
+
if (t[2]) _.ops.pop();
|
|
17778
|
+
_.trys.pop();
|
|
17779
|
+
continue;
|
|
17780
|
+
}
|
|
17781
|
+
op = body.call(thisArg, _);
|
|
17782
|
+
} catch (e) {
|
|
17783
|
+
op = [
|
|
17784
|
+
6,
|
|
17785
|
+
e
|
|
17786
|
+
];
|
|
17787
|
+
y = 0;
|
|
17788
|
+
} finally{
|
|
17789
|
+
f = t = 0;
|
|
17790
|
+
}
|
|
17791
|
+
if (op[0] & 5) throw op[1];
|
|
17792
|
+
return {
|
|
17793
|
+
value: op[0] ? op[1] : void 0,
|
|
17794
|
+
done: true
|
|
17795
|
+
};
|
|
17796
|
+
}
|
|
17797
|
+
}
|
|
17798
|
+
var iterator = function(Yallist) {
|
|
17799
|
+
Yallist.prototype[Symbol.iterator] = function() {
|
|
17800
|
+
var walker;
|
|
17801
|
+
return _ts_generator$6(this, function(_state) {
|
|
17802
|
+
switch(_state.label){
|
|
17803
|
+
case 0:
|
|
17804
|
+
walker = this.head;
|
|
17805
|
+
_state.label = 1;
|
|
17806
|
+
case 1:
|
|
17807
|
+
if (!walker) return [
|
|
17808
|
+
3,
|
|
17809
|
+
4
|
|
17810
|
+
];
|
|
17811
|
+
return [
|
|
17812
|
+
4,
|
|
17813
|
+
walker.value
|
|
17814
|
+
];
|
|
17815
|
+
case 2:
|
|
17816
|
+
_state.sent();
|
|
17817
|
+
_state.label = 3;
|
|
17818
|
+
case 3:
|
|
17819
|
+
walker = walker.next;
|
|
17820
|
+
return [
|
|
17821
|
+
3,
|
|
17822
|
+
1
|
|
17823
|
+
];
|
|
17824
|
+
case 4:
|
|
17825
|
+
return [
|
|
17826
|
+
2
|
|
17827
|
+
];
|
|
17828
|
+
}
|
|
17829
|
+
});
|
|
17830
|
+
};
|
|
17831
|
+
};
|
|
17832
|
+
|
|
17833
|
+
function _instanceof$8(left, right) {
|
|
17834
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
17835
|
+
return !!right[Symbol.hasInstance](left);
|
|
17836
|
+
} else {
|
|
17837
|
+
return left instanceof right;
|
|
17838
|
+
}
|
|
17839
|
+
}
|
|
17840
|
+
var yallist = Yallist$1;
|
|
17841
|
+
Yallist$1.Node = Node;
|
|
17842
|
+
Yallist$1.create = Yallist$1;
|
|
17843
|
+
function Yallist$1(list) {
|
|
17844
|
+
var self = this;
|
|
17845
|
+
if (!_instanceof$8(self, Yallist$1)) {
|
|
17846
|
+
self = new Yallist$1();
|
|
17847
|
+
}
|
|
17848
|
+
self.tail = null;
|
|
17849
|
+
self.head = null;
|
|
17850
|
+
self.length = 0;
|
|
17851
|
+
if (list && typeof list.forEach === "function") {
|
|
17852
|
+
list.forEach(function(item) {
|
|
17853
|
+
self.push(item);
|
|
17854
|
+
});
|
|
17855
|
+
} else if (arguments.length > 0) {
|
|
17856
|
+
for(var i = 0, l = arguments.length; i < l; i++){
|
|
17857
|
+
self.push(arguments[i]);
|
|
17858
|
+
}
|
|
17859
|
+
}
|
|
17860
|
+
return self;
|
|
17861
|
+
}
|
|
17862
|
+
Yallist$1.prototype.removeNode = function(node) {
|
|
17863
|
+
if (node.list !== this) {
|
|
17864
|
+
throw new Error("removing node which does not belong to this list");
|
|
17865
|
+
}
|
|
17866
|
+
var next = node.next;
|
|
17867
|
+
var prev = node.prev;
|
|
17868
|
+
if (next) {
|
|
17869
|
+
next.prev = prev;
|
|
17870
|
+
}
|
|
17871
|
+
if (prev) {
|
|
17872
|
+
prev.next = next;
|
|
17873
|
+
}
|
|
17874
|
+
if (node === this.head) {
|
|
17875
|
+
this.head = next;
|
|
17876
|
+
}
|
|
17877
|
+
if (node === this.tail) {
|
|
17878
|
+
this.tail = prev;
|
|
17879
|
+
}
|
|
17880
|
+
node.list.length--;
|
|
17881
|
+
node.next = null;
|
|
17882
|
+
node.prev = null;
|
|
17883
|
+
node.list = null;
|
|
17884
|
+
return next;
|
|
17885
|
+
};
|
|
17886
|
+
Yallist$1.prototype.unshiftNode = function(node) {
|
|
17887
|
+
if (node === this.head) {
|
|
17888
|
+
return;
|
|
17889
|
+
}
|
|
17890
|
+
if (node.list) {
|
|
17891
|
+
node.list.removeNode(node);
|
|
17892
|
+
}
|
|
17893
|
+
var head = this.head;
|
|
17894
|
+
node.list = this;
|
|
17895
|
+
node.next = head;
|
|
17896
|
+
if (head) {
|
|
17897
|
+
head.prev = node;
|
|
17898
|
+
}
|
|
17899
|
+
this.head = node;
|
|
17900
|
+
if (!this.tail) {
|
|
17901
|
+
this.tail = node;
|
|
17902
|
+
}
|
|
17903
|
+
this.length++;
|
|
17904
|
+
};
|
|
17905
|
+
Yallist$1.prototype.pushNode = function(node) {
|
|
17906
|
+
if (node === this.tail) {
|
|
17907
|
+
return;
|
|
17908
|
+
}
|
|
17909
|
+
if (node.list) {
|
|
17910
|
+
node.list.removeNode(node);
|
|
17911
|
+
}
|
|
17912
|
+
var tail = this.tail;
|
|
17913
|
+
node.list = this;
|
|
17914
|
+
node.prev = tail;
|
|
17915
|
+
if (tail) {
|
|
17916
|
+
tail.next = node;
|
|
17917
|
+
}
|
|
17918
|
+
this.tail = node;
|
|
17919
|
+
if (!this.head) {
|
|
17920
|
+
this.head = node;
|
|
17921
|
+
}
|
|
17922
|
+
this.length++;
|
|
17923
|
+
};
|
|
17924
|
+
Yallist$1.prototype.push = function() {
|
|
17925
|
+
for(var i = 0, l = arguments.length; i < l; i++){
|
|
17926
|
+
push(this, arguments[i]);
|
|
17927
|
+
}
|
|
17928
|
+
return this.length;
|
|
17929
|
+
};
|
|
17930
|
+
Yallist$1.prototype.unshift = function() {
|
|
17931
|
+
for(var i = 0, l = arguments.length; i < l; i++){
|
|
17932
|
+
unshift(this, arguments[i]);
|
|
17933
|
+
}
|
|
17934
|
+
return this.length;
|
|
17935
|
+
};
|
|
17936
|
+
Yallist$1.prototype.pop = function() {
|
|
17937
|
+
if (!this.tail) {
|
|
17938
|
+
return undefined;
|
|
17939
|
+
}
|
|
17940
|
+
var res = this.tail.value;
|
|
17941
|
+
this.tail = this.tail.prev;
|
|
17942
|
+
if (this.tail) {
|
|
17943
|
+
this.tail.next = null;
|
|
17944
|
+
} else {
|
|
17945
|
+
this.head = null;
|
|
17946
|
+
}
|
|
17947
|
+
this.length--;
|
|
17948
|
+
return res;
|
|
17949
|
+
};
|
|
17950
|
+
Yallist$1.prototype.shift = function() {
|
|
17951
|
+
if (!this.head) {
|
|
17952
|
+
return undefined;
|
|
17953
|
+
}
|
|
17954
|
+
var res = this.head.value;
|
|
17955
|
+
this.head = this.head.next;
|
|
17956
|
+
if (this.head) {
|
|
17957
|
+
this.head.prev = null;
|
|
17958
|
+
} else {
|
|
17959
|
+
this.tail = null;
|
|
17960
|
+
}
|
|
17961
|
+
this.length--;
|
|
17962
|
+
return res;
|
|
17963
|
+
};
|
|
17964
|
+
Yallist$1.prototype.forEach = function(fn, thisp) {
|
|
17965
|
+
thisp = thisp || this;
|
|
17966
|
+
for(var walker = this.head, i = 0; walker !== null; i++){
|
|
17967
|
+
fn.call(thisp, walker.value, i, this);
|
|
17968
|
+
walker = walker.next;
|
|
17969
|
+
}
|
|
17970
|
+
};
|
|
17971
|
+
Yallist$1.prototype.forEachReverse = function(fn, thisp) {
|
|
17972
|
+
thisp = thisp || this;
|
|
17973
|
+
for(var walker = this.tail, i = this.length - 1; walker !== null; i--){
|
|
17974
|
+
fn.call(thisp, walker.value, i, this);
|
|
17975
|
+
walker = walker.prev;
|
|
17976
|
+
}
|
|
17977
|
+
};
|
|
17978
|
+
Yallist$1.prototype.get = function(n) {
|
|
17979
|
+
for(var i = 0, walker = this.head; walker !== null && i < n; i++){
|
|
17980
|
+
// abort out of the list early if we hit a cycle
|
|
17981
|
+
walker = walker.next;
|
|
17982
|
+
}
|
|
17983
|
+
if (i === n && walker !== null) {
|
|
17984
|
+
return walker.value;
|
|
17985
|
+
}
|
|
17986
|
+
};
|
|
17987
|
+
Yallist$1.prototype.getReverse = function(n) {
|
|
17988
|
+
for(var i = 0, walker = this.tail; walker !== null && i < n; i++){
|
|
17989
|
+
// abort out of the list early if we hit a cycle
|
|
17990
|
+
walker = walker.prev;
|
|
17991
|
+
}
|
|
17992
|
+
if (i === n && walker !== null) {
|
|
17993
|
+
return walker.value;
|
|
17994
|
+
}
|
|
17995
|
+
};
|
|
17996
|
+
Yallist$1.prototype.map = function(fn, thisp) {
|
|
17997
|
+
thisp = thisp || this;
|
|
17998
|
+
var res = new Yallist$1();
|
|
17999
|
+
for(var walker = this.head; walker !== null;){
|
|
18000
|
+
res.push(fn.call(thisp, walker.value, this));
|
|
18001
|
+
walker = walker.next;
|
|
18002
|
+
}
|
|
18003
|
+
return res;
|
|
18004
|
+
};
|
|
18005
|
+
Yallist$1.prototype.mapReverse = function(fn, thisp) {
|
|
18006
|
+
thisp = thisp || this;
|
|
18007
|
+
var res = new Yallist$1();
|
|
18008
|
+
for(var walker = this.tail; walker !== null;){
|
|
18009
|
+
res.push(fn.call(thisp, walker.value, this));
|
|
18010
|
+
walker = walker.prev;
|
|
18011
|
+
}
|
|
18012
|
+
return res;
|
|
18013
|
+
};
|
|
18014
|
+
Yallist$1.prototype.reduce = function(fn, initial) {
|
|
18015
|
+
var acc;
|
|
18016
|
+
var walker = this.head;
|
|
18017
|
+
if (arguments.length > 1) {
|
|
18018
|
+
acc = initial;
|
|
18019
|
+
} else if (this.head) {
|
|
18020
|
+
walker = this.head.next;
|
|
18021
|
+
acc = this.head.value;
|
|
18022
|
+
} else {
|
|
18023
|
+
throw new TypeError("Reduce of empty list with no initial value");
|
|
18024
|
+
}
|
|
18025
|
+
for(var i = 0; walker !== null; i++){
|
|
18026
|
+
acc = fn(acc, walker.value, i);
|
|
18027
|
+
walker = walker.next;
|
|
18028
|
+
}
|
|
18029
|
+
return acc;
|
|
18030
|
+
};
|
|
18031
|
+
Yallist$1.prototype.reduceReverse = function(fn, initial) {
|
|
18032
|
+
var acc;
|
|
18033
|
+
var walker = this.tail;
|
|
18034
|
+
if (arguments.length > 1) {
|
|
18035
|
+
acc = initial;
|
|
18036
|
+
} else if (this.tail) {
|
|
18037
|
+
walker = this.tail.prev;
|
|
18038
|
+
acc = this.tail.value;
|
|
18039
|
+
} else {
|
|
18040
|
+
throw new TypeError("Reduce of empty list with no initial value");
|
|
18041
|
+
}
|
|
18042
|
+
for(var i = this.length - 1; walker !== null; i--){
|
|
18043
|
+
acc = fn(acc, walker.value, i);
|
|
18044
|
+
walker = walker.prev;
|
|
18045
|
+
}
|
|
18046
|
+
return acc;
|
|
18047
|
+
};
|
|
18048
|
+
Yallist$1.prototype.toArray = function() {
|
|
18049
|
+
var arr = new Array(this.length);
|
|
18050
|
+
for(var i = 0, walker = this.head; walker !== null; i++){
|
|
18051
|
+
arr[i] = walker.value;
|
|
18052
|
+
walker = walker.next;
|
|
18053
|
+
}
|
|
18054
|
+
return arr;
|
|
18055
|
+
};
|
|
18056
|
+
Yallist$1.prototype.toArrayReverse = function() {
|
|
18057
|
+
var arr = new Array(this.length);
|
|
18058
|
+
for(var i = 0, walker = this.tail; walker !== null; i++){
|
|
18059
|
+
arr[i] = walker.value;
|
|
18060
|
+
walker = walker.prev;
|
|
18061
|
+
}
|
|
18062
|
+
return arr;
|
|
18063
|
+
};
|
|
18064
|
+
Yallist$1.prototype.slice = function(from, to) {
|
|
18065
|
+
to = to || this.length;
|
|
18066
|
+
if (to < 0) {
|
|
18067
|
+
to += this.length;
|
|
18068
|
+
}
|
|
18069
|
+
from = from || 0;
|
|
18070
|
+
if (from < 0) {
|
|
18071
|
+
from += this.length;
|
|
18072
|
+
}
|
|
18073
|
+
var ret = new Yallist$1();
|
|
18074
|
+
if (to < from || to < 0) {
|
|
18075
|
+
return ret;
|
|
18076
|
+
}
|
|
18077
|
+
if (from < 0) {
|
|
18078
|
+
from = 0;
|
|
18079
|
+
}
|
|
18080
|
+
if (to > this.length) {
|
|
18081
|
+
to = this.length;
|
|
18082
|
+
}
|
|
18083
|
+
for(var i = 0, walker = this.head; walker !== null && i < from; i++){
|
|
18084
|
+
walker = walker.next;
|
|
18085
|
+
}
|
|
18086
|
+
for(; walker !== null && i < to; i++, walker = walker.next){
|
|
18087
|
+
ret.push(walker.value);
|
|
18088
|
+
}
|
|
18089
|
+
return ret;
|
|
18090
|
+
};
|
|
18091
|
+
Yallist$1.prototype.sliceReverse = function(from, to) {
|
|
18092
|
+
to = to || this.length;
|
|
18093
|
+
if (to < 0) {
|
|
18094
|
+
to += this.length;
|
|
18095
|
+
}
|
|
18096
|
+
from = from || 0;
|
|
18097
|
+
if (from < 0) {
|
|
18098
|
+
from += this.length;
|
|
18099
|
+
}
|
|
18100
|
+
var ret = new Yallist$1();
|
|
18101
|
+
if (to < from || to < 0) {
|
|
18102
|
+
return ret;
|
|
18103
|
+
}
|
|
18104
|
+
if (from < 0) {
|
|
18105
|
+
from = 0;
|
|
18106
|
+
}
|
|
18107
|
+
if (to > this.length) {
|
|
18108
|
+
to = this.length;
|
|
18109
|
+
}
|
|
18110
|
+
for(var i = this.length, walker = this.tail; walker !== null && i > to; i--){
|
|
18111
|
+
walker = walker.prev;
|
|
18112
|
+
}
|
|
18113
|
+
for(; walker !== null && i > from; i--, walker = walker.prev){
|
|
18114
|
+
ret.push(walker.value);
|
|
18115
|
+
}
|
|
18116
|
+
return ret;
|
|
18117
|
+
};
|
|
18118
|
+
Yallist$1.prototype.splice = function(start, deleteCount) {
|
|
18119
|
+
for(var _len = arguments.length, nodes = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
|
|
18120
|
+
nodes[_key - 2] = arguments[_key];
|
|
18121
|
+
}
|
|
18122
|
+
if (start > this.length) {
|
|
18123
|
+
start = this.length - 1;
|
|
18124
|
+
}
|
|
18125
|
+
if (start < 0) {
|
|
18126
|
+
start = this.length + start;
|
|
18127
|
+
}
|
|
18128
|
+
for(var i = 0, walker = this.head; walker !== null && i < start; i++){
|
|
18129
|
+
walker = walker.next;
|
|
18130
|
+
}
|
|
18131
|
+
var ret = [];
|
|
18132
|
+
for(var i = 0; walker && i < deleteCount; i++){
|
|
18133
|
+
ret.push(walker.value);
|
|
18134
|
+
walker = this.removeNode(walker);
|
|
18135
|
+
}
|
|
18136
|
+
if (walker === null) {
|
|
18137
|
+
walker = this.tail;
|
|
18138
|
+
}
|
|
18139
|
+
if (walker !== this.head && walker !== this.tail) {
|
|
18140
|
+
walker = walker.prev;
|
|
18141
|
+
}
|
|
18142
|
+
for(var i = 0; i < nodes.length; i++){
|
|
18143
|
+
walker = insert(this, walker, nodes[i]);
|
|
18144
|
+
}
|
|
18145
|
+
return ret;
|
|
18146
|
+
};
|
|
18147
|
+
Yallist$1.prototype.reverse = function() {
|
|
18148
|
+
var head = this.head;
|
|
18149
|
+
var tail = this.tail;
|
|
18150
|
+
for(var walker = head; walker !== null; walker = walker.prev){
|
|
18151
|
+
var p = walker.prev;
|
|
18152
|
+
walker.prev = walker.next;
|
|
18153
|
+
walker.next = p;
|
|
18154
|
+
}
|
|
18155
|
+
this.head = tail;
|
|
18156
|
+
this.tail = head;
|
|
18157
|
+
return this;
|
|
18158
|
+
};
|
|
18159
|
+
function insert(self, node, value) {
|
|
18160
|
+
var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self);
|
|
18161
|
+
if (inserted.next === null) {
|
|
18162
|
+
self.tail = inserted;
|
|
18163
|
+
}
|
|
18164
|
+
if (inserted.prev === null) {
|
|
18165
|
+
self.head = inserted;
|
|
18166
|
+
}
|
|
18167
|
+
self.length++;
|
|
18168
|
+
return inserted;
|
|
18169
|
+
}
|
|
18170
|
+
function push(self, item) {
|
|
18171
|
+
self.tail = new Node(item, self.tail, null, self);
|
|
18172
|
+
if (!self.head) {
|
|
18173
|
+
self.head = self.tail;
|
|
18174
|
+
}
|
|
18175
|
+
self.length++;
|
|
18176
|
+
}
|
|
18177
|
+
function unshift(self, item) {
|
|
18178
|
+
self.head = new Node(item, null, self.head, self);
|
|
18179
|
+
if (!self.tail) {
|
|
18180
|
+
self.tail = self.head;
|
|
18181
|
+
}
|
|
18182
|
+
self.length++;
|
|
18183
|
+
}
|
|
18184
|
+
function Node(value, prev, next, list) {
|
|
18185
|
+
if (!_instanceof$8(this, Node)) {
|
|
18186
|
+
return new Node(value, prev, next, list);
|
|
18187
|
+
}
|
|
18188
|
+
this.list = list;
|
|
18189
|
+
this.value = value;
|
|
18190
|
+
if (prev) {
|
|
18191
|
+
prev.next = this;
|
|
18192
|
+
this.prev = prev;
|
|
18193
|
+
} else {
|
|
18194
|
+
this.prev = null;
|
|
18195
|
+
}
|
|
18196
|
+
if (next) {
|
|
18197
|
+
next.prev = this;
|
|
18198
|
+
this.next = next;
|
|
18199
|
+
} else {
|
|
18200
|
+
this.next = null;
|
|
18201
|
+
}
|
|
18202
|
+
}
|
|
18203
|
+
try {
|
|
18204
|
+
// add if support for Symbol.iterator is present
|
|
18205
|
+
iterator(Yallist$1);
|
|
18206
|
+
} catch (er) {}
|
|
18207
|
+
|
|
18208
|
+
function _class_call_check$a(instance, Constructor) {
|
|
17922
18209
|
if (!(instance instanceof Constructor)) {
|
|
17923
18210
|
throw new TypeError("Cannot call a class as a function");
|
|
17924
18211
|
}
|
|
17925
18212
|
}
|
|
17926
|
-
function _defineProperties$
|
|
18213
|
+
function _defineProperties$a(target, props) {
|
|
17927
18214
|
for(var i = 0; i < props.length; i++){
|
|
17928
18215
|
var descriptor = props[i];
|
|
17929
18216
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -17932,58 +18219,366 @@ function _defineProperties$9(target, props) {
|
|
|
17932
18219
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
17933
18220
|
}
|
|
17934
18221
|
}
|
|
17935
|
-
function _create_class$
|
|
17936
|
-
if (protoProps) _defineProperties$
|
|
17937
|
-
if (staticProps) _defineProperties$
|
|
18222
|
+
function _create_class$a(Constructor, protoProps, staticProps) {
|
|
18223
|
+
if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
|
|
18224
|
+
if (staticProps) _defineProperties$a(Constructor, staticProps);
|
|
17938
18225
|
return Constructor;
|
|
17939
18226
|
}
|
|
18227
|
+
// A linked list to keep track of recently-used-ness
|
|
18228
|
+
var Yallist = yallist;
|
|
18229
|
+
var MAX = Symbol("max");
|
|
18230
|
+
var LENGTH = Symbol("length");
|
|
18231
|
+
var LENGTH_CALCULATOR = Symbol("lengthCalculator");
|
|
18232
|
+
var ALLOW_STALE = Symbol("allowStale");
|
|
18233
|
+
var MAX_AGE = Symbol("maxAge");
|
|
18234
|
+
var DISPOSE = Symbol("dispose");
|
|
18235
|
+
var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet");
|
|
18236
|
+
var LRU_LIST = Symbol("lruList");
|
|
18237
|
+
var CACHE = Symbol("cache");
|
|
18238
|
+
var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet");
|
|
18239
|
+
var naiveLength = function() {
|
|
18240
|
+
return 1;
|
|
18241
|
+
};
|
|
18242
|
+
// lruList is a yallist where the head is the youngest
|
|
18243
|
+
// item, and the tail is the oldest. the list contains the Hit
|
|
18244
|
+
// objects as the entries.
|
|
18245
|
+
// Each Hit object has a reference to its Yallist.Node. This
|
|
18246
|
+
// never changes.
|
|
18247
|
+
//
|
|
18248
|
+
// cache is a Map (or PseudoMap) that matches the keys to
|
|
18249
|
+
// the Yallist.Node object.
|
|
17940
18250
|
var LRUCache = /*#__PURE__*/ function() {
|
|
17941
|
-
function LRUCache() {
|
|
17942
|
-
_class_call_check$
|
|
17943
|
-
|
|
17944
|
-
|
|
17945
|
-
|
|
17946
|
-
|
|
18251
|
+
function LRUCache(options) {
|
|
18252
|
+
_class_call_check$a(this, LRUCache);
|
|
18253
|
+
if (typeof options === "number") options = {
|
|
18254
|
+
max: options
|
|
18255
|
+
};
|
|
18256
|
+
if (!options) options = {};
|
|
18257
|
+
if (options.max && (typeof options.max !== "number" || options.max < 0)) throw new TypeError("max must be a non-negative number");
|
|
18258
|
+
// Kind of weird to have a default max of Infinity, but oh well.
|
|
18259
|
+
this[MAX] = options.max || Infinity;
|
|
18260
|
+
var lc = options.length || naiveLength;
|
|
18261
|
+
this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc;
|
|
18262
|
+
this[ALLOW_STALE] = options.stale || false;
|
|
18263
|
+
if (options.maxAge && typeof options.maxAge !== "number") throw new TypeError("maxAge must be a number");
|
|
18264
|
+
this[MAX_AGE] = options.maxAge || 0;
|
|
18265
|
+
this[DISPOSE] = options.dispose;
|
|
18266
|
+
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
|
|
18267
|
+
this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
|
|
18268
|
+
this.reset();
|
|
18269
|
+
}
|
|
18270
|
+
_create_class$a(LRUCache, [
|
|
18271
|
+
{
|
|
18272
|
+
key: "max",
|
|
18273
|
+
get: function get() {
|
|
18274
|
+
return this[MAX];
|
|
18275
|
+
},
|
|
18276
|
+
set: // resize the cache when the max changes.
|
|
18277
|
+
function set(mL) {
|
|
18278
|
+
if (typeof mL !== "number" || mL < 0) throw new TypeError("max must be a non-negative number");
|
|
18279
|
+
this[MAX] = mL || Infinity;
|
|
18280
|
+
trim(this);
|
|
18281
|
+
}
|
|
18282
|
+
},
|
|
17947
18283
|
{
|
|
17948
|
-
key: "
|
|
17949
|
-
|
|
17950
|
-
|
|
17951
|
-
|
|
17952
|
-
|
|
17953
|
-
|
|
17954
|
-
|
|
17955
|
-
|
|
17956
|
-
|
|
17957
|
-
|
|
18284
|
+
key: "allowStale",
|
|
18285
|
+
get: function get() {
|
|
18286
|
+
return this[ALLOW_STALE];
|
|
18287
|
+
},
|
|
18288
|
+
set: function set(allowStale) {
|
|
18289
|
+
this[ALLOW_STALE] = !!allowStale;
|
|
18290
|
+
}
|
|
18291
|
+
},
|
|
18292
|
+
{
|
|
18293
|
+
key: "maxAge",
|
|
18294
|
+
get: function get() {
|
|
18295
|
+
return this[MAX_AGE];
|
|
18296
|
+
},
|
|
18297
|
+
set: function set(mA) {
|
|
18298
|
+
if (typeof mA !== "number") throw new TypeError("maxAge must be a non-negative number");
|
|
18299
|
+
this[MAX_AGE] = mA;
|
|
18300
|
+
trim(this);
|
|
18301
|
+
}
|
|
18302
|
+
},
|
|
18303
|
+
{
|
|
18304
|
+
key: "lengthCalculator",
|
|
18305
|
+
get: function get() {
|
|
18306
|
+
return this[LENGTH_CALCULATOR];
|
|
18307
|
+
},
|
|
18308
|
+
set: // resize the cache when the lengthCalculator changes.
|
|
18309
|
+
function set(lC) {
|
|
18310
|
+
var _this = this;
|
|
18311
|
+
if (typeof lC !== "function") lC = naiveLength;
|
|
18312
|
+
if (lC !== this[LENGTH_CALCULATOR]) {
|
|
18313
|
+
this[LENGTH_CALCULATOR] = lC;
|
|
18314
|
+
this[LENGTH] = 0;
|
|
18315
|
+
this[LRU_LIST].forEach(function(hit) {
|
|
18316
|
+
hit.length = _this[LENGTH_CALCULATOR](hit.value, hit.key);
|
|
18317
|
+
_this[LENGTH] += hit.length;
|
|
18318
|
+
});
|
|
18319
|
+
}
|
|
18320
|
+
trim(this);
|
|
18321
|
+
}
|
|
18322
|
+
},
|
|
18323
|
+
{
|
|
18324
|
+
key: "length",
|
|
18325
|
+
get: function get() {
|
|
18326
|
+
return this[LENGTH];
|
|
18327
|
+
}
|
|
18328
|
+
},
|
|
18329
|
+
{
|
|
18330
|
+
key: "itemCount",
|
|
18331
|
+
get: function get() {
|
|
18332
|
+
return this[LRU_LIST].length;
|
|
18333
|
+
}
|
|
18334
|
+
},
|
|
18335
|
+
{
|
|
18336
|
+
key: "rforEach",
|
|
18337
|
+
value: function rforEach(fn, thisp) {
|
|
18338
|
+
thisp = thisp || this;
|
|
18339
|
+
for(var walker = this[LRU_LIST].tail; walker !== null;){
|
|
18340
|
+
var prev = walker.prev;
|
|
18341
|
+
forEachStep(this, fn, walker, thisp);
|
|
18342
|
+
walker = prev;
|
|
17958
18343
|
}
|
|
17959
18344
|
}
|
|
17960
18345
|
},
|
|
17961
18346
|
{
|
|
17962
|
-
key: "
|
|
17963
|
-
value: function
|
|
17964
|
-
|
|
18347
|
+
key: "forEach",
|
|
18348
|
+
value: function forEach(fn, thisp) {
|
|
18349
|
+
thisp = thisp || this;
|
|
18350
|
+
for(var walker = this[LRU_LIST].head; walker !== null;){
|
|
18351
|
+
var next = walker.next;
|
|
18352
|
+
forEachStep(this, fn, walker, thisp);
|
|
18353
|
+
walker = next;
|
|
18354
|
+
}
|
|
18355
|
+
}
|
|
18356
|
+
},
|
|
18357
|
+
{
|
|
18358
|
+
key: "keys",
|
|
18359
|
+
value: function keys() {
|
|
18360
|
+
return this[LRU_LIST].toArray().map(function(k) {
|
|
18361
|
+
return k.key;
|
|
18362
|
+
});
|
|
18363
|
+
}
|
|
18364
|
+
},
|
|
18365
|
+
{
|
|
18366
|
+
key: "values",
|
|
18367
|
+
value: function values() {
|
|
18368
|
+
return this[LRU_LIST].toArray().map(function(k) {
|
|
18369
|
+
return k.value;
|
|
18370
|
+
});
|
|
18371
|
+
}
|
|
18372
|
+
},
|
|
18373
|
+
{
|
|
18374
|
+
key: "reset",
|
|
18375
|
+
value: function reset() {
|
|
18376
|
+
var _this = this;
|
|
18377
|
+
if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
|
|
18378
|
+
this[LRU_LIST].forEach(function(hit) {
|
|
18379
|
+
return _this[DISPOSE](hit.key, hit.value);
|
|
18380
|
+
});
|
|
18381
|
+
}
|
|
18382
|
+
this[CACHE] = new Map() // hash of items by key
|
|
18383
|
+
;
|
|
18384
|
+
this[LRU_LIST] = new Yallist() // list of items in order of use recency
|
|
18385
|
+
;
|
|
18386
|
+
this[LENGTH] = 0 // length of items in the list
|
|
18387
|
+
;
|
|
18388
|
+
}
|
|
18389
|
+
},
|
|
18390
|
+
{
|
|
18391
|
+
key: "dump",
|
|
18392
|
+
value: function dump() {
|
|
18393
|
+
var _this = this;
|
|
18394
|
+
return this[LRU_LIST].map(function(hit) {
|
|
18395
|
+
return isStale(_this, hit) ? false : {
|
|
18396
|
+
k: hit.key,
|
|
18397
|
+
v: hit.value,
|
|
18398
|
+
e: hit.now + (hit.maxAge || 0)
|
|
18399
|
+
};
|
|
18400
|
+
}).toArray().filter(function(h) {
|
|
18401
|
+
return h;
|
|
18402
|
+
});
|
|
18403
|
+
}
|
|
18404
|
+
},
|
|
18405
|
+
{
|
|
18406
|
+
key: "dumpLru",
|
|
18407
|
+
value: function dumpLru() {
|
|
18408
|
+
return this[LRU_LIST];
|
|
17965
18409
|
}
|
|
17966
18410
|
},
|
|
17967
18411
|
{
|
|
17968
18412
|
key: "set",
|
|
17969
|
-
value: function set(key, value) {
|
|
17970
|
-
|
|
17971
|
-
if (
|
|
17972
|
-
|
|
17973
|
-
|
|
17974
|
-
|
|
17975
|
-
|
|
18413
|
+
value: function set(key, value, maxAge) {
|
|
18414
|
+
maxAge = maxAge || this[MAX_AGE];
|
|
18415
|
+
if (maxAge && typeof maxAge !== "number") throw new TypeError("maxAge must be a number");
|
|
18416
|
+
var now = maxAge ? Date.now() : 0;
|
|
18417
|
+
var len = this[LENGTH_CALCULATOR](value, key);
|
|
18418
|
+
if (this[CACHE].has(key)) {
|
|
18419
|
+
if (len > this[MAX]) {
|
|
18420
|
+
del(this, this[CACHE].get(key));
|
|
18421
|
+
return false;
|
|
18422
|
+
}
|
|
18423
|
+
var node = this[CACHE].get(key);
|
|
18424
|
+
var item = node.value;
|
|
18425
|
+
// dispose of the old one before overwriting
|
|
18426
|
+
// split out into 2 ifs for better coverage tracking
|
|
18427
|
+
if (this[DISPOSE]) {
|
|
18428
|
+
if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key, item.value);
|
|
17976
18429
|
}
|
|
17977
|
-
|
|
18430
|
+
item.now = now;
|
|
18431
|
+
item.maxAge = maxAge;
|
|
18432
|
+
item.value = value;
|
|
18433
|
+
this[LENGTH] += len - item.length;
|
|
18434
|
+
item.length = len;
|
|
18435
|
+
this.get(key);
|
|
18436
|
+
trim(this);
|
|
18437
|
+
return true;
|
|
17978
18438
|
}
|
|
17979
|
-
|
|
18439
|
+
var hit = new Entry(key, value, len, now, maxAge);
|
|
18440
|
+
// oversized objects fall out of cache automatically.
|
|
18441
|
+
if (hit.length > this[MAX]) {
|
|
18442
|
+
if (this[DISPOSE]) this[DISPOSE](key, value);
|
|
18443
|
+
return false;
|
|
18444
|
+
}
|
|
18445
|
+
this[LENGTH] += hit.length;
|
|
18446
|
+
this[LRU_LIST].unshift(hit);
|
|
18447
|
+
this[CACHE].set(key, this[LRU_LIST].head);
|
|
18448
|
+
trim(this);
|
|
18449
|
+
return true;
|
|
18450
|
+
}
|
|
18451
|
+
},
|
|
18452
|
+
{
|
|
18453
|
+
key: "has",
|
|
18454
|
+
value: function has(key) {
|
|
18455
|
+
if (!this[CACHE].has(key)) return false;
|
|
18456
|
+
var hit = this[CACHE].get(key).value;
|
|
18457
|
+
return !isStale(this, hit);
|
|
18458
|
+
}
|
|
18459
|
+
},
|
|
18460
|
+
{
|
|
18461
|
+
key: "get",
|
|
18462
|
+
value: function get1(key) {
|
|
18463
|
+
return get(this, key, true);
|
|
18464
|
+
}
|
|
18465
|
+
},
|
|
18466
|
+
{
|
|
18467
|
+
key: "peek",
|
|
18468
|
+
value: function peek(key) {
|
|
18469
|
+
return get(this, key, false);
|
|
18470
|
+
}
|
|
18471
|
+
},
|
|
18472
|
+
{
|
|
18473
|
+
key: "pop",
|
|
18474
|
+
value: function pop() {
|
|
18475
|
+
var node = this[LRU_LIST].tail;
|
|
18476
|
+
if (!node) return null;
|
|
18477
|
+
del(this, node);
|
|
18478
|
+
return node.value;
|
|
18479
|
+
}
|
|
18480
|
+
},
|
|
18481
|
+
{
|
|
18482
|
+
key: "del",
|
|
18483
|
+
value: function del1(key) {
|
|
18484
|
+
del(this, this[CACHE].get(key));
|
|
18485
|
+
}
|
|
18486
|
+
},
|
|
18487
|
+
{
|
|
18488
|
+
key: "load",
|
|
18489
|
+
value: function load(arr) {
|
|
18490
|
+
// reset the cache
|
|
18491
|
+
this.reset();
|
|
18492
|
+
var now = Date.now();
|
|
18493
|
+
// A previous serialized cache has the most recent items first
|
|
18494
|
+
for(var l = arr.length - 1; l >= 0; l--){
|
|
18495
|
+
var hit = arr[l];
|
|
18496
|
+
var expiresAt = hit.e || 0;
|
|
18497
|
+
if (expiresAt === 0) // the item was created without expiration in a non aged cache
|
|
18498
|
+
this.set(hit.k, hit.v);
|
|
18499
|
+
else {
|
|
18500
|
+
var maxAge = expiresAt - now;
|
|
18501
|
+
// dont add already expired items
|
|
18502
|
+
if (maxAge > 0) {
|
|
18503
|
+
this.set(hit.k, hit.v, maxAge);
|
|
18504
|
+
}
|
|
18505
|
+
}
|
|
18506
|
+
}
|
|
18507
|
+
}
|
|
18508
|
+
},
|
|
18509
|
+
{
|
|
18510
|
+
key: "prune",
|
|
18511
|
+
value: function prune() {
|
|
18512
|
+
var _this = this;
|
|
18513
|
+
this[CACHE].forEach(function(value, key) {
|
|
18514
|
+
return get(_this, key, false);
|
|
18515
|
+
});
|
|
17980
18516
|
}
|
|
17981
18517
|
}
|
|
17982
18518
|
]);
|
|
17983
18519
|
return LRUCache;
|
|
17984
18520
|
}();
|
|
17985
|
-
var
|
|
18521
|
+
var get = function(self, key, doUse) {
|
|
18522
|
+
var node = self[CACHE].get(key);
|
|
18523
|
+
if (node) {
|
|
18524
|
+
var hit = node.value;
|
|
18525
|
+
if (isStale(self, hit)) {
|
|
18526
|
+
del(self, node);
|
|
18527
|
+
if (!self[ALLOW_STALE]) return undefined;
|
|
18528
|
+
} else {
|
|
18529
|
+
if (doUse) {
|
|
18530
|
+
if (self[UPDATE_AGE_ON_GET]) node.value.now = Date.now();
|
|
18531
|
+
self[LRU_LIST].unshiftNode(node);
|
|
18532
|
+
}
|
|
18533
|
+
}
|
|
18534
|
+
return hit.value;
|
|
18535
|
+
}
|
|
18536
|
+
};
|
|
18537
|
+
var isStale = function(self, hit) {
|
|
18538
|
+
if (!hit || !hit.maxAge && !self[MAX_AGE]) return false;
|
|
18539
|
+
var diff = Date.now() - hit.now;
|
|
18540
|
+
return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE];
|
|
18541
|
+
};
|
|
18542
|
+
var trim = function(self) {
|
|
18543
|
+
if (self[LENGTH] > self[MAX]) {
|
|
18544
|
+
for(var walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null;){
|
|
18545
|
+
// We know that we're about to delete this one, and also
|
|
18546
|
+
// what the next least recently used key will be, so just
|
|
18547
|
+
// go ahead and set it now.
|
|
18548
|
+
var prev = walker.prev;
|
|
18549
|
+
del(self, walker);
|
|
18550
|
+
walker = prev;
|
|
18551
|
+
}
|
|
18552
|
+
}
|
|
18553
|
+
};
|
|
18554
|
+
var del = function(self, node) {
|
|
18555
|
+
if (node) {
|
|
18556
|
+
var hit = node.value;
|
|
18557
|
+
if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value);
|
|
18558
|
+
self[LENGTH] -= hit.length;
|
|
18559
|
+
self[CACHE].delete(hit.key);
|
|
18560
|
+
self[LRU_LIST].removeNode(node);
|
|
18561
|
+
}
|
|
18562
|
+
};
|
|
18563
|
+
var Entry = function Entry(key, value, length, now, maxAge) {
|
|
18564
|
+
_class_call_check$a(this, Entry);
|
|
18565
|
+
this.key = key;
|
|
18566
|
+
this.value = value;
|
|
18567
|
+
this.length = length;
|
|
18568
|
+
this.now = now;
|
|
18569
|
+
this.maxAge = maxAge || 0;
|
|
18570
|
+
};
|
|
18571
|
+
var forEachStep = function(self, fn, node, thisp) {
|
|
18572
|
+
var hit = node.value;
|
|
18573
|
+
if (isStale(self, hit)) {
|
|
18574
|
+
del(self, node);
|
|
18575
|
+
if (!self[ALLOW_STALE]) hit = undefined;
|
|
18576
|
+
}
|
|
18577
|
+
if (hit) fn.call(thisp, hit.value, hit.key, self);
|
|
18578
|
+
};
|
|
18579
|
+
var lruCache = LRUCache;
|
|
17986
18580
|
|
|
18581
|
+
// hoisted class for cyclic dependency
|
|
17987
18582
|
function _array_like_to_array$3(arr, len) {
|
|
17988
18583
|
if (len == null || len > arr.length) len = arr.length;
|
|
17989
18584
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -17992,12 +18587,12 @@ function _array_like_to_array$3(arr, len) {
|
|
|
17992
18587
|
function _array_without_holes$1(arr) {
|
|
17993
18588
|
if (Array.isArray(arr)) return _array_like_to_array$3(arr);
|
|
17994
18589
|
}
|
|
17995
|
-
function _class_call_check$
|
|
18590
|
+
function _class_call_check$9(instance, Constructor) {
|
|
17996
18591
|
if (!(instance instanceof Constructor)) {
|
|
17997
18592
|
throw new TypeError("Cannot call a class as a function");
|
|
17998
18593
|
}
|
|
17999
18594
|
}
|
|
18000
|
-
function _defineProperties$
|
|
18595
|
+
function _defineProperties$9(target, props) {
|
|
18001
18596
|
for(var i = 0; i < props.length; i++){
|
|
18002
18597
|
var descriptor = props[i];
|
|
18003
18598
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -18006,9 +18601,9 @@ function _defineProperties$8(target, props) {
|
|
|
18006
18601
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
18007
18602
|
}
|
|
18008
18603
|
}
|
|
18009
|
-
function _create_class$
|
|
18010
|
-
if (protoProps) _defineProperties$
|
|
18011
|
-
if (staticProps) _defineProperties$
|
|
18604
|
+
function _create_class$9(Constructor, protoProps, staticProps) {
|
|
18605
|
+
if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
|
|
18606
|
+
if (staticProps) _defineProperties$9(Constructor, staticProps);
|
|
18012
18607
|
return Constructor;
|
|
18013
18608
|
}
|
|
18014
18609
|
function _instanceof$7(left, right) {
|
|
@@ -18035,12 +18630,10 @@ function _unsupported_iterable_to_array$3(o, minLen) {
|
|
|
18035
18630
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
18036
18631
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
|
|
18037
18632
|
}
|
|
18038
|
-
var SPACE_CHARACTERS = /\s+/g;
|
|
18039
|
-
// hoisted class for cyclic dependency
|
|
18040
18633
|
var Range$b = /*#__PURE__*/ function() {
|
|
18041
18634
|
function Range(range, options) {
|
|
18042
18635
|
var _this = this;
|
|
18043
|
-
_class_call_check$
|
|
18636
|
+
_class_call_check$9(this, Range);
|
|
18044
18637
|
options = parseOptions$1(options);
|
|
18045
18638
|
if (_instanceof$7(range, Range)) {
|
|
18046
18639
|
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
|
|
@@ -18057,7 +18650,7 @@ var Range$b = /*#__PURE__*/ function() {
|
|
|
18057
18650
|
range
|
|
18058
18651
|
]
|
|
18059
18652
|
];
|
|
18060
|
-
this.
|
|
18653
|
+
this.format();
|
|
18061
18654
|
return this;
|
|
18062
18655
|
}
|
|
18063
18656
|
this.options = options;
|
|
@@ -18066,7 +18659,7 @@ var Range$b = /*#__PURE__*/ function() {
|
|
|
18066
18659
|
// First reduce all whitespace as much as possible so we do not have to rely
|
|
18067
18660
|
// on potentially slow regexes like \s*. This is then stored and used for
|
|
18068
18661
|
// future error messages as well.
|
|
18069
|
-
this.raw = range.trim().
|
|
18662
|
+
this.raw = range.trim().split(/\s+/).join(" ");
|
|
18070
18663
|
// First, split on ||
|
|
18071
18664
|
this.set = this.raw.split("||")// map the range to a 2d array of comparators
|
|
18072
18665
|
.map(function(r) {
|
|
@@ -18120,33 +18713,15 @@ var Range$b = /*#__PURE__*/ function() {
|
|
|
18120
18713
|
}
|
|
18121
18714
|
}
|
|
18122
18715
|
}
|
|
18123
|
-
this.
|
|
18716
|
+
this.format();
|
|
18124
18717
|
}
|
|
18125
|
-
_create_class$
|
|
18126
|
-
{
|
|
18127
|
-
key: "range",
|
|
18128
|
-
get: function get() {
|
|
18129
|
-
if (this.formatted === undefined) {
|
|
18130
|
-
this.formatted = "";
|
|
18131
|
-
for(var i = 0; i < this.set.length; i++){
|
|
18132
|
-
if (i > 0) {
|
|
18133
|
-
this.formatted += "||";
|
|
18134
|
-
}
|
|
18135
|
-
var comps = this.set[i];
|
|
18136
|
-
for(var k = 0; k < comps.length; k++){
|
|
18137
|
-
if (k > 0) {
|
|
18138
|
-
this.formatted += " ";
|
|
18139
|
-
}
|
|
18140
|
-
this.formatted += comps[k].toString().trim();
|
|
18141
|
-
}
|
|
18142
|
-
}
|
|
18143
|
-
}
|
|
18144
|
-
return this.formatted;
|
|
18145
|
-
}
|
|
18146
|
-
},
|
|
18718
|
+
_create_class$9(Range, [
|
|
18147
18719
|
{
|
|
18148
18720
|
key: "format",
|
|
18149
18721
|
value: function format() {
|
|
18722
|
+
this.range = this.set.map(function(comps) {
|
|
18723
|
+
return comps.join(" ").trim();
|
|
18724
|
+
}).join("||").trim();
|
|
18150
18725
|
return this.range;
|
|
18151
18726
|
}
|
|
18152
18727
|
},
|
|
@@ -18281,8 +18856,10 @@ var Range$b = /*#__PURE__*/ function() {
|
|
|
18281
18856
|
return Range;
|
|
18282
18857
|
}();
|
|
18283
18858
|
var range = Range$b;
|
|
18284
|
-
var LRU =
|
|
18285
|
-
var cache = new LRU(
|
|
18859
|
+
var LRU = lruCache;
|
|
18860
|
+
var cache = new LRU({
|
|
18861
|
+
max: 1000
|
|
18862
|
+
});
|
|
18286
18863
|
var parseOptions$1 = parseOptions_1;
|
|
18287
18864
|
var Comparator$4 = comparator;
|
|
18288
18865
|
var debug$1 = debug_1;
|
|
@@ -18506,9 +19083,8 @@ var replaceGTE0 = function(comp, options) {
|
|
|
18506
19083
|
// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
|
|
18507
19084
|
// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
|
|
18508
19085
|
// 1.2 - 3.4 => >=1.2.0 <3.5.0-0
|
|
18509
|
-
// TODO build?
|
|
18510
19086
|
var hyphenReplace = function(incPr) {
|
|
18511
|
-
return function($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) {
|
|
19087
|
+
return function($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
|
|
18512
19088
|
if (isX(fM)) {
|
|
18513
19089
|
from = "";
|
|
18514
19090
|
} else if (isX(fm)) {
|
|
@@ -18566,12 +19142,12 @@ var testSet = function(set, version, options) {
|
|
|
18566
19142
|
return true;
|
|
18567
19143
|
};
|
|
18568
19144
|
|
|
18569
|
-
function _class_call_check$
|
|
19145
|
+
function _class_call_check$8(instance, Constructor) {
|
|
18570
19146
|
if (!(instance instanceof Constructor)) {
|
|
18571
19147
|
throw new TypeError("Cannot call a class as a function");
|
|
18572
19148
|
}
|
|
18573
19149
|
}
|
|
18574
|
-
function _defineProperties$
|
|
19150
|
+
function _defineProperties$8(target, props) {
|
|
18575
19151
|
for(var i = 0; i < props.length; i++){
|
|
18576
19152
|
var descriptor = props[i];
|
|
18577
19153
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -18580,9 +19156,9 @@ function _defineProperties$7(target, props) {
|
|
|
18580
19156
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
18581
19157
|
}
|
|
18582
19158
|
}
|
|
18583
|
-
function _create_class$
|
|
18584
|
-
if (protoProps) _defineProperties$
|
|
18585
|
-
if (staticProps) _defineProperties$
|
|
19159
|
+
function _create_class$8(Constructor, protoProps, staticProps) {
|
|
19160
|
+
if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
|
|
19161
|
+
if (staticProps) _defineProperties$8(Constructor, staticProps);
|
|
18586
19162
|
return Constructor;
|
|
18587
19163
|
}
|
|
18588
19164
|
function _instanceof$6(left, right) {
|
|
@@ -18596,7 +19172,7 @@ var ANY$2 = Symbol("SemVer ANY");
|
|
|
18596
19172
|
// hoisted class for cyclic dependency
|
|
18597
19173
|
var Comparator$3 = /*#__PURE__*/ function() {
|
|
18598
19174
|
function Comparator(comp, options) {
|
|
18599
|
-
_class_call_check$
|
|
19175
|
+
_class_call_check$8(this, Comparator);
|
|
18600
19176
|
options = parseOptions(options);
|
|
18601
19177
|
if (_instanceof$6(comp, Comparator)) {
|
|
18602
19178
|
if (comp.loose === !!options.loose) {
|
|
@@ -18617,7 +19193,7 @@ var Comparator$3 = /*#__PURE__*/ function() {
|
|
|
18617
19193
|
}
|
|
18618
19194
|
debug("comp", this);
|
|
18619
19195
|
}
|
|
18620
|
-
_create_class$
|
|
19196
|
+
_create_class$8(Comparator, [
|
|
18621
19197
|
{
|
|
18622
19198
|
key: "parse",
|
|
18623
19199
|
value: function parse(comp) {
|
|
@@ -18864,7 +19440,7 @@ var validRange$1 = function(range, options) {
|
|
|
18864
19440
|
};
|
|
18865
19441
|
var valid$1 = validRange$1;
|
|
18866
19442
|
|
|
18867
|
-
function _type_of$
|
|
19443
|
+
function _type_of$9(obj) {
|
|
18868
19444
|
"@swc/helpers - typeof";
|
|
18869
19445
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
18870
19446
|
}
|
|
@@ -18942,7 +19518,7 @@ var outside$3 = function(version, range, hilo, options) {
|
|
|
18942
19518
|
// but note that everything is flipped for the "ltr" function.
|
|
18943
19519
|
for(var i = 0; i < range.set.length; ++i){
|
|
18944
19520
|
var _ret = _loop(i);
|
|
18945
|
-
if (_type_of$
|
|
19521
|
+
if (_type_of$9(_ret) === "object") return _ret.v;
|
|
18946
19522
|
}
|
|
18947
19523
|
return true;
|
|
18948
19524
|
};
|
|
@@ -19838,7 +20414,7 @@ var verify = function(jwtString, secretOrPublicKey, options, callback) {
|
|
|
19838
20414
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
19839
20415
|
*/
|
|
19840
20416
|
|
|
19841
|
-
/** Used as references for various `Number` constants. */ function _type_of$
|
|
20417
|
+
/** Used as references for various `Number` constants. */ function _type_of$8(obj) {
|
|
19842
20418
|
"@swc/helpers - typeof";
|
|
19843
20419
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
19844
20420
|
}
|
|
@@ -20232,7 +20808,7 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
20232
20808
|
* _.isObject(null);
|
|
20233
20809
|
* // => false
|
|
20234
20810
|
*/ function isObject$2(value) {
|
|
20235
|
-
var type = typeof value === "undefined" ? "undefined" : _type_of$
|
|
20811
|
+
var type = typeof value === "undefined" ? "undefined" : _type_of$8(value);
|
|
20236
20812
|
return !!value && (type == "object" || type == "function");
|
|
20237
20813
|
}
|
|
20238
20814
|
/**
|
|
@@ -20297,7 +20873,7 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
|
|
|
20297
20873
|
* _.isSymbol('abc');
|
|
20298
20874
|
* // => false
|
|
20299
20875
|
*/ function isSymbol$2(value) {
|
|
20300
|
-
return (typeof value === "undefined" ? "undefined" : _type_of$
|
|
20876
|
+
return (typeof value === "undefined" ? "undefined" : _type_of$8(value)) == "symbol" || isObjectLike$6(value) && objectToString$6.call(value) == symbolTag$2;
|
|
20301
20877
|
}
|
|
20302
20878
|
/**
|
|
20303
20879
|
* Converts `value` to a finite number.
|
|
@@ -20530,7 +21106,7 @@ var lodash_isboolean = isBoolean$1;
|
|
|
20530
21106
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
20531
21107
|
*/
|
|
20532
21108
|
|
|
20533
|
-
/** Used as references for various `Number` constants. */ function _type_of$
|
|
21109
|
+
/** Used as references for various `Number` constants. */ function _type_of$7(obj) {
|
|
20534
21110
|
"@swc/helpers - typeof";
|
|
20535
21111
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
20536
21112
|
}
|
|
@@ -20600,7 +21176,7 @@ var INFINITY$1 = 1 / 0, MAX_INTEGER$1 = 1.7976931348623157e+308, NAN$1 = 0 / 0;
|
|
|
20600
21176
|
* _.isObject(null);
|
|
20601
21177
|
* // => false
|
|
20602
21178
|
*/ function isObject$1(value) {
|
|
20603
|
-
var type = typeof value === "undefined" ? "undefined" : _type_of$
|
|
21179
|
+
var type = typeof value === "undefined" ? "undefined" : _type_of$7(value);
|
|
20604
21180
|
return !!value && (type == "object" || type == "function");
|
|
20605
21181
|
}
|
|
20606
21182
|
/**
|
|
@@ -20646,7 +21222,7 @@ var INFINITY$1 = 1 / 0, MAX_INTEGER$1 = 1.7976931348623157e+308, NAN$1 = 0 / 0;
|
|
|
20646
21222
|
* _.isSymbol('abc');
|
|
20647
21223
|
* // => false
|
|
20648
21224
|
*/ function isSymbol$1(value) {
|
|
20649
|
-
return (typeof value === "undefined" ? "undefined" : _type_of$
|
|
21225
|
+
return (typeof value === "undefined" ? "undefined" : _type_of$7(value)) == "symbol" || isObjectLike$4(value) && objectToString$4.call(value) == symbolTag$1;
|
|
20650
21226
|
}
|
|
20651
21227
|
/**
|
|
20652
21228
|
* Converts `value` to a finite number.
|
|
@@ -21035,7 +21611,7 @@ var lodash_isstring = isString$1;
|
|
|
21035
21611
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
21036
21612
|
*/
|
|
21037
21613
|
|
|
21038
|
-
/** Used as the `TypeError` message for "Functions" methods. */ function _type_of$
|
|
21614
|
+
/** Used as the `TypeError` message for "Functions" methods. */ function _type_of$6(obj) {
|
|
21039
21615
|
"@swc/helpers - typeof";
|
|
21040
21616
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
21041
21617
|
}
|
|
@@ -21130,7 +21706,7 @@ var FUNC_ERROR_TEXT = "Expected a function";
|
|
|
21130
21706
|
* _.isObject(null);
|
|
21131
21707
|
* // => false
|
|
21132
21708
|
*/ function isObject(value) {
|
|
21133
|
-
var type = typeof value === "undefined" ? "undefined" : _type_of$
|
|
21709
|
+
var type = typeof value === "undefined" ? "undefined" : _type_of$6(value);
|
|
21134
21710
|
return !!value && (type == "object" || type == "function");
|
|
21135
21711
|
}
|
|
21136
21712
|
/**
|
|
@@ -21176,7 +21752,7 @@ var FUNC_ERROR_TEXT = "Expected a function";
|
|
|
21176
21752
|
* _.isSymbol('abc');
|
|
21177
21753
|
* // => false
|
|
21178
21754
|
*/ function isSymbol(value) {
|
|
21179
|
-
return (typeof value === "undefined" ? "undefined" : _type_of$
|
|
21755
|
+
return (typeof value === "undefined" ? "undefined" : _type_of$6(value)) == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
|
|
21180
21756
|
}
|
|
21181
21757
|
/**
|
|
21182
21758
|
* Converts `value` to a finite number.
|
|
@@ -21289,7 +21865,7 @@ function _instanceof$3(left, right) {
|
|
|
21289
21865
|
return left instanceof right;
|
|
21290
21866
|
}
|
|
21291
21867
|
}
|
|
21292
|
-
function _type_of$
|
|
21868
|
+
function _type_of$5(obj) {
|
|
21293
21869
|
"@swc/helpers - typeof";
|
|
21294
21870
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
21295
21871
|
}
|
|
@@ -21496,7 +22072,7 @@ var sign = function(payload, secretOrPrivateKey, options, callback) {
|
|
|
21496
22072
|
return typeof options[opt] !== "undefined";
|
|
21497
22073
|
});
|
|
21498
22074
|
if (invalid_options.length > 0) {
|
|
21499
|
-
return failure(new Error("invalid " + invalid_options.join(",") + " option for " + (typeof payload === "undefined" ? "undefined" : _type_of$
|
|
22075
|
+
return failure(new Error("invalid " + invalid_options.join(",") + " option for " + (typeof payload === "undefined" ? "undefined" : _type_of$5(payload)) + " payload"));
|
|
21500
22076
|
}
|
|
21501
22077
|
}
|
|
21502
22078
|
if (typeof payload.exp !== "undefined" && typeof options.expiresIn !== "undefined") {
|
|
@@ -21591,12 +22167,12 @@ var jsonwebtoken = {
|
|
|
21591
22167
|
TokenExpiredError: TokenExpiredError_1
|
|
21592
22168
|
};
|
|
21593
22169
|
|
|
21594
|
-
function _class_call_check$
|
|
22170
|
+
function _class_call_check$7(instance, Constructor) {
|
|
21595
22171
|
if (!(instance instanceof Constructor)) {
|
|
21596
22172
|
throw new TypeError("Cannot call a class as a function");
|
|
21597
22173
|
}
|
|
21598
22174
|
}
|
|
21599
|
-
function _defineProperties$
|
|
22175
|
+
function _defineProperties$7(target, props) {
|
|
21600
22176
|
for(var i = 0; i < props.length; i++){
|
|
21601
22177
|
var descriptor = props[i];
|
|
21602
22178
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -21605,9 +22181,9 @@ function _defineProperties$6(target, props) {
|
|
|
21605
22181
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
21606
22182
|
}
|
|
21607
22183
|
}
|
|
21608
|
-
function _create_class$
|
|
21609
|
-
if (protoProps) _defineProperties$
|
|
21610
|
-
if (staticProps) _defineProperties$
|
|
22184
|
+
function _create_class$7(Constructor, protoProps, staticProps) {
|
|
22185
|
+
if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
|
|
22186
|
+
if (staticProps) _defineProperties$7(Constructor, staticProps);
|
|
21611
22187
|
return Constructor;
|
|
21612
22188
|
}
|
|
21613
22189
|
function _define_property$2(obj, key, value) {
|
|
@@ -21631,9 +22207,9 @@ function _define_property$2(obj, key, value) {
|
|
|
21631
22207
|
* @public
|
|
21632
22208
|
*/ var ClientAssertion = /*#__PURE__*/ function() {
|
|
21633
22209
|
function ClientAssertion() {
|
|
21634
|
-
_class_call_check$
|
|
22210
|
+
_class_call_check$7(this, ClientAssertion);
|
|
21635
22211
|
}
|
|
21636
|
-
_create_class$
|
|
22212
|
+
_create_class$7(ClientAssertion, [
|
|
21637
22213
|
{
|
|
21638
22214
|
/**
|
|
21639
22215
|
* Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
|
|
@@ -21667,14 +22243,14 @@ function _define_property$2(obj, key, value) {
|
|
|
21667
22243
|
this.jwtAudience = jwtAudience;
|
|
21668
22244
|
var issuedAt = nowSeconds();
|
|
21669
22245
|
this.expirationTime = issuedAt + 600;
|
|
21670
|
-
var algorithm = this.useSha256 ? JwtConstants.PSS_256 : JwtConstants.RSA_256;
|
|
21671
22246
|
var header = {
|
|
21672
|
-
alg:
|
|
22247
|
+
alg: JwtConstants.RSA_256,
|
|
22248
|
+
x5t: EncodingUtils.base64EncodeUrl(this.thumbprint, "hex")
|
|
21673
22249
|
};
|
|
21674
|
-
var thumbprintHeader = this.useSha256 ? JwtConstants.X5T_256 : JwtConstants.X5T;
|
|
21675
|
-
Object.assign(header, _define_property$2({}, thumbprintHeader, EncodingUtils.base64EncodeUrl(this.thumbprint, "hex")));
|
|
21676
22250
|
if (this.publicCertificate) {
|
|
21677
|
-
Object.assign(header,
|
|
22251
|
+
Object.assign(header, {
|
|
22252
|
+
x5c: this.publicCertificate
|
|
22253
|
+
});
|
|
21678
22254
|
}
|
|
21679
22255
|
var _obj;
|
|
21680
22256
|
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);
|
|
@@ -21707,7 +22283,6 @@ function _define_property$2(obj, key, value) {
|
|
|
21707
22283
|
{
|
|
21708
22284
|
key: "fromCertificate",
|
|
21709
22285
|
value: /**
|
|
21710
|
-
* @deprecated Use fromCertificateWithSha256Thumbprint instead, with a SHA-256 thumprint
|
|
21711
22286
|
* Initialize the ClientAssertion class from the certificate passed by the user
|
|
21712
22287
|
* @param thumbprint - identifier of a certificate
|
|
21713
22288
|
* @param privateKey - secret key
|
|
@@ -21716,25 +22291,6 @@ function _define_property$2(obj, key, value) {
|
|
|
21716
22291
|
var clientAssertion = new ClientAssertion();
|
|
21717
22292
|
clientAssertion.privateKey = privateKey;
|
|
21718
22293
|
clientAssertion.thumbprint = thumbprint;
|
|
21719
|
-
clientAssertion.useSha256 = false;
|
|
21720
|
-
if (publicCertificate) {
|
|
21721
|
-
clientAssertion.publicCertificate = this.parseCertificate(publicCertificate);
|
|
21722
|
-
}
|
|
21723
|
-
return clientAssertion;
|
|
21724
|
-
}
|
|
21725
|
-
},
|
|
21726
|
-
{
|
|
21727
|
-
key: "fromCertificateWithSha256Thumbprint",
|
|
21728
|
-
value: /**
|
|
21729
|
-
* Initialize the ClientAssertion class from the certificate passed by the user
|
|
21730
|
-
* @param thumbprint - identifier of a certificate
|
|
21731
|
-
* @param privateKey - secret key
|
|
21732
|
-
* @param publicCertificate - electronic document provided to prove the ownership of the public key
|
|
21733
|
-
*/ function fromCertificateWithSha256Thumbprint(thumbprint, privateKey, publicCertificate) {
|
|
21734
|
-
var clientAssertion = new ClientAssertion();
|
|
21735
|
-
clientAssertion.privateKey = privateKey;
|
|
21736
|
-
clientAssertion.thumbprint = thumbprint;
|
|
21737
|
-
clientAssertion.useSha256 = true;
|
|
21738
22294
|
if (publicCertificate) {
|
|
21739
22295
|
clientAssertion.publicCertificate = this.parseCertificate(publicCertificate);
|
|
21740
22296
|
}
|
|
@@ -21768,7 +22324,198 @@ function _define_property$2(obj, key, value) {
|
|
|
21768
22324
|
}();
|
|
21769
22325
|
|
|
21770
22326
|
/* eslint-disable header/header */ var name = "@azure/msal-node";
|
|
21771
|
-
var version = "2.
|
|
22327
|
+
var version = "2.10.0";
|
|
22328
|
+
|
|
22329
|
+
function _assert_this_initialized$4(self) {
|
|
22330
|
+
if (self === void 0) {
|
|
22331
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
22332
|
+
}
|
|
22333
|
+
return self;
|
|
22334
|
+
}
|
|
22335
|
+
function _class_call_check$6(instance, Constructor) {
|
|
22336
|
+
if (!(instance instanceof Constructor)) {
|
|
22337
|
+
throw new TypeError("Cannot call a class as a function");
|
|
22338
|
+
}
|
|
22339
|
+
}
|
|
22340
|
+
function _defineProperties$6(target, props) {
|
|
22341
|
+
for(var i = 0; i < props.length; i++){
|
|
22342
|
+
var descriptor = props[i];
|
|
22343
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
22344
|
+
descriptor.configurable = true;
|
|
22345
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
22346
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
22347
|
+
}
|
|
22348
|
+
}
|
|
22349
|
+
function _create_class$6(Constructor, protoProps, staticProps) {
|
|
22350
|
+
if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
|
|
22351
|
+
if (staticProps) _defineProperties$6(Constructor, staticProps);
|
|
22352
|
+
return Constructor;
|
|
22353
|
+
}
|
|
22354
|
+
function _get_prototype_of$4(o) {
|
|
22355
|
+
_get_prototype_of$4 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
22356
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
22357
|
+
};
|
|
22358
|
+
return _get_prototype_of$4(o);
|
|
22359
|
+
}
|
|
22360
|
+
function _inherits$4(subClass, superClass) {
|
|
22361
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
22362
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
22363
|
+
}
|
|
22364
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
22365
|
+
constructor: {
|
|
22366
|
+
value: subClass,
|
|
22367
|
+
writable: true,
|
|
22368
|
+
configurable: true
|
|
22369
|
+
}
|
|
22370
|
+
});
|
|
22371
|
+
if (superClass) _set_prototype_of$4(subClass, superClass);
|
|
22372
|
+
}
|
|
22373
|
+
function _possible_constructor_return$4(self, call) {
|
|
22374
|
+
if (call && (_type_of$4(call) === "object" || typeof call === "function")) {
|
|
22375
|
+
return call;
|
|
22376
|
+
}
|
|
22377
|
+
return _assert_this_initialized$4(self);
|
|
22378
|
+
}
|
|
22379
|
+
function _set_prototype_of$4(o, p) {
|
|
22380
|
+
_set_prototype_of$4 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
22381
|
+
o.__proto__ = p;
|
|
22382
|
+
return o;
|
|
22383
|
+
};
|
|
22384
|
+
return _set_prototype_of$4(o, p);
|
|
22385
|
+
}
|
|
22386
|
+
function _type_of$4(obj) {
|
|
22387
|
+
"@swc/helpers - typeof";
|
|
22388
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
22389
|
+
}
|
|
22390
|
+
function _is_native_reflect_construct$4() {
|
|
22391
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
22392
|
+
if (Reflect.construct.sham) return false;
|
|
22393
|
+
if (typeof Proxy === "function") return true;
|
|
22394
|
+
try {
|
|
22395
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
22396
|
+
return true;
|
|
22397
|
+
} catch (e) {
|
|
22398
|
+
return false;
|
|
22399
|
+
}
|
|
22400
|
+
}
|
|
22401
|
+
function _create_super$4(Derived) {
|
|
22402
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct$4();
|
|
22403
|
+
return function _createSuperInternal() {
|
|
22404
|
+
var Super = _get_prototype_of$4(Derived), result;
|
|
22405
|
+
if (hasNativeReflectConstruct) {
|
|
22406
|
+
var NewTarget = _get_prototype_of$4(this).constructor;
|
|
22407
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
22408
|
+
} else {
|
|
22409
|
+
result = Super.apply(this, arguments);
|
|
22410
|
+
}
|
|
22411
|
+
return _possible_constructor_return$4(this, result);
|
|
22412
|
+
};
|
|
22413
|
+
}
|
|
22414
|
+
/*
|
|
22415
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
22416
|
+
* Licensed under the MIT License.
|
|
22417
|
+
*/ /**
|
|
22418
|
+
* NodeAuthErrorMessage class containing string constants used by error codes and messages.
|
|
22419
|
+
*/ var NodeAuthErrorMessage = {
|
|
22420
|
+
invalidLoopbackAddressType: {
|
|
22421
|
+
code: "invalid_loopback_server_address_type",
|
|
22422
|
+
desc: "Loopback server address is not type string. This is unexpected."
|
|
22423
|
+
},
|
|
22424
|
+
unableToLoadRedirectUri: {
|
|
22425
|
+
code: "unable_to_load_redirectUrl",
|
|
22426
|
+
desc: "Loopback server callback was invoked without a url. This is unexpected."
|
|
22427
|
+
},
|
|
22428
|
+
noAuthCodeInResponse: {
|
|
22429
|
+
code: "no_auth_code_in_response",
|
|
22430
|
+
desc: "No auth code found in the server response. Please check your network trace to determine what happened."
|
|
22431
|
+
},
|
|
22432
|
+
noLoopbackServerExists: {
|
|
22433
|
+
code: "no_loopback_server_exists",
|
|
22434
|
+
desc: "No loopback server exists yet."
|
|
22435
|
+
},
|
|
22436
|
+
loopbackServerAlreadyExists: {
|
|
22437
|
+
code: "loopback_server_already_exists",
|
|
22438
|
+
desc: "Loopback server already exists. Cannot create another."
|
|
22439
|
+
},
|
|
22440
|
+
loopbackServerTimeout: {
|
|
22441
|
+
code: "loopback_server_timeout",
|
|
22442
|
+
desc: "Timed out waiting for auth code listener to be registered."
|
|
22443
|
+
},
|
|
22444
|
+
stateNotFoundError: {
|
|
22445
|
+
code: "state_not_found",
|
|
22446
|
+
desc: "State not found. Please verify that the request originated from msal."
|
|
22447
|
+
}
|
|
22448
|
+
};
|
|
22449
|
+
var NodeAuthError = /*#__PURE__*/ function(AuthError) {
|
|
22450
|
+
_inherits$4(NodeAuthError, AuthError);
|
|
22451
|
+
var _super = _create_super$4(NodeAuthError);
|
|
22452
|
+
function NodeAuthError(errorCode, errorMessage) {
|
|
22453
|
+
_class_call_check$6(this, NodeAuthError);
|
|
22454
|
+
var _this;
|
|
22455
|
+
_this = _super.call(this, errorCode, errorMessage);
|
|
22456
|
+
_this.name = "NodeAuthError";
|
|
22457
|
+
return _this;
|
|
22458
|
+
}
|
|
22459
|
+
_create_class$6(NodeAuthError, null, [
|
|
22460
|
+
{
|
|
22461
|
+
key: "createInvalidLoopbackAddressTypeError",
|
|
22462
|
+
value: /**
|
|
22463
|
+
* Creates an error thrown if loopback server address is of type string.
|
|
22464
|
+
*/ function createInvalidLoopbackAddressTypeError() {
|
|
22465
|
+
return new NodeAuthError(NodeAuthErrorMessage.invalidLoopbackAddressType.code, "".concat(NodeAuthErrorMessage.invalidLoopbackAddressType.desc));
|
|
22466
|
+
}
|
|
22467
|
+
},
|
|
22468
|
+
{
|
|
22469
|
+
key: "createUnableToLoadRedirectUrlError",
|
|
22470
|
+
value: /**
|
|
22471
|
+
* Creates an error thrown if the loopback server is unable to get a url.
|
|
22472
|
+
*/ function createUnableToLoadRedirectUrlError() {
|
|
22473
|
+
return new NodeAuthError(NodeAuthErrorMessage.unableToLoadRedirectUri.code, "".concat(NodeAuthErrorMessage.unableToLoadRedirectUri.desc));
|
|
22474
|
+
}
|
|
22475
|
+
},
|
|
22476
|
+
{
|
|
22477
|
+
key: "createNoAuthCodeInResponseError",
|
|
22478
|
+
value: /**
|
|
22479
|
+
* Creates an error thrown if the server response does not contain an auth code.
|
|
22480
|
+
*/ function createNoAuthCodeInResponseError() {
|
|
22481
|
+
return new NodeAuthError(NodeAuthErrorMessage.noAuthCodeInResponse.code, "".concat(NodeAuthErrorMessage.noAuthCodeInResponse.desc));
|
|
22482
|
+
}
|
|
22483
|
+
},
|
|
22484
|
+
{
|
|
22485
|
+
key: "createNoLoopbackServerExistsError",
|
|
22486
|
+
value: /**
|
|
22487
|
+
* Creates an error thrown if the loopback server has not been spun up yet.
|
|
22488
|
+
*/ function createNoLoopbackServerExistsError() {
|
|
22489
|
+
return new NodeAuthError(NodeAuthErrorMessage.noLoopbackServerExists.code, "".concat(NodeAuthErrorMessage.noLoopbackServerExists.desc));
|
|
22490
|
+
}
|
|
22491
|
+
},
|
|
22492
|
+
{
|
|
22493
|
+
key: "createLoopbackServerAlreadyExistsError",
|
|
22494
|
+
value: /**
|
|
22495
|
+
* Creates an error thrown if a loopback server already exists when attempting to create another one.
|
|
22496
|
+
*/ function createLoopbackServerAlreadyExistsError() {
|
|
22497
|
+
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerAlreadyExists.code, "".concat(NodeAuthErrorMessage.loopbackServerAlreadyExists.desc));
|
|
22498
|
+
}
|
|
22499
|
+
},
|
|
22500
|
+
{
|
|
22501
|
+
key: "createLoopbackServerTimeoutError",
|
|
22502
|
+
value: /**
|
|
22503
|
+
* Creates an error thrown if the loopback server times out registering the auth code listener.
|
|
22504
|
+
*/ function createLoopbackServerTimeoutError() {
|
|
22505
|
+
return new NodeAuthError(NodeAuthErrorMessage.loopbackServerTimeout.code, "".concat(NodeAuthErrorMessage.loopbackServerTimeout.desc));
|
|
22506
|
+
}
|
|
22507
|
+
},
|
|
22508
|
+
{
|
|
22509
|
+
key: "createStateNotFoundError",
|
|
22510
|
+
value: /**
|
|
22511
|
+
* Creates an error thrown when the state is not present.
|
|
22512
|
+
*/ function createStateNotFoundError() {
|
|
22513
|
+
return new NodeAuthError(NodeAuthErrorMessage.stateNotFoundError.code, NodeAuthErrorMessage.stateNotFoundError.desc);
|
|
22514
|
+
}
|
|
22515
|
+
}
|
|
22516
|
+
]);
|
|
22517
|
+
return NodeAuthError;
|
|
22518
|
+
}(AuthError);
|
|
21772
22519
|
|
|
21773
22520
|
function _assert_this_initialized$3(self) {
|
|
21774
22521
|
if (self === void 0) {
|
|
@@ -24394,7 +25141,7 @@ function _ts_generator$1(thisArg, body) {
|
|
|
24394
25141
|
_class_call_check$1(this, ConfidentialClientApplication);
|
|
24395
25142
|
var _this;
|
|
24396
25143
|
_this = _super.call(this, configuration);
|
|
24397
|
-
_this.setClientCredential();
|
|
25144
|
+
_this.setClientCredential(_this.config);
|
|
24398
25145
|
_this.appTokenProvider = undefined;
|
|
24399
25146
|
return _this;
|
|
24400
25147
|
}
|
|
@@ -24578,10 +25325,14 @@ function _ts_generator$1(thisArg, body) {
|
|
|
24578
25325
|
},
|
|
24579
25326
|
{
|
|
24580
25327
|
key: "setClientCredential",
|
|
24581
|
-
value: function setClientCredential() {
|
|
24582
|
-
var clientSecretNotEmpty = !!
|
|
24583
|
-
var clientAssertionNotEmpty = !!
|
|
24584
|
-
var
|
|
25328
|
+
value: function setClientCredential(configuration) {
|
|
25329
|
+
var clientSecretNotEmpty = !!configuration.auth.clientSecret;
|
|
25330
|
+
var clientAssertionNotEmpty = !!configuration.auth.clientAssertion;
|
|
25331
|
+
var certificate = configuration.auth.clientCertificate || {
|
|
25332
|
+
thumbprint: Constants$1.EMPTY_STRING,
|
|
25333
|
+
privateKey: Constants$1.EMPTY_STRING
|
|
25334
|
+
};
|
|
25335
|
+
var certificateNotEmpty = !!certificate.thumbprint || !!certificate.privateKey;
|
|
24585
25336
|
/*
|
|
24586
25337
|
* If app developer configures this callback, they don't need a credential
|
|
24587
25338
|
* i.e. AzureSDK can get token from Managed Identity without a cert / secret
|
|
@@ -24592,19 +25343,19 @@ function _ts_generator$1(thisArg, body) {
|
|
|
24592
25343
|
if (clientSecretNotEmpty && clientAssertionNotEmpty || clientAssertionNotEmpty && certificateNotEmpty || clientSecretNotEmpty && certificateNotEmpty) {
|
|
24593
25344
|
throw createClientAuthError(invalidClientCredential);
|
|
24594
25345
|
}
|
|
24595
|
-
if (
|
|
24596
|
-
this.clientSecret =
|
|
25346
|
+
if (configuration.auth.clientSecret) {
|
|
25347
|
+
this.clientSecret = configuration.auth.clientSecret;
|
|
24597
25348
|
return;
|
|
24598
25349
|
}
|
|
24599
|
-
if (
|
|
24600
|
-
this.developerProvidedClientAssertion =
|
|
25350
|
+
if (configuration.auth.clientAssertion) {
|
|
25351
|
+
this.developerProvidedClientAssertion = configuration.auth.clientAssertion;
|
|
24601
25352
|
return;
|
|
24602
25353
|
}
|
|
24603
25354
|
if (!certificateNotEmpty) {
|
|
24604
25355
|
throw createClientAuthError(invalidClientCredential);
|
|
24605
25356
|
} else {
|
|
24606
|
-
|
|
24607
|
-
this.
|
|
25357
|
+
var _configuration_auth_clientCertificate;
|
|
25358
|
+
this.clientAssertion = ClientAssertion.fromCertificate(certificate.thumbprint, certificate.privateKey, (_configuration_auth_clientCertificate = configuration.auth.clientCertificate) === null || _configuration_auth_clientCertificate === void 0 ? void 0 : _configuration_auth_clientCertificate.x5c);
|
|
24608
25359
|
}
|
|
24609
25360
|
}
|
|
24610
25361
|
}
|