@sanity-labs/client-fake-for-test 0.24.0 → 0.25.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 +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -482,7 +482,7 @@ function createDocumentHistory() {
|
|
|
482
482
|
function historyIds(list) {
|
|
483
483
|
return list.split(",").map((id) => decodeURIComponent(id));
|
|
484
484
|
}
|
|
485
|
-
const ACCESS_PATH = /^\/access\/([^/]+)\/([^/]+)(\/.*)?$/, ACCESS_USER_PATH = /^\/users\/([^/]+)$/, ACCESS_ROLE_PATH = /^\/roles\/([^/]+)$/, PROJECT_ROLES_PATH = /^\/projects\/([^/]+)\/roles$/, PROJECT_FEATURES_PATH = /^\/projects\/([^/]+)\/features$/, MY_ATTRIBUTES_PATH = /^\/organizations\/([^/]+)\/users\/me\/attributes$/, DATA_HISTORY_PATH = /^\/data\/history\/([^/]+)(\/.*)$/, PROJECT_API_PATHS = [
|
|
485
|
+
const ACCESS_PATH = /^\/access\/([^/]+)\/([^/]+)(\/.*)?$/, ACCESS_USER_PATH = /^\/users\/([^/]+)$/, ACCESS_ROLE_PATH = /^\/roles\/([^/]+)$/, PROJECT_ROLES_PATH = /^\/projects\/([^/]+)\/roles$/, PROJECT_FEATURES_PATH = /^\/projects\/([^/]+)\/features$/, MY_ATTRIBUTES_PATH = /^\/organizations\/([^/]+)\/users\/me\/attributes$/, DATA_HISTORY_PATH = /^\/data\/history\/([^/]+)(\/.*)$/, ACCESS_API_SINCE = "2025-07-11", PROJECT_API_PATHS = [
|
|
486
486
|
/^\/users\/me$/,
|
|
487
487
|
/^\/projects\/[^/]+$/,
|
|
488
488
|
/^\/projects\/[^/]+\/users\/[^/]+$/,
|
|
@@ -525,6 +525,7 @@ async function servePlatformRequest(ctx, uri, request) {
|
|
|
525
525
|
}
|
|
526
526
|
const access = path.match(ACCESS_PATH);
|
|
527
527
|
if (access !== null) {
|
|
528
|
+
if (ctx.apiVersion < ACCESS_API_SINCE) throw notMounted(request);
|
|
528
529
|
const [, type, id, rest2] = access;
|
|
529
530
|
return serveAccess({ ctx, request, type, id: decodeURIComponent(id), rest: rest2 ?? "", query });
|
|
530
531
|
}
|
|
@@ -2811,6 +2812,7 @@ function makeHandle(handleArgs) {
|
|
|
2811
2812
|
listIdentities: members,
|
|
2812
2813
|
platform: {
|
|
2813
2814
|
projectId,
|
|
2815
|
+
apiVersion,
|
|
2814
2816
|
organizationId: backend.organizationId,
|
|
2815
2817
|
projectFeatures: backend.projectFeatures,
|
|
2816
2818
|
own: (asked) => registryKey(asked) === registryKey(target) ? {
|