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

metacom

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metacom - npm Package Compare versions

Comparing version 3.0.5 to 3.0.6

16

lib/transport.js

@@ -110,2 +110,11 @@ 'use strict';

log(code) {
const { server, req, ip } = this;
const { console } = server;
const { url, method } = req;
const msg = `${ip}\t${method}\t${url}\t${code}`;
if (code >= 200 && code <= 299) console.debug(msg);
else console.error(msg);
}
send(obj, code = 200) {

@@ -128,6 +137,11 @@ const data = JSON.stringify(obj);

write(data, httpCode = 200, ext = 'json', options = {}) {
this.log(httpCode);
const { res } = this;
if (res.writableEnded) return;
const streaming = data instanceof Readable;
const mimeType = MIME_TYPES[ext] || MIME_TYPES.html;
let mimeType = MIME_TYPES.html;
if (httpCode === 200) {
const fileType = MIME_TYPES[ext];
if (fileType) mimeType = fileType;
}
const headers = { ...HEADERS, 'Content-Type': mimeType };

@@ -134,0 +148,0 @@ if (httpCode === 206) {

2

package.json
{
"name": "metacom",
"version": "3.0.5",
"version": "3.0.6",
"author": "Timur Shemsedinov <timur.shemsedinov@gmail.com>",

@@ -5,0 +5,0 @@ "description": "Communication protocol for Metarhia stack with rpc, events, binary streams, memory and db access",

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