Socket
Socket
Sign inDemoInstall

@common-stack/store-mongo

Package Overview
Dependencies
3
Maintainers
1
Versions
178
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.1-alpha.0 to 0.3.1-alpha.1

70

lib/index.js

@@ -106,4 +106,2 @@ /******/ (() => { // webpackBootstrap

const mongoose = __webpack_require__(/*! mongoose */ "mongoose");
let connectionOptions;
// (mongoose as any).Promise = global.Promise;
const generateMongo = (mongoUrl) => {

@@ -217,17 +215,17 @@ // creates default connection

(function (IBaseServiceCommands) {
IBaseServiceCommands["Count"] = "count";
IBaseServiceCommands["Get"] = "get";
IBaseServiceCommands["GetAll"] = "getAll";
IBaseServiceCommands["GetByIds"] = "getByIds";
IBaseServiceCommands["Create"] = "create";
IBaseServiceCommands["Insert"] = "insert";
IBaseServiceCommands["BulkCreate"] = "bulkCreate";
IBaseServiceCommands["Update"] = "update";
IBaseServiceCommands["Delete"] = "delete";
IBaseServiceCommands["GetAllWithCount"] = "getAllWithCount";
IBaseServiceCommands["count"] = "count";
IBaseServiceCommands["get"] = "get";
IBaseServiceCommands["getAll"] = "getAll";
IBaseServiceCommands["getByIds"] = "getByIds";
IBaseServiceCommands["create"] = "create";
IBaseServiceCommands["insert"] = "insert";
IBaseServiceCommands["bulkCreate"] = "bulkCreate";
IBaseServiceCommands["update"] = "update";
IBaseServiceCommands["delete"] = "delete";
IBaseServiceCommands["getAllWithCount"] = "getAllWithCount";
})(IBaseServiceCommands = exports.IBaseServiceCommands || (exports.IBaseServiceCommands = {}));
var ICacheControlScope;
(function (ICacheControlScope) {
ICacheControlScope["Public"] = "PUBLIC";
ICacheControlScope["Private"] = "PRIVATE";
ICacheControlScope["PUBLIC"] = "PUBLIC";
ICacheControlScope["PRIVATE"] = "PRIVATE";
})(ICacheControlScope = exports.ICacheControlScope || (exports.ICacheControlScope = {}));

@@ -237,8 +235,8 @@ /** All Moleculer Topic names are extended from this. */

(function (IMoleculerServiceName) {
IMoleculerServiceName["Dummy"] = "dummy";
IMoleculerServiceName["dummy"] = "dummy";
})(IMoleculerServiceName = exports.IMoleculerServiceName || (exports.IMoleculerServiceName = {}));
var ISortEnum;
(function (ISortEnum) {
ISortEnum["Asc"] = "ASC";
ISortEnum["Desc"] = "DESC";
ISortEnum["ASC"] = "ASC";
ISortEnum["DESC"] = "DESC";
})(ISortEnum = exports.ISortEnum || (exports.ISortEnum = {}));

@@ -318,3 +316,3 @@

actions: {
[interfaces_1.IBaseServiceCommands.Get]: {
[interfaces_1.IBaseServiceCommands.get]: {
params: {

@@ -325,3 +323,3 @@ id: 'string',

},
[interfaces_1.IBaseServiceCommands.Count]: {
[interfaces_1.IBaseServiceCommands.count]: {
params: {

@@ -332,3 +330,3 @@ criteria: { type: 'object', optional: true },

},
[interfaces_1.IBaseServiceCommands.BulkCreate]: {
[interfaces_1.IBaseServiceCommands.bulkCreate]: {
params: {

@@ -339,3 +337,3 @@ data: { type: 'array', items: 'object' },

},
[interfaces_1.IBaseServiceCommands.Create]: {
[interfaces_1.IBaseServiceCommands.create]: {
params: {

@@ -346,3 +344,3 @@ data: 'object',

},
[interfaces_1.IBaseServiceCommands.Delete]: {
[interfaces_1.IBaseServiceCommands.delete]: {
params: {

@@ -353,3 +351,3 @@ id: 'string',

},
[interfaces_1.IBaseServiceCommands.GetAll]: {
[interfaces_1.IBaseServiceCommands.getAll]: {
params: {

@@ -364,3 +362,3 @@ criteria: 'object|optional',

},
[interfaces_1.IBaseServiceCommands.GetAllWithCount]: {
[interfaces_1.IBaseServiceCommands.getAllWithCount]: {
params: {

@@ -375,3 +373,3 @@ criteria: 'object|optional',

},
[interfaces_1.IBaseServiceCommands.Insert]: {
[interfaces_1.IBaseServiceCommands.insert]: {
params: {

@@ -383,3 +381,3 @@ data: 'object',

},
[interfaces_1.IBaseServiceCommands.Update]: {
[interfaces_1.IBaseServiceCommands.update]: {
params: {

@@ -441,30 +439,30 @@ id: 'string',

bulkCreate(data) {
return this.callAction(interfaces_1.IBaseServiceCommands.BulkCreate, { data });
return this.callAction(interfaces_1.IBaseServiceCommands.bulkCreate, { data });
}
count(criteria) {
return this.callAction(interfaces_1.IBaseServiceCommands.Count, { criteria });
return this.callAction(interfaces_1.IBaseServiceCommands.count, { criteria });
}
create(data) {
return this.callAction(interfaces_1.IBaseServiceCommands.Create, { data });
return this.callAction(interfaces_1.IBaseServiceCommands.create, { data });
}
delete(id) {
return this.callAction(interfaces_1.IBaseServiceCommands.Delete, { id });
return this.callAction(interfaces_1.IBaseServiceCommands.delete, { id });
}
get(id) {
return this.callAction(interfaces_1.IBaseServiceCommands.Get, { id });
return this.callAction(interfaces_1.IBaseServiceCommands.get, { id });
}
getAll(options) {
return this.callAction(interfaces_1.IBaseServiceCommands.GetAll, options);
return this.callAction(interfaces_1.IBaseServiceCommands.getAll, options);
}
getByIds(ids) {
return this.callAction(interfaces_1.IBaseServiceCommands.GetByIds, { ids });
return this.callAction(interfaces_1.IBaseServiceCommands.getByIds, { ids });
}
getAllWithCount(options) {
return this.callAction(interfaces_1.IBaseServiceCommands.GetAllWithCount, options);
return this.callAction(interfaces_1.IBaseServiceCommands.getAllWithCount, options);
}
insert(data, overwrite) {
return this.callAction(interfaces_1.IBaseServiceCommands.Insert, { data, overwrite });
return this.callAction(interfaces_1.IBaseServiceCommands.insert, { data, overwrite });
}
update(id, data, overwrite) {
return this.callAction(interfaces_1.IBaseServiceCommands.Update, { id, data, overwrite });
return this.callAction(interfaces_1.IBaseServiceCommands.update, { id, data, overwrite });
}

@@ -471,0 +469,0 @@ async callAction(command, params) {

@@ -35,16 +35,16 @@ export declare type Maybe<T> = T | null;

export declare enum IBaseServiceCommands {
Count = "count",
Get = "get",
GetAll = "getAll",
GetByIds = "getByIds",
Create = "create",
Insert = "insert",
BulkCreate = "bulkCreate",
Update = "update",
Delete = "delete",
GetAllWithCount = "getAllWithCount"
count = "count",
get = "get",
getAll = "getAll",
getByIds = "getByIds",
create = "create",
insert = "insert",
bulkCreate = "bulkCreate",
update = "update",
delete = "delete",
getAllWithCount = "getAllWithCount"
}
export declare enum ICacheControlScope {
Public = "PUBLIC",
Private = "PRIVATE"
PUBLIC = "PUBLIC",
PRIVATE = "PRIVATE"
}

@@ -63,3 +63,3 @@ /** Represents a null return value. */

export declare enum IMoleculerServiceName {
Dummy = "dummy"
dummy = "dummy"
}

@@ -84,3 +84,3 @@ export declare type IMutation = {

};
export declare type IQueryNodeArgs = {
export declare type IQuerynodeArgs = {
id: Scalars['ID'];

@@ -93,4 +93,4 @@ };

export declare enum ISortEnum {
Asc = "ASC",
Desc = "DESC"
ASC = "ASC",
DESC = "DESC"
}

@@ -97,0 +97,0 @@ export declare type ISubscription = {

@@ -13,2 +13,4 @@ import { Schema } from 'mongoose';

};
export declare const addIdVirtualFields: (schema: Schema) => Schema<import("mongoose").Document<any, any, any>, import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>, undefined, {}>;
export declare const addIdVirtualFields: (schema: Schema) => Schema<any, import("mongoose").Model<any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
[x: string]: any;
}>;
{
"name": "@common-stack/store-mongo",
"version": "0.3.1-alpha.0",
"description": "Sample core for higher packages to depend on",
"license": "ISC",
"author": "CDMBase LLC",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"scripts": {
"build": "npm run build:clean && npm run build:lib",
"build:clean": "rimraf lib",
"build:lib": "webpack",
"build:lib:watch": "npm run build:lib -- --watch",
"jest": "./node_modules/.bin/jest",
"prepublish": "npm run build",
"test": "cross-env ENV_FILE=../../config/test/test.env jest",
"test:debug": "npm test -- --runInBand",
"test:watch": "npm test -- --watch",
"watch": "npm run build:lib:watch"
},
"dependencies": {
"@common-stack/core": "0.3.1-alpha.0"
},
"peerDependencies": {
"dataloader": ">=2.0.0",
"mongoose": ">=5.13.5"
},
"publishConfig": {
"access": "public"
},
"typescript": {
"definition": "lib/index.d.ts"
},
"gitHead": "38b12e16509f5521de83592aa4901d5b02394980"
"name": "@common-stack/store-mongo",
"version": "0.3.1-alpha.1",
"description": "Sample core for higher packages to depend on",
"license": "ISC",
"author": "CDMBase LLC",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"scripts": {
"build": "npm run build:clean && npm run build:lib",
"build:clean": "rimraf lib",
"build:lib": "webpack",
"build:lib:watch": "npm run build:lib -- --watch",
"jest": "./node_modules/.bin/jest",
"prepublish": "npm run build",
"test": "cross-env ENV_FILE=../../config/test/test.env jest",
"test:debug": "npm test -- --runInBand",
"test:watch": "npm test -- --watch",
"watch": "npm run build:lib:watch"
},
"dependencies": {
"@common-stack/core": "0.3.1-alpha.1"
},
"peerDependencies": {
"dataloader": ">=2.0.0",
"mongoose": ">=5.13.5"
},
"publishConfig": {
"access": "public"
},
"typescript": {
"definition": "lib/index.d.ts"
},
"gitHead": "a32bf55e87df6d821213ad90ed6279d466d4027e"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc