@claudinho/cli 0.8.4 → 0.8.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.
Files changed (2) hide show
  1. package/dist/index.js +17 -2
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -3049,6 +3049,18 @@ function hasGroupStarted(group, tables) {
3049
3049
  if (!table?.rows.length) return false;
3050
3050
  return table.rows.some((r) => r.played > 0);
3051
3051
  }
3052
+ function matchesPerTeamInGroup(teamCount) {
3053
+ return Math.max(0, teamCount - 1);
3054
+ }
3055
+ function isGroupStandingsComplete(table) {
3056
+ const n = table?.rows.length ?? 0;
3057
+ if (n < 2) return false;
3058
+ const required = matchesPerTeamInGroup(n);
3059
+ return table.rows.every((r) => r.played >= required);
3060
+ }
3061
+ function isGroupComplete(group, tables) {
3062
+ return isGroupStandingsComplete(tables.find((t2) => t2.group === group));
3063
+ }
3052
3064
  function resolveWinner(match) {
3053
3065
  if (!isFinished(match.status)) return void 0;
3054
3066
  if (match.winnerCode) {
@@ -3097,7 +3109,10 @@ function resolveSlot(ref, ctx) {
3097
3109
  case "group": {
3098
3110
  if (!ctx.standingsDegraded && hasGroupStarted(ref.group, ctx.tables)) {
3099
3111
  const team = teamFromStandings(ref.group, ref.position, ctx.tables);
3100
- if (team) return participant(team, "projected");
3112
+ if (team) {
3113
+ const status = isGroupComplete(ref.group, ctx.tables) ? "confirmed" : "projected";
3114
+ return participant(team, status);
3115
+ }
3101
3116
  }
3102
3117
  const label = ref.position === 1 ? t(ctx.lang, "bracket.slot.groupWinner", { group: ref.group }) : t(ctx.lang, "bracket.slot.groupSecond", { group: ref.group });
3103
3118
  return tbd(label);
@@ -6177,7 +6192,7 @@ function handlePipeError(stream) {
6177
6192
  }
6178
6193
  handlePipeError(process.stdout);
6179
6194
  handlePipeError(process.stderr);
6180
- var VERSION = "0.8.4";
6195
+ var VERSION = "0.8.5";
6181
6196
  var DISCLAIMER = "Claudinho is an independent fan project. Not affiliated with or endorsed by FIFA or Anthropic.";
6182
6197
  function ctxFrom(cmd) {
6183
6198
  let root = cmd;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudinho/cli",
3
- "version": "0.8.4",
3
+ "version": "0.8.5",
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.4"
64
+ "@claudinho/core": "0.8.5"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "tsup",