mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 13:26:04 -06:00
fix(cli): stop emitting retired wide-area config (#121392)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
@@ -854,7 +854,6 @@ async function runGatewayPrompt(prompt: string): Promise<PromptResult> {
|
||||
},
|
||||
discovery: {
|
||||
mdns: { mode: "off" },
|
||||
wideArea: { enabled: false },
|
||||
},
|
||||
...(proxyPort
|
||||
? {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// CLI utility tests cover shared command helpers, option parsing, and output formatting.
|
||||
import { Command } from "commander";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { defaultRuntime } from "../runtime.js";
|
||||
import { runCommandWithRuntime } from "./cli-utils.js";
|
||||
import { registerDnsCli } from "./dns-cli.js";
|
||||
import { parseByteSize } from "./parse-bytes.js";
|
||||
@@ -129,6 +130,7 @@ describe("shouldSkipStartupEnvironmentRespawnForArgv", () => {
|
||||
describe("dns cli", () => {
|
||||
it("prints setup info (no apply)", async () => {
|
||||
const log = vi.spyOn(console, "log").mockImplementation(() => {});
|
||||
const writeJson = vi.spyOn(defaultRuntime, "writeJson").mockImplementation(() => {});
|
||||
try {
|
||||
const program = new Command();
|
||||
registerDnsCli(program);
|
||||
@@ -136,7 +138,12 @@ describe("dns cli", () => {
|
||||
const output = log.mock.calls.map((call) => call.join(" ")).join("\\n");
|
||||
expect(output).toContain("DNS setup");
|
||||
expect(output).toContain("openclaw.internal");
|
||||
expect(writeJson).toHaveBeenCalledWith({
|
||||
gateway: { bind: "auto" },
|
||||
discovery: { wideArea: { domain: "openclaw.internal." } },
|
||||
});
|
||||
} finally {
|
||||
writeJson.mockRestore();
|
||||
log.mockRestore();
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -177,7 +177,7 @@ export function registerDnsCli(program: Command) {
|
||||
);
|
||||
defaultRuntime.writeJson({
|
||||
gateway: { bind: "auto" },
|
||||
discovery: { wideArea: { enabled: true, domain: wideAreaDomain } },
|
||||
discovery: { wideArea: { domain: wideAreaDomain } },
|
||||
});
|
||||
defaultRuntime.log("");
|
||||
defaultRuntime.log(theme.heading("Tailscale admin (DNS → Nameservers):"));
|
||||
|
||||
@@ -936,7 +936,7 @@ describe("gateway-status command", () => {
|
||||
config: {
|
||||
...createSecretRefGatewayConfig({ gatewayMode: "remote" }),
|
||||
discovery: {
|
||||
wideArea: { enabled: true },
|
||||
wideArea: { domain: "openclaw.internal" },
|
||||
},
|
||||
},
|
||||
issues: [],
|
||||
|
||||
@@ -228,7 +228,8 @@ export function extractConfigSummary(snapshotUnknown: unknown): GatewayConfigSum
|
||||
const remoteTokenConfigured = hasConfiguredSecretInput(remote.token, secretDefaults);
|
||||
const remotePasswordConfigured = hasConfiguredSecretInput(remote.password, secretDefaults);
|
||||
|
||||
const wideAreaEnabled = typeof wideArea.enabled === "boolean" ? wideArea.enabled : null;
|
||||
const wideAreaEnabled =
|
||||
typeof wideArea.domain === "string" ? wideArea.domain.trim().length > 0 : null;
|
||||
|
||||
return {
|
||||
path,
|
||||
|
||||
Reference in New Issue
Block a user