@microsoft/applicationinsights-core-js 2.8.8-nightly.2209-02 → 2.8.8-nightly.2209-03

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 (71) hide show
  1. package/browser/applicationinsights-core-js.integrity.json +9 -9
  2. package/browser/applicationinsights-core-js.js +18 -4
  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 +54 -0
  7. package/dist/applicationinsights-core-js.api.md +2 -0
  8. package/dist/applicationinsights-core-js.d.ts +13 -1
  9. package/dist/applicationinsights-core-js.js +18 -4
  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 +13 -1
  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/CookieMgr.js +18 -4
  19. package/dist-esm/JavaScriptSDK/CookieMgr.js.map +1 -1
  20. package/dist-esm/JavaScriptSDK/CoreUtils.js +1 -1
  21. package/dist-esm/JavaScriptSDK/DataCacheHelper.js +2 -2
  22. package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
  23. package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
  24. package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +1 -1
  25. package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -1
  26. package/dist-esm/JavaScriptSDK/EventHelpers.js +1 -1
  27. package/dist-esm/JavaScriptSDK/HelperFuncs.js +1 -1
  28. package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -1
  29. package/dist-esm/JavaScriptSDK/InternalConstants.js +1 -1
  30. package/dist-esm/JavaScriptSDK/NotificationManager.js +1 -1
  31. package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
  32. package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
  33. package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
  34. package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +1 -1
  35. package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +1 -1
  36. package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
  37. package/dist-esm/JavaScriptSDK/W3cTraceParent.js +1 -1
  38. package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +1 -1
  39. package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
  40. package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
  41. package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
  42. package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
  43. package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
  44. package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
  45. package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
  46. package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
  47. package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
  48. package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
  49. package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
  50. package/dist-esm/JavaScriptSDK.Interfaces/IDistributedTraceContext.js +1 -1
  51. package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
  52. package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
  53. package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
  54. package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
  55. package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
  56. package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
  57. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
  58. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
  59. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
  60. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
  61. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
  62. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
  63. package/dist-esm/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
  64. package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
  65. package/dist-esm/__DynamicConstants.js +2 -2
  66. package/dist-esm/__DynamicConstants.js.map +1 -1
  67. package/dist-esm/applicationinsights-core-js.js +1 -1
  68. package/package.json +1 -1
  69. package/src/JavaScriptSDK/CookieMgr.ts +21 -3
  70. package/src/JavaScriptSDK.Interfaces/ICookieMgr.ts +14 -0
  71. package/types/JavaScriptSDK.Interfaces/ICookieMgr.d.ts +12 -0
@@ -12703,6 +12703,33 @@
12703
12703
  "name": "ICookieMgrConfig",
12704
12704
  "preserveMemberOrder": false,
12705
12705
  "members": [
12706
+ {
12707
+ "kind": "PropertySignature",
12708
+ "canonicalReference": "@microsoft/applicationinsights-core-js!ICookieMgrConfig#blockedCookies:member",
12709
+ "docComment": "/**\n * Specify the cookie name(s) to never be written, this will cause any cookie name to never be created or updated, they will still be read unless also included in the ignoreCookies and may still be explicitly purged or deleted. If not provided defaults to the same list provided in ignoreCookies. (Since v2.8.8)\n */\n",
12710
+ "excerptTokens": [
12711
+ {
12712
+ "kind": "Content",
12713
+ "text": "blockedCookies?: "
12714
+ },
12715
+ {
12716
+ "kind": "Content",
12717
+ "text": "string[]"
12718
+ },
12719
+ {
12720
+ "kind": "Content",
12721
+ "text": ";"
12722
+ }
12723
+ ],
12724
+ "isReadonly": false,
12725
+ "isOptional": true,
12726
+ "releaseTag": "Public",
12727
+ "name": "blockedCookies",
12728
+ "propertyTypeTokenRange": {
12729
+ "startIndex": 1,
12730
+ "endIndex": 2
12731
+ }
12732
+ },
12706
12733
  {
12707
12734
  "kind": "PropertySignature",
12708
12735
  "canonicalReference": "@microsoft/applicationinsights-core-js!ICookieMgrConfig#delCookie:member",
@@ -12811,6 +12838,33 @@
12811
12838
  "endIndex": 2
12812
12839
  }
12813
12840
  },
