icoa-cli 2.1.4 → 2.1.5

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 CHANGED
@@ -36,7 +36,7 @@ ${LINE}
36
36
  ${chalk.white('Sydney, Australia')} ${chalk.gray('Jun 27 - Jul 2, 2026')}
37
37
  ${chalk.cyan.underline('https://icoa2026.au')}
38
38
 
39
- ${chalk.gray('CLI-Native Competition Terminal v2.1.4')}
39
+ ${chalk.gray('CLI-Native Competition Terminal v2.1.5')}
40
40
 
41
41
  ${LINE}
42
42
  `;
package/dist/repl.js CHANGED
@@ -26,7 +26,7 @@ const BLOCKED_COMMANDS = new Set([
26
26
  'iptables', 'ufw', // firewall
27
27
  ]);
28
28
  const INTERCEPT = '__REPL_NO_EXIT__';
29
- const VERSION = '2.1.4';
29
+ const VERSION = '2.1.5';
30
30
  export async function startRepl(program, resumeMode) {
31
31
  const config = getConfig();
32
32
  const connected = isConnected();
@@ -273,13 +273,21 @@ export async function startRepl(program, resumeMode) {
273
273
  throw new Error(INTERCEPT);
274
274
  });
275
275
  try {
276
- await program.parseAsync(['node', 'icoa', ...args]);
276
+ // Add timeout to prevent REPL from hanging
277
+ const timeout = new Promise((_, reject) => setTimeout(() => reject(new Error('Command timed out')), 30000));
278
+ await Promise.race([
279
+ program.parseAsync(['node', 'icoa', ...args]),
280
+ timeout,
281
+ ]);
277
282
  }
278
283
  catch (err) {
279
284
  const msg = err instanceof Error ? err.message : String(err);
280
285
  if (msg === INTERCEPT) {
281
286
  // Command tried to exit — continue REPL
282
287
  }
288
+ else if (msg === 'Command timed out') {
289
+ console.log(chalk.yellow(' Command timed out (30s). Try again.'));
290
+ }
283
291
  else if (msg.includes('commander.unknownCommand')) {
284
292
  console.log(chalk.yellow(` Unknown command: ${cmd}. Type 'help' for commands.`));
285
293
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icoa-cli",
3
- "version": "2.1.4",
3
+ "version": "2.1.5",
4
4
  "description": "ICOA CLI — The world's first CLI-native CTF competition terminal",
5
5
  "type": "module",
6
6
  "bin": {