Socket
Socket
Sign inDemoInstall

mongodb

Package Overview
Dependencies
Maintainers
1
Versions
562
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodb - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

32

lib/mongodb/connection/repl_set.js

@@ -466,13 +466,23 @@ var Connection = require('./connection').Connection,

for(var i = 0; i < auths.length; i++) {
var auth = auths[i];
var options = { authdb: auth.authdb };
var username = auth.username;
var password = auth.password;
replset.db.authenticate(username, password, options, function() {
--pending;
if(0 === pending) {
return complete();
}
});
var connections = server.allRawConnections();
var pendingAuthConn = connections.length;
for(var x = 0; x <connections.length; x++) {
var connection = connections[x];
var authDone = false;
for(var i = 0; i < auths.length; i++) {
var auth = auths[i];
var options = { authdb: auth.authdb, connection: connection };
var username = auth.username;
var password = auth.password;
replset.db.authenticate(username, password, options, function() {
--pending;
if(0 === pending) {
authDone = true;
--pendingAuthConn;
if(0 === pendingAuthConn) {
return complete();
}
}
});
}
}

@@ -479,0 +489,0 @@ });

@@ -18,3 +18,3 @@ var Connection = require('./connection').Connection,

* - **slaveOk** {Boolean, default:false}, legacy option allowing reads from secondary, use **readPrefrence** instead.
* - **poolSize** {Number, default:1}, number of connections in the connection pool, set to 1 as default for legacy reasons.
* - **poolSize** {Number, default:5}, number of connections in the connection pool, set to 5 as default for legacy reasons.
* - **socketOptions** {Object, default:null}, an object containing socket options to use (noDelay:(boolean), keepAlive:(number), connectTimeoutMS:(number), socketTimeoutMS:(number))

@@ -21,0 +21,0 @@ * - **logger** {Object, default:null}, an object representing a logger that you want to use, needs to support functions debug, log, error **({error:function(message, object) {}, log:function(message, object) {}, debug:function(message, object) {}})**.

@@ -41,3 +41,3 @@ /**

* @param {String} mode set the mode for this file.
* @param {Object} options optional properties to specify. Recognized keys:
* @param {Object} options optional properties to specify.
* @return {GridStore}

@@ -44,0 +44,0 @@ */

@@ -29,3 +29,3 @@ var Stream = require('stream').Stream,

this.completedLength = 0;
this.currentChunkNumber = 0;
this.currentChunkNumber = gstore.currentChunk.chunkNumber;

@@ -39,2 +39,5 @@ this.paused = false;

this.numberOfChunks = Math.ceil(gstore.length/gstore.chunkSize);
// This seek start position inside the current chunk
this.seekStartPosition = gstore.position - (this.currentChunkNumber * gstore.chunkSize);

@@ -86,3 +89,14 @@ var self = this;

var data = gstore.currentChunk.readSlice(gstore.currentChunk.length());
// Data setup
var data = null;
// Read a slice (with seek set if none)
if(this.seekStartPosition > 0 && (gstore.currentChunk.length() - this.seekStartPosition) > 0) {
data = gstore.currentChunk.readSlice(gstore.currentChunk.length() - this.seekStartPosition);
this.seekStartPosition = 0;
} else {
data = gstore.currentChunk.readSlice(gstore.currentChunk.length());
}
// Return the data
if(data != null && gstore.currentChunk.chunkNumber == self.currentChunkNumber) {

@@ -89,0 +103,0 @@ self.currentChunkNumber = self.currentChunkNumber + 1;

{ "name" : "mongodb"
, "description" : "A node.js driver for MongoDB"
, "keywords" : ["mongodb", "mongo", "driver", "db"]
, "version" : "1.2.2"
, "version" : "1.2.3"
, "author" : "Christian Amor Kvalheim <christkv@gmail.com>"

@@ -56,3 +56,4 @@ , "contributors" : [ "Aaron Heckmann",

"Lucasfilm Singapore",
"Roman Shtylman"]
"Roman Shtylman",
"Matt Self"]

@@ -59,0 +60,0 @@ , "repository" : { "type" : "git"

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc