@microsoft/1ds-core-js 3.2.2 → 3.2.5
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.
- package/CODE_OF_CONDUCT.md +9 -0
- package/CONTRIBUTING.md +14 -0
- package/LICENSE.TXT +3 -3
- package/NOTICE +17 -0
- package/PRIVACY +3 -0
- package/README.md +15 -1
- package/SECURITY.md +41 -0
- package/SUPPORT.md +14 -0
- package/bundle/{ms.core-3.2.2.gbl.js → ms.core-3.2.5.gbl.js} +1728 -1431
- package/bundle/ms.core-3.2.5.gbl.js.map +1 -0
- package/bundle/ms.core-3.2.5.gbl.min.js +7 -0
- package/bundle/ms.core-3.2.5.gbl.min.js.map +1 -0
- package/bundle/ms.core-3.2.5.integrity.json +46 -0
- package/bundle/{ms.core-3.2.2.js → ms.core-3.2.5.js} +1728 -1431
- package/bundle/ms.core-3.2.5.js.map +1 -0
- package/bundle/ms.core-3.2.5.min.js +7 -0
- package/bundle/ms.core-3.2.5.min.js.map +1 -0
- package/bundle/ms.core.gbl.js +1727 -1430
- package/bundle/ms.core.gbl.js.map +1 -1
- package/bundle/ms.core.gbl.min.js +2 -2
- package/bundle/ms.core.gbl.min.js.map +1 -1
- package/bundle/ms.core.integrity.json +17 -17
- package/bundle/ms.core.js +1727 -1430
- package/bundle/ms.core.js.map +1 -1
- package/bundle/ms.core.min.js +2 -2
- package/bundle/ms.core.min.js.map +1 -1
- package/dist/ms.core.js +44 -35
- package/dist/ms.core.js.map +1 -1
- package/dist/ms.core.min.js +2 -2
- package/dist/ms.core.min.js.map +1 -1
- package/dist-esm/src/AppInsightsCore.d.ts +2 -7
- package/dist-esm/src/AppInsightsCore.js +27 -29
- package/dist-esm/src/AppInsightsCore.js.map +1 -1
- package/dist-esm/src/BaseCore.d.ts +2 -2
- package/dist-esm/src/BaseCore.js +18 -12
- package/dist-esm/src/BaseCore.js.map +1 -1
- package/dist-esm/src/DataModels.d.ts +5 -0
- package/dist-esm/src/DataModels.js +1 -1
- package/dist-esm/src/ESPromise.d.ts +5 -5
- package/dist-esm/src/ESPromise.js +15 -15
- package/dist-esm/src/ESPromise.js.map +1 -1
- package/dist-esm/src/ESPromiseScheduler.d.ts +4 -4
- package/dist-esm/src/ESPromiseScheduler.js +8 -8
- package/dist-esm/src/ESPromiseScheduler.js.map +1 -1
- package/dist-esm/src/Enums.d.ts +6 -5
- package/dist-esm/src/Enums.js +61 -61
- package/dist-esm/src/Enums.js.map +1 -1
- package/dist-esm/src/Index.d.ts +1 -2
- package/dist-esm/src/Index.js +3 -3
- package/dist-esm/src/Index.js.map +1 -1
- package/dist-esm/src/InternalConstants.d.ts +6 -0
- package/dist-esm/src/InternalConstants.js +19 -0
- package/dist-esm/src/InternalConstants.js.map +1 -0
- package/dist-esm/src/Utils.d.ts +9 -3
- package/dist-esm/src/Utils.js +40 -39
- package/dist-esm/src/Utils.js.map +1 -1
- package/dist-esm/src/ValueSanitizer.d.ts +1 -1
- package/dist-esm/src/ValueSanitizer.js +19 -18
- package/dist-esm/src/ValueSanitizer.js.map +1 -1
- package/package.json +4 -3
- package/src/AppInsightsCore.ts +29 -31
- package/src/BaseCore.ts +14 -11
- package/src/DataModels.ts +6 -0
- package/src/ESPromise.ts +6 -6
- package/src/ESPromiseScheduler.ts +8 -8
- package/src/Enums.ts +5 -5
- package/src/Index.ts +3 -3
- package/src/InternalConstants.ts +16 -0
- package/src/Utils.ts +24 -24
- package/src/ValueSanitizer.ts +5 -4
- package/bundle/ms.core-3.2.2.gbl.js.map +0 -1
- package/bundle/ms.core-3.2.2.gbl.min.js +0 -7
- package/bundle/ms.core-3.2.2.gbl.min.js.map +0 -1
- package/bundle/ms.core-3.2.2.integrity.json +0 -46
- package/bundle/ms.core-3.2.2.js.map +0 -1
- package/bundle/ms.core-3.2.2.min.js +0 -7
- package/bundle/ms.core-3.2.2.min.js.map +0 -1
package/dist-esm/src/Enums.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
* Enums.ts
|
|
3
|
+
* @author Abhilash Panwar (abpanwar)
|
|
4
|
+
* @copyright Microsoft 2018
|
|
5
|
+
* File containing the enums as constants.
|
|
6
|
+
*/
|
|
7
7
|
import { _eInternalMessageId } from "@microsoft/applicationinsights-core-js";
|
|
8
8
|
/**
|
|
9
9
|
* The eValueKind contains a set of values that specify value kind of the property.
|
|
@@ -313,6 +313,7 @@ export declare const _ExtendedInternalMessageId: {
|
|
|
313
313
|
TrackPageActionEventFailed: _eInternalMessageId.TrackPageActionEventFailed;
|
|
314
314
|
FailedAddingCustomDefinedRequestContext: _eInternalMessageId.FailedAddingCustomDefinedRequestContext;
|
|
315
315
|
InMemoryStorageBufferFull: _eInternalMessageId.InMemoryStorageBufferFull;
|
|
316
|
+
InstrumentationKeyDeprecation: _eInternalMessageId.InstrumentationKeyDeprecation;
|
|
316
317
|
};
|
|
317
318
|
export declare type _ExtendedInternalMessageId = number | _eExtendedInternalMessageId | _eInternalMessageId;
|
|
318
319
|
export declare const enum GuidStyle {
|
package/dist-esm/src/Enums.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* 1DS JS SDK Core, 3.2.
|
|
2
|
+
* 1DS JS SDK Core, 3.2.5
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
* (Microsoft Internal Only)
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
* Enums.ts
|
|
8
|
+
* @author Abhilash Panwar (abpanwar)
|
|
9
|
+
* @copyright Microsoft 2018
|
|
10
|
+
* File containing the enums as constants.
|
|
11
|
+
*/
|
|
12
12
|
import { __assignFn as __assign } from "@microsoft/applicationinsights-shims";
|
|
13
13
|
import { _InternalMessageId, createEnumStyle, objFreeze } from "@microsoft/applicationinsights-core-js";
|
|
14
14
|
/**
|
|
@@ -16,21 +16,21 @@ import { _InternalMessageId, createEnumStyle, objFreeze } from "@microsoft/appli
|
|
|
16
16
|
* Either PII (Personal Identifiable Information) or customer content.
|
|
17
17
|
*/
|
|
18
18
|
export var ValueKind = createEnumStyle({
|
|
19
|
-
NotSet: 0 /* NotSet */,
|
|
20
|
-
Pii_DistinguishedName: 1 /* Pii_DistinguishedName */,
|
|
21
|
-
Pii_GenericData: 2 /* Pii_GenericData */,
|
|
22
|
-
Pii_IPV4Address: 3 /* Pii_IPV4Address */,
|
|
23
|
-
Pii_IPv6Address: 4 /* Pii_IPv6Address */,
|
|
24
|
-
Pii_MailSubject: 5 /* Pii_MailSubject */,
|
|
25
|
-
Pii_PhoneNumber: 6 /* Pii_PhoneNumber */,
|
|
26
|
-
Pii_QueryString: 7 /* Pii_QueryString */,
|
|
27
|
-
Pii_SipAddress: 8 /* Pii_SipAddress */,
|
|
28
|
-
Pii_SmtpAddress: 9 /* Pii_SmtpAddress */,
|
|
29
|
-
Pii_Identity: 10 /* Pii_Identity */,
|
|
30
|
-
Pii_Uri: 11 /* Pii_Uri */,
|
|
31
|
-
Pii_Fqdn: 12 /* Pii_Fqdn */,
|
|
32
|
-
Pii_IPV4AddressLegacy: 13 /* Pii_IPV4AddressLegacy */,
|
|
33
|
-
CustomerContent_GenericContent: 32 /* CustomerContent_GenericContent */
|
|
19
|
+
NotSet: 0 /* eValueKind.NotSet */,
|
|
20
|
+
Pii_DistinguishedName: 1 /* eValueKind.Pii_DistinguishedName */,
|
|
21
|
+
Pii_GenericData: 2 /* eValueKind.Pii_GenericData */,
|
|
22
|
+
Pii_IPV4Address: 3 /* eValueKind.Pii_IPV4Address */,
|
|
23
|
+
Pii_IPv6Address: 4 /* eValueKind.Pii_IPv6Address */,
|
|
24
|
+
Pii_MailSubject: 5 /* eValueKind.Pii_MailSubject */,
|
|
25
|
+
Pii_PhoneNumber: 6 /* eValueKind.Pii_PhoneNumber */,
|
|
26
|
+
Pii_QueryString: 7 /* eValueKind.Pii_QueryString */,
|
|
27
|
+
Pii_SipAddress: 8 /* eValueKind.Pii_SipAddress */,
|
|
28
|
+
Pii_SmtpAddress: 9 /* eValueKind.Pii_SmtpAddress */,
|
|
29
|
+
Pii_Identity: 10 /* eValueKind.Pii_Identity */,
|
|
30
|
+
Pii_Uri: 11 /* eValueKind.Pii_Uri */,
|
|
31
|
+
Pii_Fqdn: 12 /* eValueKind.Pii_Fqdn */,
|
|
32
|
+
Pii_IPV4AddressLegacy: 13 /* eValueKind.Pii_IPV4AddressLegacy */,
|
|
33
|
+
CustomerContent_GenericContent: 32 /* eValueKind.CustomerContent_GenericContent */
|
|
34
34
|
});
|
|
35
35
|
/**
|
|
36
36
|
* The EventLatency contains a set of values that specify the latency with which an event is sent.
|
|
@@ -39,35 +39,35 @@ export var EventLatency = createEnumStyle({
|
|
|
39
39
|
/**
|
|
40
40
|
* Normal latency.
|
|
41
41
|
*/
|
|
42
|
-
Normal: 1 /* Normal */,
|
|
42
|
+
Normal: 1 /* EventLatencyValue.Normal */,
|
|
43
43
|
/**
|
|
44
44
|
* Cost deferred latency. At the moment this latency is treated as Normal latency.
|
|
45
45
|
*/
|
|
46
|
-
CostDeferred: 2 /* CostDeferred */,
|
|
46
|
+
CostDeferred: 2 /* EventLatencyValue.CostDeferred */,
|
|
47
47
|
/**
|
|
48
48
|
* Real time latency.
|
|
49
49
|
*/
|
|
50
|
-
RealTime: 3 /* RealTime */,
|
|
50
|
+
RealTime: 3 /* EventLatencyValue.RealTime */,
|
|
51
51
|
/**
|
|
52
52
|
* Bypass normal batching/timing and send as soon as possible, this will still send asynchronously.
|
|
53
53
|
* Added in v3.1.1
|
|
54
54
|
*/
|
|
55
|
-
Immediate: 4 /* Immediate */
|
|
55
|
+
Immediate: 4 /* EventLatencyValue.Immediate */
|
|
56
56
|
});
|
|
57
57
|
/**
|
|
58
58
|
* Enum for property types.
|
|
59
59
|
*/
|
|
60
60
|
export var EventPropertyType = createEnumStyle({
|
|
61
|
-
Unspecified: 0 /* Unspecified */,
|
|
62
|
-
String: 1 /* String */,
|
|
63
|
-
Int32: 2 /* Int32 */,
|
|
64
|
-
UInt32: 3 /* UInt32 */,
|
|
65
|
-
Int64: 4 /* Int64 */,
|
|
66
|
-
UInt64: 5 /* UInt64 */,
|
|
67
|
-
Double: 6 /* Double */,
|
|
68
|
-
Bool: 7 /* Bool */,
|
|
69
|
-
Guid: 8 /* Guid */,
|
|
70
|
-
DateTime: 9 /* DateTime */
|
|
61
|
+
Unspecified: 0 /* eEventPropertyType.Unspecified */,
|
|
62
|
+
String: 1 /* eEventPropertyType.String */,
|
|
63
|
+
Int32: 2 /* eEventPropertyType.Int32 */,
|
|
64
|
+
UInt32: 3 /* eEventPropertyType.UInt32 */,
|
|
65
|
+
Int64: 4 /* eEventPropertyType.Int64 */,
|
|
66
|
+
UInt64: 5 /* eEventPropertyType.UInt64 */,
|
|
67
|
+
Double: 6 /* eEventPropertyType.Double */,
|
|
68
|
+
Bool: 7 /* eEventPropertyType.Bool */,
|
|
69
|
+
Guid: 8 /* eEventPropertyType.Guid */,
|
|
70
|
+
DateTime: 9 /* eEventPropertyType.DateTime */
|
|
71
71
|
});
|
|
72
72
|
/**
|
|
73
73
|
* The EventPersistence contains a set of values that specify the event's persistence.
|
|
@@ -76,38 +76,38 @@ export var EventPersistence = createEnumStyle({
|
|
|
76
76
|
/**
|
|
77
77
|
* Normal persistence.
|
|
78
78
|
*/
|
|
79
|
-
Normal: 1 /* Normal */,
|
|
79
|
+
Normal: 1 /* EventPersistenceValue.Normal */,
|
|
80
80
|
/**
|
|
81
81
|
* Critical persistence.
|
|
82
82
|
*/
|
|
83
|
-
Critical: 2 /* Critical */
|
|
83
|
+
Critical: 2 /* EventPersistenceValue.Critical */
|
|
84
84
|
});
|
|
85
85
|
export var TraceLevel = createEnumStyle({
|
|
86
|
-
NONE: 0 /* NONE */,
|
|
87
|
-
ERROR: 1 /* ERROR */,
|
|
88
|
-
WARNING: 2 /* WARNING */,
|
|
89
|
-
INFORMATION: 3 /* INFORMATION */
|
|
86
|
+
NONE: 0 /* eTraceLevel.NONE */,
|
|
87
|
+
ERROR: 1 /* eTraceLevel.ERROR */,
|
|
88
|
+
WARNING: 2 /* eTraceLevel.WARNING */,
|
|
89
|
+
INFORMATION: 3 /* eTraceLevel.INFORMATION */
|
|
90
90
|
});
|
|
91
91
|
export var _ExtendedInternalMessageId = objFreeze(__assign(__assign({}, _InternalMessageId), createEnumStyle({
|
|
92
|
-
AuthHandShakeError: 501 /* AuthHandShakeError */,
|
|
93
|
-
AuthRedirectFail: 502 /* AuthRedirectFail */,
|
|
94
|
-
BrowserCannotReadLocalStorage: 503 /* BrowserCannotReadLocalStorage */,
|
|
95
|
-
BrowserCannotWriteLocalStorage: 504 /* BrowserCannotWriteLocalStorage */,
|
|
96
|
-
BrowserDoesNotSupportLocalStorage: 505 /* BrowserDoesNotSupportLocalStorage */,
|
|
97
|
-
CannotParseBiBlobValue: 506 /* CannotParseBiBlobValue */,
|
|
98
|
-
CannotParseDataAttribute: 507 /* CannotParseDataAttribute */,
|
|
99
|
-
CVPluginNotAvailable: 508 /* CVPluginNotAvailable */,
|
|
100
|
-
DroppedEvent: 509 /* DroppedEvent */,
|
|
101
|
-
ErrorParsingAISessionCookie: 510 /* ErrorParsingAISessionCookie */,
|
|
102
|
-
ErrorProvidedChannels: 511 /* ErrorProvidedChannels */,
|
|
103
|
-
FailedToGetCookies: 512 /* FailedToGetCookies */,
|
|
104
|
-
FailedToInitializeCorrelationVector: 513 /* FailedToInitializeCorrelationVector */,
|
|
105
|
-
FailedToInitializeSDK: 514 /* FailedToInitializeSDK */,
|
|
106
|
-
InvalidContentBlob: 515 /* InvalidContentBlob */,
|
|
107
|
-
InvalidCorrelationValue: 516 /* InvalidCorrelationValue */,
|
|
108
|
-
SessionRenewalDateIsZero: 517 /* SessionRenewalDateIsZero */,
|
|
109
|
-
SendPostOnCompleteFailure: 518 /* SendPostOnCompleteFailure */,
|
|
110
|
-
PostResponseHandler: 519 /* PostResponseHandler */,
|
|
111
|
-
SDKNotInitialized: 520 /* SDKNotInitialized */
|
|
92
|
+
AuthHandShakeError: 501 /* _eExtendedInternalMessageId.AuthHandShakeError */,
|
|
93
|
+
AuthRedirectFail: 502 /* _eExtendedInternalMessageId.AuthRedirectFail */,
|
|
94
|
+
BrowserCannotReadLocalStorage: 503 /* _eExtendedInternalMessageId.BrowserCannotReadLocalStorage */,
|
|
95
|
+
BrowserCannotWriteLocalStorage: 504 /* _eExtendedInternalMessageId.BrowserCannotWriteLocalStorage */,
|
|
96
|
+
BrowserDoesNotSupportLocalStorage: 505 /* _eExtendedInternalMessageId.BrowserDoesNotSupportLocalStorage */,
|
|
97
|
+
CannotParseBiBlobValue: 506 /* _eExtendedInternalMessageId.CannotParseBiBlobValue */,
|
|
98
|
+
CannotParseDataAttribute: 507 /* _eExtendedInternalMessageId.CannotParseDataAttribute */,
|
|
99
|
+
CVPluginNotAvailable: 508 /* _eExtendedInternalMessageId.CVPluginNotAvailable */,
|
|
100
|
+
DroppedEvent: 509 /* _eExtendedInternalMessageId.DroppedEvent */,
|
|
101
|
+
ErrorParsingAISessionCookie: 510 /* _eExtendedInternalMessageId.ErrorParsingAISessionCookie */,
|
|
102
|
+
ErrorProvidedChannels: 511 /* _eExtendedInternalMessageId.ErrorProvidedChannels */,
|
|
103
|
+
FailedToGetCookies: 512 /* _eExtendedInternalMessageId.FailedToGetCookies */,
|
|
104
|
+
FailedToInitializeCorrelationVector: 513 /* _eExtendedInternalMessageId.FailedToInitializeCorrelationVector */,
|
|
105
|
+
FailedToInitializeSDK: 514 /* _eExtendedInternalMessageId.FailedToInitializeSDK */,
|
|
106
|
+
InvalidContentBlob: 515 /* _eExtendedInternalMessageId.InvalidContentBlob */,
|
|
107
|
+
InvalidCorrelationValue: 516 /* _eExtendedInternalMessageId.InvalidCorrelationValue */,
|
|
108
|
+
SessionRenewalDateIsZero: 517 /* _eExtendedInternalMessageId.SessionRenewalDateIsZero */,
|
|
109
|
+
SendPostOnCompleteFailure: 518 /* _eExtendedInternalMessageId.SendPostOnCompleteFailure */,
|
|
110
|
+
PostResponseHandler: 519 /* _eExtendedInternalMessageId.PostResponseHandler */,
|
|
111
|
+
SDKNotInitialized: 520 /* _eExtendedInternalMessageId.SDKNotInitialized */
|
|
112
112
|
})));
|
|
113
113
|
//# sourceMappingURL=Enums.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Enums.js.map","sources":["Enums.js"],"sourcesContent":["/**\r\n
|
|
1
|
+
{"version":3,"file":"Enums.js.map","sources":["Enums.js"],"sourcesContent":["/**\r\n* Enums.ts\r\n* @author Abhilash Panwar (abpanwar)\r\n* @copyright Microsoft 2018\r\n* File containing the enums as constants.\r\n*/\r\nimport { __assign } from \"tslib\";\r\nimport { _InternalMessageId, createEnumStyle, objFreeze } from \"@microsoft/applicationinsights-core-js\";\r\n/**\r\n * The ValueKind contains a set of values that specify value kind of the property.\r\n * Either PII (Personal Identifiable Information) or customer content.\r\n */\r\nexport var ValueKind = createEnumStyle({\r\n NotSet: 0 /* eValueKind.NotSet */,\r\n Pii_DistinguishedName: 1 /* eValueKind.Pii_DistinguishedName */,\r\n Pii_GenericData: 2 /* eValueKind.Pii_GenericData */,\r\n Pii_IPV4Address: 3 /* eValueKind.Pii_IPV4Address */,\r\n Pii_IPv6Address: 4 /* eValueKind.Pii_IPv6Address */,\r\n Pii_MailSubject: 5 /* eValueKind.Pii_MailSubject */,\r\n Pii_PhoneNumber: 6 /* eValueKind.Pii_PhoneNumber */,\r\n Pii_QueryString: 7 /* eValueKind.Pii_QueryString */,\r\n Pii_SipAddress: 8 /* eValueKind.Pii_SipAddress */,\r\n Pii_SmtpAddress: 9 /* eValueKind.Pii_SmtpAddress */,\r\n Pii_Identity: 10 /* eValueKind.Pii_Identity */,\r\n Pii_Uri: 11 /* eValueKind.Pii_Uri */,\r\n Pii_Fqdn: 12 /* eValueKind.Pii_Fqdn */,\r\n Pii_IPV4AddressLegacy: 13 /* eValueKind.Pii_IPV4AddressLegacy */,\r\n CustomerContent_GenericContent: 32 /* eValueKind.CustomerContent_GenericContent */\r\n});\r\n/**\r\n * The EventLatency contains a set of values that specify the latency with which an event is sent.\r\n */\r\nexport var EventLatency = createEnumStyle({\r\n /**\r\n * Normal latency.\r\n */\r\n Normal: 1 /* EventLatencyValue.Normal */,\r\n /**\r\n * Cost deferred latency. At the moment this latency is treated as Normal latency.\r\n */\r\n CostDeferred: 2 /* EventLatencyValue.CostDeferred */,\r\n /**\r\n * Real time latency.\r\n */\r\n RealTime: 3 /* EventLatencyValue.RealTime */,\r\n /**\r\n * Bypass normal batching/timing and send as soon as possible, this will still send asynchronously.\r\n * Added in v3.1.1\r\n */\r\n Immediate: 4 /* EventLatencyValue.Immediate */\r\n});\r\n/**\r\n * Enum for property types.\r\n */\r\nexport var EventPropertyType = createEnumStyle({\r\n Unspecified: 0 /* eEventPropertyType.Unspecified */,\r\n String: 1 /* eEventPropertyType.String */,\r\n Int32: 2 /* eEventPropertyType.Int32 */,\r\n UInt32: 3 /* eEventPropertyType.UInt32 */,\r\n Int64: 4 /* eEventPropertyType.Int64 */,\r\n UInt64: 5 /* eEventPropertyType.UInt64 */,\r\n Double: 6 /* eEventPropertyType.Double */,\r\n Bool: 7 /* eEventPropertyType.Bool */,\r\n Guid: 8 /* eEventPropertyType.Guid */,\r\n DateTime: 9 /* eEventPropertyType.DateTime */\r\n});\r\n/**\r\n * The EventPersistence contains a set of values that specify the event's persistence.\r\n */\r\nexport var EventPersistence = createEnumStyle({\r\n /**\r\n * Normal persistence.\r\n */\r\n Normal: 1 /* EventPersistenceValue.Normal */,\r\n /**\r\n * Critical persistence.\r\n */\r\n Critical: 2 /* EventPersistenceValue.Critical */\r\n});\r\nexport var TraceLevel = createEnumStyle({\r\n NONE: 0 /* eTraceLevel.NONE */,\r\n ERROR: 1 /* eTraceLevel.ERROR */,\r\n WARNING: 2 /* eTraceLevel.WARNING */,\r\n INFORMATION: 3 /* eTraceLevel.INFORMATION */\r\n});\r\nexport var _ExtendedInternalMessageId = objFreeze(__assign(__assign({}, _InternalMessageId), createEnumStyle({\r\n AuthHandShakeError: 501 /* _eExtendedInternalMessageId.AuthHandShakeError */,\r\n AuthRedirectFail: 502 /* _eExtendedInternalMessageId.AuthRedirectFail */,\r\n BrowserCannotReadLocalStorage: 503 /* _eExtendedInternalMessageId.BrowserCannotReadLocalStorage */,\r\n BrowserCannotWriteLocalStorage: 504 /* _eExtendedInternalMessageId.BrowserCannotWriteLocalStorage */,\r\n BrowserDoesNotSupportLocalStorage: 505 /* _eExtendedInternalMessageId.BrowserDoesNotSupportLocalStorage */,\r\n CannotParseBiBlobValue: 506 /* _eExtendedInternalMessageId.CannotParseBiBlobValue */,\r\n CannotParseDataAttribute: 507 /* _eExtendedInternalMessageId.CannotParseDataAttribute */,\r\n CVPluginNotAvailable: 508 /* _eExtendedInternalMessageId.CVPluginNotAvailable */,\r\n DroppedEvent: 509 /* _eExtendedInternalMessageId.DroppedEvent */,\r\n ErrorParsingAISessionCookie: 510 /* _eExtendedInternalMessageId.ErrorParsingAISessionCookie */,\r\n ErrorProvidedChannels: 511 /* _eExtendedInternalMessageId.ErrorProvidedChannels */,\r\n FailedToGetCookies: 512 /* _eExtendedInternalMessageId.FailedToGetCookies */,\r\n FailedToInitializeCorrelationVector: 513 /* _eExtendedInternalMessageId.FailedToInitializeCorrelationVector */,\r\n FailedToInitializeSDK: 514 /* _eExtendedInternalMessageId.FailedToInitializeSDK */,\r\n InvalidContentBlob: 515 /* _eExtendedInternalMessageId.InvalidContentBlob */,\r\n InvalidCorrelationValue: 516 /* _eExtendedInternalMessageId.InvalidCorrelationValue */,\r\n SessionRenewalDateIsZero: 517 /* _eExtendedInternalMessageId.SessionRenewalDateIsZero */,\r\n SendPostOnCompleteFailure: 518 /* _eExtendedInternalMessageId.SendPostOnCompleteFailure */,\r\n PostResponseHandler: 519 /* _eExtendedInternalMessageId.PostResponseHandler */,\r\n SDKNotInitialized: 520 /* _eExtendedInternalMessageId.SDKNotInitialized */\r\n})));\r\n//# sourceMappingURL=Enums.js.map"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,8EAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
package/dist-esm/src/Index.d.ts
CHANGED
|
@@ -12,8 +12,7 @@ import ESPromise, { ESPromiseOnResolvedFunc, ESPromiseOnRejectedFunc, ResolverRe
|
|
|
12
12
|
import ESPromiseScheduler, { ESPromiseSchedulerEvent } from "./ESPromiseScheduler";
|
|
13
13
|
import { ValueSanitizer } from "./ValueSanitizer";
|
|
14
14
|
export { ValueKind, IExtendedConfiguration, IPropertyStorageOverride, EventLatency, EventPersistence, TraceLevel, IEventProperty, IExtendedTelemetryItem, TransportType, AppInsightsCore, BaseCore, _ExtendedInternalMessageId, _eExtendedInternalMessageId, IExtendedAppInsightsCore, EventPropertyType, IEventTiming, ESPromise, ESPromiseOnResolvedFunc, ESPromiseOnRejectedFunc, ResolverResolveFunc, ResolverRejectFunc, ESPromiseScheduler, ESPromiseSchedulerEvent, GuidStyle, FieldValueSanitizerFunc, FieldValueSanitizerType, FieldValueSanitizerTypes, IFieldSanitizerDetails, IFieldValueSanitizerProvider, IValueSanitizer, ValueSanitizer, EventLatencyValue, EventPersistenceValue, EventSendType };
|
|
15
|
-
export { IAppInsightsCore, IChannelControls, IPlugin, INotificationManager, NotificationManager, INotificationListener, IConfiguration, ITelemetryItem, ITelemetryPlugin, BaseTelemetryPlugin, IProcessTelemetryContext, ProcessTelemetryContext, ITelemetryPluginChain, MinChannelPriorty, EventsDiscardedReason, ICoreUtils, IDiagnosticLogger, DiagnosticLogger, LoggingSeverity, SendRequestReason, IPerfEvent, IPerfManager, IPerfManagerProvider, PerfEvent, PerfManager, doPerf, ICustomProperties, Tags, EventHelper, AppInsightsCore as InternalAppInsightsCore, BaseCore as InternalBaseCore, _InternalLogMessage, _InternalMessageId, createEnumStyle, eLoggingSeverity, _eInternalMessageId, _throwInternal,
|
|
16
|
-
isTypeof, isUndefined, isNullOrUndefined, hasOwnProperty, isObject, isFunction, attachEvent, detachEvent, normalizeJsName, objForEachKey, strStartsWith, strEndsWith, strContains, strTrim, isDate, isArray, isError, isString, isNumber, isBoolean, toISOString, arrForEach, arrIndexOf, arrMap, arrReduce, objKeys, objDefineAccessors, dateNow, getExceptionName, throwError, setValue, getSetValue, isNotTruthy, isTruthy, proxyAssign, proxyFunctions, proxyFunctionAs, optimizeObject, objCreate, addEventHandler, newGuid, perfNow, newId, generateW3CId, safeGetLogger, objFreeze, objSeal, getGlobal, getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, getCrypto, getMsCrypto, hasNavigator, getNavigator, hasHistory, getHistory, getLocation, getPerformance, hasJSON, getJSON, isReactNative, getConsole, dumpObj, isIE, getIEVersion, strUndefined, strObject, strPrototype, strFunction, setEnableEnvMocks, strUndefined as Undefined, randomValue, random32, ICookieMgr, ICookieMgrConfig, uaDisallowsSameSiteNone as disallowsSameSiteNone, areCookiesSupported, areCookiesSupported as cookieAvailable, createCookieMgr, safeGetCookieMgr, toISOString as getISOString, isBeaconsSupported, isFetchSupported, isXhrSupported, useXDomainRequest, addPageHideEventListener, addPageShowEventListener, addEventListeners, addPageUnloadEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, createUniqueNamespace, _IRegisteredEvents, __getRegisteredEvents, TelemetryInitializerFunction, ITelemetryInitializerHandler, ITelemetryInitializerContainer, createProcessTelemetryContext, IProcessTelemetryUnloadContext, UnloadHandler, IUnloadHandlerContainer, ITelemetryUnloadState, createUnloadHandlerContainer, TelemetryUnloadReason, ITelemetryUpdateState, IUnloadableComponent } from "@microsoft/applicationinsights-core-js";
|
|
15
|
+
export { IAppInsightsCore, IChannelControls, IPlugin, INotificationManager, NotificationManager, INotificationListener, IConfiguration, ITelemetryItem, ITelemetryPlugin, BaseTelemetryPlugin, IProcessTelemetryContext, ProcessTelemetryContext, ITelemetryPluginChain, MinChannelPriorty, EventsDiscardedReason, ICoreUtils, IDiagnosticLogger, DiagnosticLogger, LoggingSeverity, SendRequestReason, IPerfEvent, IPerfManager, IPerfManagerProvider, PerfEvent, PerfManager, doPerf, ICustomProperties, Tags, EventHelper, AppInsightsCore as InternalAppInsightsCore, BaseCore as InternalBaseCore, _InternalLogMessage, _InternalMessageId, createEnumStyle, eLoggingSeverity, _eInternalMessageId, _throwInternal, _warnToConsole, _logInternalMessage, isTypeof, isUndefined, isNullOrUndefined, hasOwnProperty, isObject, isFunction, attachEvent, detachEvent, normalizeJsName, objForEachKey, strStartsWith, strEndsWith, strContains, strTrim, isDate, isArray, isError, isString, isNumber, isBoolean, toISOString, arrForEach, arrIndexOf, arrMap, arrReduce, objKeys, objDefineAccessors, dateNow, getExceptionName, throwError, setValue, getSetValue, isNotTruthy, isTruthy, proxyAssign, proxyFunctions, proxyFunctionAs, optimizeObject, objCreate, addEventHandler, newGuid, perfNow, newId, generateW3CId, safeGetLogger, objFreeze, objSeal, getGlobal, getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, getCrypto, getMsCrypto, hasNavigator, getNavigator, hasHistory, getHistory, getLocation, getPerformance, hasJSON, getJSON, isReactNative, getConsole, dumpObj, isIE, getIEVersion, strUndefined, strObject, strPrototype, strFunction, setEnableEnvMocks, strUndefined as Undefined, randomValue, random32, ICookieMgr, ICookieMgrConfig, uaDisallowsSameSiteNone as disallowsSameSiteNone, areCookiesSupported, areCookiesSupported as cookieAvailable, createCookieMgr, safeGetCookieMgr, toISOString as getISOString, isBeaconsSupported, isFetchSupported, isXhrSupported, useXDomainRequest, addPageHideEventListener, addPageShowEventListener, addEventListeners, addPageUnloadEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, createUniqueNamespace, _IRegisteredEvents, __getRegisteredEvents, TelemetryInitializerFunction, ITelemetryInitializerHandler, ITelemetryInitializerContainer, createProcessTelemetryContext, IProcessTelemetryUnloadContext, UnloadHandler, IUnloadHandlerContainer, ITelemetryUnloadState, createUnloadHandlerContainer, TelemetryUnloadReason, ITelemetryUpdateState, IUnloadableComponent, IDistributedTraceContext, createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent } from "@microsoft/applicationinsights-core-js";
|
|
17
16
|
export { isValueAssigned, isLatency, isUint8ArrayAvailable, getTenantId, sanitizeProperty, Version, FullVersionString, getCommonSchemaMetaData, getCookie, setCookie, deleteCookie, getCookieValue, extend, createGuid, isDocumentObjectAvailable, isWindowObjectAvailable, setProcessTelemetryTimings, getTime, isArrayValid, isValueKind, getFieldValueType, CoreUtils, disableCookies, // exporting the overridden version for tree-shaking
|
|
18
17
|
Utils, // Replacement for import * as Utils from "./Utils";
|
|
19
18
|
isChromium, // Replace with ai-core version once published in ai-core
|
package/dist-esm/src/Index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* 1DS JS SDK Core, 3.2.
|
|
2
|
+
* 1DS JS SDK Core, 3.2.5
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
* (Microsoft Internal Only)
|
|
5
5
|
*/
|
|
@@ -16,7 +16,7 @@ import ESPromise from "./ESPromise";
|
|
|
16
16
|
import ESPromiseScheduler from "./ESPromiseScheduler";
|
|
17
17
|
import { ValueSanitizer } from "./ValueSanitizer";
|
|
18
18
|
export { ValueKind, EventLatency, EventPersistence, TraceLevel, AppInsightsCore, BaseCore, _ExtendedInternalMessageId, EventPropertyType, ESPromise, ESPromiseScheduler, ValueSanitizer };
|
|
19
|
-
export { NotificationManager, BaseTelemetryPlugin, ProcessTelemetryContext, MinChannelPriorty, EventsDiscardedReason, DiagnosticLogger, LoggingSeverity, PerfEvent, PerfManager, doPerf, EventHelper, AppInsightsCore as InternalAppInsightsCore, BaseCore as InternalBaseCore, _InternalLogMessage, _InternalMessageId, createEnumStyle, _throwInternal,
|
|
19
|
+
export { NotificationManager, BaseTelemetryPlugin, ProcessTelemetryContext, MinChannelPriorty, EventsDiscardedReason, DiagnosticLogger, LoggingSeverity, PerfEvent, PerfManager, doPerf, EventHelper, AppInsightsCore as InternalAppInsightsCore, BaseCore as InternalBaseCore, _InternalLogMessage, _InternalMessageId, createEnumStyle, _throwInternal, _warnToConsole, _logInternalMessage,
|
|
20
20
|
// The HelperFuncs functions
|
|
21
21
|
isTypeof, isUndefined, isNullOrUndefined, hasOwnProperty, isObject, isFunction, attachEvent, detachEvent, normalizeJsName, objForEachKey, strStartsWith, strEndsWith, strContains, strTrim, isDate, isArray, isError, isString, isNumber, isBoolean, toISOString, arrForEach, arrIndexOf, arrMap, arrReduce, objKeys, objDefineAccessors, dateNow, getExceptionName, throwError, setValue, getSetValue, isNotTruthy, isTruthy, proxyAssign, proxyFunctions, proxyFunctionAs, optimizeObject, objCreate, addEventHandler, newGuid, perfNow, newId, generateW3CId, safeGetLogger, objFreeze, objSeal,
|
|
22
22
|
// EnvUtils
|
|
@@ -24,7 +24,7 @@ getGlobal, getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, getCry
|
|
|
24
24
|
// Random
|
|
25
25
|
randomValue, random32, uaDisallowsSameSiteNone as disallowsSameSiteNone, areCookiesSupported, areCookiesSupported as cookieAvailable, createCookieMgr, safeGetCookieMgr,
|
|
26
26
|
// Aliases
|
|
27
|
-
toISOString as getISOString, isBeaconsSupported, isFetchSupported, isXhrSupported, useXDomainRequest, addPageHideEventListener, addPageShowEventListener, addEventListeners, addPageUnloadEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, createUniqueNamespace, __getRegisteredEvents, createProcessTelemetryContext, createUnloadHandlerContainer } from "@microsoft/applicationinsights-core-js";
|
|
27
|
+
toISOString as getISOString, isBeaconsSupported, isFetchSupported, isXhrSupported, useXDomainRequest, addPageHideEventListener, addPageShowEventListener, addEventListeners, addPageUnloadEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, createUniqueNamespace, __getRegisteredEvents, createProcessTelemetryContext, createUnloadHandlerContainer, createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent } from "@microsoft/applicationinsights-core-js";
|
|
28
28
|
export { isValueAssigned, isLatency, isUint8ArrayAvailable, getTenantId, sanitizeProperty, Version, FullVersionString, getCommonSchemaMetaData, getCookie, setCookie, deleteCookie, getCookieValue, extend, createGuid, isDocumentObjectAvailable, isWindowObjectAvailable, setProcessTelemetryTimings, getTime, isArrayValid, isValueKind, getFieldValueType, CoreUtils, disableCookies, // exporting the overridden version for tree-shaking
|
|
29
29
|
Utils, // Replacement for import * as Utils from "./Utils";
|
|
30
30
|
isChromium, // Replace with ai-core version once published in ai-core
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Index.js.map","sources":["Index.js"],"sourcesContent":["/**\r\n * Index.ts\r\n * @author Abhilash Panwar (abpanwar)\r\n * @copyright Microsoft 2018\r\n * File to export public classes, interfaces and enums.\r\n */\r\nimport { ValueKind, EventLatency, EventPersistence, TraceLevel, EventPropertyType, _ExtendedInternalMessageId } from \"./Enums\";\r\nimport AppInsightsCore from \"./AppInsightsCore\";\r\nimport BaseCore from \"./BaseCore\";\r\nimport ESPromise from \"./ESPromise\";\r\nimport ESPromiseScheduler from \"./ESPromiseScheduler\";\r\nimport { ValueSanitizer } from \"./ValueSanitizer\";\r\nexport { ValueKind, EventLatency, EventPersistence, TraceLevel, AppInsightsCore, BaseCore, _ExtendedInternalMessageId, EventPropertyType, ESPromise, ESPromiseScheduler, ValueSanitizer };\r\nexport { NotificationManager, BaseTelemetryPlugin, ProcessTelemetryContext, MinChannelPriorty, EventsDiscardedReason, DiagnosticLogger, LoggingSeverity, PerfEvent, PerfManager, doPerf, EventHelper, AppInsightsCore as InternalAppInsightsCore, BaseCore as InternalBaseCore, _InternalLogMessage, _InternalMessageId, createEnumStyle, _throwInternal,
|
|
1
|
+
{"version":3,"file":"Index.js.map","sources":["Index.js"],"sourcesContent":["/**\r\n * Index.ts\r\n * @author Abhilash Panwar (abpanwar)\r\n * @copyright Microsoft 2018\r\n * File to export public classes, interfaces and enums.\r\n */\r\nimport { ValueKind, EventLatency, EventPersistence, TraceLevel, EventPropertyType, _ExtendedInternalMessageId } from \"./Enums\";\r\nimport AppInsightsCore from \"./AppInsightsCore\";\r\nimport BaseCore from \"./BaseCore\";\r\nimport ESPromise from \"./ESPromise\";\r\nimport ESPromiseScheduler from \"./ESPromiseScheduler\";\r\nimport { ValueSanitizer } from \"./ValueSanitizer\";\r\nexport { ValueKind, EventLatency, EventPersistence, TraceLevel, AppInsightsCore, BaseCore, _ExtendedInternalMessageId, EventPropertyType, ESPromise, ESPromiseScheduler, ValueSanitizer };\r\nexport { NotificationManager, BaseTelemetryPlugin, ProcessTelemetryContext, MinChannelPriorty, EventsDiscardedReason, DiagnosticLogger, LoggingSeverity, PerfEvent, PerfManager, doPerf, EventHelper, AppInsightsCore as InternalAppInsightsCore, BaseCore as InternalBaseCore, _InternalLogMessage, _InternalMessageId, createEnumStyle, _throwInternal, _warnToConsole, _logInternalMessage, \r\n// The HelperFuncs functions\r\nisTypeof, isUndefined, isNullOrUndefined, hasOwnProperty, isObject, isFunction, attachEvent, detachEvent, normalizeJsName, objForEachKey, strStartsWith, strEndsWith, strContains, strTrim, isDate, isArray, isError, isString, isNumber, isBoolean, toISOString, arrForEach, arrIndexOf, arrMap, arrReduce, objKeys, objDefineAccessors, dateNow, getExceptionName, throwError, setValue, getSetValue, isNotTruthy, isTruthy, proxyAssign, proxyFunctions, proxyFunctionAs, optimizeObject, objCreate, addEventHandler, newGuid, perfNow, newId, generateW3CId, safeGetLogger, objFreeze, objSeal, \r\n// EnvUtils\r\ngetGlobal, getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, getCrypto, getMsCrypto, hasNavigator, getNavigator, hasHistory, getHistory, getLocation, getPerformance, hasJSON, getJSON, isReactNative, getConsole, dumpObj, isIE, getIEVersion, strUndefined, strObject, strPrototype, strFunction, setEnableEnvMocks, strUndefined as Undefined, \r\n// Random\r\nrandomValue, random32, uaDisallowsSameSiteNone as disallowsSameSiteNone, areCookiesSupported, areCookiesSupported as cookieAvailable, createCookieMgr, safeGetCookieMgr, \r\n// Aliases\r\ntoISOString as getISOString, isBeaconsSupported, isFetchSupported, isXhrSupported, useXDomainRequest, addPageHideEventListener, addPageShowEventListener, addEventListeners, addPageUnloadEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, createUniqueNamespace, __getRegisteredEvents, createProcessTelemetryContext, createUnloadHandlerContainer, createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent } from \"@microsoft/applicationinsights-core-js\";\r\nexport { isValueAssigned, isLatency, isUint8ArrayAvailable, getTenantId, sanitizeProperty, Version, FullVersionString, getCommonSchemaMetaData, getCookie, setCookie, deleteCookie, getCookieValue, extend, createGuid, isDocumentObjectAvailable, isWindowObjectAvailable, setProcessTelemetryTimings, getTime, isArrayValid, isValueKind, getFieldValueType, CoreUtils, disableCookies, // exporting the overridden version for tree-shaking\r\nUtils, // Replacement for import * as Utils from \"./Utils\";\r\nisChromium, // Replace with ai-core version once published in ai-core\r\nopenXhr } from \"./Utils\";\r\n//# sourceMappingURL=Index.js.map"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const STR_EMPTY = "";
|
|
2
|
+
export declare const STR_DEFAULT_ENDPOINT_URL = "https://browser.events.data.microsoft.com/OneCollector/1.0/";
|
|
3
|
+
export declare const STR_PLUGIN_VERSION_STRING = "pluginVersionString";
|
|
4
|
+
export declare const STR_PLUGIN_VERSION_STRING_ARR: "pluginVersionStringArr";
|
|
5
|
+
export declare const STR_VERSION = "version";
|
|
6
|
+
export declare const STR_PROPERTIES = "properties";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* 1DS JS SDK Core, 3.2.5
|
|
3
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
|
+
* (Microsoft Internal Only)
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Licensed under the MIT License.
|
|
8
|
+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
9
|
+
// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!
|
|
10
|
+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
11
|
+
// Generally you should only put values that are used more than 2 times and then only if not already exposed as a constant (such as SdkCoreNames)
|
|
12
|
+
// as when using "short" named values from here they will be will be minified smaller than the SdkCoreNames[eSdkCoreNames.xxxx] value.
|
|
13
|
+
export var STR_EMPTY = "";
|
|
14
|
+
export var STR_DEFAULT_ENDPOINT_URL = "https://browser.events.data.microsoft.com/OneCollector/1.0/";
|
|
15
|
+
export var STR_PLUGIN_VERSION_STRING = "pluginVersionString";
|
|
16
|
+
export var STR_PLUGIN_VERSION_STRING_ARR = STR_PLUGIN_VERSION_STRING + "Arr";
|
|
17
|
+
export var STR_VERSION = "version";
|
|
18
|
+
export var STR_PROPERTIES = "properties";
|
|
19
|
+
//# sourceMappingURL=InternalConstants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InternalConstants.js.map","sources":["InternalConstants.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n// Generally you should only put values that are used more than 2 times and then only if not already exposed as a constant (such as SdkCoreNames)\r\n// as when using \"short\" named values from here they will be will be minified smaller than the SdkCoreNames[eSdkCoreNames.xxxx] value.\r\nexport var STR_EMPTY = \"\";\r\nexport var STR_DEFAULT_ENDPOINT_URL = \"https://browser.events.data.microsoft.com/OneCollector/1.0/\";\r\nexport var STR_PLUGIN_VERSION_STRING = \"pluginVersionString\";\r\nexport var STR_PLUGIN_VERSION_STRING_ARR = STR_PLUGIN_VERSION_STRING + \"Arr\";\r\nexport var STR_VERSION = \"version\";\r\nexport var STR_PROPERTIES = \"properties\";\r\n//# sourceMappingURL=InternalConstants.js.map"],"names":[],"mappings":";;;;;AAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
package/dist-esm/src/Utils.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utils.ts
|
|
3
|
+
* @author Abhilash Panwar (abpanwar) Hector Hernandez (hectorh)
|
|
4
|
+
* @copyright Microsoft 2018
|
|
5
|
+
* File containing utility functions.
|
|
6
|
+
*/
|
|
7
|
+
import { ICookieMgr, ICoreUtils, ITelemetryItem, addEventHandler, addPageUnloadEventListener, areCookiesSupported, arrForEach, arrIndexOf, arrMap, arrReduce, isBeaconsSupported, isBoolean, isFunction, isNumber, isObject, isReactNative, isString, objDefineAccessors, objForEachKey, objKeys, perfNow, strEndsWith, strTrim, toISOString, uaDisallowsSameSiteNone, useXDomainRequest } from "@microsoft/applicationinsights-core-js";
|
|
1
8
|
import { IEventProperty } from "./DataModels";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare const Version = "3.2.2";
|
|
9
|
+
import { EventLatency, FieldValueSanitizerType, GuidStyle } from "./Enums";
|
|
10
|
+
export declare const Version = "3.2.5";
|
|
5
11
|
export declare const FullVersionString: string;
|
|
6
12
|
/**
|
|
7
13
|
* Checks if document object is available
|
package/dist-esm/src/Utils.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* 1DS JS SDK Core, 3.2.
|
|
2
|
+
* 1DS JS SDK Core, 3.2.5
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
* (Microsoft Internal Only)
|
|
5
5
|
*/
|
|
6
6
|
var _a;
|
|
7
7
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
8
|
+
* Utils.ts
|
|
9
|
+
* @author Abhilash Panwar (abpanwar) Hector Hernandez (hectorh)
|
|
10
|
+
* @copyright Microsoft 2018
|
|
11
|
+
* File containing utility functions.
|
|
12
|
+
*/
|
|
13
|
+
import { addEventHandler, addPageUnloadEventListener, areCookiesSupported, arrForEach, arrIndexOf, arrMap, arrReduce, dateNow, generateW3CId, getDocument, getGlobalInst, getNavigator, getWindow, hasOwnProperty, isArray, isBeaconsSupported, isBoolean, isDate, isError, isFunction, isIE, isNullOrUndefined, isNumber, isObject, isReactNative, isString, isTypeof, isUndefined, mwcRandom32, mwcRandomSeed, newGuid, newId, objDefineAccessors, objForEachKey, objKeys, perfNow, random32, randomValue, safeGetCookieMgr, strEndsWith, strObject, strTrim, strUndefined, toISOString, uaDisallowsSameSiteNone, useXDomainRequest } from "@microsoft/applicationinsights-core-js";
|
|
14
|
+
import { ObjHasOwnProperty, objCreateFn, strShimObject, strShimPrototype } from "@microsoft/applicationinsights-shims";
|
|
15
|
+
import { STR_EMPTY } from "./InternalConstants";
|
|
16
|
+
export var Version = '3.2.5';
|
|
16
17
|
export var FullVersionString = "1DS-Web-JS-" + Version;
|
|
17
18
|
// Defining here so we don't need to take (import) the ApplicationInsights Common module
|
|
18
19
|
var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
|
|
@@ -20,13 +21,13 @@ var strWithCredentials = "withCredentials";
|
|
|
20
21
|
var strTimeout = "timeout";
|
|
21
22
|
// If value is array just get the type for the first element
|
|
22
23
|
var _fieldTypeEventPropMap = (_a = {},
|
|
23
|
-
_a[0 /* NotSet */] = 0 /* Unspecified */,
|
|
24
|
-
_a[2 /* Number */] = 6 /* Double */,
|
|
25
|
-
_a[1 /* String */] = 1 /* String */,
|
|
26
|
-
_a[3 /* Boolean */] = 7 /* Bool */,
|
|
27
|
-
_a[4096 /* Array */ | 2 /* Number */] = 6 /* Double */,
|
|
28
|
-
_a[4096 /* Array */ | 1 /* String */] = 1 /* String */,
|
|
29
|
-
_a[4096 /* Array */ | 3 /* Boolean */] = 7 /* Bool */,
|
|
24
|
+
_a[0 /* FieldValueSanitizerType.NotSet */] = 0 /* eEventPropertyType.Unspecified */,
|
|
25
|
+
_a[2 /* FieldValueSanitizerType.Number */] = 6 /* eEventPropertyType.Double */,
|
|
26
|
+
_a[1 /* FieldValueSanitizerType.String */] = 1 /* eEventPropertyType.String */,
|
|
27
|
+
_a[3 /* FieldValueSanitizerType.Boolean */] = 7 /* eEventPropertyType.Bool */,
|
|
28
|
+
_a[4096 /* FieldValueSanitizerType.Array */ | 2 /* FieldValueSanitizerType.Number */] = 6 /* eEventPropertyType.Double */,
|
|
29
|
+
_a[4096 /* FieldValueSanitizerType.Array */ | 1 /* FieldValueSanitizerType.String */] = 1 /* eEventPropertyType.String */,
|
|
30
|
+
_a[4096 /* FieldValueSanitizerType.Array */ | 3 /* FieldValueSanitizerType.Boolean */] = 7 /* eEventPropertyType.Bool */,
|
|
30
31
|
_a);
|
|
31
32
|
/**
|
|
32
33
|
* @ignore
|
|
@@ -51,7 +52,7 @@ export function isValueAssigned(value) {
|
|
|
51
52
|
/// <summary> takes a value and checks for undefined, null and empty string </summary>
|
|
52
53
|
/// <param type="any"> value to be tested </param>
|
|
53
54
|
/// <returns> true if value is null undefined or emptyString </returns>
|
|
54
|
-
return !(value ===
|
|
55
|
+
return !(value === STR_EMPTY || isNullOrUndefined(value));
|
|
55
56
|
}
|
|
56
57
|
/**
|
|
57
58
|
* Gets the tenant id from the tenant token.
|
|
@@ -65,7 +66,7 @@ export function getTenantId(apiKey) {
|
|
|
65
66
|
return apiKey.substring(0, indexTenantId);
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
|
-
return
|
|
69
|
+
return STR_EMPTY;
|
|
69
70
|
}
|
|
70
71
|
/**
|
|
71
72
|
* Checks if Uint8Array are available in the current environment. Safari and Firefox along with
|
|
@@ -84,7 +85,7 @@ export function isUint8ArrayAvailable() {
|
|
|
84
85
|
* @returns True if the value is in AWTEventLatency, false otherwise.
|
|
85
86
|
*/
|
|
86
87
|
export function isLatency(value) {
|
|
87
|
-
if (value && isNumber(value) && value >= 1 /* Normal */ && value <= 4 /* Immediate */) {
|
|
88
|
+
if (value && isNumber(value) && value >= 1 /* EventLatencyValue.Normal */ && value <= 4 /* EventLatencyValue.Immediate */) {
|
|
88
89
|
return true;
|
|
89
90
|
}
|
|
90
91
|
return false;
|
|
@@ -108,11 +109,11 @@ export function sanitizeProperty(name, property, stringifyObjects) {
|
|
|
108
109
|
if (propType === "string" || propType === "number" || propType === "boolean" || isArray(property)) {
|
|
109
110
|
property = { value: property };
|
|
110
111
|
}
|
|
111
|
-
else if (propType === "object" && !
|
|
112
|
+
else if (propType === "object" && !ObjHasOwnProperty.call(property, "value")) {
|
|
112
113
|
property = { value: stringifyObjects ? JSON.stringify(property) : property };
|
|
113
114
|
}
|
|
114
115
|
else if (isNullOrUndefined(property.value)
|
|
115
|
-
|| property.value ===
|
|
116
|
+
|| property.value === STR_EMPTY || (!isString(property.value)
|
|
116
117
|
&& !isNumber(property.value) && !isBoolean(property.value)
|
|
117
118
|
&& !isArray(property.value))) {
|
|
118
119
|
// Since property is IEventProperty, we need to validate its value
|
|
@@ -162,7 +163,7 @@ export function getCommonSchemaMetaData(value, kind, type) {
|
|
|
162
163
|
// pii exists so we must return correct type
|
|
163
164
|
encodedTypeValue |= propType;
|
|
164
165
|
}
|
|
165
|
-
else if (propType === 6 /* Double */) {
|
|
166
|
+
else if (propType === 6 /* eEventPropertyType.Double */) {
|
|
166
167
|
encodedTypeValue = propType;
|
|
167
168
|
}
|
|
168
169
|
}
|
|
@@ -209,7 +210,7 @@ export function getCookie(name) {
|
|
|
209
210
|
if (areCookiesSupported(null)) {
|
|
210
211
|
return getCookieValue(safeGetCookieMgr(null), name);
|
|
211
212
|
}
|
|
212
|
-
return
|
|
213
|
+
return STR_EMPTY;
|
|
213
214
|
}
|
|
214
215
|
/**
|
|
215
216
|
* Helper to get and decode the cookie value using decodeURIComponent, this is for historical
|
|
@@ -228,7 +229,7 @@ export function getCookieValue(cookieMgr, name, decode) {
|
|
|
228
229
|
cookieValue = decodeURIComponent(cookieValue);
|
|
229
230
|
}
|
|
230
231
|
}
|
|
231
|
-
return cookieValue ||
|
|
232
|
+
return cookieValue || STR_EMPTY;
|
|
232
233
|
}
|
|
233
234
|
/**
|
|
234
235
|
* Create a new guid.
|
|
@@ -240,16 +241,16 @@ export function getCookieValue(cookieMgr, name, decode) {
|
|
|
240
241
|
* @returns The formatted guid.
|
|
241
242
|
*/
|
|
242
243
|
export function createGuid(style) {
|
|
243
|
-
if (style === void 0) { style = "D" /* Digits */; }
|
|
244
|
+
if (style === void 0) { style = "D" /* GuidStyle.Digits */; }
|
|
244
245
|
var theGuid = newGuid();
|
|
245
|
-
if (style === "B" /* Braces */) {
|
|
246
|
+
if (style === "B" /* GuidStyle.Braces */) {
|
|
246
247
|
theGuid = "{" + theGuid + "}";
|
|
247
248
|
}
|
|
248
|
-
else if (style === "P" /* Parentheses */) {
|
|
249
|
+
else if (style === "P" /* GuidStyle.Parentheses */) {
|
|
249
250
|
theGuid = "(" + theGuid + ")";
|
|
250
251
|
}
|
|
251
|
-
else if (style === "N" /* Numeric */) {
|
|
252
|
-
theGuid = theGuid.replace(/-/g,
|
|
252
|
+
else if (style === "N" /* GuidStyle.Numeric */) {
|
|
253
|
+
theGuid = theGuid.replace(/-/g, STR_EMPTY);
|
|
253
254
|
}
|
|
254
255
|
return theGuid;
|
|
255
256
|
}
|
|
@@ -268,7 +269,7 @@ export function extend(obj, obj2, obj3, obj4, obj5) {
|
|
|
268
269
|
var deep = false;
|
|
269
270
|
var i = 0;
|
|
270
271
|
var length = arguments.length;
|
|
271
|
-
var objProto = Object[
|
|
272
|
+
var objProto = Object[strShimPrototype];
|
|
272
273
|
var theArgs = arguments;
|
|
273
274
|
// Check if a deep merge
|
|
274
275
|
if (objProto.toString.call(theArgs[0]) === "[object Boolean]") {
|
|
@@ -306,7 +307,7 @@ export function extend(obj, obj2, obj3, obj4, obj5) {
|
|
|
306
307
|
export var getTime = perfNow;
|
|
307
308
|
export function isValueKind(value) {
|
|
308
309
|
// Always assume that it's a number (no type checking) for performance as this is used during the JSON serialization
|
|
309
|
-
if (value === 0 /* NotSet */ || ((value > 0 /* NotSet */ && value <= 13 /* Pii_IPV4AddressLegacy */) || value === 32 /* CustomerContent_GenericContent */)) {
|
|
310
|
+
if (value === 0 /* eValueKind.NotSet */ || ((value > 0 /* eValueKind.NotSet */ && value <= 13 /* eValueKind.Pii_IPV4AddressLegacy */) || value === 32 /* eValueKind.CustomerContent_GenericContent */)) {
|
|
310
311
|
return true;
|
|
311
312
|
}
|
|
312
313
|
return false;
|
|
@@ -344,30 +345,30 @@ export function setProcessTelemetryTimings(event, identifier) {
|
|
|
344
345
|
* @param value The value to determine the type
|
|
345
346
|
*/
|
|
346
347
|
export function getFieldValueType(value) {
|
|
347
|
-
var theType = 0 /* NotSet */;
|
|
348
|
+
var theType = 0 /* FieldValueSanitizerType.NotSet */;
|
|
348
349
|
if (value !== null && value !== undefined) {
|
|
349
350
|
var objType = typeof value;
|
|
350
351
|
if (objType === "string") {
|
|
351
|
-
theType = 1 /* String */;
|
|
352
|
+
theType = 1 /* FieldValueSanitizerType.String */;
|
|
352
353
|
}
|
|
353
354
|
else if (objType === "number") {
|
|
354
|
-
theType = 2 /* Number */;
|
|
355
|
+
theType = 2 /* FieldValueSanitizerType.Number */;
|
|
355
356
|
}
|
|
356
357
|
else if (objType === "boolean") {
|
|
357
|
-
theType = 3 /* Boolean */;
|
|
358
|
+
theType = 3 /* FieldValueSanitizerType.Boolean */;
|
|
358
359
|
}
|
|
359
360
|
else if (objType === strShimObject) {
|
|
360
|
-
theType = 4 /* Object */;
|
|
361
|
+
theType = 4 /* FieldValueSanitizerType.Object */;
|
|
361
362
|
if (isArray(value)) {
|
|
362
|
-
theType = 4096 /* Array */;
|
|
363
|
+
theType = 4096 /* FieldValueSanitizerType.Array */;
|
|
363
364
|
if (value.length > 0) {
|
|
364
365
|
// Empty arrays are not supported and are considered to be the same as null
|
|
365
366
|
theType |= getFieldValueType(value[0]);
|
|
366
367
|
}
|
|
367
368
|
}
|
|
368
|
-
else if (
|
|
369
|
+
else if (ObjHasOwnProperty.call(value, "value")) {
|
|
369
370
|
// Looks like an IEventProperty
|
|
370
|
-
theType = 8192 /* EventProperty */ | getFieldValueType(value.value);
|
|
371
|
+
theType = 8192 /* FieldValueSanitizerType.EventProperty */ | getFieldValueType(value.value);
|
|
371
372
|
}
|
|
372
373
|
}
|
|
373
374
|
}
|