@codebolt/codeboltjs 1.0.4 → 1.0.5

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.
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ // chat.ts
7
+ const websocket_1 = __importDefault(require("./websocket"));
8
+ const events_1 = require("events");
9
+ /**
10
+ * CustomEventEmitter class that extends the Node.js EventEmitter class.
11
+ */
12
+ class CustomEventEmitter extends events_1.EventEmitter {
13
+ }
14
+ /**
15
+ * Chat module to interact with the WebSocket server.
16
+ */
17
+ const cbchat = {
18
+ eventEmitter: new CustomEventEmitter(),
19
+ /**
20
+ * Sends a message through the WebSocket connection.
21
+ * @param {string} message - The message to be sent.
22
+ */
23
+ sendMessage(message) {
24
+ console.log(message);
25
+ websocket_1.default.getWebsocket.send(JSON.stringify({
26
+ "type": "sendMessage",
27
+ "message": message
28
+ }));
29
+ },
30
+ /**
31
+ * Waits for a reply to a sent message.
32
+ * @param {string} message - The message for which a reply is expected.
33
+ * @returns {Promise<any>} A promise that resolves with the reply.
34
+ */
35
+ waitforReply(message) {
36
+ return new Promise((resolve, reject) => {
37
+ websocket_1.default.getWebsocket.send(JSON.stringify({
38
+ "type": "waitforReply",
39
+ "message": message
40
+ }));
41
+ websocket_1.default.getWebsocket.on('message', (data) => {
42
+ const response = JSON.parse(data);
43
+ if (response.type === "messageResponse") {
44
+ resolve(response); // Resolve the Promise with the response data
45
+ }
46
+ });
47
+ });
48
+ },
49
+ /**
50
+ * Notifies the server that a process has started and sets up an event listener for stopProcessClicked events.
51
+ * @returns An object containing the event emitter and a stopProcess method.
52
+ */
53
+ processStarted() {
54
+ // Send the process started message
55
+ websocket_1.default.getWebsocket.send(JSON.stringify({
56
+ "type": "processStarted"
57
+ }));
58
+ // Register event listener for WebSocket messages
59
+ websocket_1.default.getWebsocket.on('message', (data) => {
60
+ const message = JSON.parse(data);
61
+ console.log("Received message:", message);
62
+ if (message.type === 'stopProcessClicked')
63
+ // Emit a custom event based on the message type
64
+ this.eventEmitter.emit("stopProcessClicked", message);
65
+ });
66
+ // Return an object that includes the event emitter and the stopProcess method
67
+ return {
68
+ event: this.eventEmitter,
69
+ stopProcess: () => {
70
+ // Implement the logic to stop the process here
71
+ console.log("Stopping process...");
72
+ // For example, you might want to send a specific message to the server to stop the process
73
+ websocket_1.default.getWebsocket.send(JSON.stringify({
74
+ "type": "processStoped"
75
+ }));
76
+ }
77
+ };
78
+ }
79
+ };
80
+ exports.default = cbchat;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * A collection of code parser functions.
3
+ */
4
+ declare const cbcodeparsers: {
5
+ /**
6
+ * Retrieves the classes in a given file.
7
+ * @param file The file to parse for classes.
8
+ */
9
+ getClassesInFile: (file: any) => void;
10
+ /**
11
+ * Retrieves the functions in a given class within a file.
12
+ * @param file The file containing the class.
13
+ * @param className The name of the class to parse for functions.
14
+ */
15
+ getFunctionsinClass: (file: any, className: any) => void;
16
+ /**
17
+ * Generates an Abstract Syntax Tree (AST) for a given file.
18
+ * @param file The file to generate an AST for.
19
+ * @param className The name of the class to focus the AST generation on.
20
+ */
21
+ getAstTreeInFile: (file: any, className: any) => void;
22
+ };
23
+ export default cbcodeparsers;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * A collection of code parser functions.
5
+ */
6
+ const cbcodeparsers = {
7
+ /**
8
+ * Retrieves the classes in a given file.
9
+ * @param file The file to parse for classes.
10
+ */
11
+ getClassesInFile: (file) => {
12
+ console.log('Code parsers initialized');
13
+ },
14
+ /**
15
+ * Retrieves the functions in a given class within a file.
16
+ * @param file The file containing the class.
17
+ * @param className The name of the class to parse for functions.
18
+ */
19
+ getFunctionsinClass: (file, className) => {
20
+ console.log('Code parsers initialized');
21
+ },
22
+ /**
23
+ * Generates an Abstract Syntax Tree (AST) for a given file.
24
+ * @param file The file to generate an AST for.
25
+ * @param className The name of the class to focus the AST generation on.
26
+ */
27
+ getAstTreeInFile: (file, className) => {
28
+ }
29
+ };
30
+ exports.default = cbcodeparsers;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * A utility module for working with code.
3
+ */
4
+ declare const cbcodeutils: {
5
+ /**
6
+ * Asynchronously generates a code tree from the provided source code.
7
+ * @param {any} fileName - The name of the file.
8
+ * @param {any} source - The source code to generate the tree from.
9
+ * @param {any} filePath - The file path where the source code is located.
10
+ * @returns {Promise<any>} A promise that resolves with the code tree.
11
+ */
12
+ getCodeTree: (fileName: any, source: any, filePath: any) => Promise<any>;
13
+ };
14
+ export default cbcodeutils;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * A utility module for working with code.
5
+ */
6
+ const cbcodeutils = {
7
+ /**
8
+ * Asynchronously generates a code tree from the provided source code.
9
+ * @param {any} fileName - The name of the file.
10
+ * @param {any} source - The source code to generate the tree from.
11
+ * @param {any} filePath - The file path where the source code is located.
12
+ * @returns {Promise<any>} A promise that resolves with the code tree.
13
+ */
14
+ getCodeTree: (fileName, source, filePath) => {
15
+ return new Promise((resolve, reject) => {
16
+ // Implementation would go here
17
+ });
18
+ }
19
+ };
20
+ exports.default = cbcodeutils;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * A module for controlling a web crawler through WebSocket messages.
3
+ */
4
+ declare const cbcrawler: {
5
+ /**
6
+ * Starts the crawler.
7
+ */
8
+ start: () => void;
9
+ /**
10
+ * Takes a screenshot using the crawler.
11
+ */
12
+ screenshot: () => void;
13
+ /**
14
+ * Directs the crawler to navigate to a specified URL.
15
+ * @param url - The URL for the crawler to navigate to.
16
+ */
17
+ goToPage: (url: string) => void;
18
+ /**
19
+ * Scrolls the crawler in a specified direction.
20
+ * @param direction - The direction to scroll ('up', 'down', 'left', 'right').
21
+ */
22
+ scroll: (direction: string) => void;
23
+ /**
24
+ * Simulates a click event on an element with the specified ID.
25
+ * @param id - The ID of the element to be clicked.
26
+ * @returns {Promise<any>} A promise that resolves when the click action is complete.
27
+ */
28
+ click: (id: string) => Promise<unknown>;
29
+ /**
30
+ * Types the provided text into an element with the specified ID.
31
+ * @param id - The ID of the element where text will be typed.
32
+ * @param text - The text to type into the element.
33
+ * @returns {Promise<any>} A promise that resolves when the type action is complete.
34
+ */
35
+ type: (id: string, text: string) => Promise<unknown>;
36
+ /**
37
+ * Simulates the Enter key press using the crawler.
38
+ */
39
+ enter: () => void;
40
+ /**
41
+ * Initiates a crawl process.
42
+ */
43
+ crawl: () => void;
44
+ };
45
+ export default cbcrawler;
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const websocket_1 = __importDefault(require("./websocket"));
7
+ /**
8
+ * A module for controlling a web crawler through WebSocket messages.
9
+ */
10
+ const cbcrawler = {
11
+ /**
12
+ * Starts the crawler.
13
+ */
14
+ start: () => {
15
+ websocket_1.default.getWebsocket.send(JSON.stringify({
16
+ "type": "crawlerEvent",
17
+ action: 'start'
18
+ }));
19
+ },
20
+ /**
21
+ * Takes a screenshot using the crawler.
22
+ */
23
+ screenshot: () => {
24
+ websocket_1.default.getWebsocket.send(JSON.stringify({
25
+ "type": "crawlerEvent",
26
+ action: 'screenshot'
27
+ }));
28
+ },
29
+ /**
30
+ * Directs the crawler to navigate to a specified URL.
31
+ * @param url - The URL for the crawler to navigate to.
32
+ */
33
+ goToPage: (url) => {
34
+ websocket_1.default.getWebsocket.send(JSON.stringify({
35
+ "type": "crawlerEvent",
36
+ action: 'goToPage',
37
+ url
38
+ }));
39
+ },
40
+ /**
41
+ * Scrolls the crawler in a specified direction.
42
+ * @param direction - The direction to scroll ('up', 'down', 'left', 'right').
43
+ */
44
+ scroll: (direction) => {
45
+ websocket_1.default.getWebsocket.send(JSON.stringify({
46
+ "type": "crawlerEvent",
47
+ action: 'scroll',
48
+ direction
49
+ }));
50
+ },
51
+ /**
52
+ * Simulates a click event on an element with the specified ID.
53
+ * @param id - The ID of the element to be clicked.
54
+ * @returns {Promise<any>} A promise that resolves when the click action is complete.
55
+ */
56
+ click: (id) => {
57
+ return new Promise((resolve, reject) => {
58
+ websocket_1.default.getWebsocket.send(JSON.stringify({
59
+ "type": "crawlerEvent",
60
+ action: 'click',
61
+ id
62
+ }));
63
+ websocket_1.default.getWebsocket.on('message', (data) => {
64
+ const response = JSON.parse(data);
65
+ if (response.event === "clickFinished") {
66
+ resolve(response);
67
+ }
68
+ });
69
+ });
70
+ },
71
+ /**
72
+ * Types the provided text into an element with the specified ID.
73
+ * @param id - The ID of the element where text will be typed.
74
+ * @param text - The text to type into the element.
75
+ * @returns {Promise<any>} A promise that resolves when the type action is complete.
76
+ */
77
+ type: (id, text) => {
78
+ return new Promise((resolve, reject) => {
79
+ websocket_1.default.getWebsocket.send(JSON.stringify({
80
+ "type": "crawlerEvent",
81
+ action: 'type',
82
+ id,
83
+ text
84
+ }));
85
+ websocket_1.default.getWebsocket.on('message', (data) => {
86
+ const response = JSON.parse(data);
87
+ if (response.event === "typeFinished") {
88
+ resolve(response);
89
+ }
90
+ });
91
+ });
92
+ },
93
+ /**
94
+ * Simulates the Enter key press using the crawler.
95
+ */
96
+ enter: () => {
97
+ websocket_1.default.getWebsocket.send(JSON.stringify({
98
+ "type": "crawlerEvent",
99
+ action: 'enter'
100
+ }));
101
+ },
102
+ /**
103
+ * Initiates a crawl process.
104
+ */
105
+ crawl: () => {
106
+ websocket_1.default.getWebsocket.send(JSON.stringify({
107
+ "type": "crawlerEvent",
108
+ action: 'crawl'
109
+ }));
110
+ }
111
+ };
112
+ exports.default = cbcrawler;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * A module for handling in-memory database operations via WebSocket.
3
+ */
4
+ declare const dbmemory: {
5
+ /**
6
+ * Adds a key-value pair to the in-memory database.
7
+ * @param {string} key - The key under which to store the value.
8
+ * @param {any} value - The value to be stored.
9
+ * @returns {Promise<any>} A promise that resolves with the response from the memory set event.
10
+ */
11
+ addKnowledge: (key: string, value: any) => Promise<any>;
12
+ /**
13
+ * Retrieves a value from the in-memory database by key.
14
+ * @param {string} key - The key of the value to retrieve.
15
+ * @returns {Promise<any>} A promise that resolves with the response from the memory get event.
16
+ */
17
+ getKnowledge: (key: string) => Promise<any>;
18
+ };
19
+ export default dbmemory;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const websocket_1 = __importDefault(require("./websocket"));
7
+ /**
8
+ * A module for handling in-memory database operations via WebSocket.
9
+ */
10
+ const dbmemory = {
11
+ /**
12
+ * Adds a key-value pair to the in-memory database.
13
+ * @param {string} key - The key under which to store the value.
14
+ * @param {any} value - The value to be stored.
15
+ * @returns {Promise<any>} A promise that resolves with the response from the memory set event.
16
+ */
17
+ addKnowledge: (key, value) => {
18
+ return new Promise((resolve, reject) => {
19
+ websocket_1.default.getWebsocket.send(JSON.stringify({
20
+ "type": "memoryEvent",
21
+ 'action': 'set',
22
+ key,
23
+ value
24
+ }));
25
+ websocket_1.default.getWebsocket.on('message', (data) => {
26
+ const response = JSON.parse(data);
27
+ if (response.type === "memorySetResponse") {
28
+ resolve(response); // Resolve the Promise with the response data
29
+ }
30
+ });
31
+ });
32
+ },
33
+ /**
34
+ * Retrieves a value from the in-memory database by key.
35
+ * @param {string} key - The key of the value to retrieve.
36
+ * @returns {Promise<any>} A promise that resolves with the response from the memory get event.
37
+ */
38
+ getKnowledge: (key) => {
39
+ return new Promise((resolve, reject) => {
40
+ websocket_1.default.getWebsocket.send(JSON.stringify({
41
+ "type": "memoryEvent",
42
+ 'action': 'get',
43
+ key
44
+ }));
45
+ websocket_1.default.getWebsocket.on('message', (data) => {
46
+ const response = JSON.parse(data);
47
+ if (response.type === "memoryGetResponse") {
48
+ resolve(response); // Resolve the Promise with the response data
49
+ }
50
+ });
51
+ });
52
+ }
53
+ };
54
+ exports.default = dbmemory;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * A module for document utility functions.
3
+ */
4
+ declare const cbdocutils: {
5
+ /**
6
+ * Converts a PDF document to text.
7
+ * @param pdf_path - The file path to the PDF document to be converted.
8
+ * @returns {Promise<string>} A promise that resolves with the converted text.
9
+ */
10
+ pdf_to_text: (pdf_path: any) => Promise<string>;
11
+ };
12
+ export default cbdocutils;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * A module for document utility functions.
5
+ */
6
+ const cbdocutils = {
7
+ /**
8
+ * Converts a PDF document to text.
9
+ * @param pdf_path - The file path to the PDF document to be converted.
10
+ * @returns {Promise<string>} A promise that resolves with the converted text.
11
+ */
12
+ pdf_to_text: (pdf_path) => {
13
+ // Implementation would go here
14
+ return new Promise((resolve, reject) => {
15
+ // PDF to text conversion logic
16
+ });
17
+ }
18
+ };
19
+ exports.default = cbdocutils;
@@ -0,0 +1,57 @@
1
+ /**
2
+ * @module cbfs
3
+ * @description This module provides functionality to interact with the filesystem.
4
+ */
5
+ declare const cbfs: {
6
+ /**
7
+ * @function createFile
8
+ * @description Creates a new file.
9
+ * @param {string} fileName - The name of the file to create.
10
+ * @param {string} source - The source content to write into the file.
11
+ * @param {string} filePath - The path where the file should be created.
12
+ * @returns {Promise<any>} A promise that resolves with the server response.
13
+ */
14
+ createFile: (fileName: string, source: string, filePath: string) => Promise<any>;
15
+ /**
16
+ * @function createFolder
17
+ * @description Creates a new folder.
18
+ * @param {string} folderName - The name of the folder to create.
19
+ * @param {string} folderPath - The path where the folder should be created.
20
+ * @returns {Promise<any>} A promise that resolves with the server response.
21
+ */
22
+ createFolder: (folderName: string, folderPath: string) => Promise<any>;
23
+ /**
24
+ * @function readFile
25
+ * @description Reads the content of a file.
26
+ * @param {string} filename - The name of the file to read.
27
+ * @param {string} filePath - The path of the file to read.
28
+ * @returns {Promise<any>} A promise that resolves with the server response.
29
+ */
30
+ readFile: (filename: string, filePath: string) => Promise<any>;
31
+ /**
32
+ * @function updateFile
33
+ * @description Updates the content of a file.
34
+ * @param {string} filename - The name of the file to update.
35
+ * @param {string} filePath - The path of the file to update.
36
+ * @param {string} newContent - The new content to write into the file.
37
+ * @returns {Promise<any>} A promise that resolves with the server response.
38
+ */
39
+ updateFile: (filename: string, filePath: string, newContent: string) => Promise<any>;
40
+ /**
41
+ * @function deleteFile
42
+ * @description Deletes a file.
43
+ * @param {string} filename - The name of the file to delete.
44
+ * @param {string} filePath - The path of the file to delete.
45
+ * @returns {Promise<any>} A promise that resolves with the server response.
46
+ */
47
+ deleteFile: (filename: string, filePath: string) => Promise<any>;
48
+ /**
49
+ * @function deleteFolder
50
+ * @description Deletes a folder.
51
+ * @param {string} foldername - The name of the folder to delete.
52
+ * @param {string} folderpath - The path of the folder to delete.
53
+ * @returns {Promise<any>} A promise that resolves with the server response.
54
+ */
55
+ deleteFolder: (foldername: string, folderpath: string) => Promise<any>;
56
+ };
57
+ export default cbfs;
package/modules/fs.js ADDED
@@ -0,0 +1,167 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const websocket_1 = __importDefault(require("./websocket"));
7
+ /**
8
+ * @module cbfs
9
+ * @description This module provides functionality to interact with the filesystem.
10
+ */
11
+ const cbfs = {
12
+ /**
13
+ * @function createFile
14
+ * @description Creates a new file.
15
+ * @param {string} fileName - The name of the file to create.
16
+ * @param {string} source - The source content to write into the file.
17
+ * @param {string} filePath - The path where the file should be created.
18
+ * @returns {Promise<any>} A promise that resolves with the server response.
19
+ */
20
+ createFile: (fileName, source, filePath) => {
21
+ return new Promise((resolve, reject) => {
22
+ websocket_1.default.getWebsocket.send(JSON.stringify({
23
+ "type": "fsEvent",
24
+ "action": "createFile",
25
+ "message": {
26
+ fileName,
27
+ source,
28
+ filePath
29
+ },
30
+ }));
31
+ websocket_1.default.getWebsocket.on('message', (data) => {
32
+ const response = JSON.parse(data);
33
+ if (response.type === "createFileResponse") {
34
+ resolve(response);
35
+ }
36
+ });
37
+ });
38
+ },
39
+ /**
40
+ * @function createFolder
41
+ * @description Creates a new folder.
42
+ * @param {string} folderName - The name of the folder to create.
43
+ * @param {string} folderPath - The path where the folder should be created.
44
+ * @returns {Promise<any>} A promise that resolves with the server response.
45
+ */
46
+ createFolder: (folderName, folderPath) => {
47
+ return new Promise((resolve, reject) => {
48
+ websocket_1.default.getWebsocket.send(JSON.stringify({
49
+ "type": "fsEvent",
50
+ "action": "createFolder",
51
+ "message": {
52
+ folderName,
53
+ folderPath
54
+ },
55
+ }));
56
+ websocket_1.default.getWebsocket.on('message', (data) => {
57
+ const response = JSON.parse(data);
58
+ if (response.type === "createFolderResponse") {
59
+ resolve(response);
60
+ }
61
+ });
62
+ });
63
+ },
64
+ /**
65
+ * @function readFile
66
+ * @description Reads the content of a file.
67
+ * @param {string} filename - The name of the file to read.
68
+ * @param {string} filePath - The path of the file to read.
69
+ * @returns {Promise<any>} A promise that resolves with the server response.
70
+ */
71
+ readFile: (filename, filePath) => {
72
+ return new Promise((resolve, reject) => {
73
+ websocket_1.default.getWebsocket.send(JSON.stringify({
74
+ "type": "fsEvent",
75
+ "action": "readFile",
76
+ "message": {
77
+ filename,
78
+ filePath
79
+ },
80
+ }));
81
+ websocket_1.default.getWebsocket.on('message', (data) => {
82
+ const response = JSON.parse(data);
83
+ if (response.type === "readFileResponse") {
84
+ resolve(response);
85
+ }
86
+ });
87
+ });
88
+ },
89
+ /**
90
+ * @function updateFile
91
+ * @description Updates the content of a file.
92
+ * @param {string} filename - The name of the file to update.
93
+ * @param {string} filePath - The path of the file to update.
94
+ * @param {string} newContent - The new content to write into the file.
95
+ * @returns {Promise<any>} A promise that resolves with the server response.
96
+ */
97
+ updateFile: (filename, filePath, newContent) => {
98
+ return new Promise((resolve, reject) => {
99
+ websocket_1.default.getWebsocket.send(JSON.stringify({
100
+ "type": "fsEvent",
101
+ "action": "updateFile",
102
+ "message": {
103
+ filename,
104
+ filePath,
105
+ newContent
106
+ },
107
+ }));
108
+ websocket_1.default.getWebsocket.on('message', (data) => {
109
+ const response = JSON.parse(data);
110
+ if (response.type === "commandOutput") {
111
+ resolve(response);
112
+ }
113
+ });
114
+ });
115
+ },
116
+ /**
117
+ * @function deleteFile
118
+ * @description Deletes a file.
119
+ * @param {string} filename - The name of the file to delete.
120
+ * @param {string} filePath - The path of the file to delete.
121
+ * @returns {Promise<any>} A promise that resolves with the server response.
122
+ */
123
+ deleteFile: (filename, filePath) => {
124
+ return new Promise((resolve, reject) => {
125
+ websocket_1.default.getWebsocket.send(JSON.stringify({
126
+ "type": "fsEvent",
127
+ "action": "deleteFile",
128
+ "message": {
129
+ filename,
130
+ filePath
131
+ },
132
+ }));
133
+ websocket_1.default.getWebsocket.on('message', (data) => {
134
+ const response = JSON.parse(data);
135
+ if (response.type === "deleteFileResponse") {
136
+ resolve(response);
137
+ }
138
+ });
139
+ });
140
+ },
141
+ /**
142
+ * @function deleteFolder
143
+ * @description Deletes a folder.
144
+ * @param {string} foldername - The name of the folder to delete.
145
+ * @param {string} folderpath - The path of the folder to delete.
146
+ * @returns {Promise<any>} A promise that resolves with the server response.
147
+ */
148
+ deleteFolder: (foldername, folderpath) => {
149
+ return new Promise((resolve, reject) => {
150
+ websocket_1.default.getWebsocket.send(JSON.stringify({
151
+ "type": "fsEvent",
152
+ "action": "deleteFolder",
153
+ "message": {
154
+ foldername,
155
+ folderpath
156
+ },
157
+ }));
158
+ websocket_1.default.getWebsocket.on('message', (data) => {
159
+ const response = JSON.parse(data);
160
+ if (response.type === "deleteFolderResponse") {
161
+ resolve(response);
162
+ }
163
+ });
164
+ });
165
+ }
166
+ };
167
+ exports.default = cbfs;