From 51f3d9a9f6239c4abf5e12dd3e69b185c93a44f5 Mon Sep 17 00:00:00 2001 From: Alena Khineika Date: Mon, 29 Jul 2024 16:23:41 +0200 Subject: [PATCH 1/5] feat(telemetry): update new connection telemetry VSCODE-560 --- package-lock.json | 977 +++++++++++++----- package.json | 26 +- src/telemetry/connectionTelemetry.ts | 127 ++- .../telemetry/connectionTelemetry.test.ts | 453 ++++++-- 4 files changed, 1176 insertions(+), 407 deletions(-) diff --git a/package-lock.json b/package-lock.json index 78d723169..377eb20f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,15 +20,15 @@ "@mongosh/service-provider-server": "^2.2.10", "@mongosh/shell-api": "^2.2.10", "@segment/analytics-node": "^1.3.0", - "bson": "^6.7.0", + "bson": "^6.8.0", "bson-transpilers": "^2.2.0", - "debug": "^4.3.5", + "debug": "^4.3.6", "dotenv": "^16.4.5", "lodash": "^4.17.21", "micromatch": "^4.0.7", - "mongodb": "^6.7.0", + "mongodb": "^6.8.0", "mongodb-build-info": "^1.7.2", - "mongodb-cloud-info": "^2.1.2", + "mongodb-cloud-info": "^2.1.3", "mongodb-connection-string-url": "^3.0.1", "mongodb-data-service": "^22.21.1", "mongodb-log-writer": "^1.4.2", @@ -59,7 +59,7 @@ "@types/debug": "^4.1.12", "@types/glob": "^7.2.0", "@types/jest": "^26.0.24", - "@types/micromatch": "^4.0.7", + "@types/micromatch": "^4.0.9", "@types/mkdirp": "^2.0.0", "@types/mocha": "^8.2.3", "@types/node": "^14.18.63", @@ -68,15 +68,15 @@ "@types/sinon": "^9.0.11", "@types/sinon-chai": "^3.2.12", "@types/uuid": "^8.3.4", - "@types/vscode": "^1.90.0", + "@types/vscode": "^1.91.0", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", - "@vscode/test-electron": "^2.4.0", - "@vscode/vsce": "^2.29.0", + "@vscode/test-electron": "^2.4.1", + "@vscode/vsce": "^2.31.1", "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0", "autoprefixer": "^10.4.19", "buffer": "^6.0.3", - "chai": "^4.4.1", + "chai": "^4.5.0", "chai-as-promised": "^7.1.2", "cross-env": "^7.0.3", "crypto-browserify": "^3.12.0", @@ -85,18 +85,18 @@ "enzyme": "^3.11.0", "eslint": "^8.57.0", "eslint-config-mongodb-js": "^5.0.3", - "eslint-plugin-mocha": "^10.4.3", + "eslint-plugin-mocha": "^10.5.0", "fork-ts-checker-webpack-plugin": "^9.0.2", "glob": "^7.2.3", "jest": "^26.6.3", "jest-junit": "^12.3.0", "jest-transform-stub": "^2.0.0", "mkdirp": "^1.0.4", - "mocha": "^10.5.1", + "mocha": "^10.7.0", "mocha-junit-reporter": "^2.2.1", "mocha-multi": "^1.1.7", "mongodb-client-encryption": "^6.0.1", - "mongodb-runner": "^5.6.2", + "mongodb-runner": "^5.6.4", "node-fetch": "^2.7.0", "node-loader": "^0.6.0", "npm-run-all": "^4.1.5", @@ -121,7 +121,7 @@ "engines": { "node": ">=16.16.0", "npm": ">=8.19.4", - "vscode": "^1.90.2" + "vscode": "^1.91.1" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -2287,6 +2287,102 @@ "deprecated": "Use @eslint/object-schema instead", "dev": true }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -4055,9 +4151,9 @@ } }, "node_modules/@mongodb-js/mongodb-downloader": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@mongodb-js/mongodb-downloader/-/mongodb-downloader-0.3.2.tgz", - "integrity": "sha512-bhMfxzaBy31RveAu7qqON3nVXRHYmxJXyC3lZI+mK+4DhagKZdGHJpMkLmHQRt+wAxMR6ldI9YlcWjHSqceIsQ==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@mongodb-js/mongodb-downloader/-/mongodb-downloader-0.3.3.tgz", + "integrity": "sha512-PIu8qF6J02lQsxfq8vdcfvueb8H5mrB43UaOl1E4AQMrOhm403imAZYKH61qe+7J7WzlVFck0zGI/7brHLHcNQ==", "dev": true, "dependencies": { "debug": "^4.3.4", @@ -4150,9 +4246,9 @@ } }, "node_modules/@mongodb-js/saslprep": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.7.tgz", - "integrity": "sha512-dCHW/oEX0KJ4NjDULBo3JiOaK5+6axtpBbS+ao2ZInoAL9/YRQLhXzSNAFz7hP4nzLkIqsfYAK/PDE3+XHny0Q==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.8.tgz", + "integrity": "sha512-qKwC/M/nNNaKUBMQ0nuzm47b7ZYWQHN3pcXq4IIcoSBc2hOIrflAxJduIvvqmhoz3gR2TacTAs8vlsCVPkiEdQ==", "dependencies": { "sparse-bitfield": "^3.0.3" } @@ -4668,6 +4764,16 @@ "nv": "bin/nv" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@polka/url": { "version": "1.0.0-next.25", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz", @@ -5833,9 +5939,9 @@ } }, "node_modules/@types/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@types/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-C/FMQ8HJAZhTsDpl4wDKZdMeeW5USjgzOczUwTGbRc1ZopPgOhIEnxY2ZgUrsuyy4DwK1JVOJZKFakv3TbCKiA==", + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/micromatch/-/micromatch-4.0.9.tgz", + "integrity": "sha512-7V+8ncr22h4UoYRLnLXSpTxjQrNUXtWHGeMPRJt1nULXI57G9bIcpyrHlmrQ7QK24EyyuXvYcSSWAM8GA9nqCg==", "dev": true, "dependencies": { "@types/braces": "*" @@ -6018,9 +6124,9 @@ "dev": true }, "node_modules/@types/vscode": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.90.0.tgz", - "integrity": "sha512-oT+ZJL7qHS9Z8bs0+WKf/kQ27qWYR3trsXpq46YDjFqBsMLG4ygGGjPaJ2tyrH0wJzjOEmDyg9PDJBBhWg9pkQ==", + "version": "1.91.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.91.0.tgz", + "integrity": "sha512-PgPr+bUODjG3y+ozWUCyzttqR9EHny9sPAfJagddQjDwdtf66y2sDKJMnFZRuzBA2YtBGASqJGPil8VDUPvO6A==", "dev": true }, "node_modules/@types/webidl-conversions": { @@ -6255,13 +6361,13 @@ "dev": true }, "node_modules/@vscode/test-electron": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.4.0.tgz", - "integrity": "sha512-yojuDFEjohx6Jb+x949JRNtSn6Wk2FAh4MldLE3ck9cfvCqzwxF32QsNy1T9Oe4oT+ZfFcg0uPUCajJzOmPlTA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.4.1.tgz", + "integrity": "sha512-Gc6EdaLANdktQ1t+zozoBVRynfIsMKMc94Svu1QreOBC8y76x4tvaK32TljrLi1LI2+PK58sDVbL7ALdqf3VRQ==", "dev": true, "dependencies": { "http-proxy-agent": "^7.0.2", - "https-proxy-agent": "^7.0.4", + "https-proxy-agent": "^7.0.5", "jszip": "^3.10.1", "ora": "^7.0.1", "semver": "^7.6.2" @@ -6341,9 +6447,9 @@ } }, "node_modules/@vscode/test-electron/node_modules/https-proxy-agent": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", - "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", "dev": true, "dependencies": { "agent-base": "^7.0.2", @@ -6465,9 +6571,9 @@ } }, "node_modules/@vscode/vsce": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.29.0.tgz", - "integrity": "sha512-63+aEO8SpjE6qKiIh2Cqy/P9zC7+USElGwpEdkyPp89xIBDBr5IqeNS3zkD3mp3wZqbvHIpJsCCNu74WQirYCg==", + "version": "2.31.1", + "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.31.1.tgz", + "integrity": "sha512-LwEQFKXV21C4/brvGPH/9+7ZOUM5cbK7oJ4fVmy0YG75NIy1HV8eMSoBZrl+u23NxpAhor62Cu1aI+JFtCtjSg==", "dev": true, "dependencies": { "@azure/identity": "^4.1.0", @@ -6478,7 +6584,7 @@ "cockatiel": "^3.1.2", "commander": "^6.2.1", "form-data": "^4.0.0", - "glob": "^7.0.6", + "glob": "^11.0.0", "hosted-git-info": "^4.0.2", "jsonc-parser": "^3.2.0", "leven": "^3.1.0", @@ -6488,7 +6594,7 @@ "parse-semver": "^1.1.1", "read": "^1.0.7", "semver": "^7.5.2", - "tmp": "^0.2.1", + "tmp": "^0.2.3", "typed-rest-client": "^1.8.4", "url-join": "^4.0.1", "xml2js": "^0.5.0", @@ -6652,6 +6758,15 @@ "node": ">=4" } }, + "node_modules/@vscode/vsce/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/@vscode/vsce/node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -6699,6 +6814,44 @@ "node": ">=0.8.0" } }, + "node_modules/@vscode/vsce/node_modules/glob": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", + "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^4.0.1", + "minimatch": "^10.0.0", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@vscode/vsce/node_modules/glob/node_modules/minimatch": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", + "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@vscode/vsce/node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -6708,6 +6861,15 @@ "node": ">=4" } }, + "node_modules/@vscode/vsce/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/@vscode/vsce/node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -7159,9 +7321,9 @@ } }, "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, "engines": { "node": ">=6" @@ -8111,9 +8273,9 @@ } }, "node_modules/bson": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/bson/-/bson-6.7.0.tgz", - "integrity": "sha512-w2IquM5mYzYZv6rs3uN2DZTOBe2a0zXLj53TGDqwF4l6Sz/XsISrisXOJihArF9+BZ6Cq/GjVht7Sjfmri7ytQ==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-6.8.0.tgz", + "integrity": "sha512-iOJg8pr7wq2tg/zSlCCHMi3hMm5JTOxLTagf3zxhcenHsFp+c6uOs6K7W5UE7A4QIJGtqh/ZovFNMP4mOPJynQ==", "engines": { "node": ">=16.20.1" } @@ -8393,9 +8555,9 @@ } }, "node_modules/chai": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", - "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, "dependencies": { "assertion-error": "^1.1.0", @@ -8404,7 +8566,7 @@ "get-func-name": "^2.0.2", "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.8" + "type-detect": "^4.1.0" }, "engines": { "node": ">=4" @@ -8422,6 +8584,15 @@ "chai": ">= 2.1.2 < 6" } }, + "node_modules/chai/node_modules/type-detect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -9260,9 +9431,9 @@ "dev": true }, "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dependencies": { "ms": "2.1.2" }, @@ -9889,9 +10060,9 @@ "optional": true }, "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, "engines": { "node": ">=0.3.1" @@ -11104,9 +11275,9 @@ } }, "node_modules/eslint-plugin-mocha": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.4.3.tgz", - "integrity": "sha512-emc4TVjq5Ht0/upR+psftuz6IBG5q279p+1dSRDeHf+NS9aaerBi3lXKo1SEzwC29hFIW21gO89CEWSvRsi8IQ==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.5.0.tgz", + "integrity": "sha512-F2ALmQVPT1GoP27O1JTZGrV9Pqg8k79OeIuvw63UxMtQKREZtmkK1NFgkZQ2TW7L2JSSFKHFPTtHu5z8R9QNRw==", "dev": true, "dependencies": { "eslint-utils": "^3.0.0", @@ -12272,6 +12443,34 @@ "node": ">=0.10.0" } }, + "node_modules/foreground-child": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/fork-ts-checker-webpack-plugin": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-9.0.2.tgz", @@ -14667,6 +14866,24 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.1.tgz", + "integrity": "sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/javascript-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/javascript-stringify/-/javascript-stringify-2.1.0.tgz", @@ -16544,31 +16761,31 @@ "devOptional": true }, "node_modules/mocha": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.5.1.tgz", - "integrity": "sha512-eq5tEnaz2kM9ade8cuGJBMh5fBb9Ih/TB+ddlmPR+wLQmwLhUwa0ovqDlg7OTfKquW0BI7NUcNWX7DH8sC+3gw==", + "version": "10.7.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.0.tgz", + "integrity": "sha512-v8/rBWr2VO5YkspYINnvu81inSz2y3ODJrhO175/Exzor1RcEZZkizgE2A+w/CAXXoESS8Kys5E62dOHGHzULA==", "dev": true, "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", "chokidar": "^3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "8.1.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" }, "bin": { "_mocha": "bin/_mocha", @@ -16634,29 +16851,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "node_modules/mocha/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/mocha/node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/mocha/node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -16721,9 +16915,9 @@ } }, "node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -16786,19 +16980,10 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/mocha/node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/mongodb": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.7.0.tgz", - "integrity": "sha512-TMKyHdtMcO0fYBNORiYdmM25ijsHs+Njs963r4Tro4OQZzqYigAzYQouwWRg4OIaiLRUEGUh/1UAcH5lxdSLIA==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.8.0.tgz", + "integrity": "sha512-HGQ9NWDle5WvwMnrvUxsFYPd3JEbqD3RgABHBQRuoCEND0qzhsd0iH5ypHsf1eJ+sXmvmyKpP+FLOKY8Il7jMw==", "dependencies": { "@mongodb-js/saslprep": "^1.1.5", "bson": "^6.7.0", @@ -16890,9 +17075,9 @@ } }, "node_modules/mongodb-cloud-info": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/mongodb-cloud-info/-/mongodb-cloud-info-2.1.2.tgz", - "integrity": "sha512-t5i0Q/PrUE2ZfFMWEJFyCSDPSmeTKKiwGIkMEpBeNH0Qv0gnVzp6hJ8EWGzcdhLnk7kgHj0x5O7V5oy+emGoAg==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/mongodb-cloud-info/-/mongodb-cloud-info-2.1.3.tgz", + "integrity": "sha512-SxvjPZ+4CsPhe0Now9aLpiSHmQGwm1jYu5hshBMkq3hAKnLrBuOwK/3TovY4SQl6h6Utqkx2rBHqLbO9incEZA==", "dependencies": { "cross-fetch": "^3.1.6", "gce-ips": "^1.0.2", @@ -17045,15 +17230,15 @@ } }, "node_modules/mongodb-runner": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/mongodb-runner/-/mongodb-runner-5.6.2.tgz", - "integrity": "sha512-6XF3iGXswbJy8TC4VgYPVxnrMiUTJ7iaehE+Hiox2sZL2y3b6aNKkrD3Rt2w6nO0JKnwlR/mukyXbMlz2Zmuvw==", + "version": "5.6.4", + "resolved": "https://registry.npmjs.org/mongodb-runner/-/mongodb-runner-5.6.4.tgz", + "integrity": "sha512-pwWsei3btwq9omPLjNaERmSxwt72/OzQx1O468XBuUfhmlTJ+Ta+CIUYOX8vP3K0vSS6E/NUQBG/3ctEoLqOCA==", "dev": true, "dependencies": { - "@mongodb-js/mongodb-downloader": "^0.3.2", - "@mongodb-js/saslprep": "^1.1.7", + "@mongodb-js/mongodb-downloader": "^0.3.3", + "@mongodb-js/saslprep": "^1.1.8", "debug": "^4.3.4", - "mongodb": "^6.3.0", + "mongodb": "^6.8.0", "mongodb-connection-string-url": "^3.0.0", "yargs": "^17.7.2" }, @@ -18269,6 +18454,12 @@ "node": ">=6" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true + }, "node_modules/pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", @@ -18427,6 +18618,40 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "dev": true, + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.0.tgz", + "integrity": "sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==", + "dev": true, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/path-scurry/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -20206,9 +20431,9 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "dependencies": { "randombytes": "^2.1.0" @@ -21299,6 +21524,21 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string.prototype.matchall": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", @@ -21392,6 +21632,19 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -21851,15 +22104,6 @@ "node": ">= 10.13.0" } }, - "node_modules/terser-webpack-plugin/node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, "node_modules/terser-webpack-plugin/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -21954,15 +22198,12 @@ } }, "node_modules/tmp": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", + "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", "dev": true, - "dependencies": { - "rimraf": "^3.0.0" - }, "engines": { - "node": ">=8.17.0" + "node": ">=14.14" } }, "node_modules/tmpl": { @@ -23147,9 +23388,9 @@ } }, "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", "dev": true }, "node_modules/wrap-ansi": { @@ -23169,6 +23410,24 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -25149,6 +25408,71 @@ "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "dev": true }, + "@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "requires": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + }, + "wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "requires": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + } + } + } + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -26714,9 +27038,9 @@ } }, "@mongodb-js/mongodb-downloader": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@mongodb-js/mongodb-downloader/-/mongodb-downloader-0.3.2.tgz", - "integrity": "sha512-bhMfxzaBy31RveAu7qqON3nVXRHYmxJXyC3lZI+mK+4DhagKZdGHJpMkLmHQRt+wAxMR6ldI9YlcWjHSqceIsQ==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@mongodb-js/mongodb-downloader/-/mongodb-downloader-0.3.3.tgz", + "integrity": "sha512-PIu8qF6J02lQsxfq8vdcfvueb8H5mrB43UaOl1E4AQMrOhm403imAZYKH61qe+7J7WzlVFck0zGI/7brHLHcNQ==", "dev": true, "requires": { "debug": "^4.3.4", @@ -26794,9 +27118,9 @@ "requires": {} }, "@mongodb-js/saslprep": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.7.tgz", - "integrity": "sha512-dCHW/oEX0KJ4NjDULBo3JiOaK5+6axtpBbS+ao2ZInoAL9/YRQLhXzSNAFz7hP4nzLkIqsfYAK/PDE3+XHny0Q==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.8.tgz", + "integrity": "sha512-qKwC/M/nNNaKUBMQ0nuzm47b7ZYWQHN3pcXq4IIcoSBc2hOIrflAxJduIvvqmhoz3gR2TacTAs8vlsCVPkiEdQ==", "requires": { "sparse-bitfield": "^3.0.3" } @@ -27194,6 +27518,13 @@ "yargs": "^16.2.0" } }, + "@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true + }, "@polka/url": { "version": "1.0.0-next.25", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz", @@ -28140,9 +28471,9 @@ } }, "@types/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@types/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-C/FMQ8HJAZhTsDpl4wDKZdMeeW5USjgzOczUwTGbRc1ZopPgOhIEnxY2ZgUrsuyy4DwK1JVOJZKFakv3TbCKiA==", + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/micromatch/-/micromatch-4.0.9.tgz", + "integrity": "sha512-7V+8ncr22h4UoYRLnLXSpTxjQrNUXtWHGeMPRJt1nULXI57G9bIcpyrHlmrQ7QK24EyyuXvYcSSWAM8GA9nqCg==", "dev": true, "requires": { "@types/braces": "*" @@ -28326,9 +28657,9 @@ "dev": true }, "@types/vscode": { - "version": "1.90.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.90.0.tgz", - "integrity": "sha512-oT+ZJL7qHS9Z8bs0+WKf/kQ27qWYR3trsXpq46YDjFqBsMLG4ygGGjPaJ2tyrH0wJzjOEmDyg9PDJBBhWg9pkQ==", + "version": "1.91.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.91.0.tgz", + "integrity": "sha512-PgPr+bUODjG3y+ozWUCyzttqR9EHny9sPAfJagddQjDwdtf66y2sDKJMnFZRuzBA2YtBGASqJGPil8VDUPvO6A==", "dev": true }, "@types/webidl-conversions": { @@ -28474,13 +28805,13 @@ "dev": true }, "@vscode/test-electron": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.4.0.tgz", - "integrity": "sha512-yojuDFEjohx6Jb+x949JRNtSn6Wk2FAh4MldLE3ck9cfvCqzwxF32QsNy1T9Oe4oT+ZfFcg0uPUCajJzOmPlTA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.4.1.tgz", + "integrity": "sha512-Gc6EdaLANdktQ1t+zozoBVRynfIsMKMc94Svu1QreOBC8y76x4tvaK32TljrLi1LI2+PK58sDVbL7ALdqf3VRQ==", "dev": true, "requires": { "http-proxy-agent": "^7.0.2", - "https-proxy-agent": "^7.0.4", + "https-proxy-agent": "^7.0.5", "jszip": "^3.10.1", "ora": "^7.0.1", "semver": "^7.6.2" @@ -28533,9 +28864,9 @@ } }, "https-proxy-agent": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", - "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", "dev": true, "requires": { "agent-base": "^7.0.2", @@ -28614,9 +28945,9 @@ } }, "@vscode/vsce": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.29.0.tgz", - "integrity": "sha512-63+aEO8SpjE6qKiIh2Cqy/P9zC7+USElGwpEdkyPp89xIBDBr5IqeNS3zkD3mp3wZqbvHIpJsCCNu74WQirYCg==", + "version": "2.31.1", + "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.31.1.tgz", + "integrity": "sha512-LwEQFKXV21C4/brvGPH/9+7ZOUM5cbK7oJ4fVmy0YG75NIy1HV8eMSoBZrl+u23NxpAhor62Cu1aI+JFtCtjSg==", "dev": true, "requires": { "@azure/identity": "^4.1.0", @@ -28627,7 +28958,7 @@ "cockatiel": "^3.1.2", "commander": "^6.2.1", "form-data": "^4.0.0", - "glob": "^7.0.6", + "glob": "^11.0.0", "hosted-git-info": "^4.0.2", "jsonc-parser": "^3.2.0", "keytar": "^7.7.0", @@ -28638,7 +28969,7 @@ "parse-semver": "^1.1.1", "read": "^1.0.7", "semver": "^7.5.2", - "tmp": "^0.2.1", + "tmp": "^0.2.3", "typed-rest-client": "^1.8.4", "url-join": "^4.0.1", "xml2js": "^0.5.0", @@ -28655,6 +28986,15 @@ "color-convert": "^1.9.0" } }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -28693,12 +29033,43 @@ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true }, + "glob": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", + "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==", + "dev": true, + "requires": { + "foreground-child": "^3.1.0", + "jackspeak": "^4.0.1", + "minimatch": "^10.0.0", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "dependencies": { + "minimatch": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", + "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true }, + "minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -29160,9 +29531,9 @@ "requires": {} }, "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true }, "ansi-escapes": { @@ -29904,9 +30275,9 @@ } }, "bson": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/bson/-/bson-6.7.0.tgz", - "integrity": "sha512-w2IquM5mYzYZv6rs3uN2DZTOBe2a0zXLj53TGDqwF4l6Sz/XsISrisXOJihArF9+BZ6Cq/GjVht7Sjfmri7ytQ==" + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-6.8.0.tgz", + "integrity": "sha512-iOJg8pr7wq2tg/zSlCCHMi3hMm5JTOxLTagf3zxhcenHsFp+c6uOs6K7W5UE7A4QIJGtqh/ZovFNMP4mOPJynQ==" }, "bson-transpilers": { "version": "2.2.0", @@ -30097,9 +30468,9 @@ } }, "chai": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", - "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, "requires": { "assertion-error": "^1.1.0", @@ -30108,7 +30479,15 @@ "get-func-name": "^2.0.2", "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.8" + "type-detect": "^4.1.0" + }, + "dependencies": { + "type-detect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true + } } }, "chai-as-promised": { @@ -30797,9 +31176,9 @@ "dev": true }, "debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "requires": { "ms": "2.1.2" }, @@ -31253,9 +31632,9 @@ "optional": true }, "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true }, "diff-sequences": { @@ -32304,9 +32683,9 @@ "requires": {} }, "eslint-plugin-mocha": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.4.3.tgz", - "integrity": "sha512-emc4TVjq5Ht0/upR+psftuz6IBG5q279p+1dSRDeHf+NS9aaerBi3lXKo1SEzwC29hFIW21gO89CEWSvRsi8IQ==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.5.0.tgz", + "integrity": "sha512-F2ALmQVPT1GoP27O1JTZGrV9Pqg8k79OeIuvw63UxMtQKREZtmkK1NFgkZQ2TW7L2JSSFKHFPTtHu5z8R9QNRw==", "dev": true, "requires": { "eslint-utils": "^3.0.0", @@ -33122,6 +33501,24 @@ "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", "dev": true }, + "foreground-child": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "dependencies": { + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + } + } + }, "fork-ts-checker-webpack-plugin": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-9.0.2.tgz", @@ -34905,6 +35302,16 @@ "istanbul-lib-report": "^3.0.0" } }, + "jackspeak": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.1.tgz", + "integrity": "sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==", + "dev": true, + "requires": { + "@isaacs/cliui": "^8.0.2", + "@pkgjs/parseargs": "^0.11.0" + } + }, "javascript-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/javascript-stringify/-/javascript-stringify-2.1.0.tgz", @@ -36451,31 +36858,31 @@ "devOptional": true }, "mocha": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.5.1.tgz", - "integrity": "sha512-eq5tEnaz2kM9ade8cuGJBMh5fBb9Ih/TB+ddlmPR+wLQmwLhUwa0ovqDlg7OTfKquW0BI7NUcNWX7DH8sC+3gw==", + "version": "10.7.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.0.tgz", + "integrity": "sha512-v8/rBWr2VO5YkspYINnvu81inSz2y3ODJrhO175/Exzor1RcEZZkizgE2A+w/CAXXoESS8Kys5E62dOHGHzULA==", "dev": true, "requires": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", "chokidar": "^3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "8.1.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" }, "dependencies": { "argparse": { @@ -36484,23 +36891,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, "find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -36543,9 +36933,9 @@ } }, "minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "requires": { "brace-expansion": "^2.0.1" @@ -36588,12 +36978,6 @@ "requires": { "has-flag": "^4.0.0" } - }, - "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true } } }, @@ -36632,9 +37016,9 @@ } }, "mongodb": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.7.0.tgz", - "integrity": "sha512-TMKyHdtMcO0fYBNORiYdmM25ijsHs+Njs963r4Tro4OQZzqYigAzYQouwWRg4OIaiLRUEGUh/1UAcH5lxdSLIA==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.8.0.tgz", + "integrity": "sha512-HGQ9NWDle5WvwMnrvUxsFYPd3JEbqD3RgABHBQRuoCEND0qzhsd0iH5ypHsf1eJ+sXmvmyKpP+FLOKY8Il7jMw==", "requires": { "@mongodb-js/saslprep": "^1.1.5", "bson": "^6.7.0", @@ -36683,9 +37067,9 @@ } }, "mongodb-cloud-info": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/mongodb-cloud-info/-/mongodb-cloud-info-2.1.2.tgz", - "integrity": "sha512-t5i0Q/PrUE2ZfFMWEJFyCSDPSmeTKKiwGIkMEpBeNH0Qv0gnVzp6hJ8EWGzcdhLnk7kgHj0x5O7V5oy+emGoAg==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/mongodb-cloud-info/-/mongodb-cloud-info-2.1.3.tgz", + "integrity": "sha512-SxvjPZ+4CsPhe0Now9aLpiSHmQGwm1jYu5hshBMkq3hAKnLrBuOwK/3TovY4SQl6h6Utqkx2rBHqLbO9incEZA==", "requires": { "cross-fetch": "^3.1.6", "gce-ips": "^1.0.2", @@ -36818,15 +37202,15 @@ } }, "mongodb-runner": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/mongodb-runner/-/mongodb-runner-5.6.2.tgz", - "integrity": "sha512-6XF3iGXswbJy8TC4VgYPVxnrMiUTJ7iaehE+Hiox2sZL2y3b6aNKkrD3Rt2w6nO0JKnwlR/mukyXbMlz2Zmuvw==", + "version": "5.6.4", + "resolved": "https://registry.npmjs.org/mongodb-runner/-/mongodb-runner-5.6.4.tgz", + "integrity": "sha512-pwWsei3btwq9omPLjNaERmSxwt72/OzQx1O468XBuUfhmlTJ+Ta+CIUYOX8vP3K0vSS6E/NUQBG/3ctEoLqOCA==", "dev": true, "requires": { - "@mongodb-js/mongodb-downloader": "^0.3.2", - "@mongodb-js/saslprep": "^1.1.7", + "@mongodb-js/mongodb-downloader": "^0.3.3", + "@mongodb-js/saslprep": "^1.1.8", "debug": "^4.3.4", - "mongodb": "^6.3.0", + "mongodb": "^6.8.0", "mongodb-connection-string-url": "^3.0.0", "yargs": "^17.7.2" }, @@ -37770,6 +38154,12 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true + }, "pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", @@ -37894,6 +38284,30 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "dev": true, + "requires": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "dependencies": { + "lru-cache": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.0.tgz", + "integrity": "sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==", + "dev": true + }, + "minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true + } + } + }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -39257,9 +39671,9 @@ } }, "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -40143,6 +40557,17 @@ "strip-ansi": "^6.0.1" } }, + "string-width-cjs": { + "version": "npm:string-width@4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, "string.prototype.matchall": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", @@ -40212,6 +40637,15 @@ "ansi-regex": "^5.0.1" } }, + "strip-ansi-cjs": { + "version": "npm:strip-ansi@6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, "strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -40571,15 +41005,6 @@ "supports-color": "^8.0.0" } }, - "serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, "supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -40654,13 +41079,10 @@ "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==" }, "tmp": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", - "dev": true, - "requires": { - "rimraf": "^3.0.0" - } + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", + "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", + "dev": true }, "tmpl": { "version": "1.0.5", @@ -41557,9 +41979,9 @@ "dev": true }, "workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", "dev": true }, "wrap-ansi": { @@ -41573,6 +41995,17 @@ "strip-ansi": "^6.0.0" } }, + "wrap-ansi-cjs": { + "version": "npm:wrap-ansi@7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index dd40df552..d1c2d4cd8 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "create-vulnerability-tickets": "mongodb-sbom-tools generate-vulnerability-report --snyk-reports=.sbom/snyk-test-result.json --dependencies=.sbom/dependencies.json --create-jira-issues" }, "engines": { - "vscode": "^1.90.2", + "vscode": "^1.91.1", "node": ">=16.16.0", "npm": ">=8.19.4" }, @@ -1087,15 +1087,15 @@ "@mongosh/service-provider-server": "^2.2.10", "@mongosh/shell-api": "^2.2.10", "@segment/analytics-node": "^1.3.0", - "bson": "^6.7.0", + "bson": "^6.8.0", "bson-transpilers": "^2.2.0", - "debug": "^4.3.5", + "debug": "^4.3.6", "dotenv": "^16.4.5", "lodash": "^4.17.21", "micromatch": "^4.0.7", - "mongodb": "^6.7.0", + "mongodb": "^6.8.0", "mongodb-build-info": "^1.7.2", - "mongodb-cloud-info": "^2.1.2", + "mongodb-cloud-info": "^2.1.3", "mongodb-connection-string-url": "^3.0.1", "mongodb-data-service": "^22.21.1", "mongodb-log-writer": "^1.4.2", @@ -1126,7 +1126,7 @@ "@types/debug": "^4.1.12", "@types/glob": "^7.2.0", "@types/jest": "^26.0.24", - "@types/micromatch": "^4.0.7", + "@types/micromatch": "^4.0.9", "@types/mkdirp": "^2.0.0", "@types/mocha": "^8.2.3", "@types/node": "^14.18.63", @@ -1135,15 +1135,15 @@ "@types/sinon": "^9.0.11", "@types/sinon-chai": "^3.2.12", "@types/uuid": "^8.3.4", - "@types/vscode": "^1.90.0", + "@types/vscode": "^1.91.0", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", - "@vscode/test-electron": "^2.4.0", - "@vscode/vsce": "^2.29.0", + "@vscode/test-electron": "^2.4.1", + "@vscode/vsce": "^2.31.1", "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0", "autoprefixer": "^10.4.19", "buffer": "^6.0.3", - "chai": "^4.4.1", + "chai": "^4.5.0", "chai-as-promised": "^7.1.2", "cross-env": "^7.0.3", "crypto-browserify": "^3.12.0", @@ -1152,18 +1152,18 @@ "enzyme": "^3.11.0", "eslint": "^8.57.0", "eslint-config-mongodb-js": "^5.0.3", - "eslint-plugin-mocha": "^10.4.3", + "eslint-plugin-mocha": "^10.5.0", "fork-ts-checker-webpack-plugin": "^9.0.2", "glob": "^7.2.3", "jest": "^26.6.3", "jest-junit": "^12.3.0", "jest-transform-stub": "^2.0.0", "mkdirp": "^1.0.4", - "mocha": "^10.5.1", + "mocha": "^10.7.0", "mocha-junit-reporter": "^2.2.1", "mocha-multi": "^1.1.7", "mongodb-client-encryption": "^6.0.1", - "mongodb-runner": "^5.6.2", + "mongodb-runner": "^5.6.4", "node-fetch": "^2.7.0", "node-loader": "^0.6.0", "npm-run-all": "^4.1.5", diff --git a/src/telemetry/connectionTelemetry.ts b/src/telemetry/connectionTelemetry.ts index 68f09794e..c1a4e599f 100644 --- a/src/telemetry/connectionTelemetry.ts +++ b/src/telemetry/connectionTelemetry.ts @@ -6,6 +6,7 @@ import resolveMongodbSrv from 'resolve-mongodb-srv'; import { ConnectionTypes } from '../connectionController'; import { createLogger } from '../logging'; import ConnectionString from 'mongodb-connection-string-url'; +import type { TopologyType } from 'mongodb'; const log = createLogger('connection telemetry helper'); // eslint-disable-next-line @typescript-eslint/no-var-requires @@ -14,38 +15,41 @@ const { version } = require('../../package.json'); export type NewConnectionTelemetryEventProperties = { auth_strategy?: string; is_atlas?: boolean; + is_local_atlas?: boolean; atlas_host_id?: string | null; - is_localhost?: boolean; is_data_lake?: boolean; is_enterprise?: boolean; - is_public_cloud?: boolean; dl_version?: string | null; - public_cloud_name?: string | null; is_genuine?: boolean; non_genuine_server_name?: string | null; server_version?: string; server_arch?: string; server_os?: string; + server_os_family?: string; is_used_connect_screen?: boolean; is_used_command_palette?: boolean; is_used_saved_connection?: boolean; vscode_mdb_extension_version?: string; -}; + topology_type?: TopologyType; +} & HostInformation; -type CloudInfo = { - isPublicCloud?: boolean; - publicCloudName?: string | null; +export type HostInformation = { + is_localhost?: boolean; + is_atlas_url?: boolean; + is_do_url?: boolean; + is_public_cloud?: boolean; + public_cloud_name?: string; }; async function getHostnameForConnection( connectionStringData: ConnectionString -): Promise { +): Promise { if (connectionStringData.isSRV) { const uri = await resolveMongodbSrv(connectionStringData.toString()).catch( () => null ); if (!uri) { - return undefined; + return null; } connectionStringData = new ConnectionString(uri, { looseValidation: true, @@ -56,35 +60,71 @@ async function getHostnameForConnection( return hostname; } -async function getCloudInfoFromHostname(hostname?: string): Promise { - const cloudInfo: { - isAws?: boolean; - isAzure?: boolean; - isGcp?: boolean; - } = await getCloudInfo(hostname); +async function getPublicCloudInfo(host: string): Promise<{ + public_cloud_name?: string; + is_public_cloud?: boolean; +}> { + try { + const { isAws, isAzure, isGcp } = await getCloudInfo(host); + let publicCloudName; + + if (isAws) { + publicCloudName = 'AWS'; + } else if (isAzure) { + publicCloudName = 'Azure'; + } else if (isGcp) { + publicCloudName = 'GCP'; + } + + if (publicCloudName === undefined) { + return { is_public_cloud: false }; + } + + return { + is_public_cloud: true, + public_cloud_name: publicCloudName, + }; + } catch (err) { + return {}; + } +} - if (cloudInfo.isAws) { +async function getHostInformation( + host: string | null +): Promise { + if (!host) { return { - isPublicCloud: true, - publicCloudName: 'aws', + is_do_url: false, + is_atlas_url: false, + is_localhost: false, }; } - if (cloudInfo.isGcp) { + + if (mongoDBBuildInfo.isLocalhost(host)) { return { - isPublicCloud: true, - publicCloudName: 'gcp', + is_public_cloud: false, + is_do_url: false, + is_atlas_url: false, + is_localhost: true, }; } - if (cloudInfo.isAzure) { + + if (mongoDBBuildInfo.isDigitalOcean(host)) { return { - isPublicCloud: true, - publicCloudName: 'azure', + is_localhost: false, + is_public_cloud: false, + is_atlas_url: false, + is_do_url: true, }; } + const publicCloudInfo = await getPublicCloudInfo(host); + return { - isPublicCloud: false, - publicCloudName: null, + is_localhost: false, + is_do_url: false, + is_atlas_url: mongoDBBuildInfo.isAtlas(host), + ...publicCloudInfo, }; } @@ -105,31 +145,28 @@ export async function getConnectionTelemetryProperties( const authMechanism = connectionString.searchParams.get('authMechanism'); const username = connectionString.username ? 'DEFAULT' : 'NONE'; const authStrategy = authMechanism ?? username; - const hostname = await getHostnameForConnection(connectionString); - - const [instance, cloudInfo] = await Promise.all([ - dataService.instance(), - getCloudInfoFromHostname(hostname), - ]); - const isAtlas = mongoDBBuildInfo.isAtlas(connectionString.toString()); - const atlasHostId = isAtlas ? hostname : null; + const resolvedHostname = await getHostnameForConnection(connectionString); + const { dataLake, genuineMongoDB, host, build, isAtlas, isLocalAtlas } = + await dataService.instance(); + const atlasHostId = isAtlas ? resolvedHostname : null; preparedProperties = { ...preparedProperties, + ...(await getHostInformation(resolvedHostname)), auth_strategy: authStrategy, is_atlas: isAtlas, atlas_host_id: atlasHostId, - is_localhost: mongoDBBuildInfo.isLocalhost(connectionString.toString()), - is_data_lake: instance.dataLake.isDataLake, - is_enterprise: instance.build.isEnterprise, - is_public_cloud: cloudInfo.isPublicCloud, - dl_version: instance.dataLake.version, - public_cloud_name: cloudInfo.publicCloudName, - is_genuine: instance.genuineMongoDB.isGenuine, - non_genuine_server_name: instance.genuineMongoDB.dbType, - server_version: instance.build.version, - server_arch: instance.host.arch, - server_os: instance.host.os, + is_local_atlas: isLocalAtlas, + is_data_lake: dataLake.isDataLake, + dl_version: dataLake.version, + is_enterprise: build.isEnterprise, + is_genuine: genuineMongoDB.isGenuine, + non_genuine_server_name: genuineMongoDB.dbType, + server_version: build.version, + server_arch: host.arch, + server_os: host.os, + server_os_family: host.os_family, + topology_type: dataService.getCurrentTopologyType(), }; } catch (error) { log.error('Getting connection telemetry properties failed', error); diff --git a/src/test/suite/telemetry/connectionTelemetry.test.ts b/src/test/suite/telemetry/connectionTelemetry.test.ts index 6c598364b..842028eb4 100644 --- a/src/test/suite/telemetry/connectionTelemetry.test.ts +++ b/src/test/suite/telemetry/connectionTelemetry.test.ts @@ -3,76 +3,114 @@ import { connect } from 'mongodb-data-service'; import { expect } from 'chai'; import sinon from 'sinon'; import type { DataService } from 'mongodb-data-service'; -import mongoDBBuildInfo from 'mongodb-build-info'; - -import * as getCloudInfoModule from 'mongodb-cloud-info'; import { ConnectionTypes } from '../../../connectionController'; import { getConnectionTelemetryProperties } from '../../../telemetry/connectionTelemetry'; import { TEST_DATABASE_URI } from '../dbTestHelper'; +import ConnectionString from 'mongodb-connection-string-url'; + suite('ConnectionTelemetry Controller Test Suite', function () { suite('with mock data service', function () { this.timeout(8000); const sandbox = sinon.createSandbox(); let dataServiceStub; let getConnectionStringStub; - let isAtlasStub; + let instanceStub; before(() => { getConnectionStringStub = sandbox.stub(); - isAtlasStub = sinon.stub(mongoDBBuildInfo, 'isAtlas'); - - const instanceStub = sandbox.stub(); - instanceStub.resolves({ - dataLake: {}, - build: {}, - genuineMongoDB: {}, - host: {}, - } as unknown as Awaited>); - + instanceStub = sandbox.stub(); dataServiceStub = { + getCurrentTopologyType: sandbox.stub(), getConnectionString: getConnectionStringStub, instance: instanceStub, } as unknown as DataService; - - sandbox.stub(getCloudInfoModule, 'getCloudInfo').callsFake(() => - Promise.resolve({ - isAws: false, - isGcp: false, - isAzure: false, - }) - ); }); afterEach(() => { sandbox.restore(); }); - test('it returns atlas_host_id hostname for atlas clusters', async () => { - isAtlasStub.returns(true); - getConnectionStringStub.returns({ - hosts: ['test-data-sets-a011bb.test.net'], - searchParams: { get: () => null }, - } as unknown as ReturnType); + test('it tracks public cloud info', async () => { + instanceStub.resolves({ + dataLake: { + isDataLake: false, + version: 'na', + }, + genuineMongoDB: { + dbType: 'na', + isGenuine: true, + }, + host: {}, + build: { + isEnterprise: false, + version: 'na', + }, + }); + getConnectionStringStub.returns( + new ConnectionString('mongodb://13.64.151.161') + ); const instanceTelemetry = await getConnectionTelemetryProperties( dataServiceStub, ConnectionTypes.CONNECTION_FORM ); - expect(instanceTelemetry.is_atlas).to.equal(true); - expect(instanceTelemetry.atlas_host_id).to.equal( - 'test-data-sets-a011bb.test.net' + expect(instanceTelemetry.is_public_cloud).to.equal(true); + expect(instanceTelemetry.public_cloud_name).to.equal('Azure'); + }); + + test('it tracks non public cloud info', async () => { + instanceStub.resolves({ + dataLake: { + isDataLake: false, + version: 'na', + }, + genuineMongoDB: { + dbType: 'na', + isGenuine: true, + }, + host: {}, + build: { + isEnterprise: false, + version: 'na', + }, + }); + getConnectionStringStub.returns( + new ConnectionString('mongodb://localhost:27017') + ); + + const instanceTelemetry = await getConnectionTelemetryProperties( + dataServiceStub, + ConnectionTypes.CONNECTION_FORM ); + + expect(instanceTelemetry.is_public_cloud).to.equal(false); }); - test('it returns atlas_host_id null for non atlas clusters', async () => { - isAtlasStub.returns(false); - getConnectionStringStub.returns({ - hosts: ['localhost:27088'], - searchParams: { get: () => null }, - } as unknown as ReturnType); + test('it tracks atlas local dev', async () => { + instanceStub.resolves({ + dataLake: { + isDataLake: false, + version: 'na', + }, + genuineMongoDB: { + dbType: 'na', + isGenuine: true, + }, + host: {}, + build: { + isEnterprise: false, + version: 'na', + }, + isAtlas: false, + isLocalAtlas: true, + featureCompatibilityVersion: null, + }); + getConnectionStringStub.returns( + new ConnectionString('mongodb://localhost:27017') + ); const instanceTelemetry = await getConnectionTelemetryProperties( dataServiceStub, @@ -81,14 +119,96 @@ suite('ConnectionTelemetry Controller Test Suite', function () { expect(instanceTelemetry.is_atlas).to.equal(false); expect(instanceTelemetry.atlas_host_id).to.equal(null); + expect(instanceTelemetry.is_atlas_url).to.equal(false); + expect(instanceTelemetry.is_local_atlas).to.equal(true); }); - test('it returns is_used_connect_screen true when the connection type is form', async () => { - isAtlasStub.returns(false); - getConnectionStringStub.returns({ - hosts: ['localhost:27088'], - searchParams: { get: () => null }, - } as unknown as ReturnType); + test('it tracks atlas', async () => { + instanceStub.resolves({ + dataLake: { + isDataLake: false, + version: 'na', + }, + genuineMongoDB: { + dbType: 'na', + isGenuine: true, + }, + host: {}, + build: { + isEnterprise: false, + version: 'na', + }, + isAtlas: true, + isLocalAtlas: false, + featureCompatibilityVersion: null, + }); + getConnectionStringStub.returns( + new ConnectionString('mongodb://test-data-sets-a011bb.mongodb.net') + ); + + const instanceTelemetry = await getConnectionTelemetryProperties( + dataServiceStub, + ConnectionTypes.CONNECTION_FORM + ); + + expect(instanceTelemetry.is_atlas).to.equal(true); + expect(instanceTelemetry.atlas_host_id).to.equal( + 'test-data-sets-a011bb.mongodb.net' + ); + expect(instanceTelemetry.is_atlas_url).to.equal(true); + expect(instanceTelemetry.is_local_atlas).to.equal(false); + }); + + test('it tracks digital ocean', async () => { + instanceStub.resolves({ + dataLake: { + isDataLake: false, + version: 'na', + }, + genuineMongoDB: { + dbType: 'na', + isGenuine: true, + }, + host: {}, + build: { + isEnterprise: false, + version: 'na', + }, + }); + getConnectionStringStub.returns( + new ConnectionString('mongodb://example.mongo.ondigitalocean.com:27017') + ); + + const instanceTelemetry = await getConnectionTelemetryProperties( + dataServiceStub, + ConnectionTypes.CONNECTION_STRING + ); + + expect(instanceTelemetry.is_localhost).to.equal(false); + expect(instanceTelemetry.is_atlas_url).to.equal(false); + expect(instanceTelemetry.is_do_url).to.equal(true); + expect(instanceTelemetry.is_genuine).to.equal(true); + }); + + test('it tracks is_used_connect_screen true when the connection type is form', async () => { + instanceStub.resolves({ + dataLake: { + isDataLake: false, + version: 'na', + }, + genuineMongoDB: { + dbType: 'na', + isGenuine: true, + }, + host: {}, + build: { + isEnterprise: false, + version: 'na', + }, + }); + getConnectionStringStub.returns( + new ConnectionString('mongodb://localhost:27017') + ); const instanceTelemetry = await getConnectionTelemetryProperties( dataServiceStub, @@ -100,12 +220,25 @@ suite('ConnectionTelemetry Controller Test Suite', function () { expect(instanceTelemetry.is_used_saved_connection).to.equal(false); }); - test('it returns is_used_command_palette true when the connection type is string', async () => { - isAtlasStub.returns(false); - getConnectionStringStub.returns({ - hosts: ['localhost:27088'], - searchParams: { get: () => null }, - } as unknown as ReturnType); + test('it tracks is_used_command_palette true when the connection type is string', async () => { + instanceStub.resolves({ + dataLake: { + isDataLake: false, + version: 'na', + }, + genuineMongoDB: { + dbType: 'na', + isGenuine: true, + }, + host: {}, + build: { + isEnterprise: false, + version: 'na', + }, + }); + getConnectionStringStub.returns( + new ConnectionString('mongodb://localhost:27017') + ); const instanceTelemetry = await getConnectionTelemetryProperties( dataServiceStub, @@ -117,12 +250,25 @@ suite('ConnectionTelemetry Controller Test Suite', function () { expect(instanceTelemetry.is_used_saved_connection).to.equal(false); }); - test('it returns is_used_saved_connection true when the connection type is id', async () => { - isAtlasStub.returns(false); - getConnectionStringStub.returns({ - hosts: ['localhost:27088'], - searchParams: { get: () => null }, - } as unknown as ReturnType); + test('it tracks is_used_saved_connection true when the connection type is id', async () => { + instanceStub.resolves({ + dataLake: { + isDataLake: false, + version: 'na', + }, + genuineMongoDB: { + dbType: 'na', + isGenuine: true, + }, + host: {}, + build: { + isEnterprise: false, + version: 'na', + }, + }); + getConnectionStringStub.returns( + new ConnectionString('mongodb://localhost:27017') + ); const instanceTelemetry = await getConnectionTelemetryProperties( dataServiceStub, @@ -134,12 +280,25 @@ suite('ConnectionTelemetry Controller Test Suite', function () { expect(instanceTelemetry.is_used_saved_connection).to.equal(true); }); - test('it returns is_localhost false for a remote connection', async () => { - isAtlasStub.returns(false); - getConnectionStringStub.returns({ - hosts: ['localhost:27088'], - searchParams: { get: () => null }, - } as unknown as ReturnType); + test('it tracks is_localhost false for a remote connection', async () => { + instanceStub.resolves({ + dataLake: { + isDataLake: false, + version: 'na', + }, + genuineMongoDB: { + dbType: 'na', + isGenuine: true, + }, + host: {}, + build: { + isEnterprise: false, + version: 'na', + }, + }); + getConnectionStringStub.returns( + new ConnectionString('mongodb://example.mongo.ondigitalocean.com:27017') + ); const instanceTelemetry = await getConnectionTelemetryProperties( dataServiceStub, @@ -149,13 +308,125 @@ suite('ConnectionTelemetry Controller Test Suite', function () { expect(instanceTelemetry.is_localhost).to.equal(false); }); + test('it tracks is_localhost true for a local connection', async () => { + instanceStub.resolves({ + dataLake: { + isDataLake: false, + version: 'na', + }, + genuineMongoDB: { + dbType: 'na', + isGenuine: true, + }, + host: {}, + build: { + isEnterprise: false, + version: 'na', + }, + }); + getConnectionStringStub.returns( + new ConnectionString('mongodb://localhost:27017') + ); + + const instanceTelemetry = await getConnectionTelemetryProperties( + dataServiceStub, + ConnectionTypes.CONNECTION_STRING + ); + + expect(instanceTelemetry.is_localhost).to.equal(true); + }); + + test('it tracks server info for ubuntu', async () => { + instanceStub.resolves({ + dataLake: { + isDataLake: false, + version: '1.2.3', + }, + genuineMongoDB: { + dbType: 'mongo_2', + isGenuine: true, + }, + host: { + arch: 'debian', + os_family: 'ubuntu', + }, + build: { + isEnterprise: false, + version: '4.3.9', + }, + isAtlas: false, + isLocalAtlas: false, + featureCompatibilityVersion: null, + }); + getConnectionStringStub.returns( + new ConnectionString('mongodb://127.0.0.1') + ); + + const instanceTelemetry = await getConnectionTelemetryProperties( + dataServiceStub, + ConnectionTypes.CONNECTION_STRING + ); + + expect(instanceTelemetry.server_version).to.equal('4.3.9'); + expect(instanceTelemetry.server_arch).to.equal('debian'); + expect(instanceTelemetry.server_os_family).to.equal('ubuntu'); + }); + + test('it tracks server info for mac', async () => { + instanceStub.resolves({ + dataLake: { + isDataLake: true, + version: '1.2.3', + }, + genuineMongoDB: { + dbType: 'mongo', + isGenuine: false, + }, + host: { + arch: 'darwin', + os_family: 'mac', + }, + build: { + isEnterprise: true, + version: '4.3.2', + }, + isAtlas: false, + isLocalAtlas: false, + featureCompatibilityVersion: null, + }); + getConnectionStringStub.returns( + new ConnectionString('mongodb://127.0.0.1') + ); + + const instanceTelemetry = await getConnectionTelemetryProperties( + dataServiceStub, + ConnectionTypes.CONNECTION_STRING + ); + + expect(instanceTelemetry.server_version).to.equal('4.3.2'); + expect(instanceTelemetry.server_arch).to.equal('darwin'); + expect(instanceTelemetry.server_os_family).to.equal('mac'); + }); + test('it returns DEFAULT when auth mechanism undefined and username is specified', async () => { - isAtlasStub.returns(false); - getConnectionStringStub.returns({ - hosts: ['localhost:27088'], - searchParams: { get: () => null }, - username: 'Artishok', - } as unknown as ReturnType); + instanceStub.resolves({ + dataLake: { + isDataLake: false, + version: 'na', + }, + genuineMongoDB: { + dbType: 'na', + isGenuine: true, + }, + host: {}, + build: { + isEnterprise: false, + version: 'na', + }, + }); + getConnectionStringStub.returns( + new ConnectionString('mongodb://artishok:pass@localhost:27017') + ); const instanceTelemetry = await getConnectionTelemetryProperties( dataServiceStub, @@ -166,11 +437,24 @@ suite('ConnectionTelemetry Controller Test Suite', function () { }); test('it returns NONE when auth mechanism undefined and username undefined', async () => { - isAtlasStub.returns(false); - getConnectionStringStub.returns({ - hosts: ['localhost:27088'], - searchParams: { get: () => null }, - } as unknown as ReturnType); + instanceStub.resolves({ + dataLake: { + isDataLake: false, + version: 'na', + }, + genuineMongoDB: { + dbType: 'na', + isGenuine: true, + }, + host: {}, + build: { + isEnterprise: false, + version: 'na', + }, + }); + getConnectionStringStub.returns( + new ConnectionString('mongodb://localhost:27017') + ); const instanceTelemetry = await getConnectionTelemetryProperties( dataServiceStub, @@ -181,11 +465,26 @@ suite('ConnectionTelemetry Controller Test Suite', function () { }); test('it returns authMechanism when specified', async () => { - isAtlasStub.returns(false); - getConnectionStringStub.returns({ - hosts: ['localhost:27088'], - searchParams: { get: () => 'SCRAM-SHA-1' }, - } as unknown as ReturnType); + instanceStub.resolves({ + dataLake: { + isDataLake: false, + version: 'na', + }, + genuineMongoDB: { + dbType: 'na', + isGenuine: true, + }, + host: {}, + build: { + isEnterprise: false, + version: 'na', + }, + }); + getConnectionStringStub.returns( + new ConnectionString( + 'mongodb://foo:bar@localhost:27017/?authSource=source&authMechanism=SCRAM-SHA-1' + ) + ); const instanceTelemetry = await getConnectionTelemetryProperties( dataServiceStub, From abf3ec155c95732a64d82b1dfdfcbf237db39a91 Mon Sep 17 00:00:00 2001 From: Alena Khineika Date: Mon, 29 Jul 2024 17:01:23 +0200 Subject: [PATCH 2/5] refactor: remove server_os --- src/telemetry/connectionTelemetry.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/telemetry/connectionTelemetry.ts b/src/telemetry/connectionTelemetry.ts index c1a4e599f..2a3f8f9c6 100644 --- a/src/telemetry/connectionTelemetry.ts +++ b/src/telemetry/connectionTelemetry.ts @@ -24,7 +24,6 @@ export type NewConnectionTelemetryEventProperties = { non_genuine_server_name?: string | null; server_version?: string; server_arch?: string; - server_os?: string; server_os_family?: string; is_used_connect_screen?: boolean; is_used_command_palette?: boolean; @@ -164,7 +163,6 @@ export async function getConnectionTelemetryProperties( non_genuine_server_name: genuineMongoDB.dbType, server_version: build.version, server_arch: host.arch, - server_os: host.os, server_os_family: host.os_family, topology_type: dataService.getCurrentTopologyType(), }; From f03bedb5c5f89c688052298cfe2dff401b655c62 Mon Sep 17 00:00:00 2001 From: Alena Khineika Date: Mon, 29 Jul 2024 17:26:38 +0200 Subject: [PATCH 3/5] refactor: rename to atlas_hostname --- src/telemetry/connectionTelemetry.ts | 4 ++-- src/test/suite/telemetry/connectionTelemetry.test.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/telemetry/connectionTelemetry.ts b/src/telemetry/connectionTelemetry.ts index 2a3f8f9c6..ef3b5218f 100644 --- a/src/telemetry/connectionTelemetry.ts +++ b/src/telemetry/connectionTelemetry.ts @@ -16,7 +16,7 @@ export type NewConnectionTelemetryEventProperties = { auth_strategy?: string; is_atlas?: boolean; is_local_atlas?: boolean; - atlas_host_id?: string | null; + atlas_hostname?: string | null; is_data_lake?: boolean; is_enterprise?: boolean; dl_version?: string | null; @@ -154,7 +154,7 @@ export async function getConnectionTelemetryProperties( ...(await getHostInformation(resolvedHostname)), auth_strategy: authStrategy, is_atlas: isAtlas, - atlas_host_id: atlasHostId, + atlas_hostname: atlasHostId, is_local_atlas: isLocalAtlas, is_data_lake: dataLake.isDataLake, dl_version: dataLake.version, diff --git a/src/test/suite/telemetry/connectionTelemetry.test.ts b/src/test/suite/telemetry/connectionTelemetry.test.ts index 842028eb4..47d51dde6 100644 --- a/src/test/suite/telemetry/connectionTelemetry.test.ts +++ b/src/test/suite/telemetry/connectionTelemetry.test.ts @@ -118,7 +118,7 @@ suite('ConnectionTelemetry Controller Test Suite', function () { ); expect(instanceTelemetry.is_atlas).to.equal(false); - expect(instanceTelemetry.atlas_host_id).to.equal(null); + expect(instanceTelemetry.atlas_hostname).to.equal(null); expect(instanceTelemetry.is_atlas_url).to.equal(false); expect(instanceTelemetry.is_local_atlas).to.equal(true); }); @@ -152,7 +152,7 @@ suite('ConnectionTelemetry Controller Test Suite', function () { ); expect(instanceTelemetry.is_atlas).to.equal(true); - expect(instanceTelemetry.atlas_host_id).to.equal( + expect(instanceTelemetry.atlas_hostname).to.equal( 'test-data-sets-a011bb.mongodb.net' ); expect(instanceTelemetry.is_atlas_url).to.equal(true); From 1fd1d368332b394c7760e50307c99a0d2256de08 Mon Sep 17 00:00:00 2001 From: Alena Khineika Date: Mon, 29 Jul 2024 17:30:42 +0200 Subject: [PATCH 4/5] refactor: rename to atlasHostname --- src/telemetry/connectionTelemetry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/telemetry/connectionTelemetry.ts b/src/telemetry/connectionTelemetry.ts index ef3b5218f..b2f92a237 100644 --- a/src/telemetry/connectionTelemetry.ts +++ b/src/telemetry/connectionTelemetry.ts @@ -147,14 +147,14 @@ export async function getConnectionTelemetryProperties( const resolvedHostname = await getHostnameForConnection(connectionString); const { dataLake, genuineMongoDB, host, build, isAtlas, isLocalAtlas } = await dataService.instance(); - const atlasHostId = isAtlas ? resolvedHostname : null; + const atlasHostname = isAtlas ? resolvedHostname : null; preparedProperties = { ...preparedProperties, ...(await getHostInformation(resolvedHostname)), auth_strategy: authStrategy, is_atlas: isAtlas, - atlas_hostname: atlasHostId, + atlas_hostname: atlasHostname, is_local_atlas: isLocalAtlas, is_data_lake: dataLake.isDataLake, dl_version: dataLake.version, From d607d1246838aa245e9ab4da1fa8849fb610af86 Mon Sep 17 00:00:00 2001 From: Alena Khineika Date: Mon, 29 Jul 2024 18:03:08 +0200 Subject: [PATCH 5/5] docs: add comment --- src/telemetry/connectionTelemetry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/telemetry/connectionTelemetry.ts b/src/telemetry/connectionTelemetry.ts index b2f92a237..58cf32dc5 100644 --- a/src/telemetry/connectionTelemetry.ts +++ b/src/telemetry/connectionTelemetry.ts @@ -35,7 +35,7 @@ export type NewConnectionTelemetryEventProperties = { export type HostInformation = { is_localhost?: boolean; is_atlas_url?: boolean; - is_do_url?: boolean; + is_do_url?: boolean; // Is digital ocean url. is_public_cloud?: boolean; public_cloud_name?: string; };