@go-avro/avro-js 0.0.2-beta.147 → 0.0.2-beta.149

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.
@@ -220,20 +220,16 @@ export class AvroQueryClient {
220
220
  const queryClient = this.getQueryClient();
221
221
  return useMutation({
222
222
  mutationFn: async (cancelToken) => {
223
- return new Promise((resolve) => {
224
- this.setAuthState(AuthState.UNAUTHENTICATED);
225
- this.post('/logout', null, cancelToken).then(() => {
226
- this.config.authManager.clearCache().then(() => {
227
- if (this.socket && this.socket.connected) {
228
- this.socket.disconnect();
229
- }
230
- resolve();
231
- });
232
- });
233
- });
223
+ await this.post('/logout', null, cancelToken);
224
+ await this.config.authManager.clearCache();
225
+ if (this.socket && this.socket.connected) {
226
+ this.socket.disconnect();
227
+ }
234
228
  },
235
229
  onSettled: () => {
236
- queryClient.invalidateQueries();
230
+ this.clearCache();
231
+ this.setAuthState(AuthState.UNAUTHENTICATED);
232
+ queryClient.removeQueries();
237
233
  },
238
234
  onError: (err) => {
239
235
  this.clearCache();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "0.0.2-beta.147",
3
+ "version": "0.0.2-beta.149",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",