icoa-cli 2.15.10 → 2.15.12
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 +13 -14
- package/package.json +1 -1
package/dist/commands/exam.js
CHANGED
|
@@ -12,7 +12,7 @@ function drawProgress(percent, label) {
|
|
|
12
12
|
const empty = width - filled;
|
|
13
13
|
const bar = chalk.green('█'.repeat(filled)) + chalk.gray('░'.repeat(empty));
|
|
14
14
|
const pct = String(percent).padStart(3) + '%';
|
|
15
|
-
process.stdout.write(`\r ${bar} ${pct} ${chalk.gray(label)}`);
|
|
15
|
+
process.stdout.write(`\r\x1b[2K ${bar} ${pct} ${chalk.gray(label)}`);
|
|
16
16
|
}
|
|
17
17
|
function requireExamConnection() {
|
|
18
18
|
const config = getConfig();
|
|
@@ -54,16 +54,16 @@ function printTimeRemaining() {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
function printHowToPlay() {
|
|
57
|
-
console.log(chalk.gray('
|
|
58
|
-
console.log(chalk.
|
|
59
|
-
console.log(chalk.
|
|
60
|
-
console.log(chalk.
|
|
61
|
-
console.log(chalk.
|
|
62
|
-
console.log(chalk.
|
|
63
|
-
console.log(chalk.
|
|
64
|
-
console.log(chalk.
|
|
65
|
-
console.log(chalk.gray('
|
|
66
|
-
console.log(chalk.gray('
|
|
57
|
+
console.log(chalk.gray(' ─────────────────────────────────────────'));
|
|
58
|
+
console.log(chalk.white(' How to play:'));
|
|
59
|
+
console.log(chalk.yellow(' A/B/C/D') + chalk.gray(' answer the question'));
|
|
60
|
+
console.log(chalk.yellow(' help') + chalk.gray(' remove a wrong option'));
|
|
61
|
+
console.log(chalk.yellow(' next') + chalk.gray(' / ') + chalk.yellow('prev') + chalk.gray(' move between questions'));
|
|
62
|
+
console.log(chalk.yellow(' more help') + chalk.gray(' +3 bonus helps'));
|
|
63
|
+
console.log(chalk.yellow(' back') + chalk.gray(' pause and return to menu'));
|
|
64
|
+
console.log(chalk.yellow(' lang es') + chalk.gray(' switch language (15 available)'));
|
|
65
|
+
console.log(chalk.gray(' es · ko · fr · ar · zh · ja ...'));
|
|
66
|
+
console.log(chalk.gray(' ─────────────────────────────────────────'));
|
|
67
67
|
}
|
|
68
68
|
// Australian easter eggs every 5 questions
|
|
69
69
|
const EASTER_EGGS = {
|
|
@@ -866,11 +866,10 @@ export function registerExamCommand(program) {
|
|
|
866
866
|
await sleep(150);
|
|
867
867
|
drawProgress(100, 'Ready!');
|
|
868
868
|
console.log();
|
|
869
|
-
saveExamState({ session, questions: DEMO_QUESTIONS, answers: {} });
|
|
870
869
|
console.log();
|
|
870
|
+
saveExamState({ session, questions: DEMO_QUESTIONS, answers: {} });
|
|
871
871
|
printKeyValue('Questions', '30');
|
|
872
|
-
printKeyValue('Duration', '
|
|
873
|
-
printTimeRemaining();
|
|
872
|
+
printKeyValue('Duration', 'No time limit');
|
|
874
873
|
// Show first question
|
|
875
874
|
printQuestion(DEMO_QUESTIONS[0]);
|
|
876
875
|
console.log(chalk.gray(' Commands: exam q <n> | exam answer <n> <A-D> | exam review | exam submit'));
|