eassist-mcp 1.0.0 → 1.0.1
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/build/auth.js +1 -4
- package/build/client.js +2 -4
- package/package.json +1 -1
package/build/auth.js
CHANGED
|
@@ -28,10 +28,7 @@ class AuthManager {
|
|
|
28
28
|
return new Date(expiresAt).getTime() - 60_000 < Date.now();
|
|
29
29
|
}
|
|
30
30
|
getApiUrl() {
|
|
31
|
-
|
|
32
|
-
if (!url)
|
|
33
|
-
throw new Error('EASSIST_API_URL environment variable is required');
|
|
34
|
-
return url.replace(/\/$/, '');
|
|
31
|
+
return (process.env.EASSIST_API_URL ?? this.data?.apiUrl ?? 'https://eassist.forsysinc.com').replace(/\/$/, '');
|
|
35
32
|
}
|
|
36
33
|
async getValidToken() {
|
|
37
34
|
if (!this.data)
|
package/build/client.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
import { auth } from './auth.js';
|
|
3
|
+
const DEFAULT_API_URL = 'https://eassist.forsysinc.com';
|
|
3
4
|
function getApiUrl() {
|
|
4
|
-
|
|
5
|
-
if (!url)
|
|
6
|
-
throw new Error('EASSIST_API_URL environment variable is required');
|
|
7
|
-
return url.replace(/\/$/, '');
|
|
5
|
+
return (process.env.EASSIST_API_URL ?? DEFAULT_API_URL).replace(/\/$/, '');
|
|
8
6
|
}
|
|
9
7
|
async function headers() {
|
|
10
8
|
const token = await auth.getValidToken();
|