@@ -29,6 +29,7 @@ import {
2929} from '../common-ext/createComponentHelpers' ;
3030import { loadWebviewHtml , validateGitURL } from '../common-ext/utils' ;
3131import { Devfile , DevfileRegistry , TemplateProjectIdentifier } from '../common/devfile' ;
32+ import { DevfileV1 } from '../../util/devfileV1Type' ;
3233
3334interface CloneProcess {
3435 status : boolean ;
@@ -444,7 +445,7 @@ export default class CreateComponentLoader {
444445 try {
445446 const devFileV1Path = path . join ( uri . fsPath , 'devfile.yaml' ) ;
446447 const file = await fs . readFile ( devFileV1Path , 'utf8' ) ;
447- const devfileV1 = JSYAML . load ( file . toString ( ) ) ;
448+ const devfileV1 = JSYAML . load ( file . toString ( ) ) as DevfileV1 ;
448449 await fs . unlink ( devFileV1Path ) ;
449450 analyzeRes = await OdoImpl . Instance . analyze ( uri . fsPath ) ;
450451 compDescriptions = getCompDescription ( analyzeRes ) ;
@@ -475,7 +476,7 @@ export default class CreateComponentLoader {
475476 } ) ;
476477 const devfileRegistry : DevfileRegistry [ ] = getDevfileRegistries ( ) ;
477478 const allDevfiles : Devfile [ ] = devfileRegistry . flatMap ( ( registry ) => registry . devfiles ) ;
478- const devfile : Devfile =
479+ const devfile : Devfile | undefined =
479480 compDescriptions . length !== 0
480481 ? allDevfiles . find (
481482 ( devfile ) => devfile . name === compDescriptions [ 0 ] . displayName ,
0 commit comments