@@ -31,11 +31,11 @@ namespace ts.projectSystem {
31
31
function executeCommand ( self : Installer , host : TestServerHost , installedTypings : string [ ] , typingFiles : FileOrFolder [ ] , requestKind : TI . RequestKind , cb : TI . RequestCompletedAction ) : void {
32
32
switch ( requestKind ) {
33
33
case TI . NpmInstallRequest :
34
- self . addPostExecAction ( requestKind , installedTypings , ( err , stdout , stderr ) => {
34
+ self . addPostExecAction ( requestKind , installedTypings , success => {
35
35
for ( const file of typingFiles ) {
36
36
host . createFileOrFolder ( file , /*createParentDirectory*/ true ) ;
37
37
}
38
- cb ( err , stdout , stderr ) ;
38
+ cb ( success ) ;
39
39
} ) ;
40
40
break ;
41
41
case TI . NpmViewRequest :
@@ -81,7 +81,7 @@ namespace ts.projectSystem {
81
81
constructor ( ) {
82
82
super ( host ) ;
83
83
}
84
- runCommand ( requestKind : TI . RequestKind , requestId : number , command : string , cwd : string , cb : server . typingsInstaller . RequestCompletedAction ) {
84
+ executeRequest ( requestKind : TI . RequestKind , requestId : number , args : string [ ] , cwd : string , cb : server . typingsInstaller . RequestCompletedAction ) {
85
85
const installedTypings = [ "@types/jquery" ] ;
86
86
const typingFiles = [ jquery ] ;
87
87
executeCommand ( this , host , installedTypings , typingFiles , requestKind , cb ) ;
@@ -125,7 +125,7 @@ namespace ts.projectSystem {
125
125
constructor ( ) {
126
126
super ( host ) ;
127
127
}
128
- runCommand ( requestKind : TI . RequestKind , requestId : number , command : string , cwd : string , cb : server . typingsInstaller . RequestCompletedAction ) {
128
+ executeRequest ( requestKind : TI . RequestKind , requestId : number , args : string [ ] , cwd : string , cb : server . typingsInstaller . RequestCompletedAction ) {
129
129
const installedTypings = [ "@types/jquery" ] ;
130
130
const typingFiles = [ jquery ] ;
131
131
executeCommand ( this , host , installedTypings , typingFiles , requestKind , cb ) ;
@@ -221,7 +221,7 @@ namespace ts.projectSystem {
221
221
enqueueIsCalled = true ;
222
222
super . enqueueInstallTypingsRequest ( project , typingOptions ) ;
223
223
}
224
- runCommand ( requestKind : TI . RequestKind , requestId : number , command : string , cwd : string , cb : TI . RequestCompletedAction ) : void {
224
+ executeRequest ( requestKind : TI . RequestKind , requestId : number , args : string [ ] , cwd : string , cb : TI . RequestCompletedAction ) : void {
225
225
const installedTypings = [ "@types/jquery" ] ;
226
226
const typingFiles = [ jquery ] ;
227
227
executeCommand ( this , host , installedTypings , typingFiles , requestKind , cb ) ;
@@ -275,7 +275,7 @@ namespace ts.projectSystem {
275
275
constructor ( ) {
276
276
super ( host ) ;
277
277
}
278
- runCommand ( requestKind : TI . RequestKind , requestId : number , command : string , cwd : string , cb : TI . RequestCompletedAction ) : void {
278
+ executeRequest ( requestKind : TI . RequestKind , requestId : number , args : string [ ] , cwd : string , cb : TI . RequestCompletedAction ) : void {
279
279
const installedTypings = [ "@types/lodash" , "@types/react" ] ;
280
280
const typingFiles = [ lodash , react ] ;
281
281
executeCommand ( this , host , installedTypings , typingFiles , requestKind , cb ) ;
@@ -323,7 +323,7 @@ namespace ts.projectSystem {
323
323
enqueueIsCalled = true ;
324
324
super . enqueueInstallTypingsRequest ( project , typingOptions ) ;
325
325
}
326
- runCommand ( requestKind : TI . RequestKind , requestId : number , command : string , cwd : string , cb : TI . RequestCompletedAction ) : void {
326
+ executeRequest ( requestKind : TI . RequestKind , requestId : number , args : string [ ] , cwd : string , cb : TI . RequestCompletedAction ) : void {
327
327
const installedTypings : string [ ] = [ ] ;
328
328
const typingFiles : FileOrFolder [ ] = [ ] ;
329
329
executeCommand ( this , host , installedTypings , typingFiles , requestKind , cb ) ;
@@ -398,7 +398,7 @@ namespace ts.projectSystem {
398
398
constructor ( ) {
399
399
super ( host ) ;
400
400
}
401
- runCommand ( requestKind : TI . RequestKind , requestId : number , command : string , cwd : string , cb : TI . RequestCompletedAction ) : void {
401
+ executeRequest ( requestKind : TI . RequestKind , requestId : number , args : string [ ] , cwd : string , cb : TI . RequestCompletedAction ) : void {
402
402
const installedTypings = [ "@types/commander" , "@types/express" , "@types/jquery" , "@types/moment" ] ;
403
403
const typingFiles = [ commander , express , jquery , moment ] ;
404
404
executeCommand ( this , host , installedTypings , typingFiles , requestKind , cb ) ;
@@ -477,7 +477,7 @@ namespace ts.projectSystem {
477
477
constructor ( ) {
478
478
super ( host , { throttleLimit : 3 } ) ;
479
479
}
480
- runCommand ( requestKind : TI . RequestKind , requestId : number , command : string , cwd : string , cb : TI . RequestCompletedAction ) : void {
480
+ executeRequest ( requestKind : TI . RequestKind , requestId : number , args : string [ ] , cwd : string , cb : TI . RequestCompletedAction ) : void {
481
481
const installedTypings = [ "@types/commander" , "@types/express" , "@types/jquery" , "@types/moment" , "@types/lodash" ] ;
482
482
executeCommand ( this , host , installedTypings , typingFiles , requestKind , cb ) ;
483
483
}
@@ -567,10 +567,10 @@ namespace ts.projectSystem {
567
567
constructor ( ) {
568
568
super ( host , { throttleLimit : 3 } ) ;
569
569
}
570
- runCommand ( requestKind : TI . RequestKind , requestId : number , command : string , cwd : string , cb : TI . RequestCompletedAction ) : void {
570
+ executeRequest ( requestKind : TI . RequestKind , requestId : number , args : string [ ] , cwd : string , cb : TI . RequestCompletedAction ) : void {
571
571
if ( requestKind === TI . NpmInstallRequest ) {
572
572
let typingFiles : ( FileOrFolder & { typings : string } ) [ ] = [ ] ;
573
- if ( command . indexOf ( "commander" ) >= 0 ) {
573
+ if ( args . indexOf ( "@types/ commander" ) >= 0 ) {
574
574
typingFiles = [ commander , jquery , lodash , cordova ] ;
575
575
}
576
576
else {
@@ -655,7 +655,7 @@ namespace ts.projectSystem {
655
655
constructor ( ) {
656
656
super ( host , { globalTypingsCacheLocation : "/tmp" } ) ;
657
657
}
658
- runCommand ( requestKind : TI . RequestKind , requestId : number , command : string , cwd : string , cb : server . typingsInstaller . RequestCompletedAction ) {
658
+ executeRequest ( requestKind : TI . RequestKind , requestId : number , args : string [ ] , cwd : string , cb : server . typingsInstaller . RequestCompletedAction ) {
659
659
const installedTypings = [ "@types/jquery" ] ;
660
660
const typingFiles = [ jqueryDTS ] ;
661
661
executeCommand ( this , host , installedTypings , typingFiles , requestKind , cb ) ;
@@ -701,7 +701,7 @@ namespace ts.projectSystem {
701
701
constructor ( ) {
702
702
super ( host , { globalTypingsCacheLocation : "/tmp" } ) ;
703
703
}
704
- runCommand ( requestKind : TI . RequestKind , requestId : number , command : string , cwd : string , cb : server . typingsInstaller . RequestCompletedAction ) {
704
+ executeRequest ( requestKind : TI . RequestKind , requestId : number , args : string [ ] , cwd : string , cb : server . typingsInstaller . RequestCompletedAction ) {
705
705
const installedTypings = [ "@types/jquery" ] ;
706
706
const typingFiles = [ jqueryDTS ] ;
707
707
executeCommand ( this , host , installedTypings , typingFiles , requestKind , cb ) ;
@@ -766,7 +766,7 @@ namespace ts.projectSystem {
766
766
constructor ( ) {
767
767
super ( host , { globalTypingsCacheLocation : "/tmp" } , { isEnabled : ( ) => true , writeLine : msg => messages . push ( msg ) } ) ;
768
768
}
769
- runCommand ( requestKind : TI . RequestKind , requestId : number , command : string , cwd : string , cb : server . typingsInstaller . RequestCompletedAction ) {
769
+ executeRequest ( requestKind : TI . RequestKind , requestId : number , args : string [ ] , cwd : string , cb : server . typingsInstaller . RequestCompletedAction ) {
770
770
assert ( false , "runCommand should not be invoked" ) ;
771
771
}
772
772
} ) ( ) ;
0 commit comments