@@ -2,7 +2,7 @@ import { MongoshInternalError, MongoshRuntimeError, MongoshWarning } from '@mong
2
2
import { redactURICredentials } from '@mongosh/history' ;
3
3
import i18n from '@mongosh/i18n' ;
4
4
import { bson , AutoEncryptionOptions } from '@mongosh/service-provider-core' ;
5
- import { CliOptions , CliServiceProvider , MongoClientOptions } from '@mongosh/service-provider-server' ;
5
+ import { CliOptions , CliServiceProvider , DevtoolsConnectOptions } from '@mongosh/service-provider-server' ;
6
6
import { SnippetManager } from '@mongosh/snippet-manager' ;
7
7
import { Editor } from '@mongosh/editor' ;
8
8
import { redactSensitiveData } from '@mongosh/history' ;
@@ -159,10 +159,10 @@ class CliRepl implements MongoshIOProvider {
159
159
* information, external editor, and finally start the repl.
160
160
*
161
161
* @param {string } driverUri - The driver URI.
162
- * @param {MongoClientOptions } driverOptions - The driver options.
162
+ * @param {DevtoolsConnectOptions } driverOptions - The driver options.
163
163
*/
164
164
// eslint-disable-next-line complexity
165
- async start ( driverUri : string , driverOptions : MongoClientOptions ) : Promise < void > {
165
+ async start ( driverUri : string , driverOptions : DevtoolsConnectOptions ) : Promise < void > {
166
166
const { version } = require ( '../package.json' ) ;
167
167
await this . verifyNodeVersion ( ) ;
168
168
@@ -451,9 +451,9 @@ class CliRepl implements MongoshIOProvider {
451
451
* Connect to the cluster.
452
452
*
453
453
* @param {string } driverUri - The driver URI.
454
- * @param {MongoClientOptions } driverOptions - The driver options.
454
+ * @param {DevtoolsConnectOptions } driverOptions - The driver options.
455
455
*/
456
- async connect ( driverUri : string , driverOptions : MongoClientOptions ) : Promise < CliServiceProvider > {
456
+ async connect ( driverUri : string , driverOptions : DevtoolsConnectOptions ) : Promise < CliServiceProvider > {
457
457
if ( ! this . cliOptions . nodb && ! this . cliOptions . quiet ) {
458
458
this . output . write ( i18n . __ ( CONNECTING ) + '\t\t' + this . clr ( redactURICredentials ( driverUri ) , 'mongosh:uri' ) + '\n' ) ;
459
459
}
@@ -523,11 +523,11 @@ class CliRepl implements MongoshIOProvider {
523
523
/**
524
524
* Is the password missing from the options?
525
525
*
526
- * @param {MongoClientOptions } driverOptions - The driver options.
526
+ * @param {DevtoolsConnectOptions } driverOptions - The driver options.
527
527
*
528
528
* @returns {boolean } If the password is missing.
529
529
*/
530
- isPasswordMissingOptions ( driverOptions : MongoClientOptions ) : boolean {
530
+ isPasswordMissingOptions ( driverOptions : DevtoolsConnectOptions ) : boolean {
531
531
return ! ! (
532
532
driverOptions . auth &&
533
533
driverOptions . auth . username &&
@@ -556,7 +556,7 @@ class CliRepl implements MongoshIOProvider {
556
556
* object is present with a truthy username. This is required by the driver, e.g.
557
557
* in the case of password-less Kerberos authentication.
558
558
*/
559
- ensurePasswordFieldIsPresentInAuth ( driverOptions : MongoClientOptions ) : void {
559
+ ensurePasswordFieldIsPresentInAuth ( driverOptions : DevtoolsConnectOptions ) : void {
560
560
if ( driverOptions . auth && driverOptions . auth . username && ! ( 'password' in driverOptions . auth ) ) {
561
561
driverOptions . auth . password = undefined ;
562
562
}
@@ -566,7 +566,7 @@ class CliRepl implements MongoshIOProvider {
566
566
* Require the user to enter a password.
567
567
*
568
568
* @param {string } driverUrl - The driver URI.
569
- * @param {MongoClientOptions } driverOptions - The driver options.
569
+ * @param {DevtoolsConnectOptions } driverOptions - The driver options.
570
570
*/
571
571
async requirePassword ( ) : Promise < string > {
572
572
const passwordPromise = askpassword ( {
0 commit comments