vona-cli-set-api 1.0.235 → 1.0.239
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/cli/templates/create/project/basic/boilerplate/package.original.json +1 -1
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-base/src/.metadata/index.ts +2 -2
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-index/src/.metadata/index.ts +3 -3
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-user/src/.metadata/index.ts +8 -8
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-user/src/controller/passport.ts +3 -3
- package/dist/lib/bean/toolsMetadata/generateOnions.js +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import type { TypeControllerOptionsActions } from 'vona-module-a-openapi';
|
|
|
3
3
|
/** service: begin */
|
|
4
4
|
export * from '../service/menu.ts';
|
|
5
5
|
|
|
6
|
-
import 'vona';
|
|
6
|
+
import 'vona-module-a-bean';
|
|
7
7
|
declare module 'vona-module-a-bean' {
|
|
8
8
|
|
|
9
9
|
export interface IServiceRecord {
|
|
@@ -43,7 +43,7 @@ declare module 'vona' {
|
|
|
43
43
|
/** controller: begin */
|
|
44
44
|
export * from '../controller/menu.ts';
|
|
45
45
|
import type { IControllerOptionsMenu } from '../controller/menu.ts';
|
|
46
|
-
import 'vona';
|
|
46
|
+
import 'vona-module-a-web';
|
|
47
47
|
declare module 'vona-module-a-web' {
|
|
48
48
|
|
|
49
49
|
export interface IControllerRecord {
|
|
@@ -3,8 +3,8 @@ import type { TypeControllerOptionsActions } from 'vona-module-a-openapi';
|
|
|
3
3
|
/** meta: begin */
|
|
4
4
|
export * from '../bean/meta.printTip.ts';
|
|
5
5
|
|
|
6
|
-
import 'vona';
|
|
7
|
-
declare module 'vona' {
|
|
6
|
+
import 'vona-module-a-meta';
|
|
7
|
+
declare module 'vona-module-a-meta' {
|
|
8
8
|
|
|
9
9
|
export interface IMetaRecord {
|
|
10
10
|
'home-index:printTip': never;
|
|
@@ -28,7 +28,7 @@ declare module 'vona-module-home-index' {
|
|
|
28
28
|
/** controller: begin */
|
|
29
29
|
export * from '../controller/home.ts';
|
|
30
30
|
import type { IControllerOptionsHome } from '../controller/home.ts';
|
|
31
|
-
import 'vona';
|
|
31
|
+
import 'vona-module-a-web';
|
|
32
32
|
declare module 'vona-module-a-web' {
|
|
33
33
|
|
|
34
34
|
export interface IControllerRecord {
|
|
@@ -9,7 +9,7 @@ export * from '../entity/user.ts';
|
|
|
9
9
|
import type { IEntityOptionsRole } from '../entity/role.ts';
|
|
10
10
|
import type { IEntityOptionsRoleUser } from '../entity/roleUser.ts';
|
|
11
11
|
import type { IEntityOptionsUser } from '../entity/user.ts';
|
|
12
|
-
import 'vona';
|
|
12
|
+
import 'vona-module-a-orm';
|
|
13
13
|
declare module 'vona-module-a-orm' {
|
|
14
14
|
|
|
15
15
|
export interface IEntityRecord {
|
|
@@ -70,7 +70,7 @@ export * from '../model/user.ts';
|
|
|
70
70
|
import type { IModelOptionsRole } from '../model/role.ts';
|
|
71
71
|
import type { IModelOptionsRoleUser } from '../model/roleUser.ts';
|
|
72
72
|
import type { IModelOptionsUser } from '../model/user.ts';
|
|
73
|
-
import 'vona';
|
|
73
|
+
import 'vona-module-a-orm';
|
|
74
74
|
declare module 'vona-module-a-orm' {
|
|
75
75
|
|
|
76
76
|
export interface IModelRecord {
|
|
@@ -235,7 +235,7 @@ export * from '../service/passportAdapter.ts';
|
|
|
235
235
|
export * from '../service/roleAdapter.ts';
|
|
236
236
|
export * from '../service/userAdapter.ts';
|
|
237
237
|
|
|
238
|
-
import 'vona';
|
|
238
|
+
import 'vona-module-a-bean';
|
|
239
239
|
declare module 'vona-module-a-bean' {
|
|
240
240
|
|
|
241
241
|
export interface IServiceRecord {
|
|
@@ -365,8 +365,8 @@ declare module 'vona-module-home-user' {
|
|
|
365
365
|
export * from '../bean/meta.index.ts';
|
|
366
366
|
export * from '../bean/meta.version.ts';
|
|
367
367
|
import type { IMetaOptionsIndex } from 'vona-module-a-index';
|
|
368
|
-
import 'vona';
|
|
369
|
-
declare module 'vona' {
|
|
368
|
+
import 'vona-module-a-meta';
|
|
369
|
+
declare module 'vona-module-a-meta' {
|
|
370
370
|
|
|
371
371
|
export interface IMetaRecord {
|
|
372
372
|
'home-user:index': IMetaOptionsIndex;
|
|
@@ -407,7 +407,7 @@ import type { IDtoOptionsLogin } from '../dto/login.ts';
|
|
|
407
407
|
import type { IDtoOptionsPassport } from '../dto/passport.ts';
|
|
408
408
|
import type { IDtoOptionsPassportJwt } from '../dto/passportJwt.ts';
|
|
409
409
|
import type { IDtoOptionsRegister } from '../dto/register.ts';
|
|
410
|
-
import 'vona';
|
|
410
|
+
import 'vona-module-a-web';
|
|
411
411
|
declare module 'vona-module-a-web' {
|
|
412
412
|
|
|
413
413
|
export interface IDtoRecord {
|
|
@@ -450,7 +450,7 @@ declare module 'vona-module-home-user' {
|
|
|
450
450
|
/** controller: begin */
|
|
451
451
|
export * from '../controller/passport.ts';
|
|
452
452
|
import type { IControllerOptionsPassport } from '../controller/passport.ts';
|
|
453
|
-
import 'vona';
|
|
453
|
+
import 'vona-module-a-web';
|
|
454
454
|
declare module 'vona-module-a-web' {
|
|
455
455
|
|
|
456
456
|
export interface IControllerRecord {
|
|
@@ -506,7 +506,7 @@ export * from '../bean/zodRefine.usernameUnique.ts';
|
|
|
506
506
|
import type { IZodRefineOptionsEmailUnique } from '../bean/zodRefine.emailUnique.ts';
|
|
507
507
|
import type { IZodRefineOptionsPasswordConfirm } from '../bean/zodRefine.passwordConfirm.ts';
|
|
508
508
|
import type { IZodRefineOptionsUsernameUnique } from '../bean/zodRefine.usernameUnique.ts';
|
|
509
|
-
import 'vona';
|
|
509
|
+
import 'vona-module-a-zod';
|
|
510
510
|
declare module 'vona-module-a-zod' {
|
|
511
511
|
|
|
512
512
|
export interface IZodRefineRecord {
|
|
@@ -4,7 +4,7 @@ import type { IDecoratorControllerOptions } from 'vona-module-a-web';
|
|
|
4
4
|
import type { EntityRole } from '../entity/role.ts';
|
|
5
5
|
import type { EntityUser } from '../entity/user.ts';
|
|
6
6
|
import { BeanBase } from 'vona';
|
|
7
|
-
import {
|
|
7
|
+
import { Core } from 'vona-module-a-core';
|
|
8
8
|
import { DtoJwtToken } from 'vona-module-a-jwt';
|
|
9
9
|
import { Api, v } from 'vona-module-a-openapi';
|
|
10
10
|
import { Passport } from 'vona-module-a-user';
|
|
@@ -33,7 +33,7 @@ export class ControllerPassport extends BeanBase {
|
|
|
33
33
|
|
|
34
34
|
@Web.post('register')
|
|
35
35
|
@Passport.public()
|
|
36
|
-
@
|
|
36
|
+
@Core.captchaVerify({ scene: 'a-captchasimple:simple' })
|
|
37
37
|
@Api.body(v.object(DtoPassportJwt))
|
|
38
38
|
async register(@Arg.body() data: DtoRegister) {
|
|
39
39
|
const jwt = await this.bean.authSimple.authenticate(data, 'register', 'default');
|
|
@@ -42,7 +42,7 @@ export class ControllerPassport extends BeanBase {
|
|
|
42
42
|
|
|
43
43
|
@Web.post('login')
|
|
44
44
|
@Passport.public()
|
|
45
|
-
@
|
|
45
|
+
@Core.captchaVerify({ scene: 'a-captchasimple:simple' })
|
|
46
46
|
@Api.body(v.object(DtoPassportJwt))
|
|
47
47
|
async login(@Arg.body() data: DtoLogin): Promise<DtoPassportJwt> {
|
|
48
48
|
const jwt = await this.bean.authSimple.authenticate(data, 'login', 'default');
|
|
@@ -91,7 +91,7 @@ ${contentExports.join('\n')}
|
|
|
91
91
|
${contentImports.join('\n')}
|
|
92
92
|
${needImportOptionsGlobalInterface
|
|
93
93
|
? `import { type ${sceneMeta.optionsGlobalInterfaceName} } from '${sceneMeta.optionsGlobalInterfaceFrom || 'vona'}';`
|
|
94
|
-
:
|
|
94
|
+
: `import '${sceneMeta.optionsGlobalInterfaceFrom || 'vona'}';`}
|
|
95
95
|
declare module '${sceneMeta.optionsGlobalInterfaceFrom || 'vona'}' {
|
|
96
96
|
${contentRecordsGlobal.length > 0 ? exportRecordsMiddlewareGlobal : ''}
|
|
97
97
|
${contentRecordsLocal.length > 0 ? exportRecordsMiddlewareLocal : ''}
|