@http4t/lambda
Advanced tools
Comparing version 0.3.63 to 0.4.109
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,10 +10,8 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.lambda = void 0; | ||
const bodies_1 = require("@http4t/core/bodies"); | ||
const uri_1 = require("@http4t/core/uri"); | ||
import { bufferText } from "@http4t/core/bodies"; | ||
import { Uri } from "@http4t/core/uri"; | ||
function toHttpRequest(event) { | ||
return { | ||
method: event.httpMethod.toUpperCase(), | ||
uri: uri_1.Uri.parse(event.path), | ||
uri: Uri.parse(event.path), | ||
headers: [ | ||
@@ -50,7 +47,7 @@ ...Object.entries(event.headers), | ||
statusCode: response.status, | ||
body: yield bodies_1.bufferText(response.body) | ||
body: yield bufferText(response.body) | ||
}); | ||
}); | ||
} | ||
function lambda(handler) { | ||
export function lambda(handler) { | ||
return (event) => __awaiter(this, void 0, void 0, function* () { | ||
@@ -62,3 +59,2 @@ const request = toHttpRequest(event); | ||
} | ||
exports.lambda = lambda; | ||
//# sourceMappingURL=apiGateway.js.map |
{ | ||
"name": "@http4t/lambda", | ||
"version": "0.3.63", | ||
"version": "0.4.109", | ||
"license": "Apache-2.0", | ||
@@ -9,3 +9,3 @@ "scripts": { | ||
"dependencies": { | ||
"@http4t/core": "0.3.63", | ||
"@http4t/core": "0.4.109", | ||
"@types/aws-lambda": "^8.10.66" | ||
@@ -12,0 +12,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
20665
111
+ Added@http4t/core@0.4.109(transitive)
- Removed@http4t/core@0.3.63(transitive)
Updated@http4t/core@0.4.109