vona-module-test-vona 5.0.46 → 5.0.48
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 +13 -0
- package/dist/controller/order.d.ts +8 -0
- package/dist/index.js +367 -354
- package/package.json +1 -1
- package/src/.metadata/index.ts +19 -0
- package/src/controller/order.ts +20 -0
- package/test/captcha.test.ts +1 -1
package/package.json
CHANGED
package/src/.metadata/index.ts
CHANGED
|
@@ -1463,6 +1463,7 @@ export * from '../controller/captcha.ts';
|
|
|
1463
1463
|
export * from '../controller/dtoTest.ts';
|
|
1464
1464
|
export * from '../controller/guardPassport.ts';
|
|
1465
1465
|
export * from '../controller/onion.ts';
|
|
1466
|
+
export * from '../controller/order.ts';
|
|
1466
1467
|
export * from '../controller/passport.ts';
|
|
1467
1468
|
export * from '../controller/performAction.ts';
|
|
1468
1469
|
export * from '../controller/post.ts';
|
|
@@ -1478,6 +1479,7 @@ import type { IControllerOptionsCaptcha } from '../controller/captcha.ts';
|
|
|
1478
1479
|
import type { IControllerOptionsDtoTest } from '../controller/dtoTest.ts';
|
|
1479
1480
|
import type { IControllerOptionsGuardPassport } from '../controller/guardPassport.ts';
|
|
1480
1481
|
import type { IControllerOptionsOnion } from '../controller/onion.ts';
|
|
1482
|
+
import type { IControllerOptionsOrder } from '../controller/order.ts';
|
|
1481
1483
|
import type { IControllerOptionsPassport } from '../controller/passport.ts';
|
|
1482
1484
|
import type { IControllerOptionsPerformAction } from '../controller/performAction.ts';
|
|
1483
1485
|
import type { IControllerOptionsPost } from '../controller/post.ts';
|
|
@@ -1497,6 +1499,7 @@ declare module 'vona-module-a-web' {
|
|
|
1497
1499
|
'test-vona:dtoTest': IControllerOptionsDtoTest;
|
|
1498
1500
|
'test-vona:guardPassport': IControllerOptionsGuardPassport;
|
|
1499
1501
|
'test-vona:onion': IControllerOptionsOnion;
|
|
1502
|
+
'test-vona:order': IControllerOptionsOrder;
|
|
1500
1503
|
'test-vona:passport': IControllerOptionsPassport;
|
|
1501
1504
|
'test-vona:performAction': IControllerOptionsPerformAction;
|
|
1502
1505
|
'test-vona:post': IControllerOptionsPost;
|
|
@@ -1581,6 +1584,16 @@ declare module 'vona-module-test-vona' {
|
|
|
1581
1584
|
get $onionName(): 'test-vona:onion';
|
|
1582
1585
|
}
|
|
1583
1586
|
|
|
1587
|
+
export interface ControllerOrder {
|
|
1588
|
+
/** @internal */
|
|
1589
|
+
get scope(): ScopeModuleTestVona;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
export interface ControllerOrder {
|
|
1593
|
+
get $beanFullName(): 'test-vona.controller.order';
|
|
1594
|
+
get $onionName(): 'test-vona:order';
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1584
1597
|
export interface ControllerPassport {
|
|
1585
1598
|
/** @internal */
|
|
1586
1599
|
get scope(): ScopeModuleTestVona;
|
|
@@ -1678,6 +1691,8 @@ import type { ControllerGuardPassport } from '../controller/guardPassport.ts';
|
|
|
1678
1691
|
// @ts-ignore ignore
|
|
1679
1692
|
import type { ControllerOnion } from '../controller/onion.ts';
|
|
1680
1693
|
// @ts-ignore ignore
|
|
1694
|
+
import type { ControllerOrder } from '../controller/order.ts';
|
|
1695
|
+
// @ts-ignore ignore
|
|
1681
1696
|
import type { ControllerPassport } from '../controller/passport.ts';
|
|
1682
1697
|
// @ts-ignore ignore
|
|
1683
1698
|
import type { ControllerPerformAction } from '../controller/performAction.ts';
|
|
@@ -1723,6 +1738,10 @@ declare module 'vona-module-test-vona' {
|
|
|
1723
1738
|
actions?: TypeControllerOptionsActions<ControllerOnion>;
|
|
1724
1739
|
}
|
|
1725
1740
|
|
|
1741
|
+
export interface IControllerOptionsOrder {
|
|
1742
|
+
actions?: TypeControllerOptionsActions<ControllerOrder>;
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1726
1745
|
export interface IControllerOptionsPassport {
|
|
1727
1746
|
actions?: TypeControllerOptionsActions<ControllerPassport>;
|
|
1728
1747
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IDecoratorControllerOptions } from 'vona-module-a-web';
|
|
2
|
+
import { BeanBase } from 'vona';
|
|
3
|
+
import { Api, v } from 'vona-module-a-openapi';
|
|
4
|
+
import { Controller, Web } from 'vona-module-a-web';
|
|
5
|
+
import { DtoOrderResult } from '../dto/orderResult.ts';
|
|
6
|
+
|
|
7
|
+
export interface IControllerOptionsOrder extends IDecoratorControllerOptions {}
|
|
8
|
+
|
|
9
|
+
@Controller<IControllerOptionsOrder>('order')
|
|
10
|
+
export class ControllerOrder extends BeanBase {
|
|
11
|
+
@Web.get('findAll')
|
|
12
|
+
@Api.body(v.array(DtoOrderResult))
|
|
13
|
+
async findAll(): Promise<DtoOrderResult[]> {
|
|
14
|
+
return this.scope.model.order.select({
|
|
15
|
+
include: {
|
|
16
|
+
products: true,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
package/test/captcha.test.ts
CHANGED
|
@@ -43,7 +43,7 @@ describe('captcha.test.ts', () => {
|
|
|
43
43
|
},
|
|
44
44
|
});
|
|
45
45
|
assert.equal(captcha2.provider, providerName);
|
|
46
|
-
assert.
|
|
46
|
+
assert.equal(captcha2.id, captcha.id);
|
|
47
47
|
// get token
|
|
48
48
|
const captchaData = await app.bean.captcha.getCaptchaData(captcha2.id);
|
|
49
49
|
// verifyImmediate: error
|