@reforgium/statum 2.1.1 → 2.1.2
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.
|
@@ -1013,7 +1013,14 @@ class ResourceStore {
|
|
|
1013
1013
|
abort(method, args, reason) {
|
|
1014
1014
|
const url = this.buildUrl(method, args);
|
|
1015
1015
|
const key = buildKey(method, url, args);
|
|
1016
|
+
const entry = this.entries.get(key);
|
|
1016
1017
|
this.trace({ type: 'abort', method, key });
|
|
1018
|
+
if (entry) {
|
|
1019
|
+
entry.inflight = undefined;
|
|
1020
|
+
if (entry.status === 'loading' || entry.status === 'stale') {
|
|
1021
|
+
entry.status = 'idle';
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1017
1024
|
this.scheduler.cancel?.(key, reason);
|
|
1018
1025
|
}
|
|
1019
1026
|
/**
|
|
@@ -1023,6 +1030,12 @@ class ResourceStore {
|
|
|
1023
1030
|
*/
|
|
1024
1031
|
abortAll(reason) {
|
|
1025
1032
|
this.trace({ type: 'abort', method: 'GET', key: '*' });
|
|
1033
|
+
this.entries.forEach((entry) => {
|
|
1034
|
+
entry.inflight = undefined;
|
|
1035
|
+
if (entry.status === 'loading' || entry.status === 'stale') {
|
|
1036
|
+
entry.status = 'idle';
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
1026
1039
|
this.scheduler.cancelAll?.(reason);
|
|
1027
1040
|
}
|
|
1028
1041
|
ensureEntry(key) {
|
package/package.json
CHANGED