@svadmin/elysia 0.10.3 → 0.10.5

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/elysia",
3
- "version": "0.10.3",
3
+ "version": "0.10.5",
4
4
  "description": "Elysia DataProvider for svadmin — CRUD convention + InferResourceMap type utility",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -16,7 +16,7 @@
16
16
  }
17
17
  },
18
18
  "peerDependencies": {
19
- "@svadmin/core": "^0.19.4",
19
+ "@svadmin/core": "^0.23.3",
20
20
  "elysia": ">=1.0.0",
21
21
  "@elysiajs/eden": ">=1.0.0"
22
22
  },
@@ -26,5 +26,16 @@
26
26
  "type": "git",
27
27
  "url": "https://github.com/zuohuadong/svadmin.git",
28
28
  "directory": "packages/elysia"
29
+ },
30
+ "peerDependenciesMeta": {
31
+ "@svadmin/core": {
32
+ "optional": true
33
+ },
34
+ "elysia": {
35
+ "optional": true
36
+ },
37
+ "@elysiajs/eden": {
38
+ "optional": true
39
+ }
29
40
  }
30
41
  }
@@ -127,9 +127,9 @@ export function createElysiaDataProvider(opts: ElysiaDataProviderOptions): DataP
127
127
 
128
128
  if (filters?.length) {
129
129
  for (const f of filters) {
130
- if (f.operator === 'eq') params.set(f.field, String(f.value));
131
- else if (f.operator === 'contains') params.set(`${f.field}_like`, String(f.value));
132
- else params.set(`${f.field}_${f.operator}`, String(f.value));
130
+ if ((f as any).operator === 'eq') params.set((f as any).field, String((f as any).value));
131
+ else if ((f as any).operator === 'contains') params.set(`${(f as any).field}_like`, String((f as any).value));
132
+ else params.set(`${(f as any).field}_${(f as any).operator}`, String((f as any).value));
133
133
  }
134
134
  }
135
135