• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mongodb-js / mongodb-mcp-server / 16804714278

07 Aug 2025 12:39PM UTC coverage: 81.376% (+0.1%) from 81.276%
16804714278

Pull #371

github

web-flow
Merge 0e28212a1 into 42837a410
Pull Request #371: chore(build): build a universal ESM and CommonJS package

661 of 854 branches covered (77.4%)

Branch coverage included in aggregate %.

79 of 90 new or added lines in 5 files covered. (87.78%)

1 existing line in 1 file now uncovered.

3538 of 4306 relevant lines covered (82.16%)

58.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

58.14
/src/resources/common/config.ts
1
import { ReactiveResource } from "../resource.js";
2✔
2
import { config } from "../../common/config.js";
2✔
3
import type { UserConfig } from "../../common/config.js";
4
import type { Server } from "../../server.js";
5
import type { Telemetry } from "../../telemetry/telemetry.js";
6

7
export class ConfigResource extends ReactiveResource<UserConfig, readonly []> {
2✔
8
    constructor(server: Server, telemetry: Telemetry) {
2✔
9
        super(
68✔
10
            {
68✔
11
                name: "config",
68✔
12
                uri: "config://config",
68✔
13
                config: {
68✔
14
                    description:
68✔
15
                        "Server configuration, supplied by the user either as environment variables or as startup arguments",
68✔
16
                },
68✔
17
            },
68✔
18
            {
68✔
19
                initial: { ...config },
68✔
20
                events: [],
68✔
21
            },
68✔
22
            server,
68✔
23
            telemetry
68✔
24
        );
68✔
25
    }
68✔
26
    reduce(eventName: undefined, event: undefined): UserConfig {
2✔
UNCOV
27
        void eventName;
×
28
        void event;
×
29

30
        return this.current;
×
31
    }
×
32

33
    toOutput(): string {
2✔
34
        const result = {
×
35
            telemetry: this.current.telemetry,
×
36
            logPath: this.current.logPath,
×
37
            connectionString: this.current.connectionString
×
38
                ? "set; access to MongoDB tools are currently available to use"
×
39
                : "not set; before using any MongoDB tool, you need to configure a connection string, alternatively you can setup MongoDB Atlas access, more info at 'https://github.com/mongodb-js/mongodb-mcp-server'.",
×
40
            connectOptions: this.current.connectOptions,
×
41
            atlas:
×
42
                this.current.apiClientId && this.current.apiClientSecret
×
43
                    ? "set; MongoDB Atlas tools are currently available to use"
×
44
                    : "not set; MongoDB Atlas tools are currently unavailable, to have access to MongoDB Atlas tools like creating clusters or connecting to clusters make sure to setup credentials, more info at 'https://github.com/mongodb-js/mongodb-mcp-server'.",
×
45
        };
×
46

47
        return JSON.stringify(result);
×
48
    }
×
49
}
2✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc