@microsoft/applicationinsights-web-basic 2.8.0-beta.2203-06 → 2.8.0-beta.2203-07

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, 2.8.0-beta.2203-06
2
+ * Microsoft.ApplicationInsights, 2.8.0-beta.2203-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -113,10 +113,20 @@ declare class BaseCore implements IAppInsightsCore {
113
113
  * approach is to create a new instance and initialize that instance.
114
114
  * This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable
115
115
  * to successfully remove any global references or they may just be completing the unload process asynchronously.
116
+ * @param isAsync - Can the unload be performed asynchronously (default)
117
+ * @param unloadComplete - An optional callback that will be called once the unload has completed
118
+ * @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the unload. Defaults to 5 seconds.
116
119
  */
117
120
  unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void;
118
121
  getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
119
- addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting: boolean, doAsync: boolean, addCb?: (added?: boolean) => void): void;
122
+ /**
123
+ * Add a new plugin to the installation
124
+ * @param plugin - The new plugin to add
125
+ * @param replaceExisting - should any existing plugin be replaced, default is false
126
+ * @param doAsync - Should the add be performed asynchronously
127
+ * @param addCb - [Optional] callback to call after the plugin has been added
128
+ */
129
+ addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting?: boolean, doAsync?: boolean, addCb?: (added?: boolean) => void): void;
120
130
  /**
121
131
  * Returns the unique event namespace that should be used
122
132
  */
@@ -126,6 +136,15 @@ declare class BaseCore implements IAppInsightsCore {
126
136
  * @param handler - the handler
127
137
  */
128
138
  addUnloadCb(handler: UnloadHandler): void;
139
+ /**
140
+ * Flush and send any batched / cached data immediately
141
+ * @param async - send data asynchronously when true (defaults to true)
142
+ * @param callBack - if specified, notify caller when send is complete, the channel should return true to indicate to the caller that it will be called.
143
+ * If the caller doesn't return true the caller should assume that it may never be called.
144
+ * @param sendReason - specify the reason that you are calling "flush" defaults to ManualFlush (1) if not specified
145
+ * @returns - true if the callback will be return after the flush is complete otherwise the caller should assume that any provided callback will never be called
146
+ */
147
+ flush(isAsync?: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason): void;
129
148
  protected releaseQueue(): void;
130
149
  /**
131
150
  * Hook for Core extensions to allow them to update their own configuration before updating all of the plugins.
@@ -416,8 +435,11 @@ export declare interface IAppInsightsCore extends IPerfManagerProvider {
416
435
  * approach is to create a new instance and initialize that instance.
417
436
  * This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable
418
437
  * to successfully remove any global references or they may just be completing the unload process asynchronously.
438
+ * @param isAsync - Can the unload be performed asynchronously (default)
439
+ * @param unloadComplete - An optional callback that will be called once the unload has completed
440
+ * @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the unload. Defaults to 5 seconds.
419
441
  */
420
- unload(isAsync?: boolean, unloadComplete?: () => void): void;
442
+ unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void;
421
443
  /**
422
444
  * Find and return the (first) plugin with the specified identifier if present
423
445
  * @param pluginIdentifier
@@ -426,10 +448,11 @@ export declare interface IAppInsightsCore extends IPerfManagerProvider {
426
448
  /**
427
449
  * Add a new plugin to the installation
428
450
  * @param plugin - The new plugin to add
429
- * @param replaceExisting - should any existing plugin be replaced
451
+ * @param replaceExisting - should any existing plugin be replaced, default is false
430
452
  * @param doAsync - Should the add be performed asynchronously
453
+ * @param addCb - [Optional] callback to call after the plugin has been added
431
454
  */
432
- addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting: boolean, doAsync: boolean, addCb?: (added?: boolean) => void): void;
455
+ addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting?: boolean, doAsync?: boolean, addCb?: (added?: boolean) => void): void;
433
456
  /**
434
457
  * Returns the unique event namespace that should be used when registering events
435
458
  */
@@ -439,6 +462,16 @@ export declare interface IAppInsightsCore extends IPerfManagerProvider {
439
462
  * @param handler - the handler
440
463
  */
441
464
  addUnloadCb(handler: UnloadHandler): void;
465
+ /**
466
+ * Flush and send any batched / cached data immediately
467
+ * @param async - send data asynchronously when true (defaults to true)
468
+ * @param callBack - if specified, notify caller when send is complete, the channel should return true to indicate to the caller that it will be called.
469
+ * If the caller doesn't return true the caller should assume that it may never be called.
470
+ * @param sendReason - specify the reason that you are calling "flush" defaults to ManualFlush (1) if not specified
471
+ * @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the unload. Defaults to 5 seconds.
472
+ * @returns - true if the callback will be return after the flush is complete otherwise the caller should assume that any provided callback will never be called
473
+ */
474
+ flush(isAsync?: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason, cbTimeout?: number): boolean | void;
442
475
  }
