fix(daemon): Fix daemon describe handler to return correct process info and config; bump @push.rocks/smartipc to ^2.2.2
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@git.zone/tspm',
|
||||
version: '4.3.0',
|
||||
version: '4.3.1',
|
||||
description: 'a no fuzz process manager'
|
||||
}
|
||||
|
@@ -207,16 +207,14 @@ export class TspmDaemon {
|
||||
this.ipcServer.onMessage(
|
||||
'describe',
|
||||
async (request: RequestForMethod<'describe'>) => {
|
||||
const processInfo = await this.tspmInstance.describe(request.id);
|
||||
const config = this.tspmInstance.processConfigs.get(request.id);
|
||||
|
||||
if (!processInfo || !config) {
|
||||
const result = await this.tspmInstance.describe(request.id);
|
||||
if (!result) {
|
||||
throw new Error(`Process ${request.id} not found`);
|
||||
}
|
||||
|
||||
// Return correctly shaped response
|
||||
return {
|
||||
processInfo,
|
||||
config,
|
||||
processInfo: result.info,
|
||||
config: result.config,
|
||||
};
|
||||
},
|
||||
);
|
||||
|
Reference in New Issue
Block a user