Move mongoUrl to src/vendor

And add a README to src/vendor
This commit is contained in:
Benjamin Woodruff
2016-03-16 14:54:52 -07:00
parent 836582fdb1
commit 530fad5a58
3 changed files with 9 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
import MongoCollection from './MongoCollection';
import MongoSchemaCollection from './MongoSchemaCollection';
import {parse as parseUrl, format as formatUrl} from './mongodbUrl';
import {parse as parseUrl, format as formatUrl} from '../../../vendor/mongodbUrl';
let mongodb = require('mongodb');
let MongoClient = mongodb.MongoClient;

8
src/vendor/README.md vendored Normal file
View File

@@ -0,0 +1,8 @@
# mongoUrl
A fork of node's `url` module, with the modification that commas and colons are
allowed in hostnames. While this results in a slightly incorrect parsed result,
as the hostname field for a mongodb should be an array of replica sets, it's
good enough to let us pull out and escape the auth portion of the URL.
See also: https://github.com/ParsePlatform/parse-server/pull/986