icoa-cli 2.16.6 → 2.16.8

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.
@@ -133,10 +133,12 @@ function printQuestion(q, answer) {
133
133
  }
134
134
  // Full menu on every question
135
135
  const remaining = help.max - help.used;
136
- const helpLabel = remaining > 0 ? `remove a wrong option (${remaining}/${help.max})` : (help.max < 8 ? 'used up — type more help for +3' : `used up (${help.used}/${help.max})`);
136
+ const helpLabel = remaining > 0
137
+ ? chalk.gray('remove a wrong option ') + chalk.yellow(`(${remaining}/${help.max})`)
138
+ : (help.max < 8 ? chalk.gray('used up — type ') + chalk.yellow('more help') + chalk.gray(' for +3') : chalk.gray(`used up (${help.used}/${help.max})`));
137
139
  console.log(chalk.gray(' ─────────────────────────────────────────'));
138
140
  console.log(chalk.yellow(' A/B/C/D') + chalk.gray(' answer this question'));
139
- console.log(chalk.yellow(' help') + chalk.gray(` ${helpLabel}`));
141
+ console.log(chalk.yellow(' help') + ' ' + helpLabel);
140
142
  console.log(chalk.yellow(' next') + chalk.gray(' / ') + chalk.yellow('prev') + chalk.gray(' move between questions'));
141
143
  console.log(chalk.yellow(' back') + chalk.gray(' pause and return to menu'));
142
144
  console.log(chalk.yellow(' lang') + chalk.gray(' view all languages / ') + chalk.yellow('lang es') + chalk.gray(' to switch'));
@@ -636,14 +638,17 @@ export function registerExamCommand(program) {
636
638
  }
637
639
  return;
638
640
  }
639
- let msg = `Submit ${answered}/${total} answers?`;
640
- if (unanswered > 0) {
641
- msg += chalk.yellow(` ${unanswered} unanswered.`);
641
+ // Demo: submit directly. Real exam: show warning first.
642
+ if (state.session.examId !== 'demo-free') {
643
+ console.log();
644
+ console.log(chalk.yellow(` Submitting ${answered}/${total} answers.`));
645
+ if (unanswered > 0) {
646
+ console.log(chalk.yellow(` ${unanswered} unanswered.`));
647
+ }
648
+ console.log(chalk.gray(' You cannot change answers after this.'));
649
+ console.log(chalk.gray(' Type "back" now to cancel, or wait...'));
650
+ await sleep(2000);
642
651
  }
643
- msg += ' You cannot change answers after this.';
644
- const proceed = await confirm({ message: chalk.white(msg), default: false, theme: { prefix: '', style: { message: (t) => t, defaultAnswer: (t) => chalk.green(t) } } });
645
- if (!proceed)
646
- return;
647
652
  console.log();
648
653
  // Demo exam: grade locally
649
654
  if (state.session.examId === 'demo-free') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icoa-cli",
3
- "version": "2.16.6",
3
+ "version": "2.16.8",
4
4
  "description": "ICOA CLI — The world's first CLI-native CTF competition terminal",
5
5
  "type": "module",
6
6
  "bin": {