@microsoft/applicationinsights-web-basic 2.7.2 → 2.7.3-nightly.2201-02

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.3-nightly.2201-02",
4
+ "ext": {
5
+ "@js": {
6
+ "file": "aib.2.7.3-nightly.2201-02.js",
7
+ "type": "text/javascript; charset=utf-8",
8
+ "integrity": "sha256-ACJzgN9n+aNwRLamKWkve5ONt55MAJwcp1nnkZuwMiM= sha384-Zn0WkDkq6z/+AXASiQhzuIJ8wQ767BYGEjq+5hN55/PNb4QYu9fw8vyIHaHV21W7 sha512-VjiTmOEbbg0aGIZW2QIhJ1rEX3SYKizfhTiAwSAra2Rns12NfWb1goHUWygr2KulatCa1MPW5gNLSHj5E9SmjQ==",
9
+ "hashes": {
10
+ "sha256": "ACJzgN9n+aNwRLamKWkve5ONt55MAJwcp1nnkZuwMiM=",
11
+ "sha384": "Zn0WkDkq6z/+AXASiQhzuIJ8wQ767BYGEjq+5hN55/PNb4QYu9fw8vyIHaHV21W7",
12
+ "sha512": "VjiTmOEbbg0aGIZW2QIhJ1rEX3SYKizfhTiAwSAra2Rns12NfWb1goHUWygr2KulatCa1MPW5gNLSHj5E9SmjQ=="
13
+ }
14
+ },
15
+ "@min.js": {
16
+ "file": "aib.2.7.3-nightly.2201-02.min.js",
17
+ "type": "text/javascript; charset=utf-8",
18
+ "integrity": "sha256-Nerg7ee95vY8kkIf4FzmWziuOOrCLrS2T7+aDf8QNdQ= sha384-NopWe1deMgXXLX7OrRZ5V2Ccw/QS7MqEDRc1nXJsMECVvR/WWVB+XdbBEE+bPyox sha512-k9u6z2LWk448Z3RS7TnpkzZxYT18TUq5si90UyyWUqh8vwVLWBtV9xrfLEoOSGEhLA3MhRlp22mtf4OBeBbHFg==",
19
+ "hashes": {
20
+ "sha256": "Nerg7ee95vY8kkIf4FzmWziuOOrCLrS2T7+aDf8QNdQ=",
21
+ "sha384": "NopWe1deMgXXLX7OrRZ5V2Ccw/QS7MqEDRc1nXJsMECVvR/WWVB+XdbBEE+bPyox",
22
+ "sha512": "k9u6z2LWk448Z3RS7TnpkzZxYT18TUq5si90UyyWUqh8vwVLWBtV9xrfLEoOSGEhLA3MhRlp22mtf4OBeBbHFg=="
23
+ }
24
+ }
25
+ }
26
+ }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript Web SDK - Basic, 2.7.2
2
+ * Application Insights JavaScript Web SDK - Basic, 2.7.3-nightly.2201-02
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -748,6 +748,7 @@
748
748
 
749
749
  var strWindow = "window";
750
750
  var strDocument = "document";
751
+ var strDocumentMode = "documentMode";
751
752
  var strNavigator = "navigator";
752
753
  var strLocation = "location";
753
754
  var strConsole = "console";
@@ -877,7 +878,8 @@
877
878
  }
878
879
  var ua = (userAgentStr || "").toLowerCase();
879
880
  if (strContains(ua, strMsie)) {
880
- return parseInt(ua.split(strMsie)[1]);
881
+ var doc = getDocument() || {};
882
+ return Math.max(parseInt(ua.split(strMsie)[1]), (doc[strDocumentMode] || 0));
881
883
  }
882
884
  else if (strContains(ua, strTrident)) {
883
885
  var tridentVer = parseInt(ua.split(strTrident)[1]);
@@ -920,7 +922,7 @@
920
922
  }
