@microsoft/applicationinsights-channel-js 3.3.4-nightly3.2410-01 → 3.3.4-nightly3.2410-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 (47) hide show
  1. package/browser/es5/{applicationinsights-channel-js.3.3.4-nightly3.2410-01.cjs.js → applicationinsights-channel-js.3.3.4-nightly3.2410-03.cjs.js} +7 -4
  2. package/browser/es5/{applicationinsights-channel-js.3.3.4-nightly3.2410-01.gbl.js.map → applicationinsights-channel-js.3.3.4-nightly3.2410-03.cjs.js.map} +1 -1
  3. package/browser/es5/{applicationinsights-channel-js.3.3.4-nightly3.2410-01.cjs.min.js → applicationinsights-channel-js.3.3.4-nightly3.2410-03.cjs.min.js} +3 -3
  4. package/browser/es5/{applicationinsights-channel-js.3.3.4-nightly3.2410-01.cjs.min.js.map → applicationinsights-channel-js.3.3.4-nightly3.2410-03.cjs.min.js.map} +1 -1
  5. package/browser/es5/{applicationinsights-channel-js.3.3.4-nightly3.2410-01.gbl.js → applicationinsights-channel-js.3.3.4-nightly3.2410-03.gbl.js} +9 -6
  6. package/browser/es5/{applicationinsights-channel-js.3.3.4-nightly3.2410-01.cjs.js.map → applicationinsights-channel-js.3.3.4-nightly3.2410-03.gbl.js.map} +1 -1
  7. package/browser/es5/{applicationinsights-channel-js.3.3.4-nightly3.2410-01.gbl.min.js → applicationinsights-channel-js.3.3.4-nightly3.2410-03.gbl.min.js} +3 -3
  8. package/browser/es5/{applicationinsights-channel-js.3.3.4-nightly3.2410-01.gbl.min.js.map → applicationinsights-channel-js.3.3.4-nightly3.2410-03.gbl.min.js.map} +1 -1
  9. package/browser/es5/applicationinsights-channel-js.3.3.4-nightly3.2410-03.integrity.json +66 -0
  10. package/browser/es5/{applicationinsights-channel-js.3.3.4-nightly3.2410-01.js → applicationinsights-channel-js.3.3.4-nightly3.2410-03.js} +9 -6
  11. package/browser/es5/{applicationinsights-channel-js.3.3.4-nightly3.2410-01.js.map → applicationinsights-channel-js.3.3.4-nightly3.2410-03.js.map} +1 -1
  12. package/browser/es5/{applicationinsights-channel-js.3.3.4-nightly3.2410-01.min.js → applicationinsights-channel-js.3.3.4-nightly3.2410-03.min.js} +3 -3
  13. package/browser/es5/{applicationinsights-channel-js.3.3.4-nightly3.2410-01.min.js.map → applicationinsights-channel-js.3.3.4-nightly3.2410-03.min.js.map} +1 -1
  14. package/browser/es5/applicationinsights-channel-js.3.cjs.js +6 -3
  15. package/browser/es5/applicationinsights-channel-js.3.cjs.js.map +1 -1
  16. package/browser/es5/applicationinsights-channel-js.3.cjs.min.js +2 -2
  17. package/browser/es5/applicationinsights-channel-js.3.cjs.min.js.map +1 -1
  18. package/browser/es5/applicationinsights-channel-js.3.gbl.js +8 -5
  19. package/browser/es5/applicationinsights-channel-js.3.gbl.js.map +1 -1
  20. package/browser/es5/applicationinsights-channel-js.3.gbl.min.js +2 -2
  21. package/browser/es5/applicationinsights-channel-js.3.gbl.min.js.map +1 -1
  22. package/browser/es5/applicationinsights-channel-js.3.integrity.json +25 -25
  23. package/browser/es5/applicationinsights-channel-js.3.js +8 -5
  24. package/browser/es5/applicationinsights-channel-js.3.js.map +1 -1
  25. package/browser/es5/applicationinsights-channel-js.3.min.js +2 -2
  26. package/browser/es5/applicationinsights-channel-js.3.min.js.map +1 -1
  27. package/dist/es5/applicationinsights-channel-js.js +6 -3
  28. package/dist/es5/applicationinsights-channel-js.js.map +1 -1
  29. package/dist/es5/applicationinsights-channel-js.min.js +2 -2
  30. package/dist/es5/applicationinsights-channel-js.min.js.map +1 -1
  31. package/dist-es5/EnvelopeCreator.js +2 -2
  32. package/dist-es5/EnvelopeCreator.js.map +1 -1
  33. package/dist-es5/Interfaces.js +1 -1
  34. package/dist-es5/InternalConstants.js +1 -1
  35. package/dist-es5/SendBuffer.js +1 -1
  36. package/dist-es5/Sender.js +5 -1
  37. package/dist-es5/Sender.js.map +1 -1
  38. package/dist-es5/Serializer.js +1 -1
  39. package/dist-es5/TelemetryProcessors/Sample.js +1 -1
  40. package/dist-es5/TelemetryProcessors/SamplingScoreGenerators/HashCodeScoreGenerator.js +1 -1
  41. package/dist-es5/TelemetryProcessors/SamplingScoreGenerators/SamplingScoreGenerator.js +1 -1
  42. package/dist-es5/__DynamicConstants.js +1 -1
  43. package/dist-es5/applicationinsights-channel-js.js +1 -1
  44. package/package.json +3 -3
  45. package/types/applicationinsights-channel-js.d.ts +8 -1
  46. package/types/applicationinsights-channel-js.namespaced.d.ts +41 -1
  47. package/browser/es5/applicationinsights-channel-js.3.3.4-nightly3.2410-01.integrity.json +0 -66
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Channel, 3.3.4-nightly3.2410-01
2
+ * Application Insights JavaScript SDK - Channel, 3.3.4-nightly3.2410-03
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Channel, 3.3.4-nightly3.2410-01
2
+ * Application Insights JavaScript SDK - Channel, 3.3.4-nightly3.2410-03
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  export { Sender } from "./Sender";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/applicationinsights-channel-js",
3
- "version": "3.3.4-nightly3.2410-01",
3
+ "version": "3.3.4-nightly3.2410-03",
4
4
  "description": "Microsoft Application Insights JavaScript SDK Channel",
