pl-api: bump version
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
7b183e5c60
commit
ac3910ac8f
2 changed files with 10 additions and 3 deletions
|
@ -248,9 +248,16 @@ class PlApiClient {
|
||||||
close: () => void;
|
close: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(baseURL: string, accessToken?: string, { instance, fetchInstance }: {
|
constructor(baseURL: string, accessToken?: string, {
|
||||||
|
instance,
|
||||||
|
fetchInstance,
|
||||||
|
onInstanceFetchSuccess,
|
||||||
|
onInstanceFetchError,
|
||||||
|
}: {
|
||||||
instance?: Instance;
|
instance?: Instance;
|
||||||
fetchInstance?: boolean;
|
fetchInstance?: boolean;
|
||||||
|
onInstanceFetchSuccess?: (instance: Instance) => void;
|
||||||
|
onInstanceFetchError?: (error?: any) => void;
|
||||||
} = {}) {
|
} = {}) {
|
||||||
this.baseURL = baseURL;
|
this.baseURL = baseURL;
|
||||||
this.#accessToken = accessToken;
|
this.#accessToken = accessToken;
|
||||||
|
@ -259,7 +266,7 @@ class PlApiClient {
|
||||||
this.#setInstance(instance);
|
this.#setInstance(instance);
|
||||||
}
|
}
|
||||||
if (fetchInstance) {
|
if (fetchInstance) {
|
||||||
this.instance.getInstance();
|
this.instance.getInstance().then(onInstanceFetchSuccess).catch(onInstanceFetchError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "pl-api",
|
"name": "pl-api",
|
||||||
"version": "0.1.5",
|
"version": "0.1.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"homepage": "https://github.com/mkljczk/pl-fe/tree/fork/packages/pl-api",
|
"homepage": "https://github.com/mkljczk/pl-fe/tree/fork/packages/pl-api",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
Loading…
Reference in a new issue