@@ -31,32 +31,34 @@ export async function key_sequenceLogic(
3131) : Promise < ToolResponse > {
3232 const toolName = 'key_sequence' ;
3333 const simUuidValidation = validateRequiredParam ( 'simulatorUuid' , params . simulatorUuid ) ;
34- if ( ! simUuidValidation . isValid ) return simUuidValidation . errorResponse ;
34+ if ( ! simUuidValidation . isValid ) return simUuidValidation . errorResponse ! ;
3535 const keyCodesValidation = validateRequiredParam ( 'keyCodes' , params . keyCodes ) ;
36- if ( ! keyCodesValidation . isValid ) return keyCodesValidation . errorResponse ;
36+ if ( ! keyCodesValidation . isValid ) return keyCodesValidation . errorResponse ! ;
3737
3838 const { simulatorUuid, keyCodes, delay } = params ;
39- const commandArgs = [ 'key-sequence' , '--keycodes' , keyCodes . join ( ',' ) ] ;
39+ const commandArgs = [ 'key-sequence' , '--keycodes' , ( keyCodes as number [ ] ) . join ( ',' ) ] ;
4040 if ( delay !== undefined ) {
4141 commandArgs . push ( '--delay' , String ( delay ) ) ;
4242 }
4343
4444 log (
4545 'info' ,
46- `${ LOG_PREFIX } /${ toolName } : Starting key sequence [${ keyCodes . join ( ',' ) } ] on ${ simulatorUuid } ` ,
46+ `${ LOG_PREFIX } /${ toolName } : Starting key sequence [${ ( keyCodes as number [ ] ) . join ( ',' ) } ] on ${ simulatorUuid } ` ,
4747 ) ;
4848
4949 try {
5050 await executeAxeCommand (
5151 commandArgs ,
52- simulatorUuid ,
52+ simulatorUuid as string ,
5353 'key-sequence' ,
5454 executor ,
5555 getAxePathFn ,
5656 getBundledAxeEnvironmentFn ,
5757 ) ;
5858 log ( 'info' , `${ LOG_PREFIX } /${ toolName } : Success for ${ simulatorUuid } ` ) ;
59- return createTextResponse ( `Key sequence [${ keyCodes . join ( ',' ) } ] executed successfully.` ) ;
59+ return createTextResponse (
60+ `Key sequence [${ ( keyCodes as number [ ] ) . join ( ',' ) } ] executed successfully.` ,
61+ ) ;
6062 } catch ( error ) {
6163 log ( 'error' , `${ LOG_PREFIX } /${ toolName } : Failed - ${ error } ` ) ;
6264 if ( error instanceof DependencyError ) {
@@ -144,7 +146,7 @@ async function executeAxeCommand(
144146 ) ;
145147 }
146148
147- return result . output . trim ( ) ;
149+ return createTextResponse ( result . output . trim ( ) ) ;
148150 } catch ( error ) {
149151 if ( error instanceof Error ) {
150152 if ( error instanceof AxeError ) {
0 commit comments