@@ -491,16 +491,16 @@ export default class MicroserviceType {
491491 if ( '%message' === type ) {
492492 requirements [ 'message' ] = true ;
493493 switch ( options [ 'position' ] ) {
494- case 'before' : return ` ${ conditionCode || '' } await message(${ this . stringifyForHook ( config [ 'topic' ] , options ) } , ${ args ? ( Array . isArray ( args ) ? ( < any > args ) . join ( ', ' ) : args ) : 'undefined' } , undefined, query);` ;
495- case 'after' : return ` ${ conditionCode || '' } await message(${ this . stringifyForHook ( config [ 'topic' ] , options ) } , ${ args ? ( Array . isArray ( args ) ? ( < any > args ) . join ( ', ' ) : args ) : 'undefined' } , result, query);` ;
494+ case 'before' : return ` ${ conditionCode || '' } await message(${ this . stringifyForHook ( config [ 'topic' ] , options ) } , ${ args ? ( Array . isArray ( args ) ? ( < any > args ) . map ( x => this . stringifyValueForHook ( `' ${ x } '` , options ) ) . join ( ', ' ) : args ) : 'undefined' } , undefined, query);` ;
495+ case 'after' : return ` ${ conditionCode || '' } await message(${ this . stringifyForHook ( config [ 'topic' ] , options ) } , ${ args ? ( Array . isArray ( args ) ? ( < any > args ) . map ( x => this . stringifyValueForHook ( `' ${ x } '` , options ) ) . join ( ', ' ) : args ) : 'undefined' } , result, query);` ;
496496 default : return undefined ;
497497 }
498498 }
499499 if ( '%message:' === type . slice ( 0 , 9 ) ) {
500500 requirements [ 'message' ] = true ;
501501 switch ( options [ 'position' ] ) {
502- case 'before' : return ` ${ conditionCode || '' } await message(${ this . stringifyForHook ( type . slice ( 9 ) , options ) } , ${ args ? ( Array . isArray ( args ) ? ( < any > args ) . map ( x => this . stringifyValueForHook ( x , options ) ) . join ( ', ' ) : args ) : 'undefined' } , undefined, query);` ;
503- case 'after' : return ` ${ conditionCode || '' } await message(${ this . stringifyForHook ( type . slice ( 9 ) , options ) } , ${ args ? ( Array . isArray ( args ) ? ( < any > args ) . map ( x => this . stringifyValueForHook ( x , options ) ) . join ( ', ' ) : args ) : 'undefined' } , result, query);` ;
502+ case 'before' : return ` ${ conditionCode || '' } await message(${ this . stringifyForHook ( type . slice ( 9 ) , options ) } , ${ args ? ( Array . isArray ( args ) ? ( < any > args ) . map ( x => this . stringifyValueForHook ( `' ${ x } '` , options ) ) . join ( ', ' ) : args ) : 'undefined' } , undefined, query);` ;
503+ case 'after' : return ` ${ conditionCode || '' } await message(${ this . stringifyForHook ( type . slice ( 9 ) , options ) } , ${ args ? ( Array . isArray ( args ) ? ( < any > args ) . map ( x => this . stringifyValueForHook ( `' ${ x } '` , options ) ) . join ( ', ' ) : args ) : 'undefined' } , result, query);` ;
504504 default : return undefined ;
505505 }
506506 }
0 commit comments