From d27e6b87f0a4fef7525f55432b65dc3921058009 Mon Sep 17 00:00:00 2001 From: gagik Date: Fri, 25 Apr 2025 11:37:15 +0200 Subject: [PATCH 1/2] fix: bump mongodb-mcp-server --- package-lock.json | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 85d46171..3fa1897a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mongodb-mcp-server", - "version": "0.0.3", + "version": "0.0.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "mongodb-mcp-server", - "version": "0.0.3", + "version": "0.0.4", "license": "Apache-2.0", "dependencies": { "@modelcontextprotocol/sdk": "^1.8.0", @@ -42,7 +42,7 @@ "jest-environment-node": "^29.7.0", "jest-extended": "^4.0.2", "mongodb-runner": "^5.8.2", - "native-machine-id": "^0.0.8", + "native-machine-id": "^0.1.0", "openapi-types": "^12.1.3", "openapi-typescript": "^7.6.1", "prettier": "^3.5.3", @@ -11103,9 +11103,9 @@ "optional": true }, "node_modules/native-machine-id": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/native-machine-id/-/native-machine-id-0.0.8.tgz", - "integrity": "sha512-0sMw6WHfG1A7N59C1odmge9K/F9uC+1dgXHjMW57w319ii/nI05FDFwlXSjPMAHHB7hU7OInpVuH+Sgjz5enog==", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/native-machine-id/-/native-machine-id-0.1.0.tgz", + "integrity": "sha512-Po7OPcXGsWZ/o+n93ZOhmF3G5RQsEUMTnVddX45u5GfoEnk803ba7lhztwMkDaPhUFHy5FpXLiytIFitVxMkTA==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", diff --git a/package.json b/package.json index c9e52549..e3c02f8f 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "jest-environment-node": "^29.7.0", "jest-extended": "^4.0.2", "mongodb-runner": "^5.8.2", - "native-machine-id": "^0.0.8", + "native-machine-id": "^0.1.0", "openapi-types": "^12.1.3", "openapi-typescript": "^7.6.1", "prettier": "^3.5.3", From e2b9b581b1d170fc93281f14c2df00c4e518789d Mon Sep 17 00:00:00 2001 From: gagik Date: Fri, 25 Apr 2025 11:42:31 +0200 Subject: [PATCH 2/2] fix: update types --- src/telemetry/telemetry.ts | 2 +- src/telemetry/types.ts | 2 +- src/types/native-machine-id.d.ts | 34 -------------------------------- 3 files changed, 2 insertions(+), 36 deletions(-) delete mode 100644 src/types/native-machine-id.d.ts diff --git a/src/telemetry/telemetry.ts b/src/telemetry/telemetry.ts index a43b11c9..73c87613 100644 --- a/src/telemetry/telemetry.ts +++ b/src/telemetry/telemetry.ts @@ -13,7 +13,7 @@ type EventResult = { }; type CommonProperties = { - device_id: string; + device_id?: string; mcp_server_version: string; mcp_server_name: string; mcp_client_version?: string; diff --git a/src/telemetry/types.ts b/src/telemetry/types.ts index 4f24e545..8cdd9f8f 100644 --- a/src/telemetry/types.ts +++ b/src/telemetry/types.ts @@ -14,7 +14,7 @@ export interface Event { export interface BaseEvent extends Event { properties: { - device_id: string; + device_id?: string; mcp_server_version: string; mcp_server_name: string; mcp_client_version?: string; diff --git a/src/types/native-machine-id.d.ts b/src/types/native-machine-id.d.ts deleted file mode 100644 index 153dbf38..00000000 --- a/src/types/native-machine-id.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Type definitions for native-machine-id - * Provides functionality to retrieve the machine ID of the current device. - */ - -declare module "native-machine-id" { - /** - * Gets the machine ID synchronously. - * @returns A string containing the machine ID. - */ - export function getMachineIdSync(): string; - - /** - * Gets the machine ID asynchronously. - * @returns A Promise that resolves to a string containing the machine ID. - */ - export function getMachineId(): Promise; - - /** - * Gets a machine ID that is based on the original ID but is "hashed" for privacy. - * @param {string} [original] - The original ID to hash. If not provided, gets the machine ID first. - * @param {string} [type='md5'] - The hashing algorithm to use. - * @returns A Promise that resolves to a string containing the hashed machine ID. - */ - export function machineIdSync(original?: string, type?: string): string; - - /** - * Gets a machine ID that is based on the original ID but is "hashed" for privacy. - * @param {string} [original] - The original ID to hash. If not provided, gets the machine ID first. - * @param {string} [type='md5'] - The hashing algorithm to use. - * @returns A Promise that resolves to a string containing the hashed machine ID. - */ - export function machineId(original?: string, type?: string): Promise; -}