The path to the workflow file to compile.
OptionaloutDir: stringThe directory where the compiled workflow will be saved.
Whether to write the compiled workflow to the output directory. Defaults to true.
A promise that resolves to the compiled workflow.
Compiles a single workflow file from the specified path. Supports TypeScript, JavaScript, and JSON files. If the file is TypeScript or JavaScript, it imports the module and executes the default export, which should be a function that returns a workflow definition, i.e. defineWorkflow. If the file is JSON, it reads the content and calls defineWorkflow on it. If the write option is enabled, also saves the compiled workflow to the specified output directory.