feat(workflow): implement script linting and offline sandbox evaluation
This commit is contained in:
1 parent
97eaed1066
commit
d293bb47a4
10 files changed
+1255
-3
No files matched your search
@@ -13,6 +13,7 @@ import { handleDelete } from "./delete.js";
|
||||
import { handleCreate } from "./create.js";
|
||||
import { handleNodeCommand } from "./node.js";
|
||||
import { handleWorkflowTailCommand } from "./tail.js";
|
||||
import { handleWorkflowLintScript, handleWorkflowEvalScript } from "./script.js";
|
||||
|
||||
export async function handleWorkflowCommand(
|
||||
parsed: CliParsedArgs,
|
||||
@@ -98,10 +99,19 @@ export async function handleWorkflowCommand(
|
||||
case "watch":
|
||||
case "follow":
|
||||
return handleWorkflowTailCommand(parsed, runtime);
|
||||
case "lint-script":
|
||||
case "lint":
|
||||
case "lint-code":
|
||||
return handleWorkflowLintScript(parsed, runtime);
|
||||
case "eval-script":
|
||||
case "eval":
|
||||
case "eval-code":
|
||||
case "run-script":
|
||||
return handleWorkflowEvalScript(parsed, runtime);
|
||||
default:
|
||||
return {
|
||||
stdout: "",
|
||||
stderr: `未知 workflow 子命令: ${action}。支持: list, get, find, analyze, toggle, publish, patch, save, history, logs, job, diff, diff-job, check, test, copy, create, delete, node, tail\n`,
|
||||
stderr: `未知 workflow 子命令: ${action}。支持: list, get, find, analyze, toggle, publish, patch, save, history, logs, job, diff, diff-job, check, test, copy, create, delete, node, tail, lint-script, eval-script\n`,
|
||||
exitCode: 1,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user