Install plugin from package file
Summary: Adding a way to install plugins directly from package files. This is required for testing after packaging format changes. Stage 1: refactored the plugin manager component file layout, no functional changes. Reviewed By: jknoxville Differential Revision: D19741085 fbshipit-source-id: bd9d72382ddc4894de5b3cd9a71877c799886fbf
This commit is contained in:
committed by
Facebook Github Bot
parent
9280b3178d
commit
07bc0088ef
@@ -41,7 +41,7 @@ import {Logger} from './fb-interfaces/Logger';
|
||||
import BugReporter from './fb-stubs/BugReporter';
|
||||
import {State as Store} from './reducers/index';
|
||||
import {StaticView, FlipperError} from './reducers/connections';
|
||||
import PluginManager from './chrome/PluginManager';
|
||||
import PluginManager from './chrome/plugin-manager/PluginManager';
|
||||
import StatusBar from './chrome/StatusBar';
|
||||
import SettingsSheet from './chrome/SettingsSheet';
|
||||
import DoctorSheet from './chrome/DoctorSheet';
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {PluginDefinition} from '../dispatcher/plugins';
|
||||
import Client from '../Client';
|
||||
import {TableBodyRow} from '../ui/components/table/types';
|
||||
import {PluginDefinition} from '../../dispatcher/plugins';
|
||||
import Client from '../../Client';
|
||||
import {TableBodyRow} from '../../ui/components/table/types';
|
||||
import React, {Component, Fragment} from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
import {
|
||||
@@ -22,8 +22,8 @@ import {
|
||||
FlipperDevicePlugin,
|
||||
Bordered,
|
||||
} from 'flipper';
|
||||
import StatusIndicator from '../ui/components/StatusIndicator';
|
||||
import {State as Store} from '../reducers';
|
||||
import StatusIndicator from '../../ui/components/StatusIndicator';
|
||||
import {State as Store} from '../../reducers';
|
||||
|
||||
const InfoText = styled(Text)({
|
||||
lineHeight: '130%',
|
||||
@@ -31,13 +31,13 @@ import {SearchIndex} from 'algoliasearch';
|
||||
import {SearchResponse} from '@algolia/client-search';
|
||||
import path from 'path';
|
||||
import fs from 'fs-extra';
|
||||
import {reportPlatformFailures, reportUsage} from '../utils/metrics';
|
||||
import restartFlipper from '../utils/restartFlipper';
|
||||
import {reportPlatformFailures, reportUsage} from '../../utils/metrics';
|
||||
import restartFlipper from '../../utils/restartFlipper';
|
||||
import {
|
||||
PluginMap,
|
||||
PluginDefinition,
|
||||
registerInstalledPlugins,
|
||||
} from '../reducers/pluginManager';
|
||||
} from '../../reducers/pluginManager';
|
||||
import {
|
||||
PLUGIN_DIR,
|
||||
readInstalledPlugins,
|
||||
@@ -45,8 +45,8 @@ import {
|
||||
provideSearchIndex,
|
||||
findPluginUpdates as _findPluginUpdates,
|
||||
UpdateResult,
|
||||
} from '../utils/pluginManager';
|
||||
import {State as AppState} from '../reducers';
|
||||
} from '../../utils/pluginManager';
|
||||
import {State as AppState} from '../../reducers';
|
||||
import {connect} from 'react-redux';
|
||||
import {Dispatch, Action} from 'redux';
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
import {annotatePluginsWithUpdates} from '../PluginInstaller';
|
||||
import {UpdateResult} from '../../utils/pluginManager';
|
||||
import {UpdateResult} from '../../../utils/pluginManager';
|
||||
|
||||
test('annotatePluginsWithUpdates', async () => {
|
||||
const installedPlugins = new Map([
|
||||
@@ -34,7 +34,6 @@ test('dispatcher dispatches REGISTER_PLUGINS', () => {
|
||||
test('getDynamicPlugins returns empty array on errors', () => {
|
||||
ipcRenderer.sendSync = jest.fn();
|
||||
ipcRenderer.sendSync.mockImplementation(() => {
|
||||
console.log('aaa');
|
||||
throw new Error('ooops');
|
||||
});
|
||||
const res = getDynamicPlugins();
|
||||
|
||||
Reference in New Issue
Block a user