vona-module-test-vona 5.0.50 → 5.0.51
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 +1 -0
- package/dist/controller/post.d.ts +19 -19
- package/dist/index.js +4 -4
- package/dist/service/post.d.ts +19 -19
- package/package.json +1 -1
- package/src/.metadata/index.ts +1 -0
- package/src/controller/passport.ts +2 -2
- package/src/controller/tail.ts +2 -2
|
@@ -1482,6 +1482,7 @@ declare module 'vona-module-a-web' {
|
|
|
1482
1482
|
'//echo': undefined;
|
|
1483
1483
|
'/test/vona/onion/echo2/:userId/:userName': undefined;
|
|
1484
1484
|
'/test/vona/onion/echo4': undefined;
|
|
1485
|
+
'/test/vona/order/create': undefined;
|
|
1485
1486
|
'/test/vona/passport/login': undefined;
|
|
1486
1487
|
'/test/vona/passport/refresh': undefined;
|
|
1487
1488
|
'/test/vona/passport/logout': undefined;
|
|
@@ -15,13 +15,14 @@ export declare class ControllerPost extends BeanBase {
|
|
|
15
15
|
distinct?: boolean | keyof import("vona-module-test-vona").EntityPost | (keyof import("vona-module-test-vona").EntityPost)[] | undefined;
|
|
16
16
|
columns?: "title" | "id" | "iid" | "createdAt" | "updatedAt" | "deleted" | "*" | "userId" | "stars" | ("title" | "id" | "iid" | "createdAt" | "updatedAt" | "deleted" | "*" | "userId" | "stars")[] | undefined;
|
|
17
17
|
where?: import("vona-module-a-orm").TypeModelWhereInner<{
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
18
|
+
"testVonaUser.name": string;
|
|
19
|
+
"testVonaUser.age"?: number | undefined;
|
|
20
|
+
"testVonaUser.scores"?: number | undefined;
|
|
21
|
+
"testVonaUser.id": import("table-identity").TableIdentity;
|
|
22
|
+
"testVonaUser.createdAt": Date;
|
|
23
|
+
"testVonaUser.updatedAt": Date;
|
|
24
|
+
"testVonaUser.deleted": boolean;
|
|
25
|
+
"testVonaUser.iid": number;
|
|
25
26
|
} & {
|
|
26
27
|
"testVonaPost.title": string;
|
|
27
28
|
"testVonaPost.userId": import("table-identity").TableIdentity;
|
|
@@ -32,14 +33,13 @@ export declare class ControllerPost extends BeanBase {
|
|
|
32
33
|
"testVonaPost.deleted": boolean;
|
|
33
34
|
"testVonaPost.iid": number;
|
|
34
35
|
} & import("vona-module-test-vona").EntityPost> | import("vona-module-a-orm").TypeModelWhereInner<{
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"testVonaUser.iid": number;
|
|
36
|
+
"testVonaPostContent.content": string;
|
|
37
|
+
"testVonaPostContent.postId": import("table-identity").TableIdentity;
|
|
38
|
+
"testVonaPostContent.id": import("table-identity").TableIdentity;
|
|
39
|
+
"testVonaPostContent.createdAt": Date;
|
|
40
|
+
"testVonaPostContent.updatedAt": Date;
|
|
41
|
+
"testVonaPostContent.deleted": boolean;
|
|
42
|
+
"testVonaPostContent.iid": number;
|
|
43
43
|
} & {
|
|
44
44
|
"testVonaPost.title": string;
|
|
45
45
|
"testVonaPost.userId": import("table-identity").TableIdentity;
|
|
@@ -54,12 +54,12 @@ export declare class ControllerPost extends BeanBase {
|
|
|
54
54
|
postContent: "testVonaPostContent";
|
|
55
55
|
user: "testVonaUser";
|
|
56
56
|
}>, import("vona-module-a-orm").TypeEntityTableColumnNamesOfModelSelf<ModelPost> | import("vona").TypeRecordValues<{
|
|
57
|
-
postContent: "testVonaPostContent.
|
|
58
|
-
user: "testVonaUser.name" | "testVonaUser.
|
|
57
|
+
postContent: "testVonaPostContent.id" | "testVonaPostContent.content" | "testVonaPostContent.iid" | "testVonaPostContent.createdAt" | "testVonaPostContent.updatedAt" | "testVonaPostContent.deleted" | "testVonaPostContent.postId";
|
|
58
|
+
user: "testVonaUser.name" | "testVonaUser.id" | "testVonaUser.iid" | "testVonaUser.createdAt" | "testVonaUser.updatedAt" | "testVonaUser.deleted" | "testVonaUser.age" | "testVonaUser.scores";
|
|
59
59
|
}>>[] | undefined;
|
|
60
60
|
orders?: import("vona-module-a-orm").IModelSelectParamsOrder<import("vona-module-a-orm").TypeEntityTableColumnNamesOfModelSelf<ModelPost> | import("vona").TypeRecordValues<{
|
|
61
|
-
postContent: "testVonaPostContent.
|
|
62
|
-
user: "testVonaUser.name" | "testVonaUser.
|
|
61
|
+
postContent: "testVonaPostContent.id" | "testVonaPostContent.content" | "testVonaPostContent.iid" | "testVonaPostContent.createdAt" | "testVonaPostContent.updatedAt" | "testVonaPostContent.deleted" | "testVonaPostContent.postId";
|
|
62
|
+
user: "testVonaUser.name" | "testVonaUser.id" | "testVonaUser.iid" | "testVonaUser.createdAt" | "testVonaUser.updatedAt" | "testVonaUser.deleted" | "testVonaUser.age" | "testVonaUser.scores";
|
|
63
63
|
}>>[] | undefined;
|
|
64
64
|
limit?: number;
|
|
65
65
|
offset?: number;
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { Queue, BeanQueueBase } from 'vona-module-a-queue';
|
|
|
15
15
|
import { Schedule } from 'vona-module-a-schedule';
|
|
16
16
|
import { SummerCache, BeanSummerCacheBase } from 'vona-module-a-summer';
|
|
17
17
|
import { Dto, Controller, Web, Arg } from 'vona-module-a-web';
|
|
18
|
-
import { Passport
|
|
18
|
+
import { Passport } from 'vona-module-a-user';
|
|
19
19
|
import { sleep } from '@cabloy/utils';
|
|
20
20
|
import { Captcha } from 'vona-module-a-captcha';
|
|
21
21
|
import { Core } from 'vona-module-a-core';
|
|
@@ -2429,7 +2429,7 @@ let ControllerPassport = (_dec$8 = Controller({
|
|
|
2429
2429
|
}, _dec21$1 = Reflect.metadata("design:type", Function), _dec22$1 = Reflect.metadata("design:paramtypes", [String]), _dec23$1 = Web.post('logout'), _dec24$1 = Reflect.metadata("design:type", Function), _dec25$1 = Reflect.metadata("design:paramtypes", []), _dec$8(_class$8 = _dec2$8(_class$8 = _dec3$7(_class$8 = (_class2$7 = class ControllerPassport extends BeanBase {
|
|
2430
2430
|
echo(name, user) {
|
|
2431
2431
|
assert.equal(name, 'admin');
|
|
2432
|
-
assert.equal(
|
|
2432
|
+
assert.equal(user.name, 'admin');
|
|
2433
2433
|
return {
|
|
2434
2434
|
name,
|
|
2435
2435
|
user
|
|
@@ -2685,10 +2685,10 @@ let ControllerTail = (_dec$3 = Controller({
|
|
|
2685
2685
|
cast(this.ctx)._tail_test = 1;
|
|
2686
2686
|
|
|
2687
2687
|
// tail
|
|
2688
|
-
this.ctx.
|
|
2688
|
+
this.ctx.commit(() => {
|
|
2689
2689
|
assert.equal(cast(this.ctx)._tail_test_als_caller, undefined);
|
|
2690
2690
|
assert.equal(cast(this.ctx)._tail_test, 2);
|
|
2691
|
-
this.ctx.
|
|
2691
|
+
this.ctx.commit(() => {
|
|
2692
2692
|
assert.equal(cast(this.ctx)._tail_test, 3);
|
|
2693
2693
|
});
|
|
2694
2694
|
cast(this.ctx)._tail_test = 3;
|
package/dist/service/post.d.ts
CHANGED
|
@@ -11,13 +11,14 @@ export declare class ServicePost extends BeanBase {
|
|
|
11
11
|
distinct?: boolean | keyof import("vona-module-test-vona").EntityPost | (keyof import("vona-module-test-vona").EntityPost)[] | undefined;
|
|
12
12
|
columns?: "title" | "id" | "iid" | "createdAt" | "updatedAt" | "deleted" | "*" | "userId" | "stars" | ("title" | "id" | "iid" | "createdAt" | "updatedAt" | "deleted" | "*" | "userId" | "stars")[] | undefined;
|
|
13
13
|
where?: import("vona-module-a-orm").TypeModelWhereInner<{
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
14
|
+
"testVonaUser.name": string;
|
|
15
|
+
"testVonaUser.age"?: number | undefined;
|
|
16
|
+
"testVonaUser.scores"?: number | undefined;
|
|
17
|
+
"testVonaUser.id": TableIdentity;
|
|
18
|
+
"testVonaUser.createdAt": Date;
|
|
19
|
+
"testVonaUser.updatedAt": Date;
|
|
20
|
+
"testVonaUser.deleted": boolean;
|
|
21
|
+
"testVonaUser.iid": number;
|
|
21
22
|
} & {
|
|
22
23
|
"testVonaPost.title": string;
|
|
23
24
|
"testVonaPost.userId": TableIdentity;
|
|
@@ -28,14 +29,13 @@ export declare class ServicePost extends BeanBase {
|
|
|
28
29
|
"testVonaPost.deleted": boolean;
|
|
29
30
|
"testVonaPost.iid": number;
|
|
30
31
|
} & import("vona-module-test-vona").EntityPost> | import("vona-module-a-orm").TypeModelWhereInner<{
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"testVonaUser.iid": number;
|
|
32
|
+
"testVonaPostContent.content": string;
|
|
33
|
+
"testVonaPostContent.postId": TableIdentity;
|
|
34
|
+
"testVonaPostContent.id": TableIdentity;
|
|
35
|
+
"testVonaPostContent.createdAt": Date;
|
|
36
|
+
"testVonaPostContent.updatedAt": Date;
|
|
37
|
+
"testVonaPostContent.deleted": boolean;
|
|
38
|
+
"testVonaPostContent.iid": number;
|
|
39
39
|
} & {
|
|
40
40
|
"testVonaPost.title": string;
|
|
41
41
|
"testVonaPost.userId": TableIdentity;
|
|
@@ -50,12 +50,12 @@ export declare class ServicePost extends BeanBase {
|
|
|
50
50
|
postContent: "testVonaPostContent";
|
|
51
51
|
user: "testVonaUser";
|
|
52
52
|
}>, import("vona-module-a-orm").TypeEntityTableColumnNamesOfModelSelf<ModelPost> | import("vona").TypeRecordValues<{
|
|
53
|
-
postContent: "testVonaPostContent.
|
|
54
|
-
user: "testVonaUser.name" | "testVonaUser.
|
|
53
|
+
postContent: "testVonaPostContent.id" | "testVonaPostContent.content" | "testVonaPostContent.iid" | "testVonaPostContent.createdAt" | "testVonaPostContent.updatedAt" | "testVonaPostContent.deleted" | "testVonaPostContent.postId";
|
|
54
|
+
user: "testVonaUser.name" | "testVonaUser.id" | "testVonaUser.iid" | "testVonaUser.createdAt" | "testVonaUser.updatedAt" | "testVonaUser.deleted" | "testVonaUser.age" | "testVonaUser.scores";
|
|
55
55
|
}>>[] | undefined;
|
|
56
56
|
orders?: import("vona-module-a-orm").IModelSelectParamsOrder<import("vona-module-a-orm").TypeEntityTableColumnNamesOfModelSelf<ModelPost> | import("vona").TypeRecordValues<{
|
|
57
|
-
postContent: "testVonaPostContent.
|
|
58
|
-
user: "testVonaUser.name" | "testVonaUser.
|
|
57
|
+
postContent: "testVonaPostContent.id" | "testVonaPostContent.content" | "testVonaPostContent.iid" | "testVonaPostContent.createdAt" | "testVonaPostContent.updatedAt" | "testVonaPostContent.deleted" | "testVonaPostContent.postId";
|
|
58
|
+
user: "testVonaUser.name" | "testVonaUser.id" | "testVonaUser.iid" | "testVonaUser.createdAt" | "testVonaUser.updatedAt" | "testVonaUser.deleted" | "testVonaUser.age" | "testVonaUser.scores";
|
|
59
59
|
}>>[] | undefined;
|
|
60
60
|
limit?: number;
|
|
61
61
|
offset?: number;
|
package/package.json
CHANGED
package/src/.metadata/index.ts
CHANGED
|
@@ -1815,6 +1815,7 @@ export interface IApiPathPostRecord{
|
|
|
1815
1815
|
'//echo': undefined;
|
|
1816
1816
|
'/test/vona/onion/echo2/:userId/:userName': undefined;
|
|
1817
1817
|
'/test/vona/onion/echo4': undefined;
|
|
1818
|
+
'/test/vona/order/create': undefined;
|
|
1818
1819
|
'/test/vona/passport/login': undefined;
|
|
1819
1820
|
'/test/vona/passport/refresh': undefined;
|
|
1820
1821
|
'/test/vona/passport/logout': undefined;
|
|
@@ -5,7 +5,7 @@ import assert from 'node:assert';
|
|
|
5
5
|
import { BeanBase } from 'vona';
|
|
6
6
|
import { DtoJwtToken } from 'vona-module-a-jwt';
|
|
7
7
|
import { Api, v } from 'vona-module-a-openapi';
|
|
8
|
-
import {
|
|
8
|
+
import { Passport } from 'vona-module-a-user';
|
|
9
9
|
import { Arg, Controller, Web } from 'vona-module-a-web';
|
|
10
10
|
|
|
11
11
|
export interface IControllerOptionsPassport extends IDecoratorControllerOptions {}
|
|
@@ -17,7 +17,7 @@ export class ControllerPassport extends BeanBase {
|
|
|
17
17
|
@Passport.public()
|
|
18
18
|
echo(@Arg.param('name') name: string, @Arg.user() user: IUserBase) {
|
|
19
19
|
assert.equal(name, 'admin');
|
|
20
|
-
assert.equal(
|
|
20
|
+
assert.equal(user.name, 'admin');
|
|
21
21
|
return { name, user };
|
|
22
22
|
}
|
|
23
23
|
|
package/src/controller/tail.ts
CHANGED
|
@@ -17,10 +17,10 @@ export class ControllerTail extends BeanBase {
|
|
|
17
17
|
cast(this.ctx)._tail_test = 1;
|
|
18
18
|
|
|
19
19
|
// tail
|
|
20
|
-
this.ctx.
|
|
20
|
+
this.ctx.commit(() => {
|
|
21
21
|
assert.equal(cast(this.ctx)._tail_test_als_caller, undefined);
|
|
22
22
|
assert.equal(cast(this.ctx)._tail_test, 2);
|
|
23
|
-
this.ctx.
|
|
23
|
+
this.ctx.commit(() => {
|
|
24
24
|
assert.equal(cast(this.ctx)._tail_test, 3);
|
|
25
25
|
});
|
|
26
26
|
cast(this.ctx)._tail_test = 3;
|