Introduce DevicePlugin APIs
Summary: This stack introduces Sandy device plugins, they are quite similar to normal plugins, but, a devicePlugin module is organized as ``` export function supportsDevice(device): boolean export function devicePlugin(devicePluginClient) export function Component ``` Device plugins get access to the device meta data and can subscribe to the `onLogEntry` callback and `onDestroy` lifecycle. They will be able to store state just as normal plugins, but can't send or receive methods, so devicePluginClient is a bit limited. This diff only sets up most of the new data structures, and makes sure everything still compiles and no existing tests fail. To prevent this diff from becoming to big, actually loading, rendering and testing device plugins will be done in next diffs Please take a critical look at the api proposed and the (especially) the public names used :) Reviewed By: passy, nikoant Differential Revision: D22691351 fbshipit-source-id: bdbbd7f86d14b646fc9a693ad19f33583a76f26d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6083534025
commit
91ed4e31c0
@@ -44,11 +44,7 @@ export {getPluginKey, getPersistedState} from './utils/pluginUtils';
|
||||
export {Idler} from './utils/Idler';
|
||||
export {Store, MiddlewareAPI, State as ReduxState} from './reducers/index';
|
||||
export {default as BaseDevice} from './devices/BaseDevice';
|
||||
export {
|
||||
DeviceLogListener,
|
||||
DeviceLogEntry,
|
||||
LogLevel,
|
||||
} from './devices/BaseDevice';
|
||||
export {DeviceLogEntry, LogLevel, DeviceLogListener} from 'flipper-plugin';
|
||||
export {shouldParseAndroidLog} from './utils/crashReporterUtility';
|
||||
export {default as isProduction} from './utils/isProduction';
|
||||
export {createTablePlugin} from './createTablePlugin';
|
||||
|
||||
Reference in New Issue
Block a user