@@ -15,10 +15,6 @@ const findDirectoryPath = (targetDirectoryName) => {
1515 path : path . join ( pathToCheck , folder . name ) ,
1616 } ) ) ;
1717 const rpcDirectory = path . join ( folders [ 0 ] . path , "rpc" ) ;
18-
19- console . log ( "rpcDirectory" , rpcDirectory ) ;
20- console . log ( "folders[0].name" , folders [ 0 ] . name ) ;
21-
2218 return [ rpcDirectory , folders [ 0 ] . name ] ;
2319} ;
2420
@@ -36,21 +32,13 @@ function return_json_schema(directoryPath, folder_path, project_name) {
3632 } ) ) ;
3733 var folders_schemas = { } ;
3834 folders . forEach ( ( folder ) => {
39- console . log ( "folder" , folder ) ;
4035 if ( folder . name == "schemas" ) {
41- console . log ( "schemas" ) ;
42- console . log ( "folder.path" , folder . path ) ;
43- console . log ( "test" , path . join ( folder . path , "/*.json" ) ) ;
44- var jsonFiles = glob . sync ( path . join ( folder . path , "/*.json" ) ) ;
45- console . log ( "jsonFiles" , jsonFiles ) ;
36+ const jsonFiles = glob . sync ( path . join ( folder . path , "**/*.json" ) ) ;
4637 var schemas = { } ;
47-
4838 jsonFiles . forEach ( ( filePath ) => {
49- console . log ( "filePath" , filePath ) ;
5039 try {
5140 const fileContent = fs . readFileSync ( filePath , "utf8" ) ;
5241 var jsonData = JSON . parse ( fileContent ) ;
53- console . log ( "jsonData" , jsonData ) ;
5442 var filename = filePath
5543 . replace ( / ^ .* [ \\ / ] / , "" )
5644 . replace ( / \. [ ^ / . ] + $ / , "" ) ;
0 commit comments