inngest / inngest-js

The developer platform for easily building reliable workflows with zero infrastructure for TypeScript & JavaScript
https://www.inngest.com/
GNU General Public License v3.0
440 stars 43 forks source link

[Feature] Inngest client & functions should provide the request object & env variables #383

Closed ShravanSunder closed 10 months ago

ShravanSunder commented 1 year ago

Is your feature request related to a problem? Please describe. Inngest client & functions should provide the request object & env variables

Describe the solution you'd like Provide the request object and env variables in inngest ctx so that we could use them or create our own middleware

Describe alternatives you've considered As a workaround i'm using globals for cloudflare resource bindings. This is NOT recommended due to the way workers are isolated.

Additional context Please see https://discord.com/channels/842170679536517141/1171064362044248154/1171102364850192405

cc: @jpwilliams

jpwilliams commented 10 months ago

@ShravanSunder - Added in v3.9.0.

See the Cloudflare Workers AI middleware example. 🙂