Plugin Marketplace state refresh and cache

Summary:
Separate dispatcher for periodic refreshing available plugins data from the Marketplace backend and caching it locally.

The plugin auto update downloader subscribes to these state refreshes and automatically schedules plugin update downloads when required.

Reviewed By: passy

Differential Revision: D25360897

fbshipit-source-id: 5b6d95b63ff47b8ae9ad8b12e2480d1fed524ca5
This commit is contained in:
Anton Nikolaev
2020-12-15 09:28:58 -08:00
committed by Facebook GitHub Bot
parent 5b26f36672
commit f3e1a48ff3
9 changed files with 63 additions and 7 deletions

View File

@@ -104,8 +104,12 @@ if (argv['fast-refresh'] === true) {
}
// By default plugin auto-update is disabled in dev mode,
// but it is possible to enable it using this command line argument.
if (argv['plugin-auto-update'] === true) {
// but it is possible to enable it using this command line
// argument or env var.
if (
argv['plugin-auto-update'] === true ||
process.env.FLIPPER_PLUGIN_AUTO_UPDATE
) {
delete process.env.FLIPPER_DISABLE_PLUGIN_AUTO_UPDATE;
} else {
process.env.FLIPPER_DISABLE_PLUGIN_AUTO_UPDATE = 'true';