squeezr-ai 1.16.23 → 1.16.24
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 +13 -13
- package/package.json +1 -1
package/bin/squeezr.js
CHANGED
|
@@ -157,19 +157,19 @@ function installPowerShellWrapper() {
|
|
|
157
157
|
const psProfileDir = path.dirname(psProfilePath)
|
|
158
158
|
if (!fs.existsSync(psProfileDir)) fs.mkdirSync(psProfileDir, { recursive: true })
|
|
159
159
|
const psMarker = '# squeezr wrapper'
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
160
|
+
const psLines = []
|
|
161
|
+
psLines.push(psMarker)
|
|
162
|
+
psLines.push('function squeezr {')
|
|
163
|
+
psLines.push(' & squeezr.cmd @args')
|
|
164
|
+
psLines.push(' if (@("start","setup","update") -contains $args[0]) {')
|
|
165
|
+
psLines.push(' foreach ($k in @("ANTHROPIC_BASE_URL","GEMINI_API_BASE_URL","NODE_EXTRA_CA_CERTS")) {')
|
|
166
|
+
psLines.push(' $val = [Environment]::GetEnvironmentVariable($k, "User")')
|
|
167
|
+
psLines.push(' if ($val) { [Environment]::SetEnvironmentVariable($k, $val, "Process") }')
|
|
168
|
+
psLines.push(' }')
|
|
169
|
+
psLines.push(' }')
|
|
170
|
+
psLines.push('}')
|
|
171
|
+
psLines.push('# end squeezr wrapper')
|
|
172
|
+
const psFunction = psLines.join('\r\n')
|
|
173
173
|
const existing = fs.existsSync(psProfilePath) ? fs.readFileSync(psProfilePath, 'utf-8') : ''
|
|
174
174
|
if (!existing.includes(psMarker)) {
|
|
175
175
|
fs.appendFileSync(psProfilePath, `\n${psFunction}\n`)
|
package/package.json
CHANGED