icoa-cli 2.9.0 → 2.9.2
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/index.js +6 -1
- package/dist/repl.js +4 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17,6 +17,11 @@ import { registerExamCommand } from './commands/exam.js';
|
|
|
17
17
|
import { getConfig, saveConfig } from './lib/config.js';
|
|
18
18
|
import { startRepl } from './repl.js';
|
|
19
19
|
import { setTerminalTheme } from './lib/theme.js';
|
|
20
|
+
import { readFileSync } from 'node:fs';
|
|
21
|
+
import { fileURLToPath } from 'node:url';
|
|
22
|
+
import { dirname, join } from 'node:path';
|
|
23
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
24
|
+
const PKG_VERSION = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8')).version;
|
|
20
25
|
const LINE = chalk.cyan(' ─────────────────────────────────────────────────────');
|
|
21
26
|
const BANNER = `
|
|
22
27
|
${LINE}
|
|
@@ -38,7 +43,7 @@ ${LINE}
|
|
|
38
43
|
${chalk.white('Sydney, Australia')} ${chalk.gray('Jun 27 - Jul 2, 2026')}
|
|
39
44
|
${chalk.cyan.underline('https://icoa2026.au')}
|
|
40
45
|
|
|
41
|
-
${chalk.gray(
|
|
46
|
+
${chalk.gray(`CLI-Native Competition Terminal v${PKG_VERSION}`)}
|
|
42
47
|
|
|
43
48
|
${LINE}
|
|
44
49
|
`;
|
package/dist/repl.js
CHANGED
|
@@ -130,11 +130,10 @@ export async function startRepl(program, resumeMode) {
|
|
|
130
130
|
console.log(chalk.green(` Welcome back, ${config.userName}!`) + ' ' + modeLabel);
|
|
131
131
|
console.log(chalk.gray(` Connected to ${config.ctfdUrl}`));
|
|
132
132
|
console.log();
|
|
133
|
-
console.log(chalk.gray('
|
|
134
|
-
console.log(chalk.
|
|
135
|
-
console.log(chalk.white('
|
|
136
|
-
console.log(chalk.
|
|
137
|
-
console.log(chalk.gray(' ─────────────────────────────────'));
|
|
133
|
+
console.log(chalk.gray(' ─────────────────────────────────────────────'));
|
|
134
|
+
console.log(chalk.bold.cyan(' demo') + chalk.gray(' Free practice exam'));
|
|
135
|
+
console.log(chalk.white(' exam list') + chalk.gray(' Your available exams'));
|
|
136
|
+
console.log(chalk.gray(' ─────────────────────────────────────────────'));
|
|
138
137
|
console.log();
|
|
139
138
|
}
|
|
140
139
|
else {
|