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

do-local-functions

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

do-local-functions - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

10

local-functions.js

@@ -71,7 +71,9 @@ #!/usr/bin/env node

return new Promise((resolve, reject) => {
const script = `require("./${route.entrypoint}").${
route.action.main ?? 'main'
}(JSON.parse(process.argv[1])).then((result) => console.log("RESULT:" + JSON.stringify(result))).catch((err) => console.error(JSON.stringify(err)));`;
const script = `require("./${route.entrypoint}").${route.action.main ?? 'main'}(${JSON.stringify(
params
)}).then((result) => console.log("RESULT:" + JSON.stringify(result))).catch((err) => console.error(JSON.stringify(err)));`;
exec(`node -e '${script}' "${JSON.stringify(params).replace(/"/g, '\\"')}"`, { cwd: route.path }, (error, stdout, stderr) => {
const random = Math.random().toString(36).substring(7);
exec(`node <<'EOF_${random}_'\n${script}\nEOF_${random}_\n`, { cwd: route.path }, (error, stdout, stderr) => {
if (error) {

@@ -78,0 +80,0 @@ reject(stderr);

2

package.json
{
"name": "do-local-functions",
"version": "0.0.6",
"version": "0.0.7",
"bin": {

@@ -5,0 +5,0 @@ "local-functions": "./local-functions.js"

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