@codebolt/codeboltjs 1.1.57 → 1.1.58

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
@@ -179,6 +179,7 @@ declare class Codebolt {
179
179
  project: {
180
180
  getProjectSettings: (output: any) => void;
181
181
  getProjectPath: () => Promise<import("@codebolt/types").GetProjectPathResponse>;
182
+ getRepoMap: (message: any) => Promise<import("@codebolt/types").GetProjectPathResponse>;
182
183
  runProject: () => void;
183
184
  };
184
185
  dbmemory: {
@@ -14,6 +14,7 @@ declare const cbproject: {
14
14
  * @returns {Promise<GetProjectPathResponse>} A promise that resolves with the project path response.
15
15
  */
16
16
  getProjectPath: () => Promise<GetProjectPathResponse>;
17
+ getRepoMap: (message: any) => Promise<GetProjectPathResponse>;
17
18
  runProject: () => void;
18
19
  };
19
20
  export default cbproject;
@@ -34,6 +34,21 @@ const cbproject = {
34
34
  });
35
35
  });
36
36
  },
37
+ getRepoMap: (message) => {
38
+ return new Promise((resolve, reject) => {
39
+ websocket_1.default.getWebsocket.send(JSON.stringify({
40
+ "type": "settingEvent",
41
+ "action": "getRepoMap",
42
+ message
43
+ }));
44
+ websocket_1.default.getWebsocket.on('message', (data) => {
45
+ const response = JSON.parse(data);
46
+ if (response.type === "getRepoMapResponse") {
47
+ resolve(response);
48
+ }
49
+ });
50
+ });
51
+ },
37
52
  runProject: () => {
38
53
  websocket_1.default.getWebsocket.send(JSON.stringify({
39
54
  "type": "runProject"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebolt/codeboltjs",
3
- "version": "1.1.57",
3
+ "version": "1.1.58",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "",
@@ -30,6 +30,21 @@ const cbproject = {
30
30
  });
31
31
  });
32
32
  },
33
+ getRepoMap: (message: any): Promise<GetProjectPathResponse> => {
34
+ return new Promise((resolve, reject) => {
35
+ cbws.getWebsocket.send(JSON.stringify({
36
+ "type": "settingEvent",
37
+ "action": "getRepoMap",
38
+ message
39
+ }));
40
+ cbws.getWebsocket.on('message', (data: string) => {
41
+ const response = JSON.parse(data);
42
+ if (response.type === "getRepoMapResponse") {
43
+ resolve(response);
44
+ }
45
+ });
46
+ });
47
+ },
33
48
  runProject: () => {
34
49
  cbws.getWebsocket.send(JSON.stringify({
35
50
  "type": "runProject"