mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-07 09:10:55 +00:00
Refactored two high-complexity functions to improve maintainability: 1. shared/common.sh: Extract install_claude_code() into 5 focused helpers: - _finalize_claude_install: Setup shell integration - _verify_claude_installed: Check if installation succeeded - _install_via_curl: Curl installer method - _ensure_nodejs_runtime: Node.js runtime setup - _install_via_bun: Bun installer method Main function now reads as a clear sequence of steps. 2. cli/src/commands.ts: Simplify credential checking in printQuickStart: - Extract checkAllCredentialsReady() for clarity - Extract printAuthVariableStatus() to handle auth var display - Extract buildCloudCommandHint() for cloud hint formatting Reduces complexity and improves readability. All 80 tests pass. No functional changes. Co-authored-by: spawn-bot <bot@openrouter.ai> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| common.sh | ||
| github-auth.sh | ||
| key-request.sh | ||