@configdirector/config-evaluator-internal
v0.5.0
Published
ConfigDirector internal package, not intended for use outside ConfigDirector. The targeting rules evaluator shared by the ConfigDirector server SDKs and the ConfigDirector dashboard; its API can change in any release.
Maintainers
Keywords
Readme
@configdirector/config-evaluator-internal
ConfigDirector internal package. It exists so that the ConfigDirector dashboard can run the same targeting rules evaluator the ConfigDirector server SDKs ship, from the same source. It is not intended for use outside ConfigDirector, carries no compatibility promise, and its API can change in any release. Applications should use one of the published SDKs instead: @configdirector/server-sdk for Node, or a client SDK for the browser and mobile.
The server SDKs in this repository bundle the evaluator from source; nothing in this repository depends on the published package. The evaluator's behaviour is pinned by the targeting rules contract, which every ConfigDirector implementation is checked against.
Contents
ConfigEvaluator: walks a config's targeting rules for a context and returns the served value and its value ID.explainreturns them with the trace of how the value was reached: each rule's outcome, each checked condition with what it resolved to, and the rollout share a context landed in.evaluateisexplainwith only the value and its value ID kept, so the two cannot disagree.ConditionEvaluator: decides whether one condition holds for a context;explainalso says what the condition was compared against.assignPercentage: the bucketing hash behind percentage rollouts.- The rule, condition, config and context types the evaluator works on.
EVALUATOR_VERSION: the published version, for showing which evaluator produced a result.
Versioning
Versioned independently of the SDKs with changesets, starting at 0.1.0. Released with the "Release @configdirector/config-evaluator-internal" workflow.
