@codebolt/codeboltjs 1.1.62 → 1.1.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -96,9 +96,9 @@ const cbterminal = {
96
96
  websocket_1.default.getWebsocket.on('message', (data) => {
97
97
  const response = JSON.parse(data);
98
98
  console.log("Received message:", response);
99
- if (response.type === "commandOutput" || response.type === "commandError" || response.type === "commandFinish")
100
- // Emit a custom event based on the message type
101
- this.eventEmitter.emit("serverEvents", response.response);
99
+ if (response.type === "commandOutput" || response.type === "commandError" || response.type === "commandFinish") {
100
+ this.eventEmitter.emit(response.type, response);
101
+ }
102
102
  });
103
103
  // Return an object that includes the event emitter and the stopProcess method
104
104
  return this.eventEmitter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebolt/codeboltjs",
3
- "version": "1.1.62",
3
+ "version": "1.1.63",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "",
@@ -97,9 +97,9 @@ const cbterminal = {
97
97
  cbws.getWebsocket.on('message', (data: string) => {
98
98
  const response = JSON.parse(data);
99
99
  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
+ }
103
103
  });
104
104
 
105
105
  // Return an object that includes the event emitter and the stopProcess method