@microsoft/applicationinsights-analytics-js 3.0.0-beta.2209-01 → 3.0.0-beta.2209-03

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "metadata": {
3
3
  "toolPackage": "@microsoft/api-extractor",
4
- "toolVersion": "7.29.2",
4
+ "toolVersion": "7.31.1",
5
5
  "schemaVersion": 1009,
6
6
  "oldestForwardsCompatibleVersion": 1001,
7
7
  "tsdocConfig": {
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights JavaScript SDK - Web Analytics, 3.0.0-beta.2209-01
2
+ * Microsoft Application Insights JavaScript SDK - Web Analytics, 3.0.0-beta.2209-03
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Web Analytics, 3.0.0-beta.2209-01
2
+ * Application Insights JavaScript SDK - Web Analytics, 3.0.0-beta.2209-03
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -471,14 +471,21 @@
471
471
  return _hasHistory ? history : getInst(HISTORY);
472
472
  }
473
473
 
474
+ var objGetOwnPropertyDescriptor = ObjClass.getOwnPropertyDescriptor;
475
+
474
476
  function objHasOwnProperty(obj, prop) {
475
477
  return obj && ObjProto[HAS_OWN_PROPERTY].call(obj, prop);
476
478
  }
477
479
 
480
+ var objHasOwn = ObjClass["hasOwn"] || polyObjHasOwn;
481
+ function polyObjHasOwn(obj, prop) {
482
+ return objHasOwnProperty(obj, prop) || !!objGetOwnPropertyDescriptor(obj, prop);
483
+ }
484
+
478
485
  function objForEachKey(theObject, callbackfn, thisArg) {
479
486
  if (theObject && isObject(theObject)) {
480
487
  for (var prop in theObject) {
481
- if (objHasOwnProperty(theObject, prop)) {
488
+ if (objHasOwn(theObject, prop)) {
482
489
  if (callbackfn.call(thisArg || theObject, prop, theObject[prop]) === -1) {
483
490
  break;
484
491
  }
@@ -704,6 +711,7 @@
704
711
  var _DYN_SET_NEXT_PLUGIN = "setNextPlugin";
705
712
  var _DYN_CREATE_NEW = "createNew";
706
713
  var _DYN_COOKIE_CFG = "cookieCfg";
714
+ var _DYN_INDEX_OF$1 = "indexOf";
707
715
  var _DYN_SUBSTRING$1 = "substring";
708
716
  var _DYN_USER_AGENT = "userAgent";
709
717
  var _DYN_SPLIT$1 = "split";
@@ -1301,7 +1309,7 @@
1301
1309
  }
1302
1310
 
1303
1311
  var _objDefineProperty = ObjDefineProperty;
1304
- var version = "3.0.0-beta.2209-01";
1312
+ var version = "3.0.0-beta.2209-03";
1305
1313
  var instanceName = "." + newId(6);
1306
1314
  var _dataUid = 0;
1307
1315
  function _createAccessor(target, prop, value) {
@@ -1803,6 +1811,20 @@
1803
1811
  }
1804
1812
  return cookieMgrCfg;
1805
1813
  }
1814
+ function _isIgnoredCookie(cookieMgrCfg, name) {
1815
+ if (name && cookieMgrCfg && isArray(cookieMgrCfg.ignoreCookies)) {
1816
+ return cookieMgrCfg.ignoreCookies[_DYN_INDEX_OF$1 ](name) !== -1;
1817
+ }
1818
+ return false;
1819
+ }
1820
+ function _isBlockedCookie(cookieMgrCfg, name) {
1821
+ if (name && cookieMgrCfg && isArray(cookieMgrCfg.blockedCookies)) {
1822
+ if (cookieMgrCfg.blockedCookies[_DYN_INDEX_OF$1 ](name) !== -1) {
1823
+ return true;
1824
+ }
1825
+ }
1826
+ return _isIgnoredCookie(cookieMgrCfg, name);
1827
+ }
1806
1828
  function safeGetCookieMgr(core, config) {
1807
1829
  var cookieMgr;
1808
1830
  if (core) {
@@ -1841,10 +1863,10 @@
1841
1863
  },
1842
1864
  set: function (name, value, maxAgeSec, domain, path) {
1843
1865
  var result = false;
1844
- if (_isMgrEnabled(cookieMgr)) {
1866
+ if (_isMgrEnabled(cookieMgr) && !_isBlockedCookie(cookieMgrConfig, name)) {
1845
1867
  var values = {};
1846
1868
  var theValue = strTrim(value || STR_EMPTY);
1847
- var idx = theValue.indexOf(";");
1869
+ var idx = theValue[_DYN_INDEX_OF$1 ](";");
1848
1870
  if (idx !== -1) {
1849
1871
  theValue = strTrim(value[_DYN_SUBSTRING$1 ](0, idx));
1850
1872
  values = _extractParts(value[_DYN_SUBSTRING$1 ](idx + 1));
@@ -1884,7 +1906,7 @@
1884
1906
  },
1885
1907
  get: function (name) {
1886
1908
  var value = STR_EMPTY;
1887
- if (_isMgrEnabled(cookieMgr)) {
1909
+ if (_isMgrEnabled(cookieMgr) && !_isIgnoredCookie(cookieMgrConfig, name)) {
1888
1910
  value = (cookieMgrConfig.getCookie || _getCookieValue)(name);
1889
1911
  }
1890
1912
  return value;
@@ -1937,7 +1959,7 @@
1937
1959
  arrForEach(parts, function (thePart) {
1938
1960
  thePart = strTrim(thePart || STR_EMPTY);
1939
1961
  if (thePart) {
1940
- var idx = thePart.indexOf("=");
1962
+ var idx = thePart[_DYN_INDEX_OF$1 ]("=");
1941
1963
  if (idx === -1) {
1942
1964
  values[thePart] = null;
1943
1965
  }
@@ -2905,6 +2927,9 @@
2905
2927
  else if (window && window["opera"] && errorObj[strMessage]) {
2906
2928
  details = _getOperaStack(errorObj[_DYN_MESSAGE$1 ]);
2907
2929
  }
2930
+ else if (errorObj["reason"] && errorObj.reason[strStack]) {
2931
+ details = _convertStackObj(errorObj.reason[strStack]);
2932
+ }
2908
2933
  else if (isString(errorObj)) {
2909
2934
  details = _convertStackObj(errorObj);
2910
2935
  }
@@ -4523,7 +4548,7 @@
4523
4548
  });
4524
4549
  return _this;
4525
4550
  }
4526
- AnalyticsPlugin.Version = "3.0.0-beta.2209-01";
4551
+ AnalyticsPlugin.Version = "3.0.0-beta.2209-03";
4527
4552
  AnalyticsPlugin.getDefaultConfig = _getDefaultConfig;
4528
4553
  return AnalyticsPlugin;
4529
4554
  }(BaseTelemetryPlugin));