Socket
Socket
Sign inDemoInstall

@common-stack/store-mongo

Package Overview
Dependencies
Maintainers
1
Versions
213
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@common-stack/store-mongo - npm Package Compare versions

Comparing version 0.5.11 to 0.5.12

12

lib/index.js

@@ -166,3 +166,3 @@ /******/ (() => { // webpackBootstrap

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DEFAULT_SORTING = exports.PAGINATION_OPTIONS = void 0;
exports.PAGINATION_OPTIONS = void 0;
var PAGINATION_OPTIONS;

@@ -173,5 +173,2 @@ (function (PAGINATION_OPTIONS) {

})(PAGINATION_OPTIONS = exports.PAGINATION_OPTIONS || (exports.PAGINATION_OPTIONS = {}));
exports.DEFAULT_SORTING = {
id: 'asc',
};

@@ -722,3 +719,6 @@

computeSort(sort) {
return (0, lodash_1.isObject)(sort) ? { [sort === null || sort === void 0 ? void 0 : sort.key]: sort.value.toLowerCase() === 'asc' ? 1 : -1 } : Object.entries(interfaces_1.DEFAULT_SORTING).reduce((acc, [key, value]) => (Object.assign(Object.assign({}, acc), { [key]: value.toLowerCase() === 'asc' ? 1 : -1 })), {});
if ((0, lodash_1.isObject)(sort)) {
return { [sort === null || sort === void 0 ? void 0 : sort.key]: sort.value.toLowerCase() === 'asc' ? 1 : -1 };
}
return null;
}

@@ -732,3 +732,3 @@ async getAll(options, withCount = false) {

{ $match: Object.assign({}, rest, id ? { _id: id } : {}) },
{ $sort: this.computeSort(sort) },
...(sort ? [{ $sort: this.computeSort(sort) }] : []),
{ $skip: skip || interfaces_1.PAGINATION_OPTIONS.skip },

@@ -735,0 +735,0 @@ { $limit: limit || interfaces_1.PAGINATION_OPTIONS.limit },

@@ -1,2 +0,2 @@

import { FilterQuery, Document, Model, UpdateQuery } from 'mongoose';
import { Document, FilterQuery, Model, UpdateQuery } from 'mongoose';
import { GetAllArgs } from './get-all-args';

@@ -7,5 +7,2 @@ export declare enum PAGINATION_OPTIONS {

}
export declare const DEFAULT_SORTING: {
id: string;
};
export interface IBaseRepository<T, D = Document<T>> {

@@ -12,0 +9,0 @@ model: Model<D>;

{
"name": "@common-stack/store-mongo",
"version": "0.5.11",
"version": "0.5.12",
"description": "Sample core for higher packages to depend on",

@@ -34,3 +34,3 @@ "license": "ISC",

},
"gitHead": "169009daff44045e999eb691f58f9dfbde1385ab"
"gitHead": "f69aae83248fd9b740388e39d5a3ce44b05bca81"
}

Sorry, the diff of this file is not supported yet

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