Update Node_modules

This commit is contained in:
2019-07-02 16:05:15 +02:00
parent 95a0ff3913
commit 9dab5e2dbc
3495 changed files with 39728 additions and 465154 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ var legalOptionNames = [
* @param {number} [options.acceptableLatencyMS=15] Cutoff latency point in MS for MongoS proxy selection
* @param {boolean} [options.ssl=false] Use ssl connection (needs to have a mongod server with ssl support)
* @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
* @param {boolean} [options.sslValidate=true] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
* @param {boolean} [options.sslValidate=false] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
* @param {array} [options.sslCA] Array of valid certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)
* @param {array} [options.sslCRL] Array of revocation certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)
* @param {string} [options.ciphers] Passed directly through to tls.createSecureContext. See https://nodejs.org/dist/latest-v9.x/docs/api/tls.html#tls_tls_createsecurecontext_options for more info.
+52
View File
@@ -0,0 +1,52 @@
'use strict';
const Topology = require('mongodb-core').Topology;
const ServerCapabilities = require('./topology_base').ServerCapabilities;
const Cursor = require('../cursor');
const translateOptions = require('../utils').translateOptions;
class NativeTopology extends Topology {
constructor(servers, options) {
options = options || {};
let clonedOptions = Object.assign(
{},
{
cursorFactory: Cursor,
reconnect: false,
emitError: typeof options.emitError === 'boolean' ? options.emitError : true,
size: typeof options.poolSize === 'number' ? options.poolSize : 5,
monitorCommands:
typeof options.monitorCommands === 'boolean' ? options.monitorCommands : false
}
);
// Translate any SSL options and other connectivity options
clonedOptions = translateOptions(clonedOptions, options);
// Socket options
var socketOptions =
options.socketOptions && Object.keys(options.socketOptions).length > 0
? options.socketOptions
: options;
// Translate all the options to the mongodb-core ones
clonedOptions = translateOptions(clonedOptions, socketOptions);
super(servers, clonedOptions);
// Do we have an application specific string
if (options.appname) {
this.s.clientInfo.application = { name: options.appname };
}
}
capabilities() {
if (this.s.sCapabilities) return this.s.sCapabilities;
if (this.lastIsMaster() == null) return null;
this.s.sCapabilities = new ServerCapabilities(this.lastIsMaster());
return this.s.sCapabilities;
}
}
module.exports = NativeTopology;
+3 -4
View File
@@ -80,7 +80,7 @@ var legalOptionNames = [
* @param {number} [options.poolSize=5] Number of connections in the connection pool for each server instance, set to 5 as default for legacy reasons.
* @param {boolean} [options.ssl=false] Use ssl connection (needs to have a mongod server with ssl support)
* @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
* @param {boolean} [options.sslValidate=true] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
* @param {boolean} [options.sslValidate=false] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
* @param {array} [options.sslCA] Array of valid certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)
* @param {array} [options.sslCRL] Array of revocation certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)
* @param {(Buffer|string)} [options.sslCert] String or buffer containing the certificate we wish to present (needs to have a mongod server with ssl support, 2.4 or higher.
@@ -381,10 +381,9 @@ class ReplSet extends TopologyBase {
self.s.coreTopology.connect(_options);
}
close(forceClosed) {
super.close(forceClosed);
close(forceClosed, callback) {
['timeout', 'error', 'close', 'joined', 'left'].forEach(e => this.removeAllListeners(e));
super.close(forceClosed, callback);
}
}
+1 -1
View File
@@ -70,7 +70,7 @@ var legalOptionNames = [
* @param {object} [options] Optional settings.
* @param {number} [options.poolSize=5] Number of connections in the connection pool for each server instance, set to 5 as default for legacy reasons.
* @param {boolean} [options.ssl=false] Use ssl connection (needs to have a mongod server with ssl support)
* @param {boolean} [options.sslValidate=true] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
* @param {boolean} [options.sslValidate=false] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
* @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
* @param {array} [options.sslCA] Array of valid certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)
* @param {array} [options.sslCRL] Array of revocation certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)
+8 -15
View File
@@ -370,16 +370,6 @@ class TopologyBase extends EventEmitter {
return this.s.coreTopology.unref();
}
auth() {
var args = Array.prototype.slice.call(arguments, 0);
this.s.coreTopology.auth.apply(this.s.coreTopology, args);
}
logout() {
var args = Array.prototype.slice.call(arguments, 0);
this.s.coreTopology.logout.apply(this.s.coreTopology, args);
}
/**
* All raw connections
* @method
@@ -389,7 +379,7 @@ class TopologyBase extends EventEmitter {
return this.s.coreTopology.connections();
}
close(forceClosed) {
close(forceClosed, callback) {
// If we have sessions, we want to individually move them to the session pool,
// and then send a single endSessions call.
if (this.s.sessions.length) {
@@ -400,15 +390,18 @@ class TopologyBase extends EventEmitter {
this.s.sessionPool.endAllPooledSessions();
}
this.s.coreTopology.destroy({
force: typeof forceClosed === 'boolean' ? forceClosed : false
});
// We need to wash out all stored processes
if (forceClosed === true) {
this.s.storeOptions.force = forceClosed;
this.s.store.flush();
}
this.s.coreTopology.destroy(
{
force: typeof forceClosed === 'boolean' ? forceClosed : false
},
callback
);
}
}