-
Notifications
You must be signed in to change notification settings - Fork 47
[RI-50004] Expose Workflow value to apply
(breaking)
#262
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
base: main
Are you sure you want to change the base?
Conversation
apply
(breaking)
6927506
to
7f970d8
Compare
Replace ``` func apply\(toState ([a-zA-Z0-9_]+): inout ([a-zA-Z0-9_\.<>, ]+|\(\))\) -> ([a-zA-Z0-9_\.<>, ]+)\? ``` with ``` func apply(toState $1: inout $2, workflow: WorkflowType) -> $3? ```
7f970d8
to
0207e16
Compare
0207e16
to
5fb03fa
Compare
949f919
to
1f239e2
Compare
|
||
private let workflow = AuthenticationWorkflow( | ||
authenticationService: AuthenticationService() | ||
) |
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.
TODO: make this an ivar with setup/teardown in case AuthenticationService
is stateful
withState: .authorizingTwoFactor( | ||
twoFactorCode: "twoFactorCode", | ||
intermediateSession: "intermediateSession" | ||
) | ||
workflow: workflow, | ||
state: .authorizingTwoFactor(twoFactorCode: "123456", intermediateSession: "session") |
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.
TODO: preserve original parameter values
func apply(toState state: inout ___VARIABLE_productName___Workflow.State) -> ___VARIABLE_productName___Workflow.Output? { | ||
func apply(toState state: inout ___VARIABLE_productName___Workflow.State, workflow: WorkflowType) -> ___VARIABLE_productName___Workflow.Output? { |
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.
TODO
func apply(toState state: inout ___VARIABLE_productName___Workflow.State) -> ___VARIABLE_productName___Workflow.Output? { | ||
func apply(toState state: inout ___VARIABLE_productName___Workflow.State, workflow: WorkflowType) -> ___VARIABLE_productName___Workflow.Output? { |
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.
TODO
func apply(toState state: inout ___VARIABLE_productName___Workflow.State) -> ___VARIABLE_productName___Workflow.Output? { | ||
func apply(toState state: inout ___VARIABLE_productName___Workflow.State, workflow: WorkflowType) -> ___VARIABLE_productName___Workflow.Output? { |
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.
TODO
apply
(breaking)apply
(breaking)
This is an alternative implementation of #259 that includes breaking changes, which would require a major version bump and for all declarations of types conforming to
WorkflowAction
to be updated.