@claudinho/cli 0.8.0 → 0.8.1

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 +34 -9
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -4384,11 +4384,14 @@ function formatShareTable(input, options = {}) {
4384
4384
  );
4385
4385
  return blocks.join("\n\n");
4386
4386
  }
4387
- function formatParticipant(p, flags, locale) {
4387
+ function formatParticipant(p, side, flags, locale) {
4388
4388
  const suffix = p.status === "projected" ? ` ${t(locale, "bracket.projected")}` : "";
4389
- if (flags && p.flag !== "\u{1F3F3}\uFE0F") return `${p.flag} ${p.label}${suffix}`;
4390
- if (p.code) return `${p.code}${suffix}`;
4391
- return `${p.label}${suffix}`;
4389
+ if (!flags || p.flag === "\u{1F3F3}\uFE0F") {
4390
+ if (p.code && p.code !== "TBD") return `${p.code}${suffix}`;
4391
+ return `${p.label}${suffix}`;
4392
+ }
4393
+ if (side === "home") return `${p.flag} ${p.label}${suffix}`;
4394
+ return `${p.label}${suffix} ${p.flag}`;
4392
4395
  }
4393
4396
  function statusTail2(m) {
4394
4397
  if (m.status === "LIVE" && m.minute) return ` ${m.minute}'`;
@@ -4399,8 +4402,8 @@ function statusTail2(m) {
4399
4402
  }
4400
4403
  function formatBracketMatchLine(mv, opts = {}) {
4401
4404
  const flags = opts.flags !== false;
4402
- const home = formatParticipant(mv.home, flags, opts.locale);
4403
- const away = formatParticipant(mv.away, flags, opts.locale);
4405
+ const home = formatParticipant(mv.home, "home", flags, opts.locale);
4406
+ const away = formatParticipant(mv.away, "away", flags, opts.locale);
4404
4407
  const m = mv.match;
4405
4408
  if (isFinished(m.status) || isLive(m.status)) {
4406
4409
  return ` ${home} ${scoreline(m)} ${away}${statusTail2(m)}`;
@@ -4465,8 +4468,19 @@ function formatShareBracket(input, options = {}) {
4465
4468
  const blocks = [t(locale, "bracket.shareTitle"), ""];
4466
4469
  if (input.view.stages.length === 0) {
4467
4470
  blocks.push(input.emptyNote ?? t(locale, "bracket.empty"));
4471
+ } else if ((options.style ?? "social") === "compact") {
4472
+ const fmtOpts = { locale, tz: options.tz };
4473
+ const lines = input.view.stages.flatMap(
4474
+ (stage) => stage.matches.map((mv) => formatBracketCompactLine(mv, fmtOpts))
4475
+ );
4476
+ blocks.push(lines.join("\n"));
4477
+ if (input.view.degraded) {
4478
+ blocks.push(`(${t(locale, "bracket.degraded")})`);
4479
+ } else if (input.view.standingsDegraded) {
4480
+ blocks.push(`(${t(locale, "bracket.standingsDegraded")})`);
4481
+ }
4468
4482
  } else {
4469
- blocks.push(formatBracketList(input.view, { footer: false, locale }));
4483
+ blocks.push(formatBracketList(input.view, { footer: false, locale, tz: options.tz }));
4470
4484
  if (input.view.degraded) {
4471
4485
  blocks.push(`(${t(locale, "bracket.degraded")})`);
4472
4486
  } else if (input.view.standingsDegraded) {
@@ -4485,6 +4499,15 @@ function formatShareBracket(input, options = {}) {
4485
4499
  blocks.push("", footer.join("\n"));
4486
4500
  return blocks.join("\n");
4487
4501
  }
4502
+ function formatBracketCompactLine(mv, opts = {}) {
4503
+ const flags = opts.flags !== false;
4504
+ const home = formatParticipant(mv.home, "home", flags, opts.locale);
4505
+ const away = formatParticipant(mv.away, "away", flags, opts.locale);
4506
+ const m = mv.match;
4507
+ const mid2 = isFinished(m.status) || isLive(m.status) ? scoreline(m) : "vs";
4508
+ const tail = m.status === "SCHEDULED" && mv.kickoff ? ` \xB7 ${formatKickoff(mv.kickoff, { tz: opts.tz, locale: opts.locale })}` : statusTail2(m);
4509
+ return `${stageLabelI18n(opts.locale, mv.stage)} \xB7 ${home} ${mid2} ${away}${tail}`;
4510
+ }
4488
4511
 
4489
4512
  // src/config.ts
4490
4513
  var SUPPORTED_LANGS = ["en", "es", "pt", "fr"];
@@ -5988,7 +6011,9 @@ async function cmdShare(target, team, opts, ctx) {
5988
6011
  options: {
5989
6012
  includeHashtag: baseOptions.includeHashtag,
5990
6013
  includeInstallLine: baseOptions.includeInstallLine,
5991
- locale: cfg.lang
6014
+ locale: cfg.lang,
6015
+ style: baseOptions.style,
6016
+ tz: cfg.tz
5992
6017
  }
5993
6018
  },
5994
6019
  copy
@@ -6149,7 +6174,7 @@ function handlePipeError(stream) {
6149
6174
  }
6150
6175
  handlePipeError(process.stdout);
6151
6176
  handlePipeError(process.stderr);
6152
- var VERSION = "0.8.0";
6177
+ var VERSION = "0.8.1";
6153
6178
  var DISCLAIMER = "Claudinho is an independent fan project. Not affiliated with or endorsed by FIFA or Anthropic.";
6154
6179
  function ctxFrom(cmd) {
6155
6180
  let root = cmd;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudinho/cli",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
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.0"
64
+ "@claudinho/core": "0.8.1"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "tsup",