(name: string, value: string)
| 352 | value: string; |
| 353 | } |
| 354 | |
| 355 | export async function getapiurls(str: string): Promise<InstanceUrls | null> { |
| 356 | str = str.trim(); |
| 357 | if (!str) return null; |
| 358 | |
| 359 | console.info("Attempting to fetch .well-known's for", str); |
| 360 | |
| 361 | // Override first: |
| 362 | let urls: InstanceUrls | null = await getInstanceInfo(str); |
| 363 | if (urls) return urls; |
| 364 | |
| 365 | // Otherwise, fall back to looking it up... |
| 366 | try { |
| 367 | urls = await getApiUrlsV2(str); |
| 368 | if (!urls) throw new Error("meow"); |
| 369 | return urls; |
| 370 | } catch { |
nothing calls this directly
no test coverage detected