@sanity/client
Advanced tools
Comparing version 6.13.0 to 6.13.1
@@ -1,3 +0,3 @@ | ||
import { printNoDefaultExport, defineCreateClientExports, SanityClient, envMiddleware } from './_chunks/browserMiddleware-Cfl3LrrI.js'; | ||
export { BasePatch, BaseTransaction, ClientError, ObservablePatch, ObservableSanityClient, ObservableTransaction, Patch, ServerError, Transaction } from './_chunks/browserMiddleware-Cfl3LrrI.js'; | ||
import { printNoDefaultExport, defineCreateClientExports, SanityClient, envMiddleware } from './_chunks/browserMiddleware-a-wo4gir.js'; | ||
export { BasePatch, BaseTransaction, ClientError, ObservablePatch, ObservableSanityClient, ObservableTransaction, Patch, ServerError, Transaction } from './_chunks/browserMiddleware-a-wo4gir.js'; | ||
export { adapter as unstable__adapter, environment as unstable__environment } from 'get-it'; | ||
@@ -4,0 +4,0 @@ |
@@ -1,3 +0,3 @@ | ||
import { printNoDefaultExport, defineCreateClientExports, SanityClient, middleware } from './_chunks/nodeMiddleware-BN5UYAym.js'; | ||
export { BasePatch, BaseTransaction, ClientError, ObservablePatch, ObservableSanityClient, ObservableTransaction, Patch, ServerError, Transaction } from './_chunks/nodeMiddleware-BN5UYAym.js'; | ||
import { printNoDefaultExport, defineCreateClientExports, SanityClient, middleware } from './_chunks/nodeMiddleware-8EaNvibV.js'; | ||
export { BasePatch, BaseTransaction, ClientError, ObservablePatch, ObservableSanityClient, ObservableTransaction, Patch, ServerError, Transaction } from './_chunks/nodeMiddleware-8EaNvibV.js'; | ||
export { adapter as unstable__adapter, environment as unstable__environment } from 'get-it'; | ||
@@ -4,0 +4,0 @@ |
@@ -1,5 +0,5 @@ | ||
import { SanityClient, ObservableSanityClient, defineCreateClientExports, envMiddleware } from './_chunks/browserMiddleware-Cfl3LrrI.js'; | ||
export { BasePatch, BaseTransaction, ClientError, ObservablePatch, ObservableTransaction, Patch, ServerError, Transaction, vercelStegaCleanAll } from './_chunks/browserMiddleware-Cfl3LrrI.js'; | ||
import { SanityClient, ObservableSanityClient, defineCreateClientExports, envMiddleware } from './_chunks/browserMiddleware-a-wo4gir.js'; | ||
export { BasePatch, BaseTransaction, ClientError, ObservablePatch, ObservableTransaction, Patch, ServerError, Transaction, vercelStegaCleanAll } from './_chunks/browserMiddleware-a-wo4gir.js'; | ||
export { adapter as unstable__adapter, environment as unstable__environment } from 'get-it'; | ||
export { encodeIntoResult, stegaEncodeSourceMap } from './_chunks/stegaEncodeSourceMap-DO8ipgJw.js'; | ||
export { encodeIntoResult, stegaEncodeSourceMap } from './_chunks/stegaEncodeSourceMap-BiY3WTdp.js'; | ||
@@ -6,0 +6,0 @@ class SanityStegaClient extends SanityClient { |
@@ -1,5 +0,5 @@ | ||
import { SanityClient, ObservableSanityClient, defineCreateClientExports, middleware } from './_chunks/nodeMiddleware-BN5UYAym.js'; | ||
export { BasePatch, BaseTransaction, ClientError, ObservablePatch, ObservableTransaction, Patch, ServerError, Transaction, vercelStegaCleanAll } from './_chunks/nodeMiddleware-BN5UYAym.js'; | ||
import { SanityClient, ObservableSanityClient, defineCreateClientExports, middleware } from './_chunks/nodeMiddleware-8EaNvibV.js'; | ||
export { BasePatch, BaseTransaction, ClientError, ObservablePatch, ObservableTransaction, Patch, ServerError, Transaction, vercelStegaCleanAll } from './_chunks/nodeMiddleware-8EaNvibV.js'; | ||
export { adapter as unstable__adapter, environment as unstable__environment } from 'get-it'; | ||
export { encodeIntoResult, stegaEncodeSourceMap } from './_chunks/stegaEncodeSourceMap-MOb3TLiL.js'; | ||
export { encodeIntoResult, stegaEncodeSourceMap } from './_chunks/stegaEncodeSourceMap-CVUvJGR6.js'; | ||
@@ -6,0 +6,0 @@ class SanityStegaClient extends SanityClient { |
{ | ||
"name": "@sanity/client", | ||
"version": "6.13.0", | ||
"version": "6.13.1", | ||
"description": "Client for retrieving, creating and patching data from Sanity.io", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
import type {MutationSelection} from '../types' | ||
export function getSelection(sel: unknown): MutationSelection { | ||
if (typeof sel === 'string' || Array.isArray(sel)) { | ||
if (typeof sel === 'string') { | ||
return {id: sel} | ||
} | ||
if (Array.isArray(sel)) { | ||
return {query: '*[_id in $ids]', params: {ids: sel}} | ||
} | ||
if (typeof sel === 'object' && sel !== null && 'query' in sel && typeof sel.query === 'string') { | ||
@@ -9,0 +13,0 @@ return 'params' in sel && typeof sel.params === 'object' && sel.params !== null |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2138613
27656
1