Summary: lawrencelomax helpfully pointed out that there's a legacy limit for the path length of unix domain sockets. Checking here and falling back to `/tmp` in case we're going over. This could have caused some gnarly support issues, so I'm glad we caught this before it went live.
Reviewed By: aigoncharov
Differential Revision: D35257794
fbshipit-source-id: 68a7b62d6d6863efa4b3ce84d7735b1c1a45a174
Summary: Instead of just deleting, we first check if it's already in use. The behaviour in case it *is* in use, is not great but mirrors what happens when the port is occupied.
Reviewed By: aigoncharov
Differential Revision: D35188965
fbshipit-source-id: 9bb5a7a9bacec6987ea72bbd084e40d5b30f9796
Summary: Open a domain socket by default and proxy all browser requests via TCP to it. That allows us to connect to a running server regardless of its local port.
Reviewed By: aigoncharov
Differential Revision: D35088208
fbshipit-source-id: d167852162e63f68c804c379b4421f5cc0d33df2
Summary: Add a simple endpoint to the server to check if it's up and running.
Reviewed By: aigoncharov
Differential Revision: D35087344
fbshipit-source-id: ec490fdb11042e7a7e4b9b944b018c4c9853ed49
Summary: Socket.io-client sends the host as ::1 instead of [::1] when using IPV6 to communicate with Flipper, that is the reason the communication was always being refused.
Reviewed By: mweststrate
Differential Revision: D34679825
fbshipit-source-id: b7431ad23f743276c11619d7cdb5c83594dee43a
Summary: Add support for binding the same port in flipper in both the IPv6 and IPv4 interfaces
Reviewed By: mweststrate
Differential Revision: D34591022
fbshipit-source-id: e28239c24425885ee442d93b84bb38902d521a0c
Summary: Make sure the flipper server socket only accepts local connections
Reviewed By: aigoncharov
Differential Revision: D33020251
fbshipit-source-id: 53e95e4871a45f3a3fa14f999499568a5a6b4995
Summary: During startup the socket connection would close a few times, among others because Scribe dumps 1.3 MB of data after startup, and the maximum payload of `socket.io` defaults to 1MB. This diff changes it to 100MB (the max size used by `ws` library). We know that we need at least > 10 MB, as that is what plugins like Network cap at.
Reviewed By: aigoncharov
Differential Revision: D33017653
fbshipit-source-id: 1233af6fbdc4b9eed42786ee418cfd6d43b2b433
Summary:
The build process for the server was a simple ts-node that compiled all deps. However, that didn't do any source transformations we need, like replacing `fb-stubs` with `fb` in facebook builds.
This diff works out the dev build process to align more with how other parts of the code base is build, by starting metro to build and bundle the server (only the sources of flipper-server, flipper-server-core and other flipper packages are bundled, node-deps are left as is).
To achieve this, since metro doesn't have support for 'external' packages like any arbitrarily other bundler, we recycle the electronRequire work around that is used in the desktop app as well
Reviewed By: aigoncharov
Differential Revision: D32949677
fbshipit-source-id: 00d326bb17b68aece6fb43af98d0def13b335e74
Summary:
This diff sets up the socket connection between flipper-browser and flipper-server, and verifies that the initial UI initialisation work (e.g. `get-config` command works). The initial RenderHost is initialised as well based on the config and browser APIs.
Note that flipper-ui-core itself isn't started yet, as that has still a plethora of node imports, so Metro will correctly refuse to bundle
Not in this diff
* remove Node usage from flipper-ui-core
* implement all RenderHost APIs
Reviewed By: aigoncharov
Differential Revision: D32644074
fbshipit-source-id: 2c8065caf0191771a3867b69a431ca50eeb7a5a3
Summary: The previous started up a dev / web server for bundling in flipper-server, this diff starts the flipper server itself, so that we can connect the client to it (done in next diffs)
Reviewed By: passy, aigoncharov
Differential Revision: D32627390
fbshipit-source-id: b48de20f076e1e13842368d16a090708d533b69e