icoa-cli 1.8.1 → 1.8.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.
@@ -333,6 +333,53 @@ 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
+ // Set compiler flags for brew libraries (macOS)
379
+ let envPrefix = '';
380
+ if (os === 'darwin') {
381
+ envPrefix = 'CFLAGS="-I/opt/homebrew/include" LDFLAGS="-L/opt/homebrew/lib" ';
382
+ }
336
383
  // Install Python libraries
337
384
  let pipInstalled = 0;
338
385
  let pipFailed = 0;
@@ -348,7 +395,8 @@ async function installAll() {
348
395
  }
349
396
  process.stdout.write(chalk.gray(` ⏳ ${lib.name}...`));
350
397
  try {
351
- execSync(`pip3 install ${pipFlag} ${lib.install}`, { stdio: 'ignore' });
398
+ const cmd = `${envPrefix}${pipCmd} install ${pipFlag} ${lib.install}`;
399
+ execSync(cmd, { stdio: 'ignore', shell: '/bin/bash' });
352
400
  process.stdout.write('\r');
353
401
  console.log(chalk.green(` ✓ ${lib.name}`) + chalk.gray(` (${lib.install})`));
354
402
  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.2')}
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.2';
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.2",
4
4
  "description": "ICOA CLI — The world's first CLI-native CTF competition terminal",
5
5
  "type": "module",
6
6
  "bin": {