database-helpers
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -1,2 +0,2 @@ | ||
import { MongoClient } from 'mongodb'; | ||
import { Db } from 'mongodb'; | ||
/** | ||
@@ -7,2 +7,2 @@ * @description Initializes a mongo database connection | ||
*/ | ||
export declare function initializeMongo(url: string): Promise<MongoClient>; | ||
export declare function initializeMongo(url: string): Promise<Db>; |
@@ -20,3 +20,4 @@ "use strict"; | ||
try { | ||
const db = yield mongodb_1.MongoClient.connect(url); | ||
const client = yield mongodb_1.MongoClient.connect(url); | ||
const db = client.db(); | ||
return Promise.resolve(db); | ||
@@ -23,0 +24,0 @@ } |
{ | ||
"name": "database-helpers", | ||
"version": "2.0.2", | ||
"description": "Functions to start a connection with the database and perform database operations with mongo database.", | ||
"scripts": { | ||
"build": "tsc", | ||
"prepublish": "npm run build && npm --no-git-tag-version version patch" | ||
}, | ||
"main": "./dist/index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@bitbucket.org/futuremdev/database-helpers.git" | ||
}, | ||
"author": "Jordan Hansen", | ||
"license": "ISC", | ||
"homepage": "https://bitbucket.org/futuremdev/database-helpers#readme", | ||
"dependencies": { | ||
"mongodb": "^2.2.33", | ||
"typescript": "^3.1.3" | ||
}, | ||
"devDependencies": { | ||
"@types/mongodb": "^3.1.12" | ||
} | ||
"name": "database-helpers", | ||
"version": "2.0.3", | ||
"description": "Functions to start a connection with the database and perform database operations with mongo database.", | ||
"scripts": { | ||
"build": "tsc", | ||
"prepublish": "npm run build && npm --no-git-tag-version version patch" | ||
}, | ||
"main": "./dist/index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@bitbucket.org/futuremdev/database-helpers.git" | ||
}, | ||
"author": "Jordan Hansen", | ||
"license": "ISC", | ||
"homepage": "https://bitbucket.org/futuremdev/database-helpers#readme", | ||
"dependencies": { | ||
"mongodb": "^3.3.0-beta2", | ||
"typescript": "^3.1.3" | ||
}, | ||
"devDependencies": { | ||
"@types/mongodb": "^3.1.31" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
15994
224
+ Addedbl@2.2.1(transitive)
+ Addedbson@1.1.6(transitive)
+ Addeddenque@1.5.1(transitive)
+ Addedmemory-pager@1.5.0(transitive)
+ Addedmongodb@3.7.4(transitive)
+ Addedoptional-require@1.1.8(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedrequire-at@1.0.6(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsaslprep@1.0.3(transitive)
+ Addedsparse-bitfield@3.0.3(transitive)
+ Addedstring_decoder@1.1.1(transitive)
- Removedbson@1.0.9(transitive)
- Removedbuffer-shims@1.0.0(transitive)
- Removedes6-promise@3.2.1(transitive)
- Removedmongodb@2.2.36(transitive)
- Removedmongodb-core@2.1.20(transitive)
- Removedprocess-nextick-args@1.0.7(transitive)
- Removedreadable-stream@2.2.7(transitive)
- Removedrequire_optional@1.0.1(transitive)
- Removedresolve-from@2.0.0(transitive)
- Removedsemver@5.7.2(transitive)
- Removedstring_decoder@1.0.3(transitive)
Updatedmongodb@^3.3.0-beta2