Summary:
When using `flipperClient.stop()`, after `flipperClient.start()`, it's impossible to `start` new connection, since the previous instance would keep active `reconnect`, so would override the previous connection.
## Changelog
- clean reconnect timer when calling `flipperClient.stop()`
Pull Request resolved: https://github.com/facebook/flipper/pull/3646
Test Plan:
1. `flipperClient.start('Demo app', { urlBase: 'null:8333' });` - this will fail connection, but keep retrying
2. `flipperClient.stop()` - should disconnect from WS and clear all reconnect timers
3. `flipperClient.start('Demo app', { urlBase: 'localhost:8333' });` - should connect succefully
Reviewed By: antonk52
Differential Revision: D35810547
Pulled By: lblasa
fbshipit-source-id: 6f0b04df890c1519abb72895157785b01d35b5f2
Summary:
Some clients require encoded ws url. For example on Android (running in Rect Native), plain URL like this:
`ws://10.0.2.2:8333?device_id=ReactNative1646120067758.0.2246373385349361&device=ReactNative&app=React Native App Google - Android SDK&os=ReactNative`
will throw error during connection.
To not require param encoding when starting the `flipperClient.start()`, it is easier to encode entire `url` before starting the ws server.
## Changelog
- encode url for `js-flipper` ws server
Pull Request resolved: https://github.com/facebook/flipper/pull/3498
Reviewed By: aigoncharov
Differential Revision: D34638857
Pulled By: lblasa
fbshipit-source-id: 9eb0e268c7bacb5febc19bbb45fe6814fb7a60de
Summary: Create an example of how one can use `js-flipper` in a browser to connect to Flipper over WS.
Reviewed By: mweststrate
Differential Revision: D31688114
fbshipit-source-id: 135f826daeddeda8dca5b3df6504cc2bdc04dd1b
Summary:
Standardize WS implementation for JS environments.
Why do we need a separate server implementation for browsers?
Browser targets cannot authenticate via the default certificate exchange flow. We need a dedicated client for them that works over an insecure channel (without the cert exchange).
Major changes:
1. Renamed `flipper-js-client-sdk` to `js-flipper` for consistency with `react-native-flipper`
2. Updated `js-flipper` implementation to match our other existing clients
Documentation will be updated in a separate subsequent PR.
https://fb.quip.com/2mboA0xbgoxl
Reviewed By: mweststrate
Differential Revision: D31688105
fbshipit-source-id: 418aa80e0fd86361c089cf54b0d44a8b4f748efa