@@ -15,10 +15,6 @@ const findDirectoryPath = (targetDirectoryName) => {
15
15
path : path . join ( pathToCheck , folder . name ) ,
16
16
} ) ) ;
17
17
const rpcDirectory = path . join ( folders [ 0 ] . path , "rpc" ) ;
18
-
19
- console . log ( "rpcDirectory" , rpcDirectory ) ;
20
- console . log ( "folders[0].name" , folders [ 0 ] . name ) ;
21
-
22
18
return [ rpcDirectory , folders [ 0 ] . name ] ;
23
19
} ;
24
20
@@ -36,21 +32,13 @@ function return_json_schema(directoryPath, folder_path, project_name) {
36
32
} ) ) ;
37
33
var folders_schemas = { } ;
38
34
folders . forEach ( ( folder ) => {
39
- console . log ( "folder" , folder ) ;
40
35
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" ) ) ;
46
37
var schemas = { } ;
47
-
48
38
jsonFiles . forEach ( ( filePath ) => {
49
- console . log ( "filePath" , filePath ) ;
50
39
try {
51
40
const fileContent = fs . readFileSync ( filePath , "utf8" ) ;
52
41
var jsonData = JSON . parse ( fileContent ) ;
53
- console . log ( "jsonData" , jsonData ) ;
54
42
var filename = filePath
55
43
. replace ( / ^ .* [ \\ / ] / , "" )
56
44
. replace ( / \. [ ^ / . ] + $ / , "" ) ;
0 commit comments