squeezr-ai 1.16.18 → 1.16.20

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 +18 -16
  2. package/package.json +1 -1
package/bin/squeezr.js CHANGED
@@ -112,7 +112,7 @@ function printEnvRefreshHint(port, mitmPort) {
112
112
  * after squeezr start/setup/update (child processes can't modify parent env).
113
113
  */
114
114
  function installShellWrapper() {
115
- if (process.platform === 'win32') return installShellWrapper()
115
+ if (process.platform === 'win32') return installPowerShellWrapper()
116
116
  if (isWSL() || process.platform === 'linux' || process.platform === 'darwin') return installBashWrapper()
117
117
  }
118
118
 
@@ -169,26 +169,28 @@ ${endMarker}`
169
169
  }
170
170
  }
171
171
 
172
- function installShellWrapper() {
172
+ function installPowerShellWrapper() {
173
173
  try {
174
174
  const psProfilePath = execSync('powershell -NoProfile -Command "[Environment]::GetFolderPath(\'MyDocuments\') + \'\\WindowsPowerShell\\Microsoft.PowerShell_profile.ps1\'"', { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] }).trim()
175
175
  const psProfileDir = path.dirname(psProfilePath)
176
176
  if (!fs.existsSync(psProfileDir)) fs.mkdirSync(psProfileDir, { recursive: true })
177
177
  const psMarker = '# squeezr wrapper'
178
- const psFunction = `${psMarker}
179
- function squeezr {
180
- & squeezr.cmd @args
181
- if ($args[0] -match '^(start|setup|update)$') {
182
- @('ANTHROPIC_BASE_URL','GEMINI_API_BASE_URL','HTTPS_PROXY','NODE_EXTRA_CA_CERTS') | ForEach-Object {
183
- $v = [Environment]::GetEnvironmentVariable($_, 'User')
184
- if ($v) { [Environment]::SetEnvironmentVariable($_, $v, 'Process') }
185
- }
186
- }
187
- if ($args[0] -eq 'stop') {
188
- [Environment]::SetEnvironmentVariable('HTTPS_PROXY', $null, 'Process')
189
- }
190
- }
191
- # end squeezr wrapper`
178
+ const psFunction = [
179
+ psMarker,
180
+ 'function squeezr {',
181
+ ' & squeezr.cmd @args',
182
+ " if ($args[0] -match '^(start|setup|update)$') {",
183
+ " @('ANTHROPIC_BASE_URL','GEMINI_API_BASE_URL','HTTPS_PROXY','NODE_EXTRA_CA_CERTS') | ForEach-Object {",
184
+ " $v = [Environment]::GetEnvironmentVariable($_, 'User')",
185
+ " if ($v) { [Environment]::SetEnvironmentVariable($_, $v, 'Process') }",
186
+ ' }',
187
+ ' }',
188
+ " if ($args[0] -eq 'stop') {",
189
+ " [Environment]::SetEnvironmentVariable('HTTPS_PROXY', $null, 'Process')",
190
+ ' }',
191
+ '}',
192
+ '# end squeezr wrapper',
193
+ ].join('\n')
192
194
  const existing = fs.existsSync(psProfilePath) ? fs.readFileSync(psProfilePath, 'utf-8') : ''
193
195
  if (!existing.includes(psMarker)) {
194
196
  fs.appendFileSync(psProfilePath, `\n${psFunction}\n`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squeezr-ai",
3
- "version": "1.16.18",
3
+ "version": "1.16.20",
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",