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

@parameter1/micro

Package Overview
Dependencies
Maintainers
3
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parameter1/micro - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

4

package.json
{
"name": "@parameter1/micro",
"version": "2.3.0",
"version": "2.3.1",
"type": "module",

@@ -36,3 +36,3 @@ "description": "A wrapper for running JSON-based microservices.",

},
"gitHead": "87d26496a5b7a429f2a83ed0df544f5221c13099"
"gitHead": "841391bb5d6feb967be2e33f06cd4d9bb5411a1a"
}

@@ -26,2 +26,3 @@ import micro from 'micro';

logErrors = true,
stringify = JSON.stringify,
}) => async (req, res) => {

@@ -35,3 +36,3 @@ try {

const obj = buildResponse({ name, error: e, status });
send(res, status, obj);
send(res, status, stringify(obj));
if (e instanceof Error) {

@@ -38,0 +39,0 @@ if (logErrors === true) log(`${status} ${stack}`);

@@ -22,2 +22,3 @@ import micro from 'micro';

parse = JSON.parse,
stringify = JSON.stringify,
} = {}) => {

@@ -29,2 +30,3 @@ if (!name) throw new Error('No service name was provided.');

const actionHandler = async (req, res) => {
res.setHeader('Content-Type', 'application/json; charset=utf-8');
const body = await text(req, { limit });

@@ -49,3 +51,3 @@ const input = parse(body);

if (isFn(onActionEnd)) await onActionEnd(contextData);
return { data };
return stringify({ data });
};

@@ -62,3 +64,4 @@

logErrors,
stringify,
}));
};
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