-
Notifications
You must be signed in to change notification settings - Fork 168
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
KOGITO-3042: Replace MessageBusClient with proxified version of ApiToConsume #250
KOGITO-3042: Replace MessageBusClient with proxified version of ApiToConsume #250
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.
Top!
@caponetto Decided to remove the KogitoEditorEnvelopeServer too, since the way to call the Envelope API is now much better. Had to make the Proxy objects for This has made the "proxied" objects behave much more like a normal object, too :) Take a look at e4ee88c EDIT: Oops, had to add a new commit to fix tests. |
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.
LGTM! 🚀
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.
Looks good to me.
Consuming the API provided by your counterpart as an Envelope or a Channel is not very complex, but making it be type-safe makes things way more complicated. This PR makes it possible to consume your counterpart APIs by using an object with the same interface that it implements. This was achieved by using a
Proxy
object. See EnvelopeBusMessageManager.ts.I believe this is a much better way to communicate with the Envelope/Channel APIs than we had before, although just as type-safe.
I also provided a convenient
messageBusClientApiMock
function to be used by tests.