@hyper-fetch/core 5.7.4 → 5.7.6-beta.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyper-fetch/core",
3
- "version": "5.7.4",
3
+ "version": "5.7.6-beta.1",
4
4
  "private": false,
5
5
  "description": "Cache, Queue and Persist your requests no matter if you are online or offline!",
6
6
  "author": "Maciej Pyrc <m.pyrc@interia.pl>",
@@ -529,6 +529,9 @@ export class Dispatcher {
529
529
  timestamp: +new Date(),
530
530
  };
531
531
 
532
+ // Global response emitter to handle request execution
533
+ requestManager.events.emitResponse(cacheKey, requestId, response, requestDetails);
534
+
532
535
  // Turn off loading
533
536
  requestManager.events.emitLoading(queueKey, requestId, {
534
537
  queueKey,
@@ -537,8 +540,7 @@ export class Dispatcher {
537
540
  isRetry: !!storageElement.retries,
538
541
  isOffline,
539
542
  });
540
- // Global response emitter to handle request execution
541
- requestManager.events.emitResponse(cacheKey, requestId, response, requestDetails);
543
+
542
544
  // Cache event to emit the data inside and store it
543
545
  cache.set(request, { ...response, ...requestDetails });
544
546
  this.logger.info("Request finished", { requestId, request, response, requestDetails });