@splitsoftware/splitio 10.17.1-rc.0 → 10.17.1
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/CHANGES.txt +2 -1
- package/es/storage/AttributesCache/InMemory.js +8 -7
- package/es/utils/settings/index.js +1 -1
- package/lib/storage/AttributesCache/InMemory.js +8 -7
- package/lib/utils/settings/index.js +1 -1
- package/package.json +1 -1
- package/src/storage/AttributesCache/InMemory.js +8 -7
- package/src/utils/settings/index.js +1 -1
- package/types/splitio.d.ts +2 -2
package/CHANGES.txt
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
10.17.1 (January 13, 2022)
|
|
2
|
+
- Updated some transitive dependencies for vulnerability fixes.
|
|
2
3
|
- Bugfixing - Fixed internal handling of SDK_READY_FROM_CACHE event, to avoid CSP issues in browsers.
|
|
3
4
|
|
|
4
5
|
10.17.0 (January 3, 2022)
|
|
5
|
-
- Added
|
|
6
|
+
- Added support to SDK clients on browser to optionally bind attributes to the client, keeping these loaded within the SDK along with the user ID, for easier usage when requesting flag.
|
|
6
7
|
- Bugfixing - Fixed an issue returning dynamic configs when the treatment name contains a dot (".").
|
|
7
8
|
|
|
8
9
|
10.16.1 (October 25, 2021)
|
|
@@ -6,10 +6,10 @@ var AttributesCacheInMemory = /*#__PURE__*/function () {
|
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* Create or update the value for the given attribute
|
|
9
|
-
*
|
|
9
|
+
*
|
|
10
10
|
* @param {string} attributeName attribute name
|
|
11
11
|
* @param {Object} attributeValue attribute value
|
|
12
|
-
* @returns {boolean} the attribute was stored
|
|
12
|
+
* @returns {boolean} the attribute was stored
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
|
|
@@ -21,7 +21,7 @@ var AttributesCacheInMemory = /*#__PURE__*/function () {
|
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Retrieves the value of a given attribute
|
|
24
|
-
*
|
|
24
|
+
*
|
|
25
25
|
* @param {string} attributeName attribute name
|
|
26
26
|
* @returns {Object?} stored attribute value
|
|
27
27
|
*/
|
|
@@ -32,7 +32,7 @@ var AttributesCacheInMemory = /*#__PURE__*/function () {
|
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Create or update all the given attributes
|
|
35
|
-
*
|
|
35
|
+
*
|
|
36
36
|
* @param {[string, Object]} attributes attributes to create or update
|
|
37
37
|
* @returns {boolean} attributes were stored
|
|
38
38
|
*/
|
|
@@ -44,7 +44,7 @@ var AttributesCacheInMemory = /*#__PURE__*/function () {
|
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* Retrieve the full attributes map
|
|
47
|
-
*
|
|
47
|
+
*
|
|
48
48
|
* @returns {Map<string, Object>} stored attributes
|
|
49
49
|
*/
|
|
50
50
|
;
|
|
@@ -54,7 +54,7 @@ var AttributesCacheInMemory = /*#__PURE__*/function () {
|
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* Removes a given attribute from the map
|
|
57
|
-
*
|
|
57
|
+
*
|
|
58
58
|
* @param {string} attributeName attribute to remove
|
|
59
59
|
* @returns {boolean} attribute removed
|
|
60
60
|
*/
|
|
@@ -70,12 +70,13 @@ var AttributesCacheInMemory = /*#__PURE__*/function () {
|
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
72
|
* Clears all attributes stored in the SDK
|
|
73
|
-
*
|
|
73
|
+
*
|
|
74
74
|
*/
|
|
75
75
|
;
|
|
76
76
|
|
|
77
77
|
_proto.clear = function clear() {
|
|
78
78
|
this.attributesCache = {};
|
|
79
|
+
return true;
|
|
79
80
|
};
|
|
80
81
|
|
|
81
82
|
return AttributesCacheInMemory;
|
|
@@ -25,7 +25,7 @@ import validateSplitFilters from '../inputValidation/splitFilters';
|
|
|
25
25
|
import { API } from '../../utils/logger';
|
|
26
26
|
import { STANDALONE_MODE, STORAGE_MEMORY, CONSUMER_MODE, OPTIMIZED } from '../../utils/constants';
|
|
27
27
|
import validImpressionsMode from './impressionsMode';
|
|
28
|
-
var version = '10.17.1
|
|
28
|
+
var version = '10.17.1';
|
|
29
29
|
var eventsEndpointMatcher = /^\/(testImpressions|metrics|events)/;
|
|
30
30
|
var authEndpointMatcher = /^\/v2\/auth/;
|
|
31
31
|
var streamingEndpointMatcher = /^\/(sse|event-stream)/;
|
|
@@ -13,10 +13,10 @@ var AttributesCacheInMemory = /*#__PURE__*/function () {
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Create or update the value for the given attribute
|
|
16
|
-
*
|
|
16
|
+
*
|
|
17
17
|
* @param {string} attributeName attribute name
|
|
18
18
|
* @param {Object} attributeValue attribute value
|
|
19
|
-
* @returns {boolean} the attribute was stored
|
|
19
|
+
* @returns {boolean} the attribute was stored
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
|
|
@@ -28,7 +28,7 @@ var AttributesCacheInMemory = /*#__PURE__*/function () {
|
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Retrieves the value of a given attribute
|
|
31
|
-
*
|
|
31
|
+
*
|
|
32
32
|
* @param {string} attributeName attribute name
|
|
33
33
|
* @returns {Object?} stored attribute value
|
|
34
34
|
*/
|
|
@@ -39,7 +39,7 @@ var AttributesCacheInMemory = /*#__PURE__*/function () {
|
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Create or update all the given attributes
|
|
42
|
-
*
|
|
42
|
+
*
|
|
43
43
|
* @param {[string, Object]} attributes attributes to create or update
|
|
44
44
|
* @returns {boolean} attributes were stored
|
|
45
45
|
*/
|
|
@@ -51,7 +51,7 @@ var AttributesCacheInMemory = /*#__PURE__*/function () {
|
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* Retrieve the full attributes map
|
|
54
|
-
*
|
|
54
|
+
*
|
|
55
55
|
* @returns {Map<string, Object>} stored attributes
|
|
56
56
|
*/
|
|
57
57
|
;
|
|
@@ -61,7 +61,7 @@ var AttributesCacheInMemory = /*#__PURE__*/function () {
|
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Removes a given attribute from the map
|
|
64
|
-
*
|
|
64
|
+
*
|
|
65
65
|
* @param {string} attributeName attribute to remove
|
|
66
66
|
* @returns {boolean} attribute removed
|
|
67
67
|
*/
|
|
@@ -77,12 +77,13 @@ var AttributesCacheInMemory = /*#__PURE__*/function () {
|
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
79
|
* Clears all attributes stored in the SDK
|
|
80
|
-
*
|
|
80
|
+
*
|
|
81
81
|
*/
|
|
82
82
|
;
|
|
83
83
|
|
|
84
84
|
_proto.clear = function clear() {
|
|
85
85
|
this.attributesCache = {};
|
|
86
|
+
return true;
|
|
86
87
|
};
|
|
87
88
|
|
|
88
89
|
return AttributesCacheInMemory;
|
|
@@ -44,7 +44,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
44
44
|
See the License for the specific language governing permissions and
|
|
45
45
|
limitations under the License.
|
|
46
46
|
**/
|
|
47
|
-
var version = '10.17.1
|
|
47
|
+
var version = '10.17.1';
|
|
48
48
|
var eventsEndpointMatcher = /^\/(testImpressions|metrics|events)/;
|
|
49
49
|
var authEndpointMatcher = /^\/v2\/auth/;
|
|
50
50
|
var streamingEndpointMatcher = /^\/(sse|event-stream)/;
|
package/package.json
CHANGED
|
@@ -8,10 +8,10 @@ class AttributesCacheInMemory {
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Create or update the value for the given attribute
|
|
11
|
-
*
|
|
11
|
+
*
|
|
12
12
|
* @param {string} attributeName attribute name
|
|
13
13
|
* @param {Object} attributeValue attribute value
|
|
14
|
-
* @returns {boolean} the attribute was stored
|
|
14
|
+
* @returns {boolean} the attribute was stored
|
|
15
15
|
*/
|
|
16
16
|
setAttribute(attributeName, attributeValue) {
|
|
17
17
|
this.attributesCache[attributeName] = attributeValue;
|
|
@@ -20,7 +20,7 @@ class AttributesCacheInMemory {
|
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Retrieves the value of a given attribute
|
|
23
|
-
*
|
|
23
|
+
*
|
|
24
24
|
* @param {string} attributeName attribute name
|
|
25
25
|
* @returns {Object?} stored attribute value
|
|
26
26
|
*/
|
|
@@ -30,7 +30,7 @@ class AttributesCacheInMemory {
|
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Create or update all the given attributes
|
|
33
|
-
*
|
|
33
|
+
*
|
|
34
34
|
* @param {[string, Object]} attributes attributes to create or update
|
|
35
35
|
* @returns {boolean} attributes were stored
|
|
36
36
|
*/
|
|
@@ -41,7 +41,7 @@ class AttributesCacheInMemory {
|
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Retrieve the full attributes map
|
|
44
|
-
*
|
|
44
|
+
*
|
|
45
45
|
* @returns {Map<string, Object>} stored attributes
|
|
46
46
|
*/
|
|
47
47
|
getAll() {
|
|
@@ -50,7 +50,7 @@ class AttributesCacheInMemory {
|
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Removes a given attribute from the map
|
|
53
|
-
*
|
|
53
|
+
*
|
|
54
54
|
* @param {string} attributeName attribute to remove
|
|
55
55
|
* @returns {boolean} attribute removed
|
|
56
56
|
*/
|
|
@@ -64,10 +64,11 @@ class AttributesCacheInMemory {
|
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* Clears all attributes stored in the SDK
|
|
67
|
-
*
|
|
67
|
+
*
|
|
68
68
|
*/
|
|
69
69
|
clear() {
|
|
70
70
|
this.attributesCache = {};
|
|
71
|
+
return true;
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
}
|
|
@@ -27,7 +27,7 @@ import { API } from '../../utils/logger';
|
|
|
27
27
|
import { STANDALONE_MODE, STORAGE_MEMORY, CONSUMER_MODE, OPTIMIZED } from '../../utils/constants';
|
|
28
28
|
import validImpressionsMode from './impressionsMode';
|
|
29
29
|
|
|
30
|
-
const version = '10.17.1
|
|
30
|
+
const version = '10.17.1';
|
|
31
31
|
const eventsEndpointMatcher = /^\/(testImpressions|metrics|events)/;
|
|
32
32
|
const authEndpointMatcher = /^\/v2\/auth/;
|
|
33
33
|
const streamingEndpointMatcher = /^\/(sse|event-stream)/;
|
package/types/splitio.d.ts
CHANGED
|
@@ -482,11 +482,11 @@ declare namespace SplitIO {
|
|
|
482
482
|
type Event = 'init::timeout' | 'init::ready' | 'init::cache-ready' | 'state::update';
|
|
483
483
|
/**
|
|
484
484
|
* Split attributes should be on object with values of type string, boolean, number (dates should be sent as millis since epoch) or array of strings or numbers.
|
|
485
|
-
* @typedef {Object.<
|
|
485
|
+
* @typedef {Object.<AttributeType>} Attributes
|
|
486
486
|
* @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#attribute-syntax}
|
|
487
487
|
*/
|
|
488
488
|
type Attributes = {
|
|
489
|
-
[attributeName: string]:
|
|
489
|
+
[attributeName: string]: AttributeType
|
|
490
490
|
};
|
|
491
491
|
/**
|
|
492
492
|
* Type of an attribute value
|