(url)
| 51 | } |
| 52 | |
| 53 | async function fetchText(url) { |
| 54 | const response = await fetch(url, { |
| 55 | headers: { |
| 56 | "User-Agent": "JavaGuide-DocSearch-Indexer/1.0", |
| 57 | }, |
| 58 | }); |
| 59 | |
| 60 | if (!response.ok) { |
| 61 | throw new Error(`${url} responded with HTTP ${response.status}`); |
| 62 | } |
| 63 | |
| 64 | return response.text(); |
| 65 | } |
| 66 | |
| 67 | async function readSitemap() { |
| 68 | if (!sourceDir) { |
no outgoing calls
no test coverage detected