Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@examgoal/mongodb

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@examgoal/mongodb - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

dist/index.d.ts

@@ -13,5 +13,5 @@ import { ClientSession, Db, MongoClient } from 'mongodb';

readonly name: string;
static initializeApp(config: ConfigOptions): Promise<void>;
static initializeApp(config: ConfigOptions): void;
static getInstance(name: string): MongodbClient;
}
export = MongodbClient;

@@ -55,3 +55,2 @@ "use strict";

this.mongoClient = new mongodb_1.MongoClient(config.uri, __assign(__assign({}, (config.mongodbOptions || {})), { useNewUrlParser: true }));
instances[config.name || '[DEFAULT]'] = this;
}

@@ -111,19 +110,6 @@ MongodbClient.prototype.connect = function () {

MongodbClient.initializeApp = function (config) {
return __awaiter(this, void 0, void 0, function () {
var a, e_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
a = new MongodbClient(config);
return [4 /*yield*/, a.connect()];
case 1:
_a.sent();
return [3 /*break*/, 3];
case 2:
e_1 = _a.sent();
throw new Error(this.name + " MongoDB App's Error Occurred on first initialization " + e_1.toString());
case 3: return [2 /*return*/];
}
});
var a = new MongodbClient(config);
instances[config.name || '[DEFAULT]'] = a;
a.connect().catch(function (err) {
throw new Error(a.name + " MongoDB App's Error Occurred on first initialization " + err.toString());
});

@@ -130,0 +116,0 @@ };

{
"name": "@examgoal/mongodb",
"version": "1.0.3",
"version": "1.0.4",
"description": "MongoDB Session Management Helper for ExpressJS or any Node JS Projects",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc