@microsoft/applicationinsights-channel-js 2.7.2-nightly.2111-08 → 2.7.2-nightly.2111-13

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.18.17",
4
+ "toolVersion": "7.18.19",
5
5
  "schemaVersion": 1004,
6
6
  "oldestForwardsCompatibleVersion": 1001,
7
7
  "tsdocConfig": {
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights JavaScript SDK Channel, 2.7.2-nightly.2111-08
2
+ * Microsoft Application Insights JavaScript SDK Channel, 2.7.2-nightly.2111-13
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 - Channel, 2.7.2-nightly.2111-08
2
+ * Application Insights JavaScript SDK - Channel, 2.7.2-nightly.2111-13
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -814,6 +814,22 @@
814
814
  return isSupported;
815
815
  }
816
816
 
817
+ var _aiNamespace = null;
818
+ function _getExtensionNamespace() {
819
+ var target = getGlobalInst("Microsoft");
820
+ if (target) {
821
+ _aiNamespace = target["ApplicationInsights"];
822
+ }
823
+ return _aiNamespace;
824
+ }
825
+ function getDebugExt(config) {
826
+ var ns = _aiNamespace;
827
+ if (!ns && config.disableDbgExt !== true) {
828
+ ns = _aiNamespace || _getExtensionNamespace();
829
+ }
830
+ return ns ? ns["ChromeDbgExt"] : null;
831
+ }
832
+
817
833
  var AiNonUserActionablePrefix = "AI (Internal): ";
818
834
  var AiUserActionablePrefix = "AI: ";
819
835
  var AIInternalMessagePrefix = "AITR_";
@@ -897,13 +913,18 @@
897
913
  }
898
914
  _self.logInternalMessage(severity, message);
899
915
  }
916
+ else {
917
+ _debugExtMsg("throw" + (severity === LoggingSeverity.CRITICAL ? "Critical" : "Warning"), message);
918
+ }
900
919
  }
901
920
  };
902
921
  _self.warnToConsole = function (message) {
903
922
  _logToConsole("warn", message);
923
+ _debugExtMsg("warning", message);
904
924
  };
905
925
  _self.errorToConsole = function (message) {
906
926
  _logToConsole("error", message);
927
+ _debugExtMsg("error", message);
907
928
  };
908
929
  _self.resetInternalMessageCount = function () {
909
930
  _messageCount = 0;
@@ -925,12 +946,18 @@
925
946
  if (severity <= _self.telemetryLoggingLevel()) {
926
947
  _self.queue.push(message);
927
948
  _messageCount++;
949
+ _debugExtMsg((severity === LoggingSeverity.CRITICAL ? "error" : "warn"), message);
928
950
  }
929
951
  if (_messageCount === _self.maxInternalMessageLimit()) {
930
952
  var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
931
953
  var throttleMessage = new _InternalLogMessage(_InternalMessageId.MessageLimitPerPVExceeded, throttleLimitMessage, false);
932
954
  _self.queue.push(throttleMessage);
933
- _self.warnToConsole(throttleLimitMessage);
955
+ if (severity === LoggingSeverity.CRITICAL) {
956
+ _self.errorToConsole(throttleLimitMessage);
957
+ }
958
+ else {
959
+ _self.warnToConsole(throttleLimitMessage);
960
+ }
934
961
  }
935
962
  }
936
963
  };
@@ -944,6 +971,12 @@
944
971
  function _areInternalMessagesThrottled() {
945
972
  return _messageCount >= _self.maxInternalMessageLimit();
946
973
  }
974
+ function _debugExtMsg(name, data) {
975
+ var dbgExt = getDebugExt(config);
976
+ if (dbgExt && dbgExt.diagLog) {
977
+ dbgExt.diagLog(name, data);
978
+ }
979
+ }
947
980
  });
948
981
  }
949
982
  return DiagnosticLogger;
@@ -2328,7 +2361,7 @@
2328
2361
  _this.data = dataSanitizeUrl(logger, commandName) || dependencyFields.data;
2329
2362
  _this.target = dataSanitizeString(logger, dependencyFields.target);
2330
2363
  if (correlationContext) {
2331
- _this.target = _this.target + " | " + correlationContext;
2364
+ _this.target = "".concat(_this.target, " | ").concat(correlationContext);
2332
2365
  }
2333
2366
  _this.name = dataSanitizeString(logger, dependencyFields.name);
2334
2367
  _this.properties = dataSanitizeProperties(logger, properties);
@@ -2752,7 +2785,7 @@
2752
2785
  });
2753
2786
  var theTags = __assignFn(__assignFn({}, envTags), tgs);
2754
2787
  if (!theTags[CtxTagKeys.internalSdkVersion]) {
2755
- theTags[CtxTagKeys.internalSdkVersion] = "javascript:" + EnvelopeCreator.Version;
2788
+ theTags[CtxTagKeys.internalSdkVersion] = "javascript:".concat(EnvelopeCreator.Version);
2756
2789
  }
2757
2790
  env.tags = optimizeObject(theTags);
2758
2791
  }
@@ -2797,7 +2830,7 @@
2797
2830
  }
2798
2831
  }
2799
2832
  var EnvelopeCreator = {
2800
- Version: "2.7.2-nightly.2111-08"
2833
+ Version: "2.7.2-nightly.2111-13"
2801
2834
  };
2802
2835
  function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
2803
2836
  EnvelopeCreatorInit(logger, telemetryItem);
@@ -3581,7 +3614,7 @@
3581
3614
  if (!_self._senderConfig.isRetryDisabled()) {
3582
3615
  var offlineBackOffMultiplier = 10;
3583
3616
  _resendPayload(payload, offlineBackOffMultiplier);
3584
- _self.diagLog().throwInternal(LoggingSeverity.WARNING, _InternalMessageId.TransmissionFailed, ". Offline - Response Code: " + status + ". Offline status: " + Offline.isOffline() + ". Will retry to send " + payload.length + " items.");
3617
+ _self.diagLog().throwInternal(LoggingSeverity.WARNING, _InternalMessageId.TransmissionFailed, ". Offline - Response Code: ".concat(status, ". Offline status: ").concat(Offline.isOffline(), ". Will retry to send ").concat(payload.length, " items."));
3585
3618
  }
3586
3619
  }
3587
3620
  else {