-
Notifications
You must be signed in to change notification settings - Fork 74
feat: add express support #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| import * as e2e from './workflows/99_e2e.js'; | ||
|
|
||
| export const allWorkflows = { | ||
| 'workflows/0_calc.ts': demo, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 'workflows/0_calc.ts': demo, | |
| 'workflows/0_demo.ts': demo, |
The workflow file key name doesn't match the actual file. The key is 'workflows/0_calc.ts' but the file is actually named 0_demo.ts, making it unreachable.
View Details
Analysis
Workflow file key mismatch prevents accessing demo workflow
What fails: The allWorkflows object in _workflows.ts uses key 'workflows/0_calc.ts' but the actual file is named 0_demo.ts, making the demo workflow unreachable.
How to reproduce:
- Start the server with the workbench/express application
- Make a request to
/api/trigger?workflowFile=workflows/0_demo.ts&workflowFn=simple
Result: Returns 400 error: {"error": "Workflow file \"workflows/0_demo.ts\" not found", "status": 400}
Expected: Should successfully load and execute the demo workflow module from workbench/express/workflows/0_demo.ts
Root cause: In _workflows.ts line 12, the dictionary key was 'workflows/0_calc.ts' but no such file exists. The import at line 1 correctly points to './workflows/0_demo.js', and the actual file on disk is workflows/0_demo.ts. The lookup in trigger.routes.ts line 19 uses allWorkflows[workflowFile] which fails when users request the actual file name.
Fix: Changed line 12 from 'workflows/0_calc.ts': demo, to 'workflows/0_demo.ts': demo, to match the actual file name and import source.
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
d70cea0 to
731efac
Compare
No description provided.