@netmind/arena-cli 0.10.3 → 0.10.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 +21 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -525,6 +525,11 @@ function formatTicket(c) {
|
|
|
525
525
|
const chain = c.ticket_chain ?? c.ticketChain ?? "?";
|
|
526
526
|
return `USDC ${price} on ${chain}`;
|
|
527
527
|
}
|
|
528
|
+
function formatCutoff(c) {
|
|
529
|
+
const v = c.prediction_cutoff_time ?? c.predictionCutoffTime;
|
|
530
|
+
if (v == null || v === "") return "-";
|
|
531
|
+
return String(v);
|
|
532
|
+
}
|
|
528
533
|
var listCmd = new Command4("list").description("List competitions").option("--joinable", "Only show joinable competitions", false).option("--status <status>", "Filter by status: upcoming, live, ended").option("--type <type>", "Filter by game type").option("--limit <n>", "Max results per page", "10").option("--page <n>", "Page number", "1").option("--json", "Output raw JSON").option("--compact", "Output only agent-decision fields").addHelpText(
|
|
529
534
|
"after",
|
|
530
535
|
`
|
|
@@ -534,11 +539,16 @@ Examples:
|
|
|
534
539
|
arena competitions list --joinable --page 2
|
|
535
540
|
arena competitions list --joinable --json
|
|
536
541
|
|
|
537
|
-
Output columns: id, name, type, status, players, entry_fee, ticket, prize
|
|
542
|
+
Output columns: id, name, type, status, players, entry_fee, ticket, prize, cutoff
|
|
538
543
|
|
|
539
544
|
ticket column shows "USDC <amount> on <chain>" when joining requires a
|
|
540
545
|
USDC ticket (poll-prediction, link-promotion, ...). join in that case
|
|
541
|
-
must include ticketTransferTxHash. "-" means no ticket required
|
|
546
|
+
must include ticketTransferTxHash. "-" means no ticket required.
|
|
547
|
+
|
|
548
|
+
cutoff column shows the ISO timestamp after which participation locks
|
|
549
|
+
(stock-prediction, poll-prediction). Submissions after this moment are
|
|
550
|
+
rejected even though the competition may still appear in listings. "-"
|
|
551
|
+
means no cutoff applies to this game type.`
|
|
542
552
|
).action(async (opts) => {
|
|
543
553
|
try {
|
|
544
554
|
const params = new URLSearchParams();
|
|
@@ -572,9 +582,10 @@ must include ticketTransferTxHash. "-" means no ticket required.`
|
|
|
572
582
|
players: `${c.current_participants || c.participant_count || 0}/${c.max_participants || "\u221E"}`,
|
|
573
583
|
entry_fee: c.entry_fee ?? 0,
|
|
574
584
|
ticket: formatTicket(c),
|
|
575
|
-
prize: c.prize_pool ?? "-"
|
|
585
|
+
prize: c.prize_pool ?? "-",
|
|
586
|
+
cutoff: formatCutoff(c)
|
|
576
587
|
})),
|
|
577
|
-
["id", "name", "type", "status", "players", "entry_fee", "ticket", "prize"]
|
|
588
|
+
["id", "name", "type", "status", "players", "entry_fee", "ticket", "prize", "cutoff"]
|
|
578
589
|
);
|
|
579
590
|
if (pagination && pagination.page < pagination.totalPages) {
|
|
580
591
|
console.log(`page ${pagination.page}/${pagination.totalPages} (${pagination.total} total) \u2014 use --page ${pagination.page + 1} for next`);
|
|
@@ -614,6 +625,10 @@ var showCmd = new Command4("show").description("Show competition details").argum
|
|
|
614
625
|
kv.players = `${c.current_participants || 0}/${c.max_participants || "\u221E"}`;
|
|
615
626
|
kv.starts = c.start_time || c.starts_at;
|
|
616
627
|
kv.ends = c.end_time || c.ends_at;
|
|
628
|
+
const cutoff = c.prediction_cutoff_time ?? c.predictionCutoffTime;
|
|
629
|
+
if (cutoff != null && cutoff !== "") {
|
|
630
|
+
kv.prediction_cutoff_time = cutoff;
|
|
631
|
+
}
|
|
617
632
|
printKv(kv);
|
|
618
633
|
} catch (e) {
|
|
619
634
|
printError(e.message);
|
|
@@ -732,7 +747,8 @@ async function syncCompetitions() {
|
|
|
732
747
|
current_participants: c.currentParticipants ?? c.current_participants ?? c.participant_count ?? 0,
|
|
733
748
|
max_participants: c.maxParticipants ?? c.max_participants ?? null,
|
|
734
749
|
start_time: c.startTime || c.start_time || c.starts_at || null,
|
|
735
|
-
end_time: c.endTime || c.end_time || c.ends_at || null
|
|
750
|
+
end_time: c.endTime || c.end_time || c.ends_at || null,
|
|
751
|
+
prediction_cutoff_time: c.prediction_cutoff_time ?? c.predictionCutoffTime ?? null
|
|
736
752
|
}));
|
|
737
753
|
const cache = {
|
|
738
754
|
synced_at: (/* @__PURE__ */ new Date()).toISOString(),
|