@@ -11,13 +11,13 @@ import {
1111} from "./utils.js" ;
1212
1313function cancelOp ( ) {
14- console . log ( " \nOperation cancelled." ) ;
14+ console . log ( ' \nOperation cancelled.' ) ;
1515 process . exit ( 0 ) ;
1616}
1717
1818async function removeSolver ( ) {
19- process . stdin . on ( " keypress" , ( _ , key ) => {
20- if ( key . name === "q" ) {
19+ process . stdin . on ( ' keypress' , ( _ , key ) => {
20+ if ( key . name === 'q' ) {
2121 cancelOp ( ) ;
2222 }
2323 } ) ;
@@ -30,16 +30,15 @@ async function removeSolver() {
3030 }
3131
3232 while ( true ) {
33- const choices = existingSolvers . map ( ( solver ) => ( {
33+ const choices = existingSolvers . map ( solver => ( {
3434 name : solver ,
3535 value : solver ,
36- description : `Remove solver "${ solver } " and all related files` ,
36+ description : `Remove solver "${ solver } " and all related files`
3737 } ) ) ;
3838
3939 try {
4040 const selectedSolvers = await checkbox ( {
41- message :
42- "Select solvers to remove (space to select, enter to confirm, q to quit):" ,
41+ message : "Select solvers to remove (space to select, enter to confirm, q to quit):" ,
4342 choices,
4443 pageSize : Math . min ( choices . length , 10 ) ,
4544 loop : true ,
@@ -52,7 +51,7 @@ async function removeSolver() {
5251 const solverList = selectedSolvers . join ( ", " ) ;
5352 const shouldProceed = await confirm ( {
5453 message : `Are you sure you want to remove the following solvers: ${ solverList } ?` ,
55- default : false ,
54+ default : false
5655 } ) ;
5756
5857 if ( ! shouldProceed ) {
@@ -63,9 +62,7 @@ async function removeSolver() {
6362 for ( const name of selectedSolvers ) {
6463 // Remove solver directory
6564 await fs . rm ( path . join ( PATHS . solversDir , name ) , { recursive : true } ) ;
66- console . log (
67- `✓ Removed solver directory: ${ path . join ( PATHS . solversDir , name ) } ` ,
68- ) ;
65+ console . log ( `✓ Removed solver directory: ${ path . join ( PATHS . solversDir , name ) } ` ) ;
6966
7067 // Update main solvers index.ts
7168 await updateSolversIndex ( name , true ) ;
@@ -89,7 +86,7 @@ async function removeSolver() {
8986 return ;
9087 }
9188 } catch ( error ) {
92- if ( error . message ?. includes ( " User force closed" ) ) {
89+ if ( error . message ?. includes ( ' User force closed' ) ) {
9390 cancelOp ( ) ;
9491 }
9592
0 commit comments