@claudinho/cli 0.8.5 → 0.8.6
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 +23 -13
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -298,8 +298,8 @@ var ES = {
|
|
|
298
298
|
"bracket.invalidStage": "La fase debe ser una de: R32, R16, QF, SF, 3P, F",
|
|
299
299
|
"bracket.unknownStage": 'Fase desconocida "{stage}". Usa R32, R16, QF, SF, 3P o F.',
|
|
300
300
|
"bracket.slot.groupWinner": "Ganador del grupo {group}",
|
|
301
|
-
"bracket.slot.groupSecond": "2
|
|
302
|
-
"bracket.slot.third": "3
|
|
301
|
+
"bracket.slot.groupSecond": "2\xBA del grupo {group}",
|
|
302
|
+
"bracket.slot.third": "3\xBA ({groups})",
|
|
303
303
|
"bracket.slot.winner": "Ganador {stage} {n}",
|
|
304
304
|
"bracket.slot.loser": "Perdedor {stage} {n}",
|
|
305
305
|
"bracket.slot.tbd": "Por definir",
|
|
@@ -3096,17 +3096,24 @@ function participant(team, status) {
|
|
|
3096
3096
|
function tbd(label) {
|
|
3097
3097
|
return { label, flag: "\u{1F3F3}\uFE0F", status: "tbd" };
|
|
3098
3098
|
}
|
|
3099
|
+
function confirmedLiveParticipant(team) {
|
|
3100
|
+
if (!team || team.flag === "\u{1F3F3}\uFE0F") return void 0;
|
|
3101
|
+
return participant(team, "confirmed");
|
|
3102
|
+
}
|
|
3099
3103
|
function winnerLabel(ctx, stage, index) {
|
|
3100
3104
|
return t(ctx.lang, "bracket.slot.winner", {
|
|
3101
3105
|
stage: stageLabelI18n(ctx.lang, stage),
|
|
3102
3106
|
n: String(index)
|
|
3103
3107
|
});
|
|
3104
3108
|
}
|
|
3105
|
-
function resolveSlot(ref, ctx) {
|
|
3109
|
+
function resolveSlot(ref, ctx, liveTeam) {
|
|
3110
|
+
const liveParticipant = confirmedLiveParticipant(liveTeam);
|
|
3106
3111
|
switch (ref.kind) {
|
|
3107
3112
|
case "seed":
|
|
3113
|
+
if (liveParticipant) return liveParticipant;
|
|
3108
3114
|
return tbd(ref.label);
|
|
3109
3115
|
case "group": {
|
|
3116
|
+
if (liveParticipant) return liveParticipant;
|
|
3110
3117
|
if (!ctx.standingsDegraded && hasGroupStarted(ref.group, ctx.tables)) {
|
|
3111
3118
|
const team = teamFromStandings(ref.group, ref.position, ctx.tables);
|
|
3112
3119
|
if (team) {
|
|
@@ -3118,6 +3125,7 @@ function resolveSlot(ref, ctx) {
|
|
|
3118
3125
|
return tbd(label);
|
|
3119
3126
|
}
|
|
3120
3127
|
case "third":
|
|
3128
|
+
if (liveParticipant) return liveParticipant;
|
|
3121
3129
|
return tbd(t(ctx.lang, "bracket.slot.third", { groups: ref.groups.join("/") }));
|
|
3122
3130
|
case "winner": {
|
|
3123
3131
|
const node = ctx.nodesByKey.get(matchKey(ref.stage, ref.index));
|
|
@@ -3126,6 +3134,7 @@ function resolveSlot(ref, ctx) {
|
|
|
3126
3134
|
const winner = resolveWinner(match);
|
|
3127
3135
|
if (winner) return participant(winner, "confirmed");
|
|
3128
3136
|
}
|
|
3137
|
+
if (liveParticipant) return liveParticipant;
|
|
3129
3138
|
return tbd(winnerLabel(ctx, ref.stage, ref.index));
|
|
3130
3139
|
}
|
|
3131
3140
|
case "loser": {
|
|
@@ -3135,6 +3144,7 @@ function resolveSlot(ref, ctx) {
|
|
|
3135
3144
|
const loser = resolveLoser(match);
|
|
3136
3145
|
if (loser) return participant(loser, "confirmed");
|
|
3137
3146
|
}
|
|
3147
|
+
if (liveParticipant) return liveParticipant;
|
|
3138
3148
|
return tbd(
|
|
3139
3149
|
t(ctx.lang, "bracket.slot.loser", {
|
|
3140
3150
|
stage: stageLabelI18n(ctx.lang, ref.stage),
|
|
@@ -3172,8 +3182,8 @@ function buildBracketView(topology, matches, tables, standingsDegraded, liveDegr
|
|
|
3172
3182
|
stage: node.stage,
|
|
3173
3183
|
index: node.index,
|
|
3174
3184
|
kickoff: match.kickoff,
|
|
3175
|
-
home: resolveSlot(node.home, ctx),
|
|
3176
|
-
away: resolveSlot(node.away, ctx),
|
|
3185
|
+
home: resolveSlot(node.home, ctx, match.home),
|
|
3186
|
+
away: resolveSlot(node.away, ctx, match.away),
|
|
3177
3187
|
match
|
|
3178
3188
|
};
|
|
3179
3189
|
});
|
|
@@ -4790,8 +4800,8 @@ function header(text, c) {
|
|
|
4790
4800
|
function disclaimer(t2, c) {
|
|
4791
4801
|
return c.dim(t2("disclaimer"));
|
|
4792
4802
|
}
|
|
4793
|
-
function dataSource(source, c) {
|
|
4794
|
-
return source ? c.dim(
|
|
4803
|
+
function dataSource(source, lang, c) {
|
|
4804
|
+
return source ? c.dim(t(lang, "live.data", { source: liveSourceLabel(source) })) : "";
|
|
4795
4805
|
}
|
|
4796
4806
|
|
|
4797
4807
|
// src/marketCache.ts
|
|
@@ -5437,7 +5447,7 @@ async function cmdToday(date, ctx) {
|
|
|
5437
5447
|
}
|
|
5438
5448
|
out();
|
|
5439
5449
|
if (degraded) out(c.dim(" " + t2("feed.degraded")));
|
|
5440
|
-
const src = dataSource(source, c);
|
|
5450
|
+
const src = dataSource(source, cfg.lang, c);
|
|
5441
5451
|
if (src) out(src);
|
|
5442
5452
|
out(disclaimer(t2, c));
|
|
5443
5453
|
}
|
|
@@ -5463,7 +5473,7 @@ async function cmdLive(ctx) {
|
|
|
5463
5473
|
for (const m of matches) out(matchLine(m, cfg, t2, c, flags));
|
|
5464
5474
|
}
|
|
5465
5475
|
out();
|
|
5466
|
-
const src = dataSource(source, c);
|
|
5476
|
+
const src = dataSource(source, cfg.lang, c);
|
|
5467
5477
|
if (src) out(src);
|
|
5468
5478
|
out(disclaimer(t2, c));
|
|
5469
5479
|
}
|
|
@@ -5554,7 +5564,7 @@ async function cmdTable(group, ctx) {
|
|
|
5554
5564
|
}
|
|
5555
5565
|
out();
|
|
5556
5566
|
if (degraded) out(c.dim(" " + t2("table.degraded")));
|
|
5557
|
-
const src = dataSource(source, c);
|
|
5567
|
+
const src = dataSource(source, cfg.lang, c);
|
|
5558
5568
|
if (src) out(src);
|
|
5559
5569
|
out(disclaimer(t2, c));
|
|
5560
5570
|
}
|
|
@@ -5605,7 +5615,7 @@ async function cmdBracket(stage, opts, ctx) {
|
|
|
5605
5615
|
out();
|
|
5606
5616
|
if (degraded) out(c.dim(` ${t(cfg.lang, "bracket.degraded")}`));
|
|
5607
5617
|
else if (standingsDegraded) out(c.dim(` ${t(cfg.lang, "bracket.standingsDegraded")}`));
|
|
5608
|
-
const src = dataSource(source, c);
|
|
5618
|
+
const src = dataSource(source, cfg.lang, c);
|
|
5609
5619
|
if (src) out(src);
|
|
5610
5620
|
out(disclaimer(t2, c));
|
|
5611
5621
|
}
|
|
@@ -5745,7 +5755,7 @@ async function cmdMatch(id, ctx) {
|
|
|
5745
5755
|
}
|
|
5746
5756
|
out();
|
|
5747
5757
|
if (degraded) out(c.dim(" " + t2("feed.degraded")));
|
|
5748
|
-
const src = dataSource(liveSource, c);
|
|
5758
|
+
const src = dataSource(liveSource, cfg.lang, c);
|
|
5749
5759
|
if (src) out(src);
|
|
5750
5760
|
out(disclaimer(t2, c));
|
|
5751
5761
|
}
|
|
@@ -6192,7 +6202,7 @@ function handlePipeError(stream) {
|
|
|
6192
6202
|
}
|
|
6193
6203
|
handlePipeError(process.stdout);
|
|
6194
6204
|
handlePipeError(process.stderr);
|
|
6195
|
-
var VERSION = "0.8.
|
|
6205
|
+
var VERSION = "0.8.6";
|
|
6196
6206
|
var DISCLAIMER = "Claudinho is an independent fan project. Not affiliated with or endorsed by FIFA or Anthropic.";
|
|
6197
6207
|
function ctxFrom(cmd) {
|
|
6198
6208
|
let root = cmd;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claudinho/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"description": "Live scores, fixtures, group tables, and read-only prediction-market signals for the 2026 men's football tournament — in your terminal, Claude Code, and Cursor CLI statusline. No API keys. Not affiliated with FIFA or Anthropic.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"tsup": "^8.0.0",
|
|
62
62
|
"typescript": "^5.7.0",
|
|
63
63
|
"vitest": "^4.1.9",
|
|
64
|
-
"@claudinho/core": "0.8.
|
|
64
|
+
"@claudinho/core": "0.8.6"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "tsup",
|