Comparing version 0.7.0 to 0.8.0
18
index.js
@@ -33,3 +33,5 @@ 'use strict'; // FIXME copyright | ||
catch (e) { | ||
e.args = [this.id, params, budget]; | ||
e.waf = { | ||
args: [this.id, params, budget] | ||
}; | ||
throw e; | ||
@@ -40,2 +42,15 @@ } | ||
} | ||
if (res.status === 'error') { | ||
const err = new Error('runPowerWAF returned an error'); | ||
err.waf = res; | ||
if (res.error_code === Binding.PW_ERR_INVALID_CALL) { | ||
err.waf.args = [this.id, params, budget]; | ||
} | ||
err.waf.waf_rule = this.id; | ||
delete err.waf.status; | ||
throw err; | ||
} | ||
const ret = {}; | ||
@@ -65,1 +80,2 @@ if (res.data) { | ||
module.exports.PW_ERR_INVALID_CALL = Binding.PW_ERR_INVALID_CALL; |
{ | ||
"name": "sq-native", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"description": "Node.js binding for libsqreen", | ||
@@ -17,3 +17,3 @@ "main": "index.js", | ||
"module_path": "./bindings/{node_napi_label}", | ||
"remote_path": "./nodejs/libsqreen/b20190925.6/{platform}-{libc}/{arch}/", | ||
"remote_path": "./nodejs/libsqreen/b20191003.5/{platform}-{libc}/{arch}/", | ||
"package_name": "{node_napi_label}.tar.gz", | ||
@@ -20,0 +20,0 @@ "host": "https://sqreen-download-public.s3-eu-west-1.amazonaws.com/", |
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
2586
65