()
| 56 | const registerableDomainResultCache = new Map(); |
| 57 | |
| 58 | export async function getMethods() { |
| 59 | const customWhoisServersMapping = await (await ($$fetch('https://cdn.jsdelivr.net/npm/whois-servers-list@latest/list.json'))).json() as any; |
| 60 | |
| 61 | const isRegisterableDomainAlive = createRegisterableDomainAliveChecker({ |
| 62 | dns: { |
| 63 | dnsServers, |
| 64 | maxAttempts: 6, |
| 65 | customFetchForDoH: fetchForDoH as typeof fetch |
| 66 | }, |
| 67 | registerableDomainResultCache, |
| 68 | whois: { |
| 69 | customWhoisServersMapping |
| 70 | } |
| 71 | }); |
| 72 | |
| 73 | const isDomainAlive = createDomainAliveChecker({ |
| 74 | dns: { |
| 75 | dnsServers, |
| 76 | maxAttempts: 6, |
| 77 | customFetchForDoH: fetchForDoH as typeof fetch |
| 78 | }, |
| 79 | registerableDomainResultCache, |
| 80 | resultCache, |
| 81 | whois: { |
| 82 | customWhoisServersMapping |
| 83 | } |
| 84 | }); |
| 85 | |
| 86 | return { isRegisterableDomainAlive, isDomainAlive }; |
| 87 | }; |
no test coverage detected