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

bfn-proxy

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bfn-proxy - npm Package Compare versions

Comparing version 1.4.5 to 1.4.6

16

lib/api-run.js

@@ -18,5 +18,4 @@ 'use strict'

if (!query.id) return resEndJSON(res, 400, 'Bad Request');
var stdout = '', stderr = '', child;
if (query.exec) {
exec(query.exec, function(err, stdout, stderr){
exec(query.exec, function (err, stdout, stderr) {
if (err) return resEndJSON(res, 500, err);

@@ -26,12 +25,11 @@ resEndJSON(res, 200, {"success":true,"id":query.id,"done":true,"data":stdout||''});

} else if (query.file) {
child = spawn(query.file, JSON.parse(query.args||'[]'));
child.stdout.on('data', (data) => {
var stdout = '';
var child = spawn(query.file, JSON.parse(query.args||'[]'));
child.stdout.on('data', function (data) {
stdout += data.toString();
console.log(`stdout: ${data}`);
});
child.stderr.on('data', (data) => {
console.error(`stderr: ${data}`);
child.stderr.on('data', function (data) {
console.error('stderr: '+ data.toString());
});
child.on('close', (code) => {
console.log(`child process exited with code ${code}`);
child.on('close', function (code) {
if (code === 0) {

@@ -38,0 +36,0 @@ resEndJSON(res, 200, {"success":true,"id":query.id,"done":true,"data":stdout||''});

{
"name": "bfn-proxy",
"version": "1.4.5",
"version": "1.4.6",
"description": "HTTP request proxy middleware for node.js",

@@ -5,0 +5,0 @@ "author": "Blue Fidelity Inc. (https://www.bluefidelity.com/)",

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