icoa-cli 2.5.2 → 2.5.3
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 +1 -1
- package/dist/repl.js +25 -25
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38,7 +38,7 @@ ${LINE}
|
|
|
38
38
|
${chalk.white('Sydney, Australia')} ${chalk.gray('Jun 27 - Jul 2, 2026')}
|
|
39
39
|
${chalk.cyan.underline('https://icoa2026.au')}
|
|
40
40
|
|
|
41
|
-
${chalk.gray('CLI-Native Competition Terminal v2.5.
|
|
41
|
+
${chalk.gray('CLI-Native Competition Terminal v2.5.3')}
|
|
42
42
|
|
|
43
43
|
${LINE}
|
|
44
44
|
`;
|
package/dist/repl.js
CHANGED
|
@@ -34,34 +34,34 @@ export async function startRepl(program, resumeMode) {
|
|
|
34
34
|
const connected = isConnected();
|
|
35
35
|
const realExit = process.exit.bind(process);
|
|
36
36
|
const activated = isActivated();
|
|
37
|
-
// ─── Mode selection (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
// ─── Mode selection (every launch) ───
|
|
38
|
+
const { select: selectMode, confirm: confirmMode } = await import('@inquirer/prompts');
|
|
39
|
+
const savedMode = config.mode || '';
|
|
40
|
+
const choices = [
|
|
41
|
+
{ name: ` ${chalk.bold('National Selection')} ${chalk.gray('·')} ${chalk.gray('Exam only, lightweight')}`, value: 'selection' },
|
|
42
|
+
{ name: ` ${chalk.bold('International Olympiad')} ${chalk.gray('·')} ${chalk.gray('CTF x AI (~500MB)')}`, value: 'olympiad' },
|
|
43
|
+
{ name: ` ${chalk.bold('National/Regional Partner')} ${chalk.gray('·')} ${chalk.gray('Organizer management')}`, value: 'organizer' },
|
|
44
|
+
];
|
|
45
|
+
const defaultIndex = savedMode ? choices.findIndex((c) => c.value === savedMode) : 0;
|
|
46
|
+
console.log(chalk.gray(' Use ↑↓ to select, Enter to confirm.'));
|
|
47
|
+
console.log();
|
|
48
|
+
let mode = await selectMode({
|
|
49
|
+
message: 'Mode',
|
|
50
|
+
choices,
|
|
51
|
+
default: choices[defaultIndex >= 0 ? defaultIndex : 0].value,
|
|
52
|
+
});
|
|
53
|
+
if (mode === 'olympiad' && savedMode !== 'olympiad') {
|
|
44
54
|
console.log();
|
|
45
|
-
mode
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{ name: ` ${chalk.bold('National/Regional Partner')} ${chalk.gray('·')} ${chalk.gray('Organizer management')}`, value: 'organizer' },
|
|
51
|
-
],
|
|
52
|
-
});
|
|
53
|
-
if (mode === 'olympiad') {
|
|
54
|
-
console.log();
|
|
55
|
-
console.log(chalk.yellow(' This mode will download ~500MB of CTF tools and AI models.'));
|
|
56
|
-
const proceed = await confirm({ message: 'Continue?', default: true });
|
|
57
|
-
if (!proceed) {
|
|
58
|
-
mode = 'selection';
|
|
59
|
-
console.log(chalk.gray(' Switched to National Selection mode.'));
|
|
60
|
-
}
|
|
55
|
+
console.log(chalk.yellow(' This mode will download ~500MB of CTF tools and AI models.'));
|
|
56
|
+
const proceed = await confirmMode({ message: 'Continue?', default: true });
|
|
57
|
+
if (!proceed) {
|
|
58
|
+
mode = 'selection';
|
|
59
|
+
console.log(chalk.gray(' Switched to National Selection mode.'));
|
|
61
60
|
}
|
|
62
|
-
saveConfig({ mode });
|
|
63
|
-
console.log();
|
|
64
61
|
}
|
|
62
|
+
if (mode !== savedMode)
|
|
63
|
+
saveConfig({ mode });
|
|
64
|
+
console.log();
|
|
65
65
|
// First run or upgrade: prompt to install env (olympiad only)
|
|
66
66
|
if (mode === 'olympiad' && isFirstRunOrUpgrade(VERSION)) {
|
|
67
67
|
markVersionSeen(VERSION);
|