UNPKG

inngest

Version:

Official SDK for Inngest.com. Inngest is the reliability layer for modern applications. Inngest combines durable execution, events, and queues into a zero-infra platform with built-in observability.

26 lines (24 loc) 631 B
import { Middleware } from "../components/middleware/middleware.js"; //#region src/middleware/dependencyInjection.ts /** * Adds properties to the function input for every function created using this * app. */ const dependencyInjectionMiddleware = (ctx) => { class DependencyInjectionMiddleware extends Middleware.BaseMiddleware { id = "inngest:dependency-injection"; transformFunctionInput(arg) { return { ...arg, ctx: { ...arg.ctx, ...ctx } }; } } return DependencyInjectionMiddleware; }; //#endregion export { dependencyInjectionMiddleware }; //# sourceMappingURL=dependencyInjection.js.map