squeezr-ai 1.16.5 → 1.16.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/README.md +2 -0
- package/bin/squeezr.js +33 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,6 +23,8 @@ squeezr setup # configures env vars, auto-start, and CA trust
|
|
|
23
23
|
squeezr start
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
> **WSL users:** After `squeezr setup` or `squeezr update`, close the terminal and open a new one so the environment variables take effect.
|
|
27
|
+
|
|
26
28
|
`squeezr setup` handles everything automatically:
|
|
27
29
|
- Sets `ANTHROPIC_BASE_URL`, `GEMINI_API_BASE_URL`, `HTTPS_PROXY`, `NODE_EXTRA_CA_CERTS`
|
|
28
30
|
- Registers auto-start (launchd on macOS, systemd on Linux, Task Scheduler/NSSM on Windows)
|
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
|
-
|
|
496
|
-
|
|
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
|
-
|
|
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 ─────────────────────────────────────────────────────────────
|
|
@@ -981,7 +991,10 @@ Done!
|
|
|
981
991
|
WSL env vars added to ${profile}.
|
|
982
992
|
|
|
983
993
|
To activate in THIS terminal: source ${profile}
|
|
984
|
-
|
|
994
|
+
|
|
995
|
+
⚠️ IMPORTANT: Close this terminal and open a new one so the
|
|
996
|
+
environment variables take effect. Otherwise tools like
|
|
997
|
+
Claude Code may fail with 502 errors.
|
|
985
998
|
|
|
986
999
|
squeezr status — check it's running
|
|
987
1000
|
squeezr gain — see token savings
|
|
@@ -1019,25 +1032,33 @@ switch (command) {
|
|
|
1019
1032
|
await new Promise(r => setTimeout(r, 1000))
|
|
1020
1033
|
|
|
1021
1034
|
console.log('Installing latest version...')
|
|
1035
|
+
const cleanEnv = { ...process.env, HTTPS_PROXY: '', https_proxy: '', HTTP_PROXY: '', http_proxy: '' }
|
|
1022
1036
|
try {
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
} catch (e) {
|
|
1026
|
-
// On Unix, might need sudo
|
|
1037
|
+
execSync('npm install -g squeezr-ai@latest', { stdio: 'inherit', env: cleanEnv })
|
|
1038
|
+
} catch {
|
|
1027
1039
|
try {
|
|
1028
|
-
execSync('sudo
|
|
1040
|
+
execSync('sudo npm install -g squeezr-ai@latest', { stdio: 'inherit', env: cleanEnv })
|
|
1029
1041
|
} catch {
|
|
1030
|
-
console.error('npm install failed. Try manually: npm install -g squeezr-ai')
|
|
1042
|
+
console.error('npm install failed. Try manually: HTTPS_PROXY= npm install -g squeezr-ai')
|
|
1031
1043
|
process.exit(1)
|
|
1032
1044
|
}
|
|
1033
1045
|
}
|
|
1034
1046
|
|
|
1047
|
+
// Clear update check cache so it doesn't show stale banner
|
|
1048
|
+
try { fs.unlinkSync(UPDATE_CHECK_FILE) } catch {}
|
|
1049
|
+
|
|
1035
1050
|
console.log('\nStarting Squeezr...')
|
|
1036
1051
|
// Re-exec the new binary so we run the updated code
|
|
1037
1052
|
const squeezrBin = process.argv[1]
|
|
1038
1053
|
try {
|
|
1039
1054
|
execSync(`node "${squeezrBin}" start`, { stdio: 'inherit' })
|
|
1040
1055
|
} catch {}
|
|
1056
|
+
|
|
1057
|
+
if (isWSL()) {
|
|
1058
|
+
console.log('\n ⚠️ IMPORTANT: Close this terminal and open a new one so the')
|
|
1059
|
+
console.log(' environment variables take effect. Otherwise tools like')
|
|
1060
|
+
console.log(' Claude Code may fail with 502 errors.\n')
|
|
1061
|
+
}
|
|
1041
1062
|
})()
|
|
1042
1063
|
break
|
|
1043
1064
|
case 'stop':
|
package/package.json
CHANGED