opencode-studio-server 1.9.1 → 1.9.2

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 +7 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1470,7 +1470,8 @@ app.post('/api/auth/profiles/:provider/:name/activate', (req, res) => {
1470
1470
  ? (activePlugin === 'antigravity' ? 'google.antigravity' : 'google.gemini')
1471
1471
  : provider;
1472
1472
 
1473
- const profilePath = path.join(AUTH_PROFILES_DIR, namespace, `${name}.json`);
1473
+ const dir = getProfileDir(provider, activePlugin);
1474
+ const profilePath = path.join(dir, `${name}.json`);
1474
1475
  if (!fs.existsSync(profilePath)) return res.status(404).json({ error: 'Profile not found' });
1475
1476
 
1476
1477
  const profileData = JSON.parse(fs.readFileSync(profilePath, 'utf8'));
@@ -1517,7 +1518,8 @@ app.delete('/api/auth/profiles/:provider/:name', (req, res) => {
1517
1518
  ? (activePlugin === 'antigravity' ? 'google.antigravity' : 'google.gemini')
1518
1519
  : provider;
1519
1520
 
1520
- const profilePath = path.join(AUTH_PROFILES_DIR, namespace, `${name}.json`);
1521
+ const dir = getProfileDir(provider, activePlugin);
1522
+ const profilePath = path.join(dir, `${name}.json`);
1521
1523
  if (fs.existsSync(profilePath)) fs.unlinkSync(profilePath);
1522
1524
 
1523
1525
  const studio = loadStudioConfig();
@@ -1554,8 +1556,9 @@ app.put('/api/auth/profiles/:provider/:name', (req, res) => {
1554
1556
  ? (activePlugin === 'antigravity' ? 'google.antigravity' : 'google.gemini')
1555
1557
  : provider;
1556
1558
 
1557
- const oldPath = path.join(AUTH_PROFILES_DIR, namespace, `${name}.json`);
1558
- const newPath = path.join(AUTH_PROFILES_DIR, namespace, `${newName}.json`);
1559
+ const dir = getProfileDir(provider, activePlugin);
1560
+ const oldPath = path.join(dir, `${name}.json`);
1561
+ const newPath = path.join(dir, `${newName}.json`);
1559
1562
  if (fs.existsSync(oldPath)) fs.renameSync(oldPath, newPath);
1560
1563
 
1561
1564
  const metadata = loadPoolMetadata();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-studio-server",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "description": "Backend server for OpenCode Studio - manages opencode configurations",
5
5
  "main": "index.js",
6
6
  "bin": {