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

Function optionalConnectionFieldsMatch

src/cli/commands/connection.ts:510–521  ·  view source on GitHub ↗
(
  state: RemoteConnectionState,
  options: Parameters<typeof isCompatibleConnection>[1],
)

Source from the content-addressed store, hash-verified

508}
509
510function optionalConnectionFieldsMatch(
511 state: RemoteConnectionState,
512 options: Parameters<typeof isCompatibleConnection>[1],
513): boolean {
514 return [
515 [state.leaseBackend, options.desiredLeaseBackend],
516 [state.platform, options.flags.platform],
517 [state.target, options.flags.target],
518 [state.leaseProvider, options.connection?.leaseProvider],
519 [state.clientId, options.connection?.clientId],
520 ].every(([left, right]) => right === undefined || left === right);
521}
522
523function isSameDaemonState(
524 a: RemoteConnectionState['daemon'],

Callers 1

isCompatibleConnectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected