Make sure that limited top-level exports are exposed from flipper-plugin
Summary: This prefixes APIs of `flipper-plugin`, that are used by Flipper, but should not be used by plugins directly, with `_`. Also added tests to make sure we are always intentional when extending the exposed APIs Reviewed By: passy Differential Revision: D24991700 fbshipit-source-id: ed3700efa188fca7f5a14d5c68250598cf011e42
This commit is contained in:
committed by
Facebook GitHub Bot
parent
cc438e60ad
commit
45db64f0d0
@@ -36,7 +36,7 @@ import {processMessagesLater} from './utils/messageQueue';
|
||||
import {emitBytesReceived} from './dispatcher/tracking';
|
||||
import {debounce} from 'lodash';
|
||||
import {batch} from 'react-redux';
|
||||
import {SandyPluginInstance} from 'flipper-plugin';
|
||||
import {_SandyPluginInstance} from 'flipper-plugin';
|
||||
import {flipperMessagesClientPlugin} from './utils/self-inspection/plugins/FlipperMessagesClientPlugin';
|
||||
import {getFlipperLibImplementation} from './utils/flipperLibImplementation';
|
||||
|
||||
@@ -148,11 +148,11 @@ export default class Client extends EventEmitter {
|
||||
plugin:
|
||||
| typeof FlipperPlugin
|
||||
| typeof FlipperDevicePlugin
|
||||
| SandyPluginInstance;
|
||||
| _SandyPluginInstance;
|
||||
messages: Params[];
|
||||
}
|
||||
> = {};
|
||||
sandyPluginStates = new Map<string /*pluginID*/, SandyPluginInstance>();
|
||||
sandyPluginStates = new Map<string /*pluginID*/, _SandyPluginInstance>();
|
||||
|
||||
requestCallbacks: Map<
|
||||
number,
|
||||
@@ -251,7 +251,7 @@ export default class Client extends EventEmitter {
|
||||
// TODO: needs to be wrapped in error tracking T68955280
|
||||
this.sandyPluginStates.set(
|
||||
plugin.id,
|
||||
new SandyPluginInstance(
|
||||
new _SandyPluginInstance(
|
||||
getFlipperLibImplementation(),
|
||||
plugin,
|
||||
this,
|
||||
@@ -301,7 +301,7 @@ export default class Client extends EventEmitter {
|
||||
// TODO: needs to be wrapped in error tracking T68955280
|
||||
this.sandyPluginStates.set(
|
||||
plugin.id,
|
||||
new SandyPluginInstance(getFlipperLibImplementation(), plugin, this),
|
||||
new _SandyPluginInstance(getFlipperLibImplementation(), plugin, this),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user