(dir)
| 17 | const FRAGMENT_ALLOWLIST = new Set(["", "_top"]); |
| 18 | |
| 19 | function walkHtml(dir) { |
| 20 | const out = []; |
| 21 | |
| 22 | for (const entry of readdirSync(dir)) { |
| 23 | const full = join(dir, entry); |
| 24 | |
| 25 | if (statSync(full).isDirectory()) { |
| 26 | out.push(...walkHtml(full)); |
| 27 | } else if (entry.endsWith(".html")) { |
| 28 | out.push(full); |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | return out; |
| 33 | } |
| 34 | |
| 35 | /** Resolve a site-absolute path ("/api/acl/") to its built HTML file. */ |
| 36 | function resolveTarget(sitePath) { |