@@ -14,27 +14,25 @@ try {
1414 const prefix = core . getInput ( 'prefix' ) || 'json' ;
1515
1616 const fullPath = path . resolve ( fileName ) ;
17- console . log ( `Processing file: ${ fullPath } ` ) ;
17+ core . info ( `Processing file: ${ fullPath } ` ) ;
1818
1919 const rawdata = fs . readFileSync ( fullPath ) ;
2020 const rootObj = JSON . parse ( rawdata ) ;
2121
22- const provessVariable = ( variable , name ) => {
22+ const processVariable = ( variable , name ) => {
2323
2424 if ( typeof variable === 'undefined' || variable === null ) {
2525 return ;
2626 }
2727
28- if ( Array . isArray ( variable ) ) {
29-
28+ if ( Array . isArray ( variable ) ) {
3029 variable . forEach ( ( value , index ) => {
31- provessVariable ( value , `${ name } _${ index } _ ` ) ;
30+ processVariable ( value , `${ name } _${ index } ` ) ;
3231 } ) ;
33-
3432 }
3533 else if ( typeof variable === 'object' ) {
3634 for ( const field in variable ) {
37- provessVariable ( variable [ field ] , `${ name } _${ field } ` ) ;
35+ processVariable ( variable [ field ] , `${ name } _${ field } ` ) ;
3836 }
3937 }
4038 else {
4341 }
4442 } ;
4543
46- provessVariable ( rootObj , prefix ) ;
44+ processVariable ( rootObj , prefix ) ;
4745
48-
4946} catch ( error ) {
5047 core . setFailed ( error . message ) ;
5148}
0 commit comments