Commit Graph

4 Commits

Author SHA1 Message Date
Andrey Goncharov
9a47f41056 Implement JS flipper client
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
2021-10-21 04:28:21 -07:00
Michel Weststrate
e306aeb010 Don't die when flipper isn't initialized and a plugin is used
Summary: This diff makes sure that the app doesn't die, or dies in a meaningful way if things are misconfigured.

Reviewed By: passy

Differential Revision: D19468273

fbshipit-source-id: 2471c263391906113446af57d795d1199eb1730e
2020-01-23 07:11:30 -08:00
Michel Weststrate
08e2d54f62 Make sure callbacks are not reused and reloading works
Summary:
This diff is part of the bigger task T60496135

This diff changes the RN support from crude to decent citizen, making sure we don't recycle callbacks over the bridge, use subscriptions were possible, and making sure connecting, disconnecting, etc works correctly

For example, connect and disconnect hooks should work.

Finally, throw in hot reloading into the mix, which causes the registerPlugin to be triggered another time, without the old one every been unloaded.
This should trigger a new 'onConnect' on the client, to make sure it can restore any state / subscriptions necessary, even though the never disappeared in the Java world.

These cases should all be handled well.

Reviewed By: jknoxville

Differential Revision: D19347330

fbshipit-source-id: de64a08f4043f01528c794430ccc3c717abf0180
2020-01-16 05:06:22 -08:00
Michel Weststrate
c7158f4517 Make it possible to write JS only plugins
Summary:
This diff is part of the bigger task T60496135

This diff is based on D18706643, extracting only the react native module parts

It implements the entire Android client api for JavaScript, so that there is feature parity. However this implementation is happy path only, and edge cases will be handled in separate diffs

Reviewed By: jknoxville

Differential Revision: D19310265

fbshipit-source-id: 589716fe059952bdde98df84ed250c5c6feaa118
2020-01-16 05:06:22 -08:00