5
5
  "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
6
6
  "author": "Microsoft Application Insights Team",
@@ -53,8 +53,8 @@
53
53
  "dependencies": {
54
54
  "@microsoft/dynamicproto-js": "^2.0.3",
55
55
  "@microsoft/applicationinsights-shims": "3.0.1",
56
- "@microsoft/applicationinsights-core-js": "3.3.4-nightly3.2410-01",
57
- "@microsoft/applicationinsights-common": "3.3.4-nightly3.2410-01",
56
+ "@microsoft/applicationinsights-core-js": "3.3.4-nightly3.2410-03",
57
+ "@microsoft/applicationinsights-common": "3.3.4-nightly3.2410-03",
58
58
  "@nevware21/ts-utils": ">= 0.11.3 < 2.x",
59
59
  "@nevware21/ts-async": ">= 0.5.2 < 2.x"
60
60
  },
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights JavaScript SDK Channel, 3.3.4-nightly3.2410-01
2
+ * Microsoft Application Insights JavaScript SDK Channel, 3.3.4-nightly3.2410-03
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -21,6 +21,7 @@ import { IConfiguration } from '@microsoft/applicationinsights-core-js';
21
21
  import { IDiagnosticLogger } from '@microsoft/applicationinsights-core-js';
22
22
  import { IEnvelope } from '@microsoft/applicationinsights-common';
23
23
  import { IInternalOfflineSupport } from '@microsoft/applicationinsights-core-js';
24
+ import { IOfflineListener } from '@microsoft/applicationinsights-common';
24
25
  import { IPlugin } from '@microsoft/applicationinsights-core-js';
