ccgather 2.0.3 → 2.0.5
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 +17 -28
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -329,7 +329,7 @@ var init_ui = __esm({
|
|
|
329
329
|
"use strict";
|
|
330
330
|
import_chalk = __toESM(require("chalk"));
|
|
331
331
|
import_string_width = __toESM(require("string-width"));
|
|
332
|
-
VERSION = true ? "2.0.
|
|
332
|
+
VERSION = true ? "2.0.5" : "0.0.0";
|
|
333
333
|
colors = {
|
|
334
334
|
primary: import_chalk.default.hex("#DA7756"),
|
|
335
335
|
// Claude coral
|
|
@@ -608,39 +608,27 @@ function mapSubscriptionToCCPlan(subscriptionType) {
|
|
|
608
608
|
if (!subscriptionType) {
|
|
609
609
|
return null;
|
|
610
610
|
}
|
|
611
|
-
|
|
612
|
-
if (type === "max" || type.includes("max")) {
|
|
613
|
-
return "max";
|
|
614
|
-
}
|
|
615
|
-
if (type === "pro") {
|
|
616
|
-
return "pro";
|
|
617
|
-
}
|
|
618
|
-
if (type === "free") {
|
|
619
|
-
return "free";
|
|
620
|
-
}
|
|
621
|
-
return type;
|
|
611
|
+
return subscriptionType.toLowerCase();
|
|
622
612
|
}
|
|
623
613
|
function inferPlanFromRateLimitTier(rateLimitTier) {
|
|
624
614
|
if (!rateLimitTier) {
|
|
625
615
|
return null;
|
|
626
616
|
}
|
|
627
617
|
const tier = rateLimitTier.toLowerCase();
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
return "max";
|
|
636
|
-
}
|
|
637
|
-
if (tier.includes("pro")) {
|
|
638
|
-
return "pro";
|
|
639
|
-
}
|
|
640
|
-
if (tier.includes("free")) {
|
|
641
|
-
return "free";
|
|
618
|
+
const match = tier.match(/(?:default_claude_)?(\w+?)(?:_(\d+x))?$/);
|
|
619
|
+
if (match) {
|
|
620
|
+
const plan = match[1];
|
|
621
|
+
const multiplier = match[2];
|
|
622
|
+
if (["max", "pro", "free", "team", "enterprise"].includes(plan)) {
|
|
623
|
+
return multiplier ? `${plan}_${multiplier}` : plan;
|
|
624
|
+
}
|
|
642
625
|
}
|
|
643
|
-
return
|
|
626
|
+
if (tier.includes("enterprise")) return "enterprise";
|
|
627
|
+
if (tier.includes("team")) return "team";
|
|
628
|
+
if (tier.includes("max")) return tier.includes("20x") ? "max_20x" : "max";
|
|
629
|
+
if (tier.includes("pro")) return "pro";
|
|
630
|
+
if (tier.includes("free")) return "free";
|
|
631
|
+
return tier;
|
|
644
632
|
}
|
|
645
633
|
function detectApiKeyAuth() {
|
|
646
634
|
const anthropicApiKey = process.env.ANTHROPIC_API_KEY;
|
|
@@ -1440,8 +1428,9 @@ async function submit(options) {
|
|
|
1440
1428
|
console.log(` ${colors.muted("View full stats:")} ${link(leaderboardUrl)}`);
|
|
1441
1429
|
console.log();
|
|
1442
1430
|
console.log(
|
|
1443
|
-
` ${colors.
|
|
1431
|
+
` ${colors.warning("\u{1F4A1}")} ${colors.white("Claude Code keeps ~30 days of local data.")}`
|
|
1444
1432
|
);
|
|
1433
|
+
console.log(` ${colors.muted("Submit regularly to preserve your full history!")}`);
|
|
1445
1434
|
console.log();
|
|
1446
1435
|
} else {
|
|
1447
1436
|
submitSpinner.fail(colors.error("Failed to submit"));
|