(library: 's2' | 'react-aria')
| 43 | const DEFAULT_REACT_ARIA_BASE = 'https://react-aria.adobe.com'; |
| 44 | |
| 45 | export function getLibraryBaseUrl(library: 's2' | 'react-aria'): string { |
| 46 | if (process.env.DOCS_CDN_BASE) { |
| 47 | return process.env.DOCS_CDN_BASE; |
| 48 | } |
| 49 | return library === 's2' ? DEFAULT_S2_BASE : DEFAULT_REACT_ARIA_BASE; |
| 50 | } |
| 51 | |
| 52 | export async function fetchText(url: string, timeoutMs = 15000): Promise<string> { |
| 53 | const ctrl = new AbortController(); |
no outgoing calls
no test coverage detected