@claudinho/cli 0.8.2 → 0.8.4
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 +13 -10
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -450,6 +450,7 @@ function formatKickoff(iso, opts = {}) {
|
|
|
450
450
|
const locale = safeLocale(opts.locale);
|
|
451
451
|
return new Intl.DateTimeFormat(locale, {
|
|
452
452
|
weekday: "short",
|
|
453
|
+
...opts.date ? { month: "short", day: "numeric" } : {},
|
|
453
454
|
hour: "2-digit",
|
|
454
455
|
minute: "2-digit",
|
|
455
456
|
hour12: false,
|
|
@@ -3037,18 +3038,17 @@ function teamFromMatch(match, code) {
|
|
|
3037
3038
|
function matchKey(stage, index) {
|
|
3038
3039
|
return `${stage}:${index}`;
|
|
3039
3040
|
}
|
|
3040
|
-
function isGroupComplete(group, tables, standingsDegraded) {
|
|
3041
|
-
if (standingsDegraded) return false;
|
|
3042
|
-
const table = tables.find((t2) => t2.group === group);
|
|
3043
|
-
if (!table?.rows.length || table.rows.length !== 4) return false;
|
|
3044
|
-
return table.rows.every((r) => r.played >= 3);
|
|
3045
|
-
}
|
|
3046
3041
|
function teamFromStandings(group, position, tables) {
|
|
3047
3042
|
const table = tables.find((t2) => t2.group === group);
|
|
3048
3043
|
if (!table) return void 0;
|
|
3049
3044
|
const row = table.rows[position - 1];
|
|
3050
3045
|
return row?.team;
|
|
3051
3046
|
}
|
|
3047
|
+
function hasGroupStarted(group, tables) {
|
|
3048
|
+
const table = tables.find((t2) => t2.group === group);
|
|
3049
|
+
if (!table?.rows.length) return false;
|
|
3050
|
+
return table.rows.some((r) => r.played > 0);
|
|
3051
|
+
}
|
|
3052
3052
|
function resolveWinner(match) {
|
|
3053
3053
|
if (!isFinished(match.status)) return void 0;
|
|
3054
3054
|
if (match.winnerCode) {
|
|
@@ -3095,7 +3095,7 @@ function resolveSlot(ref, ctx) {
|
|
|
3095
3095
|
case "seed":
|
|
3096
3096
|
return tbd(ref.label);
|
|
3097
3097
|
case "group": {
|
|
3098
|
-
if (
|
|
3098
|
+
if (!ctx.standingsDegraded && hasGroupStarted(ref.group, ctx.tables)) {
|
|
3099
3099
|
const team = teamFromStandings(ref.group, ref.position, ctx.tables);
|
|
3100
3100
|
if (team) return participant(team, "projected");
|
|
3101
3101
|
}
|
|
@@ -4400,6 +4400,9 @@ function statusTail2(m) {
|
|
|
4400
4400
|
if (isLive(m.status)) return " LIVE";
|
|
4401
4401
|
return "";
|
|
4402
4402
|
}
|
|
4403
|
+
function formatBracketKickoff(iso, opts) {
|
|
4404
|
+
return formatKickoff(iso, { tz: opts.tz, locale: opts.locale, date: true });
|
|
4405
|
+
}
|
|
4403
4406
|
function formatBracketMatchLine(mv, opts = {}) {
|
|
4404
4407
|
const flags = opts.flags !== false;
|
|
4405
4408
|
const home = formatParticipant(mv.home, "home", flags, opts.locale);
|
|
@@ -4408,7 +4411,7 @@ function formatBracketMatchLine(mv, opts = {}) {
|
|
|
4408
4411
|
if (isFinished(m.status) || isLive(m.status)) {
|
|
4409
4412
|
return ` ${home} ${scoreline(m)} ${away}${statusTail2(m)}`;
|
|
4410
4413
|
}
|
|
4411
|
-
const kickoff = mv.kickoff ?
|
|
4414
|
+
const kickoff = mv.kickoff ? formatBracketKickoff(mv.kickoff, opts) : "";
|
|
4412
4415
|
return ` ${home} vs ${away}${kickoff ? ` \xB7 ${kickoff}` : ""}`;
|
|
4413
4416
|
}
|
|
4414
4417
|
function formatBracketList(view, opts = {}) {
|
|
@@ -4505,7 +4508,7 @@ function formatBracketCompactLine(mv, opts = {}) {
|
|
|
4505
4508
|
const away = formatParticipant(mv.away, "away", flags, opts.locale);
|
|
4506
4509
|
const m = mv.match;
|
|
4507
4510
|
const mid2 = isFinished(m.status) || isLive(m.status) ? scoreline(m) : "vs";
|
|
4508
|
-
const tail = m.status === "SCHEDULED" && mv.kickoff ? ` \xB7 ${
|
|
4511
|
+
const tail = m.status === "SCHEDULED" && mv.kickoff ? ` \xB7 ${formatBracketKickoff(mv.kickoff, opts)}` : statusTail2(m);
|
|
4509
4512
|
return `${stageLabelI18n(opts.locale, mv.stage)} \xB7 ${home} ${mid2} ${away}${tail}`;
|
|
4510
4513
|
}
|
|
4511
4514
|
|
|
@@ -6174,7 +6177,7 @@ function handlePipeError(stream) {
|
|
|
6174
6177
|
}
|
|
6175
6178
|
handlePipeError(process.stdout);
|
|
6176
6179
|
handlePipeError(process.stderr);
|
|
6177
|
-
var VERSION = "0.8.
|
|
6180
|
+
var VERSION = "0.8.4";
|
|
6178
6181
|
var DISCLAIMER = "Claudinho is an independent fan project. Not affiliated with or endorsed by FIFA or Anthropic.";
|
|
6179
6182
|
function ctxFrom(cmd) {
|
|
6180
6183
|
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.4",
|
|
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.4"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "tsup",
|