sails-mongo
Advanced tools
Comparing version 1.0.0-10 to 1.0.0-11
@@ -59,8 +59,2 @@ /** | ||
// If the given URL includes a comma, assume it's a complex URL like you get from Mongo Atlas | ||
// and trust that it contains all the info we need. | ||
if (dsConfig.url.indexOf(',') > -1) { | ||
return; | ||
} | ||
// Sanity checks | ||
@@ -277,3 +271,18 @@ assert(_.isObject(dsConfig), '`dsConfig` should exist and be a dictionary!'); | ||
// Before beginning to do further string parsing, look for a little loophole: | ||
// If the given URL includes a comma, we'll assume it's a complex URL like you get | ||
// from Mongo Atlas and trust that it contains all the info we need. | ||
// | ||
// > But note that this _does not_ handle automatically attaching host, password, | ||
// > port, etc. to the `dsConfig` dictionary. It also doesn't do any verification | ||
// > of these aspects of the URL, which means it could be entirely invalid. | ||
if (dsConfig.url.indexOf(',') > -1) { | ||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
// TODO: Implement explicit parsing for this kind of URL instead of just bailing silently. | ||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
return; | ||
}//• | ||
// IWMIH, this is the general case where we're actually going to validate the URL like normal. | ||
// First, make sure there's a protocol: | ||
@@ -280,0 +289,0 @@ // We don't actually care about the protocol... but the underlying library (e.g. `mongodb`) might. |
{ | ||
"name": "sails-mongo", | ||
"version": "1.0.0-10", | ||
"version": "1.0.0-11", | ||
"description": "Mongo DB adapter for Sails.js/Waterline.", | ||
@@ -5,0 +5,0 @@ "main": "./lib", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
246461
56
4313