@microsoft/applicationinsights-web 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.
Files changed (54) hide show
  1. package/README.md +2 -0
  2. package/browser/{ai.2.7.2.cjs.js → ai.2.7.3-nightly.2201-02.cjs.js} +50 -28
  3. package/browser/ai.2.7.3-nightly.2201-02.cjs.js.map +1 -0
  4. package/browser/ai.2.7.3-nightly.2201-02.cjs.min.js +6 -0
  5. package/browser/ai.2.7.3-nightly.2201-02.cjs.min.js.map +1 -0
  6. package/browser/{ai.2.7.2.gbl.js → ai.2.7.3-nightly.2201-02.gbl.js} +50 -28
  7. package/browser/ai.2.7.3-nightly.2201-02.gbl.js.map +1 -0
  8. package/browser/ai.2.7.3-nightly.2201-02.gbl.min.js +6 -0
  9. package/browser/ai.2.7.3-nightly.2201-02.gbl.min.js.map +1 -0
  10. package/browser/ai.2.7.3-nightly.2201-02.integrity.json +66 -0
  11. package/browser/{ai.2.7.2.js → ai.2.7.3-nightly.2201-02.js} +50 -28
  12. package/browser/ai.2.7.3-nightly.2201-02.js.map +1 -0
  13. package/browser/ai.2.7.3-nightly.2201-02.min.js +6 -0
  14. package/browser/ai.2.7.3-nightly.2201-02.min.js.map +1 -0
  15. package/browser/ai.2.cjs.js +49 -27
  16. package/browser/ai.2.cjs.js.map +1 -1
  17. package/browser/ai.2.cjs.min.js +2 -2
  18. package/browser/ai.2.cjs.min.js.map +1 -1
  19. package/browser/ai.2.gbl.js +49 -27
  20. package/browser/ai.2.gbl.js.map +1 -1
  21. package/browser/ai.2.gbl.min.js +2 -2
  22. package/browser/ai.2.gbl.min.js.map +1 -1
  23. package/browser/ai.2.js +49 -27
  24. package/browser/ai.2.js.map +1 -1
  25. package/browser/ai.2.min.js +2 -2
  26. package/browser/ai.2.min.js.map +1 -1
  27. package/dist/applicationinsights-web.api.json +1 -1
  28. package/dist/applicationinsights-web.api.md +9 -9
  29. package/dist/applicationinsights-web.d.ts +1 -1
  30. package/dist/applicationinsights-web.js +49 -27
  31. package/dist/applicationinsights-web.js.map +1 -1
  32. package/dist/applicationinsights-web.min.js +2 -2
  33. package/dist/applicationinsights-web.min.js.map +1 -1
  34. package/dist/applicationinsights-web.rollup.d.ts +1 -1
  35. package/dist-esm/ApplicationInsightsContainer.js +1 -1
  36. package/dist-esm/ApplicationInsightsDeprecated.js +1 -1
  37. package/dist-esm/Init.js +1 -1
  38. package/dist-esm/Initialization.js +1 -1
  39. package/dist-esm/applicationinsights-web.js +1 -1
  40. package/package.json +80 -77
  41. package/src/Init.ts +1 -1
  42. package/src/Initialization.ts +2 -0
  43. package/types/Initialization.d.ts +1 -0
  44. package/types/tsdoc-metadata.json +1 -1
  45. package/browser/ai.2.7.2.cjs.js.map +0 -1
  46. package/browser/ai.2.7.2.cjs.min.js +0 -6
  47. package/browser/ai.2.7.2.cjs.min.js.map +0 -1
  48. package/browser/ai.2.7.2.gbl.js.map +0 -1
  49. package/browser/ai.2.7.2.gbl.min.js +0 -6
  50. package/browser/ai.2.7.2.gbl.min.js.map +0 -1
  51. package/browser/ai.2.7.2.integrity.json +0 -66
  52. package/browser/ai.2.7.2.js.map +0 -1
  53. package/browser/ai.2.7.2.min.js +0 -6
  54. package/browser/ai.2.7.2.min.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "metadata": {
3
3
  "toolPackage": "@microsoft/api-extractor",
4
- "toolVersion": "7.18.21",
4
+ "toolVersion": "7.19.4",
5
5
  "schemaVersion": 1004,
6
6
  "oldestForwardsCompatibleVersion": 1001,
7
7
  "tsdocConfig": {
@@ -1375,15 +1375,15 @@ export const Util: IUtil;
1375
1375
 
1376
1376
  // Warnings were encountered during analysis:
1377
1377
  //
1378
- // types/Initialization.d.ts:38:9 - (ae-forgotten-export) The symbol "parseConnectionString" needs to be exported by the entry point applicationinsights-web.d.ts
1379
- // types/Initialization.d.ts:52:5 - (ae-forgotten-export) The symbol "Data" needs to be exported by the entry point applicationinsights-web.d.ts
1380
- // types/Initialization.d.ts:53:5 - (ae-forgotten-export) The symbol "Base" needs to be exported by the entry point applicationinsights-web.d.ts
1381
- // types/Initialization.d.ts:54:5 - (ae-forgotten-export) The symbol "Envelope" needs to be exported by the entry point applicationinsights-web.d.ts
1382
- // types/Initialization.d.ts:63:5 - (ae-forgotten-export) The symbol "Data" needs to be exported by the entry point applicationinsights-web.d.ts
1383
- // types/Initialization.d.ts:65:5 - (ae-forgotten-export) The symbol "ConfigurationManager" needs to be exported by the entry point applicationinsights-web.d.ts
1384
- // types/Initialization.d.ts:66:5 - (ae-forgotten-export) The symbol "ContextTagKeys" needs to be exported by the entry point applicationinsights-web.d.ts
1385
- // types/Initialization.d.ts:67:5 - (ae-forgotten-export) The symbol "IDataSanitizer" needs to be exported by the entry point applicationinsights-web.d.ts
1386
- // types/Initialization.d.ts:68:5 - (ae-forgotten-export) The symbol "TelemetryItemCreator" needs to be exported by the entry point applicationinsights-web.d.ts
1378
+ // types/Initialization.d.ts:39:9 - (ae-forgotten-export) The symbol "parseConnectionString" needs to be exported by the entry point applicationinsights-web.d.ts
1379
+ // types/Initialization.d.ts:53:5 - (ae-forgotten-export) The symbol "Data" needs to be exported by the entry point applicationinsights-web.d.ts
1380
+ // types/Initialization.d.ts:54:5 - (ae-forgotten-export) The symbol "Base" needs to be exported by the entry point applicationinsights-web.d.ts
1381
+ // types/Initialization.d.ts:55:5 - (ae-forgotten-export) The symbol "Envelope" needs to be exported by the entry point applicationinsights-web.d.ts
1382
+ // types/Initialization.d.ts:64:5 - (ae-forgotten-export) The symbol "Data" needs to be exported by the entry point applicationinsights-web.d.ts
1383
+ // types/Initialization.d.ts:66:5 - (ae-forgotten-export) The symbol "ConfigurationManager" needs to be exported by the entry point applicationinsights-web.d.ts
1384
+ // types/Initialization.d.ts:67:5 - (ae-forgotten-export) The symbol "ContextTagKeys" needs to be exported by the entry point applicationinsights-web.d.ts
1385
+ // types/Initialization.d.ts:68:5 - (ae-forgotten-export) The symbol "IDataSanitizer" needs to be exported by the entry point applicationinsights-web.d.ts
1386
+ // types/Initialization.d.ts:69:5 - (ae-forgotten-export) The symbol "TelemetryItemCreator" needs to be exported by the entry point applicationinsights-web.d.ts
1387
1387
  // D:/a/1/s/shared/AppInsightsCommon/types/Telemetry/Event.d.ts:9:9 - (ae-forgotten-export) The symbol "FieldType" needs to be exported by the entry point applicationinsights-web.d.ts
1388
1388
 
1389
1389
  // (No @packageDocumentation comment for this package)
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft.ApplicationInsights, 2.7.2
2
+ * Microsoft.ApplicationInsights, 2.7.3-nightly.2201-02
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 - Web, 2.7.2
2
+ * Application Insights JavaScript SDK - Web, 2.7.3-nightly.2201-02
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -789,6 +789,7 @@
789
789
 
790
790
  var strWindow = "window";
791
791
  var strDocument = "document";
792
+ var strDocumentMode = "documentMode";
792
793
  var strNavigator = "navigator";
793
794
  var strHistory = "history";
794
795
  var strLocation = "location";
@@ -936,7 +937,8 @@
936
937
  }
937
938
  var ua = (userAgentStr || "").toLowerCase();
938
939
  if (strContains(ua, strMsie)) {
939
- return parseInt(ua.split(strMsie)[1]);
940
+ var doc = getDocument() || {};
941
+ return Math.max(parseInt(ua.split(strMsie)[1]), (doc[strDocumentMode] || 0));
940
942
  }
941
943
  else if (strContains(ua, strTrident)) {
942
944
  var tridentVer = parseInt(ua.split(strTrident)[1]);
@@ -979,7 +981,7 @@
979
981
  }
980
982
  function useXDomainRequest() {
981
983
  if (_useXDomainRequest === null) {
982
- _useXDomainRequest = (typeof XDomainRequest !== undefined);
984
+ _useXDomainRequest = (typeof XDomainRequest !== "undefined");
983
985
  if (_useXDomainRequest && isXhrSupported()) {
984
986
  _useXDomainRequest = _useXDomainRequest && !_hasProperty(getGlobalInst("XMLHttpRequest"), "withCredentials");
985
987
  }
@@ -3686,7 +3688,7 @@
3686
3688
  return exceptionData;
3687
3689
  };
3688
3690
  Exception.prototype.toInterface = function () {
3689
- 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;
3691
+ var _a = this, exceptions = _a.exceptions, properties = _a.properties, measurements = _a.measurements, severityLevel = _a.severityLevel, problemGroup = _a.problemGroup, id = _a.id, isManual = _a.isManual;
3690
3692
  var exceptionDetailsInterface = exceptions instanceof Array
3691
3693
  && arrMap(exceptions, function (exception) { return exception.toInterface(); })
3692
3694
  || undefined;
@@ -5002,7 +5004,7 @@
5002
5004
  config.disableFlushOnUnload = stringToBoolOrDefault(config.disableFlushOnUnload, config.disableFlushOnBeforeUnload);
5003
5005
  return config;
5004
5006
  };
5005
- ApplicationInsights.Version = "2.7.2";
5007
+ ApplicationInsights.Version = "2.7.3-nightly.2201-02";
5006
5008
  return ApplicationInsights;
5007
5009
  }(BaseTelemetryPlugin));
