Comparing version 3.1.2 to 3.1.3
@@ -0,1 +1,5 @@ | ||
## 3.1.3/2017-08-19 | ||
- tweak error | ||
## 3.1.2/2017-08-19 | ||
@@ -2,0 +6,0 @@ |
@@ -151,5 +151,7 @@ 'use strict'; | ||
e.model = self._model._name; | ||
e.plugin = plugin.name; | ||
e.type = hookName; | ||
e.args = plugin.args; | ||
e.op = self._op; | ||
e.args = self._args; | ||
e.pluginName = plugin.name; | ||
e.pluginOp = hookName; | ||
e.pluginArgs = plugin.args; | ||
throw e; | ||
@@ -181,5 +183,7 @@ } | ||
e.model = self._model._name; | ||
e.plugin = plugin.name; | ||
e.type = hookName; | ||
e.args = plugin.args; | ||
e.op = self._op; | ||
e.args = self._args; | ||
e.pluginName = plugin.name; | ||
e.pluginOp = hookName; | ||
e.pluginArgs = plugin.args; | ||
e.result = result; | ||
@@ -186,0 +190,0 @@ throw e; |
{ | ||
"name": "mongolass", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "Elegant MongoDB driver for Node.js.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -86,5 +86,7 @@ ## Mongolass | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeInsertOne', | ||
args: [] } | ||
op: 'insertOne', | ||
args: [ { name: 'nswbmw', age: 'wrong age' } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeInsertOne', | ||
pluginArgs: [] } | ||
*/ | ||
@@ -186,5 +188,7 @@ ``` | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeInsertOne', | ||
args: [] } | ||
op: 'insertOne', | ||
args: [ { name: 'nswbmw', age: 'wrong age' } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeInsertOne', | ||
pluginArgs: [] } | ||
*/ | ||
@@ -191,0 +195,0 @@ ``` |
@@ -39,5 +39,7 @@ 'use strict'; | ||
model: 'User', | ||
plugin: 'oops', | ||
type: 'afterFind', | ||
args: [], | ||
op: 'find', | ||
args: [ {}, { fields: { _id: 0 } } ], | ||
pluginName: 'oops', | ||
pluginArgs: [], | ||
pluginOp: 'afterFind', | ||
result: [ | ||
@@ -44,0 +46,0 @@ { name: 'aaa', age: 2 }, |
@@ -81,5 +81,7 @@ 'use strict'; | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeBulkWrite', | ||
args: [] | ||
op: 'bulkWrite', | ||
args: [ [ { insertOne: { document: { name: 1, age: 1 } } } ] ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeBulkWrite', | ||
pluginArgs: [] | ||
}); | ||
@@ -99,5 +101,7 @@ | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeBulkWrite', | ||
args: [] | ||
op: 'bulkWrite', | ||
args: [ [ { updateOne: { filter: { name: 'aaa' }, update: { age: 101 }, upsert: true } } ] ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeBulkWrite', | ||
pluginArgs: [] | ||
}); | ||
@@ -117,5 +121,7 @@ | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeBulkWrite', | ||
args: [] | ||
op: 'bulkWrite', | ||
args: [ [ { updateMany: { filter: { name: 'aaa' }, update: { name: 1 }, upsert: true } } ] ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeBulkWrite', | ||
pluginArgs: [] | ||
}); | ||
@@ -156,5 +162,11 @@ | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeBulkWrite', | ||
args: [] | ||
op: 'bulkWrite', | ||
args: | ||
[ [ { replaceOne: | ||
{ filter: { name: 'aaa' }, | ||
replacement: { name: 1, age: 1 }, | ||
upsert: true } } ] ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeBulkWrite', | ||
pluginArgs: [] | ||
}); | ||
@@ -530,5 +542,7 @@ }); | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeFindAndModify', | ||
args: [] | ||
op: 'findAndModify', | ||
args: [ { name: 'aaa' }, { age: 1 }, { age: 101 } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeFindAndModify', | ||
pluginArgs: [] | ||
}); | ||
@@ -591,5 +605,7 @@ }); | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeFindOneAndReplace', | ||
args: [] | ||
op: 'findOneAndReplace', | ||
args: [ { name: 'aaa' }, { name: 1, age: 1 } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeFindOneAndReplace', | ||
pluginArgs: [] | ||
}); | ||
@@ -612,5 +628,7 @@ }); | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeFindOneAndUpdate', | ||
args: [] | ||
op: 'findOneAndUpdate', | ||
args: [ { name: 'aaa' }, { age: 101 } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeFindOneAndUpdate', | ||
pluginArgs: [] | ||
}); | ||
@@ -633,5 +651,7 @@ }); | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeInsert', | ||
args: [] | ||
op: 'insert', | ||
args: [ { name: 1, age: 101 } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeInsert', | ||
pluginArgs: [] | ||
}); | ||
@@ -654,5 +674,7 @@ }); | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeInsertOne', | ||
args: [] | ||
op: 'insertOne', | ||
args: [ { name: 1, age: 101 } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeInsertOne', | ||
pluginArgs: [] | ||
}); | ||
@@ -675,5 +697,7 @@ }); | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeInsertMany', | ||
args: [] | ||
op: 'insertMany', | ||
args: [ [ { name: 'ccc', age: 3 }, { name: 'ddd', age: -1 } ] ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeInsertMany', | ||
pluginArgs: [] | ||
}); | ||
@@ -712,5 +736,7 @@ }); | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeReplaceOne', | ||
args: [] | ||
op: 'replaceOne', | ||
args: [ { name: 'aaa' }, { name: 'ddd', age: -1 } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeReplaceOne', | ||
pluginArgs: [] | ||
}); | ||
@@ -733,5 +759,7 @@ }); | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeSave', | ||
args: [] | ||
op: 'save', | ||
args: [ { name: 1, age: 101 } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeSave', | ||
pluginArgs: [] | ||
}); | ||
@@ -759,5 +787,7 @@ }); | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeUpdate', | ||
args: [] | ||
op: 'update', | ||
args: [ { name: 'aaa' }, { '$inc': { refe: 1 } } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeUpdate', | ||
pluginArgs: [] | ||
}); | ||
@@ -784,5 +814,7 @@ }); | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeUpdate', | ||
args: [] | ||
op: 'update', | ||
args: [ { name: 'aaa' }, { '$set': { refe: 1 } } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeUpdate', | ||
pluginArgs: [] | ||
}); | ||
@@ -813,5 +845,7 @@ }); | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeUpdate', | ||
args: [] | ||
op: 'update', | ||
args: [ { name: 'aaa' }, { '$setOnInsert': { refe: 1 } } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeUpdate', | ||
pluginArgs: [] | ||
}); | ||
@@ -834,5 +868,7 @@ }); | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeUpdate', | ||
args: [] | ||
op: 'update', | ||
args: [ { name: 'aaa' }, { '$addToSet': { 'posts.0.comments': 3 } } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeUpdate', | ||
pluginArgs: [] | ||
}); | ||
@@ -869,5 +905,9 @@ | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeUpdate', | ||
args: [] | ||
op: 'update', | ||
args: | ||
[ { name: 'aaa' }, | ||
{ '$addToSet': { posts: { title: 'aaa', comments: 0 } } } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeUpdate', | ||
pluginArgs: [] | ||
}); | ||
@@ -973,5 +1013,7 @@ }); | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeUpdate', | ||
args: [] | ||
op: 'update', | ||
args: [ { name: 'aaa' }, { age: -1 } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeUpdate', | ||
pluginArgs: [] | ||
}); | ||
@@ -991,5 +1033,7 @@ | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeUpdate', | ||
args: [] | ||
op: 'update', | ||
args: [ { name: 'aaa' }, { '$set': { age: -1 } } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeUpdate', | ||
pluginArgs: [] | ||
}); | ||
@@ -1013,5 +1057,7 @@ }); | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeUpdateOne', | ||
args: [] | ||
op: 'updateOne', | ||
args: [ { name: 'aaa' }, { age: -1 }, { multi: true } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeUpdateOne', | ||
pluginArgs: [] | ||
}); | ||
@@ -1034,7 +1080,9 @@ }); | ||
model: 'User', | ||
plugin: 'MongolassSchema', | ||
type: 'beforeUpdateMany', | ||
args: [] | ||
op: 'updateMany', | ||
args: [ { name: 'aaa' }, { age: -1 } ], | ||
pluginName: 'MongolassSchema', | ||
pluginOp: 'beforeUpdateMany', | ||
pluginArgs: [] | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
81957
2045
369