Skip to content

Commit

Permalink
Drop the 'preparing' step
Browse files Browse the repository at this point in the history
  • Loading branch information
aswasif007 committed May 23, 2024
1 parent 4200fef commit c42f28d
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/commands/phpmyadmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ export class PhpMyAdminCommand {
track: CommandTracker;
steps = {
ENABLE: 'enable',
PREPARING: 'preparing',
GENERATE: 'generate',
};
private progressTracker: ProgressTracker;
Expand All @@ -137,7 +136,6 @@ export class PhpMyAdminCommand {
this.track = trackerFn;
this.progressTracker = new ProgressTracker( [
{ id: this.steps.ENABLE, name: 'Enabling PHPMyAdmin for this environment' },
{ id: this.steps.PREPARING, name: 'Preparing' },
{ id: this.steps.GENERATE, name: 'Generating access link' },
] );
}
Expand Down Expand Up @@ -190,6 +188,7 @@ export class PhpMyAdminCommand {
if ( ! [ 'running', 'enabled' ].includes( status ) ) {
await enablePhpMyAdmin( this.env.id as number );
await pollUntil( this.getStatus.bind( this ), 1000, ( sts: string ) => sts === 'running' );
await pollUntil( this.readyToServe.bind( this ), 5000 );
}
}

Expand Down Expand Up @@ -236,16 +235,6 @@ export class PhpMyAdminCommand {
);
}

this.progressTracker.stepRunning( this.steps.PREPARING );
try {
await pollUntil( this.readyToServe.bind( this ), 5000 );
this.progressTracker.stepSuccess( this.steps.PREPARING );
} catch ( err ) {
const error = err as Error;
this.progressTracker.updateMessage( `Skipped: ${ error.message }` );
this.progressTracker.stepSkipped( this.steps.PREPARING );
}

let url;
try {
this.progressTracker.stepRunning( this.steps.GENERATE );
Expand Down

0 comments on commit c42f28d

Please sign in to comment.