@sanity/client 6.22.4 → 6.22.5-beta.0
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/_chunks-cjs/resolveEditInfo.cjs +1 -2
- package/dist/_chunks-cjs/resolveEditInfo.cjs.map +1 -1
- package/dist/_chunks-cjs/stegaClean.cjs +1 -2
- package/dist/_chunks-cjs/stegaClean.cjs.map +1 -1
- package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs +1 -2
- package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs.map +1 -1
- package/dist/_chunks-es/resolveEditInfo.js +1 -2
- package/dist/_chunks-es/resolveEditInfo.js.map +1 -1
- package/dist/_chunks-es/stegaClean.js +1 -2
- package/dist/_chunks-es/stegaClean.js.map +1 -1
- package/dist/_chunks-es/stegaEncodeSourceMap.js +1 -2
- package/dist/_chunks-es/stegaEncodeSourceMap.js.map +1 -1
- package/dist/csm.cjs +1 -2
- package/dist/csm.cjs.map +1 -1
- package/dist/csm.js +1 -2
- package/dist/csm.js.map +1 -1
- package/dist/index.browser.cjs +3 -4
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +3 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +4 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/data/listen.ts +3 -3
- package/src/data/live.ts +1 -1
- package/umd/sanityClient.js +319 -1087
- package/umd/sanityClient.min.js +1 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/client",
|
|
3
|
-
"version": "6.22.
|
|
3
|
+
"version": "6.22.5-beta.0",
|
|
4
4
|
"description": "Client for retrieving, creating and patching data from Sanity.io",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"singleQuote": true
|
|
118
118
|
},
|
|
119
119
|
"dependencies": {
|
|
120
|
-
"
|
|
120
|
+
"eventsource": "3.0.0-beta.0",
|
|
121
121
|
"get-it": "^8.6.5",
|
|
122
122
|
"rxjs": "^7.0.0"
|
|
123
123
|
},
|
package/src/data/listen.ts
CHANGED
|
@@ -85,7 +85,7 @@ export function _listen<R extends Record<string, Any> = Record<string, Any>>(
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
return new Observable((observer) => {
|
|
88
|
-
let es: InstanceType<typeof import('
|
|
88
|
+
let es: InstanceType<typeof import('eventsource').EventSource>
|
|
89
89
|
let reconnectTimer: NodeJS.Timeout
|
|
90
90
|
let stopped = false
|
|
91
91
|
// Unsubscribe differs from stopped in that we will never reopen.
|
|
@@ -149,9 +149,9 @@ export function _listen<R extends Record<string, Any> = Record<string, Any>>(
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
async function getEventSource(): Promise<InstanceType<
|
|
152
|
-
typeof import('
|
|
152
|
+
typeof import('eventsource').EventSource
|
|
153
153
|
> | void> {
|
|
154
|
-
const {
|
|
154
|
+
const {EventSource} = await import('eventsource')
|
|
155
155
|
|
|
156
156
|
// If the listener has been unsubscribed from before we managed to load the module,
|
|
157
157
|
// do not set up the EventSource.
|
package/src/data/live.ts
CHANGED
|
@@ -136,7 +136,7 @@ export class LiveClient {
|
|
|
136
136
|
async function getEventSource() {
|
|
137
137
|
const EventSourceImplementation: typeof EventSource =
|
|
138
138
|
typeof EventSource === 'undefined' || esOptions.headers || esOptions.withCredentials
|
|
139
|
-
? (
|
|
139
|
+
? (await import('eventsource')).EventSource
|
|
140
140
|
: EventSource
|
|
141
141
|
|
|
142
142
|
// If the listener has been unsubscribed from before we managed to load the module,
|