@microsoft/applicationinsights-web-basic 3.0.0-beta.2303-02 → 3.0.0-beta.2303-04

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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft.ApplicationInsights, 3.0.0-beta.2303-02
2
+ * Microsoft.ApplicationInsights, 3.0.0-beta.2303-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -13,9 +13,8 @@ declare namespace ApplicationInsights {
13
13
  import { ITimerHandler } from '@nevware21/ts-utils';
14
14
  import { throwError } from '@nevware21/ts-utils';
15
15
 
16
- class AppInsightsCore implements IAppInsightsCore {
17
- static defaultConfig: IConfiguration;
18
- config: IConfiguration;
16
+ class AppInsightsCore<CfgType extends IConfiguration = IConfiguration> implements IAppInsightsCore<CfgType> {
17
+ config: CfgType;
19
18
  logger: IDiagnosticLogger;
20
19
  /**
21
20
  * An array of the installed plugins that provide a version
@@ -34,7 +33,7 @@ declare namespace ApplicationInsights {
34
33
  */
35
34
  getWParam: () => number;
36
35
  constructor();
37
- initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
36
+ initialize(config: CfgType, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
38
37
  getChannels(): IChannelControls[];
39
38
  track(telemetryItem: ITelemetryItem): void;
40
39
  getProcessTelContext(): IProcessTelemetryContext;
@@ -103,7 +102,7 @@ declare namespace ApplicationInsights {
103
102
  * @param newConfig - The new configuration is apply
104
103
  * @param mergeExisting - Should the new configuration merge with the existing or just replace it. Default is to true.
105
104
  */
106
- updateCfg<T extends IConfiguration = IConfiguration>(newConfig: T, mergeExisting?: boolean): void;
105
+ updateCfg(newConfig: CfgType, mergeExisting?: boolean): void;
107
106
  /**
108
107
  * Returns the unique event namespace that should be used
109
108
  */
@@ -142,7 +141,7 @@ declare namespace ApplicationInsights {
142
141
  * @param handler
143
142
  * @returns A watcher handler instance that can be used to remove itself when being unloaded
144
143
  */
145
- onCfgChange<T extends IConfiguration = IConfiguration>(handler: WatcherFunction<T>): IUnloadHook;
144
+ onCfgChange(handler: WatcherFunction<CfgType>): IUnloadHook;
146
145
  protected releaseQueue(): void;
147
146
  /**
148
147
  * Hook for Core extensions to allow them to update their own configuration before updating all of the plugins.
@@ -480,9 +479,12 @@ declare namespace ApplicationInsights {
480
479
  Critical = 4
481
480
  }
482
481
 
483
- interface IAppInsightsCore extends IPerfManagerProvider {
484
- config: IConfiguration;
485
- logger: IDiagnosticLogger;
482
+ interface IAppInsightsCore<CfgType extends IConfiguration = IConfiguration> extends IPerfManagerProvider {
483
+ readonly config: CfgType;
484
+ /**
485
+ * The current logger instance for this instance.
486
+ */
487
+ readonly logger: IDiagnosticLogger;
486
488
  /**
487
489
  * An array of the installed plugins that provide a version
488
490
  */
@@ -495,7 +497,7 @@ declare namespace ApplicationInsights {
495
497
  * Returns a value that indicates whether the instance has already been previously initialized.
496
498
  */
497
499
  isInitialized?: () => boolean;
498
- initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
500
+ initialize(config: CfgType, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
499
501
  getChannels(): IChannelControls[];
500
502
  track(telemetryItem: ITelemetryItem): void;
501
503
  /**
@@ -567,7 +569,7 @@ declare namespace ApplicationInsights {
567
569
  * @param newConfig - The new configuration is apply
568
570
  * @param mergeExisting - Should the new configuration merge with the existing or just replace it. Default is to merge.
569
571
  */
570
- updateCfg<T extends IConfiguration = IConfiguration>(newConfig: T, mergeExisting?: boolean): void;
572
+ updateCfg(newConfig: CfgType, mergeExisting?: boolean): void;
571
573
  /**
572
574
  * Returns the unique event namespace that should be used when registering events
573
575
  */
@@ -607,7 +609,7 @@ declare namespace ApplicationInsights {
607
609
  * @param handler
608
610
  * @returns A watcher handler instance that can be used to remove itself when being unloaded
609
611
  */
610
- onCfgChange<T extends IConfiguration = IConfiguration>(handler: WatcherFunction<T>): IUnloadHook;
612
+ onCfgChange(handler: WatcherFunction<CfgType>): IUnloadHook;
611
613
  /**
612
614
  * Function used to identify the get w parameter used to identify status bit to some channels
613
615
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2303-02
2
+ * Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2303-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -1614,7 +1614,7 @@
1614
1614
  }
1615
1615
 
1616
1616
  var _objDefineProperty = ObjDefineProperty;
1617
- var version = "3.0.0-beta.2303-02";
1617
+ var version = "3.0.0-beta.2303-04";
1618
1618
  var instanceName = "." + newId(6);
1619
1619
  var _dataUid = 0;
1620
1620
  function _createAccessor(target, prop, value) {
@@ -5893,7 +5893,7 @@
5893
5893
  }
5894
5894
  }
5895
5895
  var EnvelopeCreator = {
5896
- Version: "3.0.0-beta.2303-02"
5896
+ Version: "3.0.0-beta.2303-04"
5897
5897
  };
5898
5898
  function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
5899
5899
  EnvelopeCreatorInit(logger, telemetryItem);