@overmap-ai/core 1.0.60-sdk-refactor.14 → 1.0.60-sdk-refactor.15
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.
|
@@ -15071,7 +15071,6 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
15071
15071
|
}
|
|
15072
15072
|
async function performRequest(action, client) {
|
|
15073
15073
|
const serviceOfRequest = CLASS_NAME_TO_SERVICE[action.meta.offline.effect.serviceName];
|
|
15074
|
-
console.debug(CLASS_NAME_TO_SERVICE, action.meta.offline.effect.serviceName, serviceOfRequest);
|
|
15075
15074
|
if (!serviceOfRequest) {
|
|
15076
15075
|
throw new Error(`Service ${action.meta.offline.effect.serviceName} not found`);
|
|
15077
15076
|
}
|
|
@@ -15452,19 +15451,15 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
15452
15451
|
checkAuth: false,
|
|
15453
15452
|
// Don't wait for other requests to finish, or we might end up in a deadlock.
|
|
15454
15453
|
immediate: true
|
|
15455
|
-
}).catch((e) => {
|
|
15456
|
-
console.error("Could not renew tokens; logging out due to error:", e);
|
|
15457
|
-
this.clearAuth();
|
|
15458
|
-
return void 0;
|
|
15459
15454
|
});
|
|
15460
15455
|
let response = void 0;
|
|
15461
15456
|
try {
|
|
15462
15457
|
response = await promise;
|
|
15463
15458
|
} catch (e) {
|
|
15459
|
+
console.error("Could not renew tokens; clearing auth", e);
|
|
15464
15460
|
this.clearAuth();
|
|
15465
|
-
}
|
|
15466
|
-
if (!response)
|
|
15467
15461
|
return void 0;
|
|
15462
|
+
}
|
|
15468
15463
|
if (!response.access)
|
|
15469
15464
|
throw new Error("Missing access token");
|
|
15470
15465
|
if (!response.refresh)
|
|
@@ -15482,6 +15477,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
15482
15477
|
this.dispatch(setActiveWorkspaceId(null));
|
|
15483
15478
|
this.dispatch({ type: constants.RESET_STATE });
|
|
15484
15479
|
this.dispatch({ type: resetStore });
|
|
15480
|
+
console.debug(this.constructor.name, "clearing auth;");
|
|
15485
15481
|
}
|
|
15486
15482
|
/**
|
|
15487
15483
|
* Attempts to renew tokens
|
|
@@ -15499,15 +15495,11 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
15499
15495
|
console.log("Got renewed tokens");
|
|
15500
15496
|
this.setTokens(tokens);
|
|
15501
15497
|
} catch (e) {
|
|
15502
|
-
console.error("Could not renew tokens;
|
|
15498
|
+
console.error("Could not renew tokens; clearing auth", e);
|
|
15503
15499
|
this.clearAuth();
|
|
15504
15500
|
throw e;
|
|
15505
15501
|
}
|
|
15506
15502
|
}
|
|
15507
|
-
/**
|
|
15508
|
-
* Checks whether the tokens will be expiring soon
|
|
15509
|
-
* @returns {boolean}
|
|
15510
|
-
*/
|
|
15511
15503
|
tokenIsExpiringSoon() {
|
|
15512
15504
|
const accessToken = this.getAccessToken();
|
|
15513
15505
|
if (!accessToken) {
|