sanity 5.1.0-next.3 → 5.1.0-next.4
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/lib/_chunks-es/package.js +1 -1
- package/lib/_chunks-es/version.js +1 -1
- package/lib/index.js +6 -10
- package/lib/index.js.map +1 -1
- package/package.json +15 -15
|
@@ -7,7 +7,7 @@ try {
|
|
|
7
7
|
try {
|
|
8
8
|
buildVersion = buildVersion || // This is replaced by `@sanity/pkg-utils` at build time
|
|
9
9
|
// and must always be references by its full static name, e.g. no optional chaining, no `if (process && process.env)` etc.
|
|
10
|
-
"5.1.0-next.
|
|
10
|
+
"5.1.0-next.4+d496806f04";
|
|
11
11
|
} catch {
|
|
12
12
|
}
|
|
13
13
|
const SANITY_VERSION = buildVersion || `${version}-dev`;
|
package/lib/index.js
CHANGED
|
@@ -78113,19 +78113,17 @@ class SchemaError extends Error {
|
|
|
78113
78113
|
super("SchemaError"), this.schema = schema2, this.name = "SchemaError";
|
|
78114
78114
|
}
|
|
78115
78115
|
}
|
|
78116
|
-
const debug$4 = debug$c("sanity:config"),
|
|
78116
|
+
const debug$4 = debug$c("sanity:config"), DISABLE_TOGGLE$1 = "toggle.schema.upload-pause.disable";
|
|
78117
78117
|
async function isEnabled$1(client) {
|
|
78118
|
-
if (typeof process < "u" && process?.env?.SANITY_STUDIO_SCHEMA_DESCRIPTOR)
|
|
78119
|
-
return !0;
|
|
78120
78118
|
const {
|
|
78121
78119
|
projectId
|
|
78122
78120
|
} = client.config();
|
|
78123
78121
|
return projectId ? firstValueFrom(getFeatures({
|
|
78124
78122
|
projectId,
|
|
78125
78123
|
versionedClient: client
|
|
78126
|
-
})).then((features2) => features2.includes(
|
|
78124
|
+
})).then((features2) => !features2.includes(DISABLE_TOGGLE$1)).catch((err) => (debug$4("Fetching features failed. Sending schema to server.", {
|
|
78127
78125
|
err
|
|
78128
|
-
}), !
|
|
78126
|
+
}), !0)) : !1;
|
|
78129
78127
|
}
|
|
78130
78128
|
const MAX_SYNC_ITERATIONS = 5;
|
|
78131
78129
|
async function uploadSchema(schema2, client) {
|
|
@@ -84822,19 +84820,17 @@ function GlobalPerspectiveProvider(t0) {
|
|
|
84822
84820
|
let t4;
|
|
84823
84821
|
return $[2] !== children || $[3] !== excludedPerspectives || $[4] !== selectedPerspectiveName ? (t4 = /* @__PURE__ */ jsx(PerspectiveProvider, { selectedPerspectiveName, excludedPerspectives, children }), $[2] = children, $[3] = excludedPerspectives, $[4] = selectedPerspectiveName, $[5] = t4) : t4 = $[5], t4;
|
|
84824
84822
|
}
|
|
84825
|
-
const debug$2 = debug$c("sanity:store"),
|
|
84823
|
+
const debug$2 = debug$c("sanity:store"), DISABLE_TOGGLE = "toggle.user-application.upload-live-manifest.disable";
|
|
84826
84824
|
async function isEnabled(client) {
|
|
84827
|
-
if (typeof process < "u" && process?.env?.SANITY_STUDIO_USER_APPLICATION_CACHE)
|
|
84828
|
-
return !0;
|
|
84829
84825
|
const {
|
|
84830
84826
|
projectId
|
|
84831
84827
|
} = client.config();
|
|
84832
84828
|
return projectId ? firstValueFrom(getFeatures({
|
|
84833
84829
|
projectId,
|
|
84834
84830
|
versionedClient: client
|
|
84835
|
-
})).then((features2) => features2.includes(
|
|
84831
|
+
})).then((features2) => !features2.includes(DISABLE_TOGGLE)).catch((err) => (debug$2(`Fetching features failed. User applications cache enabled for project ${projectId}.`, {
|
|
84836
84832
|
err
|
|
84837
|
-
}), !
|
|
84833
|
+
}), !0)) : !1;
|
|
84838
84834
|
}
|
|
84839
84835
|
function createUserApplicationCache() {
|
|
84840
84836
|
const appCache = {}, projectIndex = {};
|