@microsoft/applicationinsights-web-basic 2.7.2-nightly.2112-06 → 2.7.3-nightly.2201-01

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-01",
4
+ "ext": {
5
+ "@js": {
6
+ "file": "aib.2.7.3-nightly.2201-01.js",
7
+ "type": "text/javascript; charset=utf-8",
8
+ "integrity": "sha256-iD7jl3uyVVZ3fXU9rev5N8sXWGoEV93QUMuXuloUGAg= sha384-vYNRsQy2gbQiLOepmNIRzYbdH7l+Ekh2pQ4qZHKSjuk+yjJEze4Mc+JQpzydDEao sha512-PQTF8u+0yctjq71Kh9hN8WjFuJlKiUybMsScT+rh00pTrjR67XDN1cZHdJn0O/GHZHVWdZ9qzU6G2FpUzRue9Q==",
9
+ "hashes": {
10
+ "sha256": "iD7jl3uyVVZ3fXU9rev5N8sXWGoEV93QUMuXuloUGAg=",
11
+ "sha384": "vYNRsQy2gbQiLOepmNIRzYbdH7l+Ekh2pQ4qZHKSjuk+yjJEze4Mc+JQpzydDEao",
12
+ "sha512": "PQTF8u+0yctjq71Kh9hN8WjFuJlKiUybMsScT+rh00pTrjR67XDN1cZHdJn0O/GHZHVWdZ9qzU6G2FpUzRue9Q=="
13
+ }
14
+ },
15
+ "@min.js": {
16
+ "file": "aib.2.7.3-nightly.2201-01.min.js",
17
+ "type": "text/javascript; charset=utf-8",
18
+ "integrity": "sha256-2m8S4KYZaiCwXo6wsHDf5wjmN/Q75bm2djXaeruXCmY= sha384-aXu3xHOiyQ6Hpw734tRoRYP/zkUnXqFSmW9I1VxUSCRXzr2PyYr9dOpEJtDIIHtw sha512-Kvin2g3o8pRDRPh47mi3zunhj9cenzDvFJWSgoudXpfLBbdiosViBUPkR0YrtFlkfX0E+U6Gx90/qKGi1c/fzg==",
19
+ "hashes": {
20
+ "sha256": "2m8S4KYZaiCwXo6wsHDf5wjmN/Q75bm2djXaeruXCmY=",
21
+ "sha384": "aXu3xHOiyQ6Hpw734tRoRYP/zkUnXqFSmW9I1VxUSCRXzr2PyYr9dOpEJtDIIHtw",
22
+ "sha512": "Kvin2g3o8pRDRPh47mi3zunhj9cenzDvFJWSgoudXpfLBbdiosViBUPkR0YrtFlkfX0E+U6Gx90/qKGi1c/fzg=="
23
+ }
24
+ }
25
+ }
26
+ }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript Web SDK - Basic, 2.7.2-nightly.2112-06
2
+ * Application Insights JavaScript Web SDK - Basic, 2.7.3-nightly.2201-01
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]);
@@ -3857,7 +3859,7 @@
3857
3859
  }
3858
3860
  }
3859
3861
  var EnvelopeCreator = {
3860
- Version: "2.7.2-nightly.2112-06"
3862
+ Version: "2.7.3-nightly.2201-01"
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-nightly.2112-06.js.map
5031
+ //# sourceMappingURL=aib.2.7.3-nightly.2201-01.js.map