@@ -18,7 +18,7 @@ public function handle(array $args, Application $app): int
1818 $ port = '8000 ' ;
1919 $ gate = false ;
2020 $ gateView = 'full ' ;
21- $ gateSections = ['portal ' , 'paths ' , 'tips ' ];
21+ $ gateSections = ['portal ' , 'paths ' , 'runtime ' , ' tips ' ];
2222
2323 foreach ($ args as $ a ) {
2424 if (str_starts_with ($ a , '--host= ' )) $ host = substr ($ a , 7 );
@@ -56,13 +56,22 @@ public function handle(array $args, Application $app): int
5656
5757 private function renderGate (string $ host , string $ port , string $ docroot , string $ view , array $ sections ): void
5858 {
59+ $ startedAt = date ('Y-m-d H:i:s ' );
5960 echo "\033[2J \033[H " ;
60- echo $ this ->colorize ("╔════════════════════════════════╗ \n" , 'cyan ' );
61- echo $ this ->colorize ("║ PIPEFLOW STARGATE CONSOLE ║ \n" , 'bold_cyan ' );
62- echo $ this ->colorize ("╚════════════════════════════════╝ \n\n" , 'cyan ' );
61+ if ($ view === 'dhd ' ) {
62+ echo $ this ->colorize ("╔════════════════════════════════╗ \n" , 'cyan ' );
63+ echo $ this ->colorize ("║ PIPEFLOW D.H.D. PANEL ║ \n" , 'bold_cyan ' );
64+ echo $ this ->colorize ("╚════════════════════════════════╝ \n" , 'cyan ' );
65+ echo $ this ->colorize (" [1] [2] [3] [4] [5] [6] \n" , 'blue ' );
66+ echo $ this ->colorize (" [7] [8] [9] [0] [⋆] [#] \n\n" , 'blue ' );
67+ } else {
68+ echo $ this ->colorize ("╔════════════════════════════════╗ \n" , 'cyan ' );
69+ echo $ this ->colorize ("║ PIPEFLOW STARGATE CONSOLE ║ \n" , 'bold_cyan ' );
70+ echo $ this ->colorize ("╚════════════════════════════════╝ \n\n" , 'cyan ' );
71+ }
6372
6473 if ($ view === 'summary ' ) {
65- $ sections = array_values (array_intersect ($ sections , ['portal ' , 'paths ' ]));
74+ $ sections = array_values (array_intersect ($ sections , ['portal ' , 'paths ' , ' runtime ' ]));
6675 }
6776
6877 if (in_array ('portal ' , $ sections , true )) {
@@ -77,11 +86,24 @@ private function renderGate(string $host, string $port, string $docroot, string
7786 echo $ this ->colorize (" ▸ Docroot {$ docroot }\n\n" , 'cyan ' );
7887 }
7988
89+ if (in_array ('runtime ' , $ sections , true )) {
90+ echo $ this ->title ('RUNTIME ' );
91+ echo $ this ->colorize (" ▸ Started {$ startedAt }\n" , 'cyan ' );
92+ echo $ this ->colorize (" ▸ PHP " . PHP_VERSION . "\n" , 'cyan ' );
93+ echo $ this ->colorize (" ▸ PID " . getmypid () . "\n\n" , 'cyan ' );
94+ }
95+
96+ if (in_array ('errors ' , $ sections , true )) {
97+ echo $ this ->title ('ERRORS ' );
98+ echo $ this ->colorize (" ▸ No errors captured (dev server) \n\n" , 'green ' );
99+ }
100+
80101 if (in_array ('tips ' , $ sections , true )) {
81102 echo $ this ->title ('COMMANDS ' );
82103 echo $ this ->colorize (" ▸ php pipeflow route:list \n" , 'blue ' );
83104 echo $ this ->colorize (" ▸ php pipeflow serve --gate=summary \n" , 'blue ' );
84- echo $ this ->colorize (" ▸ php pipeflow serve --gate-sections=portal,paths \n\n" , 'blue ' );
105+ echo $ this ->colorize (" ▸ php pipeflow serve --gate-sections=portal,paths,runtime \n" , 'blue ' );
106+ echo $ this ->colorize (" ▸ php pipeflow serve --gate=dhd --gate-filter=portal,errors \n\n" , 'blue ' );
85107 }
86108 }
87109
0 commit comments