Back out "Back out "[flipper][js] JS apps support 1/n""
Summary: Original commit changeset: ff84080d43fa This re-adds JS client support. The original version had a small bug that inadvertantly wrapped support for Android emulators in the dropdown in a GK that was only meant to cover JS clients. This is addressed here. Reviewed By: timur-valiev Differential Revision: D18707485 fbshipit-source-id: ceea8e279a21111f96073f8b784e852f6313e2a4
This commit is contained in:
committed by
Facebook Github Bot
parent
e99f2bcd8b
commit
0a7c57f5a0
@@ -16,6 +16,7 @@ import {RSocketServer} from 'rsocket-core';
|
||||
import RSocketTCPServer from 'rsocket-tcp-server';
|
||||
import {Single} from 'rsocket-flowable';
|
||||
import Client from './Client';
|
||||
import {FlipperClientConnection} from './Client';
|
||||
import {UninitializedClient} from './UninitializedClient';
|
||||
import {reportPlatformFailures} from './utils/metrics';
|
||||
import EventEmitter from 'events';
|
||||
@@ -23,9 +24,11 @@ import invariant from 'invariant';
|
||||
import tls from 'tls';
|
||||
import net, {Socket} from 'net';
|
||||
import {Responder, Payload, ReactiveSocket} from 'rsocket-types';
|
||||
import GK from './fb-stubs/GK';
|
||||
import {initJsEmulatorIPC} from './utils/js-client/serverUtils';
|
||||
|
||||
type ClientInfo = {
|
||||
connection: ReactiveSocket<any, any> | null | undefined;
|
||||
connection: FlipperClientConnection<any, any> | null | undefined;
|
||||
client: Client;
|
||||
};
|
||||
|
||||
@@ -83,6 +86,11 @@ class Server extends EventEmitter {
|
||||
return;
|
||||
});
|
||||
reportPlatformFailures(this.initialisePromise, 'initializeServer');
|
||||
|
||||
if (GK.get('flipper_js_client_emulator')) {
|
||||
initJsEmulatorIPC(this.store, this.logger, this, this.connections);
|
||||
}
|
||||
|
||||
return this.initialisePromise;
|
||||
}
|
||||
|
||||
@@ -303,7 +311,7 @@ class Server extends EventEmitter {
|
||||
}
|
||||
|
||||
async addConnection(
|
||||
conn: ReactiveSocket<any, any>,
|
||||
conn: FlipperClientConnection<any, any>,
|
||||
query: ClientQuery,
|
||||
csrQuery: ClientCsrQuery,
|
||||
): Promise<Client> {
|
||||
|
||||
Reference in New Issue
Block a user