Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/shell-api/src/replica-set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { asPrintable } from './enums';
import { assertArgsDefined, assertArgsType } from './helpers';
import { CommonErrors, MongoshDeprecatedError, MongoshInvalidInputError, MongoshRuntimeError } from '@mongosh/errors';
import { CommandResult } from './result';

import { redactPassword } from '@mongosh/history';

@shellApiClassDefault
@hasAsyncChild
Expand Down Expand Up @@ -252,7 +252,7 @@ export default class ReplicaSet extends ShellApiClass {
* Internal method to determine what is printed for this class.
*/
[asPrintable](): string {
return `ReplicaSet class connected to ${this._database._mongo._uri} via db ${this._database._name}`;
return `ReplicaSet class connected to ${redactPassword(this._database._mongo._uri)} via db ${this._database._name}`;
}

/**
Expand Down
3 changes: 2 additions & 1 deletion packages/shell-api/src/shard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type { Document } from '@mongosh/service-provider-core';
import { assertArgsDefined, assertArgsType, getConfigDB, getPrintableShardStatus } from './helpers';
import { ServerVersions, asPrintable } from './enums';
import { CommandResult, UpdateResult } from './result';
import { redactPassword } from '@mongosh/history';

@shellApiClassDefault
@hasAsyncChild
Expand All @@ -24,7 +25,7 @@ export default class Shard extends ShellApiClass {
* Internal method to determine what is printed for this class.
*/
[asPrintable](): string {
return `Shard class connected to ${this._database._mongo._uri} via db ${this._database._name}`;
return `Shard class connected to ${redactPassword(this._database._mongo._uri)} via db ${this._database._name}`;
}

/**
Expand Down