couchdb-eval
Advanced tools
Comparing version 1.0.2 to 1.0.3
10
index.js
@@ -19,2 +19,4 @@ /* | ||
var PouchPluginError = require("pouchdb-plugin-error"); | ||
exports.evaluate = function (requireContext, extraVars, program) { | ||
@@ -74,7 +76,7 @@ /*jshint evil:true, unused: false */ | ||
} catch (e) { | ||
throw { | ||
throw new PouchPluginError({ | ||
"name": "compilation_error", | ||
"status": 500, | ||
"message": "Expression does not eval to a function. " + program | ||
}; | ||
}); | ||
} | ||
@@ -85,7 +87,7 @@ return func; | ||
exports.wrapExecutionError = function (e) { | ||
return { | ||
return new PouchPluginError({ | ||
name: e.name, | ||
message: e.toString() + "\n\n" + e.stack, | ||
status: 500 | ||
}; | ||
}); | ||
}; |
{ | ||
"name": "couchdb-eval", | ||
"main": "index.js", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Compiles a piece of code to a function object, providing a CouchDB-like JavaScript context.", | ||
@@ -11,5 +11,14 @@ "repository": { | ||
"bugs": "https://bugs.launchpad.net/python-pouchdb", | ||
"keywords": ["pouch", "pouchdb", "couch", "couchdb", "eval"], | ||
"keywords": [ | ||
"pouch", | ||
"pouchdb", | ||
"couch", | ||
"couchdb", | ||
"eval" | ||
], | ||
"license": "Apache-2.0", | ||
"author": "Marten de Vries", | ||
"dependencies": { | ||
"pouchdb-plugin-error": "^0.2.0" | ||
}, | ||
"devDependencies": { | ||
@@ -16,0 +25,0 @@ "es3ify": "^0.1.3" |
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
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
3388
80
1
2
+ Addedpouchdb-plugin-error@^0.2.0
+ Addedpouchdb-plugin-error@0.2.0(transitive)