Move devices to server folder

Summary:
This is the first of many diffs that extracts the connection, device, client detection out of the flipper core, to create a reusable flipper-server library that can be used in e.g. flipper-dump.

To keep diffs a little smaller, the current connection logic is first moved to the `server/` directory, and decoupled manually from the rest of the core, before moving it over to a separate package.

This first diffs moves the `comms/`, `devices/` and certificate utilities to the `server` directory.

Further untangling will follow in next diffs

Reviewed By: timur-valiev

Differential Revision: D30246551

fbshipit-source-id: c84259bfb1239119b3267a51b015e30c3c080866
This commit is contained in:
Michel Weststrate
2021-08-12 05:42:32 -07:00
committed by Facebook GitHub Bot
parent 5e350add4f
commit 5e8c968222
86 changed files with 273 additions and 172 deletions

View File

@@ -8,7 +8,7 @@
*/
import {PluginDefinition} from './plugin';
import BaseDevice, {OS} from './devices/BaseDevice';
import BaseDevice, {OS} from './server/devices/BaseDevice';
import {Logger} from './fb-interfaces/Logger';
import {Store} from './reducers/index';
import {performance} from 'perf_hooks';
@@ -16,10 +16,9 @@ import {reportPluginFailures} from './utils/metrics';
import {default as isProduction} from './utils/isProduction';
import {EventEmitter} from 'events';
import invariant from 'invariant';
import {
getPluginKey,
defaultEnabledBackgroundPlugins,
} from './utils/pluginUtils';
import {getPluginKey} from './utils/pluginKey';
import {defaultEnabledBackgroundPlugins} from './utils/pluginUtils';
import {processMessagesLater} from './utils/messageQueue';
import {emitBytesReceived} from './dispatcher/tracking';
import {debounce} from 'lodash';
@@ -36,7 +35,7 @@ import {
ConnectionStatus,
ErrorType,
ClientConnection,
} from './comms/ClientConnection';
} from './server/comms/ClientConnection';
type Plugins = Set<string>;
type PluginsArr = Array<string>;