Feat/ws sync handlers
Possible implementation for the feat/ws-sync-handlers branch.
A new dummyResponse is sent by the remote handler when the request is not handled by the remote handler - this allows the calling code (via executeHandlers) to identify that the request was not handled (even though it has been '(not-)handled' by the remote handler).
It's very possible I used the wrong commit tags/types, so am happy to rewrite them as required.
The remotePort is set to a static value here - guidance on how you'd prefer this to be set would be welcome (and I can rebase as needed before merging) - however, I wasn't sure the current intention because the remote flag mentioned in part of the upstream draft PR seems to have changed to the remotePort value, and its existence is used to determine remoteness (so defaulting seems like it would cause problems).
If the intent is for the user to specify a port (static or potentially via environment variable, but within their code) then I think leaving a static value in the tests is perhaps(?) acceptable.
I'll add a comment to part of the changed code with further questions/thoughts on an alternative in case it isn't what/where you wanted changes.
I'm not sure if retargeting this to main rather than feat/ws-sync-handlers will clear up a lot of the commits (most are from merging v2.2.0).
I'm not quite sure how to fix the CI checks here - it seems to be complaining about indentation in a file that I guess was changed in main between where the msw/feat/ws-sync-handlers branch started (which I used as the upstream branch to start) and now?
I tried resaving the file (which gave two extra spaces via prettier) but that didn't change the outcome of the action check as far as I can tell.
#2041 is a much cleaner (although arguably more fake) set of commits to the same destination, and may be easier to review/merge if desired.