443
476
 
444
477
  /**
package/dist-esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript Web SDK - Basic, 2.8.0-beta.2203-06
2
+ * Application Insights JavaScript Web SDK - Basic, 2.8.0-beta.2203-07
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/applicationinsights-web-basic",
3
- "version": "2.8.0-beta.2203-06",
3
+ "version": "2.8.0-beta.2203-07",
4
4
  "description": "Microsoft Application Insights Javascript SDK core and channel",
5
5
  "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
6
6
  "author": "Microsoft Application Insights Team",
@@ -49,9 +49,9 @@
49
49
  "dependencies": {
50
50
  "@microsoft/dynamicproto-js": "^1.1.4",
51
51
  "@microsoft/applicationinsights-shims": "2.0.1",
52
- "@microsoft/applicationinsights-common": "2.8.0-beta.2203-06",
53
- "@microsoft/applicationinsights-channel-js": "2.8.0-beta.2203-06",
54
- "@microsoft/applicationinsights-core-js": "2.8.0-beta.2203-06"
52
+ "@microsoft/applicationinsights-common": "2.8.0-beta.2203-07",
53
+ "@microsoft/applicationinsights-channel-js": "2.8.0-beta.2203-07",
54
+ "@microsoft/applicationinsights-core-js": "2.8.0-beta.2203-07"
55
55
  },
56
56
  "license": "MIT",
57
57
  "publishConfig": {
@@ -1,26 +0,0 @@
1
- {
2
- "name": "aib",
3
- "version": "2.8.0-beta.2203-06",
4
- "ext": {
5
- "@js": {
6
- "file": "aib.2.8.0-beta.2203-06.js",
7
- "type": "text/javascript; charset=utf-8",
8
- "integrity": "sha256-8+fClfH8BYzJCuhczOGoYCFarCXcr5YIQ2APoxKZGsM= sha384-Dxen2a0Y1PwQchnt4PHjihbuP+XDWyBGQRoYdagNPZH4e/PZdcqw5B0R0xQXXmtU sha512-0s2gZfbXY06QCY18Ob95+egMHZPrOOgTBrOOFOrhDhVu8QIX1eXZyhJc5Z4FVE3UlcAeZfalYq0wgJLrIgmwvQ==",
9
- "hashes": {
10
- "sha256": "8+fClfH8BYzJCuhczOGoYCFarCXcr5YIQ2APoxKZGsM=",
11
- "sha384": "Dxen2a0Y1PwQchnt4PHjihbuP+XDWyBGQRoYdagNPZH4e/PZdcqw5B0R0xQXXmtU",
12
- "sha512": "0s2gZfbXY06QCY18Ob95+egMHZPrOOgTBrOOFOrhDhVu8QIX1eXZyhJc5Z4FVE3UlcAeZfalYq0wgJLrIgmwvQ=="
13
- }
14
- },
15
- "@min.js": {
16
- "file": "aib.2.8.0-beta.2203-06.min.js",
17
- "type": "text/javascript; charset=utf-8",
18
- "integrity": "sha256-g0Otg61xtACszwkHqat8i+8iy1AnwPVEzbD2aky8jDo= sha384-Wb3PhSxpPTaKUXT2bfFTZtCgm0ZF0CyPO7fb1BizTUiToqtORM6Gwv69YRxmY6fK sha512-eJaOs1WtKw0xXtiRd97kiN6x0I7tDvj9IcIOiJIUlCr+koefAESm57RpoTpLnKCx4GL4RZFg47SKbXRdxR2iqg==",
19
- "hashes": {
20
- "sha256": "g0Otg61xtACszwkHqat8i+8iy1AnwPVEzbD2aky8jDo=",
21
- "sha384": "Wb3PhSxpPTaKUXT2bfFTZtCgm0ZF0CyPO7fb1BizTUiToqtORM6Gwv69YRxmY6fK",
22
- "sha512": "eJaOs1WtKw0xXtiRd97kiN6x0I7tDvj9IcIOiJIUlCr+koefAESm57RpoTpLnKCx4GL4RZFg47SKbXRdxR2iqg=="
23
- }
24
- }
25
- }
26
- }