5008
5010
  var Timing = /** @class */ (function () {
@@ -5309,7 +5311,7 @@
5309
5311
  }
5310
5312
  }
5311
5313
  var EnvelopeCreator = {
5312
- Version: "2.7.2"
5314
+ Version: "2.7.3-nightly.2201-02"
5313
5315
  };
5314
5316
  function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
5315
5317
  EnvelopeCreatorInit(logger, telemetryItem);
@@ -6216,6 +6218,8 @@
6216
6218
  var plainTextBatch = new Blob([batch], { type: "application/json" });
6217
6219
  var requestHeaders = new Headers();
6218
6220
  var batchLength = batch.length;
6221
+ var ignoreResponse = false;
6222
+ var responseHandled = false;
6219
6223
  if (isInternalApplicationInsightsEndpoint(endPointUrl)) {
6220
6224
  requestHeaders.append(RequestHeaders.sdkContextHeader, RequestHeaders.sdkContextHeaderAppIdRequest);
6221
6225
  }
@@ -6232,6 +6236,7 @@
6232
6236
  _a);
6233
6237
  if (!isAsync) {
6234
6238
  init.keepalive = true;
6239
+ ignoreResponse = true;
6235
6240
  _syncFetchPayload += batchLength;
6236
6241
  }
6237
6242
  var request = new Request(endPointUrl, init);
