chore: generate

This commit is contained in:
opencode-agent[bot]
2026-06-13 18:11:18 +00:00
parent 3f174531b9
commit a6e3afe048
3 changed files with 26 additions and 17 deletions
@@ -35,7 +35,11 @@ let pendingOAuth: PendingOAuth | undefined
let oauthServerPort: number | undefined
function normalizeAccount(input: string) {
return input.trim().replace(/^https?:\/\//, "").replace(/\.snowflakecomputing\.com\/?$/, "").replace(/\/+$/, "")
return input
.trim()
.replace(/^https?:\/\//, "")
.replace(/\.snowflakecomputing\.com\/?$/, "")
.replace(/\/+$/, "")
}
function generateRandomString(length: number) {
@@ -456,7 +460,9 @@ export async function SnowflakeCortexAuthPlugin(_input: PluginInput): Promise<Ho
}
const expiresSoon =
!currentOauth.expires || !currentOauth.access || currentOauth.expires - Date.now() <= ACCESS_TOKEN_REFRESH_SKEW_MS
!currentOauth.expires ||
!currentOauth.access ||
currentOauth.expires - Date.now() <= ACCESS_TOKEN_REFRESH_SKEW_MS
if (expiresSoon) await refresh()