mongodb 2.2.26 → 2.2.30
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/HISTORY.md +47 -0
- package/README.md +1 -1
- package/lib/admin.js +17 -15
- package/lib/aggregation_cursor.js +9 -0
- package/lib/authenticate.js +109 -0
- package/lib/collection.js +3 -3
- package/lib/command_cursor.js +10 -1
- package/lib/cursor.js +16 -1
- package/lib/db.js +5 -104
- package/lib/gridfs/grid_store.js +6 -3
- package/lib/gridfs-stream/download.js +17 -7
- package/lib/gridfs-stream/upload.js +7 -0
- package/lib/mongo_client.js +105 -26
- package/lib/mongos.js +22 -15
- package/lib/replset.js +57 -56
- package/lib/server.js +29 -24
- package/lib/url_parser.js +7 -2
- package/lib/utils.js +8 -8
- package/package.json +2 -2
- package/yarn.lock +593 -652
package/lib/utils.js
CHANGED
|
@@ -91,25 +91,25 @@ var formattedOrderClause = exports.formattedOrderClause = function(sortValue) {
|
|
|
91
91
|
|
|
92
92
|
var checkCollectionName = function checkCollectionName (collectionName) {
|
|
93
93
|
if('string' !== typeof collectionName) {
|
|
94
|
-
throw
|
|
94
|
+
throw new MongoError("collection name must be a String");
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
if(!collectionName || collectionName.indexOf('..') != -1) {
|
|
98
|
-
throw
|
|
98
|
+
throw new MongoError("collection names cannot be empty");
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
if(collectionName.indexOf('$') != -1 &&
|
|
102
102
|
collectionName.match(/((^\$cmd)|(oplog\.\$main))/) == null) {
|
|
103
|
-
throw
|
|
103
|
+
throw new MongoError("collection names must not contain '$'");
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
if(collectionName.match(/^\.|\.$/) != null) {
|
|
107
|
-
throw
|
|
107
|
+
throw new MongoError("collection names must not start or end with '.'");
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
// Validate that we are not passing 0x00 in the colletion name
|
|
111
111
|
if(!!~collectionName.indexOf("\x00")) {
|
|
112
|
-
throw new
|
|
112
|
+
throw new MongoError("collection names cannot contain a null character");
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
115
|
|
|
@@ -262,7 +262,7 @@ var mergeOptions = function(target, source) {
|
|
|
262
262
|
var translateOptions = function(target, source) {
|
|
263
263
|
var translations = {
|
|
264
264
|
// SSL translation options
|
|
265
|
-
'sslCA': 'ca', 'sslCRL': 'crl', 'sslValidate': 'rejectUnauthorized', 'sslKey': 'key',
|
|
265
|
+
'sslCA': 'ca', 'sslCRL': 'crl', 'sslValidate': 'rejectUnauthorized', 'sslKey': 'key',
|
|
266
266
|
'sslCert': 'cert', 'sslPass': 'passphrase',
|
|
267
267
|
// SocketTimeout translation options
|
|
268
268
|
'socketTimeoutMS': 'socketTimeout', 'connectTimeoutMS': 'connectionTimeout',
|
|
@@ -339,7 +339,7 @@ var mergeOptionsAndWriteConcern = function(targetOptions, sourceOptions, keys, m
|
|
|
339
339
|
var found = false;
|
|
340
340
|
for(var i = 0; i < writeConcernKeys.length; i++) {
|
|
341
341
|
if(targetOptions[writeConcernKeys[i]]) {
|
|
342
|
-
found = true;
|
|
342
|
+
found = true;
|
|
343
343
|
break;
|
|
344
344
|
}
|
|
345
345
|
}
|
|
@@ -349,7 +349,7 @@ var mergeOptionsAndWriteConcern = function(targetOptions, sourceOptions, keys, m
|
|
|
349
349
|
if(sourceOptions[writeConcernKeys[i]]) {
|
|
350
350
|
targetOptions[writeConcernKeys[i]] = sourceOptions[writeConcernKeys[i]];
|
|
351
351
|
}
|
|
352
|
-
}
|
|
352
|
+
}
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
return targetOptions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mongodb",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.30",
|
|
4
4
|
"description": "The official MongoDB driver for Node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"es6-promise": "3.2.1",
|
|
17
|
-
"mongodb-core": "2.1.
|
|
17
|
+
"mongodb-core": "2.1.14",
|
|
18
18
|
"readable-stream": "2.2.7"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|