@microsoft/applicationinsights-dependencies-js 3.0.0-beta.2210-09 → 3.0.0-beta.2210-10

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,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights XHR dependencies plugin, 3.0.0-beta.2210-09
2
+ * Microsoft Application Insights XHR dependencies plugin, 3.0.0-beta.2210-10
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 - Dependencies Plugin, 3.0.0-beta.2210-09
2
+ * Application Insights JavaScript SDK - Dependencies Plugin, 3.0.0-beta.2210-10
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -823,7 +823,7 @@
823
823
  var _DYN_GET_PROCESS_TEL_CONT0 = "getProcessTelContext";
824
824
  var _DYN_CALL = "call";
825
825
  var _DYN_GET_PLUGIN = "getPlugin";
826
- var _DYN_LOGGING_LEVEL_CONSOL5 = "loggingLevelConsole";
826
+ var _DYN_LOGGING_LEVEL_CONSOL4 = "loggingLevelConsole";
827
827
  var _DYN_TEARDOWN = "teardown";
828
828
  var _DYN_MESSAGE_ID = "messageId";
829
829
  var _DYN_MESSAGE = "message";
@@ -839,7 +839,7 @@
839
839
  var _DYN_SPLIT$1 = "split";
840
840
  var _DYN_NODE_TYPE = "nodeType";
841
841
  var _DYN_REPLACE = "replace";
842
- var _DYN_ENABLE_DEBUG_EXCEPTI6 = "enableDebugExceptions";
842
+ var _DYN_ENABLE_DEBUG_EXCEPTI5 = "enableDebugExceptions";
843
843
  var _DYN_LOG_INTERNAL_MESSAGE = "logInternalMessage";
844
844
  var _DYN_TO_LOWER_CASE$2 = "toLowerCase";
845
845
  var _DYN_TYPE = "type";
@@ -853,6 +853,22 @@
853
853
  var _DYN_TRACE_FLAGS$1 = "traceFlags";
854
854
  var _DYN_VERSION = "version";
855
855
 
856
+ var aggregationErrorType;
857
+ function throwAggregationError(message, sourceErrors) {
858
+ if (!aggregationErrorType) {
859
+ aggregationErrorType = createCustomError("AggregationError", function (self, args) {
860
+ if (args[_DYN_LENGTH$2 ] > 1) {
861
+ self.errors = args[1];
862
+ }
863
+ });
864
+ }
865
+ var theMessage = message || "One or more errors occurred.";
866
+ arrForEach(sourceErrors, function (srcError, idx) {
867
+ theMessage += "\n".concat(idx, " > ").concat(dumpObj(srcError));
868
+ });
869
+ throw new aggregationErrorType(message, sourceErrors || []);
870
+ }
871
+
856
872
  var UNDEFINED_VALUE = undefined;
857
873
  var STR_EMPTY = "";
858
874
  var STR_CORE = "core";
@@ -1123,7 +1139,7 @@
1123
1139
  }
1124
1140
 
1125
1141
  var _objDefineProperty = ObjDefineProperty;
1126
- var version = "3.0.0-beta.2210-09";
1142
+ var version = "3.0.0-beta.2210-10";
1127
1143
  var instanceName = "." + newId(6);
1128
1144
  var _dataUid = 0;
1129
1145
  function _createAccessor(target, prop, value) {
@@ -1434,14 +1450,11 @@
1434
1450
  });
1435
1451
  }
1436
1452
  catch (e) {
1437
- var message = "Watcher [" + dumpObj(callback) + "] failed [" + dumpObj(e) + "]";
1438
1453
  var logger = cfgHandler[_DYN_LOGGER ];
1439
1454
  if (logger) {
1440
- cfgHandler.logger[_DYN_THROW_INTERNAL ](1 , 107 , message);
1441
- }
1442
- else {
1443
- throwInvalidAccess(message);
1455
+ logger[_DYN_THROW_INTERNAL ](1 , 107 , "Watcher [" + dumpObj(callback) + "] failed [" + dumpObj(e) + "]");
1444
1456
  }
1457
+ throw e;
1445
1458
  }
1446
1459
  finally {
1447
1460
  theState.act = prevWatcher || null;
@@ -1455,13 +1468,27 @@
1455
1468
  _watcherTimer.cancel();
1456
1469
  _watcherTimer = null;
1457
1470
  }
1471
+ var watcherFailures_1 = [];
1458
1472
  arrForEach(notifyHandlers, function (handler) {
1459
1473
  if (handler.fn) {
1460
- _useHandler(handler, handler.fn);
1474
+ try {
1475
+ _useHandler(handler, handler.fn);
1476
+ }
1477
+ catch (e) {
1478
+ watcherFailures_1[_DYN_PUSH ](e);
1479
+ }
1461
1480
  }
1462
1481
  });
1463
1482
  if (_waitingHandlers) {
1464
- _notifyWatchers();
1483
+ try {
1484
+ _notifyWatchers();
1485
+ }
1486
+ catch (e) {
1487
+ watcherFailures_1[_DYN_PUSH ](e);
1488
+ }
1489
+ }
1490
+ if (watcherFailures_1[_DYN_LENGTH$2 ] > 0) {
1491
+ throwAggregationError("Unexpected watcher error occurred: ", watcherFailures_1);
1465
1492
  }
1466
1493
  }
1467
1494
  }
@@ -1603,7 +1630,7 @@
1603
1630
  loggingLevelTelemetry: 1,
1604
1631
  maxMessageLimit: 25
1605
1632
  },
1606
- _a$1[_DYN_ENABLE_DEBUG_EXCEPTI6 ] = false,
1633
+ _a$1[_DYN_ENABLE_DEBUG_EXCEPTI5 ] = false,
1607
1634
  _a$1);
1608
1635
  function _sanitizeDiagnosticText(text) {
1609
1636
  if (text) {
@@ -1660,7 +1687,7 @@
1660
1687
  _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
1661
1688
  _self.telemetryLoggingLevel = function () { return _loggingLevelTelemetry; };
1662
1689
  _self.maxInternalMessageLimit = function () { return _maxInternalMessageLimit; };
1663
- _self[_DYN_ENABLE_DEBUG_EXCEPTI6 ] = function () { return _enableDebugExceptions; };
1690
+ _self[_DYN_ENABLE_DEBUG_EXCEPTI5 ] = function () { return _enableDebugExceptions; };
1664
1691
  _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
1665
1692
  if (isUserAct === void 0) { isUserAct = false; }
1666
1693
  var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);
@@ -1737,10 +1764,10 @@
1737
1764
  var handler = createDynamicConfig(config, defaultValues$1, _self);
1738
1765
  handler[_DYN_WATCH ](function (details) {
1739
1766
  var config = details.cfg;
1740
- _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL5 ];
1767
+ _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
1741
1768
  _loggingLevelTelemetry = config.loggingLevelTelemetry;
1742
1769
  _maxInternalMessageLimit = config.maxMessageLimit;
1743
- _enableDebugExceptions = config[_DYN_ENABLE_DEBUG_EXCEPTI6 ];
1770
+ _enableDebugExceptions = config[_DYN_ENABLE_DEBUG_EXCEPTI5 ];
1744
1771
  });
1745
1772
  }
1746
1773
  function _areInternalMessagesThrottled() {