@microsoft/applicationinsights-web-basic 2.7.3-nightly.2112-08 → 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.3-nightly.2112-08
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) {
@@ -3859,7 +3859,7 @@
3859
3859
  }
3860
3860
  }
3861
3861
  var EnvelopeCreator = {
3862
- Version: "2.7.3-nightly.2112-08"
3862
+ Version: "2.7.3-nightly.2201-01"
3863
3863
  };
3864
3864
  function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
3865
3865
  EnvelopeCreatorInit(logger, telemetryItem);
@@ -4766,6 +4766,8 @@
4766
4766
  var plainTextBatch = new Blob([batch], { type: "application/json" });
4767
4767
  var requestHeaders = new Headers();
4768
4768
  var batchLength = batch.length;
4769
+ var ignoreResponse = false;
4770
+ var responseHandled = false;
4769
4771
  if (isInternalApplicationInsightsEndpoint(endPointUrl)) {
4770
4772
  requestHeaders.append(RequestHeaders.sdkContextHeader, RequestHeaders.sdkContextHeaderAppIdRequest);
4771
4773
  }
@@ -4782,6 +4784,7 @@
4782
4784
  _a);
4783
4785
  if (!isAsync) {
4784
4786
  init.keepalive = true;
4787
+ ignoreResponse = true;
4785
4788
  _syncFetchPayload += batchLength;
4786
4789
  }
4787
4790
  var request = new Request(endPointUrl, init);
@@ -4790,27 +4793,44 @@
4790
4793
  }
4791
4794
  catch (e) {
4792
4795
  }
4793
- fetch(request).then(function (response) {
4794
- if (!isAsync) {
4795
- _syncFetchPayload -= batchLength;
4796
- batchLength = 0;
4797
- }
4798
- if (!response.ok) {
4799
- _self._onError(payload, response.statusText);
4800
- }
4801
- else {
4802
- response.text().then(function (text) {
4803
- _checkResponsStatus(response.status, payload, response.url, payload.length, response.statusText, text);
4804
- });
4805
- }
4806
- })["catch"](function (error) {
4807
- if (!isAsync) {
4808
- _syncFetchPayload -= batchLength;
4809
- batchLength = 0;
4810
- }
4811
- _self._onError(payload, error.message);
4812
- });
4813
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
+ }
4814
4834
  }
4815
4835
  function _parseResponse(response) {
4816
4836
  try {
@@ -5008,4 +5028,4 @@
5008
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 });
5009
5029
 
5010
5030
  }));
5011
- //# sourceMappingURL=aib.2.7.3-nightly.2112-08.js.map
5031
+ //# sourceMappingURL=aib.2.7.3-nightly.2201-01.js.map