@microsoft/applicationinsights-channel-js 3.0.2-nightly3.2305-11 → 3.0.2

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 (58) hide show
  1. package/README.md +2 -2
  2. package/browser/es5/{applicationinsights-channel-js.3.0.2-nightly3.2305-11.cjs.js → applicationinsights-channel-js.3.0.2.cjs.js} +17 -17
  3. package/browser/es5/applicationinsights-channel-js.3.0.2.cjs.js.map +1 -0
  4. package/browser/es5/applicationinsights-channel-js.3.0.2.cjs.min.js +6 -0
  5. package/browser/es5/applicationinsights-channel-js.3.0.2.cjs.min.js.map +1 -0
  6. package/browser/es5/{applicationinsights-channel-js.3.0.2-nightly3.2305-11.gbl.js → applicationinsights-channel-js.3.0.2.gbl.js} +19 -19
  7. package/browser/es5/applicationinsights-channel-js.3.0.2.gbl.js.map +1 -0
  8. package/browser/es5/applicationinsights-channel-js.3.0.2.gbl.min.js +6 -0
  9. package/browser/es5/applicationinsights-channel-js.3.0.2.gbl.min.js.map +1 -0
  10. package/browser/es5/applicationinsights-channel-js.3.0.2.integrity.json +66 -0
  11. package/browser/es5/{applicationinsights-channel-js.3.0.2-nightly3.2305-11.js → applicationinsights-channel-js.3.0.2.js} +19 -19
  12. package/browser/es5/applicationinsights-channel-js.3.0.2.js.map +1 -0
  13. package/browser/es5/applicationinsights-channel-js.3.0.2.min.js +6 -0
  14. package/browser/es5/applicationinsights-channel-js.3.0.2.min.js.map +1 -0
  15. package/browser/es5/applicationinsights-channel-js.3.cjs.js +16 -16
  16. package/browser/es5/applicationinsights-channel-js.3.cjs.js.map +1 -1
  17. package/browser/es5/applicationinsights-channel-js.3.cjs.min.js +2 -2
  18. package/browser/es5/applicationinsights-channel-js.3.cjs.min.js.map +1 -1
  19. package/browser/es5/applicationinsights-channel-js.3.gbl.js +18 -18
  20. package/browser/es5/applicationinsights-channel-js.3.gbl.js.map +1 -1
  21. package/browser/es5/applicationinsights-channel-js.3.gbl.min.js +2 -2
  22. package/browser/es5/applicationinsights-channel-js.3.gbl.min.js.map +1 -1
  23. package/browser/es5/applicationinsights-channel-js.3.js +18 -18
  24. package/browser/es5/applicationinsights-channel-js.3.js.map +1 -1
  25. package/browser/es5/applicationinsights-channel-js.3.min.js +2 -2
  26. package/browser/es5/applicationinsights-channel-js.3.min.js.map +1 -1
  27. package/dist/es5/applicationinsights-channel-js.js +16 -16
  28. package/dist/es5/applicationinsights-channel-js.js.map +1 -1
  29. package/dist/es5/applicationinsights-channel-js.min.js +2 -2
  30. package/dist/es5/applicationinsights-channel-js.min.js.map +1 -1
  31. package/dist-es5/EnvelopeCreator.js +3 -3
  32. package/dist-es5/EnvelopeCreator.js.map +1 -1
  33. package/dist-es5/Interfaces.js +1 -1
  34. package/dist-es5/InternalConstants.js +1 -1
  35. package/dist-es5/Offline.js +1 -1
  36. package/dist-es5/SendBuffer.js +1 -1
  37. package/dist-es5/Sender.js +3 -3
  38. package/dist-es5/Sender.js.map +1 -1
  39. package/dist-es5/Serializer.js +1 -1
  40. package/dist-es5/TelemetryProcessors/Sample.js +1 -1
  41. package/dist-es5/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js +1 -1
  42. package/dist-es5/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js +1 -1
  43. package/dist-es5/__DynamicConstants.js +2 -2
  44. package/dist-es5/__DynamicConstants.js.map +1 -1
  45. package/dist-es5/applicationinsights-channel-js.js +1 -1
  46. package/package.json +60 -63
  47. package/types/applicationinsights-channel-js.d.ts +1 -1
  48. package/types/applicationinsights-channel-js.namespaced.d.ts +1 -1
  49. package/browser/es5/applicationinsights-channel-js.3.0.2-nightly3.2305-11.cjs.js.map +0 -1
  50. package/browser/es5/applicationinsights-channel-js.3.0.2-nightly3.2305-11.cjs.min.js +0 -6
  51. package/browser/es5/applicationinsights-channel-js.3.0.2-nightly3.2305-11.cjs.min.js.map +0 -1
  52. package/browser/es5/applicationinsights-channel-js.3.0.2-nightly3.2305-11.gbl.js.map +0 -1
  53. package/browser/es5/applicationinsights-channel-js.3.0.2-nightly3.2305-11.gbl.min.js +0 -6
  54. package/browser/es5/applicationinsights-channel-js.3.0.2-nightly3.2305-11.gbl.min.js.map +0 -1
  55. package/browser/es5/applicationinsights-channel-js.3.0.2-nightly3.2305-11.integrity.json +0 -66
  56. package/browser/es5/applicationinsights-channel-js.3.0.2-nightly3.2305-11.js.map +0 -1
  57. package/browser/es5/applicationinsights-channel-js.3.0.2-nightly3.2305-11.min.js +0 -6
  58. package/browser/es5/applicationinsights-channel-js.3.0.2-nightly3.2305-11.min.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Channel, 3.0.2-nightly3.2305-11