12841
+ {
12842
+ "kind": "PropertySignature",
12843
+ "canonicalReference": "@microsoft/applicationinsights-core-js!ICookieMgrConfig#ignoreCookies:member",
12844
+ "docComment": "/**\n * Specify the cookie name(s) to be ignored, this will cause any matching cookie name to never be read or written. They may still be explicitly purged or deleted. You do not need to repeat the name in the `blockedCookies` configuration.(Since v2.8.8)\n */\n",
12845
+ "excerptTokens": [
12846
+ {
12847
+ "kind": "Content",
12848
+ "text": "ignoreCookies?: "
12849
+ },
12850
+ {
12851
+ "kind": "Content",
12852
+ "text": "string[]"
12853
+ },
12854
+ {
12855
+ "kind": "Content",
12856
+ "text": ";"
12857
+ }
12858
+ ],
12859
+ "isReadonly": false,
12860
+ "isOptional": true,
12861
+ "releaseTag": "Public",
12862
+ "name": "ignoreCookies",
12863
+ "propertyTypeTokenRange": {
12864
+ "startIndex": 1,
12865
+ "endIndex": 2
12866
+ }
12867
+ },
12814
12868
  {
12815
12869
  "kind": "PropertySignature",
12816
12870
  "canonicalReference": "@microsoft/applicationinsights-core-js!ICookieMgrConfig#path:member",
@@ -622,10 +622,12 @@ export interface ICookieMgr {
622
622
 
623
623
  // @public
624
624
  export interface ICookieMgrConfig {
625
+ blockedCookies?: string[];
625
626
  delCookie?: (name: string, cookieValue: string) => void;
626
627
  domain?: string;
627
628
  enabled?: boolean;
628
629
  getCookie?: (name: string) => string;
630
+ ignoreCookies?: string[];
629
631
  path?: string;
630
632
  setCookie?: (name: string, value: string) => void;
631
633
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights Core Javascript SDK, 2.8.8-nightly.2209-02
2
+ * Microsoft Application Insights Core Javascript SDK, 2.8.8-nightly.2209-03
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -1287,6 +1287,18 @@ declare namespace ApplicationInsights {
1287
1287
  * Specifies the path to use for the cookie, defaults to '/'
1288
1288
  */
1289
1289
  path?: string;
1290
+ /**
1291
+ * Specify the cookie name(s) to be ignored, this will cause any matching cookie name to never be read or written.
1292
+ * They may still be explicitly purged or deleted. You do not need to repeat the name in the `blockedCookies`
1293
+ * configuration.(Since v2.8.8)
1294
+ */
1295
+ ignoreCookies?: string[];
1296
+ /**
1297
+ * Specify the cookie name(s) to never be written, this will cause any cookie name to never be created or updated,
1298
+ * they will still be read unless also included in the ignoreCookies and may still be explicitly purged or deleted.
1299
+ * If not provided defaults to the same list provided in ignoreCookies. (Since v2.8.8)
1300
+ */
1301
+ blockedCookies?: string[];
1290
1302
  /**
1291
1303
  * Hook function to fetch the named cookie value.
1292
1304
  * @param name - The name of the cookie
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Core, 2.8.8-nightly.2209-02
2
+ * Application Insights JavaScript SDK - Core, 2.8.8-nightly.2209-03
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -1672,7 +1672,7 @@
1672
1672
  }
1673
1673
 
1674
1674
  var _objDefineProperty = ObjDefineProperty;
1675
- var version = "2.8.8-nightly.2209-02";
1675
+ var version = "2.8.8-nightly.2209-03";
1676
1676
  var instanceName = "." + newId(6);
1677
1677
  var _dataUid = 0;
1678
1678
  function _createAccessor(target, prop, value) {
@@ -1787,6 +1787,20 @@
1787
1787
  }
1788
1788
  return cookieMgrCfg;
1789
1789
  }
1790
+ function _isIgnoredCookie(cookieMgrCfg, name) {
1791
+ if (name && cookieMgrCfg && isArray(cookieMgrCfg.ignoreCookies)) {
1792
+ return cookieMgrCfg.ignoreCookies[_DYN_INDEX_OF ](name) !== -1;
1793
+ }
1794
+ return false;
1795
+ }
1796
+ function _isBlockedCookie(cookieMgrCfg, name) {
1797
+ if (name && cookieMgrCfg && isArray(cookieMgrCfg.blockedCookies)) {
1798
+ if (cookieMgrCfg.blockedCookies[_DYN_INDEX_OF ](name) !== -1) {
1799
+ return true;
1800
+ }
1801
+ }
1802
+ return _isIgnoredCookie(cookieMgrCfg, name);
1803
+ }
1790
1804
  function safeGetCookieMgr(core, config) {
1791
1805
  var cookieMgr;
1792
1806
  if (core) {
@@ -1827,7 +1841,7 @@
1827
1841
  },
1828
1842
  _a.set = function (name, value, maxAgeSec, domain, path) {
1829
1843
  var result = false;
1830
- if (_isMgrEnabled(cookieMgr)) {
1844
+ if (_isMgrEnabled(cookieMgr) && !_isBlockedCookie(cookieMgrConfig, name)) {
1831
1845
  var values = {};
1832
1846
  var theValue = strTrim(value || STR_EMPTY);
1833
1847
  var idx = theValue[_DYN_INDEX_OF ](";");
@@ -1870,7 +1884,7 @@
1870
1884
  },
1871
1885
  _a.get = function (name) {
1872
1886
  var value = STR_EMPTY;
1873
- if (_isMgrEnabled(cookieMgr)) {
1887
+ if (_isMgrEnabled(cookieMgr) && !_isIgnoredCookie(cookieMgrConfig, name)) {
1874
1888
  value = (cookieMgrConfig.getCookie || _getCookieValue)(name);
1875
1889
  }
1876
1890
  return value;