@codebolt/codeboltjs 1.1.39 → 1.1.40
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/index.d.ts +1 -1
- package/modules/chat.d.ts +3 -3
- package/modules/chat.js +1 -1
- package/package.json +2 -2
- package/src/modules/chat.ts +3 -3
package/index.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ declare class Codebolt {
|
|
|
84
84
|
eventNames(): (string | symbol)[];
|
|
85
85
|
} | undefined;
|
|
86
86
|
sendMessage: (message: string) => void;
|
|
87
|
-
waitforReply: (message: string) => Promise<
|
|
87
|
+
waitforReply: (message: string) => Promise<import("@codebolt/types").UserMessage>;
|
|
88
88
|
processStarted: () => {
|
|
89
89
|
event: {
|
|
90
90
|
[EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
|
package/modules/chat.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
|
-
import { ChatMessage } from '@codebolt/types';
|
|
3
|
+
import { ChatMessage, UserMessage } from '@codebolt/types';
|
|
4
4
|
/**
|
|
5
5
|
* CustomEventEmitter class that extends the Node.js EventEmitter class.
|
|
6
6
|
*/
|
|
@@ -28,9 +28,9 @@ declare const cbchat: {
|
|
|
28
28
|
/**
|
|
29
29
|
* Waits for a reply to a sent message.
|
|
30
30
|
* @param {string} message - The message for which a reply is expected.
|
|
31
|
-
* @returns {Promise<
|
|
31
|
+
* @returns {Promise<UserMessage>} A promise that resolves with the reply.
|
|
32
32
|
*/
|
|
33
|
-
waitforReply: (message: string) => Promise<
|
|
33
|
+
waitforReply: (message: string) => Promise<UserMessage>;
|
|
34
34
|
/**
|
|
35
35
|
* Notifies the server that a process has started and sets up an event listener for stopProcessClicked events.
|
|
36
36
|
* @returns An object containing the event emitter and a stopProcess method.
|
package/modules/chat.js
CHANGED
|
@@ -62,7 +62,7 @@ const cbchat = {
|
|
|
62
62
|
/**
|
|
63
63
|
* Waits for a reply to a sent message.
|
|
64
64
|
* @param {string} message - The message for which a reply is expected.
|
|
65
|
-
* @returns {Promise<
|
|
65
|
+
* @returns {Promise<UserMessage>} A promise that resolves with the reply.
|
|
66
66
|
*/
|
|
67
67
|
waitforReply: (message) => {
|
|
68
68
|
return new Promise((resolve, reject) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codebolt/codeboltjs",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.40",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"homepage": "https://codeboltai.github.io",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@codebolt/types": "^1.0.
|
|
21
|
+
"@codebolt/types": "^1.0.10",
|
|
22
22
|
"tree-sitter": "^0.21.1",
|
|
23
23
|
"tree-sitter-javascript": "^0.21.2",
|
|
24
24
|
"typedoc-plugin-missing-exports": "^2.2.0",
|
package/src/modules/chat.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// chat.ts
|
|
2
2
|
import cbws from './websocket';
|
|
3
3
|
import { EventEmitter } from 'events';
|
|
4
|
-
import {ChatMessage} from '@codebolt/types'
|
|
4
|
+
import {ChatMessage,UserMessage} from '@codebolt/types'
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -63,9 +63,9 @@ const cbchat = {
|
|
|
63
63
|
/**
|
|
64
64
|
* Waits for a reply to a sent message.
|
|
65
65
|
* @param {string} message - The message for which a reply is expected.
|
|
66
|
-
* @returns {Promise<
|
|
66
|
+
* @returns {Promise<UserMessage>} A promise that resolves with the reply.
|
|
67
67
|
*/
|
|
68
|
-
waitforReply: (message: string): Promise<
|
|
68
|
+
waitforReply: (message: string): Promise<UserMessage> => {
|
|
69
69
|
return new Promise((resolve, reject) => {
|
|
70
70
|
cbws.getWebsocket.send(JSON.stringify({
|
|
71
71
|
"type": "waitforReply",
|