@@ -244,7 +244,7 @@ function function2node(data, options) {
244244 var nodeTemplate = fs . readFileSync ( path . join ( __dirname , '../templates/function/node.js.mustache' ) , 'utf-8' ) ;
245245 var nodeSourceCode = mustache . render ( nodeTemplate , params ) ;
246246 if ( options . obfuscate ) {
247- nodeSourceCode = obfuscator . obfuscate ( nodeSourceCode , { stringArrayEncoding : 'rc4' } ) ;
247+ nodeSourceCode = obfuscator . obfuscate ( nodeSourceCode , { stringArrayEncoding : 'rc4' } ) . getObfuscatedCode ( ) ;
248248 }
249249 fs . writeFileSync ( path . join ( data . dst , data . module , 'node.js' ) , nodeSourceCode ) ;
250250
@@ -386,7 +386,7 @@ function swagger2node(data, options) {
386386 beautify : false
387387 } ) ;
388388 if ( options . obfuscate ) {
389- nodejsSourceCode = obfuscator . obfuscate ( nodejsSourceCode , { stringArrayEncoding : 'rc4' } ) ;
389+ nodejsSourceCode = obfuscator . obfuscate ( nodejsSourceCode , { stringArrayEncoding : 'rc4' } ) . getObfuscatedCode ( ) ;
390390 }
391391 fs . writeFileSync ( path . join ( data . dst , data . module , 'lib.js' ) , nodejsSourceCode ) ;
392392
@@ -456,7 +456,7 @@ function swagger2node(data, options) {
456456 beautify : false
457457 } ) ;
458458 if ( options . obfuscate ) {
459- nodeSourceCode = obfuscator . obfuscate ( nodeSourceCode , { stringArrayEncoding : 'rc4' } ) ;
459+ nodeSourceCode = obfuscator . obfuscate ( nodeSourceCode , { stringArrayEncoding : 'rc4' } ) . getObfuscatedCode ( ) ;
460460 }
461461 fs . writeFileSync ( path . join ( data . dst , data . module , 'node.js' ) , nodeSourceCode ) ;
462462
@@ -759,7 +759,7 @@ function wottd2node(data, options) {
759759 const nodeTemplate = fs . readFileSync ( path . join ( __dirname , '../templates/webofthings/node.js.mustache' ) , 'utf-8' ) ;
760760 let nodeSourceCode = mustache . render ( nodeTemplate , data ) ;
761761 if ( options . obfuscate ) {
762- nodeSourceCode = obfuscator . obfuscate ( nodeSourceCode , { stringArrayEncoding : 'rc4' } ) ;
762+ nodeSourceCode = obfuscator . obfuscate ( nodeSourceCode , { stringArrayEncoding : 'rc4' } ) . getObfuscatedCode ( ) ;
763763 }
764764 fs . writeFileSync ( path . join ( data . dst , data . module , 'node.js' ) , nodeSourceCode ) ;
765765
0 commit comments