@@ -264,8 +264,10 @@ class DTSManager {
264
264
) ;
265
265
const filePath = path . join ( destinationPath , REMOTE_API_TYPES_FILE_NAME ) ;
266
266
fs . writeFileSync ( filePath , apiTypeFile ) ;
267
+ const existed = this . loadedRemoteAPIAlias . has ( remoteInfo . alias ) ;
267
268
this . loadedRemoteAPIAlias . add ( remoteInfo . alias ) ;
268
269
fileLog ( `success` , 'downloadAPITypes' , 'info' ) ;
270
+ return existed ;
269
271
} catch ( err ) {
270
272
fileLog (
271
273
`Unable to download "${ remoteInfo . name } " api types, ${ err } ` ,
@@ -471,7 +473,13 @@ class DTSManager {
471
473
zipUrl : remoteTarPath || requiredRemoteInfo . zipUrl ,
472
474
} ,
473
475
) ;
474
- await this . downloadAPITypes ( requiredRemoteInfo , destinationPath ) ;
476
+ const addNew = await this . downloadAPITypes (
477
+ requiredRemoteInfo ,
478
+ destinationPath ,
479
+ ) ;
480
+ if ( addNew ) {
481
+ this . consumeAPITypes ( hostOptions ) ;
482
+ }
475
483
fileLog ( `consumeTypes end` , 'updateTypes' , 'info' ) ;
476
484
} ;
477
485
fileLog (
@@ -502,7 +510,6 @@ class DTSManager {
502
510
await consumeTypes (
503
511
this . updatedRemoteInfos [ updatedRemoteInfo . name ] ,
504
512
) ;
505
- this . consumeAPITypes ( hostOptions ) ;
506
513
} ;
507
514
if ( ! this . updatedRemoteInfos [ updatedRemoteInfo . name ] ) {
508
515
const parsedRemoteInfo = retrieveRemoteInfo ( {
0 commit comments