@kolbo/app-sdk
Advanced tools
+1
-1
| { | ||
| "name": "@kolbo/app-sdk", | ||
| "version": "2.1.1", | ||
| "version": "2.1.2", | ||
| "description": "Kolbo App Builder SDK — auth, data, storage and AI for generated apps", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -504,3 +504,8 @@ // Kolbo-native adapter. | ||
| const apiKey = env.VITE_KOLBO_API_KEY || ''; | ||
| const apiBase = (env.VITE_KOLBO_BASE || 'https://api.kolbo.ai/api').replace(/\/$/, ''); | ||
| // AI endpoints live at `{apiUrl}/api/v1/*`. Default to the adapter's apiUrl | ||
| // (which comes from VITE_KOLBO_API_URL — the same host where auth / data / | ||
| // storage talk). Falling back to api.kolbo.ai hard-codes production and | ||
| // breaks dev/staging previews whose API key was issued in a different DB. | ||
| const fallbackBase = `${String(this._apiUrl || '').replace(/\/$/, '')}/api` || 'https://api.kolbo.ai/api'; | ||
| const apiBase = (env.VITE_KOLBO_BASE || fallbackBase).replace(/\/$/, ''); | ||
| const h = () => ({ 'X-API-Key': apiKey, 'Content-Type': 'application/json' }); | ||
@@ -507,0 +512,0 @@ |
74864
0.56%1318
0.38%