File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class StartSsr extends Command
14
14
*
15
15
* @var string
16
16
*/
17
- protected $ name = 'inertia:start-ssr ' ;
17
+ protected $ signature = 'inertia:start-ssr {--runtime=node : The runtime to use (`node` or `bun`)} ' ;
18
18
19
19
/**
20
20
* The console command description.
@@ -50,9 +50,17 @@ public function handle(): int
50
50
$ this ->warn ('Using a default bundle instead: " ' .$ bundle .'" ' );
51
51
}
52
52
53
+ $ runtime = $ this ->option ('runtime ' );
54
+
55
+ if (! in_array ($ runtime , ['node ' , 'bun ' ])) {
56
+ $ this ->error ('Unsupported runtime: " ' .$ runtime .'". Supported runtimes are `node` and `bun`. ' );
57
+
58
+ return self ::INVALID ;
59
+ }
60
+
53
61
$ this ->callSilently ('inertia:stop-ssr ' );
54
62
55
- $ process = new Process ([' node ' , $ bundle ]);
63
+ $ process = new Process ([$ runtime , $ bundle ]);
56
64
$ process ->setTimeout (null );
57
65
$ process ->start ();
58
66
You can’t perform that action at this time.
0 commit comments