mongodb-client-encryption
Advanced tools
Comparing version 1.0.0-rc0 to 1.0.0-rc1.0
@@ -10,2 +10,3 @@ 'use strict'; | ||
const MongoClient = modules.mongodb.MongoClient; | ||
const MongoError = modules.mongodb.MongoError; | ||
const cryptoCallbacks = require('./cryptoCallbacks'); | ||
@@ -129,9 +130,20 @@ | ||
init(callback) { | ||
const _callback = (err, res) => { | ||
if (err && err.message && err.message.match(/timed out after/)) { | ||
callback( | ||
new MongoError( | ||
'Unable to connect to `mongocryptd`, please make sure it is running or in your PATH for auto-spawn' | ||
) | ||
); | ||
return; | ||
} | ||
callback(err, res); | ||
}; | ||
if (this._mongocryptdManager.bypassSpawn) { | ||
return this._mongocryptdClient.connect(callback); | ||
return this._mongocryptdClient.connect(_callback); | ||
} | ||
this._mongocryptdManager.spawn(() => { | ||
this._mongocryptdClient.connect(callback); | ||
}); | ||
this._mongocryptdManager.spawn(() => this._mongocryptdClient.connect(_callback)); | ||
} | ||
@@ -138,0 +150,0 @@ |
@@ -35,3 +35,7 @@ 'use strict'; | ||
} | ||
if (this.spawnArgs.indexOf('--idleShutdownTimeoutSecs') < 0) { | ||
if ( | ||
this.spawnArgs | ||
.filter(arg => typeof arg === 'string') | ||
.every(arg => arg.indexOf('--idleShutdownTimeoutSecs') < 0) | ||
) { | ||
this.spawnArgs.push('--idleShutdownTimeoutSecs', 60); | ||
@@ -38,0 +42,0 @@ } |
{ | ||
"name": "mongodb-client-encryption", | ||
"version": "1.0.0-rc0", | ||
"version": "1.0.0-rc1.0", | ||
"description": "Official client encryption module for the MongoDB Node.js driver", | ||
@@ -9,8 +9,2 @@ "main": "index.js", | ||
}, | ||
"files": [ | ||
"lib", | ||
"src", | ||
"etc", | ||
"binding.gyp" | ||
], | ||
"scripts": { | ||
@@ -24,2 +18,3 @@ "install": "prebuild-install --tag-prefix node-v || node-gyp rebuild", | ||
"rebuild": "prebuild --compile", | ||
"release": "standard-version --tag-prefix node-v --path bindings/node", | ||
"prebuild": "prebuild --strip --verbose --tag-prefix node-v --all" | ||
@@ -48,6 +43,7 @@ }, | ||
"prebuild": "^9.0.1", | ||
"prettier": "~1.18.2", | ||
"prettier": "^1.19.1", | ||
"segfault-handler": "^1.2.0", | ||
"sinon": "^4.3.0", | ||
"sinon-chai": "^3.3.0" | ||
"sinon-chai": "^3.3.0", | ||
"standard-version": "^5.0.0" | ||
}, | ||
@@ -54,0 +50,0 @@ "peerDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
124545
21
1052
16