Files
flipper/desktop
Anton Nikolaev 38c81ca159 Make internal plugin distribution code publicly available (#3473)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/3473

This diff is the first one which addresses https://github.com/facebook/flipper/issues/3320.

In this diff we are making a part of the code used for internal Flipper plugin distribution in Meta also available publicly for re-using in other orgs.

Some explanation on how plugin installation and updates is designed now:
1) We periodically poll for plugins available for download. API for retrieving available plugins list is abstracted and will be different between public and fb versions, however all other logic is re-used.
2) In addition to "Enabled" and "Disabled" plugins in the left panel Flipper shows "Detected in App" list. Plugins in this list are those which are known compatible with the currently selected device/app, but not yet installed.
3) User can install any of "Detected in App" plugins by clicking to "Download and install" button near them in the left panel similarly to enabling plugins in "Disabled" list.
4) If we detect that for some installed plugin we have a newer version available for download - we download it silently and store on disk.
5) If the plugin for which we have new downloaded version is disabled - we update it silently without any notifications by loading new version from the disk and unloading the previous version from cache.
6) If the plugin for which we have new downloaded version is enabled then we avoid updating it automatically (because we need to reset plugin state in such case) and instead show notification on top of the plugin and ask user to reload it to apply new version. On reloading we reset the plugin state.
7) On Flipper startup we always update all plugins to their latest versions available on the disk.

Reviewed By: aigoncharov

Differential Revision: D34380308

fbshipit-source-id: a94d724e42aa5ef78445af266fcd4c424226a703
2022-02-22 05:23:05 -08:00
..
2021-12-16 14:54:59 -08:00
2022-02-16 07:59:45 -08:00
2022-02-16 05:52:58 -08:00
2022-02-14 09:55:15 -08:00
2022-02-16 05:52:58 -08:00
2021-12-17 07:36:07 -08:00
2021-09-27 08:25:20 -07:00
2022-02-16 05:52:58 -08:00
2021-10-08 01:33:03 -07:00
2021-12-17 07:36:07 -08:00
2021-12-17 10:04:23 -08:00

Flipper Desktop

This folder contains everything to run the Flipper 'Desktop', that is, the UI which you use to interact with the device / app under debug.

Packages provided here:

  • flipper-common: utilities & types shared between client, server, flipper-plugin
  • flipper-server-core: all device & client management goes in here. Basically flipper's backend
  • flipper-ui-core: all UI goes in here, as far as it doesn't depend on Electron
  • flipper-ui-electron: the Electron app, will load server-core and ui-core, and glue them together, providing implementations for some electron * specific stuff like dialgos
  • flipper-server: A node process hosting flipper-server-core, that can be connected to over websockets. And probably can serve a browser version of the UI as well.
  • flipper-ui-browser: thin wrapper around flipper-ui-core, providing some browser specific behavior / stubs.
  • flipper-dump: (might remove later), but want to hack a quick and dirt flipper dump in here, as alternative way to test flipper-server-core.
  • flipper-plugin: The flipper SDK used by plugins. Exposes all API's that can be used by plugins
  • pkg: CLI tool to manage building flipper plugins
  • pkg-lib
  • plugin-lib
  • babel-transformer
  • doctor
  • eslint-plugin-flipper

Packages overview

flipper-ui-electron:
   - flipper-server-core (directly embedded)
   - flipper-ui-core
       - plugins (prebundled)
   - plugins (installable)
       - flipper-plugin

flipper-server
   - flipper-server-core
   - flipper-ui-browser (served by webserver)
       - flipper-ui-core (communicates using WebSocket with server-core)
           - plugins (prebundled)
   - plugins (installable)?

flipper-dump
   - flipper-server-core