Clarify enterprise onboarding commands
This commit is contained in:
1 parent
941a1597c0
commit
50a8beb3fd
14 files changed
+74
-29
No files matched your search
@@ -195,6 +195,15 @@ describe("corps link onboarding", () => {
|
||||
});
|
||||
|
||||
describe("corp compatibility alias", () => {
|
||||
test("exposes add-hose-persistent as the canonical Hose onboarding command", async () => {
|
||||
setupConfigEnv();
|
||||
const result = await runCli(["corps", "add-hose-persistent", "--json", "{}"]);
|
||||
|
||||
expect(result.isError).toBe(true);
|
||||
expect(result.stderr).toContain("Missing required JSON field: appKey");
|
||||
expect(result.stderr).not.toContain("Unknown corps action");
|
||||
});
|
||||
|
||||
test("seal-use corp list executes and resolves cleanly like seal-use corps", async () => {
|
||||
setupConfigEnv();
|
||||
const result = await runCli(["corp", "list"]);
|
||||
|
||||
@@ -151,7 +151,7 @@ export async function handleCorpsCommand(action: string | undefined, maybeName:
|
||||
}
|
||||
|
||||
if (allCorps.length === 0) {
|
||||
console.error("提示:当前未检测到企业配置。你可以使用 seal-use corps add-hose 或 seal-use corps add-seal 添加企业,或运行 seal-use help 查看说明。");
|
||||
console.error("提示:当前未检测到企业配置。你可以使用 seal-use corps add-hose-persistent 或 seal-use corps add-seal 添加企业,或运行 seal-use help 查看说明。");
|
||||
} else if (isStrict && filtered.length === 0 && (action === "search" || action === "find") && rawQuery) {
|
||||
console.error(`提示:未在严格模式下匹配到企业 "${rawQuery}"。可以尝试省略 --strict 进行智能软搜索。`);
|
||||
}
|
||||
@@ -1003,7 +1003,10 @@ export async function handleCorpsCommand(action: string | undefined, maybeName:
|
||||
return;
|
||||
}
|
||||
|
||||
if (action === "add-hose") {
|
||||
if (action === "add-hose-persistent" || action === "add-hose") {
|
||||
if (action === "add-hose") {
|
||||
console.error("⚠️ Notice: 'add-hose' is a compatibility alias; use 'add-hose-persistent' for durable Hose credentials.");
|
||||
}
|
||||
const jsonPayload = jsonObject(args.json);
|
||||
const merged = {
|
||||
...jsonPayload,
|
||||
|
||||
Reference in new issue
Block a user