(app: string, url?: string, pathname?: string)
| 117 | }; |
| 118 | |
| 119 | const getBootURL = (app: string, url?: string, pathname?: string) => { |
| 120 | const appRoute = app === 'companion' ? '/companion' : ''; |
| 121 | const params = new URLSearchParams(); |
| 122 | if (process.env.CURRENT_VERSION) { |
| 123 | params.append('v', process.env.CURRENT_VERSION); |
| 124 | } |
| 125 | if (url) { |
| 126 | params.append('url', url); |
| 127 | } |
| 128 | const referrer = getReferrerType(pathname); |
| 129 | if (referrer) { |
| 130 | params.append('referrer', referrer); |
| 131 | } |
| 132 | |
| 133 | return `${apiUrl}/boot${appRoute}?${params}`; |
| 134 | }; |
| 135 | |
| 136 | const enrichBootWithFeatures = async (boot: Boot): Promise<Boot> => { |
| 137 | if (!boot.exp || !process.env.NEXT_PUBLIC_EXPERIMENTATION_KEY) { |
no test coverage detected