icoa-cli 2.15.12 → 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 +11 -12
- package/package.json +1 -1
package/dist/commands/exam.js
CHANGED
|
@@ -62,7 +62,8 @@ function printHowToPlay() {
|
|
|
62
62
|
console.log(chalk.yellow(' more help') + chalk.gray(' +3 bonus helps'));
|
|
63
63
|
console.log(chalk.yellow(' back') + chalk.gray(' pause and return to menu'));
|
|
64
64
|
console.log(chalk.yellow(' lang es') + chalk.gray(' switch language (15 available)'));
|
|
65
|
-
console.log(chalk.gray(' es ·
|
|
65
|
+
console.log(chalk.gray(' es · zh · ja · ko · ar · fr · pt'));
|
|
66
|
+
console.log(chalk.gray(' ru · hi · de · id · th · vi · tr'));
|
|
66
67
|
console.log(chalk.gray(' ─────────────────────────────────────────'));
|
|
67
68
|
}
|
|
68
69
|
// Australian easter eggs every 5 questions
|
|
@@ -97,8 +98,6 @@ function printQuestion(q, answer) {
|
|
|
97
98
|
const answered = Object.keys(state?.answers || {}).length;
|
|
98
99
|
const help = getHelpState(state);
|
|
99
100
|
const eliminated = help.eliminated[q.number] || [];
|
|
100
|
-
// Top hint
|
|
101
|
-
console.log(chalk.gray(' Type "back" to pause · Don\'t type "exit" (it quits CLI)'));
|
|
102
101
|
// Progress bar
|
|
103
102
|
printQuestionProgress(q.number, total, answered);
|
|
104
103
|
// Easter egg
|
|
@@ -124,16 +123,16 @@ function printQuestion(q, answer) {
|
|
|
124
123
|
}
|
|
125
124
|
}
|
|
126
125
|
console.log();
|
|
127
|
-
//
|
|
126
|
+
// Full menu on every question
|
|
128
127
|
const remaining = help.max - help.used;
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
console.log(chalk.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
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(' ─────────────────────────────────────────'));
|
|
137
136
|
}
|
|
138
137
|
export function registerExamCommand(program) {
|
|
139
138
|
const exam = program.command('exam').description('National selection exam');
|