diff --git a/.gitignore b/.gitignore index bd94284..eb46981 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ coverage node_modules -test/helper/**/* \ No newline at end of file +test/helper/.cache/** \ No newline at end of file diff --git a/package.json b/package.json index e15cf6b..51c030b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tadashi/mongo-singleton", - "version": "6.0.2", + "version": "6.0.3", "description": "Simplifying MongoDB", "files": [ "src", diff --git a/src/mongo.js b/src/mongo.js index aede998..6b1c1ab 100644 --- a/src/mongo.js +++ b/src/mongo.js @@ -77,6 +77,8 @@ async function createConnectionOptions(args = {}) { password: await readSecrets(password), } } + + return connectionOptions } /** @@ -96,6 +98,10 @@ async function conn(args = {}) { } = args const connectionOptions = await createConnectionOptions(restArgs) + + debug.info('conn | url', url) + debug.info('conn | connectionOptions', connectionOptions) + const client = await MongoClient.connect(url, connectionOptions) mongoSingleton[CLIENT_KEY] = client