@sanity/client 7.26.1 → 8.0.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/README.md +5 -377
- package/dist/browserUpload-CQgx9YYo.js +86 -0
- package/dist/browserUpload-CQgx9YYo.js.map +1 -0
- package/dist/browserUpload-icWlVP15.js +86 -0
- package/dist/browserUpload-icWlVP15.js.map +1 -0
- package/dist/config-a8VajuEY.js +126 -0
- package/dist/config-a8VajuEY.js.map +1 -0
- package/dist/csm.d.ts +122 -347
- package/dist/csm.js +79 -91
- package/dist/csm.js.map +1 -1
- package/dist/dist-C9ExSk2R.js +73 -0
- package/dist/dist-C9ExSk2R.js.map +1 -0
- package/dist/dist-Z8cIRxoB.js +69 -0
- package/dist/dist-Z8cIRxoB.js.map +1 -0
- package/dist/index.d.ts +107 -6758
- package/dist/index.js +2822 -2848
- package/dist/index.js.map +1 -1
- package/dist/{index.d.cts → index.node.d.ts} +4291 -5363
- package/dist/index.node.js +3131 -0
- package/dist/index.node.js.map +1 -0
- package/dist/isRecord-Kfmt-nk-.js +7 -0
- package/dist/isRecord-Kfmt-nk-.js.map +1 -0
- package/dist/media-library.d.ts +9 -100
- package/dist/media-library.js +36 -14
- package/dist/media-library.js.map +1 -1
- package/dist/request-CJxcN16k.js +372 -0
- package/dist/request-CJxcN16k.js.map +1 -0
- package/dist/request-k7VS_NnC.js +354 -0
- package/dist/request-k7VS_NnC.js.map +1 -0
- package/dist/resolveEditInfo-sq7yF78q.js +325 -0
- package/dist/resolveEditInfo-sq7yF78q.js.map +1 -0
- package/dist/rolldown-runtime-vyAXikos.js +9 -0
- package/dist/stega.d.ts +78 -7179
- package/dist/stega.js +27 -20
- package/dist/stega.js.map +1 -1
- package/dist/stegaClean-C18wLWau.js +21 -0
- package/dist/stegaClean-C18wLWau.js.map +1 -0
- package/dist/stegaEncodeSourceMap-B2fGArSf.js +163 -0
- package/dist/stegaEncodeSourceMap-B2fGArSf.js.map +1 -0
- package/dist/stegaEncodeSourceMap-DkoIlutY.js +367 -0
- package/dist/stegaEncodeSourceMap-DkoIlutY.js.map +1 -0
- package/dist/{index.browser.d.cts → types-CUxZSgB2.d.ts} +3956 -5295
- package/dist/types-CfGzbXrl.d.ts +108 -0
- package/package.json +69 -146
- package/src/SanityClient.ts +82 -117
- package/src/agent/actions/AgentActionsClient.ts +12 -12
- package/src/agent/actions/generate.ts +20 -3
- package/src/agent/actions/patch.ts +21 -4
- package/src/agent/actions/prompt.ts +17 -4
- package/src/agent/actions/transform.ts +21 -4
- package/src/agent/actions/translate.ts +21 -4
- package/src/assets/AssetsClient.ts +71 -23
- package/src/csm/createEditUrl.ts +1 -1
- package/src/csm/draftUtils.ts +0 -1
- package/src/csm/index.ts +2 -2
- package/src/csm/studioPath.ts +2 -1
- package/src/csm/types.ts +5 -1
- package/src/data/dataMethods.ts +801 -349
- package/src/data/eventsource.ts +13 -10
- package/src/data/listen.ts +16 -22
- package/src/data/live.ts +44 -27
- package/src/data/resolveEventSourceFetch.ts +96 -0
- package/src/datasets/DatasetsClient.ts +58 -41
- package/src/defineCreateClient.ts +35 -23
- package/src/http/browserMiddleware.ts +7 -1
- package/src/http/browserUpload.ts +162 -0
- package/src/http/errors.ts +60 -6
- package/src/http/nodeMiddleware.ts +94 -30
- package/src/http/request.ts +310 -87
- package/src/http/requestOptions.ts +131 -15
- package/src/{index.browser.ts → index.node.ts} +9 -4
- package/src/index.ts +4 -3
- package/src/mediaLibrary/MediaLibraryVideoClient.ts +26 -11
- package/src/projects/ProjectsClient.ts +18 -16
- package/src/releases/ReleasesClient.ts +34 -31
- package/src/stega/index.ts +1 -2
- package/src/stega/stegaEncodeSourceMap.ts +5 -0
- package/src/stega/types.ts +0 -1
- package/src/types.ts +110 -96
- package/src/users/UsersClient.ts +10 -14
- package/src/util/shareReplayLatest.ts +1 -1
- package/src/warnings.ts +6 -1
- package/dist/_chunks-cjs/config.cjs +0 -206
- package/dist/_chunks-cjs/config.cjs.map +0 -1
- package/dist/_chunks-cjs/isRecord.cjs +0 -6
- package/dist/_chunks-cjs/isRecord.cjs.map +0 -1
- package/dist/_chunks-cjs/resolveEditInfo.cjs +0 -334
- package/dist/_chunks-cjs/resolveEditInfo.cjs.map +0 -1
- package/dist/_chunks-cjs/stegaClean.cjs +0 -46
- package/dist/_chunks-cjs/stegaClean.cjs.map +0 -1
- package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs +0 -388
- package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs.map +0 -1
- package/dist/_chunks-es/config.js +0 -207
- package/dist/_chunks-es/config.js.map +0 -1
- package/dist/_chunks-es/isRecord.js +0 -7
- package/dist/_chunks-es/isRecord.js.map +0 -1
- package/dist/_chunks-es/resolveEditInfo.js +0 -335
- package/dist/_chunks-es/resolveEditInfo.js.map +0 -1
- package/dist/_chunks-es/stegaClean.js +0 -47
- package/dist/_chunks-es/stegaClean.js.map +0 -1
- package/dist/_chunks-es/stegaEncodeSourceMap.js +0 -389
- package/dist/_chunks-es/stegaEncodeSourceMap.js.map +0 -1
- package/dist/csm.cjs +0 -99
- package/dist/csm.cjs.map +0 -1
- package/dist/csm.d.cts +0 -403
- package/dist/index.browser.cjs +0 -3106
- package/dist/index.browser.cjs.map +0 -1
- package/dist/index.browser.d.ts +0 -6841
- package/dist/index.browser.js +0 -3082
- package/dist/index.browser.js.map +0 -1
- package/dist/index.cjs +0 -2947
- package/dist/index.cjs.map +0 -1
- package/dist/media-library.cjs +0 -20
- package/dist/media-library.cjs.map +0 -1
- package/dist/media-library.d.cts +0 -117
- package/dist/stega.browser.cjs +0 -29
- package/dist/stega.browser.cjs.map +0 -1
- package/dist/stega.browser.d.cts +0 -7242
- package/dist/stega.browser.d.ts +0 -7242
- package/dist/stega.browser.js +0 -24
- package/dist/stega.browser.js.map +0 -1
- package/dist/stega.cjs +0 -29
- package/dist/stega.cjs.map +0 -1
- package/dist/stega.d.cts +0 -7242
- package/src/data/eventsourcePolyfill.ts +0 -7
- package/umd/.gitkeep +0 -1
- package/umd/sanityClient.js +0 -6536
- package/umd/sanityClient.min.js +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {type Observable} from 'rxjs'
|
|
2
2
|
|
|
3
|
-
import {_request} from '../data/dataMethods'
|
|
3
|
+
import {_request, _requestObservable} from '../data/dataMethods'
|
|
4
4
|
import type {ObservableSanityClient, SanityClient} from '../SanityClient'
|
|
5
5
|
import type {
|
|
6
6
|
HttpRequest,
|
|
@@ -42,12 +42,12 @@ export class ObservableMediaLibraryVideoClient {
|
|
|
42
42
|
)
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
const
|
|
45
|
+
const url = buildVideoPlaybackInfoUrl(instanceId, effectiveLibraryId)
|
|
46
46
|
const queryParams = buildQueryParams(options)
|
|
47
47
|
|
|
48
|
-
return
|
|
48
|
+
return _requestObservable<VideoPlaybackInfo>(this.#client, this.#httpRequest, {
|
|
49
49
|
method: 'GET',
|
|
50
|
-
|
|
50
|
+
url,
|
|
51
51
|
query: queryParams,
|
|
52
52
|
})
|
|
53
53
|
}
|
|
@@ -72,12 +72,27 @@ export class MediaLibraryVideoClient {
|
|
|
72
72
|
assetIdentifier: MediaLibraryAssetInstanceIdentifier,
|
|
73
73
|
options: MediaLibraryPlaybackInfoOptions = {},
|
|
74
74
|
): Promise<VideoPlaybackInfo> {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
const config = this.#client.config()
|
|
76
|
+
const resource = config.resource || config['~experimental_resource']
|
|
77
|
+
const configMediaLibraryId = resource?.id
|
|
78
|
+
|
|
79
|
+
const {instanceId, libraryId} = parseAssetInstanceId(assetIdentifier)
|
|
80
|
+
const effectiveLibraryId = libraryId || configMediaLibraryId
|
|
81
|
+
|
|
82
|
+
if (!effectiveLibraryId) {
|
|
83
|
+
throw new Error(
|
|
84
|
+
'Could not determine Media Library ID - you need to provide a valid Media Library ID in the client config or a Media Library GDR',
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const url = buildVideoPlaybackInfoUrl(instanceId, effectiveLibraryId)
|
|
89
|
+
const queryParams = buildQueryParams(options)
|
|
90
|
+
|
|
91
|
+
return _request<VideoPlaybackInfo>(this.#client, this.#httpRequest, {
|
|
92
|
+
method: 'GET',
|
|
93
|
+
url,
|
|
94
|
+
query: queryParams,
|
|
95
|
+
})
|
|
81
96
|
}
|
|
82
97
|
}
|
|
83
98
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {type Observable} from 'rxjs'
|
|
2
2
|
|
|
3
|
-
import {_request} from '../data/dataMethods'
|
|
3
|
+
import {_request, _requestObservable} from '../data/dataMethods'
|
|
4
4
|
import type {ObservableSanityClient, SanityClient} from '../SanityClient'
|
|
5
5
|
import type {HttpRequest, SanityProject} from '../types'
|
|
6
6
|
|
|
@@ -37,7 +37,7 @@ export class ObservableProjectsClient {
|
|
|
37
37
|
options?: T,
|
|
38
38
|
): Observable<Omit<SanityProject, OmittedProjectFields<T>>[]> {
|
|
39
39
|
const query: Record<string, string> = {}
|
|
40
|
-
const
|
|
40
|
+
const url = '/projects'
|
|
41
41
|
if (options?.includeMembers === false) {
|
|
42
42
|
query.includeMembers = 'false'
|
|
43
43
|
}
|
|
@@ -51,9 +51,10 @@ export class ObservableProjectsClient {
|
|
|
51
51
|
query.onlyExplicitMembership = 'true'
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
return
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
return _requestObservable<SanityProject[]>(this.#client, this.#httpRequest, {
|
|
55
|
+
url,
|
|
56
|
+
query,
|
|
57
|
+
}) as Observable<Omit<SanityProject, OmittedProjectFields<T>>[]>
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
/**
|
|
@@ -62,7 +63,9 @@ export class ObservableProjectsClient {
|
|
|
62
63
|
* @param projectId - ID of the project to fetch
|
|
63
64
|
*/
|
|
64
65
|
getById(projectId: string): Observable<SanityProject> {
|
|
65
|
-
return
|
|
66
|
+
return _requestObservable<SanityProject>(this.#client, this.#httpRequest, {
|
|
67
|
+
url: `/projects/${projectId}`,
|
|
68
|
+
})
|
|
66
69
|
}
|
|
67
70
|
}
|
|
68
71
|
|
|
@@ -88,7 +91,7 @@ export class ProjectsClient {
|
|
|
88
91
|
options?: T,
|
|
89
92
|
): Promise<Omit<SanityProject, OmittedProjectFields<T>>[]> {
|
|
90
93
|
const query: Record<string, string> = {}
|
|
91
|
-
const
|
|
94
|
+
const url = '/projects'
|
|
92
95
|
if (options?.includeMembers === false) {
|
|
93
96
|
query.includeMembers = 'false'
|
|
94
97
|
}
|
|
@@ -101,11 +104,10 @@ export class ProjectsClient {
|
|
|
101
104
|
if (options?.onlyExplicitMembership) {
|
|
102
105
|
query.onlyExplicitMembership = 'true'
|
|
103
106
|
}
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
)
|
|
107
|
+
return _request<SanityProject[]>(this.#client, this.#httpRequest, {
|
|
108
|
+
url,
|
|
109
|
+
query,
|
|
110
|
+
}) as Promise<Omit<SanityProject, OmittedProjectFields<T>>[]>
|
|
109
111
|
}
|
|
110
112
|
|
|
111
113
|
/**
|
|
@@ -114,8 +116,8 @@ export class ProjectsClient {
|
|
|
114
116
|
* @param projectId - ID of the project to fetch
|
|
115
117
|
*/
|
|
116
118
|
getById(projectId: string): Promise<SanityProject> {
|
|
117
|
-
return
|
|
118
|
-
|
|
119
|
-
)
|
|
119
|
+
return _request<SanityProject>(this.#client, this.#httpRequest, {
|
|
120
|
+
url: `/projects/${projectId}`,
|
|
121
|
+
})
|
|
120
122
|
}
|
|
121
123
|
}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import {
|
|
1
|
+
import {map, Observable} from 'rxjs'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
_action,
|
|
5
|
+
_actionObservable,
|
|
6
|
+
_getDocument,
|
|
7
|
+
_getDocumentObservable,
|
|
8
|
+
_getReleaseDocuments,
|
|
9
|
+
_getReleaseDocumentsObservable,
|
|
10
|
+
} from '../data/dataMethods'
|
|
4
11
|
import type {ObservableSanityClient, SanityClient} from '../SanityClient'
|
|
5
12
|
import type {
|
|
6
13
|
ArchiveReleaseAction,
|
|
@@ -61,7 +68,7 @@ export class ObservableReleasesClient {
|
|
|
61
68
|
{releaseId}: {releaseId: string},
|
|
62
69
|
options?: {signal?: AbortSignal; tag?: string},
|
|
63
70
|
): Observable<ReleaseDocument | undefined> {
|
|
64
|
-
return
|
|
71
|
+
return _getDocumentObservable<ReleaseDocument>(
|
|
65
72
|
this.#client,
|
|
66
73
|
this.#httpRequest,
|
|
67
74
|
`_.releases.${releaseId}`,
|
|
@@ -140,7 +147,7 @@ export class ObservableReleasesClient {
|
|
|
140
147
|
const {action, options} = createRelease(releaseOrOptions, maybeOptions)
|
|
141
148
|
const {releaseId, metadata} = action
|
|
142
149
|
|
|
143
|
-
return
|
|
150
|
+
return _actionObservable(this.#client, this.#httpRequest, action, options).pipe(
|
|
144
151
|
map((actionResult) => ({
|
|
145
152
|
...actionResult,
|
|
146
153
|
releaseId,
|
|
@@ -172,7 +179,7 @@ export class ObservableReleasesClient {
|
|
|
172
179
|
patch,
|
|
173
180
|
}
|
|
174
181
|
|
|
175
|
-
return
|
|
182
|
+
return _actionObservable(this.#client, this.#httpRequest, editAction, options)
|
|
176
183
|
}
|
|
177
184
|
|
|
178
185
|
/**
|
|
@@ -202,7 +209,7 @@ export class ObservableReleasesClient {
|
|
|
202
209
|
releaseId,
|
|
203
210
|
}
|
|
204
211
|
|
|
205
|
-
return
|
|
212
|
+
return _actionObservable(this.#client, this.#httpRequest, publishAction, options)
|
|
206
213
|
}
|
|
207
214
|
|
|
208
215
|
/**
|
|
@@ -229,7 +236,7 @@ export class ObservableReleasesClient {
|
|
|
229
236
|
releaseId,
|
|
230
237
|
}
|
|
231
238
|
|
|
232
|
-
return
|
|
239
|
+
return _actionObservable(this.#client, this.#httpRequest, archiveAction, options)
|
|
233
240
|
}
|
|
234
241
|
|
|
235
242
|
/**
|
|
@@ -254,7 +261,7 @@ export class ObservableReleasesClient {
|
|
|
254
261
|
releaseId,
|
|
255
262
|
}
|
|
256
263
|
|
|
257
|
-
return
|
|
264
|
+
return _actionObservable(this.#client, this.#httpRequest, unarchiveAction, options)
|
|
258
265
|
}
|
|
259
266
|
|
|
260
267
|
/**
|
|
@@ -283,7 +290,7 @@ export class ObservableReleasesClient {
|
|
|
283
290
|
publishAt,
|
|
284
291
|
}
|
|
285
292
|
|
|
286
|
-
return
|
|
293
|
+
return _actionObservable(this.#client, this.#httpRequest, scheduleAction, options)
|
|
287
294
|
}
|
|
288
295
|
|
|
289
296
|
/**
|
|
@@ -310,7 +317,7 @@ export class ObservableReleasesClient {
|
|
|
310
317
|
releaseId,
|
|
311
318
|
}
|
|
312
319
|
|
|
313
|
-
return
|
|
320
|
+
return _actionObservable(this.#client, this.#httpRequest, unscheduleAction, options)
|
|
314
321
|
}
|
|
315
322
|
|
|
316
323
|
/**
|
|
@@ -335,7 +342,7 @@ export class ObservableReleasesClient {
|
|
|
335
342
|
releaseId,
|
|
336
343
|
}
|
|
337
344
|
|
|
338
|
-
return
|
|
345
|
+
return _actionObservable(this.#client, this.#httpRequest, deleteAction, options)
|
|
339
346
|
}
|
|
340
347
|
|
|
341
348
|
/**
|
|
@@ -354,7 +361,7 @@ export class ObservableReleasesClient {
|
|
|
354
361
|
{releaseId}: {releaseId: string},
|
|
355
362
|
options?: BaseMutationOptions,
|
|
356
363
|
): Observable<RawQueryResponse<SanityDocument[]>> {
|
|
357
|
-
return
|
|
364
|
+
return _getReleaseDocumentsObservable(this.#client, this.#httpRequest, releaseId, options)
|
|
358
365
|
}
|
|
359
366
|
}
|
|
360
367
|
|
|
@@ -397,13 +404,11 @@ export class ReleasesClient {
|
|
|
397
404
|
{releaseId}: {releaseId: string},
|
|
398
405
|
options?: {signal?: AbortSignal; tag?: string},
|
|
399
406
|
): Promise<ReleaseDocument | undefined> {
|
|
400
|
-
return
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
options,
|
|
406
|
-
),
|
|
407
|
+
return _getDocument<ReleaseDocument>(
|
|
408
|
+
this.#client,
|
|
409
|
+
this.#httpRequest,
|
|
410
|
+
`_.releases.${releaseId}`,
|
|
411
|
+
options,
|
|
407
412
|
)
|
|
408
413
|
}
|
|
409
414
|
|
|
@@ -470,9 +475,7 @@ export class ReleasesClient {
|
|
|
470
475
|
const {action, options} = createRelease(releaseOrOptions, maybeOptions)
|
|
471
476
|
const {releaseId, metadata} = action
|
|
472
477
|
|
|
473
|
-
const actionResult = await
|
|
474
|
-
_action(this.#client, this.#httpRequest, action, options),
|
|
475
|
-
)
|
|
478
|
+
const actionResult = await _action(this.#client, this.#httpRequest, action, options)
|
|
476
479
|
|
|
477
480
|
return {...actionResult, releaseId, metadata}
|
|
478
481
|
}
|
|
@@ -500,7 +503,7 @@ export class ReleasesClient {
|
|
|
500
503
|
patch,
|
|
501
504
|
}
|
|
502
505
|
|
|
503
|
-
return
|
|
506
|
+
return _action(this.#client, this.#httpRequest, editAction, options)
|
|
504
507
|
}
|
|
505
508
|
|
|
506
509
|
/**
|
|
@@ -530,7 +533,7 @@ export class ReleasesClient {
|
|
|
530
533
|
releaseId,
|
|
531
534
|
}
|
|
532
535
|
|
|
533
|
-
return
|
|
536
|
+
return _action(this.#client, this.#httpRequest, publishAction, options)
|
|
534
537
|
}
|
|
535
538
|
|
|
536
539
|
/**
|
|
@@ -557,7 +560,7 @@ export class ReleasesClient {
|
|
|
557
560
|
releaseId,
|
|
558
561
|
}
|
|
559
562
|
|
|
560
|
-
return
|
|
563
|
+
return _action(this.#client, this.#httpRequest, archiveAction, options)
|
|
561
564
|
}
|
|
562
565
|
|
|
563
566
|
/**
|
|
@@ -582,7 +585,7 @@ export class ReleasesClient {
|
|
|
582
585
|
releaseId,
|
|
583
586
|
}
|
|
584
587
|
|
|
585
|
-
return
|
|
588
|
+
return _action(this.#client, this.#httpRequest, unarchiveAction, options)
|
|
586
589
|
}
|
|
587
590
|
|
|
588
591
|
/**
|
|
@@ -611,7 +614,7 @@ export class ReleasesClient {
|
|
|
611
614
|
publishAt,
|
|
612
615
|
}
|
|
613
616
|
|
|
614
|
-
return
|
|
617
|
+
return _action(this.#client, this.#httpRequest, scheduleAction, options)
|
|
615
618
|
}
|
|
616
619
|
|
|
617
620
|
/**
|
|
@@ -638,7 +641,7 @@ export class ReleasesClient {
|
|
|
638
641
|
releaseId,
|
|
639
642
|
}
|
|
640
643
|
|
|
641
|
-
return
|
|
644
|
+
return _action(this.#client, this.#httpRequest, unscheduleAction, options)
|
|
642
645
|
}
|
|
643
646
|
|
|
644
647
|
/**
|
|
@@ -663,7 +666,7 @@ export class ReleasesClient {
|
|
|
663
666
|
releaseId,
|
|
664
667
|
}
|
|
665
668
|
|
|
666
|
-
return
|
|
669
|
+
return _action(this.#client, this.#httpRequest, deleteAction, options)
|
|
667
670
|
}
|
|
668
671
|
|
|
669
672
|
/**
|
|
@@ -682,6 +685,6 @@ export class ReleasesClient {
|
|
|
682
685
|
{releaseId}: {releaseId: string},
|
|
683
686
|
options?: BaseMutationOptions,
|
|
684
687
|
): Promise<RawQueryResponse<SanityDocument[]>> {
|
|
685
|
-
return
|
|
688
|
+
return _getReleaseDocuments(this.#client, this.#httpRequest, releaseId, options)
|
|
686
689
|
}
|
|
687
690
|
}
|
package/src/stega/index.ts
CHANGED
|
@@ -6,10 +6,9 @@ import {
|
|
|
6
6
|
SanityClient,
|
|
7
7
|
} from '@sanity/client'
|
|
8
8
|
|
|
9
|
-
export {encodeIntoResult} from './encodeIntoResult'
|
|
10
9
|
export {type ClientReturnStega, stegaBrand, type StegaBranded, type StegaString} from './stegaBrand'
|
|
11
10
|
export {stegaClean, type StegaCleaned, vercelStegaCleanAll} from './stegaClean'
|
|
12
|
-
export {stegaEncodeSourceMap} from './stegaEncodeSourceMap'
|
|
11
|
+
export {encodeIntoResult, stegaEncodeSourceMap} from './stegaEncodeSourceMap'
|
|
13
12
|
export * from './types'
|
|
14
13
|
|
|
15
14
|
/**
|
|
@@ -5,6 +5,11 @@ import {jsonPathToStudioPath} from '../csm/jsonPath'
|
|
|
5
5
|
import {resolveStudioBaseRoute} from '../csm/resolveEditInfo'
|
|
6
6
|
import {reKeySegment, toString as studioPathToString} from '../csm/studioPath'
|
|
7
7
|
import {encodeIntoResult} from './encodeIntoResult'
|
|
8
|
+
// Re-export so `encodeIntoResult` is a genuine export of this module - which
|
|
9
|
+
// forms its own output chunk via the dynamic import in `dataMethods`. Without
|
|
10
|
+
// this, rolldown absorbs `encodeIntoResult` into the chunk but omits it from
|
|
11
|
+
// the chunk's exports, breaking `@sanity/client/stega`'s re-export of it.
|
|
12
|
+
export {encodeIntoResult} from './encodeIntoResult'
|
|
8
13
|
import {filterDefault} from './filterDefault'
|
|
9
14
|
import {
|
|
10
15
|
type ContentSourceMap,
|
package/src/stega/types.ts
CHANGED