File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @codebolt/codeboltjs" ,
3- "version" : " 1.1.35 " ,
3+ "version" : " 1.1.36 " ,
44 "description" : " " ,
55 "keywords" : [],
66 "author" : " " ,
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ const cbcodeutils = {
1616 * @param {string } filePath - The path of the file to retrieve the JS tree for.
1717 * @returns {Promise<GetJsTreeResponse> } A promise that resolves with the JS tree response.
1818 */
19- getJsTree : ( filePath ?: string ) : Promise < GetJsTreeResponse > => {
19+ getJsTree : ( filePath ?: string ) : Promise < any > => {
2020 return new Promise ( async ( resolve , reject ) => {
2121 cbws . getWebsocket . send ( JSON . stringify ( {
2222 "type" : "settingEvent" ,
@@ -62,10 +62,10 @@ const cbcodeutils = {
6262 trees . push ( tree ) ;
6363 }
6464
65- return trees ; // Return an array of abstract syntax trees (ASTs)
65+ resolve ( { event : 'GetJsTreeResponse' , payload : trees } ) ; // Return an array of abstract syntax trees (ASTs)
6666 } catch ( error ) {
6767 console . error ( 'An error occurred:' , error ) ;
68- return null ; // Return null in case of error
68+ return { event : 'GetJsTreeResponse' , payload : null } ; // Return null in case of error
6969 }
7070 }
7171 } ) ;
You can’t perform that action at this time.
0 commit comments