🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

queue-run-lambda

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

queue-run-lambda - npm Package Compare versions

Comparing version

to
0.4.0

dist/index.mjs

21

package.json
{
"name": "queue-run-lambda",
"version": "0.3.0",
"main": "dist/index.js",
"directories": {
"lib": "dist"
"version": "0.4.0",
"module": "dist/index.mjs",
"exports": {
".": "./dist/index.mjs"
},
"type": "module",
"scripts": {
"build": "rm -rf dist && yarn build:bundle",
"build:bundle": "yarn esbuild src/index.ts --bundle --platform=node --target=node14 --outfile=dist/index.js --external:queue-run",
"build:bundle": "yarn esbuild src/index.ts --bundle --platform=node --target=node14 --outfile=dist/index.mjs --format=esm --inject:./src/require_shim.js --sourcemap --external:queue-run",
"lint": "yarn eslint src/**/*.ts",
"prepare": "yarn build",
"watch": "yarn build:bundle --watch"
"watch": "rm -rf dist && yarn build:bundle --watch"
},

@@ -19,5 +20,5 @@ "files": [

],
"dependencies": {
"@aws-sdk/client-sqs": "^3.45.0",
"queue-run": "^0.3.0",
"devDependencies": {
"@aws-sdk/client-sqs": "^3.46.0",
"queue-run": "^0.4.0",
"tiny-invariant": "^1.2.0"

@@ -28,3 +29,3 @@ },

},
"gitHead": "b8f105c221b1723761dc0054cfb9c676ca8773c1"
"gitHead": "b13af8e75d525406ba60cef32d56e8e85d3a1202"
}

@@ -6,3 +6,1 @@ # Severless Runtime using AWS Lambda

It uses Lambda for all backends, SQS for queues, API Gateway for HTTP and WebSockets, and DynamoDB for WS sessions.
When you use `npx queue-run setup` it deploys this runtime as a Lambda Layer "qr-runtime".

@@ -100,7 +100,6 @@ import {

const hasBody = method !== "GET" && method !== "HEAD";
const body = hasBody
? event.body && event.isBase64Encoded
const body =
hasBody && event.body && event.isBase64Encoded
? Buffer.from(event.body, "base64")
: event.body
: undefined;
: event.body ?? null;
return new Request(url, { body, headers, method });

@@ -111,3 +110,3 @@ } else {

const body =
hasBody && event.body ? Buffer.from(event.body, "base64") : undefined;
hasBody && event.body ? Buffer.from(event.body, "base64") : null;
return new Request(url, { body, headers, method });

@@ -159,3 +158,3 @@ }

? ""
: (await response.buffer()).toString("base64"),
: Buffer.from(await response.arrayBuffer()).toString("base64"),
isBase64Encoded: true,

@@ -162,0 +161,0 @@ headers: Object.fromEntries(Array.from(response.headers.entries())),

@@ -8,2 +8,4 @@ import { LocalStorage } from "queue-run";

): Promise<APIGatewayResponse> {
console.log(event);
newLocalStorage();
return {

@@ -10,0 +12,0 @@ statusCode: 200,