2
+ * Application Insights JavaScript SDK - Channel, 3.0.2
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -7,8 +7,8 @@
7
7
  typeof exports === "object" && typeof module !== undef ? factory(exports) :
8
8
  typeof define === "function" && define.amd ? define(["exports"], factory) :
9
9
  (function(global){
10
- var nsKey, key, nm, theExports = {}, modName = "es5_applicationinsights_channel_js_3_0_2_nightly3_2305_11", msMod="__ms$mod__";
11
- var mods={}, modDetail=mods[modName]={}, ver="3.0.2-nightly3.2305-11";
10
+ var nsKey, key, nm, theExports = {}, modName = "es5_applicationinsights_channel_js_3_0_2", msMod="__ms$mod__";
11
+ var mods={}, modDetail=mods[modName]={}, ver="3.0.2";
12
12
  var baseNs=global, nsKey="Microsoft", baseNs=baseNs[nsKey]=(baseNs[nsKey]||{});
13
13
  // Versioned namespace "Microsoft.ApplicationInsights3"
14
14
  var exportNs=baseNs, nsKey="ApplicationInsights3", exportNs=exportNs[nsKey]=(exportNs[nsKey]||{});
@@ -269,6 +269,7 @@ var mathMax = MathCls.max;
269
269
 
270
270
  var strSlice = _unwrapFunction(SLICE, StrProto);
271
271
 
272
+ var strSubstring = _unwrapFunction("substring", StrProto);
272
273
  var strSubstr = _unwrapFunction("substr", StrProto, polyStrSubstr);
273
274
  function polyStrSubstr(value, start, length) {
274
275
  if (isNullOrUndefined(value)) {
@@ -1757,7 +1758,7 @@ function newId(maxLength) {
1757
1758
  return result;
1758
1759
  }
1759
1760
 
1760
- var version = "3.0.2-nightly3.2305-11";
1761
+ var version = '3.0.2';
1761
1762
  var instanceName = "." + newId(6);
1762
1763
  var _dataUid = 0;
1763
1764
  function _canAcceptData(target) {
@@ -3546,7 +3547,6 @@ var _DYN_FILE_NAME = "fileName";
3546
3547
  var _DYN_LINE = "line";
3547
3548
  var _DYN_DURATION = "duration";
3548
3549
  var _DYN_RECEIVED_RESPONSE = "receivedResponse";
3549
- var _DYN_SUBSTRING = "substring";
3550
3550
 
3551
3551
  function dataSanitizeKeyAndAddUniqueness(logger, key, map) {
3552
3552
  var origLength = key[_DYN_LENGTH$1 ];
@@ -3556,7 +3556,7 @@ function dataSanitizeKeyAndAddUniqueness(logger, key, map) {
3556
3556
  var uniqueField = field;
3557
3557
  while (map[uniqueField] !== undefined) {
3558
3558
  i++;
3559
- uniqueField = field[_DYN_SUBSTRING ](0, 150 - 3) + dsPadNumber(i);
3559
+ uniqueField = strSubstring(field, 0, 150 - 3) + dsPadNumber(i);
3560
3560
  }
3561
3561
  field = uniqueField;
3562
3562
  }
@@ -3565,9 +3565,9 @@ function dataSanitizeKeyAndAddUniqueness(logger, key, map) {
3565
3565
  function dataSanitizeKey(logger, name) {
3566
3566
  var nameTrunc;
3567
3567
  if (name) {
3568
- name = strTrim(name[_DYN_TO_STRING$1 ]());
3568
+ name = strTrim(asString(name));
3569
3569
  if (name[_DYN_LENGTH$1 ] > 150 ) {
3570
- nameTrunc = name[_DYN_SUBSTRING ](0, 150 );
3570
+ nameTrunc = strSubstring(name, 0, 150 );
3571
3571
  _throwInternal(logger, 2 , 57 , "name is too long. It has been truncated to " + 150 + " characters.", { name: name }, true);
3572
3572
  }
3573
3573
  }
@@ -3578,9 +3578,9 @@ function dataSanitizeString(logger, value, maxLength) {
3578
3578
  var valueTrunc;
3579
3579
  if (value) {
3580
3580
  maxLength = maxLength ? maxLength : 1024 ;
3581
- value = strTrim(value[_DYN_TO_STRING$1 ]());
3581
+ value = strTrim(asString(value));
3582
3582
  if (value[_DYN_LENGTH$1 ] > maxLength) {
3583
- valueTrunc = value[_DYN_SUBSTRING ](0, maxLength);
3583
+ valueTrunc = strSubstring(value, 0, maxLength);
3584
3584
  _throwInternal(logger, 2 , 61 , "string value is too long. It has been truncated to " + maxLength + " characters.", { value: value }, true);
3585
3585
  }
3586
3586
  }
@@ -3593,7 +3593,7 @@ function dataSanitizeMessage(logger, message) {
3593
3593
  var messageTrunc;
3594
3594
  if (message) {
3595
3595
  if (message[_DYN_LENGTH$1 ] > 32768 ) {
3596
- messageTrunc = message[_DYN_SUBSTRING ](0, 32768 );
3596
+ messageTrunc = strSubstring(message, 0, 32768 );
3597
3597
  _throwInternal(logger, 2 , 56 , "message is too long, it has been truncated to " + 32768 + " characters.", { message: message }, true);
3598
3598
  }
3599
3599
  }
@@ -3604,7 +3604,7 @@ function dataSanitizeException(logger, exception) {
3604
3604
  if (exception) {
3605
3605
  var value = "" + exception;
3606
3606
  if (value[_DYN_LENGTH$1 ] > 32768 ) {
3607
- exceptionTrunc = value[_DYN_SUBSTRING ](0, 32768 );
3607
+ exceptionTrunc = strSubstring(value, 0, 32768 );
3608
3608
  _throwInternal(logger, 2 , 52 , "exception is too long, it has been truncated to " + 32768 + " characters.", { exception: exception }, true);
3609
3609
  }
3610
3610
  }
@@ -3647,9 +3647,9 @@ function dataSanitizeId(logger, id) {
3647
3647
  function dataSanitizeInput(logger, input, maxLength, _msgId) {
3648
3648
  var inputTrunc;
3649
3649
  if (input) {
3650
- input = strTrim(input[_DYN_TO_STRING$1 ]());
3650
+ input = strTrim(asString(input));
3651
3651
  if (input[_DYN_LENGTH$1 ] > maxLength) {
3652
- inputTrunc = input[_DYN_SUBSTRING ](0, maxLength);
3652
+ inputTrunc = strSubstring(input, 0, maxLength);
3653
3653
  _throwInternal(logger, 2 , _msgId, "input is too long, it has been truncated to " + maxLength + " characters.", { data: input }, true);
3654
3654
  }
3655
3655
  }
@@ -4739,7 +4739,7 @@ function _extractPartAExtensions(logger, item, env) {
4739
4739
  });
4740
4740
  var theTags = __assignFn(__assignFn({}, envTags), tgs);
4741
4741
  if (!theTags[CtxTagKeys.internalSdkVersion]) {
4742
- theTags[CtxTagKeys.internalSdkVersion] = "javascript:".concat(EnvelopeCreator.Version);
4742
+ theTags[CtxTagKeys.internalSdkVersion] = dataSanitizeString(logger, "javascript:".concat(EnvelopeCreator.Version), 64);
4743
4743
  }
4744
4744
  env[_DYN_TAGS ] = optimizeObject(theTags);
4745
4745
  }
@@ -4784,7 +4784,7 @@ function EnvelopeCreatorInit(logger, telemetryItem) {
4784
4784
  }
4785
4785
  }
4786
4786
  var EnvelopeCreator = {
4787
- Version: "3.0.2-nightly3.2305-11"
4787
+ Version: '3.0.2'
4788
4788
  };
4789
4789
  function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
4790
4790
  EnvelopeCreatorInit(logger, telemetryItem);
@@ -5771,7 +5771,7 @@ var Sender = /** @class */ (function (_super) {
5771
5771
  };
5772
5772
  _self[_DYN__ON_ERROR ] = function (payload, message, event) {
5773
5773
  _throwInternal(_self[_DYN_DIAG_LOG ](), 2 , 26 , "Failed to send telemetry.", { message: message });
5774
- _self._buffer[_DYN_CLEAR_SENT ](payload);
5774
+ _self._buffer && _self._buffer[_DYN_CLEAR_SENT ](payload);
5775
5775
  };
5776
5776
  _self[_DYN__ON_PARTIAL_SUCCESS ] = function (payload, results) {
5777
5777
  var failed = [];
@@ -5801,7 +5801,7 @@ var Sender = /** @class */ (function (_super) {
5801
5801
  }
5802
5802
  };
5803
5803
  _self[_DYN__ON_SUCCESS ] = function (payload, countOfItemsInPayload) {
5804
- _self._buffer[_DYN_CLEAR_SENT ](payload);
5804
+ _self._buffer && _self._buffer[_DYN_CLEAR_SENT ](payload);
5805
5805
  };
5806
5806
  _self._xdrOnLoad = function (xdr, payload) {
5807
5807
  var responseText = _getResponseText(xdr);