Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/cli/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -775,10 +775,9 @@ async function importWorkflows(
// extract workflow exports (named and default)
for (const [key, value] of Object.entries(module)) {
if (isWorkflow(value)) {
const workflow = value as Workflow<unknown, unknown, unknown>;
workflows.push(workflow);
workflows.push(value);
consola.debug(
`Found workflow "${workflow.spec.name}" in ${file} (${key})`,
`Found workflow "${value.spec.name}" in ${file} (${key})`,
);
}
}
Expand Down
4 changes: 3 additions & 1 deletion packages/openworkflow/core/workflow-definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ export function defineWorkflow<Input, Output, RawInput>(
* @param value - The value to check
* @returns True if the value is a Workflow
*/
export function isWorkflow(value: unknown) {
export function isWorkflow(
value: unknown,
): value is Workflow<unknown, unknown, unknown> {
if (typeof value !== "object" || value === null) {
return false;
}
Expand Down
Loading