@@ -6240,27 +6245,44 @@
6240
6245
  }
6241
6246
  catch (e) {
6242
6247
  }
6243
- fetch(request).then(function (response) {
6244
- if (!isAsync) {
6245
- _syncFetchPayload -= batchLength;
6246
- batchLength = 0;
6247
- }
6248
- if (!response.ok) {
6249
- _self._onError(payload, response.statusText);
6250
- }
6251
- else {
6252
- response.text().then(function (text) {
6253
- _checkResponsStatus(response.status, payload, response.url, payload.length, response.statusText, text);
6254
- });
6255
- }
6256
- })["catch"](function (error) {
6257
- if (!isAsync) {
6258
- _syncFetchPayload -= batchLength;
6259
- batchLength = 0;
6260
- }
6261
- _self._onError(payload, error.message);
6262
- });
6263
6248
  _self._buffer.markAsSent(payload);
6249
+ try {
6250
+ fetch(request).then(function (response) {
6251
+ if (!isAsync) {
6252
+ _syncFetchPayload -= batchLength;
6253
+ batchLength = 0;
6254
+ }
6255
+ if (!responseHandled) {
6256
+ responseHandled = true;
6257
+ if (!response.ok) {
6258
+ _self._onError(payload, response.statusText);
6259
+ }
6260
+ else {
6261
+ response.text().then(function (text) {
6262
+ _checkResponsStatus(response.status, payload, response.url, payload.length, response.statusText, text);
6263
+ });
6264
+ }
6265
+ }
6266
+ })["catch"](function (error) {
6267
+ if (!isAsync) {
6268
+ _syncFetchPayload -= batchLength;
6269
+ batchLength = 0;
6270
+ }
6271
+ if (!responseHandled) {
6272
+ responseHandled = true;
6273
+ _self._onError(payload, error.message);
6274
+ }
6275
+ });
6276
+ }
6277
+ catch (e) {
6278
+ if (!responseHandled) {
6279
+ _self._onError(payload, dumpObj(e));
6280
+ }
6281
+ }
6282
+ if (ignoreResponse && !responseHandled) {
6283
+ responseHandled = true;
6284
+ _self._onSuccess(payload, payload.length);
6285
+ }
6264
6286
  }
6265
6287
  function _parseResponse(response) {
6266
6288
  try {
@@ -6557,7 +6579,7 @@
6557
6579
  return Device;
6558
6580
  }());
6559
6581
 
6560
- var Version = "2.7.2";
6582
+ var Version = "2.7.3-nightly.2201-02";
6561
6583
  var Internal = /** @class */ (function () {
6562
6584
  function Internal(config) {
6563
6585
  this.sdkVersion = (config.sdkExtension && config.sdkExtension() ? config.sdkExtension() + "_" : "") + "javascript:" + Version;