@@ -35,6 +35,7 @@ import { type MongoClientAuthProviders } from '../mongo_client_auth_providers';
3535import { MongoLoggableComponent , type MongoLogger , SeverityLevel } from '../mongo_logger' ;
3636import { type Abortable , type CancellationToken , TypedEventEmitter } from '../mongo_types' ;
3737import { ReadPreference , type ReadPreferenceLike } from '../read_preference' ;
38+ import { type Runtime } from '../runtime_adapters' ;
3839import { ServerType } from '../sdam/common' ;
3940import { applySession , type ClientSession , updateSessionFromResponse } from '../sessions' ;
4041import { type TimeoutContext , TimeoutError } from '../timeout' ;
@@ -118,8 +119,8 @@ export interface ProxyOptions {
118119/** @public */
119120export interface ConnectionOptions
120121 extends SupportedNodeConnectionOptions ,
121- StreamDescriptionOptions ,
122- ProxyOptions {
122+ StreamDescriptionOptions ,
123+ ProxyOptions {
123124 // Internal creation info
124125 id : number | '<monitor>' ;
125126 generation : number ;
@@ -143,6 +144,8 @@ export interface ConnectionOptions
143144 metadata : Promise < ClientMetadata > ;
144145 /** @internal */
145146 mongoLogger ?: MongoLogger | undefined ;
147+ /** @internal */
148+ runtime : Runtime ;
146149}
147150
148151/** @public */
@@ -526,10 +529,10 @@ export class Connection extends TypedEventEmitter<ConnectionEvents> {
526529 options . documentsReturnedIn == null || ! options . raw
527530 ? options
528531 : {
529- ...options ,
530- raw : false ,
531- fieldsAsRaw : { [ options . documentsReturnedIn ] : true }
532- } ;
532+ ...options ,
533+ raw : false ,
534+ fieldsAsRaw : { [ options . documentsReturnedIn ] : true }
535+ } ;
533536
534537 /** MongoDBResponse instance or subclass */
535538 let document : MongoDBResponse | undefined = undefined ;
@@ -692,9 +695,9 @@ export class Connection extends TypedEventEmitter<ConnectionEvents> {
692695 options . agreedCompressor === 'none' || ! OpCompressedRequest . canCompress ( command )
693696 ? command
694697 : new OpCompressedRequest ( command , {
695- agreedCompressor : options . agreedCompressor ?? 'none' ,
696- zlibCompressionLevel : options . zlibCompressionLevel ?? 0
697- } ) ;
698+ agreedCompressor : options . agreedCompressor ?? 'none' ,
699+ zlibCompressionLevel : options . zlibCompressionLevel ?? 0
700+ } ) ;
698701
699702 const buffer = Buffer . concat ( await finalCommand . toBin ( ) ) ;
700703
0 commit comments