@codebolt/codeboltjs 1.1.69 → 1.1.70

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 CHANGED
@@ -190,6 +190,7 @@ declare class Codebolt {
190
190
  getProjectPath: () => Promise<import("@codebolt/types").GetProjectPathResponse>;
191
191
  getRepoMap: (message: any) => Promise<import("@codebolt/types").GetProjectPathResponse>;
192
192
  runProject: () => void;
193
+ getEditorFileStatus: () => Promise<unknown>;
193
194
  };
194
195
  dbmemory: {
195
196
  addKnowledge: (key: string, value: any) => Promise<import("@codebolt/types").MemorySetResponse>;
@@ -16,5 +16,6 @@ declare const cbproject: {
16
16
  getProjectPath: () => Promise<GetProjectPathResponse>;
17
17
  getRepoMap: (message: any) => Promise<GetProjectPathResponse>;
18
18
  runProject: () => void;
19
+ getEditorFileStatus: () => Promise<unknown>;
19
20
  };
20
21
  export default cbproject;
@@ -54,5 +54,19 @@ const cbproject = {
54
54
  "type": "runProject"
55
55
  }));
56
56
  },
57
+ getEditorFileStatus: () => {
58
+ return new Promise((resolve, reject) => {
59
+ websocket_1.default.getWebsocket.send(JSON.stringify({
60
+ "type": "settingEvent",
61
+ "action": "getEditorFileStatus",
62
+ }));
63
+ websocket_1.default.getWebsocket.on('message', (data) => {
64
+ const response = JSON.parse(data);
65
+ if (response.type === "getEditorFileStatusResponse") {
66
+ resolve(response);
67
+ }
68
+ });
69
+ });
70
+ }
57
71
  };
58
72
  exports.default = cbproject;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebolt/codeboltjs",
3
- "version": "1.1.69",
3
+ "version": "1.1.70",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "",
@@ -50,5 +50,19 @@ const cbproject = {
50
50
  "type": "runProject"
51
51
  }));
52
52
  },
53
+ getEditorFileStatus:()=>{
54
+ return new Promise((resolve, reject) => {
55
+ cbws.getWebsocket.send(JSON.stringify({
56
+ "type": "settingEvent",
57
+ "action": "getEditorFileStatus",
58
+ }));
59
+ cbws.getWebsocket.on('message', (data: string) => {
60
+ const response = JSON.parse(data);
61
+ if (response.type === "getEditorFileStatusResponse") {
62
+ resolve(response);
63
+ }
64
+ });
65
+ });
66
+ }
53
67
  };
54
68
  export default cbproject