@sanity/client 7.4.1 → 7.5.0-live-cors.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 +27 -0
- package/dist/index.browser.cjs +8 -2
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +69 -2
- package/dist/index.browser.d.ts +69 -2
- package/dist/index.browser.js +8 -2
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +9 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +69 -2
- package/dist/index.d.ts +69 -2
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/stega.browser.d.cts +69 -2
- package/dist/stega.browser.d.ts +69 -2
- package/dist/stega.d.cts +69 -2
- package/dist/stega.d.ts +69 -2
- package/package.json +1 -1
- package/src/agent/actions/transform.ts +78 -3
- package/src/data/live.ts +7 -1
- package/src/types.ts +2 -0
- package/umd/sanityClient.js +8 -2
- package/umd/sanityClient.min.js +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1289,11 +1289,17 @@ class LiveClient {
|
|
|
1289
1289
|
}
|
|
1290
1290
|
return event;
|
|
1291
1291
|
})
|
|
1292
|
-
)
|
|
1292
|
+
);
|
|
1293
|
+
console.log("YES THIS IS THE CORS VERSION");
|
|
1294
|
+
const checkCors = fetchObservable(url, {
|
|
1293
1295
|
method: "OPTIONS",
|
|
1294
1296
|
mode: "cors",
|
|
1295
1297
|
credentials: esOptions.withCredentials ? "include" : "omit",
|
|
1296
|
-
headers:
|
|
1298
|
+
headers: {
|
|
1299
|
+
...esOptions.headers,
|
|
1300
|
+
"Access-Control-Request-Headers": "authorization"
|
|
1301
|
+
// for this preflight check, ensure we send what the browser would send if needed
|
|
1302
|
+
}
|
|
1297
1303
|
}).pipe(
|
|
1298
1304
|
rxjs.mergeMap(() => rxjs.EMPTY),
|
|
1299
1305
|
rxjs.catchError(() => {
|
|
@@ -2524,7 +2530,7 @@ function defineDeprecatedCreateClient(createClient2) {
|
|
|
2524
2530
|
return config.printNoDefaultExport(), createClient2(config$1);
|
|
2525
2531
|
};
|
|
2526
2532
|
}
|
|
2527
|
-
var name = "@sanity/client", version = "7.
|
|
2533
|
+
var name = "@sanity/client", version = "7.5.0-live-cors.1";
|
|
2528
2534
|
const middleware = [
|
|
2529
2535
|
middleware$1.debug({ verbose: !0, namespace: "sanity:client" }),
|
|
2530
2536
|
middleware$1.headers({ "User-Agent": `${name} ${version}` }),
|