vona-module-test-vona 5.0.67 → 5.0.69
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 +44 -0
- package/dist/index.js +12 -13
- package/package.json +1 -1
- package/src/.metadata/index.ts +58 -0
- package/src/controller/captcha.ts +2 -2
- package/src/controller/onion.ts +1 -2
- package/src/controller/transaction.ts +3 -3
- package/src/controller/upload.ts +5 -4
- package/src/service/post.ts +3 -2
- package/src/service/transaction.ts +3 -3
|
@@ -17,12 +17,14 @@ declare module 'vona-module-test-vona' {
|
|
|
17
17
|
interface AopRegExp {
|
|
18
18
|
get $beanFullName(): 'test-vona.aop.regExp';
|
|
19
19
|
get $onionName(): 'test-vona:regExp';
|
|
20
|
+
get $onionOptions(): IDecoratorAopOptions;
|
|
20
21
|
}
|
|
21
22
|
interface AopSimple {
|
|
22
23
|
}
|
|
23
24
|
interface AopSimple {
|
|
24
25
|
get $beanFullName(): 'test-vona.aop.simple';
|
|
25
26
|
get $onionName(): 'test-vona:simple';
|
|
27
|
+
get $onionOptions(): IDecoratorAopOptions;
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
/** aop: end */
|
|
@@ -41,6 +43,7 @@ declare module 'vona-module-test-vona' {
|
|
|
41
43
|
interface AopMethodTest {
|
|
42
44
|
get $beanFullName(): 'test-vona.aopMethod.test';
|
|
43
45
|
get $onionName(): 'test-vona:test';
|
|
46
|
+
get $onionOptions(): IAopMethodOptionsTest;
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
49
|
/** aopMethod: end */
|
|
@@ -218,84 +221,98 @@ declare module 'vona-module-test-vona' {
|
|
|
218
221
|
interface ModelCategory {
|
|
219
222
|
get $beanFullName(): 'test-vona.model.category';
|
|
220
223
|
get $onionName(): 'test-vona:category';
|
|
224
|
+
get $onionOptions(): IModelOptionsCategory;
|
|
221
225
|
}
|
|
222
226
|
interface ModelCategoryChain {
|
|
223
227
|
}
|
|
224
228
|
interface ModelCategoryChain {
|
|
225
229
|
get $beanFullName(): 'test-vona.model.categoryChain';
|
|
226
230
|
get $onionName(): 'test-vona:categoryChain';
|
|
231
|
+
get $onionOptions(): IModelOptionsCategoryChain;
|
|
227
232
|
}
|
|
228
233
|
interface ModelOrder {
|
|
229
234
|
}
|
|
230
235
|
interface ModelOrder {
|
|
231
236
|
get $beanFullName(): 'test-vona.model.order';
|
|
232
237
|
get $onionName(): 'test-vona:order';
|
|
238
|
+
get $onionOptions(): IModelOptionsOrder;
|
|
233
239
|
}
|
|
234
240
|
interface ModelOrderStats {
|
|
235
241
|
}
|
|
236
242
|
interface ModelOrderStats {
|
|
237
243
|
get $beanFullName(): 'test-vona.model.orderStats';
|
|
238
244
|
get $onionName(): 'test-vona:orderStats';
|
|
245
|
+
get $onionOptions(): IModelOptionsOrderStats;
|
|
239
246
|
}
|
|
240
247
|
interface ModelPost {
|
|
241
248
|
}
|
|
242
249
|
interface ModelPost {
|
|
243
250
|
get $beanFullName(): 'test-vona.model.post';
|
|
244
251
|
get $onionName(): 'test-vona:post';
|
|
252
|
+
get $onionOptions(): IModelOptionsPost;
|
|
245
253
|
}
|
|
246
254
|
interface ModelPostContent {
|
|
247
255
|
}
|
|
248
256
|
interface ModelPostContent {
|
|
249
257
|
get $beanFullName(): 'test-vona.model.postContent';
|
|
250
258
|
get $onionName(): 'test-vona:postContent';
|
|
259
|
+
get $onionOptions(): IModelOptionsPostContent;
|
|
251
260
|
}
|
|
252
261
|
interface ModelProduct {
|
|
253
262
|
}
|
|
254
263
|
interface ModelProduct {
|
|
255
264
|
get $beanFullName(): 'test-vona.model.product';
|
|
256
265
|
get $onionName(): 'test-vona:product';
|
|
266
|
+
get $onionOptions(): IModelOptionsProduct;
|
|
257
267
|
}
|
|
258
268
|
interface ModelRole {
|
|
259
269
|
}
|
|
260
270
|
interface ModelRole {
|
|
261
271
|
get $beanFullName(): 'test-vona.model.role';
|
|
262
272
|
get $onionName(): 'test-vona:role';
|
|
273
|
+
get $onionOptions(): IModelOptionsRole;
|
|
263
274
|
}
|
|
264
275
|
interface ModelRoleUser {
|
|
265
276
|
}
|
|
266
277
|
interface ModelRoleUser {
|
|
267
278
|
get $beanFullName(): 'test-vona.model.roleUser';
|
|
268
279
|
get $onionName(): 'test-vona:roleUser';
|
|
280
|
+
get $onionOptions(): IModelOptionsRoleUser;
|
|
269
281
|
}
|
|
270
282
|
interface ModelTest {
|
|
271
283
|
}
|
|
272
284
|
interface ModelTest {
|
|
273
285
|
get $beanFullName(): 'test-vona.model.test';
|
|
274
286
|
get $onionName(): 'test-vona:test';
|
|
287
|
+
get $onionOptions(): IModelOptionsTest;
|
|
275
288
|
}
|
|
276
289
|
interface ModelTestDynamicTable {
|
|
277
290
|
}
|
|
278
291
|
interface ModelTestDynamicTable {
|
|
279
292
|
get $beanFullName(): 'test-vona.model.testDynamicTable';
|
|
280
293
|
get $onionName(): 'test-vona:testDynamicTable';
|
|
294
|
+
get $onionOptions(): IModelOptionsTestDynamicTable;
|
|
281
295
|
}
|
|
282
296
|
interface ModelUser {
|
|
283
297
|
}
|
|
284
298
|
interface ModelUser {
|
|
285
299
|
get $beanFullName(): 'test-vona.model.user';
|
|
286
300
|
get $onionName(): 'test-vona:user';
|
|
301
|
+
get $onionOptions(): IModelOptionsUser;
|
|
287
302
|
}
|
|
288
303
|
interface ModelUserStats {
|
|
289
304
|
}
|
|
290
305
|
interface ModelUserStats {
|
|
291
306
|
get $beanFullName(): 'test-vona.model.userStats';
|
|
292
307
|
get $onionName(): 'test-vona:userStats';
|
|
308
|
+
get $onionOptions(): IModelOptionsUserStats;
|
|
293
309
|
}
|
|
294
310
|
interface ModelUserStatsGroup {
|
|
295
311
|
}
|
|
296
312
|
interface ModelUserStatsGroup {
|
|
297
313
|
get $beanFullName(): 'test-vona.model.userStatsGroup';
|
|
298
314
|
get $onionName(): 'test-vona:userStatsGroup';
|
|
315
|
+
get $onionOptions(): IModelOptionsUserStatsGroup;
|
|
299
316
|
}
|
|
300
317
|
}
|
|
301
318
|
/** model: end */
|
|
@@ -984,6 +1001,7 @@ declare module 'vona-module-test-vona' {
|
|
|
984
1001
|
interface BroadcastTest {
|
|
985
1002
|
get $beanFullName(): 'test-vona.broadcast.test';
|
|
986
1003
|
get $onionName(): 'test-vona:test';
|
|
1004
|
+
get $onionOptions(): IDecoratorBroadcastOptions;
|
|
987
1005
|
}
|
|
988
1006
|
}
|
|
989
1007
|
/** broadcast: end */
|
|
@@ -1007,6 +1025,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1007
1025
|
interface CacheMemTest {
|
|
1008
1026
|
get $beanFullName(): 'test-vona.cacheMem.test';
|
|
1009
1027
|
get $onionName(): 'test-vona:test';
|
|
1028
|
+
get $onionOptions(): IDecoratorCacheMemOptions;
|
|
1010
1029
|
}
|
|
1011
1030
|
}
|
|
1012
1031
|
/** cacheMem: end */
|
|
@@ -1032,12 +1051,14 @@ declare module 'vona-module-test-vona' {
|
|
|
1032
1051
|
interface CacheRedisPost {
|
|
1033
1052
|
get $beanFullName(): 'test-vona.cacheRedis.post';
|
|
1034
1053
|
get $onionName(): 'test-vona:post';
|
|
1054
|
+
get $onionOptions(): IDecoratorCacheRedisOptions;
|
|
1035
1055
|
}
|
|
1036
1056
|
interface CacheRedisTest {
|
|
1037
1057
|
}
|
|
1038
1058
|
interface CacheRedisTest {
|
|
1039
1059
|
get $beanFullName(): 'test-vona.cacheRedis.test';
|
|
1040
1060
|
get $onionName(): 'test-vona:test';
|
|
1061
|
+
get $onionOptions(): IDecoratorCacheRedisOptions;
|
|
1041
1062
|
}
|
|
1042
1063
|
}
|
|
1043
1064
|
/** cacheRedis: end */
|
|
@@ -1092,6 +1113,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1092
1113
|
interface EventListenerHelloEcho {
|
|
1093
1114
|
get $beanFullName(): 'test-vona.eventListener.helloEcho';
|
|
1094
1115
|
get $onionName(): 'test-vona:helloEcho';
|
|
1116
|
+
get $onionOptions(): IDecoratorEventListenerOptions;
|
|
1095
1117
|
}
|
|
1096
1118
|
}
|
|
1097
1119
|
/** eventListener: end */
|
|
@@ -1126,6 +1148,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1126
1148
|
interface QueueTest {
|
|
1127
1149
|
get $beanFullName(): 'test-vona.queue.test';
|
|
1128
1150
|
get $onionName(): 'test-vona:test';
|
|
1151
|
+
get $onionOptions(): IDecoratorQueueOptions;
|
|
1129
1152
|
}
|
|
1130
1153
|
}
|
|
1131
1154
|
/** queue: end */
|
|
@@ -1151,12 +1174,14 @@ declare module 'vona-module-test-vona' {
|
|
|
1151
1174
|
interface ScheduleTest {
|
|
1152
1175
|
get $beanFullName(): 'test-vona.schedule.test';
|
|
1153
1176
|
get $onionName(): 'test-vona:test';
|
|
1177
|
+
get $onionOptions(): IDecoratorScheduleOptions;
|
|
1154
1178
|
}
|
|
1155
1179
|
interface ScheduleTest3 {
|
|
1156
1180
|
}
|
|
1157
1181
|
interface ScheduleTest3 {
|
|
1158
1182
|
get $beanFullName(): 'test-vona.schedule.test3';
|
|
1159
1183
|
get $onionName(): 'test-vona:test3';
|
|
1184
|
+
get $onionOptions(): IDecoratorScheduleOptions;
|
|
1160
1185
|
}
|
|
1161
1186
|
}
|
|
1162
1187
|
/** schedule: end */
|
|
@@ -1175,6 +1200,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1175
1200
|
interface SerializerTransformEmail {
|
|
1176
1201
|
get $beanFullName(): 'test-vona.serializerTransform.email';
|
|
1177
1202
|
get $onionName(): 'test-vona:email';
|
|
1203
|
+
get $onionOptions(): ISerializerTransformOptionsEmail;
|
|
1178
1204
|
}
|
|
1179
1205
|
}
|
|
1180
1206
|
/** serializerTransform: end */
|
|
@@ -1192,6 +1218,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1192
1218
|
interface SummerCacheTest {
|
|
1193
1219
|
get $beanFullName(): 'test-vona.summerCache.test';
|
|
1194
1220
|
get $onionName(): 'test-vona:test';
|
|
1221
|
+
get $onionOptions(): IDecoratorSummerCacheOptions;
|
|
1195
1222
|
}
|
|
1196
1223
|
}
|
|
1197
1224
|
/** summerCache: end */
|
|
@@ -1431,102 +1458,119 @@ declare module 'vona-module-test-vona' {
|
|
|
1431
1458
|
interface ControllerBean {
|
|
1432
1459
|
get $beanFullName(): 'test-vona.controller.bean';
|
|
1433
1460
|
get $onionName(): 'test-vona:bean';
|
|
1461
|
+
get $onionOptions(): IControllerOptionsBean;
|
|
1434
1462
|
}
|
|
1435
1463
|
interface ControllerCacheMem {
|
|
1436
1464
|
}
|
|
1437
1465
|
interface ControllerCacheMem {
|
|
1438
1466
|
get $beanFullName(): 'test-vona.controller.cacheMem';
|
|
1439
1467
|
get $onionName(): 'test-vona:cacheMem';
|
|
1468
|
+
get $onionOptions(): IControllerOptionsCacheMem;
|
|
1440
1469
|
}
|
|
1441
1470
|
interface ControllerCacheRedis {
|
|
1442
1471
|
}
|
|
1443
1472
|
interface ControllerCacheRedis {
|
|
1444
1473
|
get $beanFullName(): 'test-vona.controller.cacheRedis';
|
|
1445
1474
|
get $onionName(): 'test-vona:cacheRedis';
|
|
1475
|
+
get $onionOptions(): IControllerOptionsCacheRedis;
|
|
1446
1476
|
}
|
|
1447
1477
|
interface ControllerCaptcha {
|
|
1448
1478
|
}
|
|
1449
1479
|
interface ControllerCaptcha {
|
|
1450
1480
|
get $beanFullName(): 'test-vona.controller.captcha';
|
|
1451
1481
|
get $onionName(): 'test-vona:captcha';
|
|
1482
|
+
get $onionOptions(): IControllerOptionsCaptcha;
|
|
1452
1483
|
}
|
|
1453
1484
|
interface ControllerDtoTest {
|
|
1454
1485
|
}
|
|
1455
1486
|
interface ControllerDtoTest {
|
|
1456
1487
|
get $beanFullName(): 'test-vona.controller.dtoTest';
|
|
1457
1488
|
get $onionName(): 'test-vona:dtoTest';
|
|
1489
|
+
get $onionOptions(): IControllerOptionsDtoTest;
|
|
1458
1490
|
}
|
|
1459
1491
|
interface ControllerGuardPassport {
|
|
1460
1492
|
}
|
|
1461
1493
|
interface ControllerGuardPassport {
|
|
1462
1494
|
get $beanFullName(): 'test-vona.controller.guardPassport';
|
|
1463
1495
|
get $onionName(): 'test-vona:guardPassport';
|
|
1496
|
+
get $onionOptions(): IControllerOptionsGuardPassport;
|
|
1464
1497
|
}
|
|
1465
1498
|
interface ControllerOnion {
|
|
1466
1499
|
}
|
|
1467
1500
|
interface ControllerOnion {
|
|
1468
1501
|
get $beanFullName(): 'test-vona.controller.onion';
|
|
1469
1502
|
get $onionName(): 'test-vona:onion';
|
|
1503
|
+
get $onionOptions(): IControllerOptionsOnion;
|
|
1470
1504
|
}
|
|
1471
1505
|
interface ControllerOrder {
|
|
1472
1506
|
}
|
|
1473
1507
|
interface ControllerOrder {
|
|
1474
1508
|
get $beanFullName(): 'test-vona.controller.order';
|
|
1475
1509
|
get $onionName(): 'test-vona:order';
|
|
1510
|
+
get $onionOptions(): IControllerOptionsOrder;
|
|
1476
1511
|
}
|
|
1477
1512
|
interface ControllerPassport {
|
|
1478
1513
|
}
|
|
1479
1514
|
interface ControllerPassport {
|
|
1480
1515
|
get $beanFullName(): 'test-vona.controller.passport';
|
|
1481
1516
|
get $onionName(): 'test-vona:passport';
|
|
1517
|
+
get $onionOptions(): IControllerOptionsPassport;
|
|
1482
1518
|
}
|
|
1483
1519
|
interface ControllerPerformAction {
|
|
1484
1520
|
}
|
|
1485
1521
|
interface ControllerPerformAction {
|
|
1486
1522
|
get $beanFullName(): 'test-vona.controller.performAction';
|
|
1487
1523
|
get $onionName(): 'test-vona:performAction';
|
|
1524
|
+
get $onionOptions(): IControllerOptionsPerformAction;
|
|
1488
1525
|
}
|
|
1489
1526
|
interface ControllerPost {
|
|
1490
1527
|
}
|
|
1491
1528
|
interface ControllerPost {
|
|
1492
1529
|
get $beanFullName(): 'test-vona.controller.post';
|
|
1493
1530
|
get $onionName(): 'test-vona:post';
|
|
1531
|
+
get $onionOptions(): IControllerOptionsPost;
|
|
1494
1532
|
}
|
|
1495
1533
|
interface ControllerQueue {
|
|
1496
1534
|
}
|
|
1497
1535
|
interface ControllerQueue {
|
|
1498
1536
|
get $beanFullName(): 'test-vona.controller.queue';
|
|
1499
1537
|
get $onionName(): 'test-vona:queue';
|
|
1538
|
+
get $onionOptions(): IControllerOptionsQueue;
|
|
1500
1539
|
}
|
|
1501
1540
|
interface ControllerSerializer {
|
|
1502
1541
|
}
|
|
1503
1542
|
interface ControllerSerializer {
|
|
1504
1543
|
get $beanFullName(): 'test-vona.controller.serializer';
|
|
1505
1544
|
get $onionName(): 'test-vona:serializer';
|
|
1545
|
+
get $onionOptions(): IControllerOptionsSerializer;
|
|
1506
1546
|
}
|
|
1507
1547
|
interface ControllerSummer {
|
|
1508
1548
|
}
|
|
1509
1549
|
interface ControllerSummer {
|
|
1510
1550
|
get $beanFullName(): 'test-vona.controller.summer';
|
|
1511
1551
|
get $onionName(): 'test-vona:summer';
|
|
1552
|
+
get $onionOptions(): IControllerOptionsSummer;
|
|
1512
1553
|
}
|
|
1513
1554
|
interface ControllerTail {
|
|
1514
1555
|
}
|
|
1515
1556
|
interface ControllerTail {
|
|
1516
1557
|
get $beanFullName(): 'test-vona.controller.tail';
|
|
1517
1558
|
get $onionName(): 'test-vona:tail';
|
|
1559
|
+
get $onionOptions(): IControllerOptionsTail;
|
|
1518
1560
|
}
|
|
1519
1561
|
interface ControllerTransaction {
|
|
1520
1562
|
}
|
|
1521
1563
|
interface ControllerTransaction {
|
|
1522
1564
|
get $beanFullName(): 'test-vona.controller.transaction';
|
|
1523
1565
|
get $onionName(): 'test-vona:transaction';
|
|
1566
|
+
get $onionOptions(): IControllerOptionsTransaction;
|
|
1524
1567
|
}
|
|
1525
1568
|
interface ControllerUpload {
|
|
1526
1569
|
}
|
|
1527
1570
|
interface ControllerUpload {
|
|
1528
1571
|
get $beanFullName(): 'test-vona.controller.upload';
|
|
1529
1572
|
get $onionName(): 'test-vona:upload';
|
|
1573
|
+
get $onionOptions(): IControllerOptionsUpload;
|
|
1530
1574
|
}
|
|
1531
1575
|
}
|
|
1532
1576
|
/** controller: end */
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { BeanInfo, BeanAopBase, BeanAopMethodBase, 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-openapi';
|
|
4
|
-
import { Entity, EntityBase, Model, $relation, BeanModelBase, $relationDynamic,
|
|
4
|
+
import { Entity, EntityBase, Model, $relation, BeanModelBase, $relationDynamic, $Dto, $tableName } from 'vona-module-a-orm';
|
|
5
5
|
import { ModelCategoryChain as ModelCategoryChain$1, ModelOrder as ModelOrder$1 } from 'vona-module-test-vona';
|
|
6
6
|
import moment from 'moment';
|
|
7
7
|
import { Bean, Service, Scope } from 'vona-module-a-bean';
|
|
8
8
|
import { getKeyHash, CacheMem, BeanCacheMemBase, CacheRedis, BeanCacheRedisBase } from 'vona-module-a-cache';
|
|
9
9
|
import { Caching } from 'vona-module-a-caching';
|
|
10
10
|
import assert from 'node:assert';
|
|
11
|
+
import { Core } from 'vona-module-a-core';
|
|
11
12
|
import { Broadcast, BeanBroadcastBase } from 'vona-module-a-broadcast';
|
|
12
13
|
import { Event, BeanEventBase, EventListener } from 'vona-module-a-event';
|
|
13
14
|
import { Meta } from 'vona-module-a-meta';
|
|
@@ -19,10 +20,8 @@ import { Dto, Controller, Web, Arg } from 'vona-module-a-web';
|
|
|
19
20
|
import z, { z as z$1 } from 'zod';
|
|
20
21
|
import { Passport } from 'vona-module-a-user';
|
|
21
22
|
import { sleep } from '@cabloy/utils';
|
|
22
|
-
import { Captcha } from 'vona-module-a-captcha';
|
|
23
|
-
import { Core } from 'vona-module-a-core';
|
|
24
23
|
import { DtoJwtToken } from 'vona-module-a-jwt';
|
|
25
|
-
import {
|
|
24
|
+
import { SymbolUploadValue } from 'vona-module-a-upload';
|
|
26
25
|
|
|
27
26
|
var _dec$1q, _dec2$1q, _class$1q;
|
|
28
27
|
let AopRegExp = (_dec$1q = Aop({
|
|
@@ -1045,7 +1044,7 @@ let ServiceOrder = (_dec$Y = Service(), _dec2$Y = BeanInfo({
|
|
|
1045
1044
|
var _dec$X, _dec2$X, _dec3$t, _dec4$t, _dec5$q, _class$X, _class2$t;
|
|
1046
1045
|
let ServicePost = (_dec$X = Service(), _dec2$X = BeanInfo({
|
|
1047
1046
|
module: "test-vona"
|
|
1048
|
-
}), _dec3$t =
|
|
1047
|
+
}), _dec3$t = Core.transaction(), _dec4$t = Reflect.metadata("design:type", Function), _dec5$q = Reflect.metadata("design:paramtypes", []), _dec$X(_class$X = _dec2$X(_class$X = (_class2$t = class ServicePost extends BeanBase {
|
|
1049
1048
|
async findMany(params) {
|
|
1050
1049
|
return await this.scope.model.post.selectAndCount({
|
|
1051
1050
|
...params,
|
|
@@ -1438,7 +1437,7 @@ const tableNameFail$1 = '__tempTransactionFail';
|
|
|
1438
1437
|
const tableNameSuccess$1 = '__tempTransactionSuccess';
|
|
1439
1438
|
let ServiceTransaction = (_dec$R = Service(), _dec2$R = BeanInfo({
|
|
1440
1439
|
module: "test-vona"
|
|
1441
|
-
}), _dec3$s =
|
|
1440
|
+
}), _dec3$s = Core.transaction(), _dec4$s = Reflect.metadata("design:type", Function), _dec5$p = Reflect.metadata("design:paramtypes", [Object]), _dec6$p = Core.transaction(), _dec7$l = Reflect.metadata("design:type", Function), _dec8$h = Reflect.metadata("design:paramtypes", [Object]), _dec$R(_class$R = _dec2$R(_class$R = (_class2$s = class ServiceTransaction extends BeanBase {
|
|
1442
1441
|
async fail(item) {
|
|
1443
1442
|
await this.bean.model.update(`${tableNameFail$1}`, item);
|
|
1444
1443
|
await this.bean.model.update(`${tableNameFail$1}error`, item);
|
|
@@ -2459,7 +2458,7 @@ let ControllerCaptcha = (_dec$e = Controller({
|
|
|
2459
2458
|
}
|
|
2460
2459
|
}), _dec2$e = BeanInfo({
|
|
2461
2460
|
module: "test-vona"
|
|
2462
|
-
}), _dec3$d = Web.post('signin'), _dec4$d = Passport.public(), _dec5$d =
|
|
2461
|
+
}), _dec3$d = Web.post('signin'), _dec4$d = Passport.public(), _dec5$d = Core.captchaVerify({
|
|
2463
2462
|
scene: 'a-captchasimple:simple'
|
|
2464
2463
|
}), _dec6$d = function (target, key) {
|
|
2465
2464
|
return Arg.body()(target, key, 0);
|
|
@@ -2560,7 +2559,7 @@ let ControllerOnion = (_dec$b = Controller({
|
|
|
2560
2559
|
}), _dec10$6 = Aspect.aopMethod('a-orm:transaction', {
|
|
2561
2560
|
isolationLevel: 'SERIALIZABLE',
|
|
2562
2561
|
readOnly: true
|
|
2563
|
-
}), _dec11$6 =
|
|
2562
|
+
}), _dec11$6 = Core.transaction({
|
|
2564
2563
|
isolationLevel: 'READ_COMMITTED',
|
|
2565
2564
|
readOnly: false
|
|
2566
2565
|
}), _dec12$6 = Api.body(v.optional(), z$1.string()), _dec13$6 = function (target, key) {
|
|
@@ -3031,9 +3030,9 @@ let ControllerTransaction = (_dec$2 = Controller({
|
|
|
3031
3030
|
}
|
|
3032
3031
|
}), _dec2$2 = Api.exclude(), _dec3$1 = BeanInfo({
|
|
3033
3032
|
module: "test-vona"
|
|
3034
|
-
}), _dec4$1 = Web.post('fail'), _dec5$1 =
|
|
3033
|
+
}), _dec4$1 = Web.post('fail'), _dec5$1 = Core.transaction(), _dec6$1 = Passport.public(), _dec7$1 = function (target, key) {
|
|
3035
3034
|
return Arg.body()(target, key, 0);
|
|
3036
|
-
}, _dec8$1 = Reflect.metadata("design:type", Function), _dec9$1 = Reflect.metadata("design:paramtypes", [Object]), _dec0$1 = Web.post('success'), _dec1$1 =
|
|
3035
|
+
}, _dec8$1 = Reflect.metadata("design:type", Function), _dec9$1 = Reflect.metadata("design:paramtypes", [Object]), _dec0$1 = Web.post('success'), _dec1$1 = Core.transaction(), _dec10$1 = Passport.public(), _dec11$1 = function (target, key) {
|
|
3037
3036
|
return Arg.body()(target, key, 0);
|
|
3038
3037
|
}, _dec12$1 = Reflect.metadata("design:type", Function), _dec13$1 = Reflect.metadata("design:paramtypes", [Object]), _dec$2(_class$2 = _dec2$2(_class$2 = _dec3$1(_class$2 = (_class2$1 = class ControllerTransaction extends BeanBase {
|
|
3039
3038
|
async fail(item) {
|
|
@@ -3053,17 +3052,17 @@ let ControllerUpload = (_dec$1 = Controller({
|
|
|
3053
3052
|
}
|
|
3054
3053
|
}), _dec2$1 = BeanInfo({
|
|
3055
3054
|
module: "test-vona"
|
|
3056
|
-
}), _dec3 = Web.post('fields'), _dec4 = Passport.public(), _dec5 =
|
|
3055
|
+
}), _dec3 = Web.post('fields'), _dec4 = Passport.public(), _dec5 = Core.fileUpload(), _dec6 = Api.contentType('application/json'), _dec7 = function (target, key) {
|
|
3057
3056
|
return Arg.fields()(target, key, 0);
|
|
3058
3057
|
}, _dec8 = function (target, key) {
|
|
3059
3058
|
return Arg.fields('checkes', v.array(z$1.string()))(target, key, 1);
|
|
3060
3059
|
}, _dec9 = function (target, key) {
|
|
3061
3060
|
return Arg.field('name', v.default('zhennann'), v.title('your name'))(target, key, 2);
|
|
3062
|
-
}, _dec0 = Reflect.metadata("design:type", Function), _dec1 = Reflect.metadata("design:paramtypes", [Array, Array, String]), _dec10 = Web.post('file'), _dec11 = Passport.public(), _dec12 =
|
|
3061
|
+
}, _dec0 = Reflect.metadata("design:type", Function), _dec1 = Reflect.metadata("design:paramtypes", [Array, Array, String]), _dec10 = Web.post('file'), _dec11 = Passport.public(), _dec12 = Core.fileUpload(), _dec13 = Api.contentType('application/json'), _dec14 = function (target, key) {
|
|
3063
3062
|
return Arg.field('name', v.default('zhennann'))(target, key, 0);
|
|
3064
3063
|
}, _dec15 = function (target, key) {
|
|
3065
3064
|
return Arg.file('welcome')(target, key, 1);
|
|
3066
|
-
}, _dec16 = Reflect.metadata("design:type", Function), _dec17 = Reflect.metadata("design:paramtypes", [String, typeof IUploadFile === "undefined" ? Object : IUploadFile]), _dec18 = Web.post('files'), _dec19 = Passport.public(), _dec20 =
|
|
3065
|
+
}, _dec16 = Reflect.metadata("design:type", Function), _dec17 = Reflect.metadata("design:paramtypes", [String, typeof IUploadFile === "undefined" ? Object : IUploadFile]), _dec18 = Web.post('files'), _dec19 = Passport.public(), _dec20 = Core.fileUpload(), _dec21 = Api.contentType('application/json'), _dec22 = function (target, key) {
|
|
3067
3066
|
return Arg.files(v.title('more files'))(target, key, 0);
|
|
3068
3067
|
}, _dec23 = function (target, key) {
|
|
3069
3068
|
return Arg.files('images', v.title('images'))(target, key, 1);
|
package/package.json
CHANGED
package/src/.metadata/index.ts
CHANGED
|
@@ -26,6 +26,7 @@ declare module 'vona-module-test-vona' {
|
|
|
26
26
|
export interface AopRegExp {
|
|
27
27
|
get $beanFullName(): 'test-vona.aop.regExp';
|
|
28
28
|
get $onionName(): 'test-vona:regExp';
|
|
29
|
+
get $onionOptions(): IDecoratorAopOptions;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
export interface AopSimple {
|
|
@@ -36,6 +37,7 @@ declare module 'vona-module-test-vona' {
|
|
|
36
37
|
export interface AopSimple {
|
|
37
38
|
get $beanFullName(): 'test-vona.aop.simple';
|
|
38
39
|
get $onionName(): 'test-vona:simple';
|
|
40
|
+
get $onionOptions(): IDecoratorAopOptions;
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
/** aop: end */
|
|
@@ -61,6 +63,7 @@ declare module 'vona-module-test-vona' {
|
|
|
61
63
|
export interface AopMethodTest {
|
|
62
64
|
get $beanFullName(): 'test-vona.aopMethod.test';
|
|
63
65
|
get $onionName(): 'test-vona:test';
|
|
66
|
+
get $onionOptions(): IAopMethodOptionsTest;
|
|
64
67
|
}
|
|
65
68
|
}
|
|
66
69
|
/** aopMethod: end */
|
|
@@ -258,6 +261,7 @@ declare module 'vona-module-test-vona' {
|
|
|
258
261
|
export interface ModelCategory {
|
|
259
262
|
get $beanFullName(): 'test-vona.model.category';
|
|
260
263
|
get $onionName(): 'test-vona:category';
|
|
264
|
+
get $onionOptions(): IModelOptionsCategory;
|
|
261
265
|
}
|
|
262
266
|
|
|
263
267
|
export interface ModelCategoryChain {
|
|
@@ -268,6 +272,7 @@ declare module 'vona-module-test-vona' {
|
|
|
268
272
|
export interface ModelCategoryChain {
|
|
269
273
|
get $beanFullName(): 'test-vona.model.categoryChain';
|
|
270
274
|
get $onionName(): 'test-vona:categoryChain';
|
|
275
|
+
get $onionOptions(): IModelOptionsCategoryChain;
|
|
271
276
|
}
|
|
272
277
|
|
|
273
278
|
export interface ModelOrder {
|
|
@@ -278,6 +283,7 @@ declare module 'vona-module-test-vona' {
|
|
|
278
283
|
export interface ModelOrder {
|
|
279
284
|
get $beanFullName(): 'test-vona.model.order';
|
|
280
285
|
get $onionName(): 'test-vona:order';
|
|
286
|
+
get $onionOptions(): IModelOptionsOrder;
|
|
281
287
|
}
|
|
282
288
|
|
|
283
289
|
export interface ModelOrderStats {
|
|
@@ -288,6 +294,7 @@ declare module 'vona-module-test-vona' {
|
|
|
288
294
|
export interface ModelOrderStats {
|
|
289
295
|
get $beanFullName(): 'test-vona.model.orderStats';
|
|
290
296
|
get $onionName(): 'test-vona:orderStats';
|
|
297
|
+
get $onionOptions(): IModelOptionsOrderStats;
|
|
291
298
|
}
|
|
292
299
|
|
|
293
300
|
export interface ModelPost {
|
|
@@ -298,6 +305,7 @@ declare module 'vona-module-test-vona' {
|
|
|
298
305
|
export interface ModelPost {
|
|
299
306
|
get $beanFullName(): 'test-vona.model.post';
|
|
300
307
|
get $onionName(): 'test-vona:post';
|
|
308
|
+
get $onionOptions(): IModelOptionsPost;
|
|
301
309
|
}
|
|
302
310
|
|
|
303
311
|
export interface ModelPostContent {
|
|
@@ -308,6 +316,7 @@ declare module 'vona-module-test-vona' {
|
|
|
308
316
|
export interface ModelPostContent {
|
|
309
317
|
get $beanFullName(): 'test-vona.model.postContent';
|
|
310
318
|
get $onionName(): 'test-vona:postContent';
|
|
319
|
+
get $onionOptions(): IModelOptionsPostContent;
|
|
311
320
|
}
|
|
312
321
|
|
|
313
322
|
export interface ModelProduct {
|
|
@@ -318,6 +327,7 @@ declare module 'vona-module-test-vona' {
|
|
|
318
327
|
export interface ModelProduct {
|
|
319
328
|
get $beanFullName(): 'test-vona.model.product';
|
|
320
329
|
get $onionName(): 'test-vona:product';
|
|
330
|
+
get $onionOptions(): IModelOptionsProduct;
|
|
321
331
|
}
|
|
322
332
|
|
|
323
333
|
export interface ModelRole {
|
|
@@ -328,6 +338,7 @@ declare module 'vona-module-test-vona' {
|
|
|
328
338
|
export interface ModelRole {
|
|
329
339
|
get $beanFullName(): 'test-vona.model.role';
|
|
330
340
|
get $onionName(): 'test-vona:role';
|
|
341
|
+
get $onionOptions(): IModelOptionsRole;
|
|
331
342
|
}
|
|
332
343
|
|
|
333
344
|
export interface ModelRoleUser {
|
|
@@ -338,6 +349,7 @@ declare module 'vona-module-test-vona' {
|
|
|
338
349
|
export interface ModelRoleUser {
|
|
339
350
|
get $beanFullName(): 'test-vona.model.roleUser';
|
|
340
351
|
get $onionName(): 'test-vona:roleUser';
|
|
352
|
+
get $onionOptions(): IModelOptionsRoleUser;
|
|
341
353
|
}
|
|
342
354
|
|
|
343
355
|
export interface ModelTest {
|
|
@@ -348,6 +360,7 @@ declare module 'vona-module-test-vona' {
|
|
|
348
360
|
export interface ModelTest {
|
|
349
361
|
get $beanFullName(): 'test-vona.model.test';
|
|
350
362
|
get $onionName(): 'test-vona:test';
|
|
363
|
+
get $onionOptions(): IModelOptionsTest;
|
|
351
364
|
}
|
|
352
365
|
|
|
353
366
|
export interface ModelTestDynamicTable {
|
|
@@ -358,6 +371,7 @@ declare module 'vona-module-test-vona' {
|
|
|
358
371
|
export interface ModelTestDynamicTable {
|
|
359
372
|
get $beanFullName(): 'test-vona.model.testDynamicTable';
|
|
360
373
|
get $onionName(): 'test-vona:testDynamicTable';
|
|
374
|
+
get $onionOptions(): IModelOptionsTestDynamicTable;
|
|
361
375
|
}
|
|
362
376
|
|
|
363
377
|
export interface ModelUser {
|
|
@@ -368,6 +382,7 @@ declare module 'vona-module-test-vona' {
|
|
|
368
382
|
export interface ModelUser {
|
|
369
383
|
get $beanFullName(): 'test-vona.model.user';
|
|
370
384
|
get $onionName(): 'test-vona:user';
|
|
385
|
+
get $onionOptions(): IModelOptionsUser;
|
|
371
386
|
}
|
|
372
387
|
|
|
373
388
|
export interface ModelUserStats {
|
|
@@ -378,6 +393,7 @@ declare module 'vona-module-test-vona' {
|
|
|
378
393
|
export interface ModelUserStats {
|
|
379
394
|
get $beanFullName(): 'test-vona.model.userStats';
|
|
380
395
|
get $onionName(): 'test-vona:userStats';
|
|
396
|
+
get $onionOptions(): IModelOptionsUserStats;
|
|
381
397
|
}
|
|
382
398
|
|
|
383
399
|
export interface ModelUserStatsGroup {
|
|
@@ -388,6 +404,7 @@ declare module 'vona-module-test-vona' {
|
|
|
388
404
|
export interface ModelUserStatsGroup {
|
|
389
405
|
get $beanFullName(): 'test-vona.model.userStatsGroup';
|
|
390
406
|
get $onionName(): 'test-vona:userStatsGroup';
|
|
407
|
+
get $onionOptions(): IModelOptionsUserStatsGroup;
|
|
391
408
|
}
|
|
392
409
|
}
|
|
393
410
|
/** model: end */
|
|
@@ -945,6 +962,7 @@ declare module 'vona-module-test-vona' {
|
|
|
945
962
|
export interface ServiceAopMethod {
|
|
946
963
|
get $beanFullName(): 'test-vona.service.aopMethod';
|
|
947
964
|
get $onionName(): 'test-vona:aopMethod';
|
|
965
|
+
|
|
948
966
|
}
|
|
949
967
|
|
|
950
968
|
export interface ServiceCaching {
|
|
@@ -955,6 +973,7 @@ declare module 'vona-module-test-vona' {
|
|
|
955
973
|
export interface ServiceCaching {
|
|
956
974
|
get $beanFullName(): 'test-vona.service.caching';
|
|
957
975
|
get $onionName(): 'test-vona:caching';
|
|
976
|
+
|
|
958
977
|
}
|
|
959
978
|
|
|
960
979
|
export interface ServiceCategory {
|
|
@@ -965,6 +984,7 @@ declare module 'vona-module-test-vona' {
|
|
|
965
984
|
export interface ServiceCategory {
|
|
966
985
|
get $beanFullName(): 'test-vona.service.category';
|
|
967
986
|
get $onionName(): 'test-vona:category';
|
|
987
|
+
|
|
968
988
|
}
|
|
969
989
|
|
|
970
990
|
export interface ServiceOrder {
|
|
@@ -975,6 +995,7 @@ declare module 'vona-module-test-vona' {
|
|
|
975
995
|
export interface ServiceOrder {
|
|
976
996
|
get $beanFullName(): 'test-vona.service.order';
|
|
977
997
|
get $onionName(): 'test-vona:order';
|
|
998
|
+
|
|
978
999
|
}
|
|
979
1000
|
|
|
980
1001
|
export interface ServicePost {
|
|
@@ -985,6 +1006,7 @@ declare module 'vona-module-test-vona' {
|
|
|
985
1006
|
export interface ServicePost {
|
|
986
1007
|
get $beanFullName(): 'test-vona.service.post';
|
|
987
1008
|
get $onionName(): 'test-vona:post';
|
|
1009
|
+
|
|
988
1010
|
}
|
|
989
1011
|
|
|
990
1012
|
export interface ServiceProduct {
|
|
@@ -995,6 +1017,7 @@ declare module 'vona-module-test-vona' {
|
|
|
995
1017
|
export interface ServiceProduct {
|
|
996
1018
|
get $beanFullName(): 'test-vona.service.product';
|
|
997
1019
|
get $onionName(): 'test-vona:product';
|
|
1020
|
+
|
|
998
1021
|
}
|
|
999
1022
|
|
|
1000
1023
|
export interface ServiceTest {
|
|
@@ -1005,6 +1028,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1005
1028
|
export interface ServiceTest {
|
|
1006
1029
|
get $beanFullName(): 'test-vona.service.test';
|
|
1007
1030
|
get $onionName(): 'test-vona:test';
|
|
1031
|
+
|
|
1008
1032
|
}
|
|
1009
1033
|
|
|
1010
1034
|
export interface ServiceTestApp {
|
|
@@ -1015,6 +1039,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1015
1039
|
export interface ServiceTestApp {
|
|
1016
1040
|
get $beanFullName(): 'test-vona.service.testApp';
|
|
1017
1041
|
get $onionName(): 'test-vona:testApp';
|
|
1042
|
+
|
|
1018
1043
|
}
|
|
1019
1044
|
|
|
1020
1045
|
export interface ServiceTestClass {
|
|
@@ -1025,6 +1050,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1025
1050
|
export interface ServiceTestClass {
|
|
1026
1051
|
get $beanFullName(): 'test-vona.service.testClass';
|
|
1027
1052
|
get $onionName(): 'test-vona:testClass';
|
|
1053
|
+
|
|
1028
1054
|
}
|
|
1029
1055
|
|
|
1030
1056
|
export interface ServiceTestData {
|
|
@@ -1035,6 +1061,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1035
1061
|
export interface ServiceTestData {
|
|
1036
1062
|
get $beanFullName(): 'test-vona.service.testData';
|
|
1037
1063
|
get $onionName(): 'test-vona:testData';
|
|
1064
|
+
|
|
1038
1065
|
}
|
|
1039
1066
|
|
|
1040
1067
|
export interface ServiceTransaction {
|
|
@@ -1045,6 +1072,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1045
1072
|
export interface ServiceTransaction {
|
|
1046
1073
|
get $beanFullName(): 'test-vona.service.transaction';
|
|
1047
1074
|
get $onionName(): 'test-vona:transaction';
|
|
1075
|
+
|
|
1048
1076
|
}
|
|
1049
1077
|
|
|
1050
1078
|
export interface ServiceUser {
|
|
@@ -1055,6 +1083,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1055
1083
|
export interface ServiceUser {
|
|
1056
1084
|
get $beanFullName(): 'test-vona.service.user';
|
|
1057
1085
|
get $onionName(): 'test-vona:user';
|
|
1086
|
+
|
|
1058
1087
|
}
|
|
1059
1088
|
}
|
|
1060
1089
|
/** service: end */
|
|
@@ -1128,6 +1157,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1128
1157
|
export interface BroadcastTest {
|
|
1129
1158
|
get $beanFullName(): 'test-vona.broadcast.test';
|
|
1130
1159
|
get $onionName(): 'test-vona:test';
|
|
1160
|
+
get $onionOptions(): IDecoratorBroadcastOptions;
|
|
1131
1161
|
}
|
|
1132
1162
|
}
|
|
1133
1163
|
/** broadcast: end */
|
|
@@ -1159,6 +1189,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1159
1189
|
export interface CacheMemTest {
|
|
1160
1190
|
get $beanFullName(): 'test-vona.cacheMem.test';
|
|
1161
1191
|
get $onionName(): 'test-vona:test';
|
|
1192
|
+
get $onionOptions(): IDecoratorCacheMemOptions;
|
|
1162
1193
|
}
|
|
1163
1194
|
}
|
|
1164
1195
|
/** cacheMem: end */
|
|
@@ -1192,6 +1223,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1192
1223
|
export interface CacheRedisPost {
|
|
1193
1224
|
get $beanFullName(): 'test-vona.cacheRedis.post';
|
|
1194
1225
|
get $onionName(): 'test-vona:post';
|
|
1226
|
+
get $onionOptions(): IDecoratorCacheRedisOptions;
|
|
1195
1227
|
}
|
|
1196
1228
|
|
|
1197
1229
|
export interface CacheRedisTest {
|
|
@@ -1202,6 +1234,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1202
1234
|
export interface CacheRedisTest {
|
|
1203
1235
|
get $beanFullName(): 'test-vona.cacheRedis.test';
|
|
1204
1236
|
get $onionName(): 'test-vona:test';
|
|
1237
|
+
get $onionOptions(): IDecoratorCacheRedisOptions;
|
|
1205
1238
|
}
|
|
1206
1239
|
}
|
|
1207
1240
|
/** cacheRedis: end */
|
|
@@ -1231,6 +1264,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1231
1264
|
export interface EventHelloEcho {
|
|
1232
1265
|
get $beanFullName(): 'test-vona.event.helloEcho';
|
|
1233
1266
|
get $onionName(): 'test-vona:helloEcho';
|
|
1267
|
+
|
|
1234
1268
|
}
|
|
1235
1269
|
}
|
|
1236
1270
|
/** event: end */
|
|
@@ -1271,6 +1305,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1271
1305
|
export interface EventListenerHelloEcho {
|
|
1272
1306
|
get $beanFullName(): 'test-vona.eventListener.helloEcho';
|
|
1273
1307
|
get $onionName(): 'test-vona:helloEcho';
|
|
1308
|
+
get $onionOptions(): IDecoratorEventListenerOptions;
|
|
1274
1309
|
}
|
|
1275
1310
|
}
|
|
1276
1311
|
/** eventListener: end */
|
|
@@ -1296,6 +1331,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1296
1331
|
export interface MetaVersion {
|
|
1297
1332
|
get $beanFullName(): 'test-vona.meta.version';
|
|
1298
1333
|
get $onionName(): 'test-vona:version';
|
|
1334
|
+
|
|
1299
1335
|
}
|
|
1300
1336
|
}
|
|
1301
1337
|
/** meta: end */
|
|
@@ -1321,6 +1357,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1321
1357
|
export interface QueueTest {
|
|
1322
1358
|
get $beanFullName(): 'test-vona.queue.test';
|
|
1323
1359
|
get $onionName(): 'test-vona:test';
|
|
1360
|
+
get $onionOptions(): IDecoratorQueueOptions;
|
|
1324
1361
|
}
|
|
1325
1362
|
}
|
|
1326
1363
|
/** queue: end */
|
|
@@ -1354,6 +1391,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1354
1391
|
export interface ScheduleTest {
|
|
1355
1392
|
get $beanFullName(): 'test-vona.schedule.test';
|
|
1356
1393
|
get $onionName(): 'test-vona:test';
|
|
1394
|
+
get $onionOptions(): IDecoratorScheduleOptions;
|
|
1357
1395
|
}
|
|
1358
1396
|
|
|
1359
1397
|
export interface ScheduleTest3 {
|
|
@@ -1364,6 +1402,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1364
1402
|
export interface ScheduleTest3 {
|
|
1365
1403
|
get $beanFullName(): 'test-vona.schedule.test3';
|
|
1366
1404
|
get $onionName(): 'test-vona:test3';
|
|
1405
|
+
get $onionOptions(): IDecoratorScheduleOptions;
|
|
1367
1406
|
}
|
|
1368
1407
|
}
|
|
1369
1408
|
/** schedule: end */
|
|
@@ -1389,6 +1428,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1389
1428
|
export interface SerializerTransformEmail {
|
|
1390
1429
|
get $beanFullName(): 'test-vona.serializerTransform.email';
|
|
1391
1430
|
get $onionName(): 'test-vona:email';
|
|
1431
|
+
get $onionOptions(): ISerializerTransformOptionsEmail;
|
|
1392
1432
|
}
|
|
1393
1433
|
}
|
|
1394
1434
|
/** serializerTransform: end */
|
|
@@ -1414,6 +1454,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1414
1454
|
export interface SummerCacheTest {
|
|
1415
1455
|
get $beanFullName(): 'test-vona.summerCache.test';
|
|
1416
1456
|
get $onionName(): 'test-vona:test';
|
|
1457
|
+
get $onionOptions(): IDecoratorSummerCacheOptions;
|
|
1417
1458
|
}
|
|
1418
1459
|
}
|
|
1419
1460
|
/** summerCache: end */
|
|
@@ -1686,6 +1727,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1686
1727
|
export interface ControllerBean {
|
|
1687
1728
|
get $beanFullName(): 'test-vona.controller.bean';
|
|
1688
1729
|
get $onionName(): 'test-vona:bean';
|
|
1730
|
+
get $onionOptions(): IControllerOptionsBean;
|
|
1689
1731
|
}
|
|
1690
1732
|
|
|
1691
1733
|
export interface ControllerCacheMem {
|
|
@@ -1696,6 +1738,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1696
1738
|
export interface ControllerCacheMem {
|
|
1697
1739
|
get $beanFullName(): 'test-vona.controller.cacheMem';
|
|
1698
1740
|
get $onionName(): 'test-vona:cacheMem';
|
|
1741
|
+
get $onionOptions(): IControllerOptionsCacheMem;
|
|
1699
1742
|
}
|
|
1700
1743
|
|
|
1701
1744
|
export interface ControllerCacheRedis {
|
|
@@ -1706,6 +1749,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1706
1749
|
export interface ControllerCacheRedis {
|
|
1707
1750
|
get $beanFullName(): 'test-vona.controller.cacheRedis';
|
|
1708
1751
|
get $onionName(): 'test-vona:cacheRedis';
|
|
1752
|
+
get $onionOptions(): IControllerOptionsCacheRedis;
|
|
1709
1753
|
}
|
|
1710
1754
|
|
|
1711
1755
|
export interface ControllerCaptcha {
|
|
@@ -1716,6 +1760,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1716
1760
|
export interface ControllerCaptcha {
|
|
1717
1761
|
get $beanFullName(): 'test-vona.controller.captcha';
|
|
1718
1762
|
get $onionName(): 'test-vona:captcha';
|
|
1763
|
+
get $onionOptions(): IControllerOptionsCaptcha;
|
|
1719
1764
|
}
|
|
1720
1765
|
|
|
1721
1766
|
export interface ControllerDtoTest {
|
|
@@ -1726,6 +1771,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1726
1771
|
export interface ControllerDtoTest {
|
|
1727
1772
|
get $beanFullName(): 'test-vona.controller.dtoTest';
|
|
1728
1773
|
get $onionName(): 'test-vona:dtoTest';
|
|
1774
|
+
get $onionOptions(): IControllerOptionsDtoTest;
|
|
1729
1775
|
}
|
|
1730
1776
|
|
|
1731
1777
|
export interface ControllerGuardPassport {
|
|
@@ -1736,6 +1782,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1736
1782
|
export interface ControllerGuardPassport {
|
|
1737
1783
|
get $beanFullName(): 'test-vona.controller.guardPassport';
|
|
1738
1784
|
get $onionName(): 'test-vona:guardPassport';
|
|
1785
|
+
get $onionOptions(): IControllerOptionsGuardPassport;
|
|
1739
1786
|
}
|
|
1740
1787
|
|
|
1741
1788
|
export interface ControllerOnion {
|
|
@@ -1746,6 +1793,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1746
1793
|
export interface ControllerOnion {
|
|
1747
1794
|
get $beanFullName(): 'test-vona.controller.onion';
|
|
1748
1795
|
get $onionName(): 'test-vona:onion';
|
|
1796
|
+
get $onionOptions(): IControllerOptionsOnion;
|
|
1749
1797
|
}
|
|
1750
1798
|
|
|
1751
1799
|
export interface ControllerOrder {
|
|
@@ -1756,6 +1804,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1756
1804
|
export interface ControllerOrder {
|
|
1757
1805
|
get $beanFullName(): 'test-vona.controller.order';
|
|
1758
1806
|
get $onionName(): 'test-vona:order';
|
|
1807
|
+
get $onionOptions(): IControllerOptionsOrder;
|
|
1759
1808
|
}
|
|
1760
1809
|
|
|
1761
1810
|
export interface ControllerPassport {
|
|
@@ -1766,6 +1815,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1766
1815
|
export interface ControllerPassport {
|
|
1767
1816
|
get $beanFullName(): 'test-vona.controller.passport';
|
|
1768
1817
|
get $onionName(): 'test-vona:passport';
|
|
1818
|
+
get $onionOptions(): IControllerOptionsPassport;
|
|
1769
1819
|
}
|
|
1770
1820
|
|
|
1771
1821
|
export interface ControllerPerformAction {
|
|
@@ -1776,6 +1826,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1776
1826
|
export interface ControllerPerformAction {
|
|
1777
1827
|
get $beanFullName(): 'test-vona.controller.performAction';
|
|
1778
1828
|
get $onionName(): 'test-vona:performAction';
|
|
1829
|
+
get $onionOptions(): IControllerOptionsPerformAction;
|
|
1779
1830
|
}
|
|
1780
1831
|
|
|
1781
1832
|
export interface ControllerPost {
|
|
@@ -1786,6 +1837,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1786
1837
|
export interface ControllerPost {
|
|
1787
1838
|
get $beanFullName(): 'test-vona.controller.post';
|
|
1788
1839
|
get $onionName(): 'test-vona:post';
|
|
1840
|
+
get $onionOptions(): IControllerOptionsPost;
|
|
1789
1841
|
}
|
|
1790
1842
|
|
|
1791
1843
|
export interface ControllerQueue {
|
|
@@ -1796,6 +1848,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1796
1848
|
export interface ControllerQueue {
|
|
1797
1849
|
get $beanFullName(): 'test-vona.controller.queue';
|
|
1798
1850
|
get $onionName(): 'test-vona:queue';
|
|
1851
|
+
get $onionOptions(): IControllerOptionsQueue;
|
|
1799
1852
|
}
|
|
1800
1853
|
|
|
1801
1854
|
export interface ControllerSerializer {
|
|
@@ -1806,6 +1859,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1806
1859
|
export interface ControllerSerializer {
|
|
1807
1860
|
get $beanFullName(): 'test-vona.controller.serializer';
|
|
1808
1861
|
get $onionName(): 'test-vona:serializer';
|
|
1862
|
+
get $onionOptions(): IControllerOptionsSerializer;
|
|
1809
1863
|
}
|
|
1810
1864
|
|
|
1811
1865
|
export interface ControllerSummer {
|
|
@@ -1816,6 +1870,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1816
1870
|
export interface ControllerSummer {
|
|
1817
1871
|
get $beanFullName(): 'test-vona.controller.summer';
|
|
1818
1872
|
get $onionName(): 'test-vona:summer';
|
|
1873
|
+
get $onionOptions(): IControllerOptionsSummer;
|
|
1819
1874
|
}
|
|
1820
1875
|
|
|
1821
1876
|
export interface ControllerTail {
|
|
@@ -1826,6 +1881,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1826
1881
|
export interface ControllerTail {
|
|
1827
1882
|
get $beanFullName(): 'test-vona.controller.tail';
|
|
1828
1883
|
get $onionName(): 'test-vona:tail';
|
|
1884
|
+
get $onionOptions(): IControllerOptionsTail;
|
|
1829
1885
|
}
|
|
1830
1886
|
|
|
1831
1887
|
export interface ControllerTransaction {
|
|
@@ -1836,6 +1892,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1836
1892
|
export interface ControllerTransaction {
|
|
1837
1893
|
get $beanFullName(): 'test-vona.controller.transaction';
|
|
1838
1894
|
get $onionName(): 'test-vona:transaction';
|
|
1895
|
+
get $onionOptions(): IControllerOptionsTransaction;
|
|
1839
1896
|
}
|
|
1840
1897
|
|
|
1841
1898
|
export interface ControllerUpload {
|
|
@@ -1846,6 +1903,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1846
1903
|
export interface ControllerUpload {
|
|
1847
1904
|
get $beanFullName(): 'test-vona.controller.upload';
|
|
1848
1905
|
get $onionName(): 'test-vona:upload';
|
|
1906
|
+
get $onionOptions(): IControllerOptionsUpload;
|
|
1849
1907
|
}
|
|
1850
1908
|
}
|
|
1851
1909
|
/** controller: end */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IDecoratorControllerOptions } from 'vona-module-a-web';
|
|
2
2
|
import { BeanBase } from 'vona';
|
|
3
|
-
import {
|
|
3
|
+
import { Core } from 'vona-module-a-core';
|
|
4
4
|
import { Passport } from 'vona-module-a-user';
|
|
5
5
|
import { Arg, Controller, Web } from 'vona-module-a-web';
|
|
6
6
|
import { DtoSignin } from '../dto/signin.ts';
|
|
@@ -11,7 +11,7 @@ export interface IControllerOptionsCaptcha extends IDecoratorControllerOptions {
|
|
|
11
11
|
export class ControllerCaptcha extends BeanBase {
|
|
12
12
|
@Web.post('signin')
|
|
13
13
|
@Passport.public()
|
|
14
|
-
@
|
|
14
|
+
@Core.captchaVerify({ scene: 'a-captchasimple:simple' })
|
|
15
15
|
async signin(@Arg.body() _user: DtoSignin) {
|
|
16
16
|
}
|
|
17
17
|
}
|
package/src/controller/onion.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { BeanBase } from 'vona';
|
|
|
3
3
|
import { Aspect } from 'vona-module-a-aspect';
|
|
4
4
|
import { Core } from 'vona-module-a-core';
|
|
5
5
|
import { Api, v } from 'vona-module-a-openapi';
|
|
6
|
-
import { Database } from 'vona-module-a-orm';
|
|
7
6
|
import { Passport } from 'vona-module-a-user';
|
|
8
7
|
import { Arg, Controller, Web } from 'vona-module-a-web';
|
|
9
8
|
import { z } from 'zod';
|
|
@@ -27,7 +26,7 @@ export class ControllerOnion extends BeanBase {
|
|
|
27
26
|
@Aspect.middlewareGlobal('a-core:gate', { gate: { mode: 'dev' } })
|
|
28
27
|
@Core.gate({ gate: { mode: 'dev' } })
|
|
29
28
|
@Aspect.aopMethod('a-orm:transaction', { isolationLevel: 'SERIALIZABLE', readOnly: true })
|
|
30
|
-
@
|
|
29
|
+
@Core.transaction({ isolationLevel: 'READ_COMMITTED', readOnly: false })
|
|
31
30
|
@Api.body(v.optional(), z.string())
|
|
32
31
|
echo(
|
|
33
32
|
@Arg.query('id', v.default(0), z.number()) id: number,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IDecoratorControllerOptions } from 'vona-module-a-web';
|
|
2
2
|
import { BeanBase } from 'vona';
|
|
3
|
+
import { Core } from 'vona-module-a-core';
|
|
3
4
|
import { Api } from 'vona-module-a-openapi';
|
|
4
|
-
import { Database } from 'vona-module-a-orm';
|
|
5
5
|
import { Passport } from 'vona-module-a-user';
|
|
6
6
|
import { Arg, Controller, Web } from 'vona-module-a-web';
|
|
7
7
|
|
|
@@ -13,7 +13,7 @@ export interface IControllerOptionsTransaction extends IDecoratorControllerOptio
|
|
|
13
13
|
@Api.exclude()
|
|
14
14
|
export class ControllerTransaction extends BeanBase {
|
|
15
15
|
@Web.post('fail')
|
|
16
|
-
@
|
|
16
|
+
@Core.transaction()
|
|
17
17
|
@Passport.public()
|
|
18
18
|
async fail(@Arg.body() item: object) {
|
|
19
19
|
await this.bean.model.update(`${tableNameFail}` as any, item);
|
|
@@ -21,7 +21,7 @@ export class ControllerTransaction extends BeanBase {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
@Web.post('success')
|
|
24
|
-
@
|
|
24
|
+
@Core.transaction()
|
|
25
25
|
@Passport.public()
|
|
26
26
|
async success(@Arg.body() item: object) {
|
|
27
27
|
await this.bean.model.update(tableNameSuccess as any, item);
|
package/src/controller/upload.ts
CHANGED
|
@@ -2,8 +2,9 @@ import type { IUploadField, IUploadFile } from 'vona-module-a-upload';
|
|
|
2
2
|
import type { IDecoratorControllerOptions } from 'vona-module-a-web';
|
|
3
3
|
import assert from 'node:assert';
|
|
4
4
|
import { BeanBase } from 'vona';
|
|
5
|
+
import { Core } from 'vona-module-a-core';
|
|
5
6
|
import { Api, v } from 'vona-module-a-openapi';
|
|
6
|
-
import {
|
|
7
|
+
import { SymbolUploadValue } from 'vona-module-a-upload';
|
|
7
8
|
import { Passport } from 'vona-module-a-user';
|
|
8
9
|
import { Arg, Controller, Web } from 'vona-module-a-web';
|
|
9
10
|
import { z } from 'zod';
|
|
@@ -14,7 +15,7 @@ export interface IControllerOptionsUpload extends IDecoratorControllerOptions {}
|
|
|
14
15
|
export class ControllerUpload extends BeanBase {
|
|
15
16
|
@Web.post('fields')
|
|
16
17
|
@Passport.public()
|
|
17
|
-
@
|
|
18
|
+
@Core.fileUpload()
|
|
18
19
|
@Api.contentType('application/json')
|
|
19
20
|
fields(
|
|
20
21
|
@Arg.fields() fields: IUploadField[],
|
|
@@ -29,7 +30,7 @@ export class ControllerUpload extends BeanBase {
|
|
|
29
30
|
|
|
30
31
|
@Web.post('file')
|
|
31
32
|
@Passport.public()
|
|
32
|
-
@
|
|
33
|
+
@Core.fileUpload()
|
|
33
34
|
@Api.contentType('application/json')
|
|
34
35
|
file(@Arg.field('name', v.default('zhennann')) name: string, @Arg.file('welcome') file: IUploadFile) {
|
|
35
36
|
assert.equal(name, 'zhennann');
|
|
@@ -39,7 +40,7 @@ export class ControllerUpload extends BeanBase {
|
|
|
39
40
|
|
|
40
41
|
@Web.post('files')
|
|
41
42
|
@Passport.public()
|
|
42
|
-
@
|
|
43
|
+
@Core.fileUpload()
|
|
43
44
|
@Api.contentType('application/json')
|
|
44
45
|
files(
|
|
45
46
|
@Arg.files(v.title('more files')) files: IUploadFile[],
|
package/src/service/post.ts
CHANGED
|
@@ -2,7 +2,8 @@ import type { TableIdentity } from 'table-identity';
|
|
|
2
2
|
import type { IQueryParams } from 'vona-module-a-orm';
|
|
3
3
|
import { BeanBase } from 'vona';
|
|
4
4
|
import { Service } from 'vona-module-a-bean';
|
|
5
|
-
import {
|
|
5
|
+
import { Core } from 'vona-module-a-core';
|
|
6
|
+
import { $relationDynamic } from 'vona-module-a-orm';
|
|
6
7
|
import { ModelPost } from '../model/post.ts';
|
|
7
8
|
import { ModelPostContent } from '../model/postContent.ts';
|
|
8
9
|
|
|
@@ -118,7 +119,7 @@ export class ServicePost extends BeanBase {
|
|
|
118
119
|
console.log(post?.postContent?.id);
|
|
119
120
|
}
|
|
120
121
|
|
|
121
|
-
@
|
|
122
|
+
@Core.transaction()
|
|
122
123
|
async transaction() {
|
|
123
124
|
// insert
|
|
124
125
|
const post = await this.scope.model.post.insert({
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { BeanBase } from 'vona';
|
|
2
2
|
import { Service } from 'vona-module-a-bean';
|
|
3
|
-
import {
|
|
3
|
+
import { Core } from 'vona-module-a-core';
|
|
4
4
|
|
|
5
5
|
const tableNameFail = '__tempTransactionFail';
|
|
6
6
|
const tableNameSuccess = '__tempTransactionSuccess';
|
|
7
7
|
|
|
8
8
|
@Service()
|
|
9
9
|
export class ServiceTransaction extends BeanBase {
|
|
10
|
-
@
|
|
10
|
+
@Core.transaction()
|
|
11
11
|
async fail(item: object) {
|
|
12
12
|
await this.bean.model.update(`${tableNameFail}` as any, item);
|
|
13
13
|
await this.bean.model.update(`${tableNameFail}error` as any, item);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
@
|
|
16
|
+
@Core.transaction()
|
|
17
17
|
async success(item: object) {
|
|
18
18
|
await this.bean.model.update(tableNameSuccess as any, item);
|
|
19
19
|
}
|