@redseat/api 0.1.6 → 0.1.7
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 +1 -1
- package/dist/server.d.ts +6 -1
- package/dist/server.js +6 -2
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -10,7 +10,7 @@ export class RedseatClient {
|
|
|
10
10
|
this.baseUrl = this.getRegularServerUrl();
|
|
11
11
|
this.axios = axios.create({
|
|
12
12
|
baseURL: this.baseUrl,
|
|
13
|
-
timeout: options.timeout ??
|
|
13
|
+
timeout: options.timeout ?? 0
|
|
14
14
|
});
|
|
15
15
|
// Detect local URL asynchronously and update axios instance
|
|
16
16
|
this.detectLocalUrl().then((url) => {
|
package/dist/server.d.ts
CHANGED
|
@@ -4,7 +4,12 @@ export declare class ServerApi {
|
|
|
4
4
|
private client;
|
|
5
5
|
constructor(client: RedseatClient);
|
|
6
6
|
getLibraries(): Promise<ILibrary[]>;
|
|
7
|
-
|
|
7
|
+
ping(options?: {
|
|
8
|
+
timeout?: number;
|
|
9
|
+
}): Promise<any>;
|
|
10
|
+
getMe(options?: {
|
|
11
|
+
timeout?: number;
|
|
12
|
+
}): Promise<any>;
|
|
8
13
|
addLibrary(library: Partial<ILibrary>): Promise<ILibrary>;
|
|
9
14
|
getSetting(key: string): Promise<string>;
|
|
10
15
|
getPlugins(): Promise<any[]>;
|
package/dist/server.js
CHANGED
|
@@ -6,8 +6,12 @@ export class ServerApi {
|
|
|
6
6
|
const res = await this.client.get('/libraries');
|
|
7
7
|
return res.data;
|
|
8
8
|
}
|
|
9
|
-
async
|
|
10
|
-
const res = await this.client.get('/
|
|
9
|
+
async ping(options) {
|
|
10
|
+
const res = await this.client.get('/ping', options);
|
|
11
|
+
return res.data;
|
|
12
|
+
}
|
|
13
|
+
async getMe(options) {
|
|
14
|
+
const res = await this.client.get('/users/me', options);
|
|
11
15
|
return res.data;
|
|
12
16
|
}
|
|
13
17
|
async addLibrary(library) {
|