charge-connect 0.2.1 → 0.2.2
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/collect.js +29 -0
- package/package.json +2 -2
package/collect.js
CHANGED
|
@@ -1462,6 +1462,35 @@ async function collectCodexBarProviders() {
|
|
|
1462
1462
|
providers.push(provider);
|
|
1463
1463
|
statuses[provider.id] = "ok";
|
|
1464
1464
|
}
|
|
1465
|
+
|
|
1466
|
+
// CodexBar's automatic source can select Antigravity OAuth even when that
|
|
1467
|
+
// source returns identity but no quota windows. Antigravity's CLI source may
|
|
1468
|
+
// still have the usable limits, so retry that provider explicitly before
|
|
1469
|
+
// leaving an older server snapshot as the only visible data.
|
|
1470
|
+
const sawAntigravity = bridgeEntries.some(
|
|
1471
|
+
(entry) => textValue(entry?.provider, entry?.id)?.toLowerCase() === "antigravity",
|
|
1472
|
+
);
|
|
1473
|
+
if (sawAntigravity && !providers.some((provider) => provider.id === "antigravity")) {
|
|
1474
|
+
try {
|
|
1475
|
+
const fallbackRaw = await runAsync(cli, [
|
|
1476
|
+
"usage", "--provider", "antigravity", "--source", "cli", "--format", "json",
|
|
1477
|
+
], 90_000);
|
|
1478
|
+
const fallbackEntries = parseCodexBarJSON(fallbackRaw);
|
|
1479
|
+
const fallback = fallbackEntries
|
|
1480
|
+
?.find((entry) => textValue(entry?.provider, entry?.id)?.toLowerCase() === "antigravity");
|
|
1481
|
+
const provider = codexBarEntryToProvider(fallback);
|
|
1482
|
+
if (provider) {
|
|
1483
|
+
providers.push(provider);
|
|
1484
|
+
statuses.antigravity = "ok";
|
|
1485
|
+
} else if (fallback?.error) {
|
|
1486
|
+
console.error(`CodexBar Antigravity CLI 폴백 실패: ${fallback.error.message ?? "알 수 없는 오류"}`);
|
|
1487
|
+
statuses.antigravity ??= "error";
|
|
1488
|
+
}
|
|
1489
|
+
} catch (e) {
|
|
1490
|
+
console.error(`CodexBar Antigravity CLI 폴백 실패: ${e.message ?? e}`);
|
|
1491
|
+
statuses.antigravity ??= "error";
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1465
1494
|
const complete = commandSucceeded && !bridgeEntries.some((entry) => entry?.error);
|
|
1466
1495
|
return { providers, complete, statuses };
|
|
1467
1496
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "charge-connect",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Connects your computer to the Charge iPhone app and uploads AI coding usage",
|
|
5
5
|
"bin": {
|
|
6
6
|
"charge-connect": "cli.js"
|
|
@@ -26,4 +26,4 @@
|
|
|
26
26
|
"type": "git",
|
|
27
27
|
"url": "git+https://github.com/baekdusan/charge.git"
|
|
28
28
|
}
|
|
29
|
-
}
|
|
29
|
+
}
|