( target: BackendDeviceTarget | undefined, )
| 250 | } |
| 251 | |
| 252 | function normalizeDeviceTarget( |
| 253 | target: BackendDeviceTarget | undefined, |
| 254 | ): BackendDeviceTarget | undefined { |
| 255 | if (!target) return undefined; |
| 256 | const id = normalizeOptionalText(target.id, 'target.id'); |
| 257 | const name = normalizeOptionalText(target.name, 'target.name'); |
| 258 | const normalized = { |
| 259 | ...(id ? { id } : {}), |
| 260 | ...(name ? { name } : {}), |
| 261 | ...(target.platform ? { platform: target.platform } : {}), |
| 262 | ...(target.target ? { target: target.target } : {}), |
| 263 | ...(target.headless !== undefined ? { headless: target.headless } : {}), |
| 264 | }; |
| 265 | return Object.keys(normalized).length > 0 ? normalized : undefined; |
| 266 | } |
| 267 | |
| 268 | // fallow-ignore-next-line complexity |
| 269 | function formatInstallResult( |
no test coverage detected
searching dependent graphs…