Summary: esbuild references external modules via `require`. We wrap `require` to point the references to built-in modules to global variables
Reviewed By: lblasa
Differential Revision: D39311893
fbshipit-source-id: a99480161c082f4095d78c22271f114532f32c16
Summary: As we stopped bundling plugins in D39276249, we no longer need the entry points for the bundled plugins (these entry points are always going to be empty)
Reviewed By: lblasa
Differential Revision: D39307565
fbshipit-source-id: 43751fe31c8bd962677c226b27cfe52093d3f2d4
Summary: Stop bundling plugins into Flipper Server bundles. In later diffs, we will start building all plugins even in dev mode which removes the need to bundle them.
Reviewed By: lblasa
Differential Revision: D39276249
fbshipit-source-id: 091405cfcf58aa7e1bd2b382da40f8d9841ae6b1
Summary: Flipper server itself requires no babel transforms. We applied extra transforms only for the bundled plugins. However, we pack and ship all plugins in the /static folder. They are always available on the FS. Therefore we could stop bundling any plugins into flipper-server's source code.
Reviewed By: lblasa
Differential Revision: D38910251
fbshipit-source-id: b3e9fe5ae2ab69ce5579b01b6793ebf7e88baf66
Summary:
flipper-server-companion depends on flipper-plugin. flipper-plugin includes dependencies that run only in a browser. Splitting flipper-plugin into core and browser packages helps to avoid including browser-only dependencies into flipper-server bundle.
As a result, bundle size could be cut in half. Subsequently, RSS usage drops as there is twice as less code to process for V8.
Note: it currently breaks external flipper-data-source package. It will be restored in subsequent diffs
Reviewed By: lblasa
Differential Revision: D38658285
fbshipit-source-id: 751b11fa9f3a2d938ce166687b8310ba8b059dee
Summary:
If there's a device client disconnect during request execution, no response is ever given back to the client (flipperd).
This change effectively subscribes to client disconnect events and notifies flipperd of any disconnection during request processing.
Reviewed By: passy
Differential Revision: D37787986
fbshipit-source-id: 31737a50b83b0cbe4141ce814064aebef7e09bfc
Summary: For the Flipper Server Companion, if a plugin is being requested which is not yet installed, try to install it first from the marketplace.
Reviewed By: passy
Differential Revision: D37716962
fbshipit-source-id: d618fbc597f82b540dbb02e8ffc296dcee9e1eb9
Summary: Allow subscribing to state updates from the plugin in headless mode
Reviewed By: passy
Differential Revision: D36516754
fbshipit-source-id: 14db51243e1d91332a7327c1792412149339f907
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