@mongodb-js/compass-shell 2.22.0 → 2.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/1.js +98 -98
- package/lib/2.js +1 -1
- package/lib/index.js +175 -25
- package/package.json +13 -13
package/lib/2.js
CHANGED
|
@@ -21,7 +21,7 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
|
|
|
21
21
|
// EXTERNAL MODULE: ./node_modules/react-redux/es/index.js + 23 modules
|
|
22
22
|
var es = __webpack_require__(159);
|
|
23
23
|
|
|
24
|
-
// EXTERNAL MODULE: /Users/
|
|
24
|
+
// EXTERNAL MODULE: /Users/sergey.petushkov/Projects/MongoDB/compass4/node_modules/@mongosh/browser-repl/lib/mongosh-browser-repl.js
|
|
25
25
|
var mongosh_browser_repl = __webpack_require__(392);
|
|
26
26
|
|
|
27
27
|
// EXTERNAL MODULE: external "@mongodb-js/compass-components"
|
package/lib/index.js
CHANGED
|
@@ -8081,7 +8081,7 @@ module.exports.globalAppRegistryEmit = globalAppRegistryEmit;
|
|
|
8081
8081
|
/* 55 */
|
|
8082
8082
|
/***/ (function(module) {
|
|
8083
8083
|
|
|
8084
|
-
module.exports = JSON.parse("{\"name\":\"@mongodb-js/compass-shell\",\"productName\":\"Compass Shell plugin\",\"version\":\"2.
|
|
8084
|
+
module.exports = JSON.parse("{\"name\":\"@mongodb-js/compass-shell\",\"productName\":\"Compass Shell plugin\",\"version\":\"2.23.0\",\"apiVersion\":\"3.0.0\",\"description\":\"Compass Shell Plugin\",\"main\":\"lib/index.js\",\"compass:main\":\"src/index.js\",\"compass:exports\":{\".\":\"./src/index.js\"},\"scripts\":{\"prepublishOnly\":\"npm run compile\",\"clean\":\"rimraf lib\",\"precompile\":\"npm run clean\",\"compile\":\"cross-env NODE_ENV=production webpack --config ./config/webpack.prod.config.js\",\"compile:watch\":\"cross-env NODE_ENV=production webpack --config ./config/webpack.prod.config.js --watch\",\"start\":\"cross-env NODE_ENV=development webpack-dev-server --config ./config/webpack.dev.config.js\",\"start:watch\":\"npm run clean && webpack --config ./config/webpack.watch.config.js\",\"test\":\"cross-env NODE_ENV=test mocha-webpack \\\"./src/**/*.spec.js\\\"\",\"test-ci\":\"npm run test\",\"test-ci-electron\":\"echo \\\"TODO(COMPASS-5555): These tests are broken and disabled for now\\\"\",\"test-watch\":\"cross-env NODE_ENV=test mocha-webpack \\\"./src/**/*.spec.js\\\" --watch\",\"test-electron\":\"xvfb-maybe cross-env NODE_ENV=test karma start\",\"test-cov\":\"echo\",\"check\":\"npm run lint && npm run depcheck\",\"lint\":\"eslint \\\"./src/**/*.{js,jsx}\\\" \\\"./test/**/*.js\\\" \\\"./electron/**/*.js\\\" \\\"./config/**/*.{js,jsx}\\\"\",\"depcheck\":\"depcheck\",\"bootstrap\":\"npm run compile\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/mongodb-js/compass.git\"},\"config\":{\"unsafe-perm\":true},\"engines\":{\"node\":\">=14.17.5\"},\"license\":\"SSPL\",\"publishConfig\":{\"access\":\"public\"},\"dependencies\":{\"@leafygreen-ui/code\":\"^9.4.0\",\"@mongodb-js/compass-logging\":\"^0.11.0\",\"@mongodb-js/mongodb-redux-common\":\"^1.11.0\",\"@mongosh/browser-repl\":\"^1.2.3\",\"@mongosh/logging\":\"^1.2.3\",\"@mongosh/node-runtime-worker-thread\":\"^1.2.3\",\"@mongosh/service-provider-core\":\"^1.2.3\"},\"peerDependencies\":{\"@mongodb-js/compass-components\":\"^0.14.0\",\"ace-builds\":\"^1.4.3\",\"hadron-ipc\":\"^2.10.0\",\"hadron-react-components\":\"^5.14.0\",\"prop-types\":\"^15.7.2\",\"react\":\"^16.14.0\",\"react-ace\":\"^9.5.0\",\"react-dom\":\"^16.14.0\"},\"devDependencies\":{\"@babel/cli\":\"^7.14.3\",\"@babel/core\":\"^7.14.3\",\"@babel/plugin-proposal-decorators\":\"^7.14.2\",\"@babel/plugin-syntax-dynamic-import\":\"^7.8.3\",\"@babel/preset-env\":\"^7.14.2\",\"@babel/preset-react\":\"^7.13.13\",\"@babel/register\":\"^7.13.16\",\"@hot-loader/react-dom\":\"^16.9.0\",\"@mongodb-js/compass-components\":\"^0.14.0\",\"ace-builds\":\"^1.4.3\",\"autoprefixer\":\"^9.4.6\",\"babel-loader\":\"^8.2.2\",\"chai\":\"^4.2.0\",\"chai-enzyme\":\"1.0.0-beta.0\",\"core-js\":\"^3.12.1\",\"cross-env\":\"^5.0.1\",\"depcheck\":\"^1.4.1\",\"electron\":\"^13.5.1\",\"electron-devtools-installer\":\"^3.2.0\",\"enzyme\":\"^3.11.0\",\"enzyme-adapter-react-16\":\"^1.15.2\",\"eslint\":\"^7.25.0\",\"eslint-config-mongodb-js\":\"^5.0.3\",\"eslint-plugin-react\":\"^7.24.0\",\"file-loader\":\"^5.1.0\",\"font-awesome\":\"^4.7.0\",\"hadron-app\":\"^4.22.0\",\"hadron-app-registry\":\"^8.11.0\",\"html-webpack-plugin\":\"^3.2.0\",\"ignore-loader\":\"^0.1.2\",\"istanbul-instrumenter-loader\":\"^3.0.1\",\"jsdom\":\"^16.7.0\",\"jsdom-global\":\"^3.0.2\",\"karma\":\"^6.3.4\",\"karma-chai\":\"^0.1.0\",\"karma-chai-sinon\":\"^0.1.5\",\"karma-electron\":\"^7.0.0\",\"karma-mocha\":\"^1.3.0\",\"karma-mocha-reporter\":\"^2.2.5\",\"karma-sinon\":\"^1.0.5\",\"karma-sourcemap-loader\":\"^0.3.8\",\"karma-webpack\":\"^4.0.2\",\"mocha\":\"^5.2.0\",\"mocha-webpack\":\"^2.0.0-beta.0\",\"mongodb\":\"^4.4.0\",\"mongodb-reflux-store\":\"^0.0.1\",\"node-loader\":\"^0.6.0\",\"nyc\":\"^13.1.0\",\"peer-deps-externals-webpack-plugin\":\"^1.0.4\",\"prop-types\":\"^15.7.2\",\"react\":\"^16.14.0\",\"react-ace\":\"^9.5.0\",\"react-dom\":\"^16.14.0\",\"react-hot-loader\":\"^4.13.0\",\"react-redux\":\"^7.1.1\",\"react-tooltip\":\"^3.11.1\",\"redux\":\"^4.1.2\",\"reflux\":\"^0.4.1\",\"reflux-state-mixin\":\"github:mongodb-js/reflux-state-mixin\",\"resolve\":\"^1.15.1\",\"rimraf\":\"^2.6.1\",\"semver\":\"^5.4.1\",\"shebang-loader\":\"^0.0.1\",\"sinon\":\"^7.2.5\",\"sinon-chai\":\"^3.3.0\",\"url-loader\":\"^3.0.0\",\"webpack\":\"^4.46.0\",\"webpack-bundle-analyzer\":\"^3.0.3\",\"webpack-cli\":\"^3.3.12\",\"webpack-dev-server\":\"^3.11.2\",\"webpack-merge\":\"^4.2.2\",\"webpack-node-externals\":\"^3.0.0\"},\"homepage\":\"https://github.com/mongodb-js/compass\",\"bugs\":{\"url\":\"https://jira.mongodb.org/projects/COMPASS/issues\",\"email\":\"compass@mongodb.com\"},\"gitHead\":\"2c4149184e87b8340851590663287b914d7ee63e\"}");
|
|
8085
8085
|
|
|
8086
8086
|
/***/ }),
|
|
8087
8087
|
/* 56 */
|
|
@@ -49518,13 +49518,13 @@ function Provider(_ref) {
|
|
|
49518
49518
|
if (false) {}
|
|
49519
49519
|
|
|
49520
49520
|
/* harmony default export */ var components_Provider = (Provider);
|
|
49521
|
-
// EXTERNAL MODULE: /Users/
|
|
49521
|
+
// EXTERNAL MODULE: /Users/sergey.petushkov/Projects/MongoDB/compass4/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
49522
49522
|
var esm_extends = __webpack_require__(17);
|
|
49523
49523
|
|
|
49524
|
-
// EXTERNAL MODULE: /Users/
|
|
49524
|
+
// EXTERNAL MODULE: /Users/sergey.petushkov/Projects/MongoDB/compass4/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
|
49525
49525
|
var objectWithoutPropertiesLoose = __webpack_require__(24);
|
|
49526
49526
|
|
|
49527
|
-
// EXTERNAL MODULE: /Users/
|
|
49527
|
+
// EXTERNAL MODULE: /Users/sergey.petushkov/Projects/MongoDB/compass4/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
|
|
49528
49528
|
var hoist_non_react_statics_cjs = __webpack_require__(56);
|
|
49529
49529
|
var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
|
|
49530
49530
|
|
|
@@ -52805,7 +52805,7 @@ class MongoAutoencryptionUnavailable extends Error {
|
|
|
52805
52805
|
}
|
|
52806
52806
|
exports.MongoAutoencryptionUnavailable = MongoAutoencryptionUnavailable;
|
|
52807
52807
|
async function connectWithFailFast(uri, client, logger) {
|
|
52808
|
-
var _a;
|
|
52808
|
+
var _a, _b;
|
|
52809
52809
|
const failedConnections = new Map();
|
|
52810
52810
|
let failEarlyClosePromise = null;
|
|
52811
52811
|
logger.emit('devtools-connect:connect-attempt-initialized', {
|
|
@@ -52856,7 +52856,9 @@ async function connectWithFailFast(uri, client, logger) {
|
|
|
52856
52856
|
finally {
|
|
52857
52857
|
client.removeListener('serverHeartbeatFailed', heartbeatFailureListener);
|
|
52858
52858
|
client.removeListener('serverHeartbeatSucceeded', heartbeatSucceededListener);
|
|
52859
|
-
logger.emit('devtools-connect:connect-attempt-finished'
|
|
52859
|
+
logger.emit('devtools-connect:connect-attempt-finished', {
|
|
52860
|
+
csfleVersionInfo: (_b = client === null || client === void 0 ? void 0 : client.autoEncrypter) === null || _b === void 0 ? void 0 : _b.csfleVersionInfo
|
|
52861
|
+
});
|
|
52860
52862
|
}
|
|
52861
52863
|
}
|
|
52862
52864
|
let resolveDnsHelpers;
|
|
@@ -52956,8 +52958,8 @@ async function connectMongoClient(uri, clientOptions, logger, MongoClientClass)
|
|
|
52956
52958
|
...clientOptions,
|
|
52957
52959
|
ca: ca.join('\n')
|
|
52958
52960
|
};
|
|
52959
|
-
delete clientOptions.useSystemCA;
|
|
52960
52961
|
}
|
|
52962
|
+
delete clientOptions.useSystemCA;
|
|
52961
52963
|
if (clientOptions.autoEncryption !== undefined &&
|
|
52962
52964
|
!clientOptions.autoEncryption.bypassAutoEncryption) {
|
|
52963
52965
|
const optionsWithoutFLE = { ...clientOptions };
|
|
@@ -52975,6 +52977,9 @@ async function connectMongoClient(uri, clientOptions, logger, MongoClientClass)
|
|
|
52975
52977
|
uri = await resolveMongodbSrv(uri, logger);
|
|
52976
52978
|
const client = new MongoClientClass(uri, clientOptions);
|
|
52977
52979
|
await connectWithFailFast(uri, client, logger);
|
|
52980
|
+
if (client.autoEncrypter) {
|
|
52981
|
+
client.autoEncrypter[Symbol.for('@@mdb.decorateDecryptionResult')] = true;
|
|
52982
|
+
}
|
|
52978
52983
|
return client;
|
|
52979
52984
|
}
|
|
52980
52985
|
exports.connectMongoClient = connectMongoClient;
|
|
@@ -53329,7 +53334,7 @@ module.exports = require("worker_threads");
|
|
|
53329
53334
|
/* 200 */
|
|
53330
53335
|
/***/ (function(module) {
|
|
53331
53336
|
|
|
53332
|
-
module.exports = JSON.parse("{\"name\":\"@mongodb-js/devtools-connect\",\"version\":\"1.
|
|
53337
|
+
module.exports = JSON.parse("{\"name\":\"@mongodb-js/devtools-connect\",\"version\":\"1.3.1\",\"description\":\"A connection establishment utility for MongoDB developer tools\",\"homepage\":\"https://github.com/mongodb-js/devtools-connect\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/mongodb-js/devtools-connect.git\"},\"publishConfig\":{\"access\":\"public\"},\"bugs\":{\"url\":\"https://github.com/mongodb-js/devtools-connect/issues\"},\"main\":\"lib/index.js\",\"exports\":{\"require\":\"./lib/index.js\",\"import\":\"./.esm-wrapper.mjs\"},\"files\":[\"LICENSE\",\"lib\",\"package.json\",\"README.md\",\".esm-wrapper.mjs\"],\"scripts\":{\"lint\":\"eslint src/**/*.ts\",\"testonly\":\"nyc mocha --colors -r ts-node/register src/*.spec.ts\",\"test\":\"npm run lint && npm run build && npm run testonly\",\"build\":\"npm run compile-ts && gen-esm-wrapper . ./.esm-wrapper.mjs\",\"prepack\":\"npm run build\",\"compile-ts\":\"tsc -p tsconfig.json\"},\"license\":\"Apache-2.0\",\"dependencies\":{\"system-ca\":\"^1.0.2\"},\"peerDependencies\":{\"mongodb\":\"^4.2.2\",\"mongodb-log-writer\":\"^1.1.3\"},\"devDependencies\":{\"@types/mocha\":\"^9.0.0\",\"@types/node\":\"^16.4.10\",\"@types/sinon\":\"^10.0.2\",\"@typescript-eslint/eslint-plugin\":\"^4.2.0\",\"@typescript-eslint/parser\":\"^4.2.0\",\"chai\":\"^4.3.4\",\"eslint\":\"^7.9.0\",\"eslint-config-semistandard\":\"^16.0.0\",\"eslint-config-standard\":\"^16.0.3\",\"eslint-plugin-import\":\"^2.22.0\",\"eslint-plugin-node\":\"^11.1.0\",\"eslint-plugin-promise\":\"5.1.x\",\"eslint-plugin-standard\":\"^5.0.0\",\"gen-esm-wrapper\":\"^1.1.0\",\"mocha\":\"^9.1.1\",\"mongodb\":\"^4.2.2\",\"mongodb-connection-string-url\":\"^2.3.2\",\"mongodb-log-writer\":\"^1.1.3\",\"nyc\":\"^15.1.0\",\"sinon-chai\":\"^3.7.0\",\"ts-node\":\"^10.2.1\",\"ts-sinon\":\"^2.0.1\",\"typescript\":\"^4.5.4\"},\"optionalDependencies\":{\"os-dns-native\":\"^1.2.0\",\"resolve-mongodb-srv\":\"^1.1.1\"}}");
|
|
53333
53338
|
|
|
53334
53339
|
/***/ }),
|
|
53335
53340
|
/* 201 */
|
|
@@ -66926,6 +66931,7 @@ module.exports = function (modules) {
|
|
|
66926
66931
|
const MONGOCRYPT_CTX_NEED_MONGO_COLLINFO = 1;
|
|
66927
66932
|
const MONGOCRYPT_CTX_NEED_MONGO_MARKINGS = 2;
|
|
66928
66933
|
const MONGOCRYPT_CTX_NEED_MONGO_KEYS = 3;
|
|
66934
|
+
const MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS = 7;
|
|
66929
66935
|
const MONGOCRYPT_CTX_NEED_KMS = 4;
|
|
66930
66936
|
const MONGOCRYPT_CTX_READY = 5;
|
|
66931
66937
|
const MONGOCRYPT_CTX_DONE = 6;
|
|
@@ -66937,6 +66943,7 @@ module.exports = function (modules) {
|
|
|
66937
66943
|
[MONGOCRYPT_CTX_NEED_MONGO_COLLINFO, 'MONGOCRYPT_CTX_NEED_MONGO_COLLINFO'],
|
|
66938
66944
|
[MONGOCRYPT_CTX_NEED_MONGO_MARKINGS, 'MONGOCRYPT_CTX_NEED_MONGO_MARKINGS'],
|
|
66939
66945
|
[MONGOCRYPT_CTX_NEED_MONGO_KEYS, 'MONGOCRYPT_CTX_NEED_MONGO_KEYS'],
|
|
66946
|
+
[MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS, 'MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS'],
|
|
66940
66947
|
[MONGOCRYPT_CTX_NEED_KMS, 'MONGOCRYPT_CTX_NEED_KMS'],
|
|
66941
66948
|
[MONGOCRYPT_CTX_READY, 'MONGOCRYPT_CTX_READY'],
|
|
66942
66949
|
[MONGOCRYPT_CTX_DONE, 'MONGOCRYPT_CTX_DONE']
|
|
@@ -67078,6 +67085,22 @@ module.exports = function (modules) {
|
|
|
67078
67085
|
return;
|
|
67079
67086
|
}
|
|
67080
67087
|
|
|
67088
|
+
case MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS: {
|
|
67089
|
+
autoEncrypter
|
|
67090
|
+
.askForKMSCredentials()
|
|
67091
|
+
.then(kmsProviders => {
|
|
67092
|
+
context.provideKMSProviders(
|
|
67093
|
+
!Buffer.isBuffer(kmsProviders) ? bson.serialize(kmsProviders) : kmsProviders
|
|
67094
|
+
);
|
|
67095
|
+
this.execute(autoEncrypter, context, callback);
|
|
67096
|
+
})
|
|
67097
|
+
.catch(err => {
|
|
67098
|
+
callback(err, null);
|
|
67099
|
+
});
|
|
67100
|
+
|
|
67101
|
+
return;
|
|
67102
|
+
}
|
|
67103
|
+
|
|
67081
67104
|
case MONGOCRYPT_CTX_NEED_KMS: {
|
|
67082
67105
|
const promises = [];
|
|
67083
67106
|
|
|
@@ -67583,20 +67606,13 @@ module.exports = function (modules) {
|
|
|
67583
67606
|
this._client = client;
|
|
67584
67607
|
this._bson = options.bson || client.topology.bson;
|
|
67585
67608
|
this._bypassEncryption = options.bypassAutoEncryption === true;
|
|
67586
|
-
if (!this._bypassAutoEncryption) {
|
|
67587
|
-
this._mongocryptdManager = new MongocryptdManager(options.extraOptions);
|
|
67588
|
-
this._mongocryptdClient = new MongoClient(this._mongocryptdManager.uri, {
|
|
67589
|
-
useNewUrlParser: true,
|
|
67590
|
-
useUnifiedTopology: true,
|
|
67591
|
-
serverSelectionTimeoutMS: 10000
|
|
67592
|
-
});
|
|
67593
|
-
}
|
|
67594
67609
|
|
|
67595
67610
|
this._keyVaultNamespace = options.keyVaultNamespace || 'admin.datakeys';
|
|
67596
67611
|
this._keyVaultClient = options.keyVaultClient || client;
|
|
67597
67612
|
this._metaDataClient = options.metadataClient || client;
|
|
67598
67613
|
this._proxyOptions = options.proxyOptions || {};
|
|
67599
67614
|
this._tlsOptions = options.tlsOptions || {};
|
|
67615
|
+
this._onKmsProviderRefresh = options.onKmsProviderRefresh;
|
|
67600
67616
|
|
|
67601
67617
|
const mongoCryptOptions = {};
|
|
67602
67618
|
if (options.schemaMap) {
|
|
@@ -67605,19 +67621,57 @@ module.exports = function (modules) {
|
|
|
67605
67621
|
: this._bson.serialize(options.schemaMap);
|
|
67606
67622
|
}
|
|
67607
67623
|
|
|
67624
|
+
if (options.encryptedFieldsMap) {
|
|
67625
|
+
mongoCryptOptions.encryptedFieldsMap = Buffer.isBuffer(options.encryptedFieldsMap)
|
|
67626
|
+
? options.encryptedFieldsMap
|
|
67627
|
+
: this._bson.serialize(options.encryptedFieldsMap);
|
|
67628
|
+
}
|
|
67629
|
+
|
|
67608
67630
|
if (options.kmsProviders) {
|
|
67609
67631
|
mongoCryptOptions.kmsProviders = !Buffer.isBuffer(options.kmsProviders)
|
|
67610
67632
|
? this._bson.serialize(options.kmsProviders)
|
|
67611
67633
|
: options.kmsProviders;
|
|
67634
|
+
} else if (!options.onKmsProviderRefresh) {
|
|
67635
|
+
throw new TypeError('Need to specify either kmsProviders ahead of time or when requested');
|
|
67612
67636
|
}
|
|
67613
67637
|
|
|
67614
67638
|
if (options.logger) {
|
|
67615
67639
|
mongoCryptOptions.logger = options.logger;
|
|
67616
67640
|
}
|
|
67617
67641
|
|
|
67642
|
+
if (options.extraOptions && options.extraOptions.csflePath) {
|
|
67643
|
+
mongoCryptOptions.csflePath = options.extraOptions.csflePath;
|
|
67644
|
+
}
|
|
67645
|
+
|
|
67646
|
+
if (options.extraOptions && options.extraOptions.csfleSearchPaths) {
|
|
67647
|
+
// Only for driver testing
|
|
67648
|
+
mongoCryptOptions.csfleSearchPaths = options.extraOptions.csfleSearchPaths;
|
|
67649
|
+
} else if (!this._bypassEncryption) {
|
|
67650
|
+
mongoCryptOptions.csfleSearchPaths = ['$SYSTEM'];
|
|
67651
|
+
}
|
|
67652
|
+
|
|
67653
|
+
if (options.bypassQueryAnalysis) {
|
|
67654
|
+
mongoCryptOptions.bypassQueryAnalysis = options.bypassQueryAnalysis;
|
|
67655
|
+
}
|
|
67656
|
+
|
|
67618
67657
|
Object.assign(mongoCryptOptions, { cryptoCallbacks });
|
|
67619
67658
|
this._mongocrypt = new mc.MongoCrypt(mongoCryptOptions);
|
|
67620
67659
|
this._contextCounter = 0;
|
|
67660
|
+
|
|
67661
|
+
if (options.extraOptions && options.extraOptions.csfleRequired && !this.csfleVersionInfo) {
|
|
67662
|
+
throw new MongoError('`csfleRequired` set but no csfle shared library loaded');
|
|
67663
|
+
}
|
|
67664
|
+
|
|
67665
|
+
// Only instantiate mongocryptd manager/client once we know for sure
|
|
67666
|
+
// that we are not using the CSFLE shared library.
|
|
67667
|
+
if (!this._bypassEncryption && !this.csfleVersionInfo) {
|
|
67668
|
+
this._mongocryptdManager = new MongocryptdManager(options.extraOptions);
|
|
67669
|
+
this._mongocryptdClient = new MongoClient(this._mongocryptdManager.uri, {
|
|
67670
|
+
useNewUrlParser: true,
|
|
67671
|
+
useUnifiedTopology: true,
|
|
67672
|
+
serverSelectionTimeoutMS: 10000
|
|
67673
|
+
});
|
|
67674
|
+
}
|
|
67621
67675
|
}
|
|
67622
67676
|
|
|
67623
67677
|
/**
|
|
@@ -67625,7 +67679,7 @@ module.exports = function (modules) {
|
|
|
67625
67679
|
* @param {Function} callback Invoked when the mongocryptd client either successfully connects or errors
|
|
67626
67680
|
*/
|
|
67627
67681
|
init(callback) {
|
|
67628
|
-
if (this._bypassEncryption) {
|
|
67682
|
+
if (this._bypassEncryption || this.csfleVersionInfo) {
|
|
67629
67683
|
return callback();
|
|
67630
67684
|
}
|
|
67631
67685
|
const _callback = (err, res) => {
|
|
@@ -67657,7 +67711,11 @@ module.exports = function (modules) {
|
|
|
67657
67711
|
* @param {Function} callback Invoked when the mongocryptd client either successfully disconnects or errors
|
|
67658
67712
|
*/
|
|
67659
67713
|
teardown(force, callback) {
|
|
67660
|
-
this._mongocryptdClient
|
|
67714
|
+
if (this._mongocryptdClient) {
|
|
67715
|
+
this._mongocryptdClient.close(force, callback);
|
|
67716
|
+
} else {
|
|
67717
|
+
callback();
|
|
67718
|
+
}
|
|
67661
67719
|
}
|
|
67662
67720
|
|
|
67663
67721
|
/**
|
|
@@ -67746,13 +67804,82 @@ module.exports = function (modules) {
|
|
|
67746
67804
|
proxyOptions: this._proxyOptions,
|
|
67747
67805
|
tlsOptions: this._tlsOptions
|
|
67748
67806
|
});
|
|
67749
|
-
|
|
67807
|
+
|
|
67808
|
+
const decorateResult = this[Symbol.for('@@mdb.decorateDecryptionResult')];
|
|
67809
|
+
stateMachine.execute(this, context, function (err, result) {
|
|
67810
|
+
// Only for testing/internal usage
|
|
67811
|
+
if (!err && result && decorateResult) {
|
|
67812
|
+
err = decorateDecryptionResult(result, response, bson);
|
|
67813
|
+
if (err) return callback(err);
|
|
67814
|
+
}
|
|
67815
|
+
callback(err, result);
|
|
67816
|
+
});
|
|
67817
|
+
}
|
|
67818
|
+
|
|
67819
|
+
/**
|
|
67820
|
+
* Ask the user for KMS credentials.
|
|
67821
|
+
*
|
|
67822
|
+
* This returns anything that looks like the kmsProviders original input
|
|
67823
|
+
* option. It can be empty, and any provider specified here will override
|
|
67824
|
+
* the original ones.
|
|
67825
|
+
*/
|
|
67826
|
+
async askForKMSCredentials() {
|
|
67827
|
+
return this._onKmsProviderRefresh ? this._onKmsProviderRefresh() : {};
|
|
67828
|
+
}
|
|
67829
|
+
|
|
67830
|
+
/**
|
|
67831
|
+
* Return the current libmongocrypt's CSFLE shared library version
|
|
67832
|
+
* as `{ version: bigint, versionStr: string }`, or `null` if no CSFLE
|
|
67833
|
+
* shared library was loaded.
|
|
67834
|
+
*/
|
|
67835
|
+
get csfleVersionInfo() {
|
|
67836
|
+
return this._mongocrypt.csfleVersionInfo;
|
|
67750
67837
|
}
|
|
67751
67838
|
}
|
|
67752
67839
|
|
|
67753
67840
|
return { AutoEncrypter };
|
|
67754
67841
|
};
|
|
67755
67842
|
|
|
67843
|
+
/**
|
|
67844
|
+
* Recurse through the (identically-shaped) `decrypted` and `original`
|
|
67845
|
+
* objects and attach a `decryptedKeys` property on each sub-object that
|
|
67846
|
+
* contained encrypted fields. Because we only call this on BSON responses,
|
|
67847
|
+
* we do not need to worry about circular references.
|
|
67848
|
+
*/
|
|
67849
|
+
function decorateDecryptionResult(decrypted, original, bson, isTopLevelDecorateCall = true) {
|
|
67850
|
+
const decryptedKeys = Symbol.for('@@mdb.decryptedKeys');
|
|
67851
|
+
if (isTopLevelDecorateCall) {
|
|
67852
|
+
// The original value could have been either a JS object or a BSON buffer
|
|
67853
|
+
if (Buffer.isBuffer(original)) {
|
|
67854
|
+
original = bson.deserialize(original);
|
|
67855
|
+
}
|
|
67856
|
+
if (Buffer.isBuffer(decrypted)) {
|
|
67857
|
+
return new Error('Expected result of decryption to be deserialized BSON object');
|
|
67858
|
+
}
|
|
67859
|
+
}
|
|
67860
|
+
|
|
67861
|
+
if (!decrypted || typeof decrypted !== 'object') return;
|
|
67862
|
+
for (const k of Object.keys(decrypted)) {
|
|
67863
|
+
const originalValue = original[k];
|
|
67864
|
+
|
|
67865
|
+
// An object was decrypted by libmongocrypt if and only if it was
|
|
67866
|
+
// a BSON Binary object with subtype 6.
|
|
67867
|
+
if (originalValue && originalValue._bsontype === 'Binary' && originalValue.sub_type === 6) {
|
|
67868
|
+
if (!decrypted[decryptedKeys]) {
|
|
67869
|
+
Object.defineProperty(decrypted, decryptedKeys, {
|
|
67870
|
+
value: [],
|
|
67871
|
+
configurable: true,
|
|
67872
|
+
enumerable: false,
|
|
67873
|
+
writable: false
|
|
67874
|
+
});
|
|
67875
|
+
}
|
|
67876
|
+
decrypted[decryptedKeys].push(k);
|
|
67877
|
+
}
|
|
67878
|
+
|
|
67879
|
+
decorateDecryptionResult(decrypted[k], originalValue, bson, false);
|
|
67880
|
+
}
|
|
67881
|
+
}
|
|
67882
|
+
|
|
67756
67883
|
|
|
67757
67884
|
/***/ }),
|
|
67758
67885
|
/* 362 */
|
|
@@ -67921,8 +68048,11 @@ module.exports = function (modules) {
|
|
|
67921
68048
|
// kmsProviders will be parsed by libmongocrypt, must be provided as BSON binary data
|
|
67922
68049
|
if (options.kmsProviders && !Buffer.isBuffer(options.kmsProviders)) {
|
|
67923
68050
|
options.kmsProviders = this._bson.serialize(options.kmsProviders);
|
|
68051
|
+
} else if (!options.onKmsProviderRefresh) {
|
|
68052
|
+
throw new TypeError('Need to specify either kmsProviders ahead of time or when requested');
|
|
67924
68053
|
}
|
|
67925
68054
|
|
|
68055
|
+
this._onKmsProviderRefresh = options.onKmsProviderRefresh;
|
|
67926
68056
|
this._keyVaultNamespace = options.keyVaultNamespace;
|
|
67927
68057
|
this._keyVaultClient = options.keyVaultClient || client;
|
|
67928
68058
|
this._mongoCrypt = new mc.MongoCrypt(options);
|
|
@@ -68206,6 +68336,17 @@ module.exports = function (modules) {
|
|
|
68206
68336
|
});
|
|
68207
68337
|
});
|
|
68208
68338
|
}
|
|
68339
|
+
|
|
68340
|
+
/**
|
|
68341
|
+
* Ask the user for KMS credentials.
|
|
68342
|
+
*
|
|
68343
|
+
* This returns anything that looks like the kmsProviders original input
|
|
68344
|
+
* option. It can be empty, and any provider specified here will override
|
|
68345
|
+
* the original ones.
|
|
68346
|
+
*/
|
|
68347
|
+
async askForKMSCredentials() {
|
|
68348
|
+
return this._onKmsProviderRefresh ? this._onKmsProviderRefresh() : {};
|
|
68349
|
+
}
|
|
68209
68350
|
}
|
|
68210
68351
|
|
|
68211
68352
|
return { ClientEncryption };
|
|
@@ -68241,8 +68382,17 @@ function hookLogger(emitter, log, contextPrefix, redactURICredentials) {
|
|
|
68241
68382
|
emitter.on('devtools-connect:connect-fail-early', function () {
|
|
68242
68383
|
log.warn('DEVTOOLS-CONNECT', mongoLogId(1000000036), `${contextPrefix}-connect`, 'Aborting connection attempt as irrecoverable');
|
|
68243
68384
|
});
|
|
68244
|
-
emitter.on('devtools-connect:connect-attempt-finished', function () {
|
|
68245
|
-
|
|
68385
|
+
emitter.on('devtools-connect:connect-attempt-finished', function (ev) {
|
|
68386
|
+
let attr;
|
|
68387
|
+
if (ev.csfleVersionInfo) {
|
|
68388
|
+
attr = {
|
|
68389
|
+
csfleVersionInfo: {
|
|
68390
|
+
version: ev.csfleVersionInfo.version.toString(16),
|
|
68391
|
+
versionStr: ev.csfleVersionInfo.versionStr
|
|
68392
|
+
}
|
|
68393
|
+
};
|
|
68394
|
+
}
|
|
68395
|
+
log.info('DEVTOOLS-CONNECT', mongoLogId(1000000037), `${contextPrefix}-connect`, 'Connection attempt finished', attr);
|
|
68246
68396
|
});
|
|
68247
68397
|
emitter.on('devtools-connect:resolve-srv-error', function (ev) {
|
|
68248
68398
|
var _a;
|
|
@@ -69104,7 +69254,7 @@ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_)
|
|
|
69104
69254
|
// EXTERNAL MODULE: ./node_modules/react-redux/es/index.js + 23 modules
|
|
69105
69255
|
var es = __webpack_require__(159);
|
|
69106
69256
|
|
|
69107
|
-
// CONCATENATED MODULE: /Users/
|
|
69257
|
+
// CONCATENATED MODULE: /Users/sergey.petushkov/Projects/MongoDB/compass4/node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
69108
69258
|
function _defineProperty(obj, key, value) {
|
|
69109
69259
|
if (key in obj) {
|
|
69110
69260
|
Object.defineProperty(obj, key, {
|
|
@@ -69119,7 +69269,7 @@ function _defineProperty(obj, key, value) {
|
|
|
69119
69269
|
|
|
69120
69270
|
return obj;
|
|
69121
69271
|
}
|
|
69122
|
-
// CONCATENATED MODULE: /Users/
|
|
69272
|
+
// CONCATENATED MODULE: /Users/sergey.petushkov/Projects/MongoDB/compass4/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
|
|
69123
69273
|
|
|
69124
69274
|
|
|
69125
69275
|
function ownKeys(object, enumerableOnly) {
|
|
@@ -69147,7 +69297,7 @@ function _objectSpread2(target) {
|
|
|
69147
69297
|
|
|
69148
69298
|
return target;
|
|
69149
69299
|
}
|
|
69150
|
-
// CONCATENATED MODULE: /Users/
|
|
69300
|
+
// CONCATENATED MODULE: /Users/sergey.petushkov/Projects/MongoDB/compass4/node_modules/redux/es/redux.js
|
|
69151
69301
|
|
|
69152
69302
|
|
|
69153
69303
|
/**
|
|
@@ -69948,7 +70098,7 @@ const modules_reducer = combineReducers({
|
|
|
69948
70098
|
runtime: reducer
|
|
69949
70099
|
});
|
|
69950
70100
|
/* harmony default export */ var modules = (modules_reducer);
|
|
69951
|
-
// EXTERNAL MODULE: /Users/
|
|
70101
|
+
// EXTERNAL MODULE: /Users/sergey.petushkov/Projects/MongoDB/compass4/node_modules/@mongosh/logging/lib/index.js
|
|
69952
70102
|
var lib = __webpack_require__(161);
|
|
69953
70103
|
|
|
69954
70104
|
// EXTERNAL MODULE: ../compass-logging/dist/index.js
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mongodb-js/compass-shell",
|
|
3
3
|
"productName": "Compass Shell plugin",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.23.0",
|
|
5
5
|
"apiVersion": "3.0.0",
|
|
6
6
|
"description": "Compass Shell Plugin",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
8
|
+
"compass:main": "src/index.js",
|
|
9
|
+
"compass:exports": {
|
|
10
|
+
".": "./src/index.js"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
13
|
"prepublishOnly": "npm run compile",
|
|
@@ -44,18 +44,18 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@leafygreen-ui/code": "^9.4.0",
|
|
47
|
-
"@mongodb-js/compass-logging": "^0.
|
|
48
|
-
"@mongodb-js/mongodb-redux-common": "^1.
|
|
47
|
+
"@mongodb-js/compass-logging": "^0.11.0",
|
|
48
|
+
"@mongodb-js/mongodb-redux-common": "^1.11.0",
|
|
49
49
|
"@mongosh/browser-repl": "^1.2.3",
|
|
50
50
|
"@mongosh/logging": "^1.2.3",
|
|
51
51
|
"@mongosh/node-runtime-worker-thread": "^1.2.3",
|
|
52
52
|
"@mongosh/service-provider-core": "^1.2.3"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@mongodb-js/compass-components": "^0.
|
|
55
|
+
"@mongodb-js/compass-components": "^0.14.0",
|
|
56
56
|
"ace-builds": "^1.4.3",
|
|
57
|
-
"hadron-ipc": "^2.
|
|
58
|
-
"hadron-react-components": "^5.
|
|
57
|
+
"hadron-ipc": "^2.10.0",
|
|
58
|
+
"hadron-react-components": "^5.14.0",
|
|
59
59
|
"prop-types": "^15.7.2",
|
|
60
60
|
"react": "^16.14.0",
|
|
61
61
|
"react-ace": "^9.5.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@babel/preset-react": "^7.13.13",
|
|
71
71
|
"@babel/register": "^7.13.16",
|
|
72
72
|
"@hot-loader/react-dom": "^16.9.0",
|
|
73
|
-
"@mongodb-js/compass-components": "^0.
|
|
73
|
+
"@mongodb-js/compass-components": "^0.14.0",
|
|
74
74
|
"ace-builds": "^1.4.3",
|
|
75
75
|
"autoprefixer": "^9.4.6",
|
|
76
76
|
"babel-loader": "^8.2.2",
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
"eslint-plugin-react": "^7.24.0",
|
|
89
89
|
"file-loader": "^5.1.0",
|
|
90
90
|
"font-awesome": "^4.7.0",
|
|
91
|
-
"hadron-app": "^4.
|
|
92
|
-
"hadron-app-registry": "^8.
|
|
91
|
+
"hadron-app": "^4.22.0",
|
|
92
|
+
"hadron-app-registry": "^8.11.0",
|
|
93
93
|
"html-webpack-plugin": "^3.2.0",
|
|
94
94
|
"ignore-loader": "^0.1.2",
|
|
95
95
|
"istanbul-instrumenter-loader": "^3.0.1",
|
|
@@ -140,5 +140,5 @@
|
|
|
140
140
|
"url": "https://jira.mongodb.org/projects/COMPASS/issues",
|
|
141
141
|
"email": "compass@mongodb.com"
|
|
142
142
|
},
|
|
143
|
-
"gitHead": "
|
|
143
|
+
"gitHead": "2c4149184e87b8340851590663287b914d7ee63e"
|
|
144
144
|
}
|