@digipair/skill-microsoft 0.136.0 → 0.136.3

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/dist/index.esm.js CHANGED
@@ -3075,7 +3075,7 @@ function _inherits$d(subClass, superClass) {
3075
3075
  });
3076
3076
  if (superClass) _set_prototype_of$d(subClass, superClass);
3077
3077
  }
3078
- function _instanceof$f(left, right) {
3078
+ function _instanceof$g(left, right) {
3079
3079
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
3080
3080
  return !!right[Symbol.hasInstance](left);
3081
3081
  } else {
@@ -3151,7 +3151,7 @@ var _obj$3;
3151
3151
  * @param e
3152
3152
  * @returns
3153
3153
  */ function createCacheError(e) {
3154
- if (!_instanceof$f(e, Error)) {
3154
+ if (!_instanceof$g(e, Error)) {
3155
3155
  return new CacheError(cacheErrorUnknown);
3156
3156
  }
3157
3157
  if (e.name === "QuotaExceededError" || e.name === "NS_ERROR_DOM_QUOTA_REACHED" || e.message.includes("exceeded the quota")) {
@@ -3247,7 +3247,7 @@ function _inherits$c(subClass, superClass) {
3247
3247
  });
3248
3248
  if (superClass) _set_prototype_of$c(subClass, superClass);
3249
3249
  }
3250
- function _instanceof$e(left, right) {
3250
+ function _instanceof$f(left, right) {
3251
3251
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
3252
3252
  return !!right[Symbol.hasInstance](left);
3253
3253
  } else {
@@ -3667,7 +3667,7 @@ function _ts_generator$l(thisArg, body) {
3667
3667
  case 10:
3668
3668
  e = _state.sent();
3669
3669
  (_this_commonLogger = _this.commonLogger) === null || _this_commonLogger === void 0 ? void 0 : _this_commonLogger.error("CacheManager.saveCacheRecord: failed");
3670
- if (_instanceof$e(e, AuthError)) {
3670
+ if (_instanceof$f(e, AuthError)) {
3671
3671
  throw e;
3672
3672
  } else {
3673
3673
  throw createCacheError(e);
@@ -6581,7 +6581,7 @@ function _define_property$e(obj, key, value) {
6581
6581
  }
6582
6582
  return obj;
6583
6583
  }
6584
- function _instanceof$d(left, right) {
6584
+ function _instanceof$e(left, right) {
6585
6585
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
6586
6586
  return !!right[Symbol.hasInstance](left);
6587
6587
  } else {
@@ -7533,7 +7533,7 @@ function _ts_generator$i(thisArg, body) {
7533
7533
  ];
7534
7534
  case 3:
7535
7535
  error = _state.sent();
7536
- if (_instanceof$d(error, AuthError)) {
7536
+ if (_instanceof$e(error, AuthError)) {
7537
7537
  _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));
7538
7538
  } else {
7539
7539
  typedError = error;
@@ -8314,7 +8314,7 @@ function _create_class$q(Constructor, protoProps, staticProps) {
8314
8314
  if (protoProps) _defineProperties$q(Constructor.prototype, protoProps);
8315
8315
  return Constructor;
8316
8316
  }
8317
- function _instanceof$c(left, right) {
8317
+ function _instanceof$d(left, right) {
8318
8318
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
8319
8319
  return !!right[Symbol.hasInstance](left);
8320
8320
  } else {
@@ -8550,7 +8550,7 @@ function _ts_generator$g(thisArg, body) {
8550
8550
  ];
8551
8551
  case 3:
8552
8552
  e = _state.sent();
8553
- if (_instanceof$c(e, NetworkError)) {
8553
+ if (_instanceof$d(e, NetworkError)) {
8554
8554
  responseHeaders1 = e.responseHeaders;
8555
8555
  if (responseHeaders1) {
8556
8556
  (_this_performanceClient1 = _this.performanceClient) === null || _this_performanceClient1 === void 0 ? void 0 : _this_performanceClient1.addFields({
@@ -8563,7 +8563,7 @@ function _ts_generator$g(thisArg, body) {
8563
8563
  }
8564
8564
  throw e.error;
8565
8565
  }
8566
- if (_instanceof$c(e, AuthError)) {
8566
+ if (_instanceof$d(e, AuthError)) {
8567
8567
  throw e;
8568
8568
  } else {
8569
8569
  throw createClientAuthError(networkError);
@@ -10583,7 +10583,7 @@ function _inherits$7(subClass, superClass) {
10583
10583
  });
10584
10584
  if (superClass) _set_prototype_of$7(subClass, superClass);
10585
10585
  }
10586
- function _instanceof$b(left, right) {
10586
+ function _instanceof$c(left, right) {
10587
10587
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
10588
10588
  return !!right[Symbol.hasInstance](left);
10589
10589
  } else {
@@ -10851,8 +10851,8 @@ function _ts_generator$b(thisArg, body) {
10851
10851
  ];
10852
10852
  case 3:
10853
10853
  e = _state.sent();
10854
- noFamilyRTInCache = _instanceof$b(e, InteractionRequiredAuthError) && e.errorCode === noTokensFound;
10855
- clientMismatchErrorWithFamilyRT = _instanceof$b(e, ServerError) && e.errorCode === Errors.INVALID_GRANT_ERROR && e.subError === Errors.CLIENT_MISMATCH_ERROR;
10854
+ noFamilyRTInCache = _instanceof$c(e, InteractionRequiredAuthError) && e.errorCode === noTokensFound;
10855
+ clientMismatchErrorWithFamilyRT = _instanceof$c(e, ServerError) && e.errorCode === Errors.INVALID_GRANT_ERROR && e.subError === Errors.CLIENT_MISMATCH_ERROR;
10856
10856
  // if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART)
10857
10857
  if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) {
10858
10858
  return [
@@ -10929,7 +10929,7 @@ function _ts_generator$b(thisArg, body) {
10929
10929
  ];
10930
10930
  case 3:
10931
10931
  e = _state.sent();
10932
- if (_instanceof$b(e, InteractionRequiredAuthError)) {
10932
+ if (_instanceof$c(e, InteractionRequiredAuthError)) {
10933
10933
  if (e.subError === badToken) {
10934
10934
  // Remove bad refresh token from cache
10935
10935
  _this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");
@@ -11620,7 +11620,7 @@ function _create_class$i(Constructor, protoProps, staticProps) {
11620
11620
  if (staticProps) _defineProperties$i(Constructor, staticProps);
11621
11621
  return Constructor;
11622
11622
  }
11623
- function _instanceof$a(left, right) {
11623
+ function _instanceof$b(left, right) {
11624
11624
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
11625
11625
  return !!right[Symbol.hasInstance](left);
11626
11626
  } else {
@@ -11765,8 +11765,8 @@ function setSku(params) {
11765
11765
  lastRequests.errors.shift();
11766
11766
  }
11767
11767
  lastRequests.failedRequests.push(this.apiId, this.correlationId);
11768
- if (_instanceof$a(error, Error) && !!error && error.toString()) {
11769
- if (_instanceof$a(error, AuthError)) {
11768
+ if (_instanceof$b(error, Error) && !!error && error.toString()) {
11769
+ if (_instanceof$b(error, AuthError)) {
11770
11770
  if (error.subError) {
11771
11771
  lastRequests.errors.push(error.subError);
11772
11772
  } else if (error.errorCode) {
@@ -14009,7 +14009,7 @@ function _inherits$4(subClass, superClass) {
14009
14009
  });
14010
14010
  if (superClass) _set_prototype_of$4(subClass, superClass);
14011
14011
  }
14012
- function _instanceof$9(left, right) {
14012
+ function _instanceof$a(left, right) {
14013
14013
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
14014
14014
  return !!right[Symbol.hasInstance](left);
14015
14015
  } else {
@@ -14240,7 +14240,7 @@ function _ts_generator$6(thisArg, body) {
14240
14240
  if ((typeof value === "undefined" ? "undefined" : _type_of$m(value)) !== "object") {
14241
14241
  continue;
14242
14242
  }
14243
- if (_instanceof$9(value, AccountEntity)) {
14243
+ if (_instanceof$a(value, AccountEntity)) {
14244
14244
  inMemoryCache.accounts[key] = value;
14245
14245
  } else if (isIdTokenEntity(value)) {
14246
14246
  inMemoryCache.idTokens[key] = value;
@@ -15882,7 +15882,7 @@ var jwa$2 = function jwa(algorithm) {
15882
15882
  es: createECDSAVerifer,
15883
15883
  none: createNoneVerifier
15884
15884
  };
15885
- var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/i);
15885
+ var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);
15886
15886
  if (!match) throw typeError(MSG_INVALID_ALGORITHM, algorithm);
15887
15887
  var algo = (match[1] || match[3]).toLowerCase();
15888
15888
  var bits = match[2];
@@ -15929,7 +15929,12 @@ function jwsSign(opts) {
15929
15929
  return util$1.format('%s.%s', securedInput, signature);
15930
15930
  }
15931
15931
  function SignStream$1(opts) {
15932
- var secret = opts.secret || opts.privateKey || opts.key;
15932
+ var secret = opts.secret;
15933
+ secret = secret == null ? opts.privateKey : secret;
15934
+ secret = secret == null ? opts.key : secret;
15935
+ if (/^hs/i.test(opts.header.alg) === true && secret == null) {
15936
+ throw new TypeError('secret must be a string or buffer or a KeyObject');
15937
+ }
15933
15938
  var secretStream = new DataStream$1(secret);
15934
15939
  this.readable = true;
15935
15940
  this.header = opts.header;
@@ -16032,7 +16037,12 @@ function jwsDecode(jwsSig, opts) {
16032
16037
  }
16033
16038
  function VerifyStream$1(opts) {
16034
16039
  opts = opts || {};
16035
- var secretOrKey = opts.secret || opts.publicKey || opts.key;
16040
+ var secretOrKey = opts.secret;
16041
+ secretOrKey = secretOrKey == null ? opts.publicKey : secretOrKey;
16042
+ secretOrKey = secretOrKey == null ? opts.key : secretOrKey;
16043
+ if (/^hs/i.test(opts.algorithm) === true && secretOrKey == null) {
16044
+ throw new TypeError('secret must be a string or buffer or a KeyObject');
16045
+ }
16036
16046
  var secretStream = new DataStream(secretOrKey);
16037
16047
  this.readable = true;
16038
16048
  this.algorithm = opts.algorithm;
@@ -16194,7 +16204,7 @@ var y = d * 365.25;
16194
16204
  options = options || {};
16195
16205
  var type = typeof val === "undefined" ? "undefined" : _type_of$h(val);
16196
16206
  if (type === 'string' && val.length > 0) {
16197
- return parse$7(val);
16207
+ return parse$8(val);
16198
16208
  } else if (type === 'number' && isFinite(val)) {
16199
16209
  return options.long ? fmtLong(val) : fmtShort(val);
16200
16210
  }
@@ -16206,7 +16216,7 @@ var y = d * 365.25;
16206
16216
  * @param {String} str
16207
16217
  * @return {Number}
16208
16218
  * @api private
16209
- */ function parse$7(str) {
16219
+ */ function parse$8(str) {
16210
16220
  str = String(str);
16211
16221
  if (str.length > 100) {
16212
16222
  return;
@@ -16350,7 +16360,7 @@ var RELEASE_TYPES = [
16350
16360
  'prepatch',
16351
16361
  'prerelease'
16352
16362
  ];
16353
- var constants$1 = {
16363
+ var constants$2 = {
16354
16364
  MAX_LENGTH: MAX_LENGTH$1,
16355
16365
  MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH,
16356
16366
  MAX_SAFE_BUILD_LENGTH: MAX_SAFE_BUILD_LENGTH,
@@ -16448,7 +16458,7 @@ var debug_1 = debug$1;
16448
16458
  if (n === "Map" || n === "Set") return Array.from(n);
16449
16459
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
16450
16460
  }
16451
- var _require = constants$1, MAX_SAFE_COMPONENT_LENGTH = _require.MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH = _require.MAX_SAFE_BUILD_LENGTH, MAX_LENGTH = _require.MAX_LENGTH;
16461
+ var _require = constants$2, MAX_SAFE_COMPONENT_LENGTH = _require.MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH = _require.MAX_SAFE_BUILD_LENGTH, MAX_LENGTH = _require.MAX_LENGTH;
16452
16462
  var debug = debug_1;
16453
16463
  exports = module.exports = {};
16454
16464
  // The actual regexps go on exports.re
@@ -16528,8 +16538,8 @@ var debug_1 = debug$1;
16528
16538
  createToken('MAINVERSIONLOOSE', "(".concat(src[t.NUMERICIDENTIFIERLOOSE], ")\\.") + "(".concat(src[t.NUMERICIDENTIFIERLOOSE], ")\\.") + "(".concat(src[t.NUMERICIDENTIFIERLOOSE], ")"));
16529
16539
  // ## Pre-release Version Identifier
16530
16540
  // A numeric identifier, or a non-numeric identifier.
16531
- // Non-numberic identifiers include numberic identifiers but can be longer.
16532
- // Therefore non-numberic identifiers must go first.
16541
+ // Non-numeric identifiers include numeric identifiers but can be longer.
16542
+ // Therefore non-numeric identifiers must go first.
16533
16543
  createToken('PRERELEASEIDENTIFIER', "(?:".concat(src[t.NONNUMERICIDENTIFIER], "|").concat(src[t.NUMERICIDENTIFIER], ")"));
16534
16544
  createToken('PRERELEASEIDENTIFIERLOOSE', "(?:".concat(src[t.NONNUMERICIDENTIFIER], "|").concat(src[t.NUMERICIDENTIFIERLOOSE], ")"));
16535
16545
  // ## Pre-release Version
@@ -16560,7 +16570,7 @@ var debug_1 = debug$1;
16560
16570
  createToken('LOOSE', "^".concat(src[t.LOOSEPLAIN], "$"));
16561
16571
  createToken('GTLT', '((?:<|>)?=?)');
16562
16572
  // Something like "2.*" or "1.2.x".
16563
- // Note that "x.x" is a valid xRange identifer, meaning "any version"
16573
+ // Note that "x.x" is a valid xRange identifier, meaning "any version"
16564
16574
  // Only the first item is strictly required.
16565
16575
  createToken('XRANGEIDENTIFIERLOOSE', "".concat(src[t.NUMERICIDENTIFIERLOOSE], "|x|X|\\*"));
16566
16576
  createToken('XRANGEIDENTIFIER', "".concat(src[t.NUMERICIDENTIFIER], "|x|X|\\*"));
@@ -16670,7 +16680,7 @@ function _create_class$6(Constructor, protoProps, staticProps) {
16670
16680
  if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
16671
16681
  return Constructor;
16672
16682
  }
16673
- function _instanceof$8(left, right) {
16683
+ function _instanceof$9(left, right) {
16674
16684
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
16675
16685
  return !!right[Symbol.hasInstance](left);
16676
16686
  } else {
@@ -16682,15 +16692,27 @@ function _type_of$e(obj) {
16682
16692
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
16683
16693
  }
16684
16694
  var debug = debug_1;
16685
- var _require$3 = constants$1, MAX_LENGTH = _require$3.MAX_LENGTH, MAX_SAFE_INTEGER$1 = _require$3.MAX_SAFE_INTEGER;
16695
+ var _require$3 = constants$2, MAX_LENGTH = _require$3.MAX_LENGTH, MAX_SAFE_INTEGER$1 = _require$3.MAX_SAFE_INTEGER;
16686
16696
  var _require1 = reExports, re$1 = _require1.safeRe, t$1 = _require1.t;
16687
16697
  var parseOptions = parseOptions_1;
16688
16698
  var compareIdentifiers = identifiers$1.compareIdentifiers;
16689
- var SemVer$d = /*#__PURE__*/ function() {
16699
+ var isPrereleaseIdentifier = function(prerelease, identifier) {
16700
+ var identifiers = identifier.split('.');
16701
+ if (identifiers.length > prerelease.length) {
16702
+ return false;
16703
+ }
16704
+ for(var i = 0; i < identifiers.length; i++){
16705
+ if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {
16706
+ return false;
16707
+ }
16708
+ }
16709
+ return true;
16710
+ };
16711
+ var SemVer$e = /*#__PURE__*/ function() {
16690
16712
  function SemVer(version, options) {
16691
16713
  _class_call_check$6(this, SemVer);
16692
16714
  options = parseOptions(options);
16693
- if (_instanceof$8(version, SemVer)) {
16715
+ if (_instanceof$9(version, SemVer)) {
16694
16716
  if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
16695
16717
  return version;
16696
16718
  } else {
@@ -16764,7 +16786,7 @@ var SemVer$d = /*#__PURE__*/ function() {
16764
16786
  key: "compare",
16765
16787
  value: function compare(other) {
16766
16788
  debug('SemVer.compare', this.version, this.options, other);
16767
- if (!_instanceof$8(other, SemVer)) {
16789
+ if (!_instanceof$9(other, SemVer)) {
16768
16790
  if (typeof other === 'string' && other === this.version) {
16769
16791
  return 0;
16770
16792
  }
@@ -16779,7 +16801,7 @@ var SemVer$d = /*#__PURE__*/ function() {
16779
16801
  {
16780
16802
  key: "compareMain",
16781
16803
  value: function compareMain(other) {
16782
- if (!_instanceof$8(other, SemVer)) {
16804
+ if (!_instanceof$9(other, SemVer)) {
16783
16805
  other = new SemVer(other, this.options);
16784
16806
  }
16785
16807
  if (this.major < other.major) {
@@ -16806,7 +16828,7 @@ var SemVer$d = /*#__PURE__*/ function() {
16806
16828
  {
16807
16829
  key: "comparePre",
16808
16830
  value: function comparePre(other) {
16809
- if (!_instanceof$8(other, SemVer)) {
16831
+ if (!_instanceof$9(other, SemVer)) {
16810
16832
  other = new SemVer(other, this.options);
16811
16833
  }
16812
16834
  // NOT having a prerelease is > having one
@@ -16839,7 +16861,7 @@ var SemVer$d = /*#__PURE__*/ function() {
16839
16861
  {
16840
16862
  key: "compareBuild",
16841
16863
  value: function compareBuild(other) {
16842
- if (!_instanceof$8(other, SemVer)) {
16864
+ if (!_instanceof$9(other, SemVer)) {
16843
16865
  other = new SemVer(other, this.options);
16844
16866
  }
16845
16867
  var i = 0;
@@ -16984,8 +17006,9 @@ var SemVer$d = /*#__PURE__*/ function() {
16984
17006
  identifier
16985
17007
  ];
16986
17008
  }
16987
- if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
16988
- if (isNaN(this.prerelease[1])) {
17009
+ if (isPrereleaseIdentifier(this.prerelease, identifier)) {
17010
+ var prereleaseBase = this.prerelease[identifier.split('.').length];
17011
+ if (isNaN(prereleaseBase)) {
16989
17012
  this.prerelease = prerelease;
16990
17013
  }
16991
17014
  } else {
@@ -17007,23 +17030,23 @@ var SemVer$d = /*#__PURE__*/ function() {
17007
17030
  ]);
17008
17031
  return SemVer;
17009
17032
  }();
17010
- var semver$4 = SemVer$d;
17033
+ var semver$4 = SemVer$e;
17011
17034
 
17012
- function _instanceof$7(left, right) {
17035
+ function _instanceof$8(left, right) {
17013
17036
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
17014
17037
  return !!right[Symbol.hasInstance](left);
17015
17038
  } else {
17016
17039
  return left instanceof right;
17017
17040
  }
17018
17041
  }
17019
- var SemVer$c = semver$4;
17020
- var parse$6 = function(version, options) {
17042
+ var SemVer$d = semver$4;
17043
+ var parse$7 = function(version, options) {
17021
17044
  var throwErrors = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
17022
- if (_instanceof$7(version, SemVer$c)) {
17045
+ if (_instanceof$8(version, SemVer$d)) {
17023
17046
  return version;
17024
17047
  }
17025
17048
  try {
17026
- return new SemVer$c(version, options);
17049
+ return new SemVer$d(version, options);
17027
17050
  } catch (er) {
17028
17051
  if (!throwErrors) {
17029
17052
  return null;
@@ -17031,30 +17054,30 @@ var parse$6 = function(version, options) {
17031
17054
  throw er;
17032
17055
  }
17033
17056
  };
17034
- var parse_1 = parse$6;
17057
+ var parse_1 = parse$7;
17035
17058
 
17036
- var parse$5 = parse_1;
17059
+ var parse$6 = parse_1;
17037
17060
  var valid$2 = function(version, options) {
17038
- var v = parse$5(version, options);
17061
+ var v = parse$6(version, options);
17039
17062
  return v ? v.version : null;
17040
17063
  };
17041
17064
  var valid_1 = valid$2;
17042
17065
 
17043
- var parse$4 = parse_1;
17066
+ var parse$5 = parse_1;
17044
17067
  var clean$1 = function(version, options) {
17045
- var s = parse$4(version.trim().replace(/^[=v]+/, ''), options);
17068
+ var s = parse$5(version.trim().replace(/^[=v]+/, ''), options);
17046
17069
  return s ? s.version : null;
17047
17070
  };
17048
17071
  var clean_1 = clean$1;
17049
17072
 
17050
- function _instanceof$6(left, right) {
17073
+ function _instanceof$7(left, right) {
17051
17074
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
17052
17075
  return !!right[Symbol.hasInstance](left);
17053
17076
  } else {
17054
17077
  return left instanceof right;
17055
17078
  }
17056
17079
  }
17057
- var SemVer$b = semver$4;
17080
+ var SemVer$c = semver$4;
17058
17081
  var inc$1 = function(version, release, options, identifier, identifierBase) {
17059
17082
  if (typeof options === 'string') {
17060
17083
  identifierBase = identifier;
@@ -17062,17 +17085,17 @@ var inc$1 = function(version, release, options, identifier, identifierBase) {
17062
17085
  options = undefined;
17063
17086
  }
17064
17087
  try {
17065
- return new SemVer$b(_instanceof$6(version, SemVer$b) ? version.version : version, options).inc(release, identifier, identifierBase).version;
17088
+ return new SemVer$c(_instanceof$7(version, SemVer$c) ? version.version : version, options).inc(release, identifier, identifierBase).version;
17066
17089
  } catch (er) {
17067
17090
  return null;
17068
17091
  }
17069
17092
  };
17070
17093
  var inc_1 = inc$1;
17071
17094
 
17072
- var parse$3 = parse_1;
17095
+ var parse$4 = parse_1;
17073
17096
  var diff$1 = function(version1, version2) {
17074
- var v1 = parse$3(version1, null, true);
17075
- var v2 = parse$3(version2, null, true);
17097
+ var v1 = parse$4(version1, null, true);
17098
+ var v2 = parse$4(version2, null, true);
17076
17099
  var comparison = v1.compare(v2);
17077
17100
  if (comparison === 0) {
17078
17101
  return null;
@@ -17111,39 +17134,39 @@ var diff$1 = function(version1, version2) {
17111
17134
  if (v1.patch !== v2.patch) {
17112
17135
  return prefix + 'patch';
17113
17136
  }
17114
- // high and low are preleases
17137
+ // high and low are prereleases
17115
17138
  return 'prerelease';
17116
17139
  };
17117
17140
  var diff_1 = diff$1;
17118
17141
 
17119
- var SemVer$a = semver$4;
17142
+ var SemVer$b = semver$4;
17120
17143
  var major$1 = function(a, loose) {
17121
- return new SemVer$a(a, loose).major;
17144
+ return new SemVer$b(a, loose).major;
17122
17145
  };
17123
17146
  var major_1 = major$1;
17124
17147
 
17125
- var SemVer$9 = semver$4;
17148
+ var SemVer$a = semver$4;
17126
17149
  var minor$1 = function(a, loose) {
17127
- return new SemVer$9(a, loose).minor;
17150
+ return new SemVer$a(a, loose).minor;
17128
17151
  };
17129
17152
  var minor_1 = minor$1;
17130
17153
 
17131
- var SemVer$8 = semver$4;
17154
+ var SemVer$9 = semver$4;
17132
17155
  var patch$1 = function(a, loose) {
17133
- return new SemVer$8(a, loose).patch;
17156
+ return new SemVer$9(a, loose).patch;
17134
17157
  };
17135
17158
  var patch_1 = patch$1;
17136
17159
 
17137
- var parse$2 = parse_1;
17160
+ var parse$3 = parse_1;
17138
17161
  var prerelease$1 = function(version, options) {
17139
- var parsed = parse$2(version, options);
17162
+ var parsed = parse$3(version, options);
17140
17163
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
17141
17164
  };
17142
17165
  var prerelease_1 = prerelease$1;
17143
17166
 
17144
- var SemVer$7 = semver$4;
17167
+ var SemVer$8 = semver$4;
17145
17168
  var compare$b = function(a, b, loose) {
17146
- return new SemVer$7(a, loose).compare(new SemVer$7(b, loose));
17169
+ return new SemVer$8(a, loose).compare(new SemVer$8(b, loose));
17147
17170
  };
17148
17171
  var compare_1 = compare$b;
17149
17172
 
@@ -17159,10 +17182,10 @@ var compareLoose$1 = function(a, b) {
17159
17182
  };
17160
17183
  var compareLoose_1 = compareLoose$1;
17161
17184
 
17162
- var SemVer$6 = semver$4;
17185
+ var SemVer$7 = semver$4;
17163
17186
  var compareBuild$3 = function(a, b, loose) {
17164
- var versionA = new SemVer$6(a, loose);
17165
- var versionB = new SemVer$6(b, loose);
17187
+ var versionA = new SemVer$7(a, loose);
17188
+ var versionB = new SemVer$7(b, loose);
17166
17189
  return versionA.compare(versionB) || versionA.compareBuild(versionB);
17167
17190
  };
17168
17191
  var compareBuild_1 = compareBuild$3;
@@ -17267,18 +17290,18 @@ var cmp$1 = function(a, op, b, loose) {
17267
17290
  };
17268
17291
  var cmp_1 = cmp$1;
17269
17292
 
17270
- function _instanceof$5(left, right) {
17293
+ function _instanceof$6(left, right) {
17271
17294
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
17272
17295
  return !!right[Symbol.hasInstance](left);
17273
17296
  } else {
17274
17297
  return left instanceof right;
17275
17298
  }
17276
17299
  }
17277
- var SemVer$5 = semver$4;
17278
- var parse$1 = parse_1;
17300
+ var SemVer$6 = semver$4;
17301
+ var parse$2 = parse_1;
17279
17302
  var _require$2 = reExports, re = _require$2.safeRe, t = _require$2.t;
17280
17303
  var coerce$1 = function(version, options) {
17281
- if (_instanceof$5(version, SemVer$5)) {
17304
+ if (_instanceof$6(version, SemVer$6)) {
17282
17305
  return version;
17283
17306
  }
17284
17307
  if (typeof version === 'number') {
@@ -17320,10 +17343,52 @@ var coerce$1 = function(version, options) {
17320
17343
  var patch = match[4] || '0';
17321
17344
  var prerelease = options.includePrerelease && match[5] ? "-".concat(match[5]) : '';
17322
17345
  var build = options.includePrerelease && match[6] ? "+".concat(match[6]) : '';
17323
- return parse$1("".concat(major, ".").concat(minor, ".").concat(patch).concat(prerelease).concat(build), options);
17346
+ return parse$2("".concat(major, ".").concat(minor, ".").concat(patch).concat(prerelease).concat(build), options);
17324
17347
  };
17325
17348
  var coerce_1 = coerce$1;
17326
17349
 
17350
+ function _instanceof$5(left, right) {
17351
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
17352
+ return !!right[Symbol.hasInstance](left);
17353
+ } else {
17354
+ return left instanceof right;
17355
+ }
17356
+ }
17357
+ var parse$1 = parse_1;
17358
+ var constants$1 = constants$2;
17359
+ var SemVer$5 = semver$4;
17360
+ var truncate$1 = function(version, truncation, options) {
17361
+ if (!constants$1.RELEASE_TYPES.includes(truncation)) {
17362
+ return null;
17363
+ }
17364
+ var clonedVersion = cloneInputVersion(version, options);
17365
+ return clonedVersion && doTruncation(clonedVersion, truncation);
17366
+ };
17367
+ var cloneInputVersion = function(version, options) {
17368
+ var versionStringToParse = _instanceof$5(version, SemVer$5) ? version.version : version;
17369
+ return parse$1(versionStringToParse, options);
17370
+ };
17371
+ var doTruncation = function(version, truncation) {
17372
+ if (isPrerelease(truncation)) {
17373
+ return version.version;
17374
+ }
17375
+ version.prerelease = [];
17376
+ switch(truncation){
17377
+ case 'major':
17378
+ version.minor = 0;
17379
+ version.patch = 0;
17380
+ break;
17381
+ case 'minor':
17382
+ version.patch = 0;
17383
+ break;
17384
+ }
17385
+ return version.format();
17386
+ };
17387
+ var isPrerelease = function(type) {
17388
+ return type.startsWith('pre');
17389
+ };
17390
+ var truncate_1 = truncate$1;
17391
+
17327
17392
  var lrucache;
17328
17393
  var hasRequiredLrucache;
17329
17394
 
@@ -17578,6 +17643,8 @@ function requireRange () {
17578
17643
  key: "parseRange",
17579
17644
  value: function parseRange(range) {
17580
17645
  var _this = this;
17646
+ // strip build metadata so it can't bleed into the version
17647
+ range = range.replace(BUILDSTRIPRE, '');
17581
17648
  // memoize range parsing for performance.
17582
17649
  // this is a very hot path, and fully deterministic.
17583
17650
  var memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
@@ -17705,8 +17772,10 @@ function requireRange () {
17705
17772
  var Comparator = requireComparator();
17706
17773
  var debug = debug_1;
17707
17774
  var SemVer = semver$4;
17708
- var _require = reExports, re = _require.safeRe, t = _require.t, comparatorTrimReplace = _require.comparatorTrimReplace, tildeTrimReplace = _require.tildeTrimReplace, caretTrimReplace = _require.caretTrimReplace;
17709
- var _require1 = constants$1, FLAG_INCLUDE_PRERELEASE = _require1.FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE = _require1.FLAG_LOOSE;
17775
+ var _require = reExports, re = _require.safeRe, src = _require.src, t = _require.t, comparatorTrimReplace = _require.comparatorTrimReplace, tildeTrimReplace = _require.tildeTrimReplace, caretTrimReplace = _require.caretTrimReplace;
17776
+ var _require1 = constants$2, FLAG_INCLUDE_PRERELEASE = _require1.FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE = _require1.FLAG_LOOSE;
17777
+ // unbounded global build-metadata stripper used by parseRange
17778
+ var BUILDSTRIPRE = new RegExp(src[t.BUILD], 'g');
17710
17779
  var isNullSet = function(c) {
17711
17780
  return c.value === '<0.0.0-0';
17712
17781
  };
@@ -17746,6 +17815,9 @@ function requireRange () {
17746
17815
  var isX = function(id) {
17747
17816
  return !id || id.toLowerCase() === 'x' || id === '*';
17748
17817
  };
17818
+ var invalidXRangeOrder = function(M, m, p) {
17819
+ return isX(M) && !isX(m) || isX(m) && p && !isX(p);
17820
+ };
17749
17821
  // ~, ~> --> * (any, kinda silly)
17750
17822
  // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
17751
17823
  // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
@@ -17826,9 +17898,9 @@ function requireRange () {
17826
17898
  debug('no pr');
17827
17899
  if (M === '0') {
17828
17900
  if (m === '0') {
17829
- ret = ">=".concat(M, ".").concat(m, ".").concat(p).concat(z, " <").concat(M, ".").concat(m, ".").concat(+p + 1, "-0");
17901
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p, " <").concat(M, ".").concat(m, ".").concat(+p + 1, "-0");
17830
17902
  } else {
17831
- ret = ">=".concat(M, ".").concat(m, ".").concat(p).concat(z, " <").concat(M, ".").concat(+m + 1, ".0-0");
17903
+ ret = ">=".concat(M, ".").concat(m, ".").concat(p, " <").concat(M, ".").concat(+m + 1, ".0-0");
17832
17904
  }
17833
17905
  } else {
17834
17906
  ret = ">=".concat(M, ".").concat(m, ".").concat(p, " <").concat(+M + 1, ".0.0-0");
@@ -17849,6 +17921,9 @@ function requireRange () {
17849
17921
  var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
17850
17922
  return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
17851
17923
  debug('xRange', comp, ret, gtlt, M, m, p, pr);
17924
+ if (invalidXRangeOrder(M, m, p)) {
17925
+ return comp;
17926
+ }
17852
17927
  var xM = isX(M);
17853
17928
  var xm = xM || isX(m);
17854
17929
  var xp = xm || isX(p);
@@ -18571,7 +18646,7 @@ var compare$1 = compare_1;
18571
18646
  // - If LT
18572
18647
  // - If LT.semver is greater than any < or <= comp in C, return false
18573
18648
  // - If LT is <=, and LT.semver does not satisfy every C, return false
18574
- // - If GT.semver has a prerelease, and not in prerelease mode
18649
+ // - If LT.semver has a prerelease, and not in prerelease mode
18575
18650
  // - If no C has a prerelease and the LT.semver tuple, return false
18576
18651
  // - Else return true
18577
18652
  var subset$1 = function(sub, dom) {
@@ -18776,7 +18851,7 @@ var simpleSubset = function(sub, dom, options) {
18776
18851
  if (higher === c2 && higher !== gt) {
18777
18852
  return false;
18778
18853
  }
18779
- } else if (gt.operator === '>=' && !satisfies$1(gt.semver, String(c2), options)) {
18854
+ } else if (gt.operator === '>=' && !c2.test(gt.semver)) {
18780
18855
  return false;
18781
18856
  }
18782
18857
  }
@@ -18791,7 +18866,7 @@ var simpleSubset = function(sub, dom, options) {
18791
18866
  if (lower === c2 && lower !== lt) {
18792
18867
  return false;
18793
18868
  }
18794
- } else if (lt.operator === '<=' && !satisfies$1(lt.semver, String(c2), options)) {
18869
+ } else if (lt.operator === '<=' && !c2.test(lt.semver)) {
18795
18870
  return false;
18796
18871
  }
18797
18872
  }
@@ -18850,7 +18925,7 @@ var subset_1 = subset$1;
18850
18925
 
18851
18926
  // just pre-load all the stuff that index.js lazily exports
18852
18927
  var internalRe = reExports;
18853
- var constants = constants$1;
18928
+ var constants = constants$2;
18854
18929
  var SemVer = semver$4;
18855
18930
  var identifiers = identifiers$1;
18856
18931
  var parse = parse_1;
@@ -18876,6 +18951,7 @@ var gte = gte_1;
18876
18951
  var lte = lte_1;
18877
18952
  var cmp = cmp_1;
18878
18953
  var coerce = coerce_1;
18954
+ var truncate = truncate_1;
18879
18955
  var Comparator = requireComparator();
18880
18956
  var Range = requireRange();
18881
18957
  var satisfies = satisfies_1;
@@ -18914,6 +18990,7 @@ var semver$3 = {
18914
18990
  lte: lte,
18915
18991
  cmp: cmp,
18916
18992
  coerce: coerce,
18993
+ truncate: truncate,
18917
18994
  Comparator: Comparator,
18918
18995
  Range: Range,
18919
18996
  satisfies: satisfies,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-microsoft",
3
- "version": "0.136.0",
3
+ "version": "0.136.3",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,2 +0,0 @@
1
- export * from './lib/skill-microsoft';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
@@ -1,8 +0,0 @@
1
- import { PinsSettings } from '@digipair/engine';
2
- export declare const create: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
3
- export declare const read: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
4
- export declare const update: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
5
- export declare const partialUpdate: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
6
- export declare const remove: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
7
- export declare const request: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
8
- //# sourceMappingURL=skill-microsoft.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skill-microsoft.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-microsoft.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AA0HhD,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACD,CAAC;AAElF,eAAO,MAAM,IAAI,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACD,CAAC;AAEhF,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACD,CAAC;AAElF,eAAO,MAAM,aAAa,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACR,CAAC;AAElF,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACD,CAAC;AAElF,eAAO,MAAM,OAAO,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACD,CAAC"}