From 60b3ff99cebe9e4e32cdc83edb10a5de81367174 Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Mon, 10 Jul 2023 05:52:07 -0700 Subject: [PATCH] Troubleshoot FlipperServer support Summary: Add neessary types and events to troubleshoot connectivity. Reviewed By: antonk52 Differential Revision: D47293373 fbshipit-source-id: 9ffbe07e5c71ba0d8ab1c58cd322eaab22141f12 --- desktop/flipper-common/src/server-types.tsx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/desktop/flipper-common/src/server-types.tsx b/desktop/flipper-common/src/server-types.tsx index 44f7a8724..68179c0de 100644 --- a/desktop/flipper-common/src/server-types.tsx +++ b/desktop/flipper-common/src/server-types.tsx @@ -76,6 +76,24 @@ export type DeviceLogLevel = | 'error' | 'fatal'; +export type ConnectionRecordEntry = { + time: Date; + type: 'cmd' | 'info' | 'error'; + device: string; + app: string; + message: string; + medium: CertificateExchangeMedium; +}; + +export type CommandRecordEntry = ConnectionRecordEntry & { + cmd: string; + description: string; + success: boolean; + stdout?: string; + stderr?: string; + troubleshoot?: string; +}; + export type UninitializedClient = { os: string; deviceName: string; @@ -141,6 +159,8 @@ export type FlipperServerEvents = { id: string; message: string; }; + 'connectivity-troubleshoot-cmd': CommandRecordEntry; + 'connectivity-troubleshoot-log': ConnectionRecordEntry; 'plugins-server-add-on-message': ExecuteMessage; 'download-file-update': DownloadFileUpdate; 'server-log': LoggerInfo;