921
923
  function useXDomainRequest() {
922
924
  if (_useXDomainRequest === null) {
923
- _useXDomainRequest = (typeof XDomainRequest !== undefined);
925
+ _useXDomainRequest = (typeof XDomainRequest !== "undefined");
924
926
  if (_useXDomainRequest && isXhrSupported()) {
925
927
  _useXDomainRequest = _useXDomainRequest && !_hasProperty(getGlobalInst("XMLHttpRequest"), "withCredentials");
926
928
  }
@@ -3073,7 +3075,7 @@
3073
3075
  return exceptionData;
3074
3076
  };
3075
3077
  Exception.prototype.toInterface = function () {
3076
- var _a = this, exceptions = _a.exceptions, properties = _a.properties, measurements = _a.measurements, severityLevel = _a.severityLevel; _a.ver; var problemGroup = _a.problemGroup, id = _a.id, isManual = _a.isManual;
3078
+ var _a = this, exceptions = _a.exceptions, properties = _a.properties, measurements = _a.measurements, severityLevel = _a.severityLevel, problemGroup = _a.problemGroup, id = _a.id, isManual = _a.isManual;
3077
3079
  var exceptionDetailsInterface = exceptions instanceof Array
3078
3080
  && arrMap(exceptions, function (exception) { return exception.toInterface(); })
3079
3081
  || undefined;
@@ -3857,7 +3859,7 @@
3857
3859
  }
3858
3860
  }
3859
3861
  var EnvelopeCreator = {
3860
- Version: "2.7.2"
3862
+ Version: "2.7.3-nightly.2201-02"
3861
3863
  };
3862
3864
  function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
3863
3865
  EnvelopeCreatorInit(logger, telemetryItem);
@@ -4764,6 +4766,8 @@
4764
4766
  var plainTextBatch = new Blob([batch], { type: "application/json" });
4765
4767
  var requestHeaders = new Headers();
4766
4768
  var batchLength = batch.length;
4769
+ var ignoreResponse = false;
4770
+ var responseHandled = false;
4767
4771
  if (isInternalApplicationInsightsEndpoint(endPointUrl)) {
4768
4772
  requestHeaders.append(RequestHeaders.sdkContextHeader, RequestHeaders.sdkContextHeaderAppIdRequest);
4769
4773
  }
@@ -4780,6 +4784,7 @@
4780
4784
  _a);
4781
4785
  if (!isAsync) {
4782
4786
  init.keepalive = true;
4787
+ ignoreResponse = true;
4783
4788
  _syncFetchPayload += batchLength;
4784
4789
  }
4785
4790
  var request = new Request(endPointUrl, init);
@@ -4788,27 +4793,44 @@
4788
4793
  }
4789
4794
  catch (e) {
4790
4795
  }
4791
- fetch(request).then(function (response) {
4792
- if (!isAsync) {
4793
- _syncFetchPayload -= batchLength;
4794
- batchLength = 0;
4795
- }
4796
- if (!response.ok) {
4797
- _self._onError(payload, response.statusText);
4798
- }
4799
- else {
4800
- response.text().then(function (text) {
4801
- _checkResponsStatus(response.status, payload, response.url, payload.length, response.statusText, text);
4802
- });
4803
- }
4804
- })["catch"](function (error) {
4805
- if (!isAsync) {
4806
- _syncFetchPayload -= batchLength;
4807
- batchLength = 0;
4808
- }
4809
- _self._onError(payload, error.message);
4810
- });
4811
4796
  _self._buffer.markAsSent(payload);
4797
+ try {
4798
+ fetch(request).then(function (response) {
4799
+ if (!isAsync) {
4800
+ _syncFetchPayload -= batchLength;
4801
+ batchLength = 0;
4802
+ }
4803
+ if (!responseHandled) {
4804
+ responseHandled = true;
4805
+ if (!response.ok) {
4806
+ _self._onError(payload, response.statusText);
4807
+ }
4808
+ else {
4809
+ response.text().then(function (text) {
4810
+ _checkResponsStatus(response.status, payload, response.url, payload.length, response.statusText, text);
4811
+ });
4812
+ }
4813
+ }
4814
+ })["catch"](function (error) {
4815
+ if (!isAsync) {
4816
+ _syncFetchPayload -= batchLength;
4817
+ batchLength = 0;
4818
+ }
4819
+ if (!responseHandled) {
4820
+ responseHandled = true;
4821
+ _self._onError(payload, error.message);
4822
+ }
4823
+ });
4824
+ }
4825
+ catch (e) {
4826
+ if (!responseHandled) {
4827
+ _self._onError(payload, dumpObj(e));
4828
+ }
4829
+ }
4830
+ if (ignoreResponse && !responseHandled) {
4831
+ responseHandled = true;
4832
+ _self._onSuccess(payload, payload.length);
4833
+ }
4812
4834
  }
4813
4835
  function _parseResponse(response) {
4814
4836
  try {
@@ -5006,4 +5028,4 @@
5006
5028
  (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 });
5007
5029
 
5008
5030
  }));
5009
- //# sourceMappingURL=aib.2.7.2.js.map
5031
+ //# sourceMappingURL=aib.2.7.3-nightly.2201-02.js.map