()
| 109 | * errors so callers can surface programmer bugs. |
| 110 | */ |
| 111 | export function assertOAuthConfiguredOrExit(): void { |
| 112 | try { |
| 113 | resolveClientId(); |
| 114 | } catch (err) { |
| 115 | if (isAuthError(err) && err.code === "OAUTH_NOT_CONFIGURED") { |
| 116 | console.error(`Error: ${err.message}`); |
| 117 | if (err.hint) console.error(err.hint); |
| 118 | process.exit(1); |
| 119 | } |
| 120 | throw err; |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | export async function startAuthorizationCodeFlow( |
| 125 | opts: AuthorizeFlowOptions = {}, |
no test coverage detected