(err: unknown, asJson: boolean)
| 128 | |
| 129 | // fallow-ignore-next-line complexity |
| 130 | function handleResolveError(err: unknown, asJson: boolean): never { |
| 131 | if (!isAuthError(err)) throw err; |
| 132 | if (asJson) { |
| 133 | console.log(JSON.stringify({ configured: false, error: err.message, hint: err.hint ?? null })); |
| 134 | } else { |
| 135 | console.error(c.error(err.message)); |
| 136 | if (err.hint) console.error(c.dim(err.hint)); |
| 137 | } |
| 138 | process.exit(1); |
| 139 | } |
| 140 | |
| 141 | async function verify(credential: ResolvedCredential): Promise<VerifiedStatus> { |
| 142 | const client = new AuthClient({ |
no test coverage detected