New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@blockless/gateway-core

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blockless/gateway-core - npm Package Compare versions

Comparing version

to
0.0.24

12

dist/helpers/functions.js

@@ -146,5 +146,7 @@ "use strict";

let type = 'text/html';
if (data.result.startsWith('data:')) {
const bufferData = data.result.split(',')[1];
const contentType = data.result.split(',')[0].split(':')[1].split(';')[0];
const payload = data.results && data.results.length > 0 ? data.results[0].result : data.result || '';
const payloadBody = typeof payload === 'string' ? payload : payload.stdout || payload.stderr;
if (payloadBody.startsWith('data:')) {
const bufferData = payloadBody.split(',')[1];
const contentType = payloadBody.split(',')[0].split(':')[1].split(';')[0];
const base64data = Buffer.from(bufferData, 'base64');

@@ -156,3 +158,3 @@ type = contentType;

try {
JSON.parse(data.result);
JSON.parse(payloadBody);
type = 'application/json';

@@ -163,3 +165,3 @@ }

}
body = data.result;
body = payloadBody;
}

@@ -166,0 +168,0 @@ return {

@@ -17,2 +17,11 @@ export interface IHeadNodePayload {

result: string;
results: {
result: {
stdout: string;
stderr: string;
exit_code: number;
};
peerds: string[];
frequency: number;
}[];
}

@@ -38,2 +38,8 @@ import mongoose from 'mongoose';

permissions: string[];
modules: {
file: string;
name: string;
type: string;
md5: string;
}[];
}

@@ -40,0 +46,0 @@ export interface IFunctionEnvVarRecord {

@@ -122,6 +122,6 @@ "use strict";

function_id: functionId,
method: manifest.entry,
method: manifest.modules && manifest.modules.length > 0 ? manifest.modules[0].file : manifest.entry,
parameters: null,
config: {
permissions: [...manifest.permissions],
permissions: manifest.permissions ? [...manifest.permissions] : [],
env_vars: [...envVars],

@@ -128,0 +128,0 @@ stdin: stdin ? stdin.value : '',

{
"name": "@blockless/gateway-core",
"version": "0.0.21",
"version": "0.0.24",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet