@microsoft/applicationinsights-core-js 2.7.4-nightly.2202-03 → 2.7.4-nightly.2202-05

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/browser/applicationinsights-core-js.integrity.json +9 -9
  2. package/browser/applicationinsights-core-js.js +12 -14
  3. package/browser/applicationinsights-core-js.js.map +1 -1
  4. package/browser/applicationinsights-core-js.min.js +2 -2
  5. package/browser/applicationinsights-core-js.min.js.map +1 -1
  6. package/dist/applicationinsights-core-js.api.json +27 -136
  7. package/dist/applicationinsights-core-js.api.md +3 -3
  8. package/dist/applicationinsights-core-js.d.ts +4 -4
  9. package/dist/applicationinsights-core-js.js +12 -14
  10. package/dist/applicationinsights-core-js.js.map +1 -1
  11. package/dist/applicationinsights-core-js.min.js +2 -2
  12. package/dist/applicationinsights-core-js.min.js.map +1 -1
  13. package/dist/applicationinsights-core-js.rollup.d.ts +4 -4
  14. package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
  15. package/dist-esm/JavaScriptSDK/BaseCore.js +1 -1
  16. package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
  17. package/dist-esm/JavaScriptSDK/ChannelController.js +1 -1
  18. package/dist-esm/JavaScriptSDK/Constants.js +1 -1
  19. package/dist-esm/JavaScriptSDK/CookieMgr.js +1 -1
  20. package/dist-esm/JavaScriptSDK/CoreUtils.js +1 -1
  21. package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
  22. package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +1 -1
  23. package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -1
  24. package/dist-esm/JavaScriptSDK/HelperFuncs.js +19 -17
  25. package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
  26. package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -1
  27. package/dist-esm/JavaScriptSDK/NotificationManager.js +1 -1
  28. package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
  29. package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
  30. package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
  31. package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +1 -1
  32. package/dist-esm/JavaScriptSDK/TelemetryPluginChain.js +1 -1
  33. package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
  34. package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
  35. package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
  36. package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
  37. package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
  38. package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
  39. package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
  40. package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
  41. package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
  42. package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
  43. package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
  44. package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
  45. package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
  46. package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
  47. package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
  48. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
  49. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
  50. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
  51. package/dist-esm/applicationinsights-core-js.js +1 -1
  52. package/package.json +1 -1
  53. package/src/JavaScriptSDK/HelperFuncs.ts +18 -17
  54. package/types/JavaScriptSDK/HelperFuncs.d.ts +3 -3
@@ -11280,29 +11280,17 @@
11280
11280
  "extendsTokenRanges": []
11281
11281
  },
