Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mcma/aws-lambda-worker-invoker

Package Overview
Dependencies
Maintainers
3
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mcma/aws-lambda-worker-invoker - npm Package Compare versions

Comparing version 0.13.17 to 0.13.18

6

dist/lib/lambda-worker-invoker.d.ts

@@ -0,5 +1,7 @@

import { Lambda } from "aws-sdk";
import { WorkerInvoker, WorkerRequestProperties } from "@mcma/worker-invoker";
export declare function invokeLambdaWorker(workerFunctionId: string, workerRequest: WorkerRequestProperties): Promise<void>;
export declare class LambdaWorkerInvoker extends WorkerInvoker {
constructor();
private lambda;
constructor(lambda?: Lambda);
protected invokeWorker(workerFunctionId: string, workerRequest: WorkerRequestProperties): Promise<void>;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LambdaWorkerInvoker = exports.invokeLambdaWorker = void 0;
exports.LambdaWorkerInvoker = void 0;
const aws_sdk_1 = require("aws-sdk");
const worker_invoker_1 = require("@mcma/worker-invoker");
const lambdaClient = new aws_sdk_1.Lambda({ apiVersion: "2015-03-31" });
async function invokeLambdaWorker(workerFunctionId, workerRequest) {
await lambdaClient.invoke({
FunctionName: workerFunctionId,
InvocationType: "Event",
LogType: "None",
Payload: JSON.stringify({
operationName: workerRequest.operationName,
input: workerRequest.input,
tracker: workerRequest.tracker,
})
}).promise();
}
exports.invokeLambdaWorker = invokeLambdaWorker;
class LambdaWorkerInvoker extends worker_invoker_1.WorkerInvoker {
constructor() {
super(invokeLambdaWorker);
constructor(lambda = new aws_sdk_1.Lambda({ apiVersion: "2015-03-31" })) {
super();
this.lambda = lambda;
}
async invokeWorker(workerFunctionId, workerRequest) {
await this.lambda.invoke({
FunctionName: workerFunctionId,
InvocationType: "Event",
LogType: "None",
Payload: JSON.stringify({
operationName: workerRequest.operationName,
input: workerRequest.input,
tracker: workerRequest.tracker,
})
}).promise();
}
}
exports.LambdaWorkerInvoker = LambdaWorkerInvoker;
{
"name": "@mcma/aws-lambda-worker-invoker",
"version": "0.13.17",
"version": "0.13.18",
"description": "Node module with code for invoking MCMA workers running as Lambda functions, via the AWS SDK",
"engines": {
"node": "~10.16.3"
"node": "^12.19.0"
},

@@ -37,8 +37,8 @@ "type": "commonjs",

"peerDependencies": {
"@mcma/core": "0.13.17",
"@mcma/worker-invoker": "0.13.17"
"@mcma/core": "0.13.18",
"@mcma/worker-invoker": "0.13.18"
},
"devDependencies": {
"@mcma/core": "0.13.17",
"@mcma/worker-invoker": "0.13.17",
"@mcma/core": "0.13.18",
"@mcma/worker-invoker": "0.13.18",
"@types/node": "^13.7.6",

@@ -45,0 +45,0 @@ "jasmine": "^3.2.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