@microsoft/applicationinsights-properties-js 3.0.0-beta.2210-18 → 3.0.0-beta.2210-21
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/browser/applicationinsights-properties-js.integrity.json +9 -9
- package/browser/applicationinsights-properties-js.js +86 -86
- package/browser/applicationinsights-properties-js.js.map +1 -1
- package/browser/applicationinsights-properties-js.min.js +2 -2
- package/browser/applicationinsights-properties-js.min.js.map +1 -1
- package/dist/applicationinsights-properties-js.d.ts +1 -1
- package/dist/applicationinsights-properties-js.js +86 -86
- package/dist/applicationinsights-properties-js.js.map +1 -1
- package/dist/applicationinsights-properties-js.min.js +2 -2
- package/dist/applicationinsights-properties-js.min.js.map +1 -1
- package/dist/applicationinsights-properties-js.rollup.d.ts +1 -1
- package/dist-esm/Context/Application.js +1 -1
- package/dist-esm/Context/Device.js +1 -1
- package/dist-esm/Context/Internal.js +1 -1
- package/dist-esm/Context/Location.js +1 -1
- package/dist-esm/Context/Session.js +1 -1
- package/dist-esm/Context/TelemetryTrace.js +1 -1
- package/dist-esm/Context/User.js +1 -1
- package/dist-esm/Interfaces/IPropTelemetryContext.js +1 -1
- package/dist-esm/Interfaces/IPropertiesConfig.js +1 -1
- package/dist-esm/PropertiesPlugin.js +1 -1
- package/dist-esm/TelemetryContext.js +1 -1
- package/dist-esm/__DynamicConstants.js +1 -1
- package/dist-esm/applicationinsights-properties-js.js +1 -1
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Properties Plugin, 3.0.0-beta.2210-
|
|
2
|
+
* Application Insights JavaScript SDK - Properties Plugin, 3.0.0-beta.2210-21
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -1214,7 +1214,7 @@
|
|
|
1214
1214
|
}
|
|
1215
1215
|
|
|
1216
1216
|
var _objDefineProperty = ObjDefineProperty;
|
|
1217
|
-
var version = "3.0.0-beta.2210-
|
|
1217
|
+
var version = "3.0.0-beta.2210-21";
|
|
1218
1218
|
var instanceName = "." + newId(6);
|
|
1219
1219
|
var _dataUid = 0;
|
|
1220
1220
|
function _createAccessor(target, prop, value) {
|
|
@@ -2868,9 +2868,9 @@
|
|
|
2868
2868
|
var _DYN_TO_STRING = "toString";
|
|
2869
2869
|
var _DYN_REMOVE_ITEM = "removeItem";
|
|
2870
2870
|
var _DYN_NAME = "name";
|
|
2871
|
+
var _DYN_STRINGIFY = "stringify";
|
|
2871
2872
|
var _DYN_PROPERTIES = "properties";
|
|
2872
2873
|
var _DYN_MEASUREMENTS = "measurements";
|
|
2873
|
-
var _DYN_STRINGIFY = "stringify";
|
|
2874
2874
|
var _DYN_DURATION = "duration";
|
|
2875
2875
|
var _DYN_SUBSTRING = "substring";
|
|
2876
2876
|
|
|
@@ -3003,6 +3003,89 @@
|
|
|
3003
3003
|
};
|
|
3004
3004
|
}
|
|
3005
3005
|
|
|
3006
|
+
var StorageType = createEnumStyle({
|
|
3007
|
+
LocalStorage: 0 ,
|
|
3008
|
+
SessionStorage: 1
|
|
3009
|
+
});
|
|
3010
|
+
createEnumStyle({
|
|
3011
|
+
AI: 0 ,
|
|
3012
|
+
AI_AND_W3C: 1 ,
|
|
3013
|
+
W3C: 2
|
|
3014
|
+
});
|
|
3015
|
+
|
|
3016
|
+
var _canUseLocalStorage = undefined;
|
|
3017
|
+
function _getLocalStorageObject() {
|
|
3018
|
+
if (utlCanUseLocalStorage()) {
|
|
3019
|
+
return _getVerifiedStorageObject(StorageType.LocalStorage);
|
|
3020
|
+
}
|
|
3021
|
+
return null;
|
|
3022
|
+
}
|
|
3023
|
+
function _getVerifiedStorageObject(storageType) {
|
|
3024
|
+
try {
|
|
3025
|
+
if (isNullOrUndefined(getGlobal$1())) {
|
|
3026
|
+
return null;
|
|
3027
|
+
}
|
|
3028
|
+
var uid = (new Date)[_DYN_TO_STRING ]();
|
|
3029
|
+
var storage = getInst(storageType === StorageType.LocalStorage ? "localStorage" : "sessionStorage");
|
|
3030
|
+
storage.setItem(uid, uid);
|
|
3031
|
+
var fail = storage.getItem(uid) !== uid;
|
|
3032
|
+
storage[_DYN_REMOVE_ITEM ](uid);
|
|
3033
|
+
if (!fail) {
|
|
3034
|
+
return storage;
|
|
3035
|
+
}
|
|
3036
|
+
}
|
|
3037
|
+
catch (exception) {
|
|
3038
|
+
}
|
|
3039
|
+
return null;
|
|
3040
|
+
}
|
|
3041
|
+
function utlCanUseLocalStorage(reset) {
|
|
3042
|
+
if (reset || _canUseLocalStorage === undefined) {
|
|
3043
|
+
_canUseLocalStorage = !!_getVerifiedStorageObject(StorageType.LocalStorage);
|
|
3044
|
+
}
|
|
3045
|
+
return _canUseLocalStorage;
|
|
3046
|
+
}
|
|
3047
|
+
function utlGetLocalStorage(logger, name) {
|
|
3048
|
+
var storage = _getLocalStorageObject();
|
|
3049
|
+
if (storage !== null) {
|
|
3050
|
+
try {
|
|
3051
|
+
return storage.getItem(name);
|
|
3052
|
+
}
|
|
3053
|
+
catch (e) {
|
|
3054
|
+
_canUseLocalStorage = false;
|
|
3055
|
+
_throwInternal(logger, 2 , 1 , "Browser failed read of local storage. " + getExceptionName(e), { exception: dumpObj(e) });
|
|
3056
|
+
}
|
|
3057
|
+
}
|
|
3058
|
+
return null;
|
|
3059
|
+
}
|
|
3060
|
+
function utlSetLocalStorage(logger, name, data) {
|
|
3061
|
+
var storage = _getLocalStorageObject();
|
|
3062
|
+
if (storage !== null) {
|
|
3063
|
+
try {
|
|
3064
|
+
storage.setItem(name, data);
|
|
3065
|
+
return true;
|
|
3066
|
+
}
|
|
3067
|
+
catch (e) {
|
|
3068
|
+
_canUseLocalStorage = false;
|
|
3069
|
+
_throwInternal(logger, 2 , 3 , "Browser failed write to local storage. " + getExceptionName(e), { exception: dumpObj(e) });
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3072
|
+
return false;
|
|
3073
|
+
}
|
|
3074
|
+
function utlRemoveStorage(logger, name) {
|
|
3075
|
+
var storage = _getLocalStorageObject();
|
|
3076
|
+
if (storage !== null) {
|
|
3077
|
+
try {
|
|
3078
|
+
storage[_DYN_REMOVE_ITEM ](name);
|
|
3079
|
+
return true;
|
|
3080
|
+
}
|
|
3081
|
+
catch (e) {
|
|
3082
|
+
_canUseLocalStorage = false;
|
|
3083
|
+
_throwInternal(logger, 2 , 5 , "Browser failed removal of local storage item. " + getExceptionName(e), { exception: dumpObj(e) });
|
|
3084
|
+
}
|
|
3085
|
+
}
|
|
3086
|
+
return false;
|
|
3087
|
+
}
|
|
3088
|
+
|
|
3006
3089
|
var strEmpty = "";
|
|
3007
3090
|
function msToTimeSpan(totalms) {
|
|
3008
3091
|
if (isNaN(totalms) || totalms < 0) {
|
|
@@ -3140,89 +3223,6 @@
|
|
|
3140
3223
|
};
|
|
3141
3224
|
var CtxTagKeys = new ContextTagKeys();
|
|
3142
3225
|
|
|
3143
|
-
var StorageType = createEnumStyle({
|
|
3144
|
-
LocalStorage: 0 ,
|
|
3145
|
-
SessionStorage: 1
|
|
3146
|
-
});
|
|
3147
|
-
createEnumStyle({
|
|
3148
|
-
AI: 0 ,
|
|
3149
|
-
AI_AND_W3C: 1 ,
|
|
3150
|
-
W3C: 2
|
|
3151
|
-
});
|
|
3152
|
-
|
|
3153
|
-
var _canUseLocalStorage = undefined;
|
|
3154
|
-
function _getLocalStorageObject() {
|
|
3155
|
-
if (utlCanUseLocalStorage()) {
|
|
3156
|
-
return _getVerifiedStorageObject(StorageType.LocalStorage);
|
|
3157
|
-
}
|
|
3158
|
-
return null;
|
|
3159
|
-
}
|
|
3160
|
-
function _getVerifiedStorageObject(storageType) {
|
|
3161
|
-
try {
|
|
3162
|
-
if (isNullOrUndefined(getGlobal$1())) {
|
|
3163
|
-
return null;
|
|
3164
|
-
}
|
|
3165
|
-
var uid = (new Date)[_DYN_TO_STRING ]();
|
|
3166
|
-
var storage = getInst(storageType === StorageType.LocalStorage ? "localStorage" : "sessionStorage");
|
|
3167
|
-
storage.setItem(uid, uid);
|
|
3168
|
-
var fail = storage.getItem(uid) !== uid;
|
|
3169
|
-
storage[_DYN_REMOVE_ITEM ](uid);
|
|
3170
|
-
if (!fail) {
|
|
3171
|
-
return storage;
|
|
3172
|
-
}
|
|
3173
|
-
}
|
|
3174
|
-
catch (exception) {
|
|
3175
|
-
}
|
|
3176
|
-
return null;
|
|
3177
|
-
}
|
|
3178
|
-
function utlCanUseLocalStorage(reset) {
|
|
3179
|
-
if (reset || _canUseLocalStorage === undefined) {
|
|
3180
|
-
_canUseLocalStorage = !!_getVerifiedStorageObject(StorageType.LocalStorage);
|
|
3181
|
-
}
|
|
3182
|
-
return _canUseLocalStorage;
|
|
3183
|
-
}
|
|
3184
|
-
function utlGetLocalStorage(logger, name) {
|
|
3185
|
-
var storage = _getLocalStorageObject();
|
|
3186
|
-
if (storage !== null) {
|
|
3187
|
-
try {
|
|
3188
|
-
return storage.getItem(name);
|
|
3189
|
-
}
|
|
3190
|
-
catch (e) {
|
|
3191
|
-
_canUseLocalStorage = false;
|
|
3192
|
-
_throwInternal(logger, 2 , 1 , "Browser failed read of local storage. " + getExceptionName(e), { exception: dumpObj(e) });
|
|
3193
|
-
}
|
|
3194
|
-
}
|
|
3195
|
-
return null;
|
|
3196
|
-
}
|
|
3197
|
-
function utlSetLocalStorage(logger, name, data) {
|
|
3198
|
-
var storage = _getLocalStorageObject();
|
|
3199
|
-
if (storage !== null) {
|
|
3200
|
-
try {
|
|
3201
|
-
storage.setItem(name, data);
|
|
3202
|
-
return true;
|
|
3203
|
-
}
|
|
3204
|
-
catch (e) {
|
|
3205
|
-
_canUseLocalStorage = false;
|
|
3206
|
-
_throwInternal(logger, 2 , 3 , "Browser failed write to local storage. " + getExceptionName(e), { exception: dumpObj(e) });
|
|
3207
|
-
}
|
|
3208
|
-
}
|
|
3209
|
-
return false;
|
|
3210
|
-
}
|
|
3211
|
-
function utlRemoveStorage(logger, name) {
|
|
3212
|
-
var storage = _getLocalStorageObject();
|
|
3213
|
-
if (storage !== null) {
|
|
3214
|
-
try {
|
|
3215
|
-
storage[_DYN_REMOVE_ITEM ](name);
|
|
3216
|
-
return true;
|
|
3217
|
-
}
|
|
3218
|
-
catch (e) {
|
|
3219
|
-
_canUseLocalStorage = false;
|
|
3220
|
-
_throwInternal(logger, 2 , 5 , "Browser failed removal of local storage item. " + getExceptionName(e), { exception: dumpObj(e) });
|
|
3221
|
-
}
|
|
3222
|
-
}
|
|
3223
|
-
return false;
|
|
3224
|
-
}
|
|
3225
|
-
|
|
3226
3226
|
var PropertiesPluginIdentifier = "AppInsightsPropertiesPlugin";
|
|
3227
3227
|
var BreezeChannelIdentifier = "AppInsightsChannelPlugin";
|
|
3228
3228
|
|