@claudinho/cli 0.8.14 → 0.8.16
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 +24 -28
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3122,7 +3122,7 @@ function winnerLabel(ctx, stage, index) {
|
|
|
3122
3122
|
n: String(index)
|
|
3123
3123
|
});
|
|
3124
3124
|
}
|
|
3125
|
-
function resolveSlot(ref, ctx, liveTeam) {
|
|
3125
|
+
function resolveSlot(ref, ctx, liveTeam, fixtureInMergedSet = false) {
|
|
3126
3126
|
const liveParticipant = confirmedLiveParticipant(liveTeam);
|
|
3127
3127
|
switch (ref.kind) {
|
|
3128
3128
|
case "seed":
|
|
@@ -3144,23 +3144,27 @@ function resolveSlot(ref, ctx, liveTeam) {
|
|
|
3144
3144
|
if (liveParticipant) return liveParticipant;
|
|
3145
3145
|
return tbd(t(ctx.lang, "bracket.slot.third", { groups: ref.groups.join("/") }));
|
|
3146
3146
|
case "winner": {
|
|
3147
|
-
const node = ctx.nodesByKey.get(matchKey(ref.stage, ref.index));
|
|
3148
|
-
const match = node ? ctx.matchesById.get(node.matchId) : void 0;
|
|
3149
|
-
if (match) {
|
|
3150
|
-
const winner = resolveWinner(match);
|
|
3151
|
-
if (winner) return participant(winner, "confirmed");
|
|
3152
|
-
}
|
|
3153
3147
|
if (liveParticipant) return liveParticipant;
|
|
3148
|
+
if (!fixtureInMergedSet) {
|
|
3149
|
+
const node = ctx.nodesByKey.get(matchKey(ref.stage, ref.index));
|
|
3150
|
+
const match = node ? ctx.matchesById.get(node.matchId) : void 0;
|
|
3151
|
+
if (match) {
|
|
3152
|
+
const winner = resolveWinner(match);
|
|
3153
|
+
if (winner) return participant(winner, "confirmed");
|
|
3154
|
+
}
|
|
3155
|
+
}
|
|
3154
3156
|
return tbd(winnerLabel(ctx, ref.stage, ref.index));
|
|
3155
3157
|
}
|
|
3156
3158
|
case "loser": {
|
|
3157
|
-
const node = ctx.nodesByKey.get(matchKey(ref.stage, ref.index));
|
|
3158
|
-
const match = node ? ctx.matchesById.get(node.matchId) : void 0;
|
|
3159
|
-
if (match) {
|
|
3160
|
-
const loser = resolveLoser(match);
|
|
3161
|
-
if (loser) return participant(loser, "confirmed");
|
|
3162
|
-
}
|
|
3163
3159
|
if (liveParticipant) return liveParticipant;
|
|
3160
|
+
if (!fixtureInMergedSet) {
|
|
3161
|
+
const node = ctx.nodesByKey.get(matchKey(ref.stage, ref.index));
|
|
3162
|
+
const match = node ? ctx.matchesById.get(node.matchId) : void 0;
|
|
3163
|
+
if (match) {
|
|
3164
|
+
const loser = resolveLoser(match);
|
|
3165
|
+
if (loser) return participant(loser, "confirmed");
|
|
3166
|
+
}
|
|
3167
|
+
}
|
|
3164
3168
|
return tbd(
|
|
3165
3169
|
t(ctx.lang, "bracket.slot.loser", {
|
|
3166
3170
|
stage: stageLabelI18n(ctx.lang, ref.stage),
|
|
@@ -3183,6 +3187,7 @@ function buildBracketView(topology, matches, tables, standingsDegraded, liveDegr
|
|
|
3183
3187
|
if (want && stage !== want) continue;
|
|
3184
3188
|
const nodes = topology.matches.filter((n) => n.stage === stage);
|
|
3185
3189
|
const matchViews = nodes.map((node) => {
|
|
3190
|
+
const fixtureInMergedSet = matchesById.has(node.matchId);
|
|
3186
3191
|
const match = matchesById.get(node.matchId) ?? {
|
|
3187
3192
|
id: node.matchId,
|
|
3188
3193
|
stage: node.stage,
|
|
@@ -3198,8 +3203,8 @@ function buildBracketView(topology, matches, tables, standingsDegraded, liveDegr
|
|
|
3198
3203
|
stage: node.stage,
|
|
3199
3204
|
index: node.index,
|
|
3200
3205
|
kickoff: match.kickoff,
|
|
3201
|
-
home: resolveSlot(node.home, ctx, match.home),
|
|
3202
|
-
away: resolveSlot(node.away, ctx, match.away),
|
|
3206
|
+
home: resolveSlot(node.home, ctx, match.home, fixtureInMergedSet),
|
|
3207
|
+
away: resolveSlot(node.away, ctx, match.away, fixtureInMergedSet),
|
|
3203
3208
|
match
|
|
3204
3209
|
};
|
|
3205
3210
|
});
|
|
@@ -4850,8 +4855,9 @@ function matchLine(m, cfg, t2, c, flags = true) {
|
|
|
4850
4855
|
} else {
|
|
4851
4856
|
right = statusToken(m, t2, c);
|
|
4852
4857
|
}
|
|
4853
|
-
const
|
|
4854
|
-
const
|
|
4858
|
+
const mexRally = (m.home.code === "MEX" || m.away.code === "MEX") && cfg.flavor !== "off";
|
|
4859
|
+
const flair = mexRally ? "\xBFY si s\xED?" : matchFlavor(m, { level: cfg.flavor, locale: cfg.lang });
|
|
4860
|
+
const tail = flair ? ` ${mexRally ? c.green(flair) : c.dim(flair)}` : "";
|
|
4855
4861
|
return ` ${left} ${right}${tail}`.trimEnd();
|
|
4856
4862
|
}
|
|
4857
4863
|
function header(text, c) {
|
|
@@ -5561,12 +5567,6 @@ function resolveTeamArg(team, usage) {
|
|
|
5561
5567
|
if (!code) throw new InputError(usage);
|
|
5562
5568
|
return code.toUpperCase();
|
|
5563
5569
|
}
|
|
5564
|
-
var MEX_RALLY = "\xBFY si s\xED?";
|
|
5565
|
-
function mexRally(m, cfg, c) {
|
|
5566
|
-
if (cfg.flavor === "off") return void 0;
|
|
5567
|
-
if (m.home.code !== "MEX" && m.away.code !== "MEX") return void 0;
|
|
5568
|
-
return c.green(MEX_RALLY);
|
|
5569
|
-
}
|
|
5570
5570
|
async function cmdToday(date, ctx) {
|
|
5571
5571
|
const { cfg, t: t2 } = ctx;
|
|
5572
5572
|
precheck(cfg, t2, date);
|
|
@@ -5598,8 +5598,6 @@ async function cmdToday(date, ctx) {
|
|
|
5598
5598
|
out(matchLine(m, cfg, t2, c, flags));
|
|
5599
5599
|
const s = signals.get(m.id);
|
|
5600
5600
|
if (s) out(" " + c.dim(marketLine(s, m)));
|
|
5601
|
-
const rally = mexRally(m, cfg, c);
|
|
5602
|
-
if (rally) out(" " + rally);
|
|
5603
5601
|
}
|
|
5604
5602
|
}
|
|
5605
5603
|
out();
|
|
@@ -5667,8 +5665,6 @@ async function cmdNext(team, ctx) {
|
|
|
5667
5665
|
`${stage}${formatKickoff(fixture.kickoff, { tz: cfg.tz, locale: cfg.lang })} \xB7 ` + t2("next.in", { countdown: countdown(fixture.kickoff) })
|
|
5668
5666
|
)
|
|
5669
5667
|
);
|
|
5670
|
-
const rally = mexRally(fixture, cfg, c);
|
|
5671
|
-
if (rally) out(" " + rally);
|
|
5672
5668
|
out();
|
|
5673
5669
|
const src = dataSource(source, cfg.lang, c);
|
|
5674
5670
|
if (src) out(src);
|
|
@@ -6427,7 +6423,7 @@ function handlePipeError(stream) {
|
|
|
6427
6423
|
}
|
|
6428
6424
|
handlePipeError(process.stdout);
|
|
6429
6425
|
handlePipeError(process.stderr);
|
|
6430
|
-
var VERSION = "0.8.
|
|
6426
|
+
var VERSION = "0.8.16";
|
|
6431
6427
|
var DISCLAIMER = "Claudinho is an independent fan project. Not affiliated with or endorsed by FIFA or Anthropic.";
|
|
6432
6428
|
function ctxFrom(cmd) {
|
|
6433
6429
|
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.16",
|
|
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.16"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "tsup",
|