(pathname: string)
| 25 | } |
| 26 | |
| 27 | export function getRSCUrl(pathname: string) { |
| 28 | let url = new URL(pathname, location.href); |
| 29 | url.pathname = url.pathname.replace('.html', ''); |
| 30 | if (url.pathname.endsWith('/')) { |
| 31 | url.pathname += 'index.rsc'; |
| 32 | } else { |
| 33 | url.pathname += '.rsc'; |
| 34 | } |
| 35 | |
| 36 | url.search = ''; |
| 37 | url.hash = ''; |
| 38 | return url.href; |
| 39 | } |
| 40 | |
| 41 | export function isClientLink(link: HTMLAnchorElement) { |
| 42 | let baseUrl = process.env.LIBRARY |
no outgoing calls
no test coverage detected