@sanity/client 5.3.0 → 5.3.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/dist/index.browser.cjs +8 -8
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +8 -8
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/package.json +15 -15
- package/src/data/listen.ts +8 -8
- package/umd/sanityClient.js +11 -13
- package/umd/sanityClient.min.js +1 -1
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Observable, lastValueFrom } from 'rxjs';
|
|
|
4
4
|
import { map, filter } from 'rxjs/operators';
|
|
5
5
|
import polyfilledEventSource from '@sanity/eventsource';
|
|
6
6
|
var name = "@sanity/client";
|
|
7
|
-
var version = "5.3.
|
|
7
|
+
var version = "5.3.1";
|
|
8
8
|
const middleware = [debug({
|
|
9
9
|
verbose: true,
|
|
10
10
|
namespace: "sanity:client"
|
|
@@ -1143,10 +1143,10 @@ function _listen(query, params) {
|
|
|
1143
1143
|
observer.complete();
|
|
1144
1144
|
}
|
|
1145
1145
|
function unsubscribe() {
|
|
1146
|
-
es.removeEventListener("error", onError
|
|
1147
|
-
es.removeEventListener("channelError", onChannelError
|
|
1148
|
-
es.removeEventListener("disconnect", onDisconnect
|
|
1149
|
-
listenFor.forEach(type => es.removeEventListener(type, onMessage
|
|
1146
|
+
es.removeEventListener("error", onError);
|
|
1147
|
+
es.removeEventListener("channelError", onChannelError);
|
|
1148
|
+
es.removeEventListener("disconnect", onDisconnect);
|
|
1149
|
+
listenFor.forEach(type => es.removeEventListener(type, onMessage));
|
|
1150
1150
|
es.close();
|
|
1151
1151
|
}
|
|
1152
1152
|
function emitReconnect() {
|
|
@@ -1158,10 +1158,10 @@ function _listen(query, params) {
|
|
|
1158
1158
|
}
|
|
1159
1159
|
function getEventSource() {
|
|
1160
1160
|
const evs = new EventSource(uri, esOptions);
|
|
1161
|
-
evs.addEventListener("error", onError
|
|
1162
|
-
evs.addEventListener("channelError", onChannelError
|
|
1163
|
-
evs.addEventListener("disconnect", onDisconnect
|
|
1164
|
-
listenFor.forEach(type => evs.addEventListener(type, onMessage
|
|
1161
|
+
evs.addEventListener("error", onError);
|
|
1162
|
+
evs.addEventListener("channelError", onChannelError);
|
|
1163
|
+
evs.addEventListener("disconnect", onDisconnect);
|
|
1164
|
+
listenFor.forEach(type => evs.addEventListener(type, onMessage));
|
|
1165
1165
|
return evs;
|
|
1166
1166
|
}
|
|
1167
1167
|
function open() {
|