chore: Run pnpm format:fix.

This commit is contained in:
cpojer
2026-01-31 21:13:13 +09:00
parent dcc2de15a6
commit 8cab78abbc
624 changed files with 10729 additions and 7514 deletions
+4 -9
View File
@@ -98,9 +98,7 @@ async function requestOAuthCode(params: {
);
}
if (payload.state !== params.state) {
throw new Error(
"MiniMax OAuth state mismatch: possible CSRF attack or session corruption.",
);
throw new Error("MiniMax OAuth state mismatch: possible CSRF attack or session corruption.");
}
return payload;
}
@@ -144,9 +142,7 @@ async function pollOAuthToken(params: {
return {
status: "error",
message:
payload?.base_resp?.status_msg ??
text ||
"MiniMax OAuth failed to parse response.",
(payload?.base_resp?.status_msg ?? text) || "MiniMax OAuth failed to parse response.",
};
}
@@ -165,9 +161,9 @@ async function pollOAuthToken(params: {
};
if (tokenPayload.status === "error") {
return { status: "error", message: "An error occurred. Please try again later"};
return { status: "error", message: "An error occurred. Please try again later" };
}
if (tokenPayload.status != "success") {
return { status: "pending", message: "current user code is not authorized" };
}
@@ -215,7 +211,6 @@ export async function loginMiniMaxPortalOAuth(params: {
let pollIntervalMs = oauth.interval ? oauth.interval : 2000;
const expireTimeMs = oauth.expired_in;
while (Date.now() < expireTimeMs) {
params.progress.update("Waiting for MiniMax OAuth approval…");
const result = await pollOAuthToken({