@codebolt/codeboltjs 1.1.61 → 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.
- package/modules/terminal.js +3 -3
- package/modules/websocket.js +1 -1
- package/package.json +1 -1
- package/src/modules/terminal.ts +3 -3
- package/src/modules/websocket.ts +1 -1
- package/tsconfig.json +1 -1
package/modules/terminal.js
CHANGED
|
@@ -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
|
-
|
|
101
|
-
|
|
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/modules/websocket.js
CHANGED
|
@@ -17,7 +17,7 @@ class cbws {
|
|
|
17
17
|
const uniqueConnectionId = this.getUniqueConnectionId();
|
|
18
18
|
const initialMessage = this.getInitialMessage();
|
|
19
19
|
console.log(uniqueConnectionId);
|
|
20
|
-
this.websocket = new ws_1.default(`ws://localhost
|
|
20
|
+
this.websocket = new ws_1.default(`ws://localhost:${process.env.SOCKET_PORT}/codebolt?id=${uniqueConnectionId}`);
|
|
21
21
|
this.initializeWebSocket(initialMessage).catch(error => {
|
|
22
22
|
console.error("WebSocket connection failed:", error);
|
|
23
23
|
});
|
package/package.json
CHANGED
package/src/modules/terminal.ts
CHANGED
|
@@ -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
|
-
|
|
102
|
-
|
|
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
|
package/src/modules/websocket.ts
CHANGED
|
@@ -15,7 +15,7 @@ class cbws {
|
|
|
15
15
|
const uniqueConnectionId = this.getUniqueConnectionId();
|
|
16
16
|
const initialMessage = this.getInitialMessage();
|
|
17
17
|
console.log(uniqueConnectionId)
|
|
18
|
-
this.websocket = new WebSocket(`ws://localhost
|
|
18
|
+
this.websocket = new WebSocket(`ws://localhost:${process.env.SOCKET_PORT}/codebolt?id=${uniqueConnectionId}`);
|
|
19
19
|
this.initializeWebSocket(initialMessage).catch(error => {
|
|
20
20
|
console.error("WebSocket connection failed:", error);
|
|
21
21
|
});
|
package/tsconfig.json
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
33
33
|
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
34
34
|
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
|
35
|
-
|
|
35
|
+
"types": ["node"], /* Specify type package names to be included without being referenced in a source file. */
|
|
36
36
|
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
37
37
|
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
|
|
38
38
|
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
|