From a1956c094a2357723ebe6120bbe9f1655de07713 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 16 Sep 2021 18:54:58 +0200 Subject: [PATCH 1/2] feat(compass-shell): integrate shell logging COMPASS-5035 --- package-lock.json | 611 +++++++++++------- .../compass-e2e-tests/tests/logging.test.js | 70 +- packages/compass-shell/package.json | 7 +- packages/compass-shell/src/stores/store.js | 47 +- 4 files changed, 460 insertions(+), 275 deletions(-) diff --git a/package-lock.json b/package-lock.json index ec4c7c70568..5a97ea97884 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6724,15 +6724,15 @@ "link": true }, "node_modules/@mongosh/async-rewriter2": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/async-rewriter2/-/async-rewriter2-1.0.4.tgz", - "integrity": "sha512-GQjktmMUxCngnRW/7maMF4r1F8OIkh9V1bv6KIPoyIEaB8tQSwooWmuc4tiPpaFPReMepLshM8gpgDE81Ztsqg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/async-rewriter2/-/async-rewriter2-1.0.7.tgz", + "integrity": "sha512-/2HPJPHnYCpp51gbvmlipGDxhIrhV0AAhp874JiPNJsmNfyyAON2bpRa6RbZcx+ZN7rx0LuOuYbtK6lTJRQngw==", "dependencies": { "@babel/core": "^7.14.8", "@babel/plugin-transform-destructuring": "^7.14.7", "@babel/plugin-transform-parameters": "^7.14.5", "@babel/plugin-transform-shorthand-properties": "^7.14.5", - "@babel/types": "^7.14.8", + "@babel/types": "^7.14.9", "@types/babel__core": "^7.1.15" }, "engines": { @@ -6740,11 +6740,11 @@ } }, "node_modules/@mongosh/autocomplete": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/autocomplete/-/autocomplete-1.0.4.tgz", - "integrity": "sha512-5MGpmuVm4a0E4Rc4VraKKeFXXx0wFRNPGnh5Y7VXYPRo3cXvAEk0PABGlmIRQmGT+VLpQYAx1AAEJnil4FMO0A==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/autocomplete/-/autocomplete-1.0.7.tgz", + "integrity": "sha512-onHuEpkYOA8EDqC18+E+fhTagNq6wm5PbhwXSkRX5qYc+ahJR0psVUZXximr1KKHe6lJCB9m98J0mPSA7R8z9w==", "dependencies": { - "@mongosh/shell-api": "1.0.4", + "@mongosh/shell-api": "1.0.7", "mongodb-ace-autocompleter": "^0.5.0", "semver": "^7.3.2" }, @@ -6761,19 +6761,19 @@ } }, "node_modules/@mongosh/browser-repl": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/browser-repl/-/browser-repl-1.0.4.tgz", - "integrity": "sha512-j2wp+O0D6XWYBf2t3mPk8/TZTdjcJapu7tKMYxqfMRv70p9686WuSWVZBo9WmzRFwfEUefBkRUdwJC8hQxQ7FA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/browser-repl/-/browser-repl-1.0.7.tgz", + "integrity": "sha512-xupF4ugH6pA3ilCxxcKwBecMMDw7a92DybkjF85BFJfMSbvGpaOPtlhaqoIljZkUZPdgh4zBxMpdkTjX98BIWQ==", "dependencies": { "@leafygreen-ui/icon": "^4.0.0", "@leafygreen-ui/palette": "^2.0.0", "@leafygreen-ui/syntax": "^2.2.0", - "@mongosh/browser-runtime-core": "1.0.4", - "@mongosh/errors": "1.0.4", - "@mongosh/history": "1.0.4", - "@mongosh/i18n": "1.0.4", - "@mongosh/node-runtime-worker-thread": "1.0.4", - "@mongosh/service-provider-core": "1.0.4", + "@mongosh/browser-runtime-core": "1.0.7", + "@mongosh/errors": "1.0.7", + "@mongosh/history": "1.0.7", + "@mongosh/i18n": "1.0.7", + "@mongosh/node-runtime-worker-thread": "1.0.7", + "@mongosh/service-provider-core": "1.0.7", "pretty-bytes": "^5.3.0", "text-table": "^0.2.0" }, @@ -6799,46 +6799,44 @@ "integrity": "sha512-QxjLcJu1WqKjJvlTw6nmq3gdjBEVy9rXdxBlkMR0hgvyzK3qW6w+iGaJExnjMRppzND7ijzsF0IJn1TYKNmevg==" }, "node_modules/@mongosh/browser-runtime-core": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/browser-runtime-core/-/browser-runtime-core-1.0.4.tgz", - "integrity": "sha512-jNuRvfO4L4NkLZHAKrJFQRMlKyDYMDGVvZu+224ZnJ1hILxnbw5PqCqcqL6olwRckQR/vNv028uwesRVdseOWQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/browser-runtime-core/-/browser-runtime-core-1.0.7.tgz", + "integrity": "sha512-Zl1vqlgJRvO1nFxO4AF4rJjC1tz4tiCTT65VY5zY0ty2IxSt16/FVa/11FpK764o971sg/HpOf25EHDzifuosg==", "dependencies": { - "@babel/generator": "^7.9.4", - "@babel/parser": "^7.9.4", - "@mongosh/autocomplete": "1.0.4", - "@mongosh/service-provider-core": "1.0.4", - "@mongosh/shell-api": "1.0.4", - "@mongosh/shell-evaluator": "1.0.4" + "@mongosh/autocomplete": "1.0.7", + "@mongosh/service-provider-core": "1.0.7", + "@mongosh/shell-api": "1.0.7", + "@mongosh/shell-evaluator": "1.0.7" }, "engines": { "node": ">=12.4.0" } }, "node_modules/@mongosh/browser-runtime-electron": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/browser-runtime-electron/-/browser-runtime-electron-1.0.4.tgz", - "integrity": "sha512-YFyIzHTY60ZQnhBDkVjZ9s9nos3tpqgdw4qaiLRpGSbywT8wKnWakMI7t9cnlq2CHsdhTBE7WGBGglFjB52Y6Q==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/browser-runtime-electron/-/browser-runtime-electron-1.0.7.tgz", + "integrity": "sha512-LsD9r3wSqIqem1M1OZLQoPvHJ2toSLY8mNeC6H456qWKsLB52dBX3JAzVZo1lroKKh8mXT0igfNdBOrp3bRAvA==", "dependencies": { - "@mongosh/browser-runtime-core": "1.0.4", - "@mongosh/service-provider-core": "1.0.4", - "@mongosh/types": "1.0.4" + "@mongosh/browser-runtime-core": "1.0.7", + "@mongosh/service-provider-core": "1.0.7", + "@mongosh/types": "1.0.7" }, "engines": { "node": ">=12.4.0" } }, "node_modules/@mongosh/errors": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/errors/-/errors-1.0.4.tgz", - "integrity": "sha512-a3tLNODEvwvCWZ/fac0NcvZqA+Q8X+CNYF2oQFNBNKBI7UCLBVmy6hWfpqa8e0O4yUsk42UBB5cc2HE6hpYI2A==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/errors/-/errors-1.0.7.tgz", + "integrity": "sha512-s2nHktR2RWNdwc6UONO+O5w/w4Ni2li0HBM8TCmH4KXwWy64i4D2HD0LrOR8RixMgc+sWnu7zCYmz3DLblpcVQ==", "engines": { "node": ">=12.4.0" } }, "node_modules/@mongosh/history": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/history/-/history-1.0.4.tgz", - "integrity": "sha512-nXJP6pKqA8H378PUv3uzdv5mA95MXFmP6PZ/frVFbS+b82Z0E4QqoTBPdnEVZAICEx896It5qPUR7Jj63Bpu+w==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/history/-/history-1.0.7.tgz", + "integrity": "sha512-q3fLqwj0td7ADxCaDmz4qdZd/tPedG28EWUY+qnoFfKSMIUYuJyBCEtxlStkl0v8FLobHas3t6OdtnL9SL0Thg==", "dependencies": { "mongodb-redact": "^0.2.2" }, @@ -6855,28 +6853,51 @@ } }, "node_modules/@mongosh/i18n": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/i18n/-/i18n-1.0.4.tgz", - "integrity": "sha512-+b5LZl4nUb/vIMJdwt08z4Hl+5XK4KG6zs9lWviIMzzAFYP8CpE/XDK468CNqg6UDQ9df1jxYOV8X252V+mOYg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/i18n/-/i18n-1.0.7.tgz", + "integrity": "sha512-artYDKyb+cCm3FDiCYbGaLzBPncgRbgcckMUWTzYkdyUYVRJCQqWLfdo6ZIjqAgoIG1IdBZAgRpvRkmfOsfwnQ==", "dependencies": { - "@mongosh/errors": "1.0.4", + "@mongosh/errors": "1.0.7", "mustache": "^4.0.0" }, "engines": { "node": ">=12.4.0" } }, + "node_modules/@mongosh/logging": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/logging/-/logging-1.0.7.tgz", + "integrity": "sha512-z0W7RjPgo8LbeoEosCVV4eUOQixy/CxQNi0QgisjC0Lhk+o7nASbh9do5lF3g+lSt13XPcoy9QJKsvsdnHEL8A==", + "dependencies": { + "@mongosh/errors": "1.0.7", + "@mongosh/history": "1.0.7", + "@mongosh/types": "1.0.7", + "mongodb-log-writer": "^1.0.3", + "mongodb-redact": "^0.2.2" + }, + "engines": { + "node": ">=12.4.0" + } + }, + "node_modules/@mongosh/logging/node_modules/mongodb-redact": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/mongodb-redact/-/mongodb-redact-0.2.2.tgz", + "integrity": "sha512-tmgDpSBymFtKggsLzpa0vDYaqh2wEXOswBZtJkXvbPKP0ThfPwoFYXtOukactU6WZsC4RYmpSPM4P6582FR/Xw==", + "dependencies": { + "lodash": "^4.17.15" + } + }, "node_modules/@mongosh/node-runtime-worker-thread": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/node-runtime-worker-thread/-/node-runtime-worker-thread-1.0.4.tgz", - "integrity": "sha512-5A4fgSHSSP60CwTuYGlnZP7UrEFG32EpEYnM+3MzMyAMW1tVZoRwqMdfXOLjVjSqhrbVTY4Oz3S2h0FpEgRADw==", - "dependencies": { - "@mongosh/browser-runtime-core": "1.0.4", - "@mongosh/browser-runtime-electron": "1.0.4", - "@mongosh/service-provider-core": "1.0.4", - "@mongosh/service-provider-server": "1.0.4", - "@mongosh/types": "1.0.4", - "bson": "^4.4.1", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/node-runtime-worker-thread/-/node-runtime-worker-thread-1.0.7.tgz", + "integrity": "sha512-00xKsMEmKh/PuLJUHVBJOzT9V2wfbDOsErnIsvfk4/NtP78ZNFbzgwgjEbKxi3A0WNb1qpSuYjmkl4HbqmfZ2A==", + "dependencies": { + "@mongosh/browser-runtime-core": "1.0.7", + "@mongosh/browser-runtime-electron": "1.0.7", + "@mongosh/service-provider-core": "1.0.7", + "@mongosh/service-provider-server": "1.0.7", + "@mongosh/types": "1.0.7", + "bson": "^4.5.2", "interruptor": "^1.0.1", "postmsg-rpc": "^2.4.0" }, @@ -6885,56 +6906,98 @@ } }, "node_modules/@mongosh/service-provider-core": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/service-provider-core/-/service-provider-core-1.0.4.tgz", - "integrity": "sha512-clWNB9cZzv1xa5sq8t0jH8ZqKt0nluBC8o8IOTTnFY6/ROAi0jM19VeN/5SUZ41yRjSxsVWbf6jrZprpt60iDw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/service-provider-core/-/service-provider-core-1.0.7.tgz", + "integrity": "sha512-pQZKiTgxY9IeDheN5dx1k4MnGoQRI8QqukmSNLhGmLIeBmVIk0S7ZnT3CHfTxuW33+TH0KqN1rPLNfrKbQf/Bg==", "dependencies": { - "@mongosh/errors": "1.0.4", - "@mongosh/i18n": "1.0.4", - "bson": "^4.4.1", - "mongodb": "^4.1.0", + "@mongosh/errors": "1.0.7", + "@mongosh/i18n": "1.0.7", + "bson": "^4.5.2", + "mongodb": "^4.1.2", "mongodb-build-info": "^1.2.0", - "mongodb-connection-string-url": "^1.0.0" + "mongodb-connection-string-url": "^2.0.0" }, "engines": { "node": ">=12.4.0" }, "optionalDependencies": { - "mongodb-client-encryption": "^1.2.6" + "mongodb-client-encryption": "^1.2.7" + } + }, + "node_modules/@mongosh/service-provider-core/node_modules/mongodb-connection-string-url": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.1.0.tgz", + "integrity": "sha512-Qf9Zw7KGiRljWvMrrUFDdVqo46KIEiDuCzvEN97rh/PcKzk2bd6n9KuzEwBwW9xo5glwx69y1mI6s+jFUD/aIQ==", + "dependencies": { + "@types/whatwg-url": "^8.2.1", + "whatwg-url": "^9.1.0" + } + }, + "node_modules/@mongosh/service-provider-core/node_modules/whatwg-url": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-9.1.0.tgz", + "integrity": "sha512-CQ0UcrPHyomtlOCot1TL77WyMIm/bCwrJ2D6AOKGwEczU9EpyoqAokfqrf/MioU9kHcMsmJZcg1egXix2KYEsA==", + "dependencies": { + "tr46": "^2.1.0", + "webidl-conversions": "^6.1.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/@mongosh/service-provider-server": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/service-provider-server/-/service-provider-server-1.0.4.tgz", - "integrity": "sha512-hm30tHV7ky1SZ1FK0wunf2bewlMYZ+920K1WzyXf5sdK3UCEcTw61H+HDa7WS0MSm7p+yMlaucBO0zSGWKCSJQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/service-provider-server/-/service-provider-server-1.0.7.tgz", + "integrity": "sha512-iu8K0dli7iGcqpiSV93yjARYRPgsoa97/L6ReUuA7nRlD4xUnHKTLHqtOGbEHErc1A2NG4zq6qr4grsdBjiGIQ==", "dependencies": { - "@mongosh/errors": "1.0.4", - "@mongosh/service-provider-core": "1.0.4", - "@mongosh/types": "1.0.4", + "@mongosh/errors": "1.0.7", + "@mongosh/service-provider-core": "1.0.7", + "@mongosh/types": "1.0.7", "@types/sinon-chai": "^3.2.3", - "mongodb": "^4.1.0", - "mongodb-connection-string-url": "^1.0.0", + "mongodb": "^4.1.2", + "mongodb-connection-string-url": "^2.0.0", "saslprep": "github:mongodb-js/saslprep#v1.0.4" }, "engines": { "node": ">=12.4.0" }, "optionalDependencies": { - "kerberos": "^1.1.6", - "mongodb-client-encryption": "^1.2.6", + "kerberos": "^1.1.7", + "mongodb-client-encryption": "^1.2.7", "os-dns-native": "^1.0.3", "resolve-mongodb-srv": "^1.1.0" } }, + "node_modules/@mongosh/service-provider-server/node_modules/mongodb-connection-string-url": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.1.0.tgz", + "integrity": "sha512-Qf9Zw7KGiRljWvMrrUFDdVqo46KIEiDuCzvEN97rh/PcKzk2bd6n9KuzEwBwW9xo5glwx69y1mI6s+jFUD/aIQ==", + "dependencies": { + "@types/whatwg-url": "^8.2.1", + "whatwg-url": "^9.1.0" + } + }, + "node_modules/@mongosh/service-provider-server/node_modules/whatwg-url": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-9.1.0.tgz", + "integrity": "sha512-CQ0UcrPHyomtlOCot1TL77WyMIm/bCwrJ2D6AOKGwEczU9EpyoqAokfqrf/MioU9kHcMsmJZcg1egXix2KYEsA==", + "dependencies": { + "tr46": "^2.1.0", + "webidl-conversions": "^6.1.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@mongosh/shell-api": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/shell-api/-/shell-api-1.0.4.tgz", - "integrity": "sha512-h3FiV4EnIQtoj8a4Gfz/IryHPKUpteL3K/ItshF0xV8b9uZSdq4Gy93Ro4mwjMveNKWim1ufggaAFT/o+Ua+0Q==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/shell-api/-/shell-api-1.0.7.tgz", + "integrity": "sha512-sd/QoeAiw0zGY1P1NFHwbn32/QGWfhxvwskpnB2Vw2+ouJO7Q26+YJk61MRihyksEYNCbxwMRs+xTVwDbMJj4A==", "dependencies": { - "@mongosh/errors": "1.0.4", - "@mongosh/history": "1.0.4", - "@mongosh/i18n": "1.0.4", - "@mongosh/service-provider-core": "1.0.4", + "@mongosh/errors": "1.0.7", + "@mongosh/history": "1.0.7", + "@mongosh/i18n": "1.0.7", + "@mongosh/service-provider-core": "1.0.7", "mongodb-redact": "^0.2.2" }, "engines": { @@ -6950,22 +7013,22 @@ } }, "node_modules/@mongosh/shell-evaluator": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/shell-evaluator/-/shell-evaluator-1.0.4.tgz", - "integrity": "sha512-7UuxPZ89U9P/AgaP3j97Uy6Ir46UawRCB4QYQEAyIzta+SZFfgIty2w3pY4f6yACSX+ZJUXm8dC25Ltlt1C/DQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/shell-evaluator/-/shell-evaluator-1.0.7.tgz", + "integrity": "sha512-Kq7Z2caCj/AnTW0pN3/C1KCGlwhTr0EPSWNrqoOJ90EpWhrPdDdPyyF++Oks7JMZI4mIB6op+ebtgYRNBivLGg==", "dependencies": { - "@mongosh/async-rewriter2": "1.0.4", - "@mongosh/history": "1.0.4", - "@mongosh/shell-api": "1.0.4" + "@mongosh/async-rewriter2": "1.0.7", + "@mongosh/history": "1.0.7", + "@mongosh/shell-api": "1.0.7" }, "engines": { "node": ">=12.4.0" } }, "node_modules/@mongosh/types": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/types/-/types-1.0.4.tgz", - "integrity": "sha512-ZzxVZjPMjW7+ahRfr70FuEo/AkI3Jv4v+C5UfEgcU20yjPCLIoEOoMou9Oq97hZHz2sL2TlkI6XLrflcF5L6Fw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/types/-/types-1.0.7.tgz", + "integrity": "sha512-MKJDRCOH0CzO595YrRxt4GBRLvt268diliGSvho82tWuASisSaZNSbSrir8+49SDyAenx4jFCWQ1houyCMBdmw==", "engines": { "node": ">=12.4.0" } @@ -8572,8 +8635,7 @@ "node_modules/@types/webidl-conversions": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz", - "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==", - "dev": true + "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==" }, "node_modules/@types/webpack": { "version": "4.41.31", @@ -8626,7 +8688,6 @@ "version": "8.2.1", "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz", "integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==", - "dev": true, "dependencies": { "@types/node": "*", "@types/webidl-conversions": "*" @@ -13631,9 +13692,9 @@ } }, "node_modules/bson": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.5.1.tgz", - "integrity": "sha512-XqFP74pbTVLyLy5KFxVfTUyRrC1mgOlmu/iXHfXqfCKT59jyP9lwbotGfbN59cHBRbJSamZNkrSopjv+N0SqAA==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/bson/-/bson-4.5.2.tgz", + "integrity": "sha512-8CEMJpwc7qlQtrn2rney38jQSEeMar847lz0LyitwRmVknAW8iHXrzW4fTjHfyWm0E3sukyD/zppdH+QU1QefA==", "dependencies": { "buffer": "^5.6.0" }, @@ -32391,9 +32452,9 @@ "integrity": "sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew==" }, "node_modules/kerberos": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/kerberos/-/kerberos-1.1.6.tgz", - "integrity": "sha512-qUIJeKV1bo9WxkKGYbs/MujbRbDEqE3ZBIlZlK8h+kDwoxGcqmQhgWyvXOOMAYkCGKJJHgnE0yHx0u3B1AguFg==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/kerberos/-/kerberos-1.1.7.tgz", + "integrity": "sha512-1zXg4rARjsh/VMz2jjZeTfRHbJTVNR6f2DYHbLvtUSOW1satj33Fvc7vOJ0YVWB9+/9ITJWd1QKp4w217SsiFA==", "hasInstallScript": true, "dependencies": { "bindings": "^1.5.0", @@ -38118,19 +38179,19 @@ } }, "node_modules/mongodb": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.1.0.tgz", - "integrity": "sha512-Gx9U9MsFWgJ3E0v4oHAdWvYTGBznNYPCkhmD/3i/kPTY/URnPfHD5/6VoKUFrdgQTK3icFiM9976hVbqCRBO9Q==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.1.2.tgz", + "integrity": "sha512-pHCKDoOy1h6mVurziJmXmTMPatYWOx8pbnyFgSgshja9Y36Q+caHUzTDY6rrIy9HCSrjnbXmx3pCtvNZHmR8xg==", "dependencies": { - "bson": "^4.4.0", - "denque": "^1.5.0", - "mongodb-connection-string-url": "^1.0.1" + "bson": "^4.5.2", + "denque": "^2.0.1", + "mongodb-connection-string-url": "^2.0.0" }, "engines": { "node": ">=12.9.0" }, "optionalDependencies": { - "saslprep": "^1.0.0" + "saslprep": "^1.0.3" } }, "node_modules/mongodb-ace-autocompleter": { @@ -38159,9 +38220,9 @@ "integrity": "sha512-HsAk6w9TZ7erX+DGP81T9G7dA6JV3etT5VC5GGGvNqSg4NojVRdn5rij4kD4vSUz75LgcAbGbUZ/QHvlpb/UfQ==" }, "node_modules/mongodb-client-encryption": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/mongodb-client-encryption/-/mongodb-client-encryption-1.2.6.tgz", - "integrity": "sha512-GOO0PKAkbqPy27tRs26PdEu2wypdMLLjEOVUd7obRg7nj9I3f7dYCDWQzgT+HfsEbHnCLq7z4jDcmgUorSAXwA==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/mongodb-client-encryption/-/mongodb-client-encryption-1.2.7.tgz", + "integrity": "sha512-cDm1sIhrQq+AvegHH6PbfzPAF3wJ9Fu5IOlsSkJQqCSqP7hh4WoW47SeQ2FIJDDdEyU/FekLqcxgEAhjDqJg1g==", "devOptional": true, "hasInstallScript": true, "dependencies": { @@ -40214,6 +40275,35 @@ "node": ">=0.10.0" } }, + "node_modules/mongodb/node_modules/denque": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz", + "integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/mongodb/node_modules/mongodb-connection-string-url": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.1.0.tgz", + "integrity": "sha512-Qf9Zw7KGiRljWvMrrUFDdVqo46KIEiDuCzvEN97rh/PcKzk2bd6n9KuzEwBwW9xo5glwx69y1mI6s+jFUD/aIQ==", + "dependencies": { + "@types/whatwg-url": "^8.2.1", + "whatwg-url": "^9.1.0" + } + }, + "node_modules/mongodb/node_modules/whatwg-url": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-9.1.0.tgz", + "integrity": "sha512-CQ0UcrPHyomtlOCot1TL77WyMIm/bCwrJ2D6AOKGwEczU9EpyoqAokfqrf/MioU9kHcMsmJZcg1egXix2KYEsA==", + "dependencies": { + "tr46": "^2.1.0", + "webidl-conversions": "^6.1.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/mongodb3": { "name": "mongodb", "version": "3.6.9", @@ -85110,9 +85200,10 @@ "@leafygreen-ui/icon": "^11.4.0", "@leafygreen-ui/icon-button": "^9.1.5", "@mongodb-js/mongodb-redux-common": "^1.4.0", - "@mongosh/browser-repl": "^1.0.4", - "@mongosh/node-runtime-worker-thread": "^1.0.4", - "@mongosh/service-provider-core": "^1.0.4", + "@mongosh/browser-repl": "^1.0.7", + "@mongosh/logging": "^1.0.7", + "@mongosh/node-runtime-worker-thread": "^1.0.7", + "@mongosh/service-provider-core": "^1.0.7", "hadron-react-buttons": "^5.4.0", "re-resizable": "^6.9.0" }, @@ -133400,9 +133491,10 @@ "@leafygreen-ui/icon": "^11.4.0", "@leafygreen-ui/icon-button": "^9.1.5", "@mongodb-js/mongodb-redux-common": "^1.4.0", - "@mongosh/browser-repl": "^1.0.4", - "@mongosh/node-runtime-worker-thread": "^1.0.4", - "@mongosh/service-provider-core": "^1.0.4", + "@mongosh/browser-repl": "^1.0.7", + "@mongosh/logging": "^1.0.7", + "@mongosh/node-runtime-worker-thread": "^1.0.7", + "@mongosh/service-provider-core": "^1.0.7", "autoprefixer": "^9.4.6", "babel-loader": "^8.2.2", "chai": "^4.2.0", @@ -145718,24 +145810,24 @@ } }, "@mongosh/async-rewriter2": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/async-rewriter2/-/async-rewriter2-1.0.4.tgz", - "integrity": "sha512-GQjktmMUxCngnRW/7maMF4r1F8OIkh9V1bv6KIPoyIEaB8tQSwooWmuc4tiPpaFPReMepLshM8gpgDE81Ztsqg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/async-rewriter2/-/async-rewriter2-1.0.7.tgz", + "integrity": "sha512-/2HPJPHnYCpp51gbvmlipGDxhIrhV0AAhp874JiPNJsmNfyyAON2bpRa6RbZcx+ZN7rx0LuOuYbtK6lTJRQngw==", "requires": { "@babel/core": "^7.14.8", "@babel/plugin-transform-destructuring": "^7.14.7", "@babel/plugin-transform-parameters": "^7.14.5", "@babel/plugin-transform-shorthand-properties": "^7.14.5", - "@babel/types": "^7.14.8", + "@babel/types": "^7.14.9", "@types/babel__core": "^7.1.15" } }, "@mongosh/autocomplete": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/autocomplete/-/autocomplete-1.0.4.tgz", - "integrity": "sha512-5MGpmuVm4a0E4Rc4VraKKeFXXx0wFRNPGnh5Y7VXYPRo3cXvAEk0PABGlmIRQmGT+VLpQYAx1AAEJnil4FMO0A==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/autocomplete/-/autocomplete-1.0.7.tgz", + "integrity": "sha512-onHuEpkYOA8EDqC18+E+fhTagNq6wm5PbhwXSkRX5qYc+ahJR0psVUZXximr1KKHe6lJCB9m98J0mPSA7R8z9w==", "requires": { - "@mongosh/shell-api": "1.0.4", + "@mongosh/shell-api": "1.0.7", "mongodb-ace-autocompleter": "^0.5.0", "semver": "^7.3.2" }, @@ -145751,19 +145843,19 @@ } }, "@mongosh/browser-repl": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/browser-repl/-/browser-repl-1.0.4.tgz", - "integrity": "sha512-j2wp+O0D6XWYBf2t3mPk8/TZTdjcJapu7tKMYxqfMRv70p9686WuSWVZBo9WmzRFwfEUefBkRUdwJC8hQxQ7FA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/browser-repl/-/browser-repl-1.0.7.tgz", + "integrity": "sha512-xupF4ugH6pA3ilCxxcKwBecMMDw7a92DybkjF85BFJfMSbvGpaOPtlhaqoIljZkUZPdgh4zBxMpdkTjX98BIWQ==", "requires": { "@leafygreen-ui/icon": "^4.0.0", "@leafygreen-ui/palette": "^2.0.0", "@leafygreen-ui/syntax": "^2.2.0", - "@mongosh/browser-runtime-core": "1.0.4", - "@mongosh/errors": "1.0.4", - "@mongosh/history": "1.0.4", - "@mongosh/i18n": "1.0.4", - "@mongosh/node-runtime-worker-thread": "1.0.4", - "@mongosh/service-provider-core": "1.0.4", + "@mongosh/browser-runtime-core": "1.0.7", + "@mongosh/errors": "1.0.7", + "@mongosh/history": "1.0.7", + "@mongosh/i18n": "1.0.7", + "@mongosh/node-runtime-worker-thread": "1.0.7", + "@mongosh/service-provider-core": "1.0.7", "pretty-bytes": "^5.3.0", "text-table": "^0.2.0" }, @@ -145781,37 +145873,35 @@ } }, "@mongosh/browser-runtime-core": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/browser-runtime-core/-/browser-runtime-core-1.0.4.tgz", - "integrity": "sha512-jNuRvfO4L4NkLZHAKrJFQRMlKyDYMDGVvZu+224ZnJ1hILxnbw5PqCqcqL6olwRckQR/vNv028uwesRVdseOWQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/browser-runtime-core/-/browser-runtime-core-1.0.7.tgz", + "integrity": "sha512-Zl1vqlgJRvO1nFxO4AF4rJjC1tz4tiCTT65VY5zY0ty2IxSt16/FVa/11FpK764o971sg/HpOf25EHDzifuosg==", "requires": { - "@babel/generator": "^7.9.4", - "@babel/parser": "^7.9.4", - "@mongosh/autocomplete": "1.0.4", - "@mongosh/service-provider-core": "1.0.4", - "@mongosh/shell-api": "1.0.4", - "@mongosh/shell-evaluator": "1.0.4" + "@mongosh/autocomplete": "1.0.7", + "@mongosh/service-provider-core": "1.0.7", + "@mongosh/shell-api": "1.0.7", + "@mongosh/shell-evaluator": "1.0.7" } }, "@mongosh/browser-runtime-electron": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/browser-runtime-electron/-/browser-runtime-electron-1.0.4.tgz", - "integrity": "sha512-YFyIzHTY60ZQnhBDkVjZ9s9nos3tpqgdw4qaiLRpGSbywT8wKnWakMI7t9cnlq2CHsdhTBE7WGBGglFjB52Y6Q==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/browser-runtime-electron/-/browser-runtime-electron-1.0.7.tgz", + "integrity": "sha512-LsD9r3wSqIqem1M1OZLQoPvHJ2toSLY8mNeC6H456qWKsLB52dBX3JAzVZo1lroKKh8mXT0igfNdBOrp3bRAvA==", "requires": { - "@mongosh/browser-runtime-core": "1.0.4", - "@mongosh/service-provider-core": "1.0.4", - "@mongosh/types": "1.0.4" + "@mongosh/browser-runtime-core": "1.0.7", + "@mongosh/service-provider-core": "1.0.7", + "@mongosh/types": "1.0.7" } }, "@mongosh/errors": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/errors/-/errors-1.0.4.tgz", - "integrity": "sha512-a3tLNODEvwvCWZ/fac0NcvZqA+Q8X+CNYF2oQFNBNKBI7UCLBVmy6hWfpqa8e0O4yUsk42UBB5cc2HE6hpYI2A==" + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/errors/-/errors-1.0.7.tgz", + "integrity": "sha512-s2nHktR2RWNdwc6UONO+O5w/w4Ni2li0HBM8TCmH4KXwWy64i4D2HD0LrOR8RixMgc+sWnu7zCYmz3DLblpcVQ==" }, "@mongosh/history": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/history/-/history-1.0.4.tgz", - "integrity": "sha512-nXJP6pKqA8H378PUv3uzdv5mA95MXFmP6PZ/frVFbS+b82Z0E4QqoTBPdnEVZAICEx896It5qPUR7Jj63Bpu+w==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/history/-/history-1.0.7.tgz", + "integrity": "sha512-q3fLqwj0td7ADxCaDmz4qdZd/tPedG28EWUY+qnoFfKSMIUYuJyBCEtxlStkl0v8FLobHas3t6OdtnL9SL0Thg==", "requires": { "mongodb-redact": "^0.2.2" }, @@ -145827,70 +145917,132 @@ } }, "@mongosh/i18n": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/i18n/-/i18n-1.0.4.tgz", - "integrity": "sha512-+b5LZl4nUb/vIMJdwt08z4Hl+5XK4KG6zs9lWviIMzzAFYP8CpE/XDK468CNqg6UDQ9df1jxYOV8X252V+mOYg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/i18n/-/i18n-1.0.7.tgz", + "integrity": "sha512-artYDKyb+cCm3FDiCYbGaLzBPncgRbgcckMUWTzYkdyUYVRJCQqWLfdo6ZIjqAgoIG1IdBZAgRpvRkmfOsfwnQ==", "requires": { - "@mongosh/errors": "1.0.4", + "@mongosh/errors": "1.0.7", "mustache": "^4.0.0" } }, + "@mongosh/logging": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/logging/-/logging-1.0.7.tgz", + "integrity": "sha512-z0W7RjPgo8LbeoEosCVV4eUOQixy/CxQNi0QgisjC0Lhk+o7nASbh9do5lF3g+lSt13XPcoy9QJKsvsdnHEL8A==", + "requires": { + "@mongosh/errors": "1.0.7", + "@mongosh/history": "1.0.7", + "@mongosh/types": "1.0.7", + "mongodb-log-writer": "^1.0.3", + "mongodb-redact": "^0.2.2" + }, + "dependencies": { + "mongodb-redact": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/mongodb-redact/-/mongodb-redact-0.2.2.tgz", + "integrity": "sha512-tmgDpSBymFtKggsLzpa0vDYaqh2wEXOswBZtJkXvbPKP0ThfPwoFYXtOukactU6WZsC4RYmpSPM4P6582FR/Xw==", + "requires": { + "lodash": "^4.17.15" + } + } + } + }, "@mongosh/node-runtime-worker-thread": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/node-runtime-worker-thread/-/node-runtime-worker-thread-1.0.4.tgz", - "integrity": "sha512-5A4fgSHSSP60CwTuYGlnZP7UrEFG32EpEYnM+3MzMyAMW1tVZoRwqMdfXOLjVjSqhrbVTY4Oz3S2h0FpEgRADw==", - "requires": { - "@mongosh/browser-runtime-core": "1.0.4", - "@mongosh/browser-runtime-electron": "1.0.4", - "@mongosh/service-provider-core": "1.0.4", - "@mongosh/service-provider-server": "1.0.4", - "@mongosh/types": "1.0.4", - "bson": "^4.4.1", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/node-runtime-worker-thread/-/node-runtime-worker-thread-1.0.7.tgz", + "integrity": "sha512-00xKsMEmKh/PuLJUHVBJOzT9V2wfbDOsErnIsvfk4/NtP78ZNFbzgwgjEbKxi3A0WNb1qpSuYjmkl4HbqmfZ2A==", + "requires": { + "@mongosh/browser-runtime-core": "1.0.7", + "@mongosh/browser-runtime-electron": "1.0.7", + "@mongosh/service-provider-core": "1.0.7", + "@mongosh/service-provider-server": "1.0.7", + "@mongosh/types": "1.0.7", + "bson": "^4.5.2", "interruptor": "^1.0.1", "postmsg-rpc": "^2.4.0" } }, "@mongosh/service-provider-core": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/service-provider-core/-/service-provider-core-1.0.4.tgz", - "integrity": "sha512-clWNB9cZzv1xa5sq8t0jH8ZqKt0nluBC8o8IOTTnFY6/ROAi0jM19VeN/5SUZ41yRjSxsVWbf6jrZprpt60iDw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/service-provider-core/-/service-provider-core-1.0.7.tgz", + "integrity": "sha512-pQZKiTgxY9IeDheN5dx1k4MnGoQRI8QqukmSNLhGmLIeBmVIk0S7ZnT3CHfTxuW33+TH0KqN1rPLNfrKbQf/Bg==", "requires": { - "@mongosh/errors": "1.0.4", - "@mongosh/i18n": "1.0.4", - "bson": "^4.4.1", - "mongodb": "^4.1.0", + "@mongosh/errors": "1.0.7", + "@mongosh/i18n": "1.0.7", + "bson": "^4.5.2", + "mongodb": "^4.1.2", "mongodb-build-info": "^1.2.0", - "mongodb-client-encryption": "^1.2.6", - "mongodb-connection-string-url": "^1.0.0" + "mongodb-client-encryption": "^1.2.7", + "mongodb-connection-string-url": "^2.0.0" + }, + "dependencies": { + "mongodb-connection-string-url": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.1.0.tgz", + "integrity": "sha512-Qf9Zw7KGiRljWvMrrUFDdVqo46KIEiDuCzvEN97rh/PcKzk2bd6n9KuzEwBwW9xo5glwx69y1mI6s+jFUD/aIQ==", + "requires": { + "@types/whatwg-url": "^8.2.1", + "whatwg-url": "^9.1.0" + } + }, + "whatwg-url": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-9.1.0.tgz", + "integrity": "sha512-CQ0UcrPHyomtlOCot1TL77WyMIm/bCwrJ2D6AOKGwEczU9EpyoqAokfqrf/MioU9kHcMsmJZcg1egXix2KYEsA==", + "requires": { + "tr46": "^2.1.0", + "webidl-conversions": "^6.1.0" + } + } } }, "@mongosh/service-provider-server": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/service-provider-server/-/service-provider-server-1.0.4.tgz", - "integrity": "sha512-hm30tHV7ky1SZ1FK0wunf2bewlMYZ+920K1WzyXf5sdK3UCEcTw61H+HDa7WS0MSm7p+yMlaucBO0zSGWKCSJQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/service-provider-server/-/service-provider-server-1.0.7.tgz", + "integrity": "sha512-iu8K0dli7iGcqpiSV93yjARYRPgsoa97/L6ReUuA7nRlD4xUnHKTLHqtOGbEHErc1A2NG4zq6qr4grsdBjiGIQ==", "requires": { - "@mongosh/errors": "1.0.4", - "@mongosh/service-provider-core": "1.0.4", - "@mongosh/types": "1.0.4", + "@mongosh/errors": "1.0.7", + "@mongosh/service-provider-core": "1.0.7", + "@mongosh/types": "1.0.7", "@types/sinon-chai": "^3.2.3", - "kerberos": "^1.1.6", - "mongodb": "^4.1.0", - "mongodb-client-encryption": "^1.2.6", - "mongodb-connection-string-url": "^1.0.0", + "kerberos": "^1.1.7", + "mongodb": "^4.1.2", + "mongodb-client-encryption": "^1.2.7", + "mongodb-connection-string-url": "^2.0.0", "os-dns-native": "^1.0.3", "resolve-mongodb-srv": "^1.1.0", "saslprep": "github:mongodb-js/saslprep#v1.0.4" + }, + "dependencies": { + "mongodb-connection-string-url": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.1.0.tgz", + "integrity": "sha512-Qf9Zw7KGiRljWvMrrUFDdVqo46KIEiDuCzvEN97rh/PcKzk2bd6n9KuzEwBwW9xo5glwx69y1mI6s+jFUD/aIQ==", + "requires": { + "@types/whatwg-url": "^8.2.1", + "whatwg-url": "^9.1.0" + } + }, + "whatwg-url": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-9.1.0.tgz", + "integrity": "sha512-CQ0UcrPHyomtlOCot1TL77WyMIm/bCwrJ2D6AOKGwEczU9EpyoqAokfqrf/MioU9kHcMsmJZcg1egXix2KYEsA==", + "requires": { + "tr46": "^2.1.0", + "webidl-conversions": "^6.1.0" + } + } } }, "@mongosh/shell-api": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/shell-api/-/shell-api-1.0.4.tgz", - "integrity": "sha512-h3FiV4EnIQtoj8a4Gfz/IryHPKUpteL3K/ItshF0xV8b9uZSdq4Gy93Ro4mwjMveNKWim1ufggaAFT/o+Ua+0Q==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/shell-api/-/shell-api-1.0.7.tgz", + "integrity": "sha512-sd/QoeAiw0zGY1P1NFHwbn32/QGWfhxvwskpnB2Vw2+ouJO7Q26+YJk61MRihyksEYNCbxwMRs+xTVwDbMJj4A==", "requires": { - "@mongosh/errors": "1.0.4", - "@mongosh/history": "1.0.4", - "@mongosh/i18n": "1.0.4", - "@mongosh/service-provider-core": "1.0.4", + "@mongosh/errors": "1.0.7", + "@mongosh/history": "1.0.7", + "@mongosh/i18n": "1.0.7", + "@mongosh/service-provider-core": "1.0.7", "mongodb-redact": "^0.2.2" }, "dependencies": { @@ -145905,19 +146057,19 @@ } }, "@mongosh/shell-evaluator": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/shell-evaluator/-/shell-evaluator-1.0.4.tgz", - "integrity": "sha512-7UuxPZ89U9P/AgaP3j97Uy6Ir46UawRCB4QYQEAyIzta+SZFfgIty2w3pY4f6yACSX+ZJUXm8dC25Ltlt1C/DQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/shell-evaluator/-/shell-evaluator-1.0.7.tgz", + "integrity": "sha512-Kq7Z2caCj/AnTW0pN3/C1KCGlwhTr0EPSWNrqoOJ90EpWhrPdDdPyyF++Oks7JMZI4mIB6op+ebtgYRNBivLGg==", "requires": { - "@mongosh/async-rewriter2": "1.0.4", - "@mongosh/history": "1.0.4", - "@mongosh/shell-api": "1.0.4" + "@mongosh/async-rewriter2": "1.0.7", + "@mongosh/history": "1.0.7", + "@mongosh/shell-api": "1.0.7" } }, "@mongosh/types": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@mongosh/types/-/types-1.0.4.tgz", - "integrity": "sha512-ZzxVZjPMjW7+ahRfr70FuEo/AkI3Jv4v+C5UfEgcU20yjPCLIoEOoMou9Oq97hZHz2sL2TlkI6XLrflcF5L6Fw==" + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@mongosh/types/-/types-1.0.7.tgz", + "integrity": "sha512-MKJDRCOH0CzO595YrRxt4GBRLvt268diliGSvho82tWuASisSaZNSbSrir8+49SDyAenx4jFCWQ1houyCMBdmw==" }, "@mrmlnc/readdir-enhanced": { "version": "2.2.1", @@ -147309,8 +147461,7 @@ "@types/webidl-conversions": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz", - "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==", - "dev": true + "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q==" }, "@types/webpack": { "version": "4.41.31", @@ -147361,7 +147512,6 @@ "version": "8.2.1", "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz", "integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==", - "dev": true, "requires": { "@types/node": "*", "@types/webidl-conversions": "*" @@ -151672,9 +151822,9 @@ } }, "bson": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.5.1.tgz", - "integrity": "sha512-XqFP74pbTVLyLy5KFxVfTUyRrC1mgOlmu/iXHfXqfCKT59jyP9lwbotGfbN59cHBRbJSamZNkrSopjv+N0SqAA==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/bson/-/bson-4.5.2.tgz", + "integrity": "sha512-8CEMJpwc7qlQtrn2rney38jQSEeMar847lz0LyitwRmVknAW8iHXrzW4fTjHfyWm0E3sukyD/zppdH+QU1QefA==", "requires": { "buffer": "^5.6.0" } @@ -172595,9 +172745,9 @@ "integrity": "sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew==" }, "kerberos": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/kerberos/-/kerberos-1.1.6.tgz", - "integrity": "sha512-qUIJeKV1bo9WxkKGYbs/MujbRbDEqE3ZBIlZlK8h+kDwoxGcqmQhgWyvXOOMAYkCGKJJHgnE0yHx0u3B1AguFg==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/kerberos/-/kerberos-1.1.7.tgz", + "integrity": "sha512-1zXg4rARjsh/VMz2jjZeTfRHbJTVNR6f2DYHbLvtUSOW1satj33Fvc7vOJ0YVWB9+/9ITJWd1QKp4w217SsiFA==", "requires": { "bindings": "^1.5.0", "nan": "^2.14.1", @@ -177590,14 +177740,39 @@ } }, "mongodb": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.1.0.tgz", - "integrity": "sha512-Gx9U9MsFWgJ3E0v4oHAdWvYTGBznNYPCkhmD/3i/kPTY/URnPfHD5/6VoKUFrdgQTK3icFiM9976hVbqCRBO9Q==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.1.2.tgz", + "integrity": "sha512-pHCKDoOy1h6mVurziJmXmTMPatYWOx8pbnyFgSgshja9Y36Q+caHUzTDY6rrIy9HCSrjnbXmx3pCtvNZHmR8xg==", "requires": { - "bson": "^4.4.0", - "denque": "^1.5.0", - "mongodb-connection-string-url": "^1.0.1", - "saslprep": "^1.0.0" + "bson": "^4.5.2", + "denque": "^2.0.1", + "mongodb-connection-string-url": "^2.0.0", + "saslprep": "^1.0.3" + }, + "dependencies": { + "denque": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz", + "integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==" + }, + "mongodb-connection-string-url": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.1.0.tgz", + "integrity": "sha512-Qf9Zw7KGiRljWvMrrUFDdVqo46KIEiDuCzvEN97rh/PcKzk2bd6n9KuzEwBwW9xo5glwx69y1mI6s+jFUD/aIQ==", + "requires": { + "@types/whatwg-url": "^8.2.1", + "whatwg-url": "^9.1.0" + } + }, + "whatwg-url": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-9.1.0.tgz", + "integrity": "sha512-CQ0UcrPHyomtlOCot1TL77WyMIm/bCwrJ2D6AOKGwEczU9EpyoqAokfqrf/MioU9kHcMsmJZcg1egXix2KYEsA==", + "requires": { + "tr46": "^2.1.0", + "webidl-conversions": "^6.1.0" + } + } } }, "mongodb-ace-autocompleter": { @@ -177632,9 +177807,9 @@ "integrity": "sha512-HsAk6w9TZ7erX+DGP81T9G7dA6JV3etT5VC5GGGvNqSg4NojVRdn5rij4kD4vSUz75LgcAbGbUZ/QHvlpb/UfQ==" }, "mongodb-client-encryption": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/mongodb-client-encryption/-/mongodb-client-encryption-1.2.6.tgz", - "integrity": "sha512-GOO0PKAkbqPy27tRs26PdEu2wypdMLLjEOVUd7obRg7nj9I3f7dYCDWQzgT+HfsEbHnCLq7z4jDcmgUorSAXwA==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/mongodb-client-encryption/-/mongodb-client-encryption-1.2.7.tgz", + "integrity": "sha512-cDm1sIhrQq+AvegHH6PbfzPAF3wJ9Fu5IOlsSkJQqCSqP7hh4WoW47SeQ2FIJDDdEyU/FekLqcxgEAhjDqJg1g==", "devOptional": true, "requires": { "bindings": "^1.5.0", diff --git a/packages/compass-e2e-tests/tests/logging.test.js b/packages/compass-e2e-tests/tests/logging.test.js index 87a2dca07a4..ad3d174c400 100644 --- a/packages/compass-e2e-tests/tests/logging.test.js +++ b/packages/compass-e2e-tests/tests/logging.test.js @@ -9,26 +9,35 @@ function cleanLog(log) { '$1' ) ); - for (const entry of log) { + for (let i = 0; i < log.length; i++) { + const entry = log[i]; expect(entry.t.$date).to.be.a('string'); delete entry.t; // Timestamps vary between each execution - if (entry.id === 1001000001) { + if (entry.id === 1_001_000_001) { expect(entry.attr.version).to.be.a('string'); expect(entry.attr.platform).to.equal(process.platform); expect(entry.attr.arch).to.equal(process.arch); delete entry.attr; } - if (entry.id === 1001000002) { + if (entry.id === 1_001_000_002) { entry.attr.stack = entry.attr.stack .replace(/file:\/\/\/.+:\d+:\d+/g, '') .split('\n') .slice(0, 2) .join('\n'); } - if (entry.id === 1001000022 || entry.id === 1001000023) { - expect(entry.attr.duration).to.be.a('number'); - entry.attr.duration = 100; + // Remove server heartbeat logs as they can happen a varying amount of + // times depending on how long tests are taking. + if (entry.id === 1_001_000_022 || entry.id === 1_001_000_023) { + log.splice(i--, 1); + } + // Remove most mongosh entries as they are quite noisy + if ( + entry.c.startsWith('MONGOSH') && + (entry.id !== 1_000_000_007 || entry.attr.input.includes('typeof prompt')) + ) { + log.splice(i--, 1); } } return log; @@ -57,21 +66,21 @@ describe('Logging integration', function () { { s: 'I', c: 'COMPASS-MAIN', - id: 1001000001, + id: 1_001_000_001, ctx: 'logging', msg: 'Starting logging', }, { s: 'I', c: 'COMPASS-CONNECT-UI', - id: 1001000004, + id: 1_001_000_004, ctx: 'Connection UI', msg: 'Initiating connection attempt', }, { s: 'I', c: 'COMPASS-DATA-SERVICE', - id: 1001000014, + id: 1_001_000_014, ctx: 'Connection 0', msg: 'Connecting', attr: { @@ -81,7 +90,7 @@ describe('Logging integration', function () { { s: 'I', c: 'COMPASS-CONNECT', - id: 1001000009, + id: 1_001_000_009, ctx: 'Connect', msg: 'Initiating connection', attr: { @@ -92,7 +101,7 @@ describe('Logging integration', function () { { s: 'I', c: 'COMPASS-CONNECT', - id: 1001000010, + id: 1_001_000_010, ctx: 'Connect', msg: 'Resolved SRV record', attr: { @@ -103,7 +112,7 @@ describe('Logging integration', function () { { s: 'I', c: 'COMPASS-DATA-SERVICE', - id: 1001000021, + id: 1_001_000_021, ctx: 'Connection 0', msg: 'Topology description changed', attr: { @@ -114,7 +123,7 @@ describe('Logging integration', function () { { s: 'I', c: 'COMPASS-DATA-SERVICE', - id: 1001000019, + id: 1_001_000_019, ctx: 'Connection 0', msg: 'Server opening', attr: { @@ -124,18 +133,7 @@ describe('Logging integration', function () { { s: 'I', c: 'COMPASS-DATA-SERVICE', - id: 1001000022, - ctx: 'Connection 0', - msg: 'Server heartbeat succeeded', - attr: { - connectionId: 'localhost:27018', - duration: 100, - }, - }, - { - s: 'I', - c: 'COMPASS-DATA-SERVICE', - id: 1001000018, + id: 1_001_000_018, ctx: 'Connection 0', msg: 'Server description changed', attr: { @@ -147,7 +145,7 @@ describe('Logging integration', function () { s: 'I', c: 'COMPASS-DATA-SERVICE', ctx: 'Connection 0', - id: 1001000021, + id: 1_001_000_021, msg: 'Topology description changed', attr: { isMongos: false, @@ -157,7 +155,7 @@ describe('Logging integration', function () { { s: 'I', c: 'COMPASS-CONNECT', - id: 1001000012, + id: 1_001_000_012, ctx: 'Connect', msg: 'Connection established', attr: { @@ -167,7 +165,7 @@ describe('Logging integration', function () { { s: 'I', c: 'COMPASS-DATA-SERVICE', - id: 1001000015, + id: 1_001_000_015, ctx: 'Connection 0', msg: 'Connected', attr: { @@ -175,10 +173,20 @@ describe('Logging integration', function () { isWritable: true, }, }, + { + s: 'I', + c: 'MONGOSH', + id: 1000000007, + ctx: 'repl', + msg: 'Evaluating input', + attr: { + input: 'JSON.stringify(db.runCommand({ connectionStatus: 1 }))', + }, + }, { s: 'I', c: 'COMPASS-MAIN', - id: 1001000003, + id: 1_001_000_003, ctx: 'app', msg: 'Closing application', }, @@ -196,12 +204,12 @@ describe('Logging integration', function () { await afterTests({ compass }); const uncaughtEntry = cleanLog(compass.compassLog).find( - (entry) => entry.id === 1001000002 + (entry) => entry.id === 1_001_000_002 ); expect(uncaughtEntry).to.deep.equal({ s: 'F', c: 'COMPASS-MAIN', - id: 1001000002, + id: 1_001_000_002, ctx: 'app', msg: 'Uncaught exception: fake exception', attr: { diff --git a/packages/compass-shell/package.json b/packages/compass-shell/package.json index 237e5d1016b..3d6639c1dee 100644 --- a/packages/compass-shell/package.json +++ b/packages/compass-shell/package.json @@ -45,9 +45,10 @@ "@leafygreen-ui/icon": "^11.4.0", "@leafygreen-ui/icon-button": "^9.1.5", "@mongodb-js/mongodb-redux-common": "^1.4.0", - "@mongosh/browser-repl": "^1.0.4", - "@mongosh/node-runtime-worker-thread": "^1.0.4", - "@mongosh/service-provider-core": "^1.0.4", + "@mongosh/logging": "^1.0.7", + "@mongosh/browser-repl": "^1.0.7", + "@mongosh/node-runtime-worker-thread": "^1.0.7", + "@mongosh/service-provider-core": "^1.0.7", "hadron-react-buttons": "^5.4.0", "re-resizable": "^6.9.0" }, diff --git a/packages/compass-shell/src/stores/store.js b/packages/compass-shell/src/stores/store.js index f428e495f63..175835fadd3 100644 --- a/packages/compass-shell/src/stores/store.js +++ b/packages/compass-shell/src/stores/store.js @@ -1,9 +1,9 @@ import { createStore } from 'redux'; import reducer from '../modules'; import { setupRuntime } from '../modules/runtime'; -import { - globalAppRegistryActivated -} from '@mongodb-js/mongodb-redux-common/app-registry'; +import { globalAppRegistryActivated } from '@mongodb-js/mongodb-redux-common/app-registry'; +import { setupLoggerAndTelemetry } from '@mongosh/logging'; +import createLogger from '@mongodb-js/compass-logging'; const debug = require('debug')('mongodb-compass-shell:store'); @@ -19,14 +19,21 @@ export default class CompassShellStore { this.globalAppRegistry = appRegistry; - appRegistry.on( - 'data-service-connected', - this.onDataServiceConnected - ); - - appRegistry.on( - 'data-service-disconnected', - this.onDataServiceDisconnected + appRegistry.on('data-service-connected', this.onDataServiceConnected); + + appRegistry.on('data-service-disconnected', this.onDataServiceDisconnected); + + setupLoggerAndTelemetry( + appRegistry, + createLogger('COMPASS-SHELL').log.unbound, + () => { + throw new Error('no analytics integration for compasss-shell'); + }, + { + platform: process.platform, + arch: process.arch, + }, + require('../../package.json').version ); // Set the global app registry in the store. @@ -34,12 +41,10 @@ export default class CompassShellStore { } onDataServiceConnected = (error, dataService) => { - this.reduxStore.dispatch(setupRuntime( - error, - dataService, - this.globalAppRegistry - )); - } + this.reduxStore.dispatch( + setupRuntime(error, dataService, this.globalAppRegistry) + ); + }; onDataServiceDisconnected = () => { const { @@ -50,10 +55,6 @@ export default class CompassShellStore { runtime.terminate(); } - this.reduxStore.dispatch(setupRuntime( - null, - null, - null - )); - } + this.reduxStore.dispatch(setupRuntime(null, null, null)); + }; } From cbbde4cc5c62c6cdd6379f834a989edee1c82eb1 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Wed, 22 Sep 2021 14:30:08 +0200 Subject: [PATCH 2/2] fixup: package.json changes --- package-lock.json | 2 ++ packages/compass-shell/package.json | 1 + 2 files changed, 3 insertions(+) diff --git a/package-lock.json b/package-lock.json index 5a97ea97884..6460896e815 100644 --- a/package-lock.json +++ b/package-lock.json @@ -85199,6 +85199,7 @@ "dependencies": { "@leafygreen-ui/icon": "^11.4.0", "@leafygreen-ui/icon-button": "^9.1.5", + "@mongodb-js/compass-logging": "^0.2.0", "@mongodb-js/mongodb-redux-common": "^1.4.0", "@mongosh/browser-repl": "^1.0.7", "@mongosh/logging": "^1.0.7", @@ -133490,6 +133491,7 @@ "@hot-loader/react-dom": "^16.9.0", "@leafygreen-ui/icon": "^11.4.0", "@leafygreen-ui/icon-button": "^9.1.5", + "@mongodb-js/compass-logging": "^0.2.0", "@mongodb-js/mongodb-redux-common": "^1.4.0", "@mongosh/browser-repl": "^1.0.7", "@mongosh/logging": "^1.0.7", diff --git a/packages/compass-shell/package.json b/packages/compass-shell/package.json index 3d6639c1dee..1df2d261d9c 100644 --- a/packages/compass-shell/package.json +++ b/packages/compass-shell/package.json @@ -44,6 +44,7 @@ "dependencies": { "@leafygreen-ui/icon": "^11.4.0", "@leafygreen-ui/icon-button": "^9.1.5", + "@mongodb-js/compass-logging": "^0.2.0", "@mongodb-js/mongodb-redux-common": "^1.4.0", "@mongosh/logging": "^1.0.7", "@mongosh/browser-repl": "^1.0.7",