feat(workflow): implement workflow copy and delete lifecycle commands
This commit is contained in:
1 parent
fec25bff8a
commit
b043cb614e
9 files changed
+521
-2
No files matched your search
@@ -8,6 +8,8 @@ import { handleCheck } from "./check.js";
|
||||
import { handleAnalyze } from "./analyze.js";
|
||||
import { handleWorkflowDiff, handleWorkflowDiffJob } from "./diff.js";
|
||||
import { handleWorkflowTest } from "./test.js";
|
||||
import { handleCopy } from "./copy.js";
|
||||
import { handleDelete } from "./delete.js";
|
||||
|
||||
export async function handleWorkflowCommand(
|
||||
parsed: CliParsedArgs,
|
||||
@@ -74,10 +76,18 @@ export async function handleWorkflowCommand(
|
||||
case "debug":
|
||||
case "run-test":
|
||||
return handleWorkflowTest(parsed, runtime);
|
||||
case "copy":
|
||||
case "cp":
|
||||
case "clone":
|
||||
return handleCopy(parsed, runtime);
|
||||
case "delete":
|
||||
case "rm":
|
||||
case "remove":
|
||||
return handleDelete(parsed, runtime);
|
||||
default:
|
||||
return {
|
||||
stdout: "",
|
||||
stderr: `未知 workflow 子命令: ${action}。支持: list, get, find, analyze, toggle, publish, patch, save, history, logs, job, diff, diff-job, check, test, debug\n`,
|
||||
stderr: `未知 workflow 子命令: ${action}。支持: list, get, find, analyze, toggle, publish, patch, save, history, logs, job, diff, diff-job, check, test, copy, delete\n`,
|
||||
exitCode: 1,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user