fix: DRY getValidToken — cli-team delegates to sync.ts, remove phantom Joined column

- Export getValidToken from sync.ts (was private)
- cli-team.ts now uses sync.ts version (supports auto-refresh, was missing)
- Remove unused isTokenExpired/getAuthTokens imports from cli-team
- Remove "Joined" column from formatMembersTable (team_members has no created_at)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-03-16 19:12:44 -07:00
parent 03e61be488
commit 4093c5e031
2 changed files with 14 additions and 25 deletions

View File

@@ -67,7 +67,7 @@ async function refreshToken(supabaseUrl: string, refreshToken: string, anonKey:
}
/** Get a valid access token, refreshing if needed. */
async function getValidToken(config: SyncConfig): Promise<string | null> {
export async function getValidToken(config: SyncConfig): Promise<string | null> {
if (!isTokenExpired(config.auth)) {
return config.auth.access_token;
}