Skip to content

Commit c178465

Browse files
chore: further feedback
1 parent be508a6 commit c178465

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

src/common/connectionManager.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { type ConnectionInfo, generateConnectionInfoFromCliArgs } from "@mongosh
66
import type { DeviceId } from "../helpers/deviceId.js";
77
import type { DriverOptions, UserConfig } from "./config.js";
88
import { MongoDBError, ErrorCodes } from "./errors.js";
9-
import { type CompositeLogger, LogId } from "./logger.js";
9+
import { type LoggerBase, LogId } from "./logger.js";
1010
import { packageInfo } from "./packageInfo.js";
1111
import { type AppNameComponents, setAppNameParamIfMissing } from "../helpers/connectionOptions.js";
1212

@@ -123,7 +123,7 @@ export class MCPConnectionManager extends ConnectionManager {
123123
constructor(
124124
private userConfig: UserConfig,
125125
private driverOptions: DriverOptions,
126-
private logger: CompositeLogger,
126+
private logger: LoggerBase,
127127
deviceId: DeviceId,
128128
bus?: EventEmitter
129129
) {
@@ -132,7 +132,6 @@ export class MCPConnectionManager extends ConnectionManager {
132132
this.bus.on("mongodb-oidc-plugin:auth-failed", this.onOidcAuthFailed.bind(this));
133133
this.bus.on("mongodb-oidc-plugin:auth-succeeded", this.onOidcAuthSucceeded.bind(this));
134134
this.deviceId = deviceId;
135-
this.clientName = "unknown";
136135
}
137136

138137
async connect(settings: ConnectionSettings): Promise<AnyConnectionState> {

src/lib.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
export { Server, type ServerOptions } from "./server.js";
22
export { Session, type SessionOptions } from "./common/session.js";
33
export { defaultUserConfig, type UserConfig } from "./common/config.js";
4-
export { LoggerBase, CompositeLogger, type LogPayload, type LoggerType, type LogLevel } from "./common/logger.js";
4+
export { LoggerBase, type LogPayload, type LoggerType, type LogLevel } from "./common/logger.js";
55
export { StreamableHttpRunner } from "./transports/streamableHttp.js";
66
export { type ConnectionManagerFactoryFn } from "./transports/base.js";
77
export {
88
ConnectionManager,
99
type AnyConnectionState,
1010
type ConnectionState,
11-
type ConnectionStateConnected,
12-
type ConnectionStateConnecting,
1311
type ConnectionStateDisconnected,
14-
type ConnectionStateErrored,
1512
} from "./common/connectionManager.js";
1613
export { Telemetry } from "./telemetry/telemetry.js";

src/transports/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type { ConnectionManager } from "../common/connectionManager.js";
1111
import { DeviceId } from "../helpers/deviceId.js";
1212

1313
export type ConnectionManagerFactoryFn = (createParams: {
14-
logger: CompositeLogger;
14+
logger: LoggerBase;
1515
deviceId: DeviceId;
1616
}) => Promise<ConnectionManager>;
1717

tests/integration/build.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ describe("Build Test", () => {
4343
expect(cjsKeys).toEqual(esmKeys);
4444
expect(cjsKeys).toEqual(
4545
expect.arrayContaining([
46-
"CompositeLogger",
4746
"ConnectionManager",
4847
"LoggerBase",
4948
"Server",

0 commit comments

Comments
 (0)