11282
11282
  {
11283
- "kind": "Function",
11284
- "canonicalReference": "@microsoft/applicationinsights-core-js!isArray:function(1)",
11283
+ "kind": "Variable",
11284
+ "canonicalReference": "@microsoft/applicationinsights-core-js!isArray:var",
11285
11285
  "docComment": "/**\n * Check if an object is of type Array\n */\n",
11286
11286
  "excerptTokens": [
11287
11287
  {
11288
11288
  "kind": "Content",
11289
- "text": "export declare function isArray<T = "
11290
- },
11291
- {
11292
- "kind": "Content",
11293
- "text": "any"
11294
- },
11295
- {
11296
- "kind": "Content",
11297
- "text": ">(obj: "
11289
+ "text": "isArray: "
11298
11290
  },
11299
11291
  {
11300
11292
  "kind": "Content",
11301
- "text": "any"
11302
- },
11303
- {
11304
- "kind": "Content",
11305
- "text": "): "
11293
+ "text": "<T = any>(obj: any) => "
11306
11294
  },
11307
11295
  {
11308
11296
  "kind": "Reference",
@@ -11321,41 +11309,14 @@
11321
11309
  {
11322
11310
  "kind": "Content",
11323
11311
  "text": "<T>"
11324
- },
11325
- {
11326
- "kind": "Content",
11327
- "text": ";"
11328
11312
  }
11329
11313
  ],
11330
- "returnTypeTokenRange": {
11331
- "startIndex": 5,
11332
- "endIndex": 9
11333
- },
11334
11314
  "releaseTag": "Public",
11335
- "overloadIndex": 1,
11336
- "parameters": [
11337
- {
11338
- "parameterName": "obj",
11339
- "parameterTypeTokenRange": {
11340
- "startIndex": 3,
11341
- "endIndex": 4
11342
- }
11343
- }
11344
- ],
11345
- "typeParameters": [
11346
- {
11347
- "typeParameterName": "T",
11348
- "constraintTokenRange": {
11349
- "startIndex": 0,
11350
- "endIndex": 0
11351
- },
11352
- "defaultTypeTokenRange": {
11353
- "startIndex": 1,
11354
- "endIndex": 2
11355
- }
11356
- }
11357
- ],
11358
- "name": "isArray"
11315
+ "name": "isArray",
11316
+ "variableTypeTokenRange": {
11317
+ "startIndex": 1,
11318
+ "endIndex": 6
11319
+ }
11359
11320
  },
11360
11321
  {
11361
11322
  "kind": "Function",
@@ -13630,60 +13591,25 @@
13630
13591
  "name": "objForEachKey"
13631
13592
  },
13632
13593
  {
13633
- "kind": "Function",
13634
- "canonicalReference": "@microsoft/applicationinsights-core-js!objFreeze:function(1)",
13594
+ "kind": "Variable",
13595
+ "canonicalReference": "@microsoft/applicationinsights-core-js!objFreeze:var",
13635
13596
  "docComment": "",
13636
13597
  "excerptTokens": [
13637
13598
  {
13638
13599
  "kind": "Content",
13639
- "text": "export declare function objFreeze<T>(value: "
13600
+ "text": "objFreeze: "
13640
13601
  },
13641
13602
  {
13642
13603
  "kind": "Content",
13643
- "text": "T"
13644
- },
13645
- {
13646
- "kind": "Content",
13647
- "text": "): "
13648
- },
13649
- {
13650
- "kind": "Content",
13651
- "text": "T"
13652
- },
13653
- {
13654
- "kind": "Content",
13655
- "text": ";"
13604
+ "text": "<T>(value: T) => T"
13656
13605
  }
13657
13606
  ],
13658
- "returnTypeTokenRange": {
13659
- "startIndex": 3,
13660
- "endIndex": 4
13661
- },
13662
13607
  "releaseTag": "Public",
13663
- "overloadIndex": 1,
13664
- "parameters": [
13665
- {
13666
- "parameterName": "value",
13667
- "parameterTypeTokenRange": {
13668
- "startIndex": 1,
13669
- "endIndex": 2
13670
- }
13671
- }
13672
- ],
13673
- "typeParameters": [
13674
- {
13675
- "typeParameterName": "T",
13676
- "constraintTokenRange": {
13677
- "startIndex": 0,
13678
- "endIndex": 0
13679
- },
13680
- "defaultTypeTokenRange": {
13681
- "startIndex": 0,
13682
- "endIndex": 0
13683
- }
13684
- }
13685
- ],
13686
- "name": "objFreeze"
13608
+ "name": "objFreeze",
13609
+ "variableTypeTokenRange": {
13610
+ "startIndex": 1,
13611
+ "endIndex": 2
13612
+ }
13687
13613
  },
13688
13614
  {
13689
13615
  "kind": "Function",
@@ -13729,60 +13655,25 @@
13729
13655
  "name": "objKeys"
13730
13656
  },
13731
13657
  {
13732
- "kind": "Function",
13733
- "canonicalReference": "@microsoft/applicationinsights-core-js!objSeal:function(1)",
13658
+ "kind": "Variable",
13659
+ "canonicalReference": "@microsoft/applicationinsights-core-js!objSeal:var",
13734
13660
  "docComment": "",
13735
13661
  "excerptTokens": [
13736
13662
  {
13737
13663
  "kind": "Content",
13738
- "text": "export declare function objSeal<T>(value: "
13739
- },
13740
- {
13741
- "kind": "Content",
13742
- "text": "T"
13743
- },
13744
- {
13745
- "kind": "Content",
13746
- "text": "): "
13747
- },
13748
- {
13749
- "kind": "Content",
13750
- "text": "T"
13664
+ "text": "objSeal: "
13751
13665
  },
13752
13666
  {
13753
13667
  "kind": "Content",
13754
- "text": ";"
13668
+ "text": "<T>(value: T) => T"
13755
13669
  }
13756
13670
  ],
13757
- "returnTypeTokenRange": {
13758
- "startIndex": 3,
13759
- "endIndex": 4
13760
- },
13761
13671
  "releaseTag": "Public",
13762
- "overloadIndex": 1,
13763
- "parameters": [
13764
- {
13765
- "parameterName": "value",
13766
- "parameterTypeTokenRange": {
13767
- "startIndex": 1,
13768
- "endIndex": 2
13769
- }
13770
- }
13771
- ],
13772
- "typeParameters": [
13773
- {
13774
- "typeParameterName": "T",
13775
- "constraintTokenRange": {
13776
- "startIndex": 0,
13777
- "endIndex": 0
13778
- },
13779
- "defaultTypeTokenRange": {
13780
- "startIndex": 0,
13781
- "endIndex": 0
13782
- }
13783
- }
13784
- ],
13785
- "name": "objSeal"
13672
+ "name": "objSeal",
13673
+ "variableTypeTokenRange": {
13674
+ "startIndex": 1,
13675
+ "endIndex": 2
13676
+ }
13786
13677
  },
13787
13678
  {
13788
13679
  "kind": "Function",
@@ -657,7 +657,7 @@ export interface IProcessTelemetryContext {
657
657
  }
658
658
 
659
659
  // @public
660
- export function isArray<T = any>(obj: any): obj is Array<T>;
660
+ export let isArray: <T = any>(obj: any) => obj is Array<T>;
661
661
 
662
662
  // @public
663
663
  export function isBeaconsSupported(): boolean;
@@ -802,13 +802,13 @@ export function objDefineAccessors<T>(target: any, prop: string, getProp?: () =>
802
802
  export function objForEachKey(target: any, callbackfn: (name: string, value: any) => void): void;
803
803
 
804
804
  // @public (undocumented)
805
- export function objFreeze<T>(value: T): T;
805
+ export const objFreeze: <T>(value: T) => T;
806
806
 
807
807
  // @public
808
808
  export function objKeys(obj: {}): string[];
809
809
 
810
810
  // @public (undocumented)
811
- export function objSeal<T>(value: T): T;
811
+ export const objSeal: <T>(value: T) => T;
812
812
 
813
813
  // @public
814
814
  export function optimizeObject<T>(theObject: T): T;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights Core Javascript SDK, 2.7.4-nightly.2202-03
2
+ * Microsoft Application Insights Core Javascript SDK, 2.7.4-nightly.2202-05
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -1599,7 +1599,7 @@ declare namespace ApplicationInsights {
1599
1599
  /**
1600
1600
  * Check if an object is of type Array
1601
1601
  */
1602
- function isArray<T = any>(obj: any): obj is Array<T>;
1602
+ let isArray: <T = any>(obj: any) => obj is Array<T>;
1603
1603
 
1604
1604
  /**
1605
1605
  * Checks if HTML5 Beacons are supported in the current environment.
@@ -1902,7 +1902,7 @@ declare namespace ApplicationInsights {
1902
1902
  */
1903
1903
  function objForEachKey(target: any, callbackfn: (name: string, value: any) => void): void;
1904
1904
 
1905
- function objFreeze<T>(value: T): T;
1905
+ const objFreeze: <T>(value: T) => T;
1906
1906
 
1907
1907
  /**
1908
1908
  * Returns the names of the enumerable string properties and methods of an object. This helper exists to avoid adding a polyfil for older browsers
@@ -1912,7 +1912,7 @@ declare namespace ApplicationInsights {
1912
1912
  */
1913
1913
  function objKeys(obj: {}): string[];
1914
1914
 
1915
- function objSeal<T>(value: T): T;
1915
+ const objSeal: <T>(value: T) => T;
1916
1916
 
1917
1917
  /**
1918
1918
  * A helper function to assist with JIT performance for objects that have properties added / removed dynamically
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Core, 2.7.4-nightly.2202-03
2
+ * Application Insights JavaScript SDK - Core, 2.7.4-nightly.2202-05
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -456,6 +456,7 @@
456
456
  var DateProto = Date[strShimPrototype];
457
457
  var _dataToISOString = DateProto[strToISOString];
458
458
  var _isArray = Array.isArray;
459
+ var _objToString = ObjProto[strToString];
459
460
  var _fnToString = ObjHasOwnProperty[strToString];
460
461
  _fnToString.call(ObjClass);
461
462
  var rCamelCase = /-([a-z])/g;
@@ -474,9 +475,6 @@
474
475
  }
475
476
  return null;
476
477
  }
477
- function objToString(obj) {
478
- return ObjProto[strToString].call(obj);
479
- }
480
478
  function isTypeof(value, theType) {
481
479
  return typeof value === theType;
482
480
  }
@@ -607,13 +605,14 @@
607
605
  return false;
608
606
  }
609
607
  function isDate(obj) {
610
- return !!(obj && objToString(obj) === "[object Date]");
608
+ return !!(obj && _objToString.call(obj) === "[object Date]");
611
609
  }
612
- function isArray(obj) {
613
- return _isArray ? _isArray(obj) : !!(obj && objToString(obj) === "[object Array]");
610
+ var isArray = _isArray || _isArrayPoly;
611
+ function _isArrayPoly(obj) {
612
+ return !!(obj && _objToString.call(obj) === "[object Array]");
614
613
  }
615
614
  function isError(obj) {
616
- return !!(obj && objToString(obj) === "[object Error]");
615
+ return !!(obj && _objToString.call(obj) === "[object Error]");
617
616
  }
618
617
  function isString(value) {
619
618
  return typeof value === "string";
@@ -753,7 +752,7 @@
753
752
  throwTypeError("objKeys called on non-object");
754
753
  }
755
754
  if (!_objKeysHasDontEnumBug && obj[strKeys]) {
756
- return obj[strKeys];
755
+ return obj[strKeys]();
757
756
  }
758
757
  var result = [];
759
758
  for (var prop in obj) {
@@ -792,12 +791,11 @@
792
791
  }
793
792
  return false;
794
793
  }
795
- function objFreeze(value) {
796
- return _objFreeze ? _objFreeze(value) : value;
797
- }
798
- function objSeal(value) {
799
- return _objSeal ? _objSeal(value) : value;
794
+ function _doNothing(value) {
795
+ return value;
800
796
  }
797
+ var objFreeze = _objFreeze || _doNothing;
798
+ var objSeal = _objSeal || _doNothing;
801
799
  function dateNow() {
802
800
  var dt = Date;
803
801
  return dt.now ? dt.now() : new dt().getTime();