mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-19 23:11:39 +00:00
refactor(cli): remove obsolete gateway call options export (#106549)
This commit is contained in:
@@ -1263,7 +1263,6 @@ export const KNIP_UNUSED_EXPORT_BASELINE = [
|
||||
"src/cli/cron-cli/register.cron-simple.ts: loadCronJobForShow",
|
||||
"src/cli/daemon-cli/launchd-recovery.ts: LAUNCH_AGENT_RECOVERY_MESSAGE",
|
||||
"src/cli/daemon-cli/response.ts: buildDaemonHintItems",
|
||||
"src/cli/gateway-cli/call.ts: gatewayCallOpts",
|
||||
"src/cli/gateway-cli/qa-parent-watchdog.ts: QA_PARENT_PID_ENV",
|
||||
"src/cli/gateway-cli/qa-parent-watchdog.ts: QA_STAGED_RUNTIME_ROOT_ENV",
|
||||
"src/cli/gateway-cli/qa-parent-watchdog.ts: QA_TEMP_ROOT_ENV",
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// Shared gateway RPC command options and progress-wrapped CLI call helper.
|
||||
import type { Command } from "commander";
|
||||
// Progress-wrapped Gateway RPC helper shared by CLI command surfaces.
|
||||
import {
|
||||
GATEWAY_CLIENT_MODES,
|
||||
GATEWAY_CLIENT_NAMES,
|
||||
@@ -22,15 +21,6 @@ export type GatewayRpcOpts = {
|
||||
|
||||
const DEFAULT_GATEWAY_RPC_TIMEOUT_MS = 10_000;
|
||||
|
||||
export const gatewayCallOpts = (cmd: Command) =>
|
||||
cmd
|
||||
.option("--url <url>", "Gateway WebSocket URL (defaults to gateway.remote.url when configured)")
|
||||
.option("--token <token>", "Gateway token (if required)")
|
||||
.option("--password <password>", "Gateway password (password auth)")
|
||||
.option("--timeout <ms>", "Timeout in ms", "10000")
|
||||
.option("--expect-final", "Wait for final response (agent)", false)
|
||||
.option("--json", "Output JSON", false);
|
||||
|
||||
export const callGatewayCli = async (method: string, opts: GatewayRpcOpts, params?: unknown) => {
|
||||
const timeoutMs =
|
||||
opts.timeout === null
|
||||
|
||||
@@ -46,14 +46,6 @@ vi.mock("../../commands/gateway-status.js", () => ({
|
||||
}));
|
||||
|
||||
vi.mock("./call.js", () => ({
|
||||
gatewayCallOpts: (cmd: Command) =>
|
||||
cmd
|
||||
.option("--url <url>", "Gateway WebSocket URL")
|
||||
.option("--token <token>", "Gateway token")
|
||||
.option("--password <password>", "Gateway password")
|
||||
.option("--timeout <ms>", "Timeout in ms", "10000")
|
||||
.option("--expect-final", "Wait for final response (agent)", false)
|
||||
.option("--json", "Output JSON", false),
|
||||
callGatewayCli: (method: string, opts: unknown, params?: unknown) =>
|
||||
mocks.callGatewayCli(method, opts, params),
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user