Add device-find, client-find server commands
Reviewed By: passy Differential Revision: D36098171 fbshipit-source-id: f0d0bbefcafc57a6413f9ffe8da271419c0d4deb
This commit is contained in:
committed by
Facebook GitHub Bot
parent
50111ef24b
commit
3dd7583fdc
@@ -340,6 +340,9 @@ export class FlipperServerImpl implements FlipperServer {
|
||||
),
|
||||
'get-config': async () => this.config,
|
||||
'get-changelog': getChangelog,
|
||||
'device-find': async (deviceSerial) => {
|
||||
return this.devices.get(deviceSerial)?.info;
|
||||
},
|
||||
'device-list': async () => {
|
||||
return Array.from(this.devices.values()).map((d) => d.info);
|
||||
},
|
||||
@@ -363,6 +366,9 @@ export class FlipperServerImpl implements FlipperServer {
|
||||
}
|
||||
device.sendCommand(command);
|
||||
},
|
||||
'client-find': async (clientId) => {
|
||||
return this.server.connections.get(clientId)?.client;
|
||||
},
|
||||
'client-list': async () => {
|
||||
return Array.from(this.server.connections.values()).map((c) => c.client);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user