File tree 3 files changed +13
-5
lines changed
3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 74
74
node-version-file : package.json
75
75
cache : " npm"
76
76
- name : Install dependencies & build
77
- run : npm ci --omit=dev --include=@modelcontextprotocol/inspector
78
- - run : npm run inspect -- --cli --method tools/list --connectionString "mongodb://localhost"
77
+ run : npm ci
78
+ - name : Remove dev dependencies
79
+ run : |
80
+ rm -rf node_modules
81
+ npm pkg set scripts.prepare="exit 0"
82
+ npm install --omit=dev
83
+ - run : npx -y @modelcontextprotocol/inspector --cli --method tools/list -- node dist/index.js --connectionString "mongodb://localhost"
79
84
80
85
coverage :
81
86
name : Report Coverage
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { ApiClient } from "../common/atlas/apiClient.js";
6
6
import { MACHINE_METADATA } from "./constants.js" ;
7
7
import { EventCache } from "./eventCache.js" ;
8
8
import { createHmac } from "crypto" ;
9
- import { machineId } from "node-machine-id" ;
9
+ import nodeMachineId from "node-machine-id" ;
10
10
import { DeferredPromise } from "../deferred-promise.js" ;
11
11
12
12
type EventResult = {
@@ -39,6 +39,9 @@ export class Telemetry {
39
39
}
40
40
41
41
private async start ( ) : Promise < void > {
42
+ if ( ! Telemetry . isTelemetryEnabled ( ) ) {
43
+ return ;
44
+ }
42
45
this . deviceIdPromise = DeferredPromise . fromPromise ( this . getDeviceId ( ) , {
43
46
timeout : DEVICE_ID_TIMEOUT ,
44
47
onTimeout : ( resolve ) => {
@@ -66,7 +69,7 @@ export class Telemetry {
66
69
return this . commonProperties . device_id ;
67
70
}
68
71
69
- const originalId = await machineId ( true ) ;
72
+ const originalId = await nodeMachineId . machineId ( true ) ;
70
73
71
74
// Create a hashed format from the all uppercase version of the machine ID
72
75
// to match it exactly with the denisbrodbeck/machineid library that Atlas CLI uses.
Original file line number Diff line number Diff line change 8
8
"strict" : true ,
9
9
"strictNullChecks" : true ,
10
10
"esModuleInterop" : true ,
11
- "types" : [" node" , " jest " ],
11
+ "types" : [" node" ],
12
12
"sourceMap" : true ,
13
13
"skipLibCheck" : true ,
14
14
"resolveJsonModule" : true ,
You can’t perform that action at this time.
0 commit comments