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.
@@ -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
- "testVonaPostContent.content": string;
19
- "testVonaPostContent.postId": import("table-identity").TableIdentity;
20
- "testVonaPostContent.id": import("table-identity").TableIdentity;
21
- "testVonaPostContent.createdAt": Date;
22
- "testVonaPostContent.updatedAt": Date;
23
- "testVonaPostContent.deleted": boolean;
24
- "testVonaPostContent.iid": number;
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
- "testVonaUser.name": string;
36
- "testVonaUser.age"?: number | undefined;
37
- "testVonaUser.scores"?: number | undefined;
38
- "testVonaUser.id": import("table-identity").TableIdentity;
39
- "testVonaUser.createdAt": Date;
40
- "testVonaUser.updatedAt": Date;
41
- "testVonaUser.deleted": boolean;
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.content" | "testVonaPostContent.postId" | "testVonaPostContent.id" | "testVonaPostContent.createdAt" | "testVonaPostContent.updatedAt" | "testVonaPostContent.deleted" | "testVonaPostContent.iid";
58
- user: "testVonaUser.name" | "testVonaUser.age" | "testVonaUser.scores" | "testVonaUser.id" | "testVonaUser.createdAt" | "testVonaUser.updatedAt" | "testVonaUser.deleted" | "testVonaUser.iid";
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.content" | "testVonaPostContent.postId" | "testVonaPostContent.id" | "testVonaPostContent.createdAt" | "testVonaPostContent.updatedAt" | "testVonaPostContent.deleted" | "testVonaPostContent.iid";
62
- user: "testVonaUser.name" | "testVonaUser.age" | "testVonaUser.scores" | "testVonaUser.id" | "testVonaUser.createdAt" | "testVonaUser.updatedAt" | "testVonaUser.deleted" | "testVonaUser.iid";
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, $getUserName } from 'vona-module-a-user';
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($getUserName(user), 'admin');
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.db.commit(() => {
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.db.commit(() => {
2691
+ this.ctx.commit(() => {
2692
2692
  assert.equal(cast(this.ctx)._tail_test, 3);
2693
2693
  });
2694
2694
  cast(this.ctx)._tail_test = 3;
@@ -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
- "testVonaPostContent.content": string;
15
- "testVonaPostContent.postId": TableIdentity;
16
- "testVonaPostContent.id": TableIdentity;
17
- "testVonaPostContent.createdAt": Date;
18
- "testVonaPostContent.updatedAt": Date;
19
- "testVonaPostContent.deleted": boolean;
20
- "testVonaPostContent.iid": number;
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
- "testVonaUser.name": string;
32
- "testVonaUser.age"?: number | undefined;
33
- "testVonaUser.scores"?: number | undefined;
34
- "testVonaUser.id": TableIdentity;
35
- "testVonaUser.createdAt": Date;
36
- "testVonaUser.updatedAt": Date;
37
- "testVonaUser.deleted": boolean;
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.content" | "testVonaPostContent.postId" | "testVonaPostContent.id" | "testVonaPostContent.createdAt" | "testVonaPostContent.updatedAt" | "testVonaPostContent.deleted" | "testVonaPostContent.iid";
54
- user: "testVonaUser.name" | "testVonaUser.age" | "testVonaUser.scores" | "testVonaUser.id" | "testVonaUser.createdAt" | "testVonaUser.updatedAt" | "testVonaUser.deleted" | "testVonaUser.iid";
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.content" | "testVonaPostContent.postId" | "testVonaPostContent.id" | "testVonaPostContent.createdAt" | "testVonaPostContent.updatedAt" | "testVonaPostContent.deleted" | "testVonaPostContent.iid";
58
- user: "testVonaUser.name" | "testVonaUser.age" | "testVonaUser.scores" | "testVonaUser.id" | "testVonaUser.createdAt" | "testVonaUser.updatedAt" | "testVonaUser.deleted" | "testVonaUser.iid";
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-module-test-vona",
3
3
  "type": "module",
4
- "version": "5.0.50",
4
+ "version": "5.0.51",
5
5
  "title": "test-vona",
6
6
  "vonaModule": {
7
7
  "fileVersion": 1,
@@ -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 { $getUserName, Passport } from 'vona-module-a-user';
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($getUserName(user), 'admin');
20
+ assert.equal(user.name, 'admin');
21
21
  return { name, user };
22
22
  }
23
23
 
@@ -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.db.commit(() => {
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.db.commit(() => {
23
+ this.ctx.commit(() => {
24
24
  assert.equal(cast(this.ctx)._tail_test, 3);
25
25
  });
26
26
  cast(this.ctx)._tail_test = 3;