squeezr-ai 1.16.6 → 1.16.8
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 +27 -7
- 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
|
@@ -991,7 +991,10 @@ Done!
|
|
|
991
991
|
WSL env vars added to ${profile}.
|
|
992
992
|
|
|
993
993
|
To activate in THIS terminal: source ${profile}
|
|
994
|
-
|
|
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.
|
|
995
998
|
|
|
996
999
|
squeezr status — check it's running
|
|
997
1000
|
squeezr gain — see token savings
|
|
@@ -1041,15 +1044,32 @@ switch (command) {
|
|
|
1041
1044
|
}
|
|
1042
1045
|
}
|
|
1043
1046
|
|
|
1044
|
-
//
|
|
1045
|
-
try {
|
|
1047
|
+
// Write cache with the new version so neither parent nor child shows stale banner
|
|
1048
|
+
try {
|
|
1049
|
+
const newPkg = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf-8'))
|
|
1050
|
+
const dir = path.dirname(UPDATE_CHECK_FILE)
|
|
1051
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true })
|
|
1052
|
+
fs.writeFileSync(UPDATE_CHECK_FILE, JSON.stringify({ latest: newPkg.version, checkedAt: Date.now() }))
|
|
1053
|
+
} catch {
|
|
1054
|
+
try { fs.unlinkSync(UPDATE_CHECK_FILE) } catch {}
|
|
1055
|
+
}
|
|
1046
1056
|
|
|
1047
1057
|
console.log('\nStarting Squeezr...')
|
|
1048
|
-
//
|
|
1049
|
-
|
|
1058
|
+
// Resolve the updated binary from npm global path (process.argv[1] may still be the old version)
|
|
1059
|
+
let newBin = process.argv[1]
|
|
1050
1060
|
try {
|
|
1051
|
-
execSync(
|
|
1061
|
+
const resolved = execSync('which squeezr', { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] }).trim()
|
|
1062
|
+
if (resolved) newBin = resolved
|
|
1052
1063
|
} catch {}
|
|
1064
|
+
try {
|
|
1065
|
+
execSync(`node "${newBin}" start`, { stdio: 'inherit' })
|
|
1066
|
+
} catch {}
|
|
1067
|
+
|
|
1068
|
+
if (isWSL()) {
|
|
1069
|
+
console.log('\n ⚠️ IMPORTANT: Close this terminal and open a new one so the')
|
|
1070
|
+
console.log(' environment variables take effect. Otherwise tools like')
|
|
1071
|
+
console.log(' Claude Code may fail with 502 errors.\n')
|
|
1072
|
+
}
|
|
1053
1073
|
})()
|
|
1054
1074
|
break
|
|
1055
1075
|
case 'stop':
|
|
@@ -1100,4 +1120,4 @@ switch (command) {
|
|
|
1100
1120
|
process.exit(1)
|
|
1101
1121
|
}
|
|
1102
1122
|
|
|
1103
|
-
await showUpdateBanner()
|
|
1123
|
+
if (command !== 'update') await showUpdateBanner()
|
package/package.json
CHANGED