@@ -10,6 +10,7 @@ import { parsePackageArg } from '@app/utils.js';
1010
1111interface  InstallPluginCommandOptions  { 
1212    bundled : boolean ; 
13+     noRestart : boolean ; 
1314} 
1415
1516@SubCommand ( { 
@@ -40,7 +41,9 @@ export class InstallPluginCommand extends CommandRunner {
4041            await  this . pluginManagementService . addPlugin ( ...passedParams ) ; 
4142            this . logService . log ( `Added plugin ${ passedParams . join ( ', ' ) }  ) ; 
4243        } 
43-         await  this . restartCommand . run ( ) ; 
44+         if  ( ! options . noRestart )  { 
45+             await  this . restartCommand . run ( ) ; 
46+         } 
4447    } 
4548
4649    @Option ( { 
@@ -51,6 +54,15 @@ export class InstallPluginCommand extends CommandRunner {
5154    parseBundled ( ) : boolean  { 
5255        return  true ; 
5356    } 
57+ 
58+     @Option ( { 
59+         flags : '--no-restart' , 
60+         description : 'Do not restart the API after installation' , 
61+         defaultValue : false , 
62+     } ) 
63+     parseNoRestart ( ) : boolean  { 
64+         return  true ; 
65+     } 
5466} 
5567
5668@SubCommand ( { 
@@ -81,7 +93,9 @@ export class RemovePluginCommand extends CommandRunner {
8193            await  this . pluginManagementService . removePlugin ( ...passedParams ) ; 
8294            this . logService . log ( `Removed plugin ${ passedParams . join ( ', ' ) }  ) ; 
8395        } 
84-         await  this . restartCommand . run ( ) ; 
96+         if  ( ! options . noRestart )  { 
97+             await  this . restartCommand . run ( ) ; 
98+         } 
8599    } 
86100
87101    @Option ( { 
@@ -92,6 +106,15 @@ export class RemovePluginCommand extends CommandRunner {
92106    parseBundled ( ) : boolean  { 
93107        return  true ; 
94108    } 
109+ 
110+     @Option ( { 
111+         flags : '--no-restart' , 
112+         description : 'Do not restart the API after installation' , 
113+         defaultValue : false , 
114+     } ) 
115+     parseNoRestart ( ) : boolean  { 
116+         return  true ; 
117+     } 
95118} 
96119
97120@SubCommand ( { 
@@ -129,6 +152,7 @@ export class ListPluginCommand extends CommandRunner {
129152        installedPlugins . forEach ( ( [ name ,  version ] )  =>  { 
130153            this . logService . log ( `☑️ ${ name } ${ version }  ) ; 
131154        } ) ; 
155+         this . logService . log ( ) ;  // for spacing 
132156    } 
133157} 
134158
0 commit comments