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

@globocom/backstage-functions-sandbox

Package Overview
Dependencies
Maintainers
4
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@globocom/backstage-functions-sandbox - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

8

lib/Sandbox.js

@@ -40,3 +40,9 @@ const vm = require('vm');

const defaultAsyncTimeout = 5000;
const codeFoot = 'return main.call(null, Backstage.request, Backstage.response);';
const codeFoot = (
'if (main.constructor.name === \'AsyncFunction\') {' +
'return main.call(null, Backstage.request, Backstage.response);' +
'} else {' +
'main.call(null, Backstage.request, Backstage.response);' +
'}'
);

@@ -43,0 +49,0 @@ class Sandbox {

2

package.json
{
"name": "@globocom/backstage-functions-sandbox",
"version": "0.3.1",
"version": "0.3.2",
"description": "Sandbox for Backstage functions",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -265,3 +265,3 @@ const expect = require('chai').expect;

const filename = 'test.js';
const code = 'function main(req){ return {a: 1}; }';
const code = 'function main(req, res){ res.send({ a: 1 }); return \'ok\'; }';
const script = testSandbox.compileCode(filename, code);

@@ -268,0 +268,0 @@

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