icoa-cli 2.9.2 → 2.9.3

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.
@@ -91,7 +91,7 @@ function printQuestion(q, answer) {
91
91
  const isEliminated = eliminated.includes(key);
92
92
  const selected = answer === key;
93
93
  if (isEliminated) {
94
- console.log(chalk.gray.strikethrough(` ${key}. ${q.options[key]}`));
94
+ console.log(chalk.gray.strikethrough(` ${key}. ${q.options[key]}`) + chalk.red(' (wrong)'));
95
95
  }
96
96
  else if (selected) {
97
97
  console.log(chalk.green.bold(` ▸ ${key}. ${q.options[key]}`));
@@ -130,7 +130,6 @@ export function registerExamCommand(program) {
130
130
  printInfo('No exams available.');
131
131
  return;
132
132
  }
133
- printHeader('Available Exams');
134
133
  const rows = exams.map((e) => {
135
134
  const statusColor = e.status === 'submitted' ? chalk.green
136
135
  : e.status === 'in_progress' ? chalk.yellow
@@ -144,9 +143,20 @@ export function registerExamCommand(program) {
144
143
  statusColor(e.status),
145
144
  ];
146
145
  });
146
+ // Group by country
147
+ const countries = [...new Set(exams.map((e) => e.country))];
148
+ if (countries.length > 1) {
149
+ printHeader(`Available Exams (${countries.length} countries)`);
150
+ }
151
+ else {
152
+ printHeader('Available Exams');
153
+ }
147
154
  printTable(['ID', 'Name', 'Country', 'Questions', 'Duration', 'Status'], rows);
148
155
  console.log();
149
- console.log(chalk.gray(' Start an exam: exam start <id>'));
156
+ console.log(chalk.gray(' Start: exam start <id>'));
157
+ if (countries.length > 1) {
158
+ console.log(chalk.gray(` Countries: ${countries.join(', ')}`));
159
+ }
150
160
  }
151
161
  catch (err) {
152
162
  spinner.fail('Failed to load exams');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icoa-cli",
3
- "version": "2.9.2",
3
+ "version": "2.9.3",
4
4
  "description": "ICOA CLI — The world's first CLI-native CTF competition terminal",
5
5
  "type": "module",
6
6
  "bin": {