@taicode/common-server 3.7.8 → 3.7.11
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/output/schema/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare function queryParamsSchema<F extends ZodType, E extends ZodEnum>(
|
|
|
19
19
|
ASC: "ASC";
|
|
20
20
|
DESC: "DESC";
|
|
21
21
|
}>;
|
|
22
|
-
}, z.core.$strip>> | z.ZodUndefined
|
|
22
|
+
}, z.core.$strip>> | z.ZodOptional<z.ZodUndefined>;
|
|
23
23
|
}, z.core.$strip>;
|
|
24
24
|
/**
|
|
25
25
|
* 查询结果 Schema
|
|
@@ -56,7 +56,7 @@ export declare function listResultSchema<T extends ZodType>(t: T): z.ZodObject<{
|
|
|
56
56
|
*/
|
|
57
57
|
export declare function rangeQueryParamsSchema<F extends ZodType, E extends ZodEnum>(f: F, e?: E): z.ZodObject<{
|
|
58
58
|
filter: F;
|
|
59
|
-
sort: z.ZodUndefined | z.ZodArray<z.ZodObject<{
|
|
59
|
+
sort: z.ZodOptional<z.ZodUndefined> | z.ZodArray<z.ZodObject<{
|
|
60
60
|
key: E;
|
|
61
61
|
order: z.ZodEnum<{
|
|
62
62
|
ASC: "ASC";
|
|
@@ -117,7 +117,7 @@ export declare function fuzzQueryParamsSchema<F extends ZodType, E extends ZodEn
|
|
|
117
117
|
size: z.ZodNumber;
|
|
118
118
|
index: z.ZodNumber;
|
|
119
119
|
}, z.core.$strip>;
|
|
120
|
-
sort: z.ZodUndefined | z.ZodArray<z.ZodObject<{
|
|
120
|
+
sort: z.ZodOptional<z.ZodUndefined> | z.ZodArray<z.ZodObject<{
|
|
121
121
|
key: E;
|
|
122
122
|
order: z.ZodEnum<{
|
|
123
123
|
ASC: "ASC";
|
package/output/schema/index.js
CHANGED
|
@@ -33,7 +33,7 @@ export function queryParamsSchema(f, e) {
|
|
|
33
33
|
return z.object({
|
|
34
34
|
filter: f.describe('过滤条件'),
|
|
35
35
|
paging: _pagingSchema().describe('分页参数'),
|
|
36
|
-
sort: e ? _sortSchema(e).describe('排序条件') : z.undefined(),
|
|
36
|
+
sort: e ? _sortSchema(e).describe('排序条件') : z.undefined().optional().describe('排序条件'),
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
@@ -78,7 +78,7 @@ export function listResultSchema(t) {
|
|
|
78
78
|
export function rangeQueryParamsSchema(f, e) {
|
|
79
79
|
return z.object({
|
|
80
80
|
filter: f.describe('过滤条件'),
|
|
81
|
-
sort: e ? _sortSchema(e).describe('排序条件') : z.undefined(),
|
|
81
|
+
sort: e ? _sortSchema(e).describe('排序条件') : z.undefined().optional().describe('排序条件'),
|
|
82
82
|
range: z.tuple([z.iso.datetime(), z.iso.datetime()]).describe('时间范围,格式为 [开始时间, 结束时间]'),
|
|
83
83
|
});
|
|
84
84
|
}
|
|
@@ -131,7 +131,7 @@ export function fuzzQueryParamsSchema(f, e) {
|
|
|
131
131
|
return z.object({
|
|
132
132
|
filter: f.describe('模糊搜索关键词,长度1-50字符'),
|
|
133
133
|
paging: _pagingSchema().describe('分页参数'),
|
|
134
|
-
sort: e ? _sortSchema(e).describe('排序条件') : z.undefined(),
|
|
134
|
+
sort: e ? _sortSchema(e).describe('排序条件') : z.undefined().optional().describe('排序条件'),
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
137
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taicode/common-server",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.11",
|
|
4
4
|
"author": "Alain",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"description": "",
|
|
@@ -27,18 +27,21 @@
|
|
|
27
27
|
"fastify": "^5.5.0",
|
|
28
28
|
"redis": "^5.11.0",
|
|
29
29
|
"zod": "^4.1.0",
|
|
30
|
-
"@taicode/common-base": "^3.7.
|
|
30
|
+
"@taicode/common-base": "^3.7.11"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "^22.19.13",
|
|
34
34
|
"fastify": "^5.7.4",
|
|
35
35
|
"redis": "^5.11.0",
|
|
36
36
|
"vitest": "^3.2.4",
|
|
37
|
-
"zod": "^4.3.6"
|
|
37
|
+
"zod": "^4.3.6",
|
|
38
|
+
"@taicode/common-base": "^3.7.11"
|
|
38
39
|
},
|
|
39
40
|
"scripts": {
|
|
40
41
|
"test": "vitest run",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
42
|
+
"test:ci": "vitest run",
|
|
43
|
+
"typecheck": "tsc --noEmit",
|
|
44
|
+
"build": "tsc -p tsconfig.json",
|
|
45
|
+
"dev": "tsc -p tsconfig.json --watch"
|
|
43
46
|
}
|
|
44
47
|
}
|