vona-module-test-vona 5.0.48 → 5.0.50
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/dist/.metadata/index.d.ts +10 -1
- package/dist/controller/dtoTest.d.ts +1 -1
- package/dist/controller/order.d.ts +5 -1
- package/dist/controller/post.d.ts +10 -9
- package/dist/dto/orderCreate.d.ts +1 -1
- package/dist/dto/orderQuery.d.ts +9 -0
- package/dist/dto/orderUpdate.d.ts +1 -1
- package/dist/dto/postCreate.d.ts +1 -1
- package/dist/dto/signin.d.ts +2 -0
- package/dist/dto/user.d.ts +1 -1
- package/dist/dto/userCreate.d.ts +1 -1
- package/dist/dto/userUpdate.d.ts +1 -1
- package/dist/entity/category.d.ts +2 -1
- package/dist/entity/order.d.ts +2 -1
- package/dist/entity/post.d.ts +2 -1
- package/dist/entity/postContent.d.ts +2 -1
- package/dist/entity/product.d.ts +2 -1
- package/dist/entity/roleUser.d.ts +2 -1
- package/dist/index.js +381 -326
- package/dist/service/post.d.ts +2 -2
- package/package.json +1 -1
- package/src/.metadata/index.ts +11 -1
- package/src/config/locale/en-us.ts +1 -1
- package/src/config/locale/zh-cn.ts +1 -1
- package/src/controller/captcha.ts +2 -2
- package/src/controller/dtoTest.ts +2 -1
- package/src/controller/onion.ts +1 -1
- package/src/controller/order.ts +25 -3
- package/src/controller/post.ts +5 -4
- package/src/controller/upload.ts +4 -5
- package/src/dto/orderQuery.ts +28 -0
- package/src/dto/postQuery.ts +7 -8
- package/src/dto/signin.ts +4 -0
- package/src/dto/user.ts +1 -1
- package/src/entity/category.ts +2 -1
- package/src/entity/order.ts +2 -1
- package/src/entity/post.ts +2 -1
- package/src/entity/postContent.ts +2 -1
- package/src/entity/product.ts +2 -1
- package/src/entity/roleUser.ts +2 -1
- package/test/authSimple.test.ts +1 -0
- package/test/captcha.test.ts +49 -2
- package/test/database/dtoAggregate.test.ts +14 -11
- package/test/database/dtoGet.test.ts +10 -9
- package/test/database/dtoGroup.test.ts +15 -12
- package/test/database/dtoLazy.test.ts +1 -1
- package/test/database/dtoMutate.test.ts +10 -9
- package/test/database/dtoQuery.test.ts +3 -2
- package/test/database/modelWhere.test.ts +1 -0
- package/test/mail.test.ts +14 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TypeEntityMeta, TypeModelsClassLikeGeneral, TypeSymbolKeyFieldsMore, IModelRelationHasOne, IModelRelationBelongsTo, IModelRelationHasMany, IModelRelationBelongsToMany } from 'vona-module-a-orm';
|
|
2
2
|
import type { TypeEntityOptionsFields, TypeControllerOptionsActions } from 'vona-module-a-openapi';
|
|
3
|
+
import type { TableIdentity } from 'table-identity';
|
|
3
4
|
/** aop: begin */
|
|
4
5
|
export * from '../bean/aop.regExp.ts';
|
|
5
6
|
export * from '../bean/aop.simple.ts';
|
|
@@ -352,7 +353,7 @@ declare module 'vona' {
|
|
|
352
353
|
}
|
|
353
354
|
/** model: end */
|
|
354
355
|
/** model: begin */
|
|
355
|
-
import type { IModelGetOptions, IModelMethodOptions, IModelSelectParams,
|
|
356
|
+
import type { IModelGetOptions, IModelMethodOptions, IModelSelectParams, TypeModelSelectAndCount, TypeModelRelationResult, TypeModelWhere, IModelInsertOptions, TypeModelMutateRelationData, IModelDeleteOptions, IModelUpdateOptions, IModelMutateOptions, IModelSelectCountParams, IModelSelectAggrParams, TypeModelAggrRelationResult, IModelSelectGroupParams, TypeModelGroupRelationResult } from 'vona-module-a-orm';
|
|
356
357
|
import { SymbolKeyEntity, SymbolKeyEntityMeta, SymbolKeyModelOptions } from 'vona-module-a-orm';
|
|
357
358
|
declare module 'vona-module-test-vona' {
|
|
358
359
|
interface IModelOptionsCategory {
|
|
@@ -1114,6 +1115,7 @@ export interface IModuleSummerCache {
|
|
|
1114
1115
|
/** dto: begin */
|
|
1115
1116
|
export * from '../dto/categoryTree.ts';
|
|
1116
1117
|
export * from '../dto/orderCreate.ts';
|
|
1118
|
+
export * from '../dto/orderQuery.ts';
|
|
1117
1119
|
export * from '../dto/orderResult.ts';
|
|
1118
1120
|
export * from '../dto/orderUpdate.ts';
|
|
1119
1121
|
export * from '../dto/postCreate.ts';
|
|
@@ -1128,6 +1130,7 @@ export * from '../dto/userLazy.ts';
|
|
|
1128
1130
|
export * from '../dto/userUpdate.ts';
|
|
1129
1131
|
import type { IDtoOptionsCategoryTree } from '../dto/categoryTree.ts';
|
|
1130
1132
|
import type { IDtoOptionsOrderCreate } from '../dto/orderCreate.ts';
|
|
1133
|
+
import type { IDtoOptionsOrderQuery } from '../dto/orderQuery.ts';
|
|
1131
1134
|
import type { IDtoOptionsOrderResult } from '../dto/orderResult.ts';
|
|
1132
1135
|
import type { IDtoOptionsOrderUpdate } from '../dto/orderUpdate.ts';
|
|
1133
1136
|
import type { IDtoOptionsPostCreate } from '../dto/postCreate.ts';
|
|
@@ -1145,6 +1148,7 @@ declare module 'vona-module-a-web' {
|
|
|
1145
1148
|
interface IDtoRecord {
|
|
1146
1149
|
'test-vona:categoryTree': IDtoOptionsCategoryTree;
|
|
1147
1150
|
'test-vona:orderCreate': IDtoOptionsOrderCreate;
|
|
1151
|
+
'test-vona:orderQuery': IDtoOptionsOrderQuery;
|
|
1148
1152
|
'test-vona:orderResult': IDtoOptionsOrderResult;
|
|
1149
1153
|
'test-vona:orderUpdate': IDtoOptionsOrderUpdate;
|
|
1150
1154
|
'test-vona:postCreate': IDtoOptionsPostCreate;
|
|
@@ -1165,6 +1169,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1165
1169
|
/** dto: begin */
|
|
1166
1170
|
import type { DtoCategoryTree } from '../dto/categoryTree.ts';
|
|
1167
1171
|
import type { DtoOrderCreate } from '../dto/orderCreate.ts';
|
|
1172
|
+
import type { DtoOrderQuery } from '../dto/orderQuery.ts';
|
|
1168
1173
|
import type { DtoOrderResult } from '../dto/orderResult.ts';
|
|
1169
1174
|
import type { DtoOrderUpdate } from '../dto/orderUpdate.ts';
|
|
1170
1175
|
import type { DtoPostCreate } from '../dto/postCreate.ts';
|
|
@@ -1184,6 +1189,9 @@ declare module 'vona-module-test-vona' {
|
|
|
1184
1189
|
interface IDtoOptionsOrderCreate {
|
|
1185
1190
|
fields?: TypeEntityOptionsFields<DtoOrderCreate, IDtoOptionsOrderCreate[TypeSymbolKeyFieldsMore]>;
|
|
1186
1191
|
}
|
|
1192
|
+
interface IDtoOptionsOrderQuery {
|
|
1193
|
+
fields?: TypeEntityOptionsFields<DtoOrderQuery, IDtoOptionsOrderQuery[TypeSymbolKeyFieldsMore]>;
|
|
1194
|
+
}
|
|
1187
1195
|
interface IDtoOptionsOrderResult {
|
|
1188
1196
|
fields?: TypeEntityOptionsFields<DtoOrderResult, IDtoOptionsOrderResult[TypeSymbolKeyFieldsMore]>;
|
|
1189
1197
|
}
|
|
@@ -1460,6 +1468,7 @@ declare module 'vona-module-a-web' {
|
|
|
1460
1468
|
'/test/vona/onion/echo3/:userId': undefined;
|
|
1461
1469
|
'/test/vona/onion/echo5': undefined;
|
|
1462
1470
|
'/test/vona/onion/echo6': undefined;
|
|
1471
|
+
'/test/vona/order/findAll': undefined;
|
|
1463
1472
|
'/test/vona/passport/echo/:name': undefined;
|
|
1464
1473
|
'/test/vona/passport/isAuthenticated': undefined;
|
|
1465
1474
|
'/test/vona/post/findManyEcho': undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { TableIdentity } from 'table-identity';
|
|
1
2
|
import type { IDecoratorControllerOptions } from 'vona-module-a-web';
|
|
2
3
|
import { BeanBase } from 'vona';
|
|
3
|
-
import { TableIdentity } from 'vona-module-a-orm';
|
|
4
4
|
import { DtoUserCreate } from '../dto/userCreate.ts';
|
|
5
5
|
import { DtoUserLazy } from '../dto/userLazy.ts';
|
|
6
6
|
import { DtoUserUpdate } from '../dto/userUpdate.ts';
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import type { IQueryParams } from 'vona-module-a-orm';
|
|
1
2
|
import type { IDecoratorControllerOptions } from 'vona-module-a-web';
|
|
3
|
+
import type { ModelOrder } from '../model/order.ts';
|
|
2
4
|
import { BeanBase } from 'vona';
|
|
5
|
+
import { DtoOrderCreate } from '../dto/orderCreate.ts';
|
|
3
6
|
import { DtoOrderResult } from '../dto/orderResult.ts';
|
|
4
7
|
export interface IControllerOptionsOrder extends IDecoratorControllerOptions {
|
|
5
8
|
}
|
|
6
9
|
export declare class ControllerOrder extends BeanBase {
|
|
7
|
-
|
|
10
|
+
create(data: DtoOrderCreate): Promise<import("vona-module-a-orm").TypeModelMutateRelationData<import("vona-module-test-vona").EntityOrder, ModelOrder, import("vona-module-a-orm").IModelInsertOptions<import("vona-module-test-vona").EntityOrder, ModelOrder>, true>>;
|
|
11
|
+
findAll(params: IQueryParams<ModelOrder>): Promise<DtoOrderResult[]>;
|
|
8
12
|
}
|
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
import type { IQueryParams } from 'vona-module-a-orm';
|
|
2
|
-
import type { IDecoratorControllerOptions } from 'vona-module-a-web';
|
|
2
|
+
import type { IDecoratorControllerOptions, IPipeOptionsQueryTransformInfo } from 'vona-module-a-web';
|
|
3
3
|
import type { ModelPost } from '../model/post.ts';
|
|
4
4
|
import { BeanBase } from 'vona';
|
|
5
5
|
export interface IControllerOptionsPost extends IDecoratorControllerOptions {
|
|
6
6
|
}
|
|
7
7
|
export declare class ControllerPost extends BeanBase {
|
|
8
8
|
findManyEcho(params: IQueryParams<ModelPost>): IQueryParams<ModelPost>;
|
|
9
|
+
findManyQueryTransform(_info: IPipeOptionsQueryTransformInfo): boolean | undefined;
|
|
9
10
|
findMany(params: IQueryParams<ModelPost>): Promise<import("vona-module-a-orm").TypeModelSelectAndCount<import("vona-module-test-vona").EntityPost, ModelPost, {
|
|
10
11
|
include: {
|
|
11
12
|
postContent: true;
|
|
12
13
|
};
|
|
13
14
|
with?: Record<string, unknown>;
|
|
14
15
|
distinct?: boolean | keyof import("vona-module-test-vona").EntityPost | (keyof import("vona-module-test-vona").EntityPost)[] | undefined;
|
|
15
|
-
columns?: "
|
|
16
|
+
columns?: "title" | "id" | "iid" | "createdAt" | "updatedAt" | "deleted" | "*" | "userId" | "stars" | ("title" | "id" | "iid" | "createdAt" | "updatedAt" | "deleted" | "*" | "userId" | "stars")[] | undefined;
|
|
16
17
|
where?: import("vona-module-a-orm").TypeModelWhereInner<{
|
|
17
18
|
"testVonaPostContent.content": string;
|
|
18
|
-
"testVonaPostContent.postId": import("
|
|
19
|
-
"testVonaPostContent.id": import("
|
|
19
|
+
"testVonaPostContent.postId": import("table-identity").TableIdentity;
|
|
20
|
+
"testVonaPostContent.id": import("table-identity").TableIdentity;
|
|
20
21
|
"testVonaPostContent.createdAt": Date;
|
|
21
22
|
"testVonaPostContent.updatedAt": Date;
|
|
22
23
|
"testVonaPostContent.deleted": boolean;
|
|
23
24
|
"testVonaPostContent.iid": number;
|
|
24
25
|
} & {
|
|
25
26
|
"testVonaPost.title": string;
|
|
26
|
-
"testVonaPost.userId": import("
|
|
27
|
+
"testVonaPost.userId": import("table-identity").TableIdentity;
|
|
27
28
|
"testVonaPost.stars"?: number | undefined;
|
|
28
|
-
"testVonaPost.id": import("
|
|
29
|
+
"testVonaPost.id": import("table-identity").TableIdentity;
|
|
29
30
|
"testVonaPost.createdAt": Date;
|
|
30
31
|
"testVonaPost.updatedAt": Date;
|
|
31
32
|
"testVonaPost.deleted": boolean;
|
|
@@ -34,16 +35,16 @@ export declare class ControllerPost extends BeanBase {
|
|
|
34
35
|
"testVonaUser.name": string;
|
|
35
36
|
"testVonaUser.age"?: number | undefined;
|
|
36
37
|
"testVonaUser.scores"?: number | undefined;
|
|
37
|
-
"testVonaUser.id": import("
|
|
38
|
+
"testVonaUser.id": import("table-identity").TableIdentity;
|
|
38
39
|
"testVonaUser.createdAt": Date;
|
|
39
40
|
"testVonaUser.updatedAt": Date;
|
|
40
41
|
"testVonaUser.deleted": boolean;
|
|
41
42
|
"testVonaUser.iid": number;
|
|
42
43
|
} & {
|
|
43
44
|
"testVonaPost.title": string;
|
|
44
|
-
"testVonaPost.userId": import("
|
|
45
|
+
"testVonaPost.userId": import("table-identity").TableIdentity;
|
|
45
46
|
"testVonaPost.stars"?: number | undefined;
|
|
46
|
-
"testVonaPost.id": import("
|
|
47
|
+
"testVonaPost.id": import("table-identity").TableIdentity;
|
|
47
48
|
"testVonaPost.createdAt": Date;
|
|
48
49
|
"testVonaPost.updatedAt": Date;
|
|
49
50
|
"testVonaPost.deleted": boolean;
|
|
@@ -4,7 +4,7 @@ export interface IDtoOptionsOrderCreate extends IDecoratorDtoOptions {
|
|
|
4
4
|
}
|
|
5
5
|
declare const DtoOrderCreate_base: import("vona-core").Constructable<import("vona-module-a-orm").TypeDtoMutateResult<ModelOrder, {
|
|
6
6
|
columns: ("orderNo" | "remark")[];
|
|
7
|
-
}, "create", "
|
|
7
|
+
}, "create", "id" | "iid" | "createdAt" | "updatedAt" | "deleted", true>>;
|
|
8
8
|
export declare class DtoOrderCreate extends DtoOrderCreate_base {
|
|
9
9
|
}
|
|
10
10
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IDecoratorDtoOptions } from 'vona-module-a-web';
|
|
2
|
+
import { EntityOrder } from '../entity/order.ts';
|
|
3
|
+
export interface IDtoOptionsOrderQuery extends IDecoratorDtoOptions {
|
|
4
|
+
}
|
|
5
|
+
declare const DtoOrderQuery_base: new (...args: any[]) => import("vona-module-a-orm").DtoQueryBase & Partial<Pick<EntityOrder, "orderNo" | "remark">>;
|
|
6
|
+
export declare class DtoOrderQuery extends DtoOrderQuery_base {
|
|
7
|
+
userName?: string;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
@@ -4,7 +4,7 @@ export interface IDtoOptionsOrderUpdate extends IDecoratorDtoOptions {
|
|
|
4
4
|
}
|
|
5
5
|
declare const DtoOrderUpdate_base: import("vona-core").Constructable<import("vona-module-a-orm").TypeDtoMutateResult<ModelOrder, {
|
|
6
6
|
columns: ("orderNo" | "remark")[];
|
|
7
|
-
}, "update", "
|
|
7
|
+
}, "update", "id" | "iid" | "createdAt" | "updatedAt" | "deleted", true>>;
|
|
8
8
|
export declare class DtoOrderUpdate extends DtoOrderUpdate_base {
|
|
9
9
|
}
|
|
10
10
|
export {};
|
package/dist/dto/postCreate.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { IDecoratorDtoOptions } from 'vona-module-a-web';
|
|
|
2
2
|
import { ModelPost } from '../model/post.ts';
|
|
3
3
|
export interface IDtoOptionsPostCreate extends IDecoratorDtoOptions {
|
|
4
4
|
}
|
|
5
|
-
declare const DtoPostCreate_base: import("vona-core").Constructable<import("vona-module-a-orm").TypeDtoMutateResult<ModelPost, undefined, "create", "
|
|
5
|
+
declare const DtoPostCreate_base: import("vona-core").Constructable<import("vona-module-a-orm").TypeDtoMutateResult<ModelPost, undefined, "create", "id" | "iid" | "createdAt" | "updatedAt" | "deleted", true>>;
|
|
6
6
|
export declare class DtoPostCreate extends DtoPostCreate_base {
|
|
7
7
|
}
|
|
8
8
|
export {};
|
package/dist/dto/signin.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { DtoCaptchaVerify } from 'vona-module-a-captcha';
|
|
1
2
|
import type { IDecoratorDtoOptions } from 'vona-module-a-web';
|
|
2
3
|
export interface IDtoOptionsSignin extends IDecoratorDtoOptions {
|
|
3
4
|
}
|
|
4
5
|
export declare class DtoSignin {
|
|
5
6
|
username: string;
|
|
6
7
|
password: string;
|
|
8
|
+
captcha: DtoCaptchaVerify;
|
|
7
9
|
}
|
package/dist/dto/user.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TableIdentity } from '
|
|
1
|
+
import type { TableIdentity } from 'table-identity';
|
|
2
2
|
import type { IDecoratorDtoOptions } from 'vona-module-a-web';
|
|
3
3
|
import '../.metadata/index.ts';
|
|
4
4
|
export interface IDtoOptionsUser extends IDecoratorDtoOptions {
|
package/dist/dto/userCreate.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare const DtoUserCreate_base: import("vona-core").Constructable<import("vona
|
|
|
6
6
|
roles: true;
|
|
7
7
|
posts: true;
|
|
8
8
|
};
|
|
9
|
-
}, "create", "
|
|
9
|
+
}, "create", "id" | "iid" | "createdAt" | "updatedAt" | "deleted", true>>;
|
|
10
10
|
export declare class DtoUserCreate extends DtoUserCreate_base {
|
|
11
11
|
}
|
|
12
12
|
export {};
|
package/dist/dto/userUpdate.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare const DtoUserUpdate_base: import("vona-core").Constructable<import("vona
|
|
|
5
5
|
include: {
|
|
6
6
|
posts: true;
|
|
7
7
|
};
|
|
8
|
-
}, "update", "
|
|
8
|
+
}, "update", "id" | "iid" | "createdAt" | "updatedAt" | "deleted", true>>;
|
|
9
9
|
export declare class DtoUserUpdate extends DtoUserUpdate_base {
|
|
10
10
|
}
|
|
11
11
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TableIdentity } from 'table-identity';
|
|
2
|
+
import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
|
|
2
3
|
import { EntityBase } from 'vona-module-a-orm';
|
|
3
4
|
export interface IEntityOptionsCategory extends IDecoratorEntityOptions {
|
|
4
5
|
}
|
package/dist/entity/order.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TableIdentity } from 'table-identity';
|
|
2
|
+
import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
|
|
2
3
|
import { EntityBase } from 'vona-module-a-orm';
|
|
3
4
|
import '../.metadata/index.ts';
|
|
4
5
|
export interface IEntityOptionsOrder extends IDecoratorEntityOptions {
|
package/dist/entity/post.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TableIdentity } from 'table-identity';
|
|
2
|
+
import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
|
|
2
3
|
import { EntityBase } from 'vona-module-a-orm';
|
|
3
4
|
export interface IEntityOptionsPost extends IDecoratorEntityOptions {
|
|
4
5
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TableIdentity } from 'table-identity';
|
|
2
|
+
import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
|
|
2
3
|
import { EntityBase } from 'vona-module-a-orm';
|
|
3
4
|
export interface IEntityOptionsPostContent extends IDecoratorEntityOptions {
|
|
4
5
|
}
|
package/dist/entity/product.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TableIdentity } from 'table-identity';
|
|
2
|
+
import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
|
|
2
3
|
import { EntityBase } from 'vona-module-a-orm';
|
|
3
4
|
import '../.metadata/index.ts';
|
|
4
5
|
export interface IEntityOptionsProduct extends IDecoratorEntityOptions {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TableIdentity } from 'table-identity';
|
|
2
|
+
import type { IDecoratorEntityOptions } from 'vona-module-a-orm';
|
|
2
3
|
import { EntityBase } from 'vona-module-a-orm';
|
|
3
4
|
export interface IEntityOptionsRoleUser extends IDecoratorEntityOptions {
|
|
4
5
|
}
|