Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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 src/common/atlas/auth.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApiClient } from "./apiClient";
import { State } from "../../state";
import { ApiClient } from "./apiClient.js";
import { State } from "../../state.js";

export async function ensureAuthenticated(state: State, apiClient: ApiClient): Promise<void> {
if (!(await isAuthenticated(state, apiClient))) {
Expand Down
9 changes: 1 addition & 8 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import path from "path";
import fs from "fs";
import { fileURLToPath } from "url";
import os from "os";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const packageMetadata = fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf8");
const packageJson = JSON.parse(packageMetadata);
import packageJson from "../package.json" with { type: "json" };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work on windows?

Copy link
Collaborator Author

@fmenezes fmenezes Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested anything on windows yet, perhaps we should start with integration tests and run them on linux, windows and macos

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added #44


export const config = {
atlasApiVersion: `2025-03-12`,
Expand Down
2 changes: 1 addition & 1 deletion src/tools/mongodb/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { z } from "zod";
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
import { NodeDriverServiceProvider } from "@mongosh/service-provider-node-driver";
import { DbOperationType, MongoDBToolBase } from "./mongodbTool.js";
import { ToolArgs } from "../tool";
import { ToolArgs } from "../tool.js";
import { ErrorCodes, MongoDBError } from "../../errors.js";

export class ConnectTool extends MongoDBToolBase {
Expand Down
4 changes: 4 additions & 0 deletions src/types/mongodb-redact.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module "mongodb-redact" {
function redact<T>(message: T): T;
export default redact;
}
8 changes: 5 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{
"compilerOptions": {
"target": "es2020",
"module": "esnext",
"moduleResolution": "node",
"module": "nodenext",
"moduleResolution": "nodenext",
"rootDir": "./src",
"outDir": "./dist",
"strict": true,
"esModuleInterop": true,
"types": ["node"],
"sourceMap": true,
"skipLibCheck": true
"skipLibCheck": true,
"resolveJsonModule": true,
"typeRoots": ["./node_modules/@types", "./src/types"]
},
"include": ["src/**/*.ts"]
}