Rename server as ServerController
Summary: In the file server.tsx was defined the Server type. Server is being renamed to ServerController and the new file is ServerController.tsx This is the last diff where things are being moved or renamed in a way that will make harder to review future changes. Reviewed By: fabiomassimo Differential Revision: D29912626 fbshipit-source-id: ae583671d98823a10f7efceeefd8215621f59dcf
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3e334e1a0e
commit
8bb47a38a1
@@ -64,7 +64,7 @@ function transformCertificateExchangeMediumToType(
|
||||
}
|
||||
}
|
||||
|
||||
declare interface Server {
|
||||
declare interface ServerController {
|
||||
on(event: 'new-client', callback: (client: Client) => void): this;
|
||||
on(event: 'error', callback: (err: Error) => void): this;
|
||||
on(event: 'clients-change', callback: () => void): this;
|
||||
@@ -81,7 +81,7 @@ function appNameWithUpdateHint(query: ClientQuery): string {
|
||||
return query.app;
|
||||
}
|
||||
|
||||
class Server extends EventEmitter {
|
||||
class ServerController extends EventEmitter {
|
||||
connections: Map<string, ClientInfo>;
|
||||
secureServer: Promise<RSocketServer<any, any>> | null;
|
||||
insecureServer: Promise<RSocketServer<any, any>> | null;
|
||||
@@ -677,4 +677,4 @@ async function findDeviceForConnection(
|
||||
);
|
||||
}
|
||||
|
||||
export default Server;
|
||||
export default ServerController;
|
||||
@@ -7,7 +7,7 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import Server from '../comms/server';
|
||||
import ServerController from '../comms/ServerController';
|
||||
|
||||
import {Store} from '../reducers/index';
|
||||
import {Logger} from '../fb-interfaces/Logger';
|
||||
@@ -22,7 +22,7 @@ import {notification, Typography} from 'antd';
|
||||
import {ACTIVE_SHEET_SIGN_IN, setActiveSheet} from '../reducers/application';
|
||||
|
||||
export default (store: Store, logger: Logger) => {
|
||||
const server = new Server(logger, store);
|
||||
const server = new ServerController(logger, store);
|
||||
server.init();
|
||||
|
||||
server.addListener('new-client', (client: Client) => {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
import {Logger} from '../fb-interfaces/Logger';
|
||||
import {internGraphPOSTAPIRequest} from '../fb-stubs/user';
|
||||
import Server from '../comms/server';
|
||||
import ServerController from '../comms/ServerController';
|
||||
import {promisify} from 'util';
|
||||
import fs from 'fs';
|
||||
import fsExtra from 'fs-extra';
|
||||
@@ -87,9 +87,9 @@ export default class CertificateProvider {
|
||||
adb: Promise<ADBClient>;
|
||||
certificateSetup: Promise<void>;
|
||||
store: Store;
|
||||
server: Server;
|
||||
server: ServerController;
|
||||
|
||||
constructor(server: Server, logger: Logger, store: Store) {
|
||||
constructor(server: ServerController, logger: Logger, store: Store) {
|
||||
this.logger = logger;
|
||||
this.adb = getAdbClient(store);
|
||||
this.certificateSetup = reportPlatformFailures(
|
||||
|
||||
@@ -16,7 +16,7 @@ import {Logger} from '../../fb-interfaces/Logger';
|
||||
|
||||
import {Payload, ConnectionStatus, ISubscriber} from 'rsocket-types';
|
||||
import {Flowable, Single} from 'rsocket-flowable';
|
||||
import Server from '../../comms/server';
|
||||
import ServerController from '../../comms/ServerController';
|
||||
import {buildClientId} from '../clientUtils';
|
||||
import {destroyDevice} from '../../reducers/connections';
|
||||
|
||||
@@ -31,7 +31,7 @@ function jsDeviceId(windowId: number): string {
|
||||
export function initJsEmulatorIPC(
|
||||
store: Store,
|
||||
logger: Logger,
|
||||
flipperServer: Server,
|
||||
flipperServer: ServerController,
|
||||
flipperConnections: Map<
|
||||
string,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user