25
26
  import { IProcessTelemetryContext } from '@microsoft/applicationinsights-core-js';
26
27
  import { IPromise } from '@nevware21/ts-async';
@@ -358,6 +359,12 @@ export declare class Sender extends BaseTelemetryPlugin implements IChannelContr
358
359
  * @returns internal Offline Serializer object
359
360
  */
360
361
  getOfflineSupport(): IInternalOfflineSupport;
362
+ /**
363
+ * Get Offline listener
364
+ * @returns offlineListener
365
+ * @since 3.3.4
366
+ */
367
+ getOfflineListener(): IOfflineListener;
361
368
  }
362
369
 
363
370
  declare type SenderFunction = (payload: string[] | IInternalStorageItem[], isAsync: boolean) => void | IPromise<boolean>;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights JavaScript SDK Channel, 3.3.4-nightly3.2410-01
2
+ * Microsoft Application Insights JavaScript SDK Channel, 3.3.4-nightly3.2410-03
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -289,6 +289,15 @@ declare namespace ApplicationInsights {
289
289
 
290
290
  type EnumValue<E = any> = EnumCls<E>;
291
291
 
292
+ /**
293
+ * This is the enum for the different network states current ai is experiencing
294
+ */
295
+ const enum eOfflineValue {
296
+ Unknown = 0,
297
+ Online = 1,
298
+ Offline = 2
299
+ }
300
+
292
301
  const enum FeatureOptInMode {
293
302
  /**
294
303
  * not set, completely depends on cdn cfg
@@ -1728,6 +1737,25 @@ declare namespace ApplicationInsights {
1728
1737
 
1729
1738
  type _InternalMessageId = number | _eInternalMessageId;
1730
1739
 
1740
+ interface IOfflineListener {
1741
+ isOnline: () => boolean;
1742
+ isListening: () => boolean;
1743
+ unload: () => void;
1744
+ addListener: (callback: OfflineCallback) => IUnloadHook;
1745
+ setOnlineState: (uState: eOfflineValue) => void;
1746
+ }
1747
+
1748
+ /**
1749
+ * This is the interface for the Offline state
1750
+ * runtime state is retrieved from the browser state
1751
+ * user state is set by the user
1752
+ */
1753
+ interface IOfflineState {
1754
+ readonly isOnline: boolean;
1755
+ readonly rState: eOfflineValue;
1756
+ readonly uState: eOfflineValue;
1757
+ }
1758
+
1731
1759
  /** IPayloadData describes interface of payload sent via POST channel */
1732
1760
  interface IPayloadData {
1733
1761
  urlString: string;
@@ -2746,6 +2774,12 @@ declare namespace ApplicationInsights {
2746
2774
 
2747
2775
  type LoggingSeverity = number | eLoggingSeverity;
2748
2776
 
2777
+ /**
2778
+ * this is the callback that will be called when the network status changes
2779
+ * @param onlineState this is the current network running state
2780
+ */
2781
+ type OfflineCallback = (onlineState: IOfflineState) => void;
2782
+
2749
2783
  type OnCompleteCallback = (status: number, headers: {
2750
2784
  [headerName: string]: string;
2751
2785
  }, response?: string) => void;
@@ -2879,6 +2913,12 @@ declare namespace ApplicationInsights {
2879
2913
  * @returns internal Offline Serializer object
2880
2914
  */
2881
2915
  getOfflineSupport(): IInternalOfflineSupport;
2916
+ /**
2917
+ * Get Offline listener
2918
+ * @returns offlineListener
2919
+ * @since 3.3.4
2920
+ */
2921
+ getOfflineListener(): IOfflineListener;
2882
2922
  }
2883
2923
 
2884
2924
  type SenderFunction = (payload: string[] | IInternalStorageItem[], isAsync: boolean) => void | IPromise<boolean>;
@@ -1,66 +0,0 @@
1
- {
2
- "name": "applicationinsights-channel-js",
3
- "version": "3.3.4-nightly3.2410-01",
4
- "ext": {
5
- "@cjs.js": {
6
- "file": "applicationinsights-channel-js.3.3.4-nightly3.2410-01.cjs.js",
7
- "type": "text/javascript; charset=utf-8",
8
- "integrity": "sha256-Mad/O/Tee401jCix/+uCwgUs5XdfZ2gAFIT4kpCckfw= sha384-ghnawzMILHqD0fdNZ1CFCC84MDTIyDXUvPZRbHI1JYL2J6gjliM5MQ+IBv1T31cu sha512-Haw2fYWef3DTg5wp4+C9F3xnx3J071PZBjOkrvCuyT9Myz3DRlYwVI07K6HBD597Gm0A9EoGBMHuRawT/6m+uQ==",
9
- "hashes": {
10
- "sha256": "Mad/O/Tee401jCix/+uCwgUs5XdfZ2gAFIT4kpCckfw=",
11
- "sha384": "ghnawzMILHqD0fdNZ1CFCC84MDTIyDXUvPZRbHI1JYL2J6gjliM5MQ+IBv1T31cu",
12
- "sha512": "Haw2fYWef3DTg5wp4+C9F3xnx3J071PZBjOkrvCuyT9Myz3DRlYwVI07K6HBD597Gm0A9EoGBMHuRawT/6m+uQ=="
13
- }
14
- },
15
- "@cjs.min.js": {
16
- "file": "applicationinsights-channel-js.3.3.4-nightly3.2410-01.cjs.min.js",
17
- "type": "text/javascript; charset=utf-8",
18
- "integrity": "sha256-qMWLAoWQ5/6nnpb33gL0held0/MNU9N0t0BVV9gq9iQ= sha384-+ikr+0pstGcHqqatRCZVmppPTTqOolaTgce8bxEbjAqCjR94T6Ah3qtDvJ2VWJpv sha512-+vqWBxJe2eTT8hA/LBWDdf5607wCjZs4s+ep8Pj5/3N5Y8oAQca5VKMscsTSfnnDDkWKFBCoOwPwc+kCHjtKYw==",
19
- "hashes": {
20
- "sha256": "qMWLAoWQ5/6nnpb33gL0held0/MNU9N0t0BVV9gq9iQ=",
21
- "sha384": "+ikr+0pstGcHqqatRCZVmppPTTqOolaTgce8bxEbjAqCjR94T6Ah3qtDvJ2VWJpv",
22
- "sha512": "+vqWBxJe2eTT8hA/LBWDdf5607wCjZs4s+ep8Pj5/3N5Y8oAQca5VKMscsTSfnnDDkWKFBCoOwPwc+kCHjtKYw=="
23
- }
24
- },
25
- "@gbl.js": {
26
- "file": "applicationinsights-channel-js.3.3.4-nightly3.2410-01.gbl.js",
27
- "type": "text/javascript; charset=utf-8",
28
- "integrity": "sha256-RQAAfCDCm+ajUfXgf+InyxKx4IYLtGZfzzn+bAsBthc= sha384-pW7hX/FQpS5BOWRbtoA8uwQNee7eldJYwK1OfAHub9+hutniPx8hcSDVufpbQB+h sha512-7yIJOsvHMAN9KtW75IztRMtrs9+xO5zZQ08KqgE5Zz9Yt6K31t2l3/ndWPFcBiGlg/YdzSUbY6N4QYItZxmxew==",
29
- "hashes": {
30
- "sha256": "RQAAfCDCm+ajUfXgf+InyxKx4IYLtGZfzzn+bAsBthc=",
31
- "sha384": "pW7hX/FQpS5BOWRbtoA8uwQNee7eldJYwK1OfAHub9+hutniPx8hcSDVufpbQB+h",
32
- "sha512": "7yIJOsvHMAN9KtW75IztRMtrs9+xO5zZQ08KqgE5Zz9Yt6K31t2l3/ndWPFcBiGlg/YdzSUbY6N4QYItZxmxew=="
33
- }
34
- },
35
- "@gbl.min.js": {
36
- "file": "applicationinsights-channel-js.3.3.4-nightly3.2410-01.gbl.min.js",
37
- "type": "text/javascript; charset=utf-8",
38
- "integrity": "sha256-UjLdv4QRyVecSbv5YVlrXN+ZN7seoQQ2sBUlLHsPuKg= sha384-zcP1ZDPQfDngIOQhn8GTcgnHecMnNud11CxZ3qpjcw09v386kCyZcqqUj8lzq6pt sha512-x7lBqlrWizeB/kWXC2kpMUdvIOoQ2GX2xGLBmBkFN+54K96H1hmqmz0sPb4V87LfVVjCXkTdfdGJCkiGhpAXfg==",
39
- "hashes": {
40
- "sha256": "UjLdv4QRyVecSbv5YVlrXN+ZN7seoQQ2sBUlLHsPuKg=",
41
- "sha384": "zcP1ZDPQfDngIOQhn8GTcgnHecMnNud11CxZ3qpjcw09v386kCyZcqqUj8lzq6pt",
42
- "sha512": "x7lBqlrWizeB/kWXC2kpMUdvIOoQ2GX2xGLBmBkFN+54K96H1hmqmz0sPb4V87LfVVjCXkTdfdGJCkiGhpAXfg=="
43
- }
44
- },
45
- "@js": {
46
- "file": "applicationinsights-channel-js.3.3.4-nightly3.2410-01.js",
47
- "type": "text/javascript; charset=utf-8",
48
- "integrity": "sha256-69jgvUpEzDZ3rXw2F1VxNC7DS/Uk/5LTYSoh574XtS0= sha384-t4AtJqyPUuXCvVR2c3uNToP+BXA+rTT+tCRTY0LC6PK11bYvJgcFsLxK+NoKbYGu sha512-Uj0An08Els5T7R6Wv9H1ixMrnEIlQXLe7Xct2n/YsjM0s7ZuCZUHUGbYICisOE9L2Db8H4bLqmbY7dEj8hU+lQ==",
49
- "hashes": {
50
- "sha256": "69jgvUpEzDZ3rXw2F1VxNC7DS/Uk/5LTYSoh574XtS0=",
51
- "sha384": "t4AtJqyPUuXCvVR2c3uNToP+BXA+rTT+tCRTY0LC6PK11bYvJgcFsLxK+NoKbYGu",
52
- "sha512": "Uj0An08Els5T7R6Wv9H1ixMrnEIlQXLe7Xct2n/YsjM0s7ZuCZUHUGbYICisOE9L2Db8H4bLqmbY7dEj8hU+lQ=="
53
- }
54
- },
55
- "@min.js": {
56
- "file": "applicationinsights-channel-js.3.3.4-nightly3.2410-01.min.js",
57
- "type": "text/javascript; charset=utf-8",
58
- "integrity": "sha256-VnnUhi+QdA81E/+rF5E1F6IOZ/kM8KbZ0Kl3lTavQoY= sha384-4HagIHog09JEy291OETGwJMPLRaCWFg9tFVItR7oZPzII06BgtZ6T6zQyjoSSY22 sha512-p+4nG4Tk2vzdcRxhFZGVXBjYD2vjKZUZGH0F0arbiFJR/YQzHJJbPaC7zM7sqLjRMRoci1e1ylp/xsdLK+QnDA==",
59
- "hashes": {
60
- "sha256": "VnnUhi+QdA81E/+rF5E1F6IOZ/kM8KbZ0Kl3lTavQoY=",
61
- "sha384": "4HagIHog09JEy291OETGwJMPLRaCWFg9tFVItR7oZPzII06BgtZ6T6zQyjoSSY22",
62
- "sha512": "p+4nG4Tk2vzdcRxhFZGVXBjYD2vjKZUZGH0F0arbiFJR/YQzHJJbPaC7zM7sqLjRMRoci1e1ylp/xsdLK+QnDA=="
63
- }
64
- }
65
- }
66
- }