vona-module-test-vona 5.0.89 → 5.0.91
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 +9 -9
- package/dist/.metadata/locales.d.ts +1 -1
- package/dist/index.js +6 -6
- package/package.json +1 -1
- package/src/.metadata/index.ts +9 -9
- package/src/.metadata/locales.ts +3 -2
- package/src/dto/orderQuery.ts +3 -4
- package/src/dto/postQuery.ts +2 -2
- package/test/queue.test.ts +1 -1
|
@@ -126,15 +126,15 @@ export type EntityTestMeta = TypeEntityMeta<EntityTest, EntityTestTableName>;
|
|
|
126
126
|
export type EntityUserMeta = TypeEntityMeta<EntityUser, EntityUserTableName>;
|
|
127
127
|
declare module 'vona-module-a-orm' {
|
|
128
128
|
interface ITableRecord {
|
|
129
|
-
'testVonaCategory':
|
|
130
|
-
'testVonaOrder':
|
|
131
|
-
'testVonaPost':
|
|
132
|
-
'testVonaPostContent':
|
|
133
|
-
'testVonaProduct':
|
|
134
|
-
'testVonaRole':
|
|
135
|
-
'testVonaRoleUser':
|
|
136
|
-
'testVonaTest':
|
|
137
|
-
'testVonaUser':
|
|
129
|
+
'testVonaCategory': EntityCategoryMeta;
|
|
130
|
+
'testVonaOrder': EntityOrderMeta;
|
|
131
|
+
'testVonaPost': EntityPostMeta;
|
|
132
|
+
'testVonaPostContent': EntityPostContentMeta;
|
|
133
|
+
'testVonaProduct': EntityProductMeta;
|
|
134
|
+
'testVonaRole': EntityRoleMeta;
|
|
135
|
+
'testVonaRoleUser': EntityRoleUserMeta;
|
|
136
|
+
'testVonaTest': EntityTestMeta;
|
|
137
|
+
'testVonaUser': EntityUserMeta;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
declare module 'vona-module-test-vona' {
|
|
@@ -37,4 +37,4 @@ export declare const locales: {
|
|
|
37
37
|
Amount: string;
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
|
-
export declare function $locale<K extends keyof (typeof locales)[TypeLocaleBase]>(key: K):
|
|
40
|
+
export declare function $locale<K extends keyof (typeof locales)[TypeLocaleBase]>(key: K): import("vona").ILocaleMagic<`test-vona::${K}`>;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BeanInfo, BeanAopBase, BeanAopMethodBase, BeanBase, $Class, cast, retry, BeanScopeBase } from 'vona';
|
|
1
|
+
import { BeanInfo, BeanAopBase, BeanAopMethodBase, $makeLocaleMagic, BeanBase, $Class, cast, retry, BeanScopeBase } from 'vona';
|
|
2
2
|
import { Aop, AopMethod, Aspect } from 'vona-module-a-aspect';
|
|
3
3
|
import { Api, v } from 'vona-module-a-openapiutils';
|
|
4
|
-
import { Entity, EntityBase, Model, $relation, BeanModelBase, $relationDynamic, $Dto
|
|
4
|
+
import { Entity, EntityBase, Model, $relation, BeanModelBase, $relationDynamic, $Dto } from 'vona-module-a-orm';
|
|
5
5
|
import { ModelCategoryChain as ModelCategoryChain$1, ModelOrder as ModelOrder$1 } from 'vona-module-test-vona';
|
|
6
6
|
import { DateTime } from 'luxon';
|
|
7
7
|
import { Bean, Service, Scope } from 'vona-module-a-bean';
|
|
@@ -242,7 +242,7 @@ const locales = {
|
|
|
242
242
|
'zh-cn': locale_zh_cn
|
|
243
243
|
};
|
|
244
244
|
function $locale(key) {
|
|
245
|
-
return `test-vona::${key}
|
|
245
|
+
return $makeLocaleMagic(`test-vona::${key}`);
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
var _dec$1p, _dec2$1p, _dec3$D, _dec4$D, _dec5$A, _dec6$z, _dec7$t, _dec8$p, _class$1p, _class2$D, _descriptor$i, _descriptor2$f, _descriptor3$9;
|
|
@@ -1840,13 +1840,13 @@ var _dec$B, _dec2$B, _dec3$r, _dec4$r, _class$B, _class2$r, _descriptor$a;
|
|
|
1840
1840
|
let DtoOrderQuery = (_dec$B = Dto({
|
|
1841
1841
|
openapi: {
|
|
1842
1842
|
filter: {
|
|
1843
|
-
table:
|
|
1843
|
+
table: 'testVonaOrder'
|
|
1844
1844
|
}
|
|
1845
1845
|
}
|
|
1846
1846
|
}), _dec2$B = BeanInfo({
|
|
1847
1847
|
module: "test-vona"
|
|
1848
1848
|
}), _dec3$r = Api.field(v.filter({
|
|
1849
|
-
table:
|
|
1849
|
+
table: 'testVonaUser',
|
|
1850
1850
|
joinType: 'innerJoin',
|
|
1851
1851
|
joinOn: ['userId', 'testVonaUser.id'],
|
|
1852
1852
|
originalName: 'name'
|
|
@@ -1928,7 +1928,7 @@ var _dec$t, _dec2$t, _dec3$p, _dec4$p, _dec5$p, _dec6$p, _dec7$l, _dec8$h, _clas
|
|
|
1928
1928
|
let DtoPostQuery = (_dec$t = Dto({
|
|
1929
1929
|
openapi: {
|
|
1930
1930
|
filter: {
|
|
1931
|
-
table:
|
|
1931
|
+
table: 'testVonaPost'
|
|
1932
1932
|
}
|
|
1933
1933
|
}
|
|
1934
1934
|
}), _dec2$t = BeanInfo({
|
package/package.json
CHANGED
package/src/.metadata/index.ts
CHANGED
|
@@ -150,15 +150,15 @@ export type EntityTestMeta=TypeEntityMeta<EntityTest,EntityTestTableName>;
|
|
|
150
150
|
export type EntityUserMeta=TypeEntityMeta<EntityUser,EntityUserTableName>;
|
|
151
151
|
declare module 'vona-module-a-orm' {
|
|
152
152
|
export interface ITableRecord {
|
|
153
|
-
'testVonaCategory':
|
|
154
|
-
'testVonaOrder':
|
|
155
|
-
'testVonaPost':
|
|
156
|
-
'testVonaPostContent':
|
|
157
|
-
'testVonaProduct':
|
|
158
|
-
'testVonaRole':
|
|
159
|
-
'testVonaRoleUser':
|
|
160
|
-
'testVonaTest':
|
|
161
|
-
'testVonaUser':
|
|
153
|
+
'testVonaCategory': EntityCategoryMeta;
|
|
154
|
+
'testVonaOrder': EntityOrderMeta;
|
|
155
|
+
'testVonaPost': EntityPostMeta;
|
|
156
|
+
'testVonaPostContent': EntityPostContentMeta;
|
|
157
|
+
'testVonaProduct': EntityProductMeta;
|
|
158
|
+
'testVonaRole': EntityRoleMeta;
|
|
159
|
+
'testVonaRoleUser': EntityRoleUserMeta;
|
|
160
|
+
'testVonaTest': EntityTestMeta;
|
|
161
|
+
'testVonaUser': EntityUserMeta;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
declare module 'vona-module-test-vona' {
|
package/src/.metadata/locales.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TypeLocaleBase } from 'vona';
|
|
2
|
+
import { $makeLocaleMagic } from 'vona';
|
|
2
3
|
import locale_en_us from '../config/locale/en-us.ts';
|
|
3
4
|
import locale_zh_cn from '../config/locale/zh-cn.ts';
|
|
4
5
|
|
|
@@ -7,6 +8,6 @@ export const locales = {
|
|
|
7
8
|
'zh-cn': locale_zh_cn,
|
|
8
9
|
};
|
|
9
10
|
|
|
10
|
-
export function $locale<K extends keyof (typeof locales)[TypeLocaleBase]>(key: K)
|
|
11
|
-
return `test-vona::${key}
|
|
11
|
+
export function $locale<K extends keyof (typeof locales)[TypeLocaleBase]>(key: K) {
|
|
12
|
+
return $makeLocaleMagic(`test-vona::${key}`);
|
|
12
13
|
}
|
package/src/dto/orderQuery.ts
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import type { IDecoratorDtoOptions } from 'vona-module-a-web';
|
|
2
2
|
import { Api, v } from 'vona-module-a-openapiutils';
|
|
3
|
-
import { $Dto
|
|
3
|
+
import { $Dto } from 'vona-module-a-orm';
|
|
4
4
|
import { Dto } from 'vona-module-a-web';
|
|
5
5
|
import { EntityOrder } from '../entity/order.ts';
|
|
6
|
-
import { EntityUser } from '../entity/user.ts';
|
|
7
6
|
|
|
8
7
|
export interface IDtoOptionsOrderQuery extends IDecoratorDtoOptions {}
|
|
9
8
|
|
|
10
9
|
@Dto<IDtoOptionsOrderQuery>({
|
|
11
|
-
openapi: { filter: { table:
|
|
10
|
+
openapi: { filter: { table: 'testVonaOrder' } },
|
|
12
11
|
})
|
|
13
12
|
export class DtoOrderQuery
|
|
14
13
|
extends $Dto.query(EntityOrder, ['orderNo', 'remark']) {
|
|
15
14
|
@Api.field(
|
|
16
15
|
v.filter({
|
|
17
|
-
table:
|
|
16
|
+
table: 'testVonaUser',
|
|
18
17
|
joinType: 'innerJoin',
|
|
19
18
|
joinOn: ['userId', 'testVonaUser.id'],
|
|
20
19
|
originalName: 'name',
|
package/src/dto/postQuery.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { IDecoratorDtoOptions } from 'vona-module-a-web';
|
|
2
2
|
import { Api, v } from 'vona-module-a-openapiutils';
|
|
3
|
-
import { $Dto
|
|
3
|
+
import { $Dto } from 'vona-module-a-orm';
|
|
4
4
|
import { Dto } from 'vona-module-a-web';
|
|
5
5
|
import { EntityPost } from '../entity/post.ts';
|
|
6
6
|
|
|
7
7
|
export interface IDtoOptionsPostQuery extends IDecoratorDtoOptions {}
|
|
8
8
|
|
|
9
9
|
@Dto<IDtoOptionsPostQuery>({
|
|
10
|
-
openapi: { filter: { table:
|
|
10
|
+
openapi: { filter: { table: 'testVonaPost' } },
|
|
11
11
|
})
|
|
12
12
|
export class DtoPostQuery extends $Dto.queryPage(EntityPost, ['title']) {
|
|
13
13
|
@Api.field(v.optional())
|
package/test/queue.test.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { app } from 'vona-mock';
|
|
|
4
4
|
describe('queue.test.ts', () => {
|
|
5
5
|
it('action:queue', async () => {
|
|
6
6
|
await app.bean.executor.mockCtx(async () => {
|
|
7
|
-
await app.bean.executor.performAction('post', '/test/vona/queue/pushAsync');
|
|
8
7
|
await app.bean.executor.performAction('post', '/test/vona/queue/push');
|
|
8
|
+
await app.bean.executor.performAction('post', '/test/vona/queue/pushAsync');
|
|
9
9
|
});
|
|
10
10
|
});
|
|
11
11
|
});
|