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

@zohocatalyst/catalyst-functions-utils

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zohocatalyst/catalyst-functions-utils - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

src/functionMocker/flavours/utils/index.js

2

package.json
{
"name": "@zohocatalyst/catalyst-functions-utils",
"version": "0.0.1",
"version": "0.0.2",
"description": "catalyst function utils",

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

const UTIL = require('util'), QUERY_STRING = require('querystring'), URL = require('url');
const MAX_OUTPUT_SIZE = 1 * 1024; //1mb
const CUSTOM_UTIL = require('./utils');

@@ -22,4 +23,5 @@ function constructBasicIO(RESPONSE, QUERY_STRING, BODY) {

function constructApplicationContext(RESPONSE) {
function constructApplicationContext(REQUEST, RESPONSE) {
return {
catalystHeaders: CUSTOM_UTIL.getCatalystHeaders(REQUEST),
close: () => RESPONSE.end(),

@@ -45,3 +47,3 @@ log: (...args) => console.log(...args)

resolve([
constructApplicationContext(RESPONSE),
constructApplicationContext(REQUEST, RESPONSE),
constructBasicIO(RESPONSE, QUERY_STRING.parse(URL.parse(REQUEST.url).query), body)

@@ -48,0 +50,0 @@ ]);

@@ -1,2 +0,4 @@

function constructApplicationContext(RESPONSE) {
const CUSTOM_UTIL = require('./utils');
function constructApplicationContext(REQUEST, RESPONSE) {
const EVENT_FUNCTION_MAX_TIME_MS = process.env.CATALYST_MAX_TIMEOUT;

@@ -8,2 +10,3 @@ const EVENT_FUNCTION_TIMEOUT_BUFFER_MS = 500;

return {
catalystHeaders: CUSTOM_UTIL.getCatalystHeaders(REQUEST),
endWithSuccess: () => {

@@ -61,3 +64,3 @@ RESPONSE.writeHead(200);

constructEventDetails(body),
constructApplicationContext(RESPONSE)
constructApplicationContext(REQUEST, RESPONSE)
]);

@@ -64,0 +67,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