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

@live-change/relations-plugin

Package Overview
Dependencies
Maintainers
1
Versions
216
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@live-change/relations-plugin - npm Package Compare versions

Comparing version 0.6.10 to 0.6.11

2

itemOfAny.js

@@ -30,3 +30,3 @@ const {

if(config.readAccess || config.readAccessControl || config.writeAccessControl) {
if(config.readAccess || config.writeAccess || config.readAccessControl || config.writeAccessControl) {
defineView(config, context)

@@ -33,0 +33,0 @@ // TODO: multiple views with all properties combinations

{
"name": "@live-change/relations-plugin",
"version": "0.6.10",
"version": "0.6.11",
"description": "",

@@ -24,6 +24,6 @@ "main": "index.js",

"dependencies": {
"@live-change/framework": "^0.6.10",
"@live-change/framework": "^0.6.11",
"pluralize": "8.0.0"
},
"gitHead": "94daf36c87486b4241b752080c926995b27827d2"
"gitHead": "99d448214c2df44f42e5d25a08fa50ae79e5bdbe"
}

@@ -24,2 +24,9 @@ const App = require("@live-change/framework")

}
const accessControl = config.readAccessControl || config.writeAccessControl
if(typeof accessControl == 'object') {
accessControl.objects = accessControl.objects ?? ((params) => otherPropertyNames.map(name => ({
objectType: params[name + 'Type'],
object: params[name]
})))
}
const viewName = joinedOthersPropertyName + context.reverseRelationWord + pluralize(modelName)

@@ -38,4 +45,4 @@ service.views[viewName] = new ViewDefinition({

},
access: config.readAccess,
accessControl: config.readAccessControl || config.writeAccessControl,
access: config.readAccess || config.writeAccess,
accessControl,
daoPath(properties, { client, context }) {

@@ -42,0 +49,0 @@ const typeAndIdParts = extractTypeAndIdParts(otherPropertyNames, properties)

@@ -25,6 +25,8 @@ const {

if(config.readAccess) {
defineObjectView({ ...config, access: config.readAccess }, context)
defineRangeViews({ ...config, access: config.readAccess }, context)
if(config.singleAccess || config.readAccess || config.singleAccessControl || config.readAccessControl) {
defineObjectView(config, context)
}
if(config.listAccess || config.readAccess || config.listAccessControl || config.readAccessControl) {
defineRangeViews(config, context)
}
if(config.views) {

@@ -31,0 +33,0 @@ for(const view of config.views) {

@@ -38,2 +38,9 @@ const App = require("@live-change/framework")

}
const accessControl = config.singleAccessControl || config.readAccessControl || config.writeAccessControl
if(typeof accessControl == 'object') {
accessControl.objects = accessControl.objects ?? ((params) => otherPropertyNames.map(name => ({
objectType: params[name + 'Type'],
object: params[name]
})))
}
const viewName = config.name || ((config.prefix ? (config.prefix + joinedOthersClassName) : joinedOthersPropertyName) +

@@ -49,4 +56,4 @@ context.reverseRelationWord + modelName + (config.suffix || ''))

},
access: config.readAccess,
accessControl: config.readAccessControl || config.writeAccessControl,
access: config.singleAccess || config.readAccess,
accessControl,
daoPath(properties, { client, context }) {

@@ -78,5 +85,4 @@ const typeAndIdParts = extractTypeAndIdParts(otherPropertyNames, properties)

},
access(params, context) {
return config.access ? config.access(params, context) : true
},
access: config.listAccess || config.readAccess,
accessControl: config.listAccessControl || config.readAccessControl || config.writeAccessControl,
daoPath(params, { client, context }) {

@@ -83,0 +89,0 @@ const owner = []

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