File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 33namespace Codebarista \LaravelEcharts \Console \Commands ;
44
55use Illuminate \Console \Command ;
6+ use Illuminate \Contracts \Console \Isolatable ;
67use Illuminate \Support \Facades \Process ;
78use Throwable ;
89
9- class NodeEcharts extends Command
10+ class NodeEcharts extends Command implements Isolatable
1011{
11- /**
12- * The name and signature of the console command.
13- *
12+ /***
1413 * @var string
1514 */
1615 protected $ signature = 'codebarista:node-echarts {action} ' ;
1716
18- /**
19- * The console command description.
20- *
17+ /***
2118 * @var string
2219 */
2320 protected $ description = 'Install or update Node canvas and echarts ' ;
2421
25- /**
26- * Execute the console command.
27- *
22+ /***
2823 * @throws Throwable
2924 */
3025 public function handle (): int
3126 {
3227 $ action = $ this ->argument ('action ' );
3328
3429 $ process = Process::path (codebarista_path ('tools/echarts ' ))
30+ ->timeout (180 )
3531 ->run (['npm ' , $ action ]);
3632
3733 throw_if ($ process ->failed (), $ process ->errorOutput ());
3834
35+ $ this ->components ->info ('Node echarts have been installed successfully. ' );
36+
3937 return self ::SUCCESS ;
4038 }
4139}
You can’t perform that action at this time.
0 commit comments