icoa-cli 2.15.13 → 2.15.14
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 +9 -11
- package/package.json +1 -1
package/dist/commands/exam.js
CHANGED
|
@@ -98,8 +98,6 @@ function printQuestion(q, answer) {
|
|
|
98
98
|
const answered = Object.keys(state?.answers || {}).length;
|
|
99
99
|
const help = getHelpState(state);
|
|
100
100
|
const eliminated = help.eliminated[q.number] || [];
|
|
101
|
-
// Top hint
|
|
102
|
-
console.log(chalk.gray(' Type "back" to pause · Don\'t type "exit" (it quits CLI)'));
|
|
103
101
|
// Progress bar
|
|
104
102
|
printQuestionProgress(q.number, total, answered);
|
|
105
103
|
// Easter egg
|
|
@@ -125,16 +123,16 @@ function printQuestion(q, answer) {
|
|
|
125
123
|
}
|
|
126
124
|
}
|
|
127
125
|
console.log();
|
|
128
|
-
//
|
|
126
|
+
// Full menu on every question
|
|
129
127
|
const remaining = help.max - help.used;
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
console.log(chalk.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
128
|
+
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})`);
|
|
129
|
+
console.log(chalk.gray(' ─────────────────────────────────────────'));
|
|
130
|
+
console.log(chalk.yellow(' A/B/C/D') + chalk.gray(' answer this question'));
|
|
131
|
+
console.log(chalk.yellow(' help') + chalk.gray(` ${helpLabel}`));
|
|
132
|
+
console.log(chalk.yellow(' next') + chalk.gray(' / ') + chalk.yellow('prev') + chalk.gray(' move between questions'));
|
|
133
|
+
console.log(chalk.yellow(' back') + chalk.gray(' pause and return to menu'));
|
|
134
|
+
console.log(chalk.yellow(' lang es') + chalk.gray(' switch language'));
|
|
135
|
+
console.log(chalk.gray(' ─────────────────────────────────────────'));
|
|
138
136
|
}
|
|
139
137
|
export function registerExamCommand(program) {
|
|
140
138
|
const exam = program.command('exam').description('National selection exam');
|