@sanity/client 6.8.0-pink-lizard.12 → 6.8.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/README.md +2 -122
- package/dist/_chunks/{nodeMiddleware-XGS8GPhb.cjs → nodeMiddleware-Vb3-cVrJ.cjs} +2 -2
- package/dist/_chunks/{nodeMiddleware-XGS8GPhb.cjs.map → nodeMiddleware-Vb3-cVrJ.cjs.map} +1 -1
- package/dist/_chunks/{nodeMiddleware-n4q3pGDo.js → nodeMiddleware-qN-CHKIQ.js} +2 -2
- package/dist/_chunks/{nodeMiddleware-n4q3pGDo.js.map → nodeMiddleware-qN-CHKIQ.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/stega.browser.cjs +1 -1
- package/dist/stega.browser.cjs.map +1 -1
- package/dist/stega.browser.js +1 -1
- package/dist/stega.browser.js.map +1 -1
- package/dist/stega.cjs +2 -2
- package/dist/stega.cjs.map +1 -1
- package/dist/stega.js +3 -3
- package/dist/stega.js.map +1 -1
- package/package.json +3 -3
- package/src/stega/filterDefault.ts +3 -1
- package/src/csm/applySourceDocuments.test.ts +0 -410
- package/src/csm/createEditUrl.test.ts +0 -39
- package/src/csm/jsonPath.test.ts +0 -39
- package/src/csm/resolveEditUrl.test.ts +0 -537
- package/src/csm/studioPath.test.ts +0 -237
- package/src/stega/__snapshots__/stegaEncodeSourceMap.test.ts.snap +0 -307
- package/src/stega/encodeIntoResult.test.ts +0 -259
- package/src/stega/stegaEncodeSourceMap.test.ts +0 -541
- package/src/stega/vercelStegaCleanAll.test.ts +0 -21
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/ban-ts-comment, @typescript-eslint/no-explicit-any */
|
|
2
|
-
import {describe, expect, test} from 'vitest'
|
|
3
|
-
|
|
4
|
-
import {jsonPathToStudioPath} from './jsonPath'
|
|
5
|
-
import {fromString, get, toString} from './studioPath'
|
|
6
|
-
import {ContentSourceMapParsedPath} from './types'
|
|
7
|
-
|
|
8
|
-
const srcObject = {
|
|
9
|
-
title: 'Hei',
|
|
10
|
-
nested: {'0': 'Zero-Key'},
|
|
11
|
-
nullVal: null,
|
|
12
|
-
body: [
|
|
13
|
-
{_key: 'foo', title: 'Foo'},
|
|
14
|
-
{_key: 'bar', children: [{_key: 'child1', text: 'Heisann'}]},
|
|
15
|
-
],
|
|
16
|
-
multiDimensional: [
|
|
17
|
-
[[{_key: 'abc', title: 'hai'}], [{_key: 'def', title: 'def'}]],
|
|
18
|
-
[
|
|
19
|
-
[13, 14],
|
|
20
|
-
[15, 16],
|
|
21
|
-
],
|
|
22
|
-
],
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
describe('fromString', () => {
|
|
26
|
-
test('throws if not a string', () => {
|
|
27
|
-
// @ts-expect-error
|
|
28
|
-
expect(() => fromString()).toThrow('Path is not a string')
|
|
29
|
-
// @ts-expect-error
|
|
30
|
-
expect(() => fromString(13)).toThrow('Path is not a string')
|
|
31
|
-
|
|
32
|
-
expect(() => fromString(null as any)).toThrow('Path is not a string')
|
|
33
|
-
// @ts-expect-error
|
|
34
|
-
expect(() => fromString(false)).toThrow('Path is not a string')
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
test('handles plain property segments', () => {
|
|
38
|
-
expect(fromString('foo')).toEqual(['foo'])
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
test('handles index segments', () => {
|
|
42
|
-
expect(fromString('[0]')).toEqual([0])
|
|
43
|
-
expect(fromString('[1337]')).toEqual([1337])
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
test('handles key segments', () => {
|
|
47
|
-
expect(fromString('[_key == "foo"]')).toEqual([{_key: 'foo'}])
|
|
48
|
-
expect(fromString("[ _key== 'B4z']")).toEqual([{_key: 'B4z'}])
|
|
49
|
-
expect(fromString('[_key=="bar"]')).toEqual([{_key: 'bar'}])
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
test('handles deep prop segments', () => {
|
|
53
|
-
expect(fromString('foo.bar')).toEqual(['foo', 'bar'])
|
|
54
|
-
expect(fromString('bar.foo')).toEqual(['bar', 'foo'])
|
|
55
|
-
expect(fromString('bar.foo.baz')).toEqual(['bar', 'foo', 'baz'])
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
test('handles deep array index segments', () => {
|
|
59
|
-
expect(fromString('foo[13]')).toEqual(['foo', 13])
|
|
60
|
-
expect(fromString('bar.foo[3]')).toEqual(['bar', 'foo', 3])
|
|
61
|
-
expect(fromString('[3][18]')).toEqual([3, 18])
|
|
62
|
-
})
|
|
63
|
-
|
|
64
|
-
test('handles deep key segments', () => {
|
|
65
|
-
expect(fromString('foo[_key=="bar"].body[_key=="13ch"')).toEqual([
|
|
66
|
-
'foo',
|
|
67
|
-
{_key: 'bar'},
|
|
68
|
-
'body',
|
|
69
|
-
{_key: '13ch'},
|
|
70
|
-
])
|
|
71
|
-
expect(fromString('bar.foo[3][_key == "seg"]')).toEqual(['bar', 'foo', 3, {_key: 'seg'}])
|
|
72
|
-
expect(fromString('[_key=="foo"][_key== "bar"][_key =="baz"][ _key == "seg" ')).toEqual([
|
|
73
|
-
{_key: 'foo'},
|
|
74
|
-
{_key: 'bar'},
|
|
75
|
-
{_key: 'baz'},
|
|
76
|
-
{_key: 'seg'},
|
|
77
|
-
])
|
|
78
|
-
})
|
|
79
|
-
})
|
|
80
|
-
|
|
81
|
-
describe('toString', () => {
|
|
82
|
-
test('throws if not an array', () => {
|
|
83
|
-
// @ts-expect-error
|
|
84
|
-
expect(() => toString()).toThrow('Path is not an array')
|
|
85
|
-
|
|
86
|
-
expect(() => toString(13 as any)).toThrow('Path is not an array')
|
|
87
|
-
|
|
88
|
-
expect(() => toString(null as any)).toThrow('Path is not an array')
|
|
89
|
-
expect(() => toString(false as any)).toThrow('Path is not an array')
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
test('handles plain property segments', () => {
|
|
93
|
-
expect(toString(['foo'])).toEqual('foo')
|
|
94
|
-
})
|
|
95
|
-
|
|
96
|
-
test('handles index segments', () => {
|
|
97
|
-
expect(toString([0])).toEqual('[0]')
|
|
98
|
-
expect(toString([1337])).toEqual('[1337]')
|
|
99
|
-
})
|
|
100
|
-
|
|
101
|
-
test('handles key segments', () => {
|
|
102
|
-
expect(toString([{_key: 'foo'}])).toEqual('[_key=="foo"]')
|
|
103
|
-
expect(toString([{_key: 'B4z'}])).toEqual('[_key=="B4z"]')
|
|
104
|
-
expect(toString([{_key: 'bar'}])).toEqual('[_key=="bar"]')
|
|
105
|
-
})
|
|
106
|
-
|
|
107
|
-
test('handles deep prop segments', () => {
|
|
108
|
-
expect(toString(['foo', 'bar'])).toEqual('foo.bar')
|
|
109
|
-
expect(toString(['bar', 'foo'])).toEqual('bar.foo')
|
|
110
|
-
expect(toString(['bar', 'foo', 'baz'])).toEqual('bar.foo.baz')
|
|
111
|
-
})
|
|
112
|
-
|
|
113
|
-
test('handles deep array index segments', () => {
|
|
114
|
-
expect(toString(['foo', 13])).toEqual('foo[13]')
|
|
115
|
-
expect(toString(['bar', 'foo', 3])).toEqual('bar.foo[3]')
|
|
116
|
-
expect(toString([3, 18])).toEqual('[3][18]')
|
|
117
|
-
})
|
|
118
|
-
|
|
119
|
-
test('handles deep key segments', () => {
|
|
120
|
-
expect(toString(['foo', {_key: 'bar'}, 'body', {_key: '13ch'}])).toEqual(
|
|
121
|
-
'foo[_key=="bar"].body[_key=="13ch"]',
|
|
122
|
-
)
|
|
123
|
-
expect(toString(['bar', 'foo', 3, {_key: 'seg'}])).toEqual('bar.foo[3][_key=="seg"]')
|
|
124
|
-
expect(toString([{_key: 'foo'}, {_key: 'bar'}, {_key: 'baz'}, {_key: 'seg'}])).toEqual(
|
|
125
|
-
'[_key=="foo"][_key=="bar"][_key=="baz"][_key=="seg"]',
|
|
126
|
-
)
|
|
127
|
-
})
|
|
128
|
-
|
|
129
|
-
test('throws on unrecognized segment types', () => {
|
|
130
|
-
expect(() => toString([{foo: 'bar'} as any])).toThrow(
|
|
131
|
-
'Unsupported path segment `{"foo":"bar"}`',
|
|
132
|
-
)
|
|
133
|
-
})
|
|
134
|
-
})
|
|
135
|
-
|
|
136
|
-
describe('get', () => {
|
|
137
|
-
test('throws on non-array/non-string path', () => {
|
|
138
|
-
expect(() => get(srcObject, null as any)).toThrow('Path must be an array or a string')
|
|
139
|
-
expect(() => get(srcObject, 13 as any)).toThrow('Path must be an array or a string')
|
|
140
|
-
expect(() => get(srcObject, false as any)).toThrow('Path must be an array or a string')
|
|
141
|
-
expect(() => get(srcObject, true as any)).toThrow('Path must be an array or a string')
|
|
142
|
-
})
|
|
143
|
-
|
|
144
|
-
test('can get simple props', () => {
|
|
145
|
-
expect(get(srcObject, 'title')).toEqual(srcObject.title)
|
|
146
|
-
expect(get(srcObject, ['title'])).toEqual(srcObject.title)
|
|
147
|
-
})
|
|
148
|
-
|
|
149
|
-
test('can pass default value', () => {
|
|
150
|
-
const defaultVal = Math.random()
|
|
151
|
-
expect(get(srcObject, 'notSet', defaultVal)).toEqual(defaultVal)
|
|
152
|
-
expect(get(srcObject, ['notSet'], defaultVal)).toEqual(defaultVal)
|
|
153
|
-
})
|
|
154
|
-
|
|
155
|
-
test('can use array indexes', () => {
|
|
156
|
-
expect(get(srcObject, ['body', 0])).toEqual(srcObject.body[0])
|
|
157
|
-
expect(get(srcObject, ['body', 1, 'children', 0])).toEqual(srcObject.body[1].children![0])
|
|
158
|
-
expect(get(srcObject, ['multiDimensional', 1, 1])).toEqual(srcObject.multiDimensional[1][1])
|
|
159
|
-
})
|
|
160
|
-
|
|
161
|
-
test('can use key lookup', () => {
|
|
162
|
-
expect(get(srcObject, ['body', {_key: 'bar'}])).toEqual(srcObject.body[1])
|
|
163
|
-
expect(get(srcObject, ['body', {_key: 'bar'}, 'children', {_key: 'child1'}])).toEqual(
|
|
164
|
-
srcObject.body[1].children![0],
|
|
165
|
-
)
|
|
166
|
-
})
|
|
167
|
-
|
|
168
|
-
test('falls back to default value on array index at non-array', () => {
|
|
169
|
-
const defaultVal = {}
|
|
170
|
-
expect(get(srcObject, ['title', 1], defaultVal)).toEqual(defaultVal)
|
|
171
|
-
})
|
|
172
|
-
|
|
173
|
-
test('falls back to default value on property lookup at non-object', () => {
|
|
174
|
-
const defaultVal = {}
|
|
175
|
-
expect(get(srcObject, ['title', 'bar'], defaultVal)).toEqual(defaultVal)
|
|
176
|
-
expect(get(srcObject, ['multiDimensional', 'bar'], defaultVal)).toEqual(defaultVal)
|
|
177
|
-
expect(get(srcObject, ['nullVal', 'bar'], defaultVal)).toEqual(defaultVal)
|
|
178
|
-
})
|
|
179
|
-
|
|
180
|
-
test('falls back to default value on key lookup at non-array', () => {
|
|
181
|
-
const defaultVal = {}
|
|
182
|
-
expect(get(srcObject, ['nullVal', {_key: 'abc'}], defaultVal)).toEqual(defaultVal)
|
|
183
|
-
})
|
|
184
|
-
|
|
185
|
-
test('can get numbered key from object', () => {
|
|
186
|
-
expect(get(srcObject, 'nested.0')).toEqual('Zero-Key')
|
|
187
|
-
expect(get(srcObject, ['nested', '0'])).toEqual('Zero-Key')
|
|
188
|
-
})
|
|
189
|
-
})
|
|
190
|
-
|
|
191
|
-
describe('get + jsonpath', () => {
|
|
192
|
-
const tget = (obj: unknown, path: ContentSourceMapParsedPath, defaultValue?: unknown) =>
|
|
193
|
-
get(obj, jsonPathToStudioPath(path), defaultValue)
|
|
194
|
-
test('can pass default value', () => {
|
|
195
|
-
const defaultVal = Math.random()
|
|
196
|
-
expect(tget(srcObject, ['notSet'], defaultVal)).toEqual(defaultVal)
|
|
197
|
-
})
|
|
198
|
-
|
|
199
|
-
test('can use array indexes', () => {
|
|
200
|
-
expect(tget(srcObject, ['body', 0])).toEqual(srcObject.body[0])
|
|
201
|
-
expect(tget(srcObject, ['body', 1, 'children', 0])).toEqual(srcObject.body[1].children![0])
|
|
202
|
-
expect(tget(srcObject, ['multiDimensional', 1, 1])).toEqual(srcObject.multiDimensional[1][1])
|
|
203
|
-
})
|
|
204
|
-
|
|
205
|
-
test('can use key lookup', () => {
|
|
206
|
-
expect(tget(srcObject, ['body', {_key: 'bar', _index: -1}])).toEqual(srcObject.body[1])
|
|
207
|
-
expect(
|
|
208
|
-
tget(srcObject, [
|
|
209
|
-
'body',
|
|
210
|
-
{_key: 'bar', _index: -1},
|
|
211
|
-
'children',
|
|
212
|
-
{_key: 'child1', _index: -1},
|
|
213
|
-
]),
|
|
214
|
-
).toEqual(srcObject.body[1].children![0])
|
|
215
|
-
})
|
|
216
|
-
|
|
217
|
-
test('falls back to default value on array index at non-array', () => {
|
|
218
|
-
const defaultVal = {}
|
|
219
|
-
expect(tget(srcObject, ['title', 1], defaultVal)).toEqual(defaultVal)
|
|
220
|
-
})
|
|
221
|
-
|
|
222
|
-
test('falls back to default value on property lookup at non-object', () => {
|
|
223
|
-
const defaultVal = {}
|
|
224
|
-
expect(tget(srcObject, ['title', 'bar'], defaultVal)).toEqual(defaultVal)
|
|
225
|
-
expect(tget(srcObject, ['multiDimensional', 'bar'], defaultVal)).toEqual(defaultVal)
|
|
226
|
-
expect(tget(srcObject, ['nullVal', 'bar'], defaultVal)).toEqual(defaultVal)
|
|
227
|
-
})
|
|
228
|
-
|
|
229
|
-
test('falls back to default value on key lookup at non-array', () => {
|
|
230
|
-
const defaultVal = {}
|
|
231
|
-
expect(tget(srcObject, ['nullVal', {_key: 'abc', _index: -1}], defaultVal)).toEqual(defaultVal)
|
|
232
|
-
})
|
|
233
|
-
|
|
234
|
-
test('can get numbered key from object', () => {
|
|
235
|
-
expect(tget(srcObject, ['nested', '0'])).toEqual('Zero-Key')
|
|
236
|
-
})
|
|
237
|
-
})
|
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
-
|
|
3
|
-
exports[`resolveEditUrl '/' > decode all 1`] = `
|
|
4
|
-
[
|
|
5
|
-
"/intent/edit/id=462efcc6-3c8b-47c6-8474-5544e1a4acde;type=product;path=description[_key==\\"d8fa6d59e49b\\"].children[_key==\\"6a057cf2fb310\\"].text",
|
|
6
|
-
"/intent/edit/id=462efcc6-3c8b-47c6-8474-5544e1a4acde;type=product;path=media[_key==\\"cee5fbb69da2\\"].alt",
|
|
7
|
-
"/intent/edit/id=462efcc6-3c8b-47c6-8474-5544e1a4acde;type=product;path=title",
|
|
8
|
-
"/intent/edit/id=807cc05c-8c4c-443a-a9c1-198fd3fd7b16;type=product;path=title",
|
|
9
|
-
"/intent/edit/id=807cc05c-8c4c-443a-a9c1-198fd3fd7b16;type=product;path=description[_key==\\"60b5ed16f4cc\\"].children[_key==\\"0ebc1c5b37350\\"].text",
|
|
10
|
-
"/intent/edit/id=807cc05c-8c4c-443a-a9c1-198fd3fd7b16;type=product;path=description[_key==\\"5d457324f980\\"].children[_key==\\"ad7206c98f29\\"].text",
|
|
11
|
-
"/intent/edit/id=807cc05c-8c4c-443a-a9c1-198fd3fd7b16;type=product;path=description[_key==\\"782db3651957\\"].children[_key==\\"cbd1965e0d78\\"].text",
|
|
12
|
-
"/intent/edit/id=807cc05c-8c4c-443a-a9c1-198fd3fd7b16;type=product;path=media[_key==\\"55659c72ec46\\"].alt",
|
|
13
|
-
"/intent/edit/id=a643da0c-2cc6-439e-92b7-9f31c822ee05;type=product;path=title",
|
|
14
|
-
"/intent/edit/id=a643da0c-2cc6-439e-92b7-9f31c822ee05;type=product;path=description[_key==\\"94e937616df1\\"].children[_key==\\"d53c7c4c3314\\"].text",
|
|
15
|
-
"/intent/edit/id=a643da0c-2cc6-439e-92b7-9f31c822ee05;type=product;path=description[_key==\\"65f554bf0220\\"].children[_key==\\"633d1506e24f\\"].text",
|
|
16
|
-
"/intent/edit/id=a643da0c-2cc6-439e-92b7-9f31c822ee05;type=product;path=description[_key==\\"7c6bbc4dc6c9\\"].children[_key==\\"4f27de6e55d8\\"].text",
|
|
17
|
-
"/intent/edit/id=c9de5527-ebd9-4f90-8c30-a26e3439ca2d;type=product;path=title",
|
|
18
|
-
"/intent/edit/id=c9de5527-ebd9-4f90-8c30-a26e3439ca2d;type=product;path=description[_key==\\"85cce8f03c3c\\"].children[_key==\\"1689e57dff090\\"].text",
|
|
19
|
-
"/intent/edit/id=e1bf9f1f-efdb-4105-8c26-6b64f897e9c1;type=product;path=description[_key==\\"b61f8576b42b\\"].children[_key==\\"625afd80ca530\\"].text",
|
|
20
|
-
"/intent/edit/id=e1bf9f1f-efdb-4105-8c26-6b64f897e9c1;type=product;path=title",
|
|
21
|
-
"/intent/edit/id=siteSettings;type=siteSettings;path=title",
|
|
22
|
-
"/intent/edit/id=siteSettings;type=siteSettings;path=copyrightText",
|
|
23
|
-
]
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
exports[`resolveEditUrl '/' > logger.error 1`] = `[]`;
|
|
27
|
-
|
|
28
|
-
exports[`resolveEditUrl '/' > logger.log 1`] = `
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
"[@sanity/client/stega]: Encoding source map into result",
|
|
32
|
-
],
|
|
33
|
-
[
|
|
34
|
-
"[@sanity/client/stega]: Paths encoded: 18, skipped: 80",
|
|
35
|
-
],
|
|
36
|
-
[
|
|
37
|
-
"[@sanity/client/stega]: Table of encoded paths",
|
|
38
|
-
],
|
|
39
|
-
[
|
|
40
|
-
"[@sanity/client/stega]: List of skipped paths",
|
|
41
|
-
[
|
|
42
|
-
"description[]._key",
|
|
43
|
-
"description[]._type",
|
|
44
|
-
"description[].style",
|
|
45
|
-
"slug.current",
|
|
46
|
-
"slug._type",
|
|
47
|
-
"media[]._type",
|
|
48
|
-
"media[]._key",
|
|
49
|
-
"media[].asset._ref",
|
|
50
|
-
"media[].asset._type",
|
|
51
|
-
"_id",
|
|
52
|
-
],
|
|
53
|
-
],
|
|
54
|
-
]
|
|
55
|
-
`;
|
|
56
|
-
|
|
57
|
-
exports[`resolveEditUrl '/' > logger.table 1`] = `
|
|
58
|
-
[
|
|
59
|
-
[
|
|
60
|
-
[
|
|
61
|
-
{
|
|
62
|
-
"length": 377,
|
|
63
|
-
"path": "description[_key==\\"d8fa6d59e49b\\"].children[_key==\\"6a057cf2fb310\\"].text",
|
|
64
|
-
"value": "After revisiting one...",
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"length": 37,
|
|
68
|
-
"path": "media[_key==\\"cee5fbb69da2\\"].alt",
|
|
69
|
-
"value": "A Scandi minimal lam...",
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"length": 31,
|
|
73
|
-
"path": "title",
|
|
74
|
-
"value": "Akoyas - the greates...",
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"length": 7,
|
|
78
|
-
"path": "title",
|
|
79
|
-
"value": "All sew",
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"length": 132,
|
|
83
|
-
"path": "description[_key==\\"60b5ed16f4cc\\"].children[_key==\\"0ebc1c5b37350\\"].text",
|
|
84
|
-
"value": "All sew, our modular...",
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"length": 0,
|
|
88
|
-
"path": "description[_key==\\"5d457324f980\\"].children[_key==\\"ad7206c98f29\\"].text",
|
|
89
|
-
"value": "",
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"length": 12,
|
|
93
|
-
"path": "description[_key==\\"782db3651957\\"].children[_key==\\"cbd1965e0d78\\"].text",
|
|
94
|
-
"value": "Another row.",
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"length": 30,
|
|
98
|
-
"path": "media[_key==\\"55659c72ec46\\"].alt",
|
|
99
|
-
"value": "A glorious lamp pend...",
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"length": 4,
|
|
103
|
-
"path": "title",
|
|
104
|
-
"value": "Test",
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"length": 143,
|
|
108
|
-
"path": "description[_key==\\"94e937616df1\\"].children[_key==\\"d53c7c4c3314\\"].text",
|
|
109
|
-
"value": "asldkmsa ldkmasdlka ...",
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"length": 0,
|
|
113
|
-
"path": "description[_key==\\"65f554bf0220\\"].children[_key==\\"633d1506e24f\\"].text",
|
|
114
|
-
"value": "",
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"length": 6,
|
|
118
|
-
"path": "description[_key==\\"7c6bbc4dc6c9\\"].children[_key==\\"4f27de6e55d8\\"].text",
|
|
119
|
-
"value": "okokok",
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"length": 16,
|
|
123
|
-
"path": "title",
|
|
124
|
-
"value": "AllSew Reclaimed",
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"length": 131,
|
|
128
|
-
"path": "description[_key==\\"85cce8f03c3c\\"].children[_key==\\"1689e57dff090\\"].text",
|
|
129
|
-
"value": "Allsew, our modular,...",
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"length": 209,
|
|
133
|
-
"path": "description[_key==\\"b61f8576b42b\\"].children[_key==\\"625afd80ca530\\"].text",
|
|
134
|
-
"value": "Meet Ripple, a new s...",
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
"length": 13,
|
|
138
|
-
"path": "title",
|
|
139
|
-
"value": "Ripple Sconce",
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"length": 4,
|
|
143
|
-
"path": "title",
|
|
144
|
-
"value": "acme",
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
"length": 33,
|
|
148
|
-
"path": "copyrightText",
|
|
149
|
-
"value": "acme © 2023 — all ri...",
|
|
150
|
-
},
|
|
151
|
-
],
|
|
152
|
-
],
|
|
153
|
-
]
|
|
154
|
-
`;
|
|
155
|
-
|
|
156
|
-
exports[`resolveEditUrl 'https://test.sanity.studio' > decode all 1`] = `
|
|
157
|
-
[
|
|
158
|
-
"https://test.sanity.studio/intent/edit/id=462efcc6-3c8b-47c6-8474-5544e1a4acde;type=product;path=description[_key==\\"d8fa6d59e49b\\"].children[_key==\\"6a057cf2fb310\\"].text",
|
|
159
|
-
"https://test.sanity.studio/intent/edit/id=462efcc6-3c8b-47c6-8474-5544e1a4acde;type=product;path=media[_key==\\"cee5fbb69da2\\"].alt",
|
|
160
|
-
"https://test.sanity.studio/intent/edit/id=462efcc6-3c8b-47c6-8474-5544e1a4acde;type=product;path=title",
|
|
161
|
-
"https://test.sanity.studio/intent/edit/id=807cc05c-8c4c-443a-a9c1-198fd3fd7b16;type=product;path=title",
|
|
162
|
-
"https://test.sanity.studio/intent/edit/id=807cc05c-8c4c-443a-a9c1-198fd3fd7b16;type=product;path=description[_key==\\"60b5ed16f4cc\\"].children[_key==\\"0ebc1c5b37350\\"].text",
|
|
163
|
-
"https://test.sanity.studio/intent/edit/id=807cc05c-8c4c-443a-a9c1-198fd3fd7b16;type=product;path=description[_key==\\"5d457324f980\\"].children[_key==\\"ad7206c98f29\\"].text",
|
|
164
|
-
"https://test.sanity.studio/intent/edit/id=807cc05c-8c4c-443a-a9c1-198fd3fd7b16;type=product;path=description[_key==\\"782db3651957\\"].children[_key==\\"cbd1965e0d78\\"].text",
|
|
165
|
-
"https://test.sanity.studio/intent/edit/id=807cc05c-8c4c-443a-a9c1-198fd3fd7b16;type=product;path=media[_key==\\"55659c72ec46\\"].alt",
|
|
166
|
-
"https://test.sanity.studio/intent/edit/id=a643da0c-2cc6-439e-92b7-9f31c822ee05;type=product;path=title",
|
|
167
|
-
"https://test.sanity.studio/intent/edit/id=a643da0c-2cc6-439e-92b7-9f31c822ee05;type=product;path=description[_key==\\"94e937616df1\\"].children[_key==\\"d53c7c4c3314\\"].text",
|
|
168
|
-
"https://test.sanity.studio/intent/edit/id=a643da0c-2cc6-439e-92b7-9f31c822ee05;type=product;path=description[_key==\\"65f554bf0220\\"].children[_key==\\"633d1506e24f\\"].text",
|
|
169
|
-
"https://test.sanity.studio/intent/edit/id=a643da0c-2cc6-439e-92b7-9f31c822ee05;type=product;path=description[_key==\\"7c6bbc4dc6c9\\"].children[_key==\\"4f27de6e55d8\\"].text",
|
|
170
|
-
"https://test.sanity.studio/intent/edit/id=c9de5527-ebd9-4f90-8c30-a26e3439ca2d;type=product;path=title",
|
|
171
|
-
"https://test.sanity.studio/intent/edit/id=c9de5527-ebd9-4f90-8c30-a26e3439ca2d;type=product;path=description[_key==\\"85cce8f03c3c\\"].children[_key==\\"1689e57dff090\\"].text",
|
|
172
|
-
"https://test.sanity.studio/intent/edit/id=e1bf9f1f-efdb-4105-8c26-6b64f897e9c1;type=product;path=description[_key==\\"b61f8576b42b\\"].children[_key==\\"625afd80ca530\\"].text",
|
|
173
|
-
"https://test.sanity.studio/intent/edit/id=e1bf9f1f-efdb-4105-8c26-6b64f897e9c1;type=product;path=title",
|
|
174
|
-
"https://test.sanity.studio/intent/edit/id=siteSettings;type=siteSettings;path=title",
|
|
175
|
-
"https://test.sanity.studio/intent/edit/id=siteSettings;type=siteSettings;path=copyrightText",
|
|
176
|
-
]
|
|
177
|
-
`;
|
|
178
|
-
|
|
179
|
-
exports[`resolveEditUrl 'https://test.sanity.studio' > logger.error 1`] = `[]`;
|
|
180
|
-
|
|
181
|
-
exports[`resolveEditUrl 'https://test.sanity.studio' > logger.log 1`] = `
|
|
182
|
-
[
|
|
183
|
-
[
|
|
184
|
-
"[@sanity/client/stega]: Encoding source map into result",
|
|
185
|
-
],
|
|
186
|
-
[
|
|
187
|
-
"[@sanity/client/stega]: Paths encoded: 18, skipped: 80",
|
|
188
|
-
],
|
|
189
|
-
[
|
|
190
|
-
"[@sanity/client/stega]: Table of encoded paths",
|
|
191
|
-
],
|
|
192
|
-
[
|
|
193
|
-
"[@sanity/client/stega]: List of skipped paths",
|
|
194
|
-
[
|
|
195
|
-
"description[]._key",
|
|
196
|
-
"description[]._type",
|
|
197
|
-
"description[].style",
|
|
198
|
-
"slug.current",
|
|
199
|
-
"slug._type",
|
|
200
|
-
"media[]._type",
|
|
201
|
-
"media[]._key",
|
|
202
|
-
"media[].asset._ref",
|
|
203
|
-
"media[].asset._type",
|
|
204
|
-
"_id",
|
|
205
|
-
],
|
|
206
|
-
],
|
|
207
|
-
]
|
|
208
|
-
`;
|
|
209
|
-
|
|
210
|
-
exports[`resolveEditUrl 'https://test.sanity.studio' > logger.table 1`] = `
|
|
211
|
-
[
|
|
212
|
-
[
|
|
213
|
-
[
|
|
214
|
-
{
|
|
215
|
-
"length": 377,
|
|
216
|
-
"path": "description[_key==\\"d8fa6d59e49b\\"].children[_key==\\"6a057cf2fb310\\"].text",
|
|
217
|
-
"value": "After revisiting one...",
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"length": 37,
|
|
221
|
-
"path": "media[_key==\\"cee5fbb69da2\\"].alt",
|
|
222
|
-
"value": "A Scandi minimal lam...",
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"length": 31,
|
|
226
|
-
"path": "title",
|
|
227
|
-
"value": "Akoyas - the greates...",
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"length": 7,
|
|
231
|
-
"path": "title",
|
|
232
|
-
"value": "All sew",
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
"length": 132,
|
|
236
|
-
"path": "description[_key==\\"60b5ed16f4cc\\"].children[_key==\\"0ebc1c5b37350\\"].text",
|
|
237
|
-
"value": "All sew, our modular...",
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
"length": 0,
|
|
241
|
-
"path": "description[_key==\\"5d457324f980\\"].children[_key==\\"ad7206c98f29\\"].text",
|
|
242
|
-
"value": "",
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
"length": 12,
|
|
246
|
-
"path": "description[_key==\\"782db3651957\\"].children[_key==\\"cbd1965e0d78\\"].text",
|
|
247
|
-
"value": "Another row.",
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
"length": 30,
|
|
251
|
-
"path": "media[_key==\\"55659c72ec46\\"].alt",
|
|
252
|
-
"value": "A glorious lamp pend...",
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
"length": 4,
|
|
256
|
-
"path": "title",
|
|
257
|
-
"value": "Test",
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
"length": 143,
|
|
261
|
-
"path": "description[_key==\\"94e937616df1\\"].children[_key==\\"d53c7c4c3314\\"].text",
|
|
262
|
-
"value": "asldkmsa ldkmasdlka ...",
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
"length": 0,
|
|
266
|
-
"path": "description[_key==\\"65f554bf0220\\"].children[_key==\\"633d1506e24f\\"].text",
|
|
267
|
-
"value": "",
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
"length": 6,
|
|
271
|
-
"path": "description[_key==\\"7c6bbc4dc6c9\\"].children[_key==\\"4f27de6e55d8\\"].text",
|
|
272
|
-
"value": "okokok",
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
"length": 16,
|
|
276
|
-
"path": "title",
|
|
277
|
-
"value": "AllSew Reclaimed",
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
"length": 131,
|
|
281
|
-
"path": "description[_key==\\"85cce8f03c3c\\"].children[_key==\\"1689e57dff090\\"].text",
|
|
282
|
-
"value": "Allsew, our modular,...",
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
"length": 209,
|
|
286
|
-
"path": "description[_key==\\"b61f8576b42b\\"].children[_key==\\"625afd80ca530\\"].text",
|
|
287
|
-
"value": "Meet Ripple, a new s...",
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
"length": 13,
|
|
291
|
-
"path": "title",
|
|
292
|
-
"value": "Ripple Sconce",
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
"length": 4,
|
|
296
|
-
"path": "title",
|
|
297
|
-
"value": "acme",
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
"length": 33,
|
|
301
|
-
"path": "copyrightText",
|
|
302
|
-
"value": "acme © 2023 — all ri...",
|
|
303
|
-
},
|
|
304
|
-
],
|
|
305
|
-
],
|
|
306
|
-
]
|
|
307
|
-
`;
|