@decocms/runtime 1.0.0-alpha.33 → 1.0.0-alpha.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/tools.ts +2 -2
package/package.json
CHANGED
package/src/tools.ts
CHANGED
|
@@ -349,8 +349,8 @@ const toolsFor = <TSchema extends z.ZodTypeAny = never>({
|
|
|
349
349
|
outputSchema: OnEventsOutputSchema,
|
|
350
350
|
execute: async (input) => {
|
|
351
351
|
const env = input.runtimeContext.env;
|
|
352
|
-
// Get state from
|
|
353
|
-
const state = env as z.infer<TSchema>;
|
|
352
|
+
// Get state from MESH_REQUEST_CONTEXT - this has the binding values
|
|
353
|
+
const state = env.MESH_REQUEST_CONTEXT?.state as z.infer<TSchema>;
|
|
354
354
|
return Event.execute(
|
|
355
355
|
events.handlers!,
|
|
356
356
|
input.context.events,
|