Plugin Marketplace: Download plugin updates in background
Summary: Download updated plugins in background. This is implemented by periodical polling of Marketplace GraphQL API (interval 5 min by default). The feature is under GK flipper_plugin_auto_update, so for now it is enabled only for me. Reviewed By: mweststrate Differential Revision: D21863057 fbshipit-source-id: 51d8223ad4b2a928f7571ea480c10ba2efd9935d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ab84bd563a
commit
f981a772ec
12
desktop/app/src/dispatcher/fb-stubs/pluginAutoUpdate.tsx
Normal file
12
desktop/app/src/dispatcher/fb-stubs/pluginAutoUpdate.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
export default () => {
|
||||
// Auto-updates of plugins not implemented in public version of Flipper
|
||||
};
|
||||
@@ -20,6 +20,7 @@ import plugins from './plugins';
|
||||
import user from './user';
|
||||
import pluginManager from './pluginManager';
|
||||
import reactNative from './reactNative';
|
||||
import pluginAutoUpdate from './fb-stubs/pluginAutoUpdate';
|
||||
|
||||
import {Logger} from '../fb-interfaces/Logger';
|
||||
import {Store} from '../reducers/index';
|
||||
@@ -46,6 +47,7 @@ export default function (store: Store, logger: Logger): () => Promise<void> {
|
||||
user,
|
||||
pluginManager,
|
||||
reactNative,
|
||||
pluginAutoUpdate,
|
||||
].filter(notNull);
|
||||
const globalCleanup = dispatchers
|
||||
.map((dispatcher) => dispatcher(store, logger))
|
||||
|
||||
@@ -190,6 +190,7 @@ export const requirePlugin = (
|
||||
}
|
||||
|
||||
plugin.id = plugin.id || pluginDefinition.id;
|
||||
plugin.packageName = pluginDefinition.name;
|
||||
|
||||
// set values from package.json as static variables on class
|
||||
Object.keys(pluginDefinition).forEach((key) => {
|
||||
|
||||
Reference in New Issue
Block a user