icoa-cli 2.1.6 → 2.1.7
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 +5 -10
- package/package.json +1 -1
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.
|
|
39
|
+
${chalk.gray('CLI-Native Competition Terminal v2.1.7')}
|
|
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.
|
|
29
|
+
const VERSION = '2.1.7';
|
|
30
30
|
export async function startRepl(program, resumeMode) {
|
|
31
31
|
const config = getConfig();
|
|
32
32
|
const connected = isConnected();
|
|
@@ -273,27 +273,22 @@ export async function startRepl(program, resumeMode) {
|
|
|
273
273
|
throw new Error(INTERCEPT);
|
|
274
274
|
});
|
|
275
275
|
try {
|
|
276
|
-
|
|
277
|
-
const timeout = new Promise((_, reject) => setTimeout(() => reject(new Error('Command timed out')), 5000));
|
|
278
|
-
await Promise.race([
|
|
279
|
-
program.parseAsync(['node', 'icoa', ...args]),
|
|
280
|
-
timeout,
|
|
281
|
-
]);
|
|
276
|
+
await program.parseAsync(['node', 'icoa', ...args]);
|
|
282
277
|
}
|
|
283
278
|
catch (err) {
|
|
284
279
|
const msg = err instanceof Error ? err.message : String(err);
|
|
285
280
|
if (msg === INTERCEPT) {
|
|
286
281
|
// Command tried to exit — continue REPL
|
|
287
282
|
}
|
|
288
|
-
else if (msg === 'Command timed out') {
|
|
289
|
-
console.log(chalk.yellow(' Command timed out. Try again.'));
|
|
290
|
-
}
|
|
291
283
|
else if (msg.includes('commander.unknownCommand')) {
|
|
292
284
|
console.log(chalk.yellow(` Unknown command: ${cmd}. Type 'help' for commands.`));
|
|
293
285
|
}
|
|
294
286
|
else if (msg.includes('commander.')) {
|
|
295
287
|
// Internal Commander errors — ignore
|
|
296
288
|
}
|
|
289
|
+
else if (msg.includes('fetch failed') || msg.includes('ECONNREFUSED') || msg.includes('ETIMEDOUT')) {
|
|
290
|
+
console.log(chalk.yellow(' Network error. Check your connection.'));
|
|
291
|
+
}
|
|
297
292
|
}
|
|
298
293
|
finally {
|
|
299
294
|
process.exit = realExit;
|