@@ -34,7 +34,11 @@ const mocks = rs.hoisted(() => {
3434 xCalls : [ ] as ExecCall [ ] ,
3535 taskLogEvents : [ ] as TaskLogEvent [ ] ,
3636 commandLogs : [ ] as string [ ] ,
37- promptOptions : [ ] as Array < { value : string ; label ?: string ; hint ?: string } > ,
37+ promptOptions : [ ] as Array < {
38+ value : string ;
39+ label ?: string ;
40+ hint ?: string ;
41+ } > ,
3842 } ;
3943
4044 function createExecStream ( result : ExecResult , lines : string [ ] = [ ] ) {
@@ -60,6 +64,7 @@ const mocks = rs.hoisted(() => {
6064 stderr : '' ,
6165 exitCode : 0 ,
6266 } ) ;
67+ // rslint-disable-next-line @typescript-eslint/no-explicit-any
6368 } ) as any ;
6469
6570 const xSync = rs . fn ( ( command : string , args : string [ ] , options : unknown ) => {
@@ -68,6 +73,7 @@ const mocks = rs.hoisted(() => {
6873 stderr : '' ,
6974 exitCode : 0 ,
7075 } ;
76+ // rslint-disable-next-line @typescript-eslint/no-explicit-any
7177 } ) as any ;
7278
7379 const spinner = ( ( ) => ( {
@@ -98,19 +104,21 @@ const mocks = rs.hoisted(() => {
98104 return taskLog ( { title } ) ;
99105 } ;
100106
101- const multiselect = rs . fn ( async ( options : {
102- message ?: string ;
103- options ?: Array < { value : unknown ; label ?: string ; hint ?: string } > ;
104- } ) => {
105- if ( options . message ?. includes ( 'Select optional skills' ) ) {
106- state . promptOptions = ( options . options ?? [ ] ) as Array < {
107- value : string ;
108- label ?: string ;
109- hint ?: string ;
110- } > ;
111- }
112- return [ ] ;
113- } ) as typeof promptsActual . multiselect ;
107+ const multiselect = rs . fn (
108+ async ( options : {
109+ message ?: string ;
110+ options ?: Array < { value : unknown ; label ?: string ; hint ?: string } > ;
111+ } ) => {
112+ if ( options . message ?. includes ( 'Select optional skills' ) ) {
113+ state . promptOptions = ( options . options ?? [ ] ) as Array < {
114+ value : string ;
115+ label ?: string ;
116+ hint ?: string ;
117+ } > ;
118+ }
119+ return [ ] ;
120+ } ,
121+ ) as typeof promptsActual . multiselect ;
114122
115123 return {
116124 state,
@@ -199,7 +207,10 @@ function createExecCommand(
199207 if ( 'then' in Object ( output ) ) {
200208 const promise = Promise . resolve ( output ) . then ( ( resolvedOutput ) =>
201209 'result' in resolvedOutput
202- ? mocks . createExecStream ( resolvedOutput . result , resolvedOutput . lines )
210+ ? mocks . createExecStream (
211+ resolvedOutput . result ,
212+ resolvedOutput . lines ,
213+ )
203214 : mocks . createExecStream ( resolvedOutput ) ,
204215 ) ;
205216
@@ -209,9 +220,13 @@ function createExecCommand(
209220 finally : promise . finally . bind ( promise ) ,
210221 async * [ Symbol . asyncIterator ] ( ) {
211222 const resolvedOutput = await output ;
212- const stream = 'result' in resolvedOutput
213- ? mocks . createExecStream ( resolvedOutput . result , resolvedOutput . lines )
214- : mocks . createExecStream ( resolvedOutput ) ;
223+ const stream =
224+ 'result' in resolvedOutput
225+ ? mocks . createExecStream (
226+ resolvedOutput . result ,
227+ resolvedOutput . lines ,
228+ )
229+ : mocks . createExecStream ( resolvedOutput ) ;
215230 for await ( const line of stream ) {
216231 yield line ;
217232 }
@@ -655,14 +670,7 @@ test('should skip skill installation when --dir and --template are used without
655670 source : 'vercel-labs/agent-skills' ,
656671 } ,
657672 ] ,
658- argv : [
659- 'node' ,
660- 'test' ,
661- '--dir' ,
662- projectDir ,
663- '--template' ,
664- 'vanilla' ,
665- ] ,
673+ argv : [ 'node' , 'test' , '--dir' , projectDir , '--template' , 'vanilla' ] ,
666674 } ) ;
667675
668676 expect ( calls ) . toHaveLength ( 0 ) ;
@@ -695,15 +703,7 @@ test('should prove --skill skips the skills prompt even without --dir and --temp
695703 source : 'vercel-labs/agent-skills' ,
696704 } ,
697705 ] ,
698- argv : [
699- 'node' ,
700- 'test' ,
701- projectDir ,
702- '--tools' ,
703- '' ,
704- '--skill' ,
705- 'git-url' ,
706- ] ,
706+ argv : [ 'node' , 'test' , projectDir , '--tools' , '' , '--skill' , 'git-url' ] ,
707707 } ) ;
708708
709709 expect ( skillsPromptReached ) . toBe ( false ) ;
@@ -1297,23 +1297,25 @@ test('should stream install output and show the command error in the task log wh
12971297
12981298test ( 'should order skill prompt options using pre, default, and post order' , async ( ) => {
12991299 const projectDir = path . join ( testDir , 'skills-ordering-proof' ) ;
1300- rs . mocked ( mocks . multiselect ) . mockImplementation ( async < Value , > ( {
1301- message,
1302- options,
1303- } : {
1304- message ?: string ;
1305- options ?: Array < { value : Value ; label ?: string ; hint ?: string } > ;
1306- } ) => {
1307- if ( message ?. includes ( 'Select optional skills' ) ) {
1308- mocks . state . promptOptions = ( options ?? [ ] ) as Array < {
1309- value : string ;
1310- label ?: string ;
1311- hint ?: string ;
1312- } > ;
1300+ rs . mocked ( mocks . multiselect ) . mockImplementation (
1301+ async < Value > ( {
1302+ message,
1303+ options,
1304+ } : {
1305+ message ?: string ;
1306+ options ?: Array < { value : Value ; label ?: string ; hint ?: string } > ;
1307+ } ) => {
1308+ if ( message ?. includes ( 'Select optional skills' ) ) {
1309+ mocks . state . promptOptions = ( options ?? [ ] ) as Array < {
1310+ value : string ;
1311+ label ?: string ;
1312+ hint ?: string ;
1313+ } > ;
1314+ return [ ] ;
1315+ }
13131316 return [ ] ;
1314- }
1315- return [ ] ;
1316- } ) ;
1317+ } ,
1318+ ) ;
13171319
13181320 await create ( {
13191321 name : 'test' ,
0 commit comments