diff --git a/desktop/flipper-common/src/server-types.tsx b/desktop/flipper-common/src/server-types.tsx index 8aa620564..597e25a11 100644 --- a/desktop/flipper-common/src/server-types.tsx +++ b/desktop/flipper-common/src/server-types.tsx @@ -299,6 +299,7 @@ export type FlipperServerCommands = { 'intern-upload-scribe-logs': ( messages: {category: string; message: string}[], ) => Promise; + shutdown: () => Promise; }; export type GraphResponse = { diff --git a/desktop/flipper-server-core/src/FlipperServerImpl.tsx b/desktop/flipper-server-core/src/FlipperServerImpl.tsx index 29fe4748c..213e6493c 100644 --- a/desktop/flipper-server-core/src/FlipperServerImpl.tsx +++ b/desktop/flipper-server-core/src/FlipperServerImpl.tsx @@ -478,6 +478,9 @@ export class FlipperServerImpl implements FlipperServer { return internGraphGETAPIRequest(endpoint, params, options, token); }, 'intern-upload-scribe-logs': sendScribeLogs, + shutdown: async () => { + process.exit(0); + }, }; registerDevice(device: ServerDevice) {