@@ -264,8 +264,10 @@ class DTSManager {
264264 ) ;
265265 const filePath = path . join ( destinationPath , REMOTE_API_TYPES_FILE_NAME ) ;
266266 fs . writeFileSync ( filePath , apiTypeFile ) ;
267+ const existed = this . loadedRemoteAPIAlias . has ( remoteInfo . alias ) ;
267268 this . loadedRemoteAPIAlias . add ( remoteInfo . alias ) ;
268269 fileLog ( `success` , 'downloadAPITypes' , 'info' ) ;
270+ return existed ;
269271 } catch ( err ) {
270272 fileLog (
271273 `Unable to download "${ remoteInfo . name } " api types, ${ err } ` ,
@@ -471,7 +473,13 @@ class DTSManager {
471473 zipUrl : remoteTarPath || requiredRemoteInfo . zipUrl ,
472474 } ,
473475 ) ;
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+ }
475483 fileLog ( `consumeTypes end` , 'updateTypes' , 'info' ) ;
476484 } ;
477485 fileLog (
@@ -502,7 +510,6 @@ class DTSManager {
502510 await consumeTypes (
503511 this . updatedRemoteInfos [ updatedRemoteInfo . name ] ,
504512 ) ;
505- this . consumeAPITypes ( hostOptions ) ;
506513 } ;
507514 if ( ! this . updatedRemoteInfos [ updatedRemoteInfo . name ] ) {
508515 const parsedRemoteInfo = retrieveRemoteInfo ( {
0 commit comments