@microsoft/applicationinsights-core-js 3.0.0-beta.2208-04 → 3.0.0-beta.2208-14

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 (73) hide show
  1. package/browser/applicationinsights-core-js.integrity.json +9 -9
  2. package/browser/applicationinsights-core-js.js +5 -11
  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 +29 -1
  7. package/dist/applicationinsights-core-js.api.md +1 -0
  8. package/dist/applicationinsights-core-js.d.ts +7 -1
  9. package/dist/applicationinsights-core-js.js +5 -11
  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 +7 -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 +1 -1
  19. package/dist-esm/JavaScriptSDK/CoreUtils.js +4 -9
  20. package/dist-esm/JavaScriptSDK/CoreUtils.js.map +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 +3 -3
  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/CoreUtils.ts +3 -7
  70. package/src/JavaScriptSDK.Interfaces/ITelemetryPlugin.ts +7 -0
  71. package/types/JavaScriptSDK.Interfaces/ITelemetryPlugin.d.ts +6 -0
  72. package/types/__DynamicConstants.d.ts +1 -1
  73. package/types/tsdoc-metadata.json +1 -1
@@ -20,15 +20,11 @@ let _canUseCookies: boolean; // legacy supported config
20
20
 
21
21
  // Added to help with minfication
22
22
  export const Undefined = strShimUndefined;
23
+
23
24
  export function newGuid(): string {
24
- function randomHexDigit() {
25
- return randomValue(15); // Get a random value from 0..15
26
- }
25
+ const uuid = generateW3CId();
27
26
 
28
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(GuidRegex, (c) => {
29
- const r = (randomHexDigit() | 0), v = (c === "x" ? r : r & 0x3 | 0x8);
30
- return v.toString(16);
31
- });
27
+ return uuid.substring(0, 8) + "-" + uuid.substring(8, 12) + "-" + uuid.substring(12, 16) + "-" + uuid.substring(16, 20) + "-" + uuid.substring(20);
32
28
  }
33
29
 
34
30
  /**
@@ -84,4 +84,11 @@ export interface IPlugin {
84
84
  * Plugin version (available in data.properties.version in common schema)
85
85
  */
86
86
  readonly version?: string;
87
+
88
+ /**
89
+ * The App Insights core to use for backward compatibility.
90
+ * Therefore the interface will be able to access the core without needing to cast to "any".
91
+ * [optional] any 3rd party plugins which are already implementing this interface don't fail to compile.
92
+ */
93
+ core?: IAppInsightsCore
87
94
  }
@@ -71,4 +71,10 @@ export interface IPlugin {
71
71
  * Plugin version (available in data.properties.version in common schema)
72
72
  */
73
73
  readonly version?: string;
74
+ /**
75
+ * The App Insights core to use for backward compatibility.
76
+ * Therefore the interface will be able to access the core without needing to cast to "any".
77
+ * [optional] any 3rd party plugins which are already implementing this interface don't fail to compile.
78
+ */
79
+ core?: IAppInsightsCore;
74
80
  }
@@ -35,10 +35,10 @@ export declare const _DYN_SUBSTRING = "substring";
35
35
  export declare const _DYN_USER_AGENT = "userAgent";
36
36
  export declare const _DYN_SPLIT = "split";
37
37
  export declare const _DYN_SET_ENABLED = "setEnabled";
38
- export declare const _DYN_REPLACE = "replace";
39
38
  export declare const _DYN_SUBSTR = "substr";
40
39
  export declare const _DYN_NODE_TYPE = "nodeType";
41
40
  export declare const _DYN_APPLY = "apply";
41
+ export declare const _DYN_REPLACE = "replace";
42
42
  export declare const _DYN_ENABLE_DEBUG_EXCEPTI4 = "enableDebugExceptions";
43
43
  export declare const _DYN_LOG_INTERNAL_MESSAGE = "logInternalMessage";
44
44
  export declare const _DYN_TO_LOWER_CASE = "toLowerCase";
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.28.7"
8
+ "packageVersion": "7.29.0"
9
9
  }
10
10
  ]
11
11
  }