Socket
Socket
Sign inDemoInstall

@mongez/monpulse

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mongez/monpulse - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

4

cjs/aggregate/expressions.js

@@ -312,3 +312,3 @@ "use strict";

if (supportiveIs.isScalar(value)) {
value = new RegExp(value, "i");
value = new RegExp(value, "gi");
}

@@ -327,3 +327,3 @@ return wrapExpressionWithColumn(

if (supportiveIs.isScalar(value)) {
value = new RegExp(value, "i");
value = new RegExp(value, "gi");
}

@@ -330,0 +330,0 @@ return wrapExpressionWithColumn(

@@ -129,2 +129,6 @@ import { GenericObject } from "@mongez/reinforcements";

};
/**
* Dump the entire collection
*/
dump(): Promise<any>;
}

@@ -131,0 +135,0 @@ /**

@@ -249,2 +249,8 @@ "use strict";

}
/**
* Dump the entire collection
*/
async dump() {
return await this.collection().find({}).toArray();
}
}

@@ -251,0 +257,0 @@ /**

@@ -388,14 +388,17 @@ "use strict";

error instanceof mongodb.MongoServerError &&
error.code === 11000 &&
tries < 2
error.code === 11000
) {
const duplicateField = error.keyValue;
const fieldName = Object.keys(duplicateField)[0];
const errorMessage = `A record with the same ${fieldName} already exists.`;
if (this.autoGeneratedId) {
this.unset("id");
if (tries < 2) {
const duplicateField = error.keyValue;
const fieldName = Object.keys(duplicateField)[0];
const errorMessage = `A record with the same ${fieldName} already exists.`;
if (this.autoGeneratedId) {
this.unset("id");
}
throw new Error(errorMessage);
} else {
tries--;
}
throw new Error(errorMessage);
}
tries--;
throw error;
}

@@ -402,0 +405,0 @@ }

@@ -310,3 +310,3 @@ import { ltrim } from "@mongez/reinforcements";

if (isScalar(value)) {
value = new RegExp(value, "i");
value = new RegExp(value, "gi");
}

@@ -325,3 +325,3 @@ return wrapExpressionWithColumn(

if (isScalar(value)) {
value = new RegExp(value, "i");
value = new RegExp(value, "gi");
}

@@ -328,0 +328,0 @@ return wrapExpressionWithColumn(

@@ -129,2 +129,6 @@ import { GenericObject } from "@mongez/reinforcements";

};
/**
* Dump the entire collection
*/
dump(): Promise<any>;
}

@@ -131,0 +135,0 @@ /**

@@ -247,2 +247,8 @@ import { ObjectId } from "mongodb";

}
/**
* Dump the entire collection
*/
async dump() {
return await this.collection().find({}).toArray();
}
}

@@ -249,0 +255,0 @@ /**

@@ -388,16 +388,16 @@ import {

// Handle duplicate key error
if (
error instanceof MongoServerError &&
error.code === 11000 &&
tries < 2
) {
const duplicateField = error.keyValue;
const fieldName = Object.keys(duplicateField)[0];
const errorMessage = `A record with the same ${fieldName} already exists.`;
if (this.autoGeneratedId) {
this.unset("id");
if (error instanceof MongoServerError && error.code === 11000) {
if (tries < 2) {
const duplicateField = error.keyValue;
const fieldName = Object.keys(duplicateField)[0];
const errorMessage = `A record with the same ${fieldName} already exists.`;
if (this.autoGeneratedId) {
this.unset("id");
}
throw new Error(errorMessage);
} else {
tries--;
}
throw new Error(errorMessage);
}
tries--;
throw error;
}

@@ -404,0 +404,0 @@ }

{
"name": "@mongez/monpulse",
"version": "1.0.12",
"version": "1.0.13",
"description": "Powerful Mongodb Database Manager for Node Js",

@@ -5,0 +5,0 @@ "main": "./cjs/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