squeezr-ai 1.16.5 → 1.16.6

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.
Files changed (2) hide show
  1. package/bin/squeezr.js +23 -11
  2. package/package.json +1 -1
package/bin/squeezr.js CHANGED
@@ -492,12 +492,22 @@ async function uninstall() {
492
492
  const tomlPath = path.join(ROOT, 'squeezr.toml')
493
493
  try { fs.unlinkSync(tomlPath) } catch {}
494
494
 
495
- console.log(`
496
- Done! Squeezr has been completely removed.
495
+ // 7. npm uninstall -g (clear HTTPS_PROXY first so npm doesn't hit dead proxy)
496
+ console.log(' [..] Uninstalling npm package...')
497
+ const cleanEnv = { ...process.env, HTTPS_PROXY: '', https_proxy: '', HTTP_PROXY: '', http_proxy: '' }
498
+ try {
499
+ execSync('npm uninstall -g squeezr-ai', { stdio: 'inherit', env: cleanEnv })
500
+ console.log(' [ok] npm package removed')
501
+ } catch {
502
+ try {
503
+ execSync('sudo npm uninstall -g squeezr-ai', { stdio: 'inherit', env: cleanEnv })
504
+ console.log(' [ok] npm package removed')
505
+ } catch {
506
+ console.log(' [warn] Could not uninstall npm package. Run manually: npm uninstall -g squeezr-ai')
507
+ }
508
+ }
497
509
 
498
- To finish, run:
499
- npm uninstall -g squeezr-ai
500
- `)
510
+ console.log('\nDone! Squeezr has been completely removed.\n')
501
511
  }
502
512
 
503
513
  // ── squeezr setup ─────────────────────────────────────────────────────────────
@@ -1019,19 +1029,21 @@ switch (command) {
1019
1029
  await new Promise(r => setTimeout(r, 1000))
1020
1030
 
1021
1031
  console.log('Installing latest version...')
1032
+ const cleanEnv = { ...process.env, HTTPS_PROXY: '', https_proxy: '', HTTP_PROXY: '', http_proxy: '' }
1022
1033
  try {
1023
- const npmCmd = process.platform === 'win32' ? 'npm' : 'HTTPS_PROXY= npm'
1024
- execSync(`${npmCmd} install -g squeezr-ai@latest`, { stdio: 'inherit' })
1025
- } catch (e) {
1026
- // On Unix, might need sudo
1034
+ execSync('npm install -g squeezr-ai@latest', { stdio: 'inherit', env: cleanEnv })
1035
+ } catch {
1027
1036
  try {
1028
- execSync('sudo HTTPS_PROXY= npm install -g squeezr-ai@latest', { stdio: 'inherit' })
1037
+ execSync('sudo npm install -g squeezr-ai@latest', { stdio: 'inherit', env: cleanEnv })
1029
1038
  } catch {
1030
- console.error('npm install failed. Try manually: npm install -g squeezr-ai')
1039
+ console.error('npm install failed. Try manually: HTTPS_PROXY= npm install -g squeezr-ai')
1031
1040
  process.exit(1)
1032
1041
  }
1033
1042
  }
1034
1043
 
1044
+ // Clear update check cache so it doesn't show stale banner
1045
+ try { fs.unlinkSync(UPDATE_CHECK_FILE) } catch {}
1046
+
1035
1047
  console.log('\nStarting Squeezr...')
1036
1048
  // Re-exec the new binary so we run the updated code
1037
1049
  const squeezrBin = process.argv[1]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squeezr-ai",
3
- "version": "1.16.5",
3
+ "version": "1.16.6",
4
4
  "description": "AI proxy that compresses Claude Code, Codex, Aider, Gemini CLI and Ollama context windows to save thousands of tokens per session",
5
5
  "keywords": [
6
6
  "claude",