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

lambda-request-handler

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lambda-request-handler - npm Package Compare versions

Comparing version 0.2.0-beta.1 to 0.2.0-beta.2

dist/compile/setCookieVariations.d.ts

13

dist/compile/fixResponseHeaders.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const setCookieVariations_1 = __importDefault(require("./setCookieVariations"));
const fixResponseHeaders = (headers, supportMultiHeaders) => {

@@ -9,4 +13,11 @@ const multiValueHeaders = {};

const values = headers[k];
singleValueHeaders[k] = values[values.length - 1];
multiValueHeaders[k] = values;
if (k === 'set-cookie') {
values.forEach((value, i) => {
singleValueHeaders[setCookieVariations_1.default[i]] = value;
});
}
else {
singleValueHeaders[k] = values.join(',');
}
}

@@ -13,0 +24,0 @@ else {

19

dist/compile/lambda.js

@@ -20,10 +20,13 @@ "use strict";

.then(app => {
const reqOptions = eventToRequestOptions_1.default(event);
const appHandler = in_process_request_1.default(app);
return appHandler(reqOptions);
})
.then(res => response_1.inProcessResponseToLambdaResponse(res, eventWithMultiValueHeaders(event)))
.catch(e => {
console.error(e);
return response_1.errorResponse();
return Promise.resolve()
.then(() => {
const reqOptions = eventToRequestOptions_1.default(event);
const appHandler = in_process_request_1.default(app);
return appHandler(reqOptions);
})
.then(res => response_1.inProcessResponseToLambdaResponse(res, eventWithMultiValueHeaders(event)))
.catch(e => {
console.error(e);
return response_1.errorResponse();
});
});

@@ -30,0 +33,0 @@ };

{
"name": "lambda-request-handler",
"version": "0.2.0-beta.1",
"version": "0.2.0-beta.2",
"license": "(MIT OR Apache-2.0)",

@@ -8,3 +8,3 @@ "scripts": {

"compile": "tsc",
"test": "jest"
"test": "jest --coverage"
},

@@ -11,0 +11,0 @@ "files": [

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