Skip to content

Commit 7d9ea89

Browse files
changes in termial stream event command finished added
1 parent 9ce3ec2 commit 7d9ea89

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codebolt/codeboltjs",
3-
"version": "1.1.62",
3+
"version": "1.1.63",
44
"description": "",
55
"keywords": [],
66
"author": "",

src/modules/terminal.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ const cbterminal = {
9797
cbws.getWebsocket.on('message', (data: string) => {
9898
const response = JSON.parse(data);
9999
console.log("Received message:", response);
100-
if (response.type === "commandOutput" || response.type === "commandError" || response.type === "commandFinish")
101-
// Emit a custom event based on the message type
102-
this.eventEmitter.emit("serverEvents", response.response);
100+
if (response.type === "commandOutput" || response.type === "commandError" || response.type === "commandFinish") {
101+
this.eventEmitter.emit(response.type, response);
102+
}
103103
});
104104

105105
// Return an object that includes the event emitter and the stopProcess method

0 commit comments

Comments
 (0)