icoa-cli 2.15.5 → 2.15.7
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/commands/exam.js +5 -1
- package/package.json +1 -1
package/dist/commands/exam.js
CHANGED
|
@@ -521,9 +521,11 @@ export function registerExamCommand(program) {
|
|
|
521
521
|
const answered = Object.keys(state.answers).length;
|
|
522
522
|
const total = state.session.questionCount;
|
|
523
523
|
printSuccess(`Q${num}: ${c} ✓ (${answered}/${total} answered)`);
|
|
524
|
-
// Auto-show next question
|
|
524
|
+
// Auto-show next question and update _lastQ
|
|
525
525
|
if (num < state.questions.length) {
|
|
526
526
|
const nextQ = state.questions[num]; // 0-indexed: questions[num] = question num+1
|
|
527
|
+
state._lastQ = nextQ.number;
|
|
528
|
+
saveExamState(state);
|
|
527
529
|
printQuestion(nextQ, state.answers[nextQ.number]);
|
|
528
530
|
}
|
|
529
531
|
else if (answered === total) {
|
|
@@ -838,6 +840,8 @@ export function registerExamCommand(program) {
|
|
|
838
840
|
console.log(chalk.gray(' │') + chalk.white(' Type ') + chalk.yellow('next') + chalk.white('/') + chalk.yellow('prev') + chalk.white(' Move between questions ') + chalk.gray('│'));
|
|
839
841
|
console.log(chalk.gray(' │') + chalk.white(' You can change answers anytime before submitting ') + chalk.gray('│'));
|
|
840
842
|
console.log(chalk.gray(' │') + chalk.white(' Running low on help? Type ') + chalk.yellow('more help') + chalk.white(' for +3 ') + chalk.gray('│'));
|
|
843
|
+
console.log(chalk.gray(' │') + chalk.white(' Type ') + chalk.yellow('lang') + chalk.white(' to switch language (15 supported) ') + chalk.gray('│'));
|
|
844
|
+
console.log(chalk.gray(' │') + chalk.gray(' e.g. lang es (Español) · lang zh · lang fr ') + chalk.gray('│'));
|
|
841
845
|
console.log(chalk.gray(' └─────────────────────────────────────────────────┘'));
|
|
842
846
|
console.log();
|
|
843
847
|
const proceed = await confirm({
|