@sanity/client 6.22.3 → 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- package/src/data/listen.ts +3 -3
- package/src/data/live.ts +1 -1
- package/src/stega/filterDefault.ts +3 -2
- package/umd/sanityClient.js +321 -1088
- 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
|
},
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
"vitest": "2.1.4",
|
|
155
155
|
"vitest-github-actions-reporter": "0.11.1"
|
|
156
156
|
},
|
|
157
|
-
"packageManager": "npm@10.
|
|
157
|
+
"packageManager": "npm@10.9.0",
|
|
158
158
|
"engines": {
|
|
159
159
|
"node": ">=14.18"
|
|
160
160
|
}
|
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,
|
|
@@ -12,8 +12,8 @@ export const filterDefault: FilterDefault = ({sourcePath, resultPath, value}) =>
|
|
|
12
12
|
return false
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
// Skip underscored keys, needs better heuristics but it works for now
|
|
16
|
-
if (typeof endPath === 'string' && endPath.startsWith('_')) {
|
|
15
|
+
// Skip underscored keys, and strings that end with `Id`, needs better heuristics but it works for now
|
|
16
|
+
if (typeof endPath === 'string' && (endPath.startsWith('_') || endPath.endsWith('Id'))) {
|
|
17
17
|
return false
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -98,6 +98,7 @@ const denylist = new Set([
|
|
|
98
98
|
'template',
|
|
99
99
|
'theme',
|
|
100
100
|
'type',
|
|
101
|
+
'textTheme',
|
|
101
102
|
'unit',
|
|
102
103
|
'url',
|
|
103
104
|
'username',
|