@microsoft/applicationinsights-web-basic 2.7.2-nightly.2111-10 → 2.7.2-nightly.2111-15

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.
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "aib",
3
+ "version": "2.7.2-nightly.2111-15",
4
+ "ext": {
5
+ "@js": {
6
+ "file": "aib.2.7.2-nightly.2111-15.js",
7
+ "type": "text/javascript; charset=utf-8",
8
+ "integrity": "sha256-J9n4qNF/9dAc1T+k4pJZZWKWUaONq4uCFNRGNeUGFVA= sha384-nUFDjDtXafElj3AnIy83KklTX79w8ztfaL1BHwoI/6/wxWXxbYUPVfWVe5Vhx328 sha512-rLb8p80luTgE7nLG5YshrdHOFgmxqblnD+NEqmHIgHhiwG3C1TkUfktW9I2QWPq1o+WCOkYeqj9rJkrvvOOqhw==",
9
+ "hashes": {
10
+ "sha256": "J9n4qNF/9dAc1T+k4pJZZWKWUaONq4uCFNRGNeUGFVA=",
11
+ "sha384": "nUFDjDtXafElj3AnIy83KklTX79w8ztfaL1BHwoI/6/wxWXxbYUPVfWVe5Vhx328",
12
+ "sha512": "rLb8p80luTgE7nLG5YshrdHOFgmxqblnD+NEqmHIgHhiwG3C1TkUfktW9I2QWPq1o+WCOkYeqj9rJkrvvOOqhw=="
13
+ }
14
+ },
15
+ "@min.js": {
16
+ "file": "aib.2.7.2-nightly.2111-15.min.js",
17
+ "type": "text/javascript; charset=utf-8",
18
+ "integrity": "sha256-z0r7Vb/aFU4tzFPAkyK0HIgLXQJsLAfJq1cdo8uXzmQ= sha384-uIc5jS+MLwSV44NxOnbSReOYf4ihx5u8oLdrMfurnZEWl9YQei4B0/kwlHp+Ju3J sha512-2wYXC/YZizyAxM7folKYRPXlJs5Cohbtnz50hy5eoZQMX07+U4UVxDqEtBcSqVlFarhzLZH2tnRo/yXfRr+pPA==",
19
+ "hashes": {
20
+ "sha256": "z0r7Vb/aFU4tzFPAkyK0HIgLXQJsLAfJq1cdo8uXzmQ=",
21
+ "sha384": "uIc5jS+MLwSV44NxOnbSReOYf4ihx5u8oLdrMfurnZEWl9YQei4B0/kwlHp+Ju3J",
22
+ "sha512": "2wYXC/YZizyAxM7folKYRPXlJs5Cohbtnz50hy5eoZQMX07+U4UVxDqEtBcSqVlFarhzLZH2tnRo/yXfRr+pPA=="
23
+ }
24
+ }
25
+ }
26
+ }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript Web SDK - Basic, 2.7.2-nightly.2111-10
2
+ * Application Insights JavaScript Web SDK - Basic, 2.7.2-nightly.2111-15
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -938,6 +938,45 @@
938
938
  return isSupported;
939
939
  }
940
940
 
941
+ var listenerFuncs = ["eventsSent", "eventsDiscarded", "eventsSendRequest", "perfEvent"];
942
+ var _aiNamespace = null;
943
+ var _debugListener;
944
+ function _listenerProxyFunc(name, config) {
945
+ return function () {
946
+ var args = arguments;
947
+ var dbgExt = getDebugExt(config);
948
+ if (dbgExt) {
949
+ var listener = dbgExt.listener;
950
+ if (listener && listener[name]) {
951
+ listener[name].apply(listener, args);
952
+ }
953
+ }
954
+ };
955
+ }
956
+ function _getExtensionNamespace() {
957
+ var target = getGlobalInst("Microsoft");
958
+ if (target) {
959
+ _aiNamespace = target["ApplicationInsights"];
960
+ }
961
+ return _aiNamespace;
962
+ }
963
+ function getDebugExt(config) {
964
+ var ns = _aiNamespace;
965
+ if (!ns && config.disableDbgExt !== true) {
966
+ ns = _aiNamespace || _getExtensionNamespace();
967
+ }
968
+ return ns ? ns["ChromeDbgExt"] : null;
969
+ }
970
+ function getDebugListener(config) {
971
+ if (!_debugListener) {
972
+ _debugListener = {};
973
+ for (var lp = 0; lp < listenerFuncs.length; lp++) {
974
+ _debugListener[listenerFuncs[lp]] = _listenerProxyFunc(listenerFuncs[lp], config);
975
+ }
976
+ }
977
+ return _debugListener;
978
+ }
979
+
941
980
  var AiNonUserActionablePrefix = "AI (Internal): ";
