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

adonis-lucid-mongodb

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adonis-lucid-mongodb - npm Package Compare versions

Comparing version 0.10.7 to 0.10.8

2

package.json

@@ -8,3 +8,3 @@ {

},
"version": "0.10.7",
"version": "0.10.8",
"scripts": {

@@ -11,0 +11,0 @@ "lint": "standard",

@@ -1212,3 +1212,22 @@ 'use strict'

const relations = _.isArray(arguments[0]) ? arguments[0] : _.toArray(arguments)
this.eagerLoad.with(relations)
relations.forEach(item => {
if (_.isObject(item)) {
this.eagerLoad.with([item.relation])
if (item.scope) {
if (_.isObject(item.scope)) {
this.scope(item.relation, function (query) {
if (item.scope.where) { query = query.where(item.scope.where) }
if (item.scope.with) { query = query.with(item.scope.with) }
if (item.scope.limit) { query = query.limit(item.scope.limit) }
if (item.scope.skip) { query = query.skip(item.scope.skip) }
if (item.scope.sort) { query = query.sort(item.scope.sort) }
})
} else if (item) {
this.scope(item.relation, item.scope)
}
}
} else {
this.eagerLoad.with([item])
}
})
return this

@@ -1215,0 +1234,0 @@ }

@@ -265,3 +265,2 @@ 'use strict'

relations.forEach(item => {
console.log(item)
if (_.isObject(item)) {

@@ -268,0 +267,0 @@ target.eagerLoad.with([item.relation])

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