@feathersjs/typebox 5.0.10 → 5.0.12
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/CHANGELOG.md +12 -0
- package/lib/index.d.ts +12 -12
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/package.json +6 -6
- package/src/index.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [5.0.12](https://github.com/feathersjs/feathers/compare/v5.0.11...v5.0.12) (2023-11-28)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **schema:** Allow $in and $nin queries to work for arrays ([#3352](https://github.com/feathersjs/feathers/issues/3352)) ([677c214](https://github.com/feathersjs/feathers/commit/677c214a353a7f9a1f90649b9bbec4d0d6517a6f))
|
|
11
|
+
|
|
12
|
+
## [5.0.11](https://github.com/feathersjs/feathers/compare/v5.0.10...v5.0.11) (2023-10-11)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- **knex:** Update all dependencies and Knex peer ([#3308](https://github.com/feathersjs/feathers/issues/3308)) ([d2f9860](https://github.com/feathersjs/feathers/commit/d2f986036c4741cce2339d8abbcc6b2eb037a12a))
|
|
17
|
+
|
|
6
18
|
## [5.0.10](https://github.com/feathersjs/feathers/compare/v5.0.9...v5.0.10) (2023-10-03)
|
|
7
19
|
|
|
8
20
|
### Bug Fixes
|
package/lib/index.d.ts
CHANGED
|
@@ -57,8 +57,8 @@ export declare const queryProperty: <T extends TSchema, X extends {
|
|
|
57
57
|
$lt: T;
|
|
58
58
|
$lte: T;
|
|
59
59
|
$ne: T;
|
|
60
|
-
$in: import("@sinclair/typebox").TArray<T>;
|
|
61
|
-
$nin: import("@sinclair/typebox").TArray<T>;
|
|
60
|
+
$in: T | import("@sinclair/typebox").TArray<T>;
|
|
61
|
+
$nin: T | import("@sinclair/typebox").TArray<T>;
|
|
62
62
|
}>, TObject<X>]>>]>>;
|
|
63
63
|
/**
|
|
64
64
|
* Creates a Feathers query syntax schema for the properties defined in `definition`.
|
|
@@ -75,8 +75,8 @@ export declare const queryProperties: <T extends TObject<import("@sinclair/typeb
|
|
|
75
75
|
$lt: T["properties"][K_1];
|
|
76
76
|
$lte: T["properties"][K_1];
|
|
77
77
|
$ne: T["properties"][K_1];
|
|
78
|
-
$in: import("@sinclair/typebox").TArray<T["properties"][K_1]>;
|
|
79
|
-
$nin: import("@sinclair/typebox").TArray<T["properties"][K_1]>;
|
|
78
|
+
$in: T["properties"][K_1] | import("@sinclair/typebox").TArray<T["properties"][K_1]>;
|
|
79
|
+
$nin: T["properties"][K_1] | import("@sinclair/typebox").TArray<T["properties"][K_1]>;
|
|
80
80
|
}>, TObject<X[K_1]>]>>]>>; }>>;
|
|
81
81
|
/**
|
|
82
82
|
* Creates a TypeBox schema for the complete Feathers query syntax including `$limit`, $skip`, `$or`
|
|
@@ -100,8 +100,8 @@ export declare const querySyntax: <T extends TObject<import("@sinclair/typebox")
|
|
|
100
100
|
$lt: T["properties"][K_2];
|
|
101
101
|
$lte: T["properties"][K_2];
|
|
102
102
|
$ne: T["properties"][K_2];
|
|
103
|
-
$in: import("@sinclair/typebox").TArray<T["properties"][K_2]>;
|
|
104
|
-
$nin: import("@sinclair/typebox").TArray<T["properties"][K_2]>;
|
|
103
|
+
$in: T["properties"][K_2] | import("@sinclair/typebox").TArray<T["properties"][K_2]>;
|
|
104
|
+
$nin: T["properties"][K_2] | import("@sinclair/typebox").TArray<T["properties"][K_2]>;
|
|
105
105
|
}>, TObject<X[K_2]>]>>]>>; }>>, TObject<{
|
|
106
106
|
$or: import("@sinclair/typebox").TArray<TOptional<TObject<{ [K_2 in keyof T["properties"]]: TOptional<TUnion<[T["properties"][K_2], import("@sinclair/typebox").TPartial<TIntersect<[TObject<{
|
|
107
107
|
$gt: T["properties"][K_2];
|
|
@@ -109,8 +109,8 @@ export declare const querySyntax: <T extends TObject<import("@sinclair/typebox")
|
|
|
109
109
|
$lt: T["properties"][K_2];
|
|
110
110
|
$lte: T["properties"][K_2];
|
|
111
111
|
$ne: T["properties"][K_2];
|
|
112
|
-
$in: import("@sinclair/typebox").TArray<T["properties"][K_2]>;
|
|
113
|
-
$nin: import("@sinclair/typebox").TArray<T["properties"][K_2]>;
|
|
112
|
+
$in: T["properties"][K_2] | import("@sinclair/typebox").TArray<T["properties"][K_2]>;
|
|
113
|
+
$nin: T["properties"][K_2] | import("@sinclair/typebox").TArray<T["properties"][K_2]>;
|
|
114
114
|
}>, TObject<X[K_2]>]>>]>>; }>>>;
|
|
115
115
|
}>]>>;
|
|
116
116
|
$or: import("@sinclair/typebox").TArray<TOptional<TObject<{ [K_2 in keyof T["properties"]]: TOptional<TUnion<[T["properties"][K_2], import("@sinclair/typebox").TPartial<TIntersect<[TObject<{
|
|
@@ -119,8 +119,8 @@ export declare const querySyntax: <T extends TObject<import("@sinclair/typebox")
|
|
|
119
119
|
$lt: T["properties"][K_2];
|
|
120
120
|
$lte: T["properties"][K_2];
|
|
121
121
|
$ne: T["properties"][K_2];
|
|
122
|
-
$in: import("@sinclair/typebox").TArray<T["properties"][K_2]>;
|
|
123
|
-
$nin: import("@sinclair/typebox").TArray<T["properties"][K_2]>;
|
|
122
|
+
$in: T["properties"][K_2] | import("@sinclair/typebox").TArray<T["properties"][K_2]>;
|
|
123
|
+
$nin: T["properties"][K_2] | import("@sinclair/typebox").TArray<T["properties"][K_2]>;
|
|
124
124
|
}>, TObject<X[K_2]>]>>]>>; }>>>;
|
|
125
125
|
}>>, TOptional<TObject<{ [K_2 in keyof T["properties"]]: TOptional<TUnion<[T["properties"][K_2], import("@sinclair/typebox").TPartial<TIntersect<[TObject<{
|
|
126
126
|
$gt: T["properties"][K_2];
|
|
@@ -128,7 +128,7 @@ export declare const querySyntax: <T extends TObject<import("@sinclair/typebox")
|
|
|
128
128
|
$lt: T["properties"][K_2];
|
|
129
129
|
$lte: T["properties"][K_2];
|
|
130
130
|
$ne: T["properties"][K_2];
|
|
131
|
-
$in: import("@sinclair/typebox").TArray<T["properties"][K_2]>;
|
|
132
|
-
$nin: import("@sinclair/typebox").TArray<T["properties"][K_2]>;
|
|
131
|
+
$in: T["properties"][K_2] | import("@sinclair/typebox").TArray<T["properties"][K_2]>;
|
|
132
|
+
$nin: T["properties"][K_2] | import("@sinclair/typebox").TArray<T["properties"][K_2]>;
|
|
133
133
|
}>, TObject<X[K_2]>]>>]>>; }>>]>;
|
|
134
134
|
export declare const ObjectIdSchema: () => TUnion<[import("@sinclair/typebox").TString<string>, TObject<{}>]>;
|
package/lib/index.js
CHANGED
|
@@ -92,8 +92,8 @@ const queryProperty = (def, extension = {}) => typebox_1.Type.Optional(typebox_1
|
|
|
92
92
|
$lt: def,
|
|
93
93
|
$lte: def,
|
|
94
94
|
$ne: def,
|
|
95
|
-
$in: typebox_1.Type.Array(def),
|
|
96
|
-
$nin: typebox_1.Type.Array(def)
|
|
95
|
+
$in: def.type === 'array' ? def : typebox_1.Type.Array(def),
|
|
96
|
+
$nin: def.type === 'array' ? def : typebox_1.Type.Array(def)
|
|
97
97
|
}),
|
|
98
98
|
typebox_1.Type.Object(extension)
|
|
99
99
|
], { additionalProperties: false }))
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAS0B;AAC1B,+CAAiF;AAEjF,oDAAiC;AACjC,oDAAiC;AAQjC;;;;;;GAMG;AACI,MAAM,YAAY,GAAG,CAC1B,MAAgD,EAChD,SAAc,EACG,EAAE,CAAC,mBAAU,CAAC,YAAY,CAAC,MAAa,EAAE,SAAS,CAAC,CAAA;AAH1D,QAAA,YAAY,gBAG8C;AAEvE;;;;;;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"5.0.
|
|
4
|
+
"version": "5.0.12",
|
|
5
5
|
"homepage": "https://feathersjs.com",
|
|
6
6
|
"main": "lib/",
|
|
7
7
|
"types": "lib/",
|
|
@@ -54,15 +54,15 @@
|
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@feathersjs/schema": "^5.0.
|
|
57
|
+
"@feathersjs/schema": "^5.0.12",
|
|
58
58
|
"@sinclair/typebox": "^0.25.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@types/mocha": "^10.0.
|
|
62
|
-
"@types/node": "^20.
|
|
61
|
+
"@types/mocha": "^10.0.6",
|
|
62
|
+
"@types/node": "^20.10.0",
|
|
63
63
|
"mocha": "^10.2.0",
|
|
64
64
|
"shx": "^0.3.4",
|
|
65
|
-
"typescript": "^5.
|
|
65
|
+
"typescript": "^5.3.2"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "9e0aadcee4f6ad45d4b364b7fa6f6caf6c7ed419"
|
|
68
68
|
}
|
package/src/index.ts
CHANGED
|
@@ -110,8 +110,8 @@ export const queryProperty = <T extends TSchema, X extends { [key: string]: TSch
|
|
|
110
110
|
$lt: def,
|
|
111
111
|
$lte: def,
|
|
112
112
|
$ne: def,
|
|
113
|
-
$in: Type.Array(def),
|
|
114
|
-
$nin: Type.Array(def)
|
|
113
|
+
$in: def.type === 'array' ? def : Type.Array(def),
|
|
114
|
+
$nin: def.type === 'array' ? def : Type.Array(def)
|
|
115
115
|
}),
|
|
116
116
|
Type.Object(extension)
|
|
117
117
|
],
|