mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
5b5b36a03b
- Remove debug logging from bench.bench.ts - Remove awaitReturnValue() wrapper, use run.returnValue directly in benchmarks - Add changeset for Nitro builder manifest fix - Refactor hookWorkflow tests to call getHookByToken()/resumeHook() directly (pass hook object to resumeHook to avoid duplicate lookups) - Refactor queue-based health check test to call healthCheck() directly - Assert specific error message for invalid hook token test - Remove /api/hook and /api/test-health-check endpoints from all workbench apps (nextjs-turbopack, nextjs-webpack, vite, hono, express, fastify, sveltekit, astro, nuxt, nitro-v2, nitro-v3, nest, example)
23 lines
865 B
TypeScript
23 lines
865 B
TypeScript
import { Body, Controller, Post } from '@nestjs/common';
|
|
|
|
@Controller('api')
|
|
export class AppController {
|
|
@Post('test-direct-step-call')
|
|
async invokeStepDirectly(@Body() body: { x: number; y: number }) {
|
|
// This route tests calling step functions directly outside of any workflow context
|
|
// After the SWC compiler changes, step functions in client mode have their directive removed
|
|
// and keep their original implementation, allowing them to be called as regular async functions
|
|
const { add } = await import('./workflows/98_duplicate_case.js');
|
|
|
|
const { x, y } = body;
|
|
|
|
console.log(`Calling step function directly with x=${x}, y=${y}`);
|
|
|
|
// Call step function directly as a regular async function (no workflow context)
|
|
const result = await add(x, y);
|
|
console.log(`add(${x}, ${y}) = ${result}`);
|
|
|
|
return { result };
|
|
}
|
|
}
|