From e7365d41d3565a593dc84768845ed6a9e7e8e1bb Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Tue, 7 Jul 2026 14:53:20 -0700 Subject: [PATCH] refactor(deadcode): localize Parallels helpers (#101889) --- scripts/e2e/parallels/host-server.ts | 4 ++-- scripts/e2e/parallels/parallels-vm.ts | 4 ++-- scripts/e2e/parallels/plugin-isolation.ts | 2 +- scripts/e2e/parallels/provider-auth.ts | 6 +++--- scripts/e2e/parallels/snapshots.ts | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/e2e/parallels/host-server.ts b/scripts/e2e/parallels/host-server.ts index 406c537308b..784fb901b20 100644 --- a/scripts/e2e/parallels/host-server.ts +++ b/scripts/e2e/parallels/host-server.ts @@ -23,7 +23,7 @@ export function resolveHostIp(explicit = ""): string { return output; } -export function allocateHostPort(): number { +function allocateHostPort(): number { return Number( run( "python3", @@ -36,7 +36,7 @@ export function allocateHostPort(): number { ); } -export async function isHostPortFree(port: number): Promise { +async function isHostPortFree(port: number): Promise { return await new Promise((resolve) => { const server = createServer(); server.once("error", () => resolve(false)); diff --git a/scripts/e2e/parallels/parallels-vm.ts b/scripts/e2e/parallels/parallels-vm.ts index 9d3e5554b69..fef8bb10e43 100644 --- a/scripts/e2e/parallels/parallels-vm.ts +++ b/scripts/e2e/parallels/parallels-vm.ts @@ -17,13 +17,13 @@ export interface EnsureVmRunningOptions extends WaitForVmStatusOptions { transitionTimeoutMs?: () => number | undefined; } -export function listVmNames(): string[] { +function listVmNames(): string[] { return listVms() .map((item) => (item.name ?? "").trim()) .filter(Boolean); } -export function vmStatus(vmName: string, timeoutMs?: number): string { +function vmStatus(vmName: string, timeoutMs?: number): string { return listVms(timeoutMs).find((vm) => vm.name === vmName)?.status || "missing"; } diff --git a/scripts/e2e/parallels/plugin-isolation.ts b/scripts/e2e/parallels/plugin-isolation.ts index bb96f50aed7..252bdefc728 100644 --- a/scripts/e2e/parallels/plugin-isolation.ts +++ b/scripts/e2e/parallels/plugin-isolation.ts @@ -87,7 +87,7 @@ export function windowsCodexPlatformPackageRepairFunction(): string { }`; } -export function providerOnlyPluginId(modelId: string, fallbackPluginId: string): string { +function providerOnlyPluginId(modelId: string, fallbackPluginId: string): string { return providerIdFromModelId(modelId) || fallbackPluginId; } diff --git a/scripts/e2e/parallels/provider-auth.ts b/scripts/e2e/parallels/provider-auth.ts index c30f4f712e4..cf09ddd0e5a 100644 --- a/scripts/e2e/parallels/provider-auth.ts +++ b/scripts/e2e/parallels/provider-auth.ts @@ -100,7 +100,7 @@ export function resolveParallelsModelTimeoutSeconds(platform?: Platform): number return readPositiveIntEnv("OPENCLAW_PARALLELS_MODEL_TIMEOUT_S", defaultSeconds); } -export function providerTimeoutConfigJson( +function providerTimeoutConfigJson( modelId: string, platform: Platform, timeoutSeconds = resolveParallelsModelTimeoutSeconds(platform), @@ -128,7 +128,7 @@ export function providerTimeoutConfigJson( }); } -export function modelTransportConfigJson(modelId: string): string { +function modelTransportConfigJson(modelId: string): string { if (providerIdFromModelId(modelId) !== "openai") { return ""; } @@ -140,7 +140,7 @@ export function modelTransportConfigJson(modelId: string): string { }); } -export function configPathMapKey(key: string): string { +function configPathMapKey(key: string): string { return `[${JSON.stringify(key)}]`; } diff --git a/scripts/e2e/parallels/snapshots.ts b/scripts/e2e/parallels/snapshots.ts index 562b43feb3a..4c62f69d681 100644 --- a/scripts/e2e/parallels/snapshots.ts +++ b/scripts/e2e/parallels/snapshots.ts @@ -88,7 +88,7 @@ export function resolveSnapshot(vmName: string, hint: string): SnapshotInfo { return best; } -export function stringSimilarity(a: string, b: string): number { +function stringSimilarity(a: string, b: string): number { if (a === b) { return 1; }