Add option to completely override the handler and event namespace. #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the option to specify a handlerNamespace or eventNamespace attribute, rather than having the eventNamespace be automatically prefixed with fsm.namespace.
In my specific use case of machina.postal, I need the handler and event namespaces to be individually overridable, because I do not know what the handler namespace of a given FSM will be in advance, but I do need to have the event namespace be constant. I imagine this addition might be useful for others as well for this reason. I could have used a regex postal listener, but would rather not.
I have added FSM.handlerNamespace here in addition to FSM.eventNamespace, which I acknowledge is redundant with FSM.namespace, because I thought it would be clearer naming-wise to be able to declare FSM.handlerNamespace and FSM.eventNamespace rather than just FSM.namespace and FSM.eventNamespace. It is still compatible with using FSM.namespace in the default way, regardless, as there are no breaking changes.