@azure/identity 2.1.0-alpha.20220421.1 → 2.1.0-alpha.20220505.1

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.

Potentially problematic release.


This version of @azure/identity might be problematic. Click here for more details.

package/dist/index.js CHANGED
@@ -2879,7 +2879,6 @@ class ManagedIdentityCredential {
2879
2879
  * @hidden
2880
2880
  */
2881
2881
  constructor(clientIdOrOptions, options) {
2882
- var _a, _b;
2883
2882
  this.isEndpointUnavailable = null;
2884
2883
  let _options;
2885
2884
  if (typeof clientIdOrOptions === "string") {
@@ -2887,10 +2886,10 @@ class ManagedIdentityCredential {
2887
2886
  _options = options;
2888
2887
  }
2889
2888
  else {
2890
- this.clientId = (_a = clientIdOrOptions) === null || _a === void 0 ? void 0 : _a.clientId;
2889
+ this.clientId = clientIdOrOptions === null || clientIdOrOptions === void 0 ? void 0 : clientIdOrOptions.clientId;
2891
2890
  _options = clientIdOrOptions;
2892
2891
  }
2893
- this.resourceId = (_b = _options) === null || _b === void 0 ? void 0 : _b.resourceId;
2892
+ this.resourceId = _options === null || _options === void 0 ? void 0 : _options.resourceId;
2894
2893
  // For JavaScript users.
2895
2894
  if (this.clientId && this.resourceId) {
2896
2895
  throw new Error(`${ManagedIdentityCredential.name} - Client Id and Resource Id can't be provided at the same time.`);
@@ -2905,11 +2904,11 @@ class ManagedIdentityCredential {
2905
2904
  return this.cachedMSI;
2906
2905
  }
2907
2906
  const MSIs = [
2907
+ arcMsi,
2908
2908
  fabricMsi,
2909
2909
  appServiceMsi2019,
2910
2910
  appServiceMsi2017,
2911
2911
  cloudShellMsi,
2912
- arcMsi,
2913
2912
  tokenExchangeMsi(),
2914
2913
  imdsMsi,
2915
2914
  ];
@@ -3057,9 +3056,9 @@ class DefaultManagedIdentityCredential extends ManagedIdentityCredential {
3057
3056
  // Constructor overload with just the other default options
3058
3057
  // Last constructor overload with Union of all options not required since the above two constructor overloads have optional properties
3059
3058
  constructor(options) {
3060
- var _a, _b, _c;
3061
- const managedIdentityClientId = (_b = (_a = options) === null || _a === void 0 ? void 0 : _a.managedIdentityClientId) !== null && _b !== void 0 ? _b : process.env.AZURE_CLIENT_ID;
3062
- const managedResourceId = (_c = options) === null || _c === void 0 ? void 0 : _c.managedIdentityResourceId;
3059
+ var _a;
3060
+ const managedIdentityClientId = (_a = options === null || options === void 0 ? void 0 : options.managedIdentityClientId) !== null && _a !== void 0 ? _a : process.env.AZURE_CLIENT_ID;
3061
+ const managedResourceId = options === null || options === void 0 ? void 0 : options.managedIdentityResourceId;
3063
3062
  // ManagedIdentityCredential throws if both the resourceId and the clientId are provided.
3064
3063
  if (managedResourceId) {
3065
3064
  const managedIdentityResourceIdOptions = Object.assign(Object.assign({}, options), { resourceId: managedResourceId });