(boot: Boot)
| 143 | }; |
| 144 | |
| 145 | const enrichBootWithFeatures = async (boot: Boot): Promise<Boot> => { |
| 146 | if (!boot.exp?.f || !process.env.NEXT_PUBLIC_EXPERIMENTATION_KEY) { |
| 147 | return boot; |
| 148 | } |
| 149 | |
| 150 | const features = await decrypt( |
| 151 | boot.exp.f, |
| 152 | process.env.NEXT_PUBLIC_EXPERIMENTATION_KEY, |
| 153 | 'AES-CBC', |
| 154 | 128, |
| 155 | ); |
| 156 | |
| 157 | return { ...boot, exp: { ...boot.exp, features: JSON.parse(features) } }; |
| 158 | }; |
| 159 | |
| 160 | interface GetBootDataParams { |
| 161 | app: string; |
no test coverage detected