* Returns a `hello`, executed against `uri`.
(uri = this.uri)
| 198 | * Returns a `hello`, executed against `uri`. |
| 199 | */ |
| 200 | async hello(uri = this.uri) { |
| 201 | const client = this.newClient(uri); |
| 202 | try { |
| 203 | await client.connect(); |
| 204 | const { maxBsonObjectSize, maxMessageSizeBytes, maxWriteBatchSize, ...rest } = await client |
| 205 | .db('admin') |
| 206 | .command({ hello: 1 }); |
| 207 | return { |
| 208 | maxBsonObjectSize, |
| 209 | maxMessageSizeBytes, |
| 210 | maxWriteBatchSize, |
| 211 | ...rest |
| 212 | }; |
| 213 | } finally { |
| 214 | await client.close(); |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | isOIDC(uri: string, env: string): boolean { |
| 219 | if (!uri) return false; |