mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-19 16:39:50 +00:00
refactor: Remove dead isOAuthConfigured() stub from DigitalOcean module (#2229)
The isOAuthConfigured() function always returned true unconditionally, making the two !isOAuthConfigured() guards in tryRefreshDoToken() and tryDoOAuth() unreachable dead code. Remove the function and inline the always-true behavior by dropping the dead branches entirely. Bump CLI patch version to 0.14.1. Co-authored-by: spawn-qa-bot <qa@openrouter.ai> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: L <6723574+louisgv@users.noreply.github.com>
This commit is contained in:
parent
989e9bee12
commit
b6a0a8d28b
2 changed files with 1 additions and 13 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@openrouter/spawn",
|
||||
"version": "0.14.0",
|
||||
"version": "0.14.1",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"spawn": "cli.js"
|
||||
|
|
|
|||
|
|
@ -234,15 +234,7 @@ function generateCsrfState(): string {
|
|||
return Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
|
||||
}
|
||||
|
||||
function isOAuthConfigured(): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
async function tryRefreshDoToken(): Promise<string | null> {
|
||||
if (!isOAuthConfigured()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const refreshToken = loadRefreshToken();
|
||||
if (!refreshToken) {
|
||||
return null;
|
||||
|
|
@ -291,10 +283,6 @@ async function tryRefreshDoToken(): Promise<string | null> {
|
|||
}
|
||||
|
||||
async function tryDoOAuth(): Promise<string | null> {
|
||||
if (!isOAuthConfigured()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
logStep("Attempting DigitalOcean OAuth authentication...");
|
||||
|
||||
// Check connectivity to DigitalOcean
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue