diff --git a/src/chrome/PluginDebugger.js b/src/chrome/PluginDebugger.js index 9cb9148be..6a57d1672 100644 --- a/src/chrome/PluginDebugger.js +++ b/src/chrome/PluginDebugger.js @@ -120,7 +120,7 @@ class PluginDebugger extends Component { pluginPath: ?string, ) { return { - key: name, + key: name.toLowerCase(), columns: { lamp: {value: }, name: {value: {name}}, @@ -142,14 +142,13 @@ class PluginDebugger extends Component { value: this.getSupportedClients(name), }, source: { - value: - pluginPath && pluginPath.startsWith(remote.app.getAppPath()) ? ( - bundled - ) : ( - - {pluginPath} - - ), + value: pluginPath ? ( + + {pluginPath} + + ) : ( + bundled + ), }, }, }; @@ -168,6 +167,12 @@ class PluginDebugger extends Component { getRows() { let rows = []; + + // bundled plugins are loaded from the defaultPlugins directory within + // Flipper's package. + const externalPluginPath = (p: PluginDefinition) => + p.out.startsWith('./defaultPlugins/') ? null : p.entry; + this.props.gatekeepedPlugins.forEach(plugin => rows.push( this.buildRow( @@ -176,7 +181,7 @@ class PluginDebugger extends Component { 'GK disabled', plugin.gatekeeper, false, - plugin.entry, + externalPluginPath(plugin), ), ), ); @@ -191,7 +196,7 @@ class PluginDebugger extends Component { plugin.gatekeeper, true, // $FlowFixMe: Flow doesn't know this is inherited from FlipperBasePlugin - plugin.entry, + externalPluginPath(plugin), ), ), ); @@ -206,20 +211,34 @@ class PluginDebugger extends Component { plugin.gatekeeper, true, // $FlowFixMe: Flow doesn't know this is inherited from FlipperBasePlugin - plugin.entry, + externalPluginPath(plugin), ), ), ); this.props.disabledPlugins.forEach(plugin => rows.push( - this.buildRow(plugin.name, false, 'disabled', null, null, plugin.entry), + this.buildRow( + plugin.name, + false, + 'disabled', + null, + null, + externalPluginPath(plugin), + ), ), ); this.props.failedPlugins.forEach(([plugin, status]) => rows.push( - this.buildRow(plugin.name, false, status, null, null, plugin.entry), + this.buildRow( + plugin.name, + false, + status, + null, + null, + externalPluginPath(plugin), + ), ), );