Summary:
Currently, Flipper Server has a few productions dependencies (mac-ca, node-fetch) that are not bundled with the Flipper Server. It makes it harder to distribute Flipper Server, as now all potential consumers need not only to download the bundle, but also install these additional dependencies.
This diff makes it possible to bundle `mac-ca` and `node-fetch` with Flipper Server. As a result, Flipper Server becomes dependency-free in production.
Reviewed By: lblasa
Differential Revision: D36345213
fbshipit-source-id: 2cd6ba1b3301b45dc2295891964ba020fd107586
Summary:
This change isolates the usage of folly async from Flipper. Is now self-contained in Flipper Folly schedulers.
Users of Flipper can decide not to use the types defined in that header and implement their own.
NOTE: changes are minimal, we are just replacing direct calls to folly event base with a scheduler which simply relays this on to folly.
Reviewed By: fabiomassimo
Differential Revision: D36052198
fbshipit-source-id: 170d64a324a1f1f100224e2622a59cbac3c8b642
Summary:
^
It was used by rsocket.
Reviewed By: fabiomassimo
Differential Revision: D36246038
fbshipit-source-id: 8bdc77d9e1ecf22402436e0102b5522ed36aff27
Summary:
Flipper doesn really use library specific exceptions throughout, and that's OK.
Introducing SSLException as a replacement for the existing Folly Async Socket SSL exception.
This exception originally thrown by rsocket. Because we had rsocket and websockets using the same code, websockets were creating and throwing this same exception.
With rsocket gone, we can fully replace the usage of that exception. This is also needed as to decouple Flipper from folly async components.
Reviewed By: fabiomassimo
Differential Revision: D36245624
fbshipit-source-id: f5c97c5efe063280ce95be130008dee7f4e5d788
Summary: Introduce a 'Scheduler' interface which will allow to decouple from the existing used Folly scheduler.
Reviewed By: fabiomassimo
Differential Revision: D36245587
fbshipit-source-id: 2f28bc1612e37ae53060a134d1c8059231fbc8ad
Summary:
As part of an ongoing effort to migrate Flipper plugins to new Sandy arch, this diff aims to help by migrating the 'Sandbox' Plugin.
Most of the changes were straightforward, as in, could be done by following this excellent migration guide : https://www.internalfb.com/intern/staticdocs/flipper/docs/extending/sandy-migration/
Only thing which caused few issues was the "onready" behaviour. In the old pattern, the 'init' method used to get executed on every render. So it was ok to check for "isconnected" prop there.
Now the 'plugin' method is only executed once => and since the device might not be connected then, the "onReady" method (which is equivalent to old 'init' method) didn't work.
To fix this => the init method has been replace with "onConnect".
Reviewed By: lblasa
Differential Revision: D36284538
fbshipit-source-id: 4b2bf74c6d11625e4bd784fbb29fd270158a41ff
Summary: Restyle of the page, including changes to spelling, grammar, links, and structure (where relevant).
Reviewed By: lblasa
Differential Revision: D36315001
fbshipit-source-id: 6a628abb9328e1c9dbe38c98fd6a12f84563efd4
Summary: Restyle of the page, including changes to spelling, grammar, links, and structure (where relevant).
Reviewed By: lblasa
Differential Revision: D36313447
fbshipit-source-id: 99f94779caefd7f9f64121a40928c2be2d1f3ff4
Summary: Restyle of Trobleshooting, which involved changes to sidebar.js and splitting up the previous troubleshooting page into five separate pages.
Reviewed By: lblasa
Differential Revision: D36282539
fbshipit-source-id: e60834e2b4d98b70b23bb11309c3438d85e4de0e
Summary: Restyle of the page, including changes to spelling, grammar, links, and structure (where relevant).
Reviewed By: nikoant
Differential Revision: D36312999
fbshipit-source-id: 737a1f8a9dc659c7351ac55e0ccc1d4083393aa5
Summary:
Same as with the previous diff.
The function doesn't really start a server. Instead it attaches the routing of messages from the existing server into FlipperServer.
Reviewed By: passy
Differential Revision: D36310703
fbshipit-source-id: 7ac9a742fb36c3806597382c9aadcf96f4770484
Summary:
^
Instead of 'start' use 'attach' as it seems closer to what the function actually does.
Reviewed By: passy
Differential Revision: D36310846
fbshipit-source-id: db90efc6ec3207b1a5a38139a3ba01d2f7d2aebd
Summary:
^
BaseServer doesn't really have any meaning. So, change it to just Server as it really creates the Express app and HTTP server attached to it.
Reviewed By: passy
Differential Revision: D36310822
fbshipit-source-id: eee5a2a395ca726679c1c4756ed58d4bc6be3cb8
Summary:
Rename 'startWebServerDev' to just 'startDevServer'.
It isn't really starting a web server though, more like installing routings and middleware to the existing created server.
Reviewed By: passy
Differential Revision: D36310765
fbshipit-source-id: 0af772012525fd7ad19e2aa6fa73cb3e7dcf2bef
Summary: Slight changes to the URL and port logging.
Reviewed By: passy
Differential Revision: D36310796
fbshipit-source-id: 553b9ce932792c471f8e0e2c1a0c7d79897ad59d
Summary: Some intern plugins use it, an dit is currently missing in FlipperLib
Reviewed By: timur-valiev
Differential Revision: D36313032
fbshipit-source-id: 5ea8e250f1d0bc8831727abd883d953286a022d4
Summary: Restyle of the page, including changes to spelling, grammar, links, and structure (where relevant).
Reviewed By: lblasa
Differential Revision: D36278376
fbshipit-source-id: d5e208558df8471d1c4783f393f82eb6d14a311f
Summary: Restyle of the page, including changes to spelling, grammar, links, and structure (where relevant).
Reviewed By: lblasa
Differential Revision: D36275804
fbshipit-source-id: 4d6538b0c3123dfd88980b05bee3cbb2b9c3d4f2
Summary: These safeguards were added based on a discussion in D35088208 (56e94394ca) but turned out to be counter-productive. Every time a client disconnects now, we're tearing down the socket and the server, allowing for no future connections.
Reviewed By: lblasa
Differential Revision: D36252605
fbshipit-source-id: c3b6f85dea4054505a47d24a72a4aac403371c0f
Summary: Reverts D36263724 (0ee8f09fe5) and fixes the underlying crash by setting only physical devices in the permissive mode
Reviewed By: passy
Differential Revision: D36275055
fbshipit-source-id: 25a691e9c07e20a3341630db508795c133a9bd81
Summary: Restyle of the page, including changes to spelling, grammar, links, and structure (where relevant).
Reviewed By: lblasa
Differential Revision: D36276846
fbshipit-source-id: ae933df0270fff6ffba9e011003174a2111e0fae
Summary:
Next steps:
1. Refactor it TS for consistency
2. Remove it in favor of tic-tac-toe integration
Reviewed By: mweststrate
Differential Revision: D36102002
fbshipit-source-id: 7dc930f67bed636159a2ec433d7405ab6ee09f97
Summary: Start flipper-server-companion whenever a client connects to flipper-server and sets `server_companion` query parameter in a connection URL to true
Reviewed By: mweststrate
Differential Revision: D36098169
fbshipit-source-id: eb953e7d680b30aef1340f059264112387264c05
Summary: Current temporary limitations: all headless plugins are bundled with Flipper.
Reviewed By: antonk52
Differential Revision: D36098168
fbshipit-source-id: c58abe41776157258a5c39a80a5c1a33cf3f42c5
Summary:
We want Flipper plugins to share imports with Flipper:
- They must share the same React otherwise different Reacts could conflict with each other
- Other common modules are shared to decrease the bundle size for each plugin.
`setGlobalObject` provides shared modules to Flipper Plugins by adding them to the global context (window or process or global this).
In the headless context, we do not have React and other DOM-related libraries, so we provide stubs instead.
Reviewed By: passy
Differential Revision: D36130161
fbshipit-source-id: d30c59a6c3ae02e7f9244bc0bb5790079b771107
Summary: Add Flipper Server Companion implementation. It extends the list of commands handled by Flipper Server by adding commands to interact with device or app Flipper plugins.
Reviewed By: mweststrate
Differential Revision: D36130159
fbshipit-source-id: 2eb6ba0fbae0fa850eadb7d417aa476240994bd5
Summary: Flipper Server Companion starts headless plugins and exposes them over the wire
Reviewed By: passy
Differential Revision: D36098170
fbshipit-source-id: 3b1b077d1fa4adca5c340ad4475b80b229586e1b