()
| 152 | } |
| 153 | |
| 154 | export function getEnvironmentalOptions(): ReturnType<typeof getTLSOptions> & |
| 155 | Pick<MongoClientOptions, 'serverApi'> { |
| 156 | const options: ReturnType<typeof getEnvironmentalOptions> = {}; |
| 157 | |
| 158 | if (process.env.MONGODB_API_VERSION) { |
| 159 | options.serverApi = { version: process.env.MONGODB_API_VERSION as ServerApiVersion }; |
| 160 | } |
| 161 | |
| 162 | return { |
| 163 | ...options, |
| 164 | ...getTLSOptions() |
| 165 | }; |
| 166 | } |
| 167 | |
| 168 | /** |
| 169 | * Use as a template string tag to stringify objects in the template string |
no test coverage detected