opencode-studio-server 1.12.3 → 1.12.4

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/index.js +10 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1636,14 +1636,18 @@ app.delete('/api/auth/profiles/:provider/:name', (req, res) => {
1636
1636
  if (studio.activeProfiles && studio.activeProfiles[provider] === name) {
1637
1637
  delete studio.activeProfiles[provider];
1638
1638
  saveStudioConfig(studio);
1639
+ }
1639
1640
 
1640
- const authCfg = loadAuthConfig() || {};
1641
+ const authCfg = loadAuthConfig() || {};
1642
+ if (provider === 'google' && authCfg.google?.email === name) {
1643
+ delete authCfg.google;
1644
+ delete authCfg['google.antigravity'];
1645
+ delete authCfg['google.gemini'];
1646
+ const cp = getConfigPath();
1647
+ const ap = path.join(path.dirname(cp), 'auth.json');
1648
+ atomicWriteFileSync(ap, JSON.stringify(authCfg, null, 2));
1649
+ } else if (authCfg[provider]) {
1641
1650
  delete authCfg[provider];
1642
- if (provider === 'google') {
1643
- const key = 'google.antigravity';
1644
- delete authCfg.google;
1645
- delete authCfg[key];
1646
- }
1647
1651
  const cp = getConfigPath();
1648
1652
  const ap = path.join(path.dirname(cp), 'auth.json');
1649
1653
  atomicWriteFileSync(ap, JSON.stringify(authCfg, null, 2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-studio-server",
3
- "version": "1.12.3",
3
+ "version": "1.12.4",
4
4
  "description": "Backend server for OpenCode Studio - manages opencode configurations",
5
5
  "main": "index.js",
6
6
  "bin": {