@withaevum/sdk 1.3.2 → 1.3.3
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/dist/client.js +16 -1
- package/package.json +2 -1
package/dist/client.js
CHANGED
|
@@ -20,7 +20,22 @@ export class AevumClient {
|
|
|
20
20
|
throw new Error('API key is required');
|
|
21
21
|
}
|
|
22
22
|
this.apiKey = config.apiKey;
|
|
23
|
-
|
|
23
|
+
// Default baseUrl: use provided, or check env var (Node.js only), or use production
|
|
24
|
+
if (config.baseUrl) {
|
|
25
|
+
this.baseUrl = config.baseUrl;
|
|
26
|
+
}
|
|
27
|
+
else if (typeof process !== 'undefined' && process.env?.AEVUM_API_BASE_URL) {
|
|
28
|
+
// Check environment variable if in Node.js
|
|
29
|
+
this.baseUrl = process.env.AEVUM_API_BASE_URL;
|
|
30
|
+
}
|
|
31
|
+
else if (typeof process !== 'undefined' && process.env?.NODE_ENV === 'development') {
|
|
32
|
+
// Default to localhost in development
|
|
33
|
+
this.baseUrl = 'http://localhost:3000';
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
// Production default
|
|
37
|
+
this.baseUrl = 'https://withaevum.com';
|
|
38
|
+
}
|
|
24
39
|
// Set orgId if provided in config (avoids extra API call)
|
|
25
40
|
if (config.orgId) {
|
|
26
41
|
this.orgId = config.orgId;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@withaevum/sdk",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "TypeScript SDK for the Aevum API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
+
"@types/node": "^25.2.1",
|
|
49
50
|
"typescript": "^5.6.3"
|
|
50
51
|
}
|
|
51
52
|
}
|