diff --git a/package-lock.json b/package-lock.json index 61fe9f9020a..88023e7f2e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31807,6 +31807,106 @@ "node": ">=12" } }, + "node_modules/mongodb-schema": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/mongodb-schema/-/mongodb-schema-12.4.0.tgz", + "integrity": "sha512-K4gZQhWaEQ+GNsGeEpAIHsV5NLRLdrKW/d7W+l2QnsDP2FipA0FIucMW4nLssLpGMdgHQYsN7Vj/hpUsQIY+rQ==", + "license": "Apache-2.0", + "dependencies": { + "reservoir": "^0.1.2" + }, + "bin": { + "mongodb-schema": "bin/mongodb-schema" + }, + "optionalDependencies": { + "bson": "^6.7.0", + "cli-table": "^0.3.4", + "js-yaml": "^4.0.0", + "mongodb": "^6.6.1", + "mongodb-ns": "^2.4.0", + "numeral": "^2.0.6", + "progress": "^2.0.3", + "stats-lite": "^2.0.0", + "yargs": "^17.6.2" + } + }, + "node_modules/mongodb-schema/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/mongodb-schema/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", + "optional": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/mongodb-schema/node_modules/numeral": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", + "integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==", + "license": "MIT", + "optional": true, + "engines": { + "node": "*" + } + }, + "node_modules/mongodb-schema/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "optional": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mongodb-schema/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "license": "MIT", + "optional": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/mongodb-schema/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", + "optional": true, + "engines": { + "node": ">=12" + } + }, "node_modules/moo": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.1.tgz", @@ -43462,7 +43562,7 @@ "mongodb-instance-model": "^12.26.2", "mongodb-ns": "^2.4.2", "mongodb-query-parser": "^4.3.0", - "mongodb-schema": "^12.3.2", + "mongodb-schema": "^12.4.0", "prop-types": "^15.7.2", "re-resizable": "^6.9.0", "react": "^17.0.2", @@ -43507,31 +43607,6 @@ "bson": "^4.6.3 || ^5 || ^6" } }, - "packages/compass-aggregations/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "packages/compass-aggregations/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "license": "ISC", - "optional": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "packages/compass-aggregations/node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -43556,39 +43631,6 @@ "bson": "^4.6.3 || ^5 || ^6" } }, - "packages/compass-aggregations/node_modules/mongodb-schema": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/mongodb-schema/-/mongodb-schema-12.3.2.tgz", - "integrity": "sha512-6OSM7vx55q2w/rT++ZMJLb2Liq+W5BPI+zYpWfJpO4O481LHWTZBI6/Un6mB9gYJW+kBJUVczIDGsUkYrqsdHQ==", - "license": "Apache-2.0", - "dependencies": { - "reservoir": "^0.1.2" - }, - "bin": { - "mongodb-schema": "bin/mongodb-schema" - }, - "optionalDependencies": { - "bson": "^6.7.0", - "cli-table": "^0.3.4", - "js-yaml": "^4.0.0", - "mongodb": "^6.6.1", - "mongodb-ns": "^2.4.0", - "numeral": "^2.0.6", - "progress": "^2.0.3", - "stats-lite": "^2.0.0", - "yargs": "^17.6.2" - } - }, - "packages/compass-aggregations/node_modules/numeral": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", - "integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==", - "license": "MIT", - "optional": true, - "engines": { - "node": "*" - } - }, "packages/compass-aggregations/node_modules/sinon": { "version": "9.2.4", "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", @@ -43607,48 +43649,6 @@ "url": "https://opencollective.com/sinon" } }, - "packages/compass-aggregations/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "optional": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "packages/compass-aggregations/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "license": "MIT", - "optional": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "packages/compass-aggregations/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "license": "ISC", - "optional": true, - "engines": { - "node": ">=12" - } - }, "packages/compass-app-stores": { "name": "@mongodb-js/compass-app-stores", "version": "7.36.2", @@ -44984,7 +44984,7 @@ "@mongodb-js/compass-logging": "^1.6.2", "hadron-app-registry": "^9.4.2", "lodash": "^4.17.21", - "mongodb-schema": "^12.3.2", + "mongodb-schema": "^12.4.0", "react": "^17.0.2", "react-redux": "^8.1.3", "redux": "^4.2.1", @@ -45011,31 +45011,6 @@ "xvfb-maybe": "^0.2.1" } }, - "packages/compass-field-store/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "packages/compass-field-store/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "license": "ISC", - "optional": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "packages/compass-field-store/node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -45045,39 +45020,6 @@ "node": ">=0.3.1" } }, - "packages/compass-field-store/node_modules/mongodb-schema": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/mongodb-schema/-/mongodb-schema-12.3.2.tgz", - "integrity": "sha512-6OSM7vx55q2w/rT++ZMJLb2Liq+W5BPI+zYpWfJpO4O481LHWTZBI6/Un6mB9gYJW+kBJUVczIDGsUkYrqsdHQ==", - "license": "Apache-2.0", - "dependencies": { - "reservoir": "^0.1.2" - }, - "bin": { - "mongodb-schema": "bin/mongodb-schema" - }, - "optionalDependencies": { - "bson": "^6.7.0", - "cli-table": "^0.3.4", - "js-yaml": "^4.0.0", - "mongodb": "^6.6.1", - "mongodb-ns": "^2.4.0", - "numeral": "^2.0.6", - "progress": "^2.0.3", - "stats-lite": "^2.0.0", - "yargs": "^17.6.2" - } - }, - "packages/compass-field-store/node_modules/numeral": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", - "integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==", - "license": "MIT", - "optional": true, - "engines": { - "node": "*" - } - }, "packages/compass-field-store/node_modules/sinon": { "version": "9.2.4", "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", @@ -45096,48 +45038,6 @@ "url": "https://opencollective.com/sinon" } }, - "packages/compass-field-store/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "optional": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "packages/compass-field-store/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "license": "MIT", - "optional": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "packages/compass-field-store/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "license": "ISC", - "optional": true, - "engines": { - "node": ">=12" - } - }, "packages/compass-find-in-page": { "name": "@mongodb-js/compass-find-in-page", "version": "4.35.2", @@ -45219,7 +45119,7 @@ "compass-preferences-model": "^2.33.2", "hadron-app-registry": "^9.4.2", "mongodb": "^6.12.0", - "mongodb-schema": "^12.3.2", + "mongodb-schema": "^12.4.0", "react": "^17.0.2", "react-redux": "^8.1.3", "redux": "^4.2.1", @@ -45250,31 +45150,6 @@ "xvfb-maybe": "^0.2.1" } }, - "packages/compass-generative-ai/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "packages/compass-generative-ai/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "license": "ISC", - "optional": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "packages/compass-generative-ai/node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -45290,39 +45165,6 @@ "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", "dev": true }, - "packages/compass-generative-ai/node_modules/mongodb-schema": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/mongodb-schema/-/mongodb-schema-12.3.2.tgz", - "integrity": "sha512-6OSM7vx55q2w/rT++ZMJLb2Liq+W5BPI+zYpWfJpO4O481LHWTZBI6/Un6mB9gYJW+kBJUVczIDGsUkYrqsdHQ==", - "license": "Apache-2.0", - "dependencies": { - "reservoir": "^0.1.2" - }, - "bin": { - "mongodb-schema": "bin/mongodb-schema" - }, - "optionalDependencies": { - "bson": "^6.7.0", - "cli-table": "^0.3.4", - "js-yaml": "^4.0.0", - "mongodb": "^6.6.1", - "mongodb-ns": "^2.4.0", - "numeral": "^2.0.6", - "progress": "^2.0.3", - "stats-lite": "^2.0.0", - "yargs": "^17.6.2" - } - }, - "packages/compass-generative-ai/node_modules/numeral": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", - "integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==", - "license": "MIT", - "optional": true, - "engines": { - "node": "*" - } - }, "packages/compass-generative-ai/node_modules/p-queue": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-7.4.1.tgz", @@ -45369,48 +45211,6 @@ "url": "https://opencollective.com/sinon" } }, - "packages/compass-generative-ai/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "optional": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "packages/compass-generative-ai/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "license": "MIT", - "optional": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "packages/compass-generative-ai/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "license": "ISC", - "optional": true, - "engines": { - "node": ">=12" - } - }, "packages/compass-global-writes": { "name": "@mongodb-js/compass-global-writes", "version": "1.9.2", @@ -45630,7 +45430,7 @@ "mongodb-data-service": "^22.25.2", "mongodb-ns": "^2.4.2", "mongodb-query-parser": "^4.3.0", - "mongodb-schema": "^12.3.2", + "mongodb-schema": "^12.4.0", "papaparse": "^5.3.2", "react": "^17.0.2", "react-redux": "^8.1.3", @@ -45684,31 +45484,6 @@ "bson": "^4.6.3 || ^5 || ^6" } }, - "packages/compass-import-export/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "packages/compass-import-export/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "license": "ISC", - "optional": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "packages/compass-import-export/node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -45733,39 +45508,6 @@ "bson": "^4.6.3 || ^5 || ^6" } }, - "packages/compass-import-export/node_modules/mongodb-schema": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/mongodb-schema/-/mongodb-schema-12.3.2.tgz", - "integrity": "sha512-6OSM7vx55q2w/rT++ZMJLb2Liq+W5BPI+zYpWfJpO4O481LHWTZBI6/Un6mB9gYJW+kBJUVczIDGsUkYrqsdHQ==", - "license": "Apache-2.0", - "dependencies": { - "reservoir": "^0.1.2" - }, - "bin": { - "mongodb-schema": "bin/mongodb-schema" - }, - "optionalDependencies": { - "bson": "^6.7.0", - "cli-table": "^0.3.4", - "js-yaml": "^4.0.0", - "mongodb": "^6.6.1", - "mongodb-ns": "^2.4.0", - "numeral": "^2.0.6", - "progress": "^2.0.3", - "stats-lite": "^2.0.0", - "yargs": "^17.6.2" - } - }, - "packages/compass-import-export/node_modules/numeral": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", - "integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==", - "license": "MIT", - "optional": true, - "engines": { - "node": "*" - } - }, "packages/compass-import-export/node_modules/sinon": { "version": "9.2.4", "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", @@ -45784,48 +45526,6 @@ "url": "https://opencollective.com/sinon" } }, - "packages/compass-import-export/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "optional": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "packages/compass-import-export/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "license": "MIT", - "optional": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "packages/compass-import-export/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "license": "ISC", - "optional": true, - "engines": { - "node": ">=12" - } - }, "packages/compass-indexes": { "name": "@mongodb-js/compass-indexes", "version": "5.49.2", @@ -46292,7 +45992,7 @@ "mongodb-ns": "^2.4.2", "mongodb-query-parser": "^4.3.0", "mongodb-query-util": "^2.4.2", - "mongodb-schema": "^12.3.2", + "mongodb-schema": "^12.4.0", "react": "^17.0.2", "react-redux": "^8.1.3", "redux": "^4.2.1", @@ -46329,31 +46029,6 @@ "bson": "^4.6.3 || ^5 || ^6" } }, - "packages/compass-query-bar/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "packages/compass-query-bar/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "license": "ISC", - "optional": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "packages/compass-query-bar/node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -46378,39 +46053,6 @@ "bson": "^4.6.3 || ^5 || ^6" } }, - "packages/compass-query-bar/node_modules/mongodb-schema": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/mongodb-schema/-/mongodb-schema-12.3.2.tgz", - "integrity": "sha512-6OSM7vx55q2w/rT++ZMJLb2Liq+W5BPI+zYpWfJpO4O481LHWTZBI6/Un6mB9gYJW+kBJUVczIDGsUkYrqsdHQ==", - "license": "Apache-2.0", - "dependencies": { - "reservoir": "^0.1.2" - }, - "bin": { - "mongodb-schema": "bin/mongodb-schema" - }, - "optionalDependencies": { - "bson": "^6.7.0", - "cli-table": "^0.3.4", - "js-yaml": "^4.0.0", - "mongodb": "^6.6.1", - "mongodb-ns": "^2.4.0", - "numeral": "^2.0.6", - "progress": "^2.0.3", - "stats-lite": "^2.0.0", - "yargs": "^17.6.2" - } - }, - "packages/compass-query-bar/node_modules/numeral": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", - "integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==", - "license": "MIT", - "optional": true, - "engines": { - "node": "*" - } - }, "packages/compass-query-bar/node_modules/sinon": { "version": "9.2.4", "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", @@ -46429,48 +46071,6 @@ "url": "https://opencollective.com/sinon" } }, - "packages/compass-query-bar/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "optional": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "packages/compass-query-bar/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "license": "MIT", - "optional": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "packages/compass-query-bar/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "license": "ISC", - "optional": true, - "engines": { - "node": ">=12" - } - }, "packages/compass-saved-aggregations-queries": { "name": "@mongodb-js/compass-saved-aggregations-queries", "version": "1.50.2", @@ -46572,7 +46172,7 @@ "lodash": "^4.17.21", "mongodb": "^6.12.0", "mongodb-query-util": "^2.4.2", - "mongodb-schema": "^12.3.2", + "mongodb-schema": "^12.4.0", "numeral": "^1.5.6", "prop-types": "^15.7.2", "react": "^17.0.2", @@ -46684,31 +46284,6 @@ "bson": "^4.6.3 || ^5 || ^6" } }, - "packages/compass-schema/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=8" - } - }, - "packages/compass-schema/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "license": "ISC", - "optional": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "packages/compass-schema/node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -46718,35 +46293,12 @@ "node": ">=0.3.1" } }, - "packages/compass-schema/node_modules/mongodb-schema": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/mongodb-schema/-/mongodb-schema-12.3.2.tgz", - "integrity": "sha512-6OSM7vx55q2w/rT++ZMJLb2Liq+W5BPI+zYpWfJpO4O481LHWTZBI6/Un6mB9gYJW+kBJUVczIDGsUkYrqsdHQ==", - "license": "Apache-2.0", - "dependencies": { - "reservoir": "^0.1.2" - }, - "bin": { - "mongodb-schema": "bin/mongodb-schema" - }, - "optionalDependencies": { - "bson": "^6.7.0", - "cli-table": "^0.3.4", - "js-yaml": "^4.0.0", - "mongodb": "^6.6.1", - "mongodb-ns": "^2.4.0", - "numeral": "^2.0.6", - "progress": "^2.0.3", - "stats-lite": "^2.0.0", - "yargs": "^17.6.2" - } - }, "packages/compass-schema/node_modules/mongodb-schema/node_modules/numeral": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", "integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==", + "extraneous": true, "license": "MIT", - "optional": true, "engines": { "node": "*" } @@ -46769,48 +46321,6 @@ "url": "https://opencollective.com/sinon" } }, - "packages/compass-schema/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "optional": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "packages/compass-schema/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "license": "MIT", - "optional": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "packages/compass-schema/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "license": "ISC", - "optional": true, - "engines": { - "node": ">=12" - } - }, "packages/compass-serverstats": { "name": "@mongodb-js/compass-serverstats", "version": "16.49.2", @@ -56238,7 +55748,7 @@ "mongodb-instance-model": "^12.26.2", "mongodb-ns": "^2.4.2", "mongodb-query-parser": "^4.3.0", - "mongodb-schema": "^12.3.2", + "mongodb-schema": "^12.4.0", "nyc": "^15.1.0", "prettier": "^2.7.1", "prop-types": "^15.7.2", @@ -56262,23 +55772,6 @@ "acorn": "^8.1.0" } }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "optional": true - }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "optional": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -56296,29 +55789,6 @@ "lodash": "^4.17.21" } }, - "mongodb-schema": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/mongodb-schema/-/mongodb-schema-12.3.2.tgz", - "integrity": "sha512-6OSM7vx55q2w/rT++ZMJLb2Liq+W5BPI+zYpWfJpO4O481LHWTZBI6/Un6mB9gYJW+kBJUVczIDGsUkYrqsdHQ==", - "requires": { - "bson": "^6.7.0", - "cli-table": "^0.3.4", - "js-yaml": "^4.0.0", - "mongodb": "^6.6.1", - "mongodb-ns": "^2.4.0", - "numeral": "^2.0.6", - "progress": "^2.0.3", - "reservoir": "^0.1.2", - "stats-lite": "^2.0.0", - "yargs": "^17.6.2" - } - }, - "numeral": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", - "integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==", - "optional": true - }, "sinon": { "version": "9.2.4", "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", @@ -56332,36 +55802,6 @@ "nise": "^4.0.4", "supports-color": "^7.1.0" } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "optional": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "optional": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "optional": true } } }, @@ -57213,7 +56653,7 @@ "hadron-app-registry": "^9.4.2", "lodash": "^4.17.21", "mocha": "^10.2.0", - "mongodb-schema": "^12.3.2", + "mongodb-schema": "^12.4.0", "nyc": "^15.1.0", "prettier": "^2.7.1", "react": "^17.0.2", @@ -57225,52 +56665,12 @@ "xvfb-maybe": "^0.2.1" }, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "optional": true - }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "optional": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true }, - "mongodb-schema": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/mongodb-schema/-/mongodb-schema-12.3.2.tgz", - "integrity": "sha512-6OSM7vx55q2w/rT++ZMJLb2Liq+W5BPI+zYpWfJpO4O481LHWTZBI6/Un6mB9gYJW+kBJUVczIDGsUkYrqsdHQ==", - "requires": { - "bson": "^6.7.0", - "cli-table": "^0.3.4", - "js-yaml": "^4.0.0", - "mongodb": "^6.6.1", - "mongodb-ns": "^2.4.0", - "numeral": "^2.0.6", - "progress": "^2.0.3", - "reservoir": "^0.1.2", - "stats-lite": "^2.0.0", - "yargs": "^17.6.2" - } - }, - "numeral": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", - "integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==", - "optional": true - }, "sinon": { "version": "9.2.4", "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", @@ -57284,36 +56684,6 @@ "nise": "^4.0.4", "supports-color": "^7.1.0" } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "optional": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "optional": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "optional": true } } }, @@ -57405,7 +56775,7 @@ "hadron-app-registry": "^9.4.2", "mocha": "^10.2.0", "mongodb": "^6.12.0", - "mongodb-schema": "^12.3.2", + "mongodb-schema": "^12.4.0", "nyc": "^15.1.0", "p-queue": "^7.4.1", "prettier": "^2.7.1", @@ -57418,23 +56788,6 @@ "xvfb-maybe": "^0.2.1" }, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "optional": true - }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "optional": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -57447,29 +56800,6 @@ "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", "dev": true }, - "mongodb-schema": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/mongodb-schema/-/mongodb-schema-12.3.2.tgz", - "integrity": "sha512-6OSM7vx55q2w/rT++ZMJLb2Liq+W5BPI+zYpWfJpO4O481LHWTZBI6/Un6mB9gYJW+kBJUVczIDGsUkYrqsdHQ==", - "requires": { - "bson": "^6.7.0", - "cli-table": "^0.3.4", - "js-yaml": "^4.0.0", - "mongodb": "^6.6.1", - "mongodb-ns": "^2.4.0", - "numeral": "^2.0.6", - "progress": "^2.0.3", - "reservoir": "^0.1.2", - "stats-lite": "^2.0.0", - "yargs": "^17.6.2" - } - }, - "numeral": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", - "integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==", - "optional": true - }, "p-queue": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-7.4.1.tgz", @@ -57499,36 +56829,6 @@ "nise": "^4.0.4", "supports-color": "^7.1.0" } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "optional": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "optional": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "optional": true } } }, @@ -57694,7 +56994,7 @@ "mongodb-data-service": "^22.25.2", "mongodb-ns": "^2.4.2", "mongodb-query-parser": "^4.3.0", - "mongodb-schema": "^12.3.2", + "mongodb-schema": "^12.4.0", "nyc": "^15.1.0", "papaparse": "^5.3.2", "prettier": "^2.7.1", @@ -57720,23 +57020,6 @@ "acorn": "^8.1.0" } }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "optional": true - }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "optional": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -57754,29 +57037,6 @@ "lodash": "^4.17.21" } }, - "mongodb-schema": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/mongodb-schema/-/mongodb-schema-12.3.2.tgz", - "integrity": "sha512-6OSM7vx55q2w/rT++ZMJLb2Liq+W5BPI+zYpWfJpO4O481LHWTZBI6/Un6mB9gYJW+kBJUVczIDGsUkYrqsdHQ==", - "requires": { - "bson": "^6.7.0", - "cli-table": "^0.3.4", - "js-yaml": "^4.0.0", - "mongodb": "^6.6.1", - "mongodb-ns": "^2.4.0", - "numeral": "^2.0.6", - "progress": "^2.0.3", - "reservoir": "^0.1.2", - "stats-lite": "^2.0.0", - "yargs": "^17.6.2" - } - }, - "numeral": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", - "integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==", - "optional": true - }, "sinon": { "version": "9.2.4", "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", @@ -57790,36 +57050,6 @@ "nise": "^4.0.4", "supports-color": "^7.1.0" } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "optional": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "optional": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "optional": true } } }, @@ -58155,7 +57385,7 @@ "mongodb-ns": "^2.4.2", "mongodb-query-parser": "^4.3.0", "mongodb-query-util": "^2.4.2", - "mongodb-schema": "^12.3.2", + "mongodb-schema": "^12.4.0", "nyc": "^15.1.0", "react": "^17.0.2", "react-dom": "^17.0.2", @@ -58175,23 +57405,6 @@ "acorn": "^8.1.0" } }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "optional": true - }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "optional": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -58209,29 +57422,6 @@ "lodash": "^4.17.21" } }, - "mongodb-schema": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/mongodb-schema/-/mongodb-schema-12.3.2.tgz", - "integrity": "sha512-6OSM7vx55q2w/rT++ZMJLb2Liq+W5BPI+zYpWfJpO4O481LHWTZBI6/Un6mB9gYJW+kBJUVczIDGsUkYrqsdHQ==", - "requires": { - "bson": "^6.7.0", - "cli-table": "^0.3.4", - "js-yaml": "^4.0.0", - "mongodb": "^6.6.1", - "mongodb-ns": "^2.4.0", - "numeral": "^2.0.6", - "progress": "^2.0.3", - "reservoir": "^0.1.2", - "stats-lite": "^2.0.0", - "yargs": "^17.6.2" - } - }, - "numeral": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", - "integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==", - "optional": true - }, "sinon": { "version": "9.2.4", "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", @@ -58245,36 +57435,6 @@ "nise": "^4.0.4", "supports-color": "^7.1.0" } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "optional": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "optional": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "optional": true } } }, @@ -58387,7 +57547,7 @@ "mocha": "^10.2.0", "mongodb": "^6.12.0", "mongodb-query-util": "^2.4.2", - "mongodb-schema": "^12.3.2", + "mongodb-schema": "^12.4.0", "numeral": "^1.5.6", "nyc": "^15.1.0", "prop-types": "^15.7.2", @@ -58403,54 +57563,12 @@ "xvfb-maybe": "^0.2.1" }, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "optional": true - }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "optional": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true }, - "mongodb-schema": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/mongodb-schema/-/mongodb-schema-12.3.2.tgz", - "integrity": "sha512-6OSM7vx55q2w/rT++ZMJLb2Liq+W5BPI+zYpWfJpO4O481LHWTZBI6/Un6mB9gYJW+kBJUVczIDGsUkYrqsdHQ==", - "requires": { - "bson": "^6.7.0", - "cli-table": "^0.3.4", - "js-yaml": "^4.0.0", - "mongodb": "^6.6.1", - "mongodb-ns": "^2.4.0", - "numeral": "^2.0.6", - "progress": "^2.0.3", - "reservoir": "^0.1.2", - "stats-lite": "^2.0.0", - "yargs": "^17.6.2" - }, - "dependencies": { - "numeral": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", - "integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==", - "optional": true - } - } - }, "sinon": { "version": "9.2.4", "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", @@ -58464,36 +57582,6 @@ "nise": "^4.0.4", "supports-color": "^7.1.0" } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "optional": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "optional": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "optional": true } } }, @@ -81111,6 +80199,78 @@ } } }, + "mongodb-schema": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/mongodb-schema/-/mongodb-schema-12.4.0.tgz", + "integrity": "sha512-K4gZQhWaEQ+GNsGeEpAIHsV5NLRLdrKW/d7W+l2QnsDP2FipA0FIucMW4nLssLpGMdgHQYsN7Vj/hpUsQIY+rQ==", + "requires": { + "bson": "^6.7.0", + "cli-table": "^0.3.4", + "js-yaml": "^4.0.0", + "mongodb": "^6.6.1", + "mongodb-ns": "^2.4.0", + "numeral": "^2.0.6", + "progress": "^2.0.3", + "reservoir": "^0.1.2", + "stats-lite": "^2.0.0", + "yargs": "^17.6.2" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "optional": true + }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "optional": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "numeral": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", + "integrity": "sha512-qaKRmtYPZ5qdw4jWJD6bxEf1FJEqllJrwxCLIm0sQU/A7v2/czigzOb+C2uSiFsa9lBUzeH7M1oK+Q+OLxL3kA==", + "optional": true + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "optional": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "optional": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "optional": true + } + } + }, "moo": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.1.tgz", diff --git a/packages/compass-aggregations/package.json b/packages/compass-aggregations/package.json index e3b80d9dde7..9e19a91af59 100644 --- a/packages/compass-aggregations/package.json +++ b/packages/compass-aggregations/package.json @@ -91,7 +91,7 @@ "mongodb-instance-model": "^12.26.2", "mongodb-ns": "^2.4.2", "mongodb-query-parser": "^4.3.0", - "mongodb-schema": "^12.3.2", + "mongodb-schema": "^12.4.0", "prop-types": "^15.7.2", "re-resizable": "^6.9.0", "react": "^17.0.2", diff --git a/packages/compass-components/src/components/error-warning-summary.tsx b/packages/compass-components/src/components/error-warning-summary.tsx index 26715eae9b0..d6ea4d99ef7 100644 --- a/packages/compass-components/src/components/error-warning-summary.tsx +++ b/packages/compass-components/src/components/error-warning-summary.tsx @@ -24,6 +24,10 @@ const actionButtonStyles = css({ marginLeft: 'auto', }); +type DismissProps = + | { dismissible: true; onClose: () => void } + | { dismissible?: false; onClose?: never }; + function Summary({ messages }: { messages: string[] }): React.ReactElement { if (messages.length === 1) { return
{messages[0]}
; @@ -80,7 +84,8 @@ const BannerWithSummary: React.FunctionComponent< } & ( | { actionText: string; onAction(): void } | { actionText?: never; onAction?: never } - ) + ) & + DismissProps > = ({ ['data-testid']: dataTestId, messages, @@ -88,6 +93,8 @@ const BannerWithSummary: React.FunctionComponent< actionText, variant, className, + dismissible, + onClose, }) => { const _messages = useMemo(() => { return !Array.isArray(messages) ? [messages] : messages; @@ -98,6 +105,8 @@ const BannerWithSummary: React.FunctionComponent< data-testid={dataTestId} variant={variant} className={cx(bannerStyle, className)} + dismissible={dismissible} + onClose={onClose} >
@@ -124,7 +133,8 @@ export const ErrorSummary: React.FunctionComponent< } & ( | { actionText: string; onAction(): void } | { actionText?: never; onAction?: never } - ) + ) & + DismissProps > = ({ className, errors, ...props }) => { return ( = ({ className, warnings, ...props }) => { return ( { const Schema: React.FunctionComponent<{ analysisState: AnalysisState; - errorMessage?: string; + error?: SchemaAnalysisError; maxTimeMS?: number; schema: MongodbSchema | null; count?: number; @@ -379,14 +384,16 @@ const Schema: React.FunctionComponent<{ onExportSchemaClicked: () => void; onStartAnalysis: () => Promise; onStopAnalysis: () => void; + onDismissError: () => void; }> = ({ analysisState, - errorMessage, + error, schema, resultId, onExportSchemaClicked, onStartAnalysis, onStopAnalysis, + onDismissError, }) => { const onApplyClicked = useCallback(() => { void onStartAnalysis(); @@ -410,7 +417,8 @@ const Schema: React.FunctionComponent<{ onExportSchemaClicked={onExportSchemaClicked} onResetClicked={onApplyClicked} analysisState={analysisState} - errorMessage={errorMessage || ''} + error={error} + onDismissError={onDismissError} isOutdated={!!outdated} sampleSize={schema ? schema.count : 0} schemaResultId={resultId || ''} @@ -440,7 +448,7 @@ const Schema: React.FunctionComponent<{ export default connect( (state: RootState) => ({ analysisState: state.schemaAnalysis.analysisState, - errorMessage: state.schemaAnalysis.errorMessage, + error: state.schemaAnalysis.error, schema: state.schemaAnalysis.schema, resultId: state.schemaAnalysis.resultId, }), @@ -448,5 +456,6 @@ export default connect( onStartAnalysis: startAnalysis, onStopAnalysis: () => stopAnalysis(), onExportSchemaClicked: openExportSchema, + onDismissError: analysisErrorDismissed, } )(Schema); diff --git a/packages/compass-schema/src/components/schema-toolbar/schema-toolbar.spec.tsx b/packages/compass-schema/src/components/schema-toolbar/schema-toolbar.spec.tsx index 71c811aaff5..b9ec2a1d13c 100644 --- a/packages/compass-schema/src/components/schema-toolbar/schema-toolbar.spec.tsx +++ b/packages/compass-schema/src/components/schema-toolbar/schema-toolbar.spec.tsx @@ -40,13 +40,14 @@ describe('SchemaToolbar', function () { {}} onResetClicked={() => {}} sampleSize={10} schemaResultId="123" onExportSchemaClicked={() => {}} + onDismissError={() => {}} {...props} /> , @@ -60,23 +61,54 @@ describe('SchemaToolbar', function () { sinon.restore(); }); - it("renders errors when they're passed", function () { - renderSchemaToolbar({ - analysisState: 'error', - errorMessage: 'test error msg', + describe('errors', function () { + it('renders general error', function () { + renderSchemaToolbar({ + analysisState: 'initial', + error: { + errorType: 'general', + errorMessage: 'test error msg', + }, + }); + + expect(screen.getByText(testErrorMessage)).to.be.visible; + expect(screen.getByTestId('schema-toolbar-error-message')).to.be.visible; }); - expect(screen.getByText(testErrorMessage)).to.be.visible; - expect(screen.getByTestId('schema-toolbar-error-message')).to.be.visible; - }); + it('renders timeout error', function () { + renderSchemaToolbar({ + analysisState: 'initial', + error: { + errorType: 'timeout', + errorMessage: 'test error msg', + }, + }); - it('does not render errors when the analysis state is not error', function () { - renderSchemaToolbar({ - errorMessage: 'test error msg', + expect(screen.getByTestId('schema-toolbar-timeout-message')).to.be + .visible; + expect( + screen.getByTestId('schema-toolbar-timeout-message').textContent + ).to.include('Please try increasing the maxTimeMS'); }); - expect(screen.queryByText(testErrorMessage)).to.not.exist; - expect(screen.queryByTestId('schema-toolbar-error-message')).to.not.exist; + it('renders complexity abort error', function () { + renderSchemaToolbar({ + analysisState: 'initial', + error: { + errorType: 'highComplexity', + errorMessage: 'test error msg', + }, + }); + + expect(screen.getByTestId('schema-toolbar-complexity-abort-message')).to + .be.visible; + expect( + screen.getByRole('link', { name: 'Learn more' }) + ).to.have.attribute( + 'href', + 'https://www.mongodb.com/docs/manual/data-modeling/design-antipatterns/bloated-documents/' + ); + }); }); it('renders the sample size count', function () { diff --git a/packages/compass-schema/src/components/schema-toolbar/schema-toolbar.tsx b/packages/compass-schema/src/components/schema-toolbar/schema-toolbar.tsx index f84f6e13c87..d247a831ba4 100644 --- a/packages/compass-schema/src/components/schema-toolbar/schema-toolbar.tsx +++ b/packages/compass-schema/src/components/schema-toolbar/schema-toolbar.tsx @@ -1,5 +1,7 @@ import React, { useMemo } from 'react'; import { + Banner, + BannerVariant, Body, Button, ErrorSummary, @@ -11,12 +13,10 @@ import { } from '@mongodb-js/compass-components'; import { usePreference } from 'compass-preferences-model/provider'; import type { AnalysisState } from '../../constants/analysis-states'; -import { - ANALYSIS_STATE_ERROR, - ANALYSIS_STATE_TIMEOUT, - ANALYSIS_STATE_COMPLETE, -} from '../../constants/analysis-states'; +import { ANALYSIS_STATE_COMPLETE } from '../../constants/analysis-states'; import { QueryBar } from '@mongodb-js/compass-query-bar'; +import { type SchemaAnalysisError } from '../../stores/schema-analysis-reducer'; +import { DISTINCT_FIELDS_ABORT_THRESHOLD } from '../../modules/schema-analysis'; const schemaToolbarStyles = css({ display: 'flex', @@ -60,18 +60,20 @@ const SCHEMA_ANALYSIS_DOCS_LINK = type SchemaToolbarProps = { analysisState: AnalysisState; - errorMessage: string; + error?: SchemaAnalysisError; isOutdated: boolean; onAnalyzeSchemaClicked: () => void; onExportSchemaClicked: () => void; onResetClicked: () => void; + onDismissError: () => void; sampleSize: number; schemaResultId: string; }; const SchemaToolbar: React.FunctionComponent = ({ analysisState, - errorMessage, + error, + onDismissError, isOutdated, onAnalyzeSchemaClicked, onExportSchemaClicked, @@ -130,14 +132,37 @@ const SchemaToolbar: React.FunctionComponent = ({
)} - {analysisState === ANALYSIS_STATE_ERROR && ( + {error?.errorType === 'general' && ( + )} + {error?.errorType === 'timeout' && ( + )} - {analysisState === ANALYSIS_STATE_TIMEOUT && ( - + {error?.errorType === 'highComplexity' && ( + + The analysis was aborted because the number of fields exceeds{' '} + {DISTINCT_FIELDS_ABORT_THRESHOLD}. Consider breaking up your data into + more collections with smaller documents, and using references to + consolidate the data you need.  + + Learn more + + )} {analysisState === ANALYSIS_STATE_COMPLETE && isOutdated && ( diff --git a/packages/compass-schema/src/constants/analysis-states.ts b/packages/compass-schema/src/constants/analysis-states.ts index 8d82ba65935..bf9054c1451 100644 --- a/packages/compass-schema/src/constants/analysis-states.ts +++ b/packages/compass-schema/src/constants/analysis-states.ts @@ -1,12 +1,8 @@ export const ANALYSIS_STATE_INITIAL = 'initial'; export const ANALYSIS_STATE_ANALYZING = 'analyzing'; -export const ANALYSIS_STATE_ERROR = 'error'; export const ANALYSIS_STATE_COMPLETE = 'complete'; -export const ANALYSIS_STATE_TIMEOUT = 'timeout'; export type AnalysisState = | typeof ANALYSIS_STATE_INITIAL | typeof ANALYSIS_STATE_ANALYZING - | typeof ANALYSIS_STATE_ERROR - | typeof ANALYSIS_STATE_COMPLETE - | typeof ANALYSIS_STATE_TIMEOUT; + | typeof ANALYSIS_STATE_COMPLETE; diff --git a/packages/compass-schema/src/modules/schema-analysis.spec.ts b/packages/compass-schema/src/modules/schema-analysis.spec.ts index 2e6696a65f4..d2acd47f829 100644 --- a/packages/compass-schema/src/modules/schema-analysis.spec.ts +++ b/packages/compass-schema/src/modules/schema-analysis.spec.ts @@ -7,6 +7,10 @@ import { createNoopLogger } from '@mongodb-js/compass-logging/provider'; import { isInternalFieldPath } from 'hadron-document'; import { analyzeSchema, calculateSchemaMetadata } from './schema-analysis'; +import { + createSandboxFromDefaultPreferences, + type PreferencesAccess, +} from 'compass-preferences-model'; const testDocs = [ { @@ -64,8 +68,13 @@ const testDocs = [ ]; const dummyLogger = createNoopLogger('TEST'); +let preferences: PreferencesAccess; describe('schema-analysis', function () { + beforeEach(async function () { + preferences = await createSandboxFromDefaultPreferences(); + }); + afterEach(function () { sinon.restore(); }); @@ -89,7 +98,8 @@ describe('schema-analysis', function () { 'db.coll', {}, {}, - dummyLogger + dummyLogger, + preferences ); const expectedSchema = { @@ -182,7 +192,8 @@ describe('schema-analysis', function () { 'db.coll', {}, {}, - dummyLogger + dummyLogger, + preferences ); expect(sampleSpy).to.have.been.calledWith( @@ -207,7 +218,8 @@ describe('schema-analysis', function () { 'db.coll', {}, {}, - dummyLogger + dummyLogger, + preferences ); expect(result).to.equal(undefined); @@ -235,7 +247,8 @@ describe('schema-analysis', function () { 'db.coll', {}, {}, - dummyLogger + dummyLogger, + preferences ); } catch (err: any) { expect(err.message).to.equal('should have been thrown'); diff --git a/packages/compass-schema/src/modules/schema-analysis.ts b/packages/compass-schema/src/modules/schema-analysis.ts index 5a9eae71218..6a1c3bc5012 100644 --- a/packages/compass-schema/src/modules/schema-analysis.ts +++ b/packages/compass-schema/src/modules/schema-analysis.ts @@ -8,9 +8,13 @@ import type { SchemaField, SchemaType, PrimitiveSchemaType, + SchemaParseOptions, } from 'mongodb-schema'; import type { DataService } from '../stores/store'; import type { Logger } from '@mongodb-js/compass-logging'; +import type { PreferencesAccess } from 'compass-preferences-model'; + +export const DISTINCT_FIELDS_ABORT_THRESHOLD = 1000; // hack for driver 3.6 not promoting error codes and // attributes from ejson when promoteValue is false. @@ -38,7 +42,8 @@ export const analyzeSchema = async ( } | undefined, aggregateOptions: AggregateOptions, - { log, mongoLogId, debug }: Logger + { log, mongoLogId, debug }: Logger, + preferences: PreferencesAccess ): Promise => { try { log.info(mongoLogId(1001000089), 'Schema', 'Starting schema analysis', { @@ -57,9 +62,17 @@ export const analyzeSchema = async ( fallbackReadPreference: 'secondaryPreferred', } ); - const schemaAccessor = await analyzeDocuments(docs, { - signal: abortSignal, - }); + const { enableExportSchema } = preferences.getPreferences(); + const schemaParseOptions: SchemaParseOptions = enableExportSchema + ? { + signal: abortSignal, + storedValuesLengthLimit: 100, + distinctFieldsAbortThreshold: DISTINCT_FIELDS_ABORT_THRESHOLD, + } + : { + signal: abortSignal, + }; + const schemaAccessor = await analyzeDocuments(docs, schemaParseOptions); log.info(mongoLogId(1001000090), 'Schema', 'Schema analysis completed', { ns, }); diff --git a/packages/compass-schema/src/stores/schema-analysis-reducer.ts b/packages/compass-schema/src/stores/schema-analysis-reducer.ts index a5bf0621256..564afc2d4f7 100644 --- a/packages/compass-schema/src/stores/schema-analysis-reducer.ts +++ b/packages/compass-schema/src/stores/schema-analysis-reducer.ts @@ -1,15 +1,13 @@ import type { Schema } from 'mongodb-schema'; import { isInternalFieldPath } from 'hadron-document'; import type { Action, Reducer } from 'redux'; -import type { AggregateOptions } from 'mongodb'; +import type { AggregateOptions, MongoError } from 'mongodb'; import type { QueryBarService } from '@mongodb-js/compass-query-bar'; import { type AnalysisState } from '../constants/analysis-states'; import { ANALYSIS_STATE_ANALYZING, ANALYSIS_STATE_COMPLETE, - ANALYSIS_STATE_ERROR, ANALYSIS_STATE_INITIAL, - ANALYSIS_STATE_TIMEOUT, } from '../constants/analysis-states'; import { addLayer, generateGeoQuery } from '../modules/geo'; import { @@ -27,10 +25,15 @@ const DEFAULT_SAMPLE_SIZE = 1000; const ERROR_CODE_MAX_TIME_MS_EXPIRED = 50; +export type SchemaAnalysisError = { + errorMessage: string; + errorType: 'timeout' | 'highComplexity' | 'general'; +}; + export type SchemaAnalysisState = { analysisState: AnalysisState; analysisStartTime?: number; - errorMessage: string; + error?: SchemaAnalysisError; schema: Schema | null; resultId: string; }; @@ -39,6 +42,7 @@ export const enum SchemaAnalysisActions { analysisStarted = 'schema-service/schema-analysis/analysisStarted', analysisFinished = 'schema-service/schema-analysis/analysisFinished', analysisFailed = 'schema-service/schema-analysis/analysisFailed', + analysisErrorDismissed = 'schema-service/schema-analysis/analysisErrorDismissed', } export type AnalysisStartedAction = { @@ -56,10 +60,14 @@ export type AnalysisFailedAction = { error: Error; }; +export type AnalysisErrorDismissedAction = { + type: SchemaAnalysisActions.analysisErrorDismissed; +}; + export const schemaAnalysisReducer: Reducer = ( state = getInitialState(), action -) => { +): SchemaAnalysisState => { if ( isAction( action, @@ -70,7 +78,7 @@ export const schemaAnalysisReducer: Reducer = ( ...state, analysisStartTime: action.analysisStartTime, analysisState: ANALYSIS_STATE_ANALYZING, - errorMessage: '', + error: undefined, schema: null, }; } @@ -96,27 +104,41 @@ export const schemaAnalysisReducer: Reducer = ( ) { return { ...state, - ...getErrorState(action.error), + error: getErrorDetails(action.error), + analysisState: ANALYSIS_STATE_INITIAL, resultId: resultId(), }; } + if ( + isAction( + action, + SchemaAnalysisActions.analysisErrorDismissed + ) + ) { + return { + ...state, + error: undefined, + }; + } + return state; }; -function getErrorState(err: Error & { code?: number }) { - const errorMessage = (err && err.message) || 'Unknown error'; - const errorCode = err && err.code; - - let analysisState: AnalysisState; - +function getErrorDetails(error: Error): SchemaAnalysisError { + const errorCode = (error as MongoError).code; + const errorMessage = error.message || 'Unknown error'; + let errorType: SchemaAnalysisError['errorType'] = 'general'; if (errorCode === ERROR_CODE_MAX_TIME_MS_EXPIRED) { - analysisState = ANALYSIS_STATE_TIMEOUT; - } else { - analysisState = ANALYSIS_STATE_ERROR; + errorType = 'timeout'; + } else if (error.message.includes('Schema analysis aborted: Fields count')) { + errorType = 'highComplexity'; } - return { analysisState, errorMessage }; + return { + errorType, + errorMessage, + }; } function resultId(): string { @@ -125,7 +147,6 @@ function resultId(): string { const getInitialState = (): SchemaAnalysisState => ({ analysisState: ANALYSIS_STATE_INITIAL, - errorMessage: '', schema: null, resultId: resultId(), }); @@ -144,6 +165,12 @@ export const geoLayerAdded = ( }; }; +export const analysisErrorDismissed = + (): SchemaThunkAction => { + return (dispatch) => + dispatch({ type: SchemaAnalysisActions.analysisErrorDismissed }); + }; + export const geoLayersEdited = ( field: string, layers: LayerGroup @@ -300,7 +327,8 @@ export const startAnalysis = (): SchemaThunkAction< namespace, samplingOptions, driverOptions, - logger + logger, + preferences ); if (abortSignal?.aborted) { throw new Error(abortSignal?.reason || new Error('Operation aborted')); diff --git a/packages/compass-schema/src/stores/store.spec.ts b/packages/compass-schema/src/stores/store.spec.ts index 22e29d2621c..0a954af2f17 100644 --- a/packages/compass-schema/src/stores/store.spec.ts +++ b/packages/compass-schema/src/stores/store.spec.ts @@ -100,7 +100,7 @@ describe('Schema Store', function () { }); it('defaults the error to empty', function () { - expect(store.getState().schemaAnalysis.errorMessage).to.equal(''); + expect(store.getState().schemaAnalysis.error).to.be.undefined; }); it('defaults the schema to null', function () { @@ -112,15 +112,10 @@ describe('Schema Store', function () { sampleStub.resolves([{ name: 'Hans' }, { name: 'Greta' }]); await store.dispatch(startAnalysis()); expect(sampleStub).to.have.been.called; - const { - analysisState, - errorMessage, - schema, - resultId, - analysisStartTime, - } = store.getState().schemaAnalysis; + const { analysisState, error, schema, resultId, analysisStartTime } = + store.getState().schemaAnalysis; expect(analysisState).to.equal('complete'); - expect(!!errorMessage).to.be.false; + expect(error).to.be.undefined; expect(analysisStartTime).to.not.be.undefined; expect(analysisStartTime).to.be.greaterThan(1000); expect(schema).not.to.be.null; @@ -136,7 +131,7 @@ describe('Schema Store', function () { store.dispatch(stopAnalysis()); isCancelErrorStub.returns(true); await analysisPromise; - expect(store.getState().schemaAnalysis.analysisState).to.equal('error'); + expect(store.getState().schemaAnalysis.analysisState).to.equal('initial'); }); describe('schema export', function () {