icoa-cli 1.8.1 → 1.8.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.
@@ -333,6 +333,56 @@ async function installAll() {
333
333
  }
334
334
  console.log();
335
335
  }
336
+ // Find the correct pip for Python 3.12
337
+ let pipCmd = 'pip3';
338
+ if (os === 'darwin') {
339
+ // Prefer brew Python 3.12 pip over conda/system pip
340
+ const brewPip = '/opt/homebrew/opt/python@3.12/bin/pip3.12';
341
+ try {
342
+ execSync(`${brewPip} --version`, { stdio: 'ignore' });
343
+ pipCmd = brewPip;
344
+ console.log(chalk.gray(` Using: ${brewPip}`));
345
+ }
346
+ catch {
347
+ // Try generic pip3.12
348
+ try {
349
+ execSync('pip3.12 --version', { stdio: 'ignore' });
350
+ pipCmd = 'pip3.12';
351
+ }
352
+ catch { /* fall back to pip3 */ }
353
+ }
354
+ }
355
+ else if (os === 'linux') {
356
+ try {
357
+ execSync('pip3.12 --version', { stdio: 'ignore' });
358
+ pipCmd = 'pip3.12';
359
+ }
360
+ catch { /* fall back to pip3 */ }
361
+ }
362
+ // Pre-install system dependencies for packages that need them
363
+ if (os === 'darwin') {
364
+ console.log(chalk.gray(' Installing build dependencies...'));
365
+ try {
366
+ execSync('brew install gmp mpfr libmpc libmagic', { stdio: 'ignore' });
367
+ console.log(chalk.green(' ✓ Build dependencies ready (gmp, mpfr, libmpc, libmagic)'));
368
+ }
369
+ catch { /* some may already exist */ }
370
+ }
371
+ else if (os === 'linux') {
372
+ try {
373
+ execSync('sudo apt-get install -y libgmp-dev libmpfr-dev libmpc-dev libmagic1', { stdio: 'ignore' });
374
+ }
375
+ catch { /* ignore */ }
376
+ }
377
+ console.log();
378
+ // Build environment for native extensions (gmpy2 etc.)
379
+ const buildEnv = { ...process.env };
380
+ if (os === 'darwin') {
381
+ buildEnv['CFLAGS'] = `-I/opt/homebrew/include ${buildEnv['CFLAGS'] || ''}`.trim();
382
+ buildEnv['LDFLAGS'] = `-L/opt/homebrew/lib ${buildEnv['LDFLAGS'] || ''}`.trim();
383
+ buildEnv['C_INCLUDE_PATH'] = `/opt/homebrew/include:${buildEnv['C_INCLUDE_PATH'] || ''}`;
384
+ buildEnv['LIBRARY_PATH'] = `/opt/homebrew/lib:${buildEnv['LIBRARY_PATH'] || ''}`;
385
+ }
336
386
  // Install Python libraries
337
387
  let pipInstalled = 0;
338
388
  let pipFailed = 0;
@@ -348,7 +398,7 @@ async function installAll() {
348
398
  }
349
399
  process.stdout.write(chalk.gray(` ⏳ ${lib.name}...`));
350
400
  try {
351
- execSync(`pip3 install ${pipFlag} ${lib.install}`, { stdio: 'ignore' });
401
+ execSync(`${pipCmd} install ${pipFlag} ${lib.install}`, { stdio: 'ignore', env: buildEnv });
352
402
  process.stdout.write('\r');
353
403
  console.log(chalk.green(` ✓ ${lib.name}`) + chalk.gray(` (${lib.install})`));
354
404
  pipInstalled++;
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 v1.8.1')}
39
+ ${chalk.gray('CLI-Native Competition Terminal v1.8.3')}
40
40
 
41
41
  ${LINE}
42
42
  `;
package/dist/repl.js CHANGED
@@ -8,7 +8,7 @@ import { ensureSandbox, runInSandbox, isDockerAvailable } from './lib/sandbox.js
8
8
  import { logCommand } from './lib/logger.js';
9
9
  import { startLogSync, stopLogSync } from './lib/log-sync.js';
10
10
  const INTERCEPT = '__REPL_NO_EXIT__';
11
- const VERSION = '1.8.1';
11
+ const VERSION = '1.8.3';
12
12
  export async function startRepl(program, resumeMode) {
13
13
  const config = getConfig();
14
14
  const connected = isConnected();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icoa-cli",
3
- "version": "1.8.1",
3
+ "version": "1.8.3",
4
4
  "description": "ICOA CLI — The world's first CLI-native CTF competition terminal",
5
5
  "type": "module",
6
6
  "bin": {