(token: string, port: number, frontendUrl: string)
| 57 | * Show the connection token in a nice box |
| 58 | */ |
| 59 | export function showToken(token: string, port: number, frontendUrl: string): void { |
| 60 | const connectUrl = `${frontendUrl}?token=${token}&port=${port}` |
| 61 | |
| 62 | p.note( |
| 63 | [ |
| 64 | `Open: ${styleText(['bold', 'underline', 'cyan'], connectUrl)}`, |
| 65 | '', |
| 66 | styleText('dim', `Or paste token manually: ${token}`), |
| 67 | ].join('\n'), |
| 68 | 'Click to connect', |
| 69 | ) |
| 70 | } |