refactor(status): remove unused gateway probe exports · openclaw/openclaw@c8fc2fe
vincentkoc
·
2026-06-18
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,6 @@ import {
|
6 | 6 | resolveGatewayProbeAuthSafeWithSecretInputs, |
7 | 7 | resolveGatewayProbeTarget, |
8 | 8 | } from "../gateway/probe-auth.js"; |
9 | | -export { pickGatewaySelfPresence } from "./gateway-presence.js"; |
10 | 9 | |
11 | 10 | /** Resolves gateway probe auth plus any non-secret warning about credential lookup. */ |
12 | 11 | export async function resolveGatewayProbeAuthResolution(cfg: OpenClawConfig): Promise<{ |
@@ -24,11 +23,3 @@ export async function resolveGatewayProbeAuthResolution(cfg: OpenClawConfig): Pr
|
24 | 23 | env: process.env, |
25 | 24 | }); |
26 | 25 | } |
27 | | - |
28 | | -/** Resolves only gateway probe auth material for callers that do not display warnings. */ |
29 | | -export async function resolveGatewayProbeAuth(cfg: OpenClawConfig): Promise<{ |
30 | | -token?: string; |
31 | | -password?: string; |
32 | | -}> { |
33 | | -return (await resolveGatewayProbeAuthResolution(cfg)).auth; |
34 | | -} |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -74,15 +74,13 @@ function createStatusScanDepsRuntimeModuleMock(
|
74 | 74 | } |
75 | 75 | |
76 | 76 | type StatusGatewayProbeModuleMock = { |
77 | | -pickGatewaySelfPresence: Mock<() => null>; |
78 | 77 | resolveGatewayProbeAuthResolution: StatusScanSharedMocks["resolveGatewayProbeAuthResolution"]; |
79 | 78 | }; |
80 | 79 | |
81 | 80 | function createStatusGatewayProbeModuleMock( |
82 | 81 | mocks: Pick<StatusScanSharedMocks, "resolveGatewayProbeAuthResolution">, |
83 | 82 | ): StatusGatewayProbeModuleMock { |
84 | 83 | return { |
85 | | -pickGatewaySelfPresence: vi.fn(() => null), |
86 | 84 | resolveGatewayProbeAuthResolution: mocks.resolveGatewayProbeAuthResolution, |
87 | 85 | }; |
88 | 86 | } |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | // Credential precedence parity tests keep call, probe, status, and auth surfaces |
2 | 2 | // aligned on local/remote gateway token and password resolution. |
3 | 3 | import { describe, expect, it } from "vitest"; |
4 | | -import { resolveGatewayProbeAuth as resolveStatusGatewayProbeAuth } from "../commands/status.gateway-probe.js"; |
| 4 | +import { resolveGatewayProbeAuthResolution } from "../commands/status.gateway-probe.js"; |
5 | 5 | import type { OpenClawConfig } from "../config/config.js"; |
6 | 6 | import { resolveGatewayAuth } from "./auth.js"; |
7 | 7 | import { resolveGatewayCredentialsFromConfig } from "./credentials.js"; |
@@ -156,7 +156,9 @@ describe("gateway credential precedence coverage", () => {
|
156 | 156 | mode, |
157 | 157 | env, |
158 | 158 | }); |
159 | | -const status = await withGatewayAuthEnv(env, () => resolveStatusGatewayProbeAuth(cfg)); |
| 159 | +const status = ( |
| 160 | +await withGatewayAuthEnv(env, () => resolveGatewayProbeAuthResolution(cfg)) |
| 161 | +).auth; |
160 | 162 | const auth = resolveGatewayAuth({ |
161 | 163 | authConfig: cfg.gateway?.auth, |
162 | 164 | env, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。