* Scan a row for links using all registered providers
(row: number)
| 86 | * Scan a row for links using all registered providers |
| 87 | */ |
| 88 | private async scanRow(row: number): Promise<void> { |
| 89 | this.scannedRows.add(row); |
| 90 | |
| 91 | const allLinks: ILink[] = []; |
| 92 | |
| 93 | // Query all providers |
| 94 | for (const provider of this.providers) { |
| 95 | const links = await new Promise<ILink[] | undefined>((resolve) => { |
| 96 | provider.provideLinks(row, resolve); |
| 97 | }); |
| 98 | |
| 99 | if (links) { |
| 100 | allLinks.push(...links); |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | // Cache all discovered links |
| 105 | for (const link of allLinks) { |
| 106 | this.cacheLink(link); |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | /** |
| 111 | * Cache a link for fast lookup |
no test coverage detected