@codebolt/codeboltjs 1.1.49 → 1.1.50

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.
@@ -58,7 +58,10 @@ class cbws {
58
58
  this.websocket.on('open', () => {
59
59
  console.log('WebSocket connected');
60
60
  if (this.websocket) {
61
- this.websocket.send(initialMessage);
61
+ this.websocket.send(JSON.stringify({
62
+ "type": "sendMessage",
63
+ "message": initialMessage
64
+ }));
62
65
  resolve(this.websocket);
63
66
  }
64
67
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebolt/codeboltjs",
3
- "version": "1.1.49",
3
+ "version": "1.1.50",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "",
@@ -23,7 +23,7 @@ class cbws {
23
23
  private getUniqueConnectionId(): string {
24
24
  try {
25
25
  let fileContents = fs.readFileSync('./codeboltagent.yml', 'utf8');
26
- let data:any = yaml.load(fileContents);
26
+ let data: any = yaml.load(fileContents);
27
27
  return data.unique_connectionid;
28
28
  } catch (e) {
29
29
  console.error('Unable to locate codeboltagent.yml file.');
@@ -34,7 +34,7 @@ class cbws {
34
34
  private getInitialMessage(): string {
35
35
  try {
36
36
  let fileContents = fs.readFileSync('./codeboltagent.yml', 'utf8');
37
- let data:any = yaml.load(fileContents);
37
+ let data: any = yaml.load(fileContents);
38
38
  return data.initial_message;
39
39
  } catch (e) {
40
40
  console.error('Unable to locate codeboltagent.yml file.');
@@ -57,7 +57,10 @@ class cbws {
57
57
  this.websocket.on('open', () => {
58
58
  console.log('WebSocket connected');
59
59
  if (this.websocket) {
60
- this.websocket.send(initialMessage);
60
+ this.websocket.send(JSON.stringify({
61
+ "type": "sendMessage",
62
+ "message": initialMessage
63
+ }));
61
64
  resolve(this.websocket);
62
65
  }
63
66
  });