gulp-endpoint
Advanced tools
+11
-1
@@ -89,2 +89,12 @@ var _ = require('lodash'); | ||
| } | ||
| /** | ||
| * If the content is a JSON object, and there is a status code | ||
| * property, then set the status code to that value: | ||
| */ | ||
| let data = JSON.parse(file.contents); | ||
| if (data && data.status) { | ||
| res.status(data.status); | ||
| } | ||
| res.send(file.contents); | ||
@@ -101,3 +111,3 @@ }); | ||
| action( | ||
| Object.assign({}, req.params, req.query, req.user), | ||
| Object.assign({}, req.params, req.query, { user: req.user }), | ||
| req.method === 'POST' ? src : undefined, | ||
@@ -104,0 +114,0 @@ dest, |
+2
-2
| { | ||
| "name": "gulp-endpoint", | ||
| "version": "0.10.1", | ||
| "version": "0.11.0", | ||
| "description": "A wrapper that presents a set of Gulp tasks as an API using Express.", | ||
@@ -19,3 +19,3 @@ "main": "index.js", | ||
| "express-jwt": "^5.1.0", | ||
| "highland": "^2.10.1", | ||
| "highland": "^2.10.2", | ||
| "lodash": "^3.10.0", | ||
@@ -22,0 +22,0 @@ "minimist": "^1.1.1", |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances 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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
12577
2.39%179
4.68%Updated