From 4f528b1c779cd607eb1110f36561fe147d21f088 Mon Sep 17 00:00:00 2001 From: A <258483684+la14-1@users.noreply.github.com> Date: Sun, 8 Mar 2026 05:51:25 -0700 Subject: [PATCH] refactor: remove unnecessary exports and fix stale comment (#2338) - Remove `export` from `verifyOpenrouterKey` in shared/oauth.ts (only used internally) - Remove `export` from `tcpCheck` in shared/ssh.ts (only used internally) - Fix stale comment in commands/index.ts referencing non-existent `./commands.js` Co-authored-by: spawn-qa-bot Co-authored-by: L <6723574+louisgv@users.noreply.github.com> --- packages/cli/src/commands/index.ts | 2 +- packages/cli/src/shared/oauth.ts | 2 +- packages/cli/src/shared/ssh.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index 8e23891f..77523d80 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -1,4 +1,4 @@ -// Barrel re-export — keeps all existing `import { ... } from "./commands.js"` working. +// Barrel re-export — all command modules re-exported from this index. // run.ts — cmdRun, cmdRunHeadless, script failure guidance export type { HeadlessOptions } from "./run.js"; diff --git a/packages/cli/src/shared/oauth.ts b/packages/cli/src/shared/oauth.ts index e958b191..0a691f8e 100644 --- a/packages/cli/src/shared/oauth.ts +++ b/packages/cli/src/shared/oauth.ts @@ -16,7 +16,7 @@ const OAuthKeySchema = v.object({ // ─── Key Validation ────────────────────────────────────────────────────────── -export async function verifyOpenrouterKey(apiKey: string): Promise { +async function verifyOpenrouterKey(apiKey: string): Promise { if (!apiKey) { return false; } diff --git a/packages/cli/src/shared/ssh.ts b/packages/cli/src/shared/ssh.ts index 58710dad..4c3c56c0 100644 --- a/packages/cli/src/shared/ssh.ts +++ b/packages/cli/src/shared/ssh.ts @@ -141,7 +141,7 @@ export function killWithTimeout( * Returns true if the connection succeeds within `timeoutMs`, false otherwise. * This is much cheaper than a full SSH handshake attempt. */ -export function tcpCheck(host: string, port: number, timeoutMs = 2000): Promise { +function tcpCheck(host: string, port: number, timeoutMs = 2000): Promise { return new Promise((resolve) => { const socket = connect({ host,