942
981
  var AiUserActionablePrefix = "AI: ";
943
982
  var AIInternalMessagePrefix = "AITR_";
@@ -1021,13 +1060,18 @@
1021
1060
  }
1022
1061
  _self.logInternalMessage(severity, message);
1023
1062
  }
1063
+ else {
1064
+ _debugExtMsg("throw" + (severity === LoggingSeverity.CRITICAL ? "Critical" : "Warning"), message);
1065
+ }
1024
1066
  }
1025
1067
  };
1026
1068
  _self.warnToConsole = function (message) {
1027
1069
  _logToConsole("warn", message);
1070
+ _debugExtMsg("warning", message);
1028
1071
  };
1029
1072
  _self.errorToConsole = function (message) {
1030
1073
  _logToConsole("error", message);
1074
+ _debugExtMsg("error", message);
1031
1075
  };
1032
1076
  _self.resetInternalMessageCount = function () {
1033
1077
  _messageCount = 0;
@@ -1049,12 +1093,18 @@
1049
1093
  if (severity <= _self.telemetryLoggingLevel()) {
1050
1094
  _self.queue.push(message);
1051
1095
  _messageCount++;
1096
+ _debugExtMsg((severity === LoggingSeverity.CRITICAL ? "error" : "warn"), message);
1052
1097
  }
1053
1098
  if (_messageCount === _self.maxInternalMessageLimit()) {
1054
1099
  var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
1055
1100
  var throttleMessage = new _InternalLogMessage(_InternalMessageId.MessageLimitPerPVExceeded, throttleLimitMessage, false);
1056
1101
  _self.queue.push(throttleMessage);
1057
- _self.warnToConsole(throttleLimitMessage);
1102
+ if (severity === LoggingSeverity.CRITICAL) {
1103
+ _self.errorToConsole(throttleLimitMessage);
1104
+ }
1105
+ else {
1106
+ _self.warnToConsole(throttleLimitMessage);
1107
+ }
1058
1108
  }
1059
1109
  }
1060
1110
  };
@@ -1068,6 +1118,12 @@
1068
1118
  function _areInternalMessagesThrottled() {
1069
1119
  return _messageCount >= _self.maxInternalMessageLimit();
1070
1120
  }
1121
+ function _debugExtMsg(name, data) {
1122
+ var dbgExt = getDebugExt(config);
1123
+ if (dbgExt && dbgExt.diagLog) {
1124
+ dbgExt.diagLog(name, data);
1125
+ }
1126
+ }
1071
1127
  });
1072
1128
  }
1073
1129
  return DiagnosticLogger;
@@ -1837,6 +1893,9 @@
1837
1893
  _notificationManager = notificationManager;
1838
1894
  _self[strNotificationManager] = notificationManager;
1839
1895
  _self.config = config || {};
1896
+ if (notificationManager && _self.config.disableDbgExt !== true) {
1897
+ notificationManager.addNotificationListener(getDebugListener(config));
1898
+ }
1840
1899
  if (_self.config.enablePerfMgr) {
1841
1900
  setValue(_self.config, "createPerfMgr", _createPerfManager);
1842
1901
  }
@@ -3798,7 +3857,7 @@
3798
3857
  }
3799
3858
  }
3800
3859
  var EnvelopeCreator = {
3801
- Version: "2.7.2-nightly.2111-10"
3860
+ Version: "2.7.2-nightly.2111-15"
3802
3861
  };
3803
3862
  function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
3804
3863
  EnvelopeCreatorInit(logger, telemetryItem);
@@ -4947,4 +5006,4 @@
4947
5006
  (function(obj, prop, descriptor) { /* ai_es3_polyfil defineProperty */ var func = Object["defineProperty"]; if (func) { try { return func(obj, prop, descriptor); } catch(e) { /* IE8 defines defineProperty, but will throw */ } } if (descriptor && typeof descriptor.value !== undefined) { obj[prop] = descriptor.value; } return obj; })(exports, '__esModule', { value: true });
4948
5007
 
4949
5008
  }));
4950
- //# sourceMappingURL=aib.2.7.2-nightly.2111-10.js.map
5009
+ //# sourceMappingURL=aib.2.7.2-nightly.2111-15.js.map