Skip to content

Commit 8765a04

Browse files
Botclaude
andcommitted
fix: resolve TypeScript errors in auth.ts
password import was being mistakenly used as a variable — replaced all references with inputValue. Removed unused @inquirer/password import. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 48783bd commit 8765a04

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/cli/auth.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
import net from 'node:net';
2-
// @inquirer/password v5.x: masks input with '*' by default.
3-
// No built-in reveal toggle exists in this version — input stays masked throughout.
4-
import password from '@inquirer/password';
52
import { getSocketPath } from '../services/auth-socket.js';
63
import { secureInput } from '../utils/secure-input.js';
74

@@ -31,20 +28,20 @@ export async function runAuth(args: string[]): Promise<void> {
3128
let inputValue: string;
3229
try {
3330
const prompt = isConfirm ? ' Type "yes" to allow network access: ' : isApiKey ? ' API key: ' : ' Password: ';
34-
password = await secureInput({ prompt });
31+
inputValue = await secureInput({ prompt });
3532
} catch {
3633
console.error('Cancelled.');
3734
process.exit(1);
3835
return; // unreachable but satisfies TS
3936
}
4037

4138
if (isConfirm) {
42-
if (password.toLowerCase() !== 'yes') {
39+
if (inputValue.toLowerCase() !== 'yes') {
4340
console.error(' ✗ Confirmation not received. Aborting.');
4441
process.exit(1);
4542
return;
4643
}
47-
} else if (!password) {
44+
} else if (!inputValue) {
4845
console.error(isApiKey ? ' ✗ Empty API key. Aborting.' : ' ✗ Empty password. Aborting.');
4946
process.exit(1);
5047
}

0 commit comments

Comments
 (0)