refactor(cli): purge short hose alias and standardize on hose-use across docs, scripts, and prompts

This commit is contained in:
gitea committed 2026-09-06 22:26:04 +08:00
1 parent 304a8c0d98
commit 2f8bcb90c9
31 files changed
+190 -191

No files matched your search

+5 -5
View File
@@ -17,7 +17,7 @@ export async function handleWorkflowCommand(
if (!currentCorp) {
return {
stdout: "",
stderr: "未选中企业,请先通过 hose corps switch 或 --corp 指定企业\n",
stderr: "未选中企业,请先通过 hose-use corps switch 或 --corp 指定企业\n",
exitCode: 1,
};
}
@@ -52,7 +52,7 @@ export async function handleWorkflowCommand(
async function handleAnalyze(parsed: CliParsedArgs, runtime: CliRuntime): Promise<CliResult> {
const pipelineId = parsed.args[0] || stringOption(parsed.options, ["id", "pipelineId"]);
if (!pipelineId) return { stdout: "", stderr: "用法: hose workflow analyze <pipelineId>\n", exitCode: 1 };
if (!pipelineId) return { stdout: "", stderr: "用法: hose-use workflow analyze <pipelineId>\n", exitCode: 1 };
const clients = await createClientsForCorp(runtime.selectedCorp!);
const detail = await api.getWorkflowDetail(clients.easoClient, pipelineId);
const result = analyzeWorkflow(detail);
@@ -110,7 +110,7 @@ async function handleList(parsed: CliParsedArgs, runtime: CliRuntime): Promise<C
async function handleGet(parsed: CliParsedArgs, runtime: CliRuntime): Promise<CliResult> {
const pipelineId = parsed.args[0] || stringOption(parsed.options, ["id", "pipelineId"]);
if (!pipelineId) {
return { stdout: "", stderr: "用法: hose workflow get <pipelineId>\n", exitCode: 1 };
return { stdout: "", stderr: "用法: hose-use workflow get <pipelineId>\n", exitCode: 1 };
}
const clients = await createClientsForCorp(runtime.selectedCorp!);
@@ -152,7 +152,7 @@ async function handleFind(parsed: CliParsedArgs, runtime: CliRuntime): Promise<C
if (!taskType) {
return {
stdout: "",
stderr: "用法: hose workflow find --task=<节点类型> (如 code-js2, http, condition)\n",
stderr: "用法: hose-use workflow find --task=<节点类型> (如 code-js2, http, condition)\n",
exitCode: 1,
};
}
@@ -207,7 +207,7 @@ async function handleToggle(parsed: CliParsedArgs, runtime: CliRuntime): Promise
if (!pipelineId || stateArg === undefined) {
return {
stdout: "",
stderr: "用法: hose workflow toggle <pipelineId> --state=<1|0> (1启用, 0停用)\n",
stderr: "用法: hose-use workflow toggle <pipelineId> --state=<1|0> (1启用, 0停用)\n",
exitCode: 1,
};
}