Self inspection
Summary: let's finally inspect flipper with flipper! Here we have: 1) a self inspection client which implements FlipperClient interface from js sdk and FlipperClientConnection. It links back and front parts of self inspection 2) simple plugin (UI) to show messages 3) back part of that plugin - it sends all received messages to UI part via client 4) we initialize self inspection for dev builds only P. S. filesystem dependency will be replaced with npm one before I ship it (need to publish to npm first) Reviewed By: mweststrate Differential Revision: D22524533 fbshipit-source-id: 5c77e2f7b50e24ff7314e791a4dfe3c349dccdee
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7dbcfc89b0
commit
d28e763cca
@@ -33,6 +33,7 @@ import {WebsocketClientFlipperConnection} from './utils/js-client-server-utils/w
|
||||
import querystring from 'querystring';
|
||||
import {IncomingMessage} from 'http';
|
||||
import ws from 'ws';
|
||||
import {initSelfInpector} from './utils/self-inspection/selfInspectionUtils';
|
||||
|
||||
type ClientInfo = {
|
||||
connection: FlipperClientConnection<any, any> | null | undefined;
|
||||
@@ -84,6 +85,13 @@ class Server extends EventEmitter {
|
||||
}
|
||||
|
||||
init() {
|
||||
if (
|
||||
process.env.NODE_ENV === 'development' &&
|
||||
GK.get('flipper_self_inspection')
|
||||
) {
|
||||
initSelfInpector(this.store, this.logger, this, this.connections);
|
||||
}
|
||||
|
||||
const {insecure, secure} = this.store.getState().application.serverPorts;
|
||||
this.initialisePromise = this.certificateProvider
|
||||
.loadSecureServerConfig()
|
||||
|
||||
Reference in New Issue
Block a user