MCPcopy
hub / github.com/callstack/agent-device / buildConnectionRuntimeBinding

Function buildConnectionRuntimeBinding

src/cli/commands/connection.ts:242–254  ·  view source on GitHub ↗
(
  flags: CliFlags,
  previous: RemoteConnectionState | null,
  now: string,
)

Source from the content-addressed store, hash-verified

240}
241
242function buildConnectionRuntimeBinding(
243 flags: CliFlags,
244 previous: RemoteConnectionState | null,
245 now: string,
246): Pick<RemoteConnectionState, 'connectedAt' | 'metro' | 'platform' | 'runtime' | 'target'> {
247 return {
248 platform: flags.platform ?? previous?.platform,
249 target: flags.target ?? previous?.target,
250 runtime: previous?.runtime,
251 metro: previous?.metro,
252 connectedAt: previous?.connectedAt ?? now,
253 };
254}
255
256function shouldReusePreviousConnectionState(
257 flags: CliFlags,

Callers 1

buildConnectedStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected