(
startup: ProxyStartup,
options: { useColor?: boolean } = {},
)
| 94 | } |
| 95 | |
| 96 | export function renderProxyStartup( |
| 97 | startup: ProxyStartup, |
| 98 | options: { useColor?: boolean } = {}, |
| 99 | ): string { |
| 100 | const useColor = options.useColor ?? supportsColor(); |
| 101 | const checkmark = formatProxyOutputValue('✓', 'green', useColor); |
| 102 | const proxyBaseUrl = formatProxyOutputValue(startup.proxyBaseUrl, 'cyan', useColor); |
| 103 | const daemonBaseUrl = formatProxyOutputValue('<tunnel URL>', 'cyan', useColor); |
| 104 | const token = formatProxyOutputValue(startup.token, 'yellow', useColor); |
| 105 | return [ |
| 106 | `${checkmark} Proxy listening at ${proxyBaseUrl}`, |
| 107 | '', |
| 108 | 'Provide this to the agent-device instance connecting:', |
| 109 | '', |
| 110 | `Daemon base URL: ${daemonBaseUrl}`, |
| 111 | `Daemon auth token: ${token}`, |
| 112 | ].join('\n'); |
| 113 | } |
| 114 | |
| 115 | function formatProxyOutputValue( |
| 116 | value: string, |
no test coverage detected