lb3-excellerify-crudgrid-mixin
Advanced tools
Comparing version 0.1.3 to 0.1.4
{ | ||
"name": "lb3-excellerify-crudgrid-mixin", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "loopback 3 excellerify CRUD Grid endpoint and schema resolver", | ||
"main": "./src/index.js", | ||
"main": "index.js", | ||
"homepage": "https://github.com/excellerify/lb3-excellerify-crudgrid-mixin", | ||
@@ -7,0 +7,0 @@ "keywords": [ |
@@ -1,3 +0,3 @@ | ||
var path = require('path'); | ||
const errors = require('loopback-common-errors'); | ||
var path = require("path"); | ||
const errors = require("loopback-common-errors"); | ||
@@ -13,4 +13,3 @@ function lowercaseFirstLetter(string) { | ||
const formSchema = require(path.resolve( | ||
__dirname, | ||
`../models/${modelName}/form.json` | ||
`./common/models/${modelName}/form.json` | ||
)); | ||
@@ -25,3 +24,3 @@ | ||
Model.findById(id, {include}).then( | ||
Model.findById(id, { include }).then( | ||
res => { | ||
@@ -35,3 +34,3 @@ if (!res) { | ||
fields: formSchema.fields, | ||
model: res, | ||
model: res | ||
}); | ||
@@ -46,14 +45,14 @@ }, | ||
Model.remoteMethod('form', { | ||
Model.remoteMethod("form", { | ||
accepts: { | ||
arg: 'id', | ||
type: 'any', | ||
arg: "id", | ||
type: "any" | ||
}, | ||
http: { | ||
verb: 'get', | ||
verb: "get" | ||
}, | ||
returns: { | ||
arg: 'schema', | ||
type: 'object', | ||
}, | ||
arg: "schema", | ||
type: "object" | ||
} | ||
}); | ||
@@ -64,4 +63,3 @@ } | ||
const gridSchema = require(path.resolve( | ||
__dirname, | ||
`../models/${modelName}/grid.json` | ||
`./common/models/${modelName}/grid.json` | ||
)); | ||
@@ -73,16 +71,16 @@ | ||
Model.remoteMethod('grid', { | ||
Model.remoteMethod("grid", { | ||
accepts: { | ||
arg: 'id', | ||
type: 'any', | ||
arg: "id", | ||
type: "any" | ||
}, | ||
http: { | ||
verb: 'get', | ||
verb: "get" | ||
}, | ||
returns: { | ||
arg: 'schema', | ||
type: 'string', | ||
}, | ||
arg: "schema", | ||
type: "string" | ||
} | ||
}); | ||
} | ||
}; |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
5022
77