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.
- package/bin/squeezr.js +23 -11
- 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
|
-
|
|
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 ─────────────────────────────────────────────────────────────
|
|
@@ -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
|
-
|
|
1024
|
-
|
|
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
|
|
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