@splitsoftware/splitio-commons 2.9.1-rc.2 → 2.10.0
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 +1 -1
- package/cjs/evaluator/index.js +2 -0
- package/cjs/utils/inputValidation/eventProperties.js +1 -0
- package/esm/evaluator/index.js +2 -0
- package/esm/utils/inputValidation/eventProperties.js +1 -0
- package/package.json +1 -1
- package/src/evaluator/index.ts +2 -0
- package/src/utils/inputValidation/eventProperties.ts +1 -0
- package/types/splitio.d.ts +1 -1
package/CHANGES.txt
CHANGED
package/cjs/evaluator/index.js
CHANGED
|
@@ -104,6 +104,7 @@ function getEvaluation(log, key, splitJSON, attributes, storage, options) {
|
|
|
104
104
|
return evaluation.then(function (result) {
|
|
105
105
|
result.changeNumber = splitJSON.changeNumber;
|
|
106
106
|
result.config = splitJSON.configurations && splitJSON.configurations[result.treatment] || null;
|
|
107
|
+
// @ts-expect-error impressionsDisabled is not exposed in the public typings yet.
|
|
107
108
|
result.impressionsDisabled = (options === null || options === void 0 ? void 0 : options.impressionsDisabled) || splitJSON.impressionsDisabled;
|
|
108
109
|
return result;
|
|
109
110
|
});
|
|
@@ -111,6 +112,7 @@ function getEvaluation(log, key, splitJSON, attributes, storage, options) {
|
|
|
111
112
|
else {
|
|
112
113
|
evaluation.changeNumber = splitJSON.changeNumber;
|
|
113
114
|
evaluation.config = splitJSON.configurations && splitJSON.configurations[evaluation.treatment] || null;
|
|
115
|
+
// @ts-expect-error impressionsDisabled is not exposed in the public typings yet.
|
|
114
116
|
evaluation.impressionsDisabled = (options === null || options === void 0 ? void 0 : options.impressionsDisabled) || splitJSON.impressionsDisabled;
|
|
115
117
|
}
|
|
116
118
|
}
|
|
@@ -69,6 +69,7 @@ function validateEvaluationOptions(log, maybeOptions, method) {
|
|
|
69
69
|
var impressionsDisabled = maybeOptions.impressionsDisabled;
|
|
70
70
|
if (!impressionsDisabled)
|
|
71
71
|
return options;
|
|
72
|
+
// @ts-expect-error impressionsDisabled is not exposed in the public typings yet.
|
|
72
73
|
return options ? (0, tslib_1.__assign)((0, tslib_1.__assign)({}, options), { impressionsDisabled: impressionsDisabled }) : { impressionsDisabled: impressionsDisabled };
|
|
73
74
|
}
|
|
74
75
|
else if (maybeOptions) {
|
package/esm/evaluator/index.js
CHANGED
|
@@ -98,6 +98,7 @@ function getEvaluation(log, key, splitJSON, attributes, storage, options) {
|
|
|
98
98
|
return evaluation.then(function (result) {
|
|
99
99
|
result.changeNumber = splitJSON.changeNumber;
|
|
100
100
|
result.config = splitJSON.configurations && splitJSON.configurations[result.treatment] || null;
|
|
101
|
+
// @ts-expect-error impressionsDisabled is not exposed in the public typings yet.
|
|
101
102
|
result.impressionsDisabled = (options === null || options === void 0 ? void 0 : options.impressionsDisabled) || splitJSON.impressionsDisabled;
|
|
102
103
|
return result;
|
|
103
104
|
});
|
|
@@ -105,6 +106,7 @@ function getEvaluation(log, key, splitJSON, attributes, storage, options) {
|
|
|
105
106
|
else {
|
|
106
107
|
evaluation.changeNumber = splitJSON.changeNumber;
|
|
107
108
|
evaluation.config = splitJSON.configurations && splitJSON.configurations[evaluation.treatment] || null;
|
|
109
|
+
// @ts-expect-error impressionsDisabled is not exposed in the public typings yet.
|
|
108
110
|
evaluation.impressionsDisabled = (options === null || options === void 0 ? void 0 : options.impressionsDisabled) || splitJSON.impressionsDisabled;
|
|
109
111
|
}
|
|
110
112
|
}
|
|
@@ -65,6 +65,7 @@ export function validateEvaluationOptions(log, maybeOptions, method) {
|
|
|
65
65
|
var impressionsDisabled = maybeOptions.impressionsDisabled;
|
|
66
66
|
if (!impressionsDisabled)
|
|
67
67
|
return options;
|
|
68
|
+
// @ts-expect-error impressionsDisabled is not exposed in the public typings yet.
|
|
68
69
|
return options ? __assign(__assign({}, options), { impressionsDisabled: impressionsDisabled }) : { impressionsDisabled: impressionsDisabled };
|
|
69
70
|
}
|
|
70
71
|
else if (maybeOptions) {
|
package/package.json
CHANGED
package/src/evaluator/index.ts
CHANGED
|
@@ -160,6 +160,7 @@ function getEvaluation(
|
|
|
160
160
|
return evaluation.then(result => {
|
|
161
161
|
result.changeNumber = splitJSON.changeNumber;
|
|
162
162
|
result.config = splitJSON.configurations && splitJSON.configurations[result.treatment] || null;
|
|
163
|
+
// @ts-expect-error impressionsDisabled is not exposed in the public typings yet.
|
|
163
164
|
result.impressionsDisabled = options?.impressionsDisabled || splitJSON.impressionsDisabled;
|
|
164
165
|
|
|
165
166
|
return result;
|
|
@@ -167,6 +168,7 @@ function getEvaluation(
|
|
|
167
168
|
} else {
|
|
168
169
|
evaluation.changeNumber = splitJSON.changeNumber;
|
|
169
170
|
evaluation.config = splitJSON.configurations && splitJSON.configurations[evaluation.treatment] || null;
|
|
171
|
+
// @ts-expect-error impressionsDisabled is not exposed in the public typings yet.
|
|
170
172
|
evaluation.impressionsDisabled = options?.impressionsDisabled || splitJSON.impressionsDisabled;
|
|
171
173
|
}
|
|
172
174
|
}
|
|
@@ -75,6 +75,7 @@ export function validateEvaluationOptions(log: ILogger, maybeOptions: any, metho
|
|
|
75
75
|
const impressionsDisabled = maybeOptions.impressionsDisabled;
|
|
76
76
|
if (!impressionsDisabled) return options;
|
|
77
77
|
|
|
78
|
+
// @ts-expect-error impressionsDisabled is not exposed in the public typings yet.
|
|
78
79
|
return options ? { ...options, impressionsDisabled } : { impressionsDisabled };
|
|
79
80
|
} else if (maybeOptions) {
|
|
80
81
|
log.error(ERROR_NOT_PLAIN_OBJECT, [method, 'evaluation options']);
|
package/types/splitio.d.ts
CHANGED