@microsoft/applicationinsights-channel-js 3.3.4-nightly3.2410-02 → 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-02.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-02.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-02.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-02.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-02.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-02.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-02.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-02.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-02.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-02.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-02.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-02.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-02.integrity.json +0 -66
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript SDK - Channel, 3.3.4-nightly3.2410-02
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-02
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-02",
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-02",
57
- "@microsoft/applicationinsights-common": "3.3.4-nightly3.2410-02",
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-02
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-02
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-02",
4
- "ext": {
5
- "@cjs.js": {
6
- "file": "applicationinsights-channel-js.3.3.4-nightly3.2410-02.cjs.js",
7
- "type": "text/javascript; charset=utf-8",
8
- "integrity": "sha256-wjkj7jdyPBPSaxTZ/M3q6CaIHOFUwBQRVfCcLs4VcGM= sha384-TRXxArEXT8DM2zEQYrtotlmDofHS54ESXNaaajKKmVDFRDwTRwWmucFUYqYHT1Rf sha512-KitdV8eL6vxfw8RvonAB7d+Pa6nG7SMspbVMER5kr4lEQqBwZCnHqyssveBnihjj7lYidB3hJYNmo6BlQ/ceWQ==",
9
- "hashes": {
10
- "sha256": "wjkj7jdyPBPSaxTZ/M3q6CaIHOFUwBQRVfCcLs4VcGM=",
11
- "sha384": "TRXxArEXT8DM2zEQYrtotlmDofHS54ESXNaaajKKmVDFRDwTRwWmucFUYqYHT1Rf",
12
- "sha512": "KitdV8eL6vxfw8RvonAB7d+Pa6nG7SMspbVMER5kr4lEQqBwZCnHqyssveBnihjj7lYidB3hJYNmo6BlQ/ceWQ=="
13
- }
14
- },
15
- "@cjs.min.js": {
16
- "file": "applicationinsights-channel-js.3.3.4-nightly3.2410-02.cjs.min.js",
17
- "type": "text/javascript; charset=utf-8",
18
- "integrity": "sha256-Dfbpr1aPpS78ijCoxdVc+tluQcv0Rrr4cm2mNQPOjP8= sha384-swC02D4ij5T2vGVH6da7b9Bi6bF1QDq5IOjKnrjKEeuq6gBEG3Wup9LPUfsXcq9j sha512-Q/P007fjJyiAfoggzSvkzwUZlYXDtZBrl5NR6AiPmpbP5qJ2kLzGG8hAohBC8Rn/BZfnZj691Kh8Czy3dxEhuw==",
19
- "hashes": {
20
- "sha256": "Dfbpr1aPpS78ijCoxdVc+tluQcv0Rrr4cm2mNQPOjP8=",
21
- "sha384": "swC02D4ij5T2vGVH6da7b9Bi6bF1QDq5IOjKnrjKEeuq6gBEG3Wup9LPUfsXcq9j",
22
- "sha512": "Q/P007fjJyiAfoggzSvkzwUZlYXDtZBrl5NR6AiPmpbP5qJ2kLzGG8hAohBC8Rn/BZfnZj691Kh8Czy3dxEhuw=="
23
- }
24
- },
25
- "@gbl.js": {
26
- "file": "applicationinsights-channel-js.3.3.4-nightly3.2410-02.gbl.js",
27
- "type": "text/javascript; charset=utf-8",
28
- "integrity": "sha256-KEDfx2hZx7fxJsKcSXDi4OX3Lna/1WbQm6AlIB7A9+I= sha384-WozST5Ucl9hVGZV5gOONnT/KR+jRoPf9pNkY0Mpq7TntybvH8bPEAQ/AtWVXoSez sha512-i6OdphCVlyaWvRDUsIDfG5ouaKN3oqO3u7R8yV4LQONB4PPWVFO1t2B2mSEC6bkglFvsvqonYauwRvkM67lkAw==",
29
- "hashes": {
30
- "sha256": "KEDfx2hZx7fxJsKcSXDi4OX3Lna/1WbQm6AlIB7A9+I=",
31
- "sha384": "WozST5Ucl9hVGZV5gOONnT/KR+jRoPf9pNkY0Mpq7TntybvH8bPEAQ/AtWVXoSez",
32
- "sha512": "i6OdphCVlyaWvRDUsIDfG5ouaKN3oqO3u7R8yV4LQONB4PPWVFO1t2B2mSEC6bkglFvsvqonYauwRvkM67lkAw=="
33
- }
34
- },
35
- "@gbl.min.js": {
36
- "file": "applicationinsights-channel-js.3.3.4-nightly3.2410-02.gbl.min.js",
37
- "type": "text/javascript; charset=utf-8",
38
- "integrity": "sha256-ZPMfu6H5cHlkZcJ7uTIjXpERxQzGwtZZa8Ry9iRQ0pw= sha384-n5KquGI/CJS0ZUluzS7cHXidKgNUFl6lgG//XhwV2fXBYliIcV66zMJl9KtL5F3B sha512-QeOt2+fePeNKKFGMHcEuIz96Ny/QFu2YG+97u1KrgKt8SNhbEII2yxR99RgfUCGrarhUb1Ido6bSSSl34N9Lzg==",
39
- "hashes": {
40
- "sha256": "ZPMfu6H5cHlkZcJ7uTIjXpERxQzGwtZZa8Ry9iRQ0pw=",
41
- "sha384": "n5KquGI/CJS0ZUluzS7cHXidKgNUFl6lgG//XhwV2fXBYliIcV66zMJl9KtL5F3B",
42
- "sha512": "QeOt2+fePeNKKFGMHcEuIz96Ny/QFu2YG+97u1KrgKt8SNhbEII2yxR99RgfUCGrarhUb1Ido6bSSSl34N9Lzg=="
43
- }
44
- },
45
- "@js": {
46
- "file": "applicationinsights-channel-js.3.3.4-nightly3.2410-02.js",
47
- "type": "text/javascript; charset=utf-8",
48
- "integrity": "sha256-VR8vz05qqY2hHsSNkSdvHJAH+MnDCikevZuZqWLJu5Y= sha384-5RH8ekxZ8gjrGXWg2oITlP8Bx9cr6W7Oxo9VR1eA3novIwjr3Txymm+G5sofmaOh sha512-RPaFS0YKqMehSi3fK5bCayTRK/FfH6/GWMovuu5Z+Vl1XuEIrsyL6evtZJI7afvbQF8ovLVPXozc1+elqrkv5Q==",
49
- "hashes": {
50
- "sha256": "VR8vz05qqY2hHsSNkSdvHJAH+MnDCikevZuZqWLJu5Y=",
51
- "sha384": "5RH8ekxZ8gjrGXWg2oITlP8Bx9cr6W7Oxo9VR1eA3novIwjr3Txymm+G5sofmaOh",
52
- "sha512": "RPaFS0YKqMehSi3fK5bCayTRK/FfH6/GWMovuu5Z+Vl1XuEIrsyL6evtZJI7afvbQF8ovLVPXozc1+elqrkv5Q=="
53
- }
54
- },
55
- "@min.js": {
56
- "file": "applicationinsights-channel-js.3.3.4-nightly3.2410-02.min.js",
57
- "type": "text/javascript; charset=utf-8",
58
- "integrity": "sha256-nvl7DdzBjx0wiDXJ86+0Dk5WZG30YvaZu6oqqpoaKvk= sha384-HX3/MWIbzvmiI/Wz88ElLDhjw5TVLhDFFJkF9CxgcRU3SKSTfzeaDqBEzEzP3NN7 sha512-bv2/9FVquMjLPbffzR+abwU3oCd4wNswoGFjZq7rssJbRqkZcaFPDgHVKe7G71yvV8EQT+oBn9MTUH9K9nBHDQ==",
59
- "hashes": {
60
- "sha256": "nvl7DdzBjx0wiDXJ86+0Dk5WZG30YvaZu6oqqpoaKvk=",
61
- "sha384": "HX3/MWIbzvmiI/Wz88ElLDhjw5TVLhDFFJkF9CxgcRU3SKSTfzeaDqBEzEzP3NN7",
62
- "sha512": "bv2/9FVquMjLPbffzR+abwU3oCd4wNswoGFjZq7rssJbRqkZcaFPDgHVKe7G71yvV8EQT+oBn9MTUH9K9nBHDQ=="
63
- }
64
- }
65
- }
66
- }