(options: MongoClientOptions)
| 51 | * not provided by in `options`, and returns a `Runtime`. |
| 52 | */ |
| 53 | export function resolveRuntimeAdapters(options: MongoClientOptions): Runtime { |
| 54 | (globalThis as any)[ALLOWED_DRIVER_REQUIRE_PROPERTY_NAME] = true; |
| 55 | try { |
| 56 | const runtime = { |
| 57 | // eslint-disable-next-line @typescript-eslint/no-require-imports |
| 58 | os: options.runtimeAdapters?.os ?? require('os') |
| 59 | }; |
| 60 | return runtime; |
| 61 | } finally { |
| 62 | (globalThis as any)[ALLOWED_DRIVER_REQUIRE_PROPERTY_NAME] = false; |
| 63 | } |
| 64 | } |
no outgoing calls
no test coverage detected