@cortexkit/opencode-antigravity-auth 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -19972,6 +19972,9 @@ function createNoAccountResponse(message, model) {
|
|
|
19972
19972
|
}
|
|
19973
19973
|
});
|
|
19974
19974
|
}
|
|
19975
|
+
function terminalFetchError(lastError, fallbackMessage) {
|
|
19976
|
+
return lastError ?? new Error(fallbackMessage);
|
|
19977
|
+
}
|
|
19975
19978
|
function retryAfterMsFromResponse(response, defaultRetryMs = 6e4) {
|
|
19976
19979
|
const retryAfterMsHeader = response.headers.get("retry-after-ms");
|
|
19977
19980
|
if (retryAfterMsHeader) {
|
|
@@ -21468,9 +21471,9 @@ Alternatively, you can:
|
|
|
21468
21471
|
lastFailure.dumpContext
|
|
21469
21472
|
);
|
|
21470
21473
|
}
|
|
21471
|
-
|
|
21472
|
-
lastError
|
|
21473
|
-
|
|
21474
|
+
throw terminalFetchError(
|
|
21475
|
+
lastError,
|
|
21476
|
+
`Exceeded max account switches (${maxAccountSwitches}). All accounts rate-limited.`
|
|
21474
21477
|
);
|
|
21475
21478
|
}
|
|
21476
21479
|
if (accountCount <= 1) {
|
|
@@ -21491,9 +21494,9 @@ Alternatively, you can:
|
|
|
21491
21494
|
lastFailure.dumpContext
|
|
21492
21495
|
);
|
|
21493
21496
|
}
|
|
21494
|
-
|
|
21495
|
-
lastError
|
|
21496
|
-
|
|
21497
|
+
throw terminalFetchError(
|
|
21498
|
+
lastError,
|
|
21499
|
+
"All Antigravity endpoints failed"
|
|
21497
21500
|
);
|
|
21498
21501
|
}
|
|
21499
21502
|
continue;
|
|
@@ -21515,10 +21518,7 @@ Alternatively, you can:
|
|
|
21515
21518
|
lastFailure.dumpContext
|
|
21516
21519
|
);
|
|
21517
21520
|
}
|
|
21518
|
-
|
|
21519
|
-
lastError?.message || "All Antigravity accounts failed",
|
|
21520
|
-
model ?? "unknown"
|
|
21521
|
-
);
|
|
21521
|
+
throw terminalFetchError(lastError, "All Antigravity accounts failed");
|
|
21522
21522
|
}
|
|
21523
21523
|
}
|
|
21524
21524
|
function dispose() {
|