@microsoft/applicationinsights-core-js 3.0.0-beta.2208-19 → 3.0.0-beta.2209-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.
- package/browser/applicationinsights-core-js.integrity.json +9 -9
- package/browser/applicationinsights-core-js.js +30 -8
- package/browser/applicationinsights-core-js.js.map +1 -1
- package/browser/applicationinsights-core-js.min.js +2 -2
- package/browser/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.api.json +57 -3
- package/dist/applicationinsights-core-js.api.md +2 -0
- package/dist/applicationinsights-core-js.d.ts +13 -1
- package/dist/applicationinsights-core-js.js +30 -8
- package/dist/applicationinsights-core-js.js.map +1 -1
- package/dist/applicationinsights-core-js.min.js +2 -2
- package/dist/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.rollup.d.ts +13 -1
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +21 -7
- package/dist-esm/JavaScriptSDK/CookieMgr.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js +2 -2
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +3 -3
- package/dist-esm/JavaScriptSDK/EnvUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js +1 -1
- package/dist-esm/JavaScriptSDK/NotificationManager.js +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDistributedTraceContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
- package/dist-esm/__DynamicConstants.js +2 -1
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-core-js.js +1 -1
- package/package.json +1 -1
- package/src/JavaScriptSDK/CookieMgr.ts +21 -3
- package/src/JavaScriptSDK.Interfaces/ICookieMgr.ts +14 -0
- package/types/JavaScriptSDK.Interfaces/ICookieMgr.d.ts +12 -0
- package/types/__DynamicConstants.d.ts +1 -0
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"metadata": {
|
|
3
3
|
"toolPackage": "@microsoft/api-extractor",
|
|
4
|
-
"toolVersion": "7.
|
|
4
|
+
"toolVersion": "7.31.1",
|
|
5
5
|
"schemaVersion": 1009,
|
|
6
6
|
"oldestForwardsCompatibleVersion": 1001,
|
|
7
7
|
"tsdocConfig": {
|
|
@@ -11334,6 +11334,33 @@
|
|
|
11334
11334
|
"name": "ICookieMgrConfig",
|
|
11335
11335
|
"preserveMemberOrder": false,
|
|
11336
11336
|
"members": [
|
|
11337
|
+
{
|
|
11338
|
+
"kind": "PropertySignature",
|
|
11339
|
+
"canonicalReference": "@microsoft/applicationinsights-core-js!ICookieMgrConfig#blockedCookies:member",
|
|
11340
|
+
"docComment": "/**\n * Specify the cookie name(s) to never be written, this will cause any cookie name to never be created or updated, they will still be read unless also included in the ignoreCookies and may still be explicitly purged or deleted. If not provided defaults to the same list provided in ignoreCookies. (Since v2.8.8)\n */\n",
|
|
11341
|
+
"excerptTokens": [
|
|
11342
|
+
{
|
|
11343
|
+
"kind": "Content",
|
|
11344
|
+
"text": "blockedCookies?: "
|
|
11345
|
+
},
|
|
11346
|
+
{
|
|
11347
|
+
"kind": "Content",
|
|
11348
|
+
"text": "string[]"
|
|
11349
|
+
},
|
|
11350
|
+
{
|
|
11351
|
+
"kind": "Content",
|
|
11352
|
+
"text": ";"
|
|
11353
|
+
}
|
|
11354
|
+
],
|
|
11355
|
+
"isReadonly": false,
|
|
11356
|
+
"isOptional": true,
|
|
11357
|
+
"releaseTag": "Public",
|
|
11358
|
+
"name": "blockedCookies",
|
|
11359
|
+
"propertyTypeTokenRange": {
|
|
11360
|
+
"startIndex": 1,
|
|
11361
|
+
"endIndex": 2
|
|
11362
|
+
}
|
|
11363
|
+
},
|
|
11337
11364
|
{
|
|
11338
11365
|
"kind": "PropertySignature",
|
|
11339
11366
|
"canonicalReference": "@microsoft/applicationinsights-core-js!ICookieMgrConfig#delCookie:member",
|
|
@@ -11442,6 +11469,33 @@
|
|
|
11442
11469
|
"endIndex": 2
|
|
11443
11470
|
}
|
|
11444
11471
|
},
|
|
11472
|
+
{
|
|
11473
|
+
"kind": "PropertySignature",
|
|
11474
|
+
"canonicalReference": "@microsoft/applicationinsights-core-js!ICookieMgrConfig#ignoreCookies:member",
|
|
11475
|
+
"docComment": "/**\n * Specify the cookie name(s) to be ignored, this will cause any matching cookie name to never be read or written. They may still be explicitly purged or deleted. You do not need to repeat the name in the `blockedCookies` configuration.(Since v2.8.8)\n */\n",
|
|
11476
|
+
"excerptTokens": [
|
|
11477
|
+
{
|
|
11478
|
+
"kind": "Content",
|
|
11479
|
+
"text": "ignoreCookies?: "
|
|
11480
|
+
},
|
|
11481
|
+
{
|
|
11482
|
+
"kind": "Content",
|
|
11483
|
+
"text": "string[]"
|
|
11484
|
+
},
|
|
11485
|
+
{
|
|
11486
|
+
"kind": "Content",
|
|
11487
|
+
"text": ";"
|
|
11488
|
+
}
|
|
11489
|
+
],
|
|
11490
|
+
"isReadonly": false,
|
|
11491
|
+
"isOptional": true,
|
|
11492
|
+
"releaseTag": "Public",
|
|
11493
|
+
"name": "ignoreCookies",
|
|
11494
|
+
"propertyTypeTokenRange": {
|
|
11495
|
+
"startIndex": 1,
|
|
11496
|
+
"endIndex": 2
|
|
11497
|
+
}
|
|
11498
|
+
},
|
|
11445
11499
|
{
|
|
11446
11500
|
"kind": "PropertySignature",
|
|
11447
11501
|
"canonicalReference": "@microsoft/applicationinsights-core-js!ICookieMgrConfig#path:member",
|
|
@@ -16528,7 +16582,7 @@
|
|
|
16528
16582
|
{
|
|
16529
16583
|
"kind": "Reference",
|
|
16530
16584
|
"text": "ITelemetryProcessor",
|
|
16531
|
-
"canonicalReference": "@microsoft/applicationinsights-core-js
|
|
16585
|
+
"canonicalReference": "@microsoft/applicationinsights-core-js!~ITelemetryProcessor:interface"
|
|
16532
16586
|
},
|
|
16533
16587
|
{
|
|
16534
16588
|
"kind": "Content",
|
|
@@ -16644,7 +16698,7 @@
|
|
|
16644
16698
|
{
|
|
16645
16699
|
"kind": "Reference",
|
|
16646
16700
|
"text": "ITelemetryProcessor",
|
|
16647
|
-
"canonicalReference": "@microsoft/applicationinsights-core-js
|
|
16701
|
+
"canonicalReference": "@microsoft/applicationinsights-core-js!~ITelemetryProcessor:interface"
|
|
16648
16702
|
},
|
|
16649
16703
|
{
|
|
16650
16704
|
"kind": "Content",
|
|
@@ -617,10 +617,12 @@ export interface ICookieMgr {
|
|
|
617
617
|
|
|
618
618
|
// @public
|
|
619
619
|
export interface ICookieMgrConfig {
|
|
620
|
+
blockedCookies?: string[];
|
|
620
621
|
delCookie?: (name: string, cookieValue: string) => void;
|
|
621
622
|
domain?: string;
|
|
622
623
|
enabled?: boolean;
|
|
623
624
|
getCookie?: (name: string) => string;
|
|
625
|
+
ignoreCookies?: string[];
|
|
624
626
|
path?: string;
|
|
625
627
|
setCookie?: (name: string, value: string) => void;
|
|
626
628
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Core Javascript SDK, 3.0.0-beta.
|
|
2
|
+
* Microsoft Application Insights Core Javascript SDK, 3.0.0-beta.2209-03
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -1191,6 +1191,18 @@ declare namespace ApplicationInsights {
|
|
|
1191
1191
|
* Specifies the path to use for the cookie, defaults to '/'
|
|
1192
1192
|
*/
|
|
1193
1193
|
path?: string;
|
|
1194
|
+
/**
|
|
1195
|
+
* Specify the cookie name(s) to be ignored, this will cause any matching cookie name to never be read or written.
|
|
1196
|
+
* They may still be explicitly purged or deleted. You do not need to repeat the name in the `blockedCookies`
|
|
1197
|
+
* configuration.(Since v2.8.8)
|
|
1198
|
+
*/
|
|
1199
|
+
ignoreCookies?: string[];
|
|
1200
|
+
/**
|
|
1201
|
+
* Specify the cookie name(s) to never be written, this will cause any cookie name to never be created or updated,
|
|
1202
|
+
* they will still be read unless also included in the ignoreCookies and may still be explicitly purged or deleted.
|
|
1203
|
+
* If not provided defaults to the same list provided in ignoreCookies. (Since v2.8.8)
|
|
1204
|
+
*/
|
|
1205
|
+
blockedCookies?: string[];
|
|
1194
1206
|
/**
|
|
1195
1207
|
* Hook function to fetch the named cookie value.
|
|
1196
1208
|
* @param name - The name of the cookie
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Core, 3.0.0-beta.
|
|
2
|
+
* Application Insights JavaScript SDK - Core, 3.0.0-beta.2209-03
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -149,14 +149,21 @@
|
|
|
149
149
|
return _hasHistory ? history : getInst(HISTORY);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
var objGetOwnPropertyDescriptor = ObjClass$1.getOwnPropertyDescriptor;
|
|
153
|
+
|
|
152
154
|
function objHasOwnProperty(obj, prop) {
|
|
153
155
|
return obj && ObjProto$1[HAS_OWN_PROPERTY].call(obj, prop);
|
|
154
156
|
}
|
|
155
157
|
|
|
158
|
+
var objHasOwn = ObjClass$1["hasOwn"] || polyObjHasOwn;
|
|
159
|
+
function polyObjHasOwn(obj, prop) {
|
|
160
|
+
return objHasOwnProperty(obj, prop) || !!objGetOwnPropertyDescriptor(obj, prop);
|
|
161
|
+
}
|
|
162
|
+
|
|
156
163
|
function objForEachKey(theObject, callbackfn, thisArg) {
|
|
157
164
|
if (theObject && isObject(theObject)) {
|
|
158
165
|
for (var prop in theObject) {
|
|
159
|
-
if (
|
|
166
|
+
if (objHasOwn(theObject, prop)) {
|
|
160
167
|
if (callbackfn.call(thisArg || theObject, prop, theObject[prop]) === -1) {
|
|
161
168
|
break;
|
|
162
169
|
}
|
|
@@ -766,6 +773,7 @@
|
|
|
766
773
|
var _DYN_SET_NEXT_PLUGIN = "setNextPlugin";
|
|
767
774
|
var _DYN_CREATE_NEW = "createNew";
|
|
768
775
|
var _DYN_COOKIE_CFG = "cookieCfg";
|
|
776
|
+
var _DYN_INDEX_OF = "indexOf";
|
|
769
777
|
var _DYN_SUBSTRING = "substring";
|
|
770
778
|
var _DYN_USER_AGENT = "userAgent";
|
|
771
779
|
var _DYN_SPLIT = "split";
|
|
@@ -1197,7 +1205,7 @@
|
|
|
1197
1205
|
userAgentStr = navigator_2 ? (navigator_2[_DYN_USER_AGENT ] || STR_EMPTY)[_DYN_TO_LOWER_CASE ]() : STR_EMPTY;
|
|
1198
1206
|
}
|
|
1199
1207
|
var ua = (userAgentStr || STR_EMPTY)[_DYN_TO_LOWER_CASE ]();
|
|
1200
|
-
return (ua
|
|
1208
|
+
return (ua[_DYN_INDEX_OF ]("safari") >= 0);
|
|
1201
1209
|
}
|
|
1202
1210
|
function isBeaconsSupported() {
|
|
1203
1211
|
if (_beaconsSupported === null) {
|
|
@@ -1661,7 +1669,7 @@
|
|
|
1661
1669
|
}
|
|
1662
1670
|
|
|
1663
1671
|
var _objDefineProperty = ObjDefineProperty;
|
|
1664
|
-
var version = "3.0.0-beta.
|
|
1672
|
+
var version = "3.0.0-beta.2209-03";
|
|
1665
1673
|
var instanceName = "." + newId(6);
|
|
1666
1674
|
var _dataUid = 0;
|
|
1667
1675
|
function _createAccessor(target, prop, value) {
|
|
@@ -2582,6 +2590,20 @@
|
|
|
2582
2590
|
}
|
|
2583
2591
|
return cookieMgrCfg;
|
|
2584
2592
|
}
|
|
2593
|
+
function _isIgnoredCookie(cookieMgrCfg, name) {
|
|
2594
|
+
if (name && cookieMgrCfg && isArray(cookieMgrCfg.ignoreCookies)) {
|
|
2595
|
+
return cookieMgrCfg.ignoreCookies[_DYN_INDEX_OF ](name) !== -1;
|
|
2596
|
+
}
|
|
2597
|
+
return false;
|
|
2598
|
+
}
|
|
2599
|
+
function _isBlockedCookie(cookieMgrCfg, name) {
|
|
2600
|
+
if (name && cookieMgrCfg && isArray(cookieMgrCfg.blockedCookies)) {
|
|
2601
|
+
if (cookieMgrCfg.blockedCookies[_DYN_INDEX_OF ](name) !== -1) {
|
|
2602
|
+
return true;
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2605
|
+
return _isIgnoredCookie(cookieMgrCfg, name);
|
|
2606
|
+
}
|
|
2585
2607
|
function safeGetCookieMgr(core, config) {
|
|
2586
2608
|
var cookieMgr;
|
|
2587
2609
|
if (core) {
|
|
@@ -2620,10 +2642,10 @@
|
|
|
2620
2642
|
},
|
|
2621
2643
|
set: function (name, value, maxAgeSec, domain, path) {
|
|
2622
2644
|
var result = false;
|
|
2623
|
-
if (_isMgrEnabled(cookieMgr)) {
|
|
2645
|
+
if (_isMgrEnabled(cookieMgr) && !_isBlockedCookie(cookieMgrConfig, name)) {
|
|
2624
2646
|
var values = {};
|
|
2625
2647
|
var theValue = strTrim(value || STR_EMPTY);
|
|
2626
|
-
var idx = theValue
|
|
2648
|
+
var idx = theValue[_DYN_INDEX_OF ](";");
|
|
2627
2649
|
if (idx !== -1) {
|
|
2628
2650
|
theValue = strTrim(value[_DYN_SUBSTRING ](0, idx));
|
|
2629
2651
|
values = _extractParts(value[_DYN_SUBSTRING ](idx + 1));
|
|
@@ -2663,7 +2685,7 @@
|
|
|
2663
2685
|
},
|
|
2664
2686
|
get: function (name) {
|
|
2665
2687
|
var value = STR_EMPTY;
|
|
2666
|
-
if (_isMgrEnabled(cookieMgr)) {
|
|
2688
|
+
if (_isMgrEnabled(cookieMgr) && !_isIgnoredCookie(cookieMgrConfig, name)) {
|
|
2667
2689
|
value = (cookieMgrConfig.getCookie || _getCookieValue)(name);
|
|
2668
2690
|
}
|
|
2669
2691
|
return value;
|
|
@@ -2716,7 +2738,7 @@
|
|
|
2716
2738
|
arrForEach(parts, function (thePart) {
|
|
2717
2739
|
thePart = strTrim(thePart || STR_EMPTY);
|
|
2718
2740
|
if (thePart) {
|
|
2719
|
-
var idx = thePart
|
|
2741
|
+
var idx = thePart[_DYN_INDEX_OF ]("=");
|
|
2720
2742
|
if (idx === -1) {
|
|
2721
2743
|
values[thePart] = null;
|
|
2722
2744
|
}
|