MCPcopy Index your code
hub / github.com/callstack/agent-device / renderProxyStartup

Function renderProxyStartup

src/cli/commands/proxy.ts:96–113  ·  view source on GitHub ↗
(
  startup: ProxyStartup,
  options: { useColor?: boolean } = {},
)

Source from the content-addressed store, hash-verified

94}
95
96export 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
115function formatProxyOutputValue(
116 value: string,

Callers 2

proxyCommandFunction · 0.85

Calls 2

supportsColorFunction · 0.90
formatProxyOutputValueFunction · 0.85

Tested by

no test coverage detected