@microsoft/1ds-core-js 3.2.7 → 3.2.9
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/README.md +20 -1
- package/bundle/{ms.core-3.2.7.gbl.js → ms.core-3.2.9.gbl.js} +56 -28
- package/bundle/ms.core-3.2.9.gbl.js.map +1 -0
- package/bundle/ms.core-3.2.9.gbl.min.js +7 -0
- package/bundle/ms.core-3.2.9.gbl.min.js.map +1 -0
- package/bundle/ms.core-3.2.9.integrity.json +46 -0
- package/bundle/{ms.core-3.2.7.js → ms.core-3.2.9.js} +56 -28
- package/bundle/ms.core-3.2.9.js.map +1 -0
- package/bundle/ms.core-3.2.9.min.js +7 -0
- package/bundle/ms.core-3.2.9.min.js.map +1 -0
- package/bundle/ms.core.gbl.js +55 -27
- 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 +55 -27
- 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 +2 -2
- 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.js +1 -1
- package/dist-esm/src/BaseCore.js +1 -1
- package/dist-esm/src/DataModels.d.ts +2 -2
- package/dist-esm/src/DataModels.js +1 -1
- package/dist-esm/src/ESPromise.d.ts +4 -4
- package/dist-esm/src/ESPromise.js +1 -1
- package/dist-esm/src/ESPromiseScheduler.d.ts +1 -1
- package/dist-esm/src/ESPromiseScheduler.js +1 -1
- package/dist-esm/src/Enums.d.ts +6 -6
- package/dist-esm/src/Enums.js +1 -1
- package/dist-esm/src/Index.js +1 -1
- package/dist-esm/src/InternalConstants.js +1 -1
- package/dist-esm/src/Utils.d.ts +1 -1
- package/dist-esm/src/Utils.js +2 -2
- package/dist-esm/src/Utils.js.map +1 -1
- package/dist-esm/src/ValueSanitizer.js +1 -1
- package/package.json +4 -4
- package/bundle/ms.core-3.2.7.gbl.js.map +0 -1
- package/bundle/ms.core-3.2.7.gbl.min.js +0 -7
- package/bundle/ms.core-3.2.7.gbl.min.js.map +0 -1
- package/bundle/ms.core-3.2.7.integrity.json +0 -46
- package/bundle/ms.core-3.2.7.js.map +0 -1
- package/bundle/ms.core-3.2.7.min.js +0 -7
- package/bundle/ms.core-3.2.7.min.js.map +0 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ ms.reviewedBy: ramthi
|
|
|
16
16
|
|
|
17
17
|
## npm
|
|
18
18
|
|
|
19
|
-
Packages available [here](https://msasg.visualstudio.com/Shared%20Data/_artifacts/feed/1DS-SDK/Npm/%40microsoft%2F1ds-core-js/overview/3.2.
|
|
19
|
+
Packages available [here](https://msasg.visualstudio.com/Shared%20Data/_artifacts/feed/1DS-SDK/Npm/%40microsoft%2F1ds-core-js/overview/3.2.9).
|
|
20
20
|
|
|
21
21
|
## Basic Usage
|
|
22
22
|
|
|
@@ -81,6 +81,8 @@ Cookie Configuration for instance based cookie management added in version 3.1.0
|
|
|
81
81
|
| enabled | A boolean that indicates whether the use of cookies by the SDK is enabled by the current instance. If false, the instance of the SDK initialized by this configuration will not store or read any data from cookies | boolean | true |
|
|
82
82
|
| domain | Custom cookie domain. This is helpful if you want to share Application Insights cookies across subdomains. If not provided uses the value from root `cookieDomain` value. | string<br/>Defaults: null |
|
|
83
83
|
| path | Specifies the path to use for the cookie, if not provided it will use any value from the root `cookiePath` value. | string<br/>Defaults: / |
|
|
84
|
+
| ignoreCookies | 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 v3.2.7) | string[] <br/> Defaults: undefined |
|
|
85
|
+
| blockedCookies | 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 v3.2.7) | string[] <br/> Defaults: undefined |
|
|
84
86
|
| getCookie | Function to fetch the named cookie value, if not provided it will use the internal cookie parsing / caching. | `(name: string) => string`<br/>Defaults: null |
|
|
85
87
|
| setCookie | Function to set the named cookie with the specified value, only called when adding or updating a cookie. | `(name: string, value: string) => void`<br/>Defaults: null |
|
|
86
88
|
| delCookie | Function to delete the named cookie with the specified value, separated from setCookie to avoid the need to parse the value to determine whether the cookie is being added or removed.if not provided it will use the internal cookie parsing / caching. | `(name: string, value: string) => void`<br/>Defaults: null |
|
|
@@ -100,6 +102,23 @@ The instance based cookie management also replaces the previous CoreUtils and gl
|
|
|
100
102
|
- oneDs.[getCookieMgr()](https://github.com/microsoft/ApplicationInsights-JS/blob/master/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/ICookieMgr.ts).get("MyCookie");
|
|
101
103
|
- oneDs.[getCookieMgr()](https://github.com/microsoft/ApplicationInsights-JS/blob/master/shared/AppInsightsCore/src/JavaScriptSDK.Interfaces/ICookieMgr.ts).del("MyCookie");
|
|
102
104
|
|
|
105
|
+
### Blocking individual cookies
|
|
106
|
+
|
|
107
|
+
Since v3.2.7 you can now specify which Cookie name(s) that you want the SDK to either ignore (never read, written or created) or blocked (will be read if already present but will not write or create), this is useful for blocking non-critical Cookies that your site does not need but the SDK automatically populates. These settings only affect the Javascript SDK reading, writing and creation of the cookies and do NOT affect automatic cookies added by the Collector. See the ["Cookies Set/Read by 1DS Web SDK" section of the linked page](https://eng.ms/docs/products/geneva/collect/instrument/1ds/javascriptsdk/getting-started).
|
|
108
|
+
|
|
109
|
+
Example.
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
var coreConfig: IExtendedConfiguration = {
|
|
113
|
+
instrumentationKey: "YOUR_TENANT_KEY",
|
|
114
|
+
cookieCfg: {
|
|
115
|
+
ignoreCookies: [ "MicrosoftApplicationsTelemetryDeviceId" ]
|
|
116
|
+
}
|
|
117
|
+
extensions: [ /* Your extensions */ ],
|
|
118
|
+
extensionConfig: []
|
|
119
|
+
};
|
|
120
|
+
```
|
|
121
|
+
|
|
103
122
|
## API documentation
|
|
104
123
|
|
|
105
124
|
[https://1dsdocs.azurewebsites.net/api/webSDK/utl/core/3.0/f/index.html](https://1dsdocs.azurewebsites.net/api/webSDK/utl/core/3.0/f/index.html)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* 1DS JS SDK Core, 3.2.
|
|
2
|
+
* 1DS JS SDK Core, 3.2.9
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
* (Microsoft Internal Only)
|
|
5
5
|
*/
|
|
@@ -21,21 +21,23 @@
|
|
|
21
21
|
var _cachedGlobal = null;
|
|
22
22
|
function getGlobal(useCached) {
|
|
23
23
|
if (useCached === void 0) { useCached = true; }
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
var result = useCached === false ? null : _cachedGlobal;
|
|
25
|
+
if (!result) {
|
|
26
|
+
if (typeof globalThis !== strShimUndefined) {
|
|
27
|
+
result = globalThis;
|
|
27
28
|
}
|
|
28
|
-
if (typeof self !== strShimUndefined
|
|
29
|
-
|
|
29
|
+
if (!result && typeof self !== strShimUndefined) {
|
|
30
|
+
result = self;
|
|
30
31
|
}
|
|
31
|
-
if (typeof window !== strShimUndefined
|
|
32
|
-
|
|
32
|
+
if (!result && typeof window !== strShimUndefined) {
|
|
33
|
+
result = window;
|
|
33
34
|
}
|
|
34
|
-
if (typeof global !== strShimUndefined
|
|
35
|
-
|
|
35
|
+
if (!result && typeof global !== strShimUndefined) {
|
|
36
|
+
result = global;
|
|
36
37
|
}
|
|
38
|
+
_cachedGlobal = result;
|
|
37
39
|
}
|
|
38
|
-
return
|
|
40
|
+
return result;
|
|
39
41
|
}
|
|
40
42
|
function throwTypeError(message) {
|
|
41
43
|
throw new TypeError(message);
|
|
@@ -73,7 +75,9 @@
|
|
|
73
75
|
var __assignFn = ObjAssign || __objAssignFnImpl;
|
|
74
76
|
var extendStaticsFn = function (d, b) {
|
|
75
77
|
extendStaticsFn = ObjClass["setPrototypeOf"] ||
|
|
76
|
-
({ __proto__: [] } instanceof Array && function (d, b) {
|
|
78
|
+
({ __proto__: [] } instanceof Array && function (d, b) {
|
|
79
|
+
d.__proto__ = b;
|
|
80
|
+
}) ||
|
|
77
81
|
function (d, b) {
|
|
78
82
|
for (var p in b) {
|
|
79
83
|
if (b[strShimHasOwnProperty](p)) {
|
|
@@ -88,7 +92,9 @@
|
|
|
88
92
|
throwTypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
89
93
|
}
|
|
90
94
|
extendStaticsFn(d, b);
|
|
91
|
-
function __() {
|
|
95
|
+
function __() {
|
|
96
|
+
this.constructor = d;
|
|
97
|
+
}
|
|
92
98
|
d[strShimPrototype] = b === null ? objCreateFn(b) : (__[strShimPrototype] = b[strShimPrototype], new __());
|
|
93
99
|
}
|
|
94
100
|
function __spreadArrayFn(to, from) {
|
|
@@ -447,7 +453,7 @@
|
|
|
447
453
|
}
|
|
448
454
|
function strTrim(str) {
|
|
449
455
|
if (str) {
|
|
450
|
-
str = (_strTrim && str[cStrTrim]) ? str[cStrTrim]() : (str[_DYN_REPLACE ] ? str[_DYN_REPLACE ](/^\s
|
|
456
|
+
str = (_strTrim && str[cStrTrim]) ? str[cStrTrim]() : (str[_DYN_REPLACE ] ? str[_DYN_REPLACE ](/^\s+|(?=\s)\s+$/g, STR_EMPTY$1) : str);
|
|
451
457
|
}
|
|
452
458
|
return str;
|
|
453
459
|
}
|
|
@@ -704,9 +710,11 @@
|
|
|
704
710
|
});
|
|
705
711
|
|
|
706
712
|
/*!
|
|
707
|
-
* Microsoft Dynamic Proto Utility, 1.1.
|
|
713
|
+
* Microsoft Dynamic Proto Utility, 1.1.7
|
|
708
714
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
709
715
|
*/
|
|
716
|
+
var _a$2;
|
|
717
|
+
var UNDEFINED = "undefined";
|
|
710
718
|
var Constructor = 'constructor';
|
|
711
719
|
var Prototype = 'prototype';
|
|
712
720
|
var strFunction = 'function';
|
|
@@ -720,13 +728,37 @@
|
|
|
720
728
|
var UnknownValue = '_unknown_';
|
|
721
729
|
var str__Proto = "__proto__";
|
|
722
730
|
var DynProtoBaseProto = "_dyn" + str__Proto;
|
|
731
|
+
var DynProtoGlobalSettings = "__dynProto$Gbl";
|
|
723
732
|
var DynProtoCurrent = "_dynInstProto";
|
|
724
733
|
var strUseBaseInst = 'useBaseInst';
|
|
725
734
|
var strSetInstFuncs = 'setInstFuncs';
|
|
726
735
|
var Obj = Object;
|
|
727
736
|
var _objGetPrototypeOf = Obj["getPrototypeOf"];
|
|
728
737
|
var _objGetOwnProps = Obj["getOwnPropertyNames"];
|
|
729
|
-
|
|
738
|
+
function _getGlobal() {
|
|
739
|
+
var result;
|
|
740
|
+
if (typeof globalThis !== UNDEFINED) {
|
|
741
|
+
result = globalThis;
|
|
742
|
+
}
|
|
743
|
+
if (!result && typeof self !== UNDEFINED) {
|
|
744
|
+
result = self;
|
|
745
|
+
}
|
|
746
|
+
if (!result && typeof window !== UNDEFINED) {
|
|
747
|
+
result = window;
|
|
748
|
+
}
|
|
749
|
+
if (!result && typeof global !== UNDEFINED) {
|
|
750
|
+
result = global;
|
|
751
|
+
}
|
|
752
|
+
return result || {};
|
|
753
|
+
}
|
|
754
|
+
var _gbl = _getGlobal();
|
|
755
|
+
var _gblInst = _gbl[DynProtoGlobalSettings] || (_gbl[DynProtoGlobalSettings] = {
|
|
756
|
+
o: (_a$2 = {},
|
|
757
|
+
_a$2[strSetInstFuncs] = true,
|
|
758
|
+
_a$2[strUseBaseInst] = true,
|
|
759
|
+
_a$2),
|
|
760
|
+
n: 1000
|
|
761
|
+
});
|
|
730
762
|
function _hasOwnProperty(obj, prop) {
|
|
731
763
|
return obj && Obj[Prototype].hasOwnProperty.call(obj, prop);
|
|
732
764
|
}
|
|
@@ -920,15 +952,15 @@
|
|
|
920
952
|
}
|
|
921
953
|
var classProto = theClass[Prototype];
|
|
922
954
|
if (!_checkPrototype(classProto, target)) {
|
|
923
|
-
_throwTypeError("[" + _getObjName(theClass) + "]
|
|
955
|
+
_throwTypeError("[" + _getObjName(theClass) + "] not in hierarchy of [" + _getObjName(target) + "]");
|
|
924
956
|
}
|
|
925
957
|
var className = null;
|
|
926
958
|
if (_hasOwnProperty(classProto, DynClassName)) {
|
|
927
959
|
className = classProto[DynClassName];
|
|
928
960
|
}
|
|
929
961
|
else {
|
|
930
|
-
className = DynClassNamePrefix + _getObjName(theClass, "_") + "$" +
|
|
931
|
-
|
|
962
|
+
className = DynClassNamePrefix + _getObjName(theClass, "_") + "$" + _gblInst.n;
|
|
963
|
+
_gblInst.n++;
|
|
932
964
|
classProto[DynClassName] = className;
|
|
933
965
|
}
|
|
934
966
|
var perfOptions = dynamicProto[DynProtoDefaultOptions];
|
|
@@ -945,11 +977,7 @@
|
|
|
945
977
|
}
|
|
946
978
|
_populatePrototype(classProto, className, target, instFuncs, setInstanceFunc !== false);
|
|
947
979
|
}
|
|
948
|
-
|
|
949
|
-
setInstFuncs: true,
|
|
950
|
-
useBaseInst: true
|
|
951
|
-
};
|
|
952
|
-
dynamicProto[DynProtoDefaultOptions] = perfDefaults;
|
|
980
|
+
dynamicProto[DynProtoDefaultOptions] = _gblInst.o;
|
|
953
981
|
|
|
954
982
|
var strWindow = "window";
|
|
955
983
|
var strDocument = "document";
|
|
@@ -1629,7 +1657,7 @@
|
|
|
1629
1657
|
}
|
|
1630
1658
|
|
|
1631
1659
|
var _objDefineProperty = ObjDefineProperty;
|
|
1632
|
-
var version = '2.8.
|
|
1660
|
+
var version = '2.8.10';
|
|
1633
1661
|
var instanceName = "." + newId(6);
|
|
1634
1662
|
var _dataUid = 0;
|
|
1635
1663
|
function _createAccessor(target, prop, value) {
|
|
@@ -1981,7 +2009,7 @@
|
|
|
1981
2009
|
var eventNamespace = /^([^.]*)(?:\.(.+)|)/;
|
|
1982
2010
|
function _normalizeNamespace(name) {
|
|
1983
2011
|
if (name && name[_DYN_REPLACE ]) {
|
|
1984
|
-
return name
|
|
2012
|
+
return name[_DYN_REPLACE ](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g, STR_EMPTY$1);
|
|
1985
2013
|
}
|
|
1986
2014
|
return name;
|
|
1987
2015
|
}
|
|
@@ -4107,7 +4135,7 @@
|
|
|
4107
4135
|
var STR_PROPERTIES = "properties";
|
|
4108
4136
|
|
|
4109
4137
|
var _a;
|
|
4110
|
-
var Version = '3.2.
|
|
4138
|
+
var Version = '3.2.9';
|
|
4111
4139
|
var FullVersionString = "1DS-Web-JS-" + Version;
|
|
4112
4140
|
var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
|
|
4113
4141
|
var strWithCredentials = "withCredentials";
|
|
@@ -5326,4 +5354,4 @@
|
|
|
5326
5354
|
(function(obj, prop, descriptor) { /* ai_es3_polyfil defineProperty */ var func = Object["defineProperty"]; if (func) { try { return func(obj, prop, descriptor); } catch(e) { /* IE8 defines defineProperty, but will throw */ } } if (descriptor && typeof descriptor.value !== undefined) { obj[prop] = descriptor.value; } return obj; })(exports, '__esModule', { value: true });
|
|
5327
5355
|
|
|
5328
5356
|
})(this.oneDS = this.oneDS || {});
|
|
5329
|
-
//# sourceMappingURL=ms.core-3.2.
|
|
5357
|
+
//# sourceMappingURL=ms.core-3.2.9.gbl.js.map
|