-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add support for client-side prerequisite events. #606
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just linting changes in this file.
value, | ||
variationIndex: variationIndex ?? null, | ||
reason: reason ?? null, | ||
}; | ||
if (prerequisites) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't in the object construction because I don't want every eval to have a specified, but undefined, prerequisite field.
prerequisites: undefined
.
}, | ||
eventFactory, | ||
); | ||
this.evaluateCb(flag, context, resolve, eventFactory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to primary changes, just removing leftover code duplication.
@@ -18,9 +18,10 @@ export function createSuccessEvaluationDetail( | |||
variationIndex?: number, | |||
reason?: LDEvaluationReason, | |||
): LDEvaluationDetail { | |||
return { | |||
const res: LDEvaluationDetail = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an intermediate change as I was sorting detail. It could be removed, but it doesn't hurt anything.
This PR contains the server-side implementation for allFlagsState evaluation for bootstrap, server-side LDEvaluationDetail, client-side LDEvaluationDetail, and client-side events for prerequisites.
This version only includes direct pre-requisites, and the client-side evaluation uses variation methods versus directly sending events.
BEGIN_COMMIT_OVERRIDE
feat: Add support for client-side prerequisite events.
feat: Add support for prerequisite details to evaluation detail.
feat: Add prerequisite information to server-side allFlagsState.
END_COMMIT_OVERRIDE
SDK-686
SDK-682