1- import { ConfirmResult , DependencyInstaller , InstallResult , Success } from './' ;
2- import { Location , ProgressListener } from '../util' ;
1+ import { ConfirmResult , DependencyInstaller , InstallResult , Success } from './index.js ' ;
2+ import { Location , ProgressListener } from '../util/index.js ' ;
33
44export class InstallerSequence {
55 constructor ( readonly installers : DependencyInstaller [ ] ) {
@@ -16,17 +16,17 @@ export class InstallerSequence {
1616
1717 public async install ( location : Location , shouldUpdate : boolean , progressListener : ProgressListener , confirm :( ) => Promise < ConfirmResult > ) : Promise < InstallResult < Location > > {
1818 let index = 0 ;
19- let firstConfirmPromise : Promise < ConfirmResult > | undefined = undefined ;
19+ let firstConfirmPromise : Promise < ConfirmResult > | undefined ;
2020 let result : InstallResult < Location > = new Success ( location ) ;
2121 const total = this . installers . length ;
2222 for ( const installer of this . installers ) {
23- function intermediateListener ( fraction : number , message : string ) {
23+ const intermediateListener = ( fraction : number , message : string ) => {
2424 progressListener (
2525 ( index + fraction ) / total ,
2626 `${ message } (step ${ index + 1 } of ${ total } )`
2727 ) ;
28- }
29- function intermediateConfirm ( ) : Promise < ConfirmResult > {
28+ } ;
29+ const intermediateConfirm = ( ) = > {
3030 // only ask once
3131 if ( firstConfirmPromise == null ) {
3232 firstConfirmPromise = confirm ( ) ;
@@ -35,7 +35,7 @@ export class InstallerSequence {
3535 // return same promise:
3636 return firstConfirmPromise ;
3737 }
38- }
38+ } ;
3939
4040 if ( result instanceof Success ) {
4141 // continue with next installer
0 commit comments