(candidates: string[], value: string | undefined)
| 466 | }; |
| 467 | |
| 468 | const addProbeCandidate = (candidates: string[], value: string | undefined): void => { |
| 469 | const trimmed = value?.trim(); |
| 470 | if (!trimmed) return; |
| 471 | const parsed = maybeUrl(trimmed); |
| 472 | if (!parsed || (parsed.protocol !== "https:" && parsed.protocol !== "http:")) return; |
| 473 | const normalized = parsed.toString(); |
| 474 | const origin = parsed.origin; |
| 475 | if (!candidates.includes(normalized)) candidates.push(normalized); |
| 476 | if (!candidates.includes(origin)) candidates.push(origin); |
| 477 | }; |
| 478 | |
| 479 | const oauthProbeCandidates = ( |
| 480 | preview: SpecPreview, |
no test coverage detected