refactor(doctor): remove command compatibility barrels · openclaw/openclaw@978b522
vincentkoc
·
2026-06-18
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -49,7 +49,7 @@ vi.mock("./doctor-config-audit-scrub.js", () => ({
|
49 | 49 | maybeScrubConfigAuditLog: vi.fn().mockResolvedValue(undefined), |
50 | 50 | })); |
51 | 51 | |
52 | | -vi.mock("./doctor-cron.js", () => ({ |
| 52 | +vi.mock("./doctor/cron/index.js", () => ({ |
53 | 53 | maybeRepairLegacyCronStore: vi.fn().mockResolvedValue(undefined), |
54 | 54 | noteLegacyWhatsAppCrontabHealthCheck: vi.fn().mockResolvedValue(undefined), |
55 | 55 | })); |
@@ -145,6 +145,6 @@ vi.mock("./doctor-heartbeat-template-repair.js", () => ({
|
145 | 145 | maybeRepairHeartbeatTemplate: vi.fn().mockResolvedValue(undefined), |
146 | 146 | })); |
147 | 147 | |
148 | | -vi.mock("./oauth-tls-preflight.js", () => ({ |
| 148 | +vi.mock("../plugins/provider-openai-chatgpt-oauth-tls.js", () => ({ |
149 | 149 | noteOpenAIOAuthTlsPrerequisites: vi.fn().mockResolvedValue(undefined), |
150 | 150 | })); |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -8,7 +8,7 @@ vi.mock("../../packages/terminal-core/src/note.js", () => ({
|
8 | 8 | note, |
9 | 9 | })); |
10 | 10 | |
11 | | -import { noteOpenAIOAuthTlsPrerequisites } from "./oauth-tls-preflight.js"; |
| 11 | +import { noteOpenAIOAuthTlsPrerequisites } from "../plugins/provider-openai-chatgpt-oauth-tls.js"; |
12 | 12 | |
13 | 13 | function buildOpenAICodexOAuthConfig(): OpenClawConfig { |
14 | 14 | return { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ import {
|
6 | 6 | formatOpenAIOAuthTlsPreflightFix, |
7 | 7 | runOpenAIOAuthTlsPreflight, |
8 | 8 | shouldRunOpenAIOAuthTlsPrerequisites, |
9 | | -} from "./oauth-tls-preflight.js"; |
| 9 | +} from "../plugins/provider-openai-chatgpt-oauth-tls.js"; |
10 | 10 | |
11 | 11 | describe("runOpenAIOAuthTlsPreflight", () => { |
12 | 12 | beforeEach(() => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -578,7 +578,7 @@ const openAIOAuthTlsCheck: HealthCheck = {
|
578 | 578 | formatOpenAIOAuthTlsPreflightFix, |
579 | 579 | runOpenAIOAuthTlsPreflight, |
580 | 580 | shouldRunOpenAIOAuthTlsPrerequisites, |
581 | | -} = await import("../commands/oauth-tls-preflight.js"); |
| 581 | +} = await import("../plugins/provider-openai-chatgpt-oauth-tls.js"); |
582 | 582 | if (!shouldRunOpenAIOAuthTlsPrerequisites({ cfg: ctx.cfg, deep: ctx.mode === "doctor" })) { |
583 | 583 | return []; |
584 | 584 | } |
@@ -604,7 +604,7 @@ const legacyWhatsAppCrontabCheck: HealthCheck = {
|
604 | 604 | source: "doctor", |
605 | 605 | async detect() { |
606 | 606 | const { collectLegacyWhatsAppCrontabHealthWarning } = |
607 | | -await import("../commands/doctor-cron.js"); |
| 607 | +await import("../commands/doctor/cron/index.js"); |
608 | 608 | const warning = await collectLegacyWhatsAppCrontabHealthWarning(); |
609 | 609 | if (!warning) { |
610 | 610 | return []; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -510,7 +510,7 @@ async function runConfigAuditScrubHealth(ctx: DoctorHealthFlowContext): Promise<
|
510 | 510 | |
511 | 511 | async function runLegacyCronHealth(ctx: DoctorHealthFlowContext): Promise<void> { |
512 | 512 | const { maybeRepairLegacyCronStore, noteLegacyWhatsAppCrontabHealthCheck } = |
513 | | -await import("../commands/doctor-cron.js"); |
| 513 | +await import("../commands/doctor/cron/index.js"); |
514 | 514 | await noteLegacyWhatsAppCrontabHealthCheck(); |
515 | 515 | await maybeRepairLegacyCronStore({ |
516 | 516 | cfg: ctx.cfg, |
@@ -572,7 +572,9 @@ async function runBrowserHealth(ctx: DoctorHealthFlowContext): Promise<void> {
|
572 | 572 | } |
573 | 573 | |
574 | 574 | async function runOpenAIOAuthTlsHealth(ctx: DoctorHealthFlowContext): Promise<void> { |
575 | | -const { noteOpenAIOAuthTlsPrerequisites } = await import("../commands/oauth-tls-preflight.js"); |
| 575 | +const { noteOpenAIOAuthTlsPrerequisites } = await import( |
| 576 | +"../plugins/provider-openai-chatgpt-oauth-tls.js" |
| 577 | +); |
576 | 578 | await noteOpenAIOAuthTlsPrerequisites({ |
577 | 579 | cfg: ctx.cfg, |
578 | 580 | deep: ctx.options.deep === true, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。