@eppo/node-server-sdk
Advanced tools
Comparing version 1.0.4 to 1.0.6
@@ -17,2 +17,6 @@ "use strict"; | ||
const experimentConfig = this.configurationRequestor.getConfiguration(experimentKey); | ||
const allowListOverride = this.getSubjectVariationOverride(subjectKey, experimentConfig); | ||
if (allowListOverride) { | ||
return allowListOverride; | ||
} | ||
if (!(experimentConfig === null || experimentConfig === void 0 ? void 0 : experimentConfig.enabled) || | ||
@@ -23,6 +27,2 @@ !this.subjectAttributesSatisfyRules(subjectAttributes, experimentConfig.rules) || | ||
} | ||
const override = this.getSubjectVariationOverride(subjectKey, experimentConfig); | ||
if (override) { | ||
return override; | ||
} | ||
const { variations, subjectShards } = experimentConfig; | ||
@@ -54,3 +54,3 @@ const shard = (0, shard_1.getShard)(`assignment-${subjectKey}-${experimentKey}`, subjectShards); | ||
const subjectHash = (0, crypto_1.createHash)('md5').update(subjectKey).digest('hex'); | ||
return experimentConfig.overrides[subjectHash]; | ||
return experimentConfig === null || experimentConfig === void 0 ? void 0 : experimentConfig.overrides[subjectHash]; | ||
} | ||
@@ -57,0 +57,0 @@ /** |
@@ -20,3 +20,3 @@ import { IAssignmentLogger } from './assignment-logger'; | ||
*/ | ||
assignmentLogger?: IAssignmentLogger; | ||
assignmentLogger: IAssignmentLogger; | ||
} | ||
@@ -23,0 +23,0 @@ export { IAssignmentEvent, IAssignmentLogger } from './assignment-logger'; |
@@ -62,3 +62,3 @@ /** | ||
*/ | ||
assignmentLogger?: IAssignmentLogger; | ||
assignmentLogger: IAssignmentLogger; | ||
} | ||
@@ -65,0 +65,0 @@ |
{ | ||
"name": "@eppo/node-server-sdk", | ||
"version": "1.0.4", | ||
"version": "1.0.6", | ||
"description": "Eppo node server SDK", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
47275