Function: resolveWorkflowsPath()
resolveWorkflowsPath(
input,cwd?):string
Defined in: src/workflow-bundle/resolve-workflows-path.ts:43
Resolve a workflowsPath to a real file or directory, so a wrong path fails at startup with
the fix in the message instead of deep inside the bundler.
- Relative paths resolve against
cwd(defaultprocess.cwd()). - A missing extension is tried as
.ts,.js,.mjs,.cjs, then as a directoryindex.*. .tsand.jsare swapped when only the other exists: a path written for development (src/workflows.ts) still works fromdist/and the reverse.- Bare package specifiers (
@scope/workflows) are returned untouched; the SDK bundler resolves those itself. - Numeric ids (what a bundler such as webpack turns
require.resolveinto) are rejected.
Parameters
input
string
cwd?
string = ...
Returns
string