(
state: Pick<
RunnerLocallyPersistedState,
'startedWithApiUrl' | 'startedWithMachineId' | 'startedWithCliApiTokenHash'
>,
current: RunnerConnectionIdentity
)
| 16 | } |
| 17 | |
| 18 | export function isRunnerStateCompatibleWithIdentity( |
| 19 | state: Pick< |
| 20 | RunnerLocallyPersistedState, |
| 21 | 'startedWithApiUrl' | 'startedWithMachineId' | 'startedWithCliApiTokenHash' |
| 22 | >, |
| 23 | current: RunnerConnectionIdentity |
| 24 | ): boolean { |
| 25 | if (!state.startedWithApiUrl || state.startedWithApiUrl !== current.apiUrl) { |
| 26 | return false |
| 27 | } |
| 28 | |
| 29 | if (!current.machineId || state.startedWithMachineId !== current.machineId) { |
| 30 | return false |
| 31 | } |
| 32 | |
| 33 | if (!current.cliApiTokenHash || state.startedWithCliApiTokenHash !== current.cliApiTokenHash) { |
| 34 | return false |
| 35 | } |
| 36 | |
| 37 | return true |
| 38 | } |
no outgoing calls
no test coverage detected