PluginDebugger
Summary: _typescript_ Reviewed By: jknoxville Differential Revision: D17282352 fbshipit-source-id: 7f285156d1dd0468ebc607dc359cc1f30cfe2831
This commit is contained in:
committed by
Facebook Github Bot
parent
0e6ba5c4e2
commit
bf6ca07d09
@@ -18,6 +18,8 @@ import {
|
|||||||
styled,
|
styled,
|
||||||
colors,
|
colors,
|
||||||
Link,
|
Link,
|
||||||
|
FlipperPlugin,
|
||||||
|
FlipperDevicePlugin,
|
||||||
} from 'flipper';
|
} from 'flipper';
|
||||||
import StatusIndicator from '../ui/components/StatusIndicator';
|
import StatusIndicator from '../ui/components/StatusIndicator';
|
||||||
import {State as Store} from '../reducers';
|
import {State as Store} from '../reducers';
|
||||||
@@ -59,7 +61,7 @@ const TableContainer = styled('div')({
|
|||||||
display: 'flex',
|
display: 'flex',
|
||||||
});
|
});
|
||||||
|
|
||||||
const Lamp = props => (
|
const Lamp = (props: {on: boolean}) => (
|
||||||
<StatusIndicator statusColor={props.on ? colors.lime : colors.red} />
|
<StatusIndicator statusColor={props.on ? colors.lime : colors.red} />
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -69,8 +71,8 @@ type StateFromProps = {
|
|||||||
failedPlugins: Array<[PluginDefinition, string]>;
|
failedPlugins: Array<[PluginDefinition, string]>;
|
||||||
clients: Array<Client>;
|
clients: Array<Client>;
|
||||||
selectedDevice: string | null | undefined;
|
selectedDevice: string | null | undefined;
|
||||||
devicePlugins: Array<PluginDefinition>;
|
devicePlugins: Array<typeof FlipperDevicePlugin>;
|
||||||
clientPlugins: Array<PluginDefinition>;
|
clientPlugins: Array<typeof FlipperPlugin>;
|
||||||
};
|
};
|
||||||
|
|
||||||
type DispatchFromProps = {};
|
type DispatchFromProps = {};
|
||||||
@@ -165,7 +167,7 @@ class PluginDebugger extends Component<Props> {
|
|||||||
|
|
||||||
// bundled plugins are loaded from the defaultPlugins directory within
|
// bundled plugins are loaded from the defaultPlugins directory within
|
||||||
// Flipper's package.
|
// Flipper's package.
|
||||||
const externalPluginPath = (p: PluginDefinition) =>
|
const externalPluginPath = (p: any) =>
|
||||||
p.out
|
p.out
|
||||||
? p.out.startsWith('./defaultPlugins/')
|
? p.out.startsWith('./defaultPlugins/')
|
||||||
? null
|
? null
|
||||||
@@ -327,8 +329,10 @@ export default connect<StateFromProps, DispatchFromProps, OwnProps, Store>(
|
|||||||
},
|
},
|
||||||
connections: {clients, selectedDevice},
|
connections: {clients, selectedDevice},
|
||||||
}) => ({
|
}) => ({
|
||||||
devicePlugins: Array.from(devicePlugins.values()),
|
devicePlugins: Array.from<typeof FlipperDevicePlugin>(
|
||||||
clientPlugins: Array.from(clientPlugins.values()),
|
devicePlugins.values(),
|
||||||
|
),
|
||||||
|
clientPlugins: Array.from<typeof FlipperPlugin>(clientPlugins.values()),
|
||||||
gatekeepedPlugins,
|
gatekeepedPlugins,
|
||||||
clients,
|
clients,
|
||||||
disabledPlugins,
|
disabledPlugins,
|
||||||
|
|||||||
Reference in New Issue
Block a user