abra-flexi 0.5.1 → 0.5.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/index.cjs +12 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +12 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -66883,7 +66883,7 @@ var AFApiClient = class {
|
|
|
66883
66883
|
try {
|
|
66884
66884
|
const raw$1 = await this._fetch(url, {
|
|
66885
66885
|
signal: options.abortController?.signal,
|
|
66886
|
-
method: "
|
|
66886
|
+
method: "DELETE"
|
|
66887
66887
|
});
|
|
66888
66888
|
if (raw$1.status >= 400 && raw$1.status < 600) throw new AFError(AFErrorCode.ABRA_FLEXI_ERROR, `${raw$1.status} ${raw$1.statusText}`);
|
|
66889
66889
|
const json = await raw$1.json();
|
|
@@ -67164,9 +67164,17 @@ var AFApiSession = class {
|
|
|
67164
67164
|
};
|
|
67165
67165
|
}
|
|
67166
67166
|
_establish(sessionId) {
|
|
67167
|
+
if (this.status === AFSessionStatus.LogingOut) throw new AFError(AFErrorCode.LOGOUT_UNDERWAY, `[AFApiSession] Can't establish while logout attempt is underway.`);
|
|
67168
|
+
if (this.status === AFSessionStatus.LogingIn) return this._loginPromise;
|
|
67169
|
+
this._sessionError = null;
|
|
67170
|
+
this._authSessionId = sessionId;
|
|
67167
67171
|
this._loginPromise = (async () => {
|
|
67168
67172
|
try {
|
|
67169
67173
|
await this._keepaliveTick(true);
|
|
67174
|
+
this._enableKeepalive();
|
|
67175
|
+
} catch (e) {
|
|
67176
|
+
this._authSessionId = null;
|
|
67177
|
+
throw e;
|
|
67170
67178
|
} finally {
|
|
67171
67179
|
this._loginPromise = null;
|
|
67172
67180
|
}
|
|
@@ -67176,7 +67184,9 @@ var AFApiSession = class {
|
|
|
67176
67184
|
_enableKeepalive() {
|
|
67177
67185
|
if (!this._keepAliveIntervalMs) return;
|
|
67178
67186
|
if (this._keepAliveHandler) this._disableKeepalive();
|
|
67179
|
-
this._keepAliveHandler = setInterval(
|
|
67187
|
+
this._keepAliveHandler = setInterval(() => {
|
|
67188
|
+
this._keepaliveTick(false);
|
|
67189
|
+
}, this._keepAliveIntervalMs);
|
|
67180
67190
|
}
|
|
67181
67191
|
_disableKeepalive() {
|
|
67182
67192
|
clearInterval(this._keepAliveHandler);
|