@codebolt/codeboltjs 1.1.97 → 1.1.99
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/websocket.js +2 -1
- package/package.json +1 -1
- package/src/modules/websocket.ts +2 -1
package/modules/websocket.js
CHANGED
|
@@ -52,7 +52,8 @@ class cbws {
|
|
|
52
52
|
const initialMessage = this.getInitialMessage();
|
|
53
53
|
const agentIdParam = process.env.agentId ? `&agentId=${process.env.agentId}` : '';
|
|
54
54
|
const parentIdParam = process.env.parentId ? `&parentId=${process.env.parentId}` : '';
|
|
55
|
-
|
|
55
|
+
const parentAgentInstanceIdParam = process.env.parentAgentInstanceId ? `&parentAgentInstanceId=${process.env.parentAgentInstanceId}` : '';
|
|
56
|
+
this.websocket = new ws_1.default(`ws://localhost:${process.env.SOCKET_PORT}/codebolt?id=${uniqueConnectionId}${agentIdParam}${parentIdParam}${parentAgentInstanceIdParam}${process.env.Is_Dev ? '&dev=true' : ''}`);
|
|
56
57
|
return new Promise((resolve, reject) => {
|
|
57
58
|
this.websocket.on('error', (error) => {
|
|
58
59
|
reject(error);
|
package/package.json
CHANGED
package/src/modules/websocket.ts
CHANGED
|
@@ -55,7 +55,8 @@ class cbws {
|
|
|
55
55
|
|
|
56
56
|
const agentIdParam = process.env.agentId ? `&agentId=${process.env.agentId}` : '';
|
|
57
57
|
const parentIdParam = process.env.parentId ? `&parentId=${process.env.parentId}` : '';
|
|
58
|
-
|
|
58
|
+
const parentAgentInstanceIdParam = process.env.parentAgentInstanceId ? `&parentAgentInstanceId=${process.env.parentAgentInstanceId}` : '';
|
|
59
|
+
this.websocket = new WebSocket(`ws://localhost:${process.env.SOCKET_PORT}/codebolt?id=${uniqueConnectionId}${agentIdParam}${parentIdParam}${parentAgentInstanceIdParam}${process.env.Is_Dev ? '&dev=true' : ''}`);
|
|
59
60
|
|
|
60
61
|
return new Promise((resolve, reject) => {
|
|
61
62
|
this.websocket.on('error', (error: Error) => {
|