@svadmin/sanity 0.11.19 → 0.11.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svadmin/sanity",
3
- "version": "0.11.19",
3
+ "version": "0.11.21",
4
4
  "description": "Sanity DataProvider for svadmin",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -20,7 +20,7 @@
20
20
  }
21
21
  },
22
22
  "peerDependencies": {
23
- "@svadmin/core": "^0.69.2"
23
+ "@svadmin/core": "^0.70.0"
24
24
  },
25
25
  "license": "MIT",
26
26
  "repository": {
@@ -1,3 +1,4 @@
1
+ import { assertFiltersExecutable } from '@svadmin/core/provider-filters';
1
2
  import { definedOptions } from '@svadmin/core/options';
2
3
  import { decodeBaseRecord, decodeOneResult, decodeManyResult, withValidatedResponses, type DataTransport } from '@svadmin/core/schema';
3
4
  import type {
@@ -146,6 +147,7 @@ function buildGroqFilterNode(filter: Filter, context: GroqFilterContext): string
146
147
 
147
148
  function buildGroqFilters(filters?: Filter[]): GroqFilterResult {
148
149
  if (!filters?.length) return { expression: '', params: {} };
150
+ assertFiltersExecutable('sanity', filters);
149
151
  const context: GroqFilterContext = { nextParam: 0, params: {} };
150
152
  const expression = filters.map(filter => buildGroqFilterNode(filter, context)).join(' && ');
151
153
  return { expression, params: context.params };