vona-cli-set-api 1.0.230 → 1.0.234
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 -0
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-index/src/.metadata/index.ts +2 -0
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-user/src/.metadata/index.ts +2 -0
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-user/src/controller/passport.ts +1 -1
- package/cli/templates/init/error/boilerplate/config/errors.ts +1 -1
- package/dist/lib/bean/toolsMetadata/generateConfig.d.ts +1 -1
- package/dist/lib/bean/toolsMetadata/generateConfig.js +1 -1
- package/dist/lib/bean/toolsMetadata/generateScope.js +7 -1
- package/package.json +2 -2
|
@@ -42,7 +42,7 @@ export class ControllerPassport extends BeanBase {
|
|
|
42
42
|
|
|
43
43
|
@Web.post('login')
|
|
44
44
|
@Passport.public()
|
|
45
|
-
|
|
45
|
+
@Captcha.verify({ 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');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const errors = {} as const;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare function generateConfig(modulePath: string): Promise<"" | "/** config: begin */\nexport * from '../config/config.ts';\nimport type { config } from '../config/config.ts';\n/** config: end */\n">;
|
|
2
2
|
export declare function generateConstant(modulePath: string): Promise<"" | "/** constant: begin */\nexport * from '../config/constants.ts';\nimport { constants } from '../config/constants.ts';\n/** constant: end */\n">;
|
|
3
3
|
export declare function generateLocale(modulePath: string): Promise<string>;
|
|
4
|
-
export declare function generateError(modulePath: string): Promise<"" | "/** error: begin */\nexport * from '../config/errors.ts';\nimport type {
|
|
4
|
+
export declare function generateError(modulePath: string): Promise<"" | "/** error: begin */\nexport * from '../config/errors.ts';\nimport type { errors } from '../config/errors.ts';\n/** error: end */\n">;
|
|
@@ -55,7 +55,7 @@ export async function generateError(modulePath) {
|
|
|
55
55
|
// combine
|
|
56
56
|
const content = `/** error: begin */
|
|
57
57
|
export * from '../config/errors.ts';
|
|
58
|
-
import type {
|
|
58
|
+
import type { errors } from '../config/errors.ts';
|
|
59
59
|
/** error: end */
|
|
60
60
|
`;
|
|
61
61
|
return content;
|
|
@@ -17,7 +17,7 @@ export async function generateScope(moduleName, relativeNameCapitalize, scopeRes
|
|
|
17
17
|
}
|
|
18
18
|
if (options.errors) {
|
|
19
19
|
contentImports.push('type TypeModuleErrors');
|
|
20
|
-
contentRecords.push('error: TypeModuleErrors<typeof
|
|
20
|
+
contentRecords.push('error: TypeModuleErrors<typeof errors>;');
|
|
21
21
|
}
|
|
22
22
|
if (options.locales) {
|
|
23
23
|
contentImports.push('type TypeModuleLocales');
|
|
@@ -65,6 +65,12 @@ declare module 'vona' {
|
|
|
65
65
|
'${moduleName}': (typeof locales)[TypeLocaleBase];
|
|
66
66
|
}`
|
|
67
67
|
: ''}
|
|
68
|
+
|
|
69
|
+
${options.errors
|
|
70
|
+
? `export interface IBeanScopeErrors {
|
|
71
|
+
'${moduleName}': typeof errors;
|
|
72
|
+
}`
|
|
73
|
+
: ''}
|
|
68
74
|
}
|
|
69
75
|
${options.locales
|
|
70
76
|
? `\nexport function $locale<K extends keyof (typeof locales)[TypeLocaleBase]>(key: K): \`${moduleName}::\${K}\` {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-cli-set-api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.234",
|
|
5
5
|
"description": "vona cli-set-api",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"ts-node": "^10.9.2",
|
|
62
62
|
"urllib": "^4.6.11",
|
|
63
63
|
"uuid": "^11.1.0",
|
|
64
|
-
"vona-core": "^5.0.
|
|
64
|
+
"vona-core": "^5.0.63",
|
|
65
65
|
"why-is-node-running": "^3.2.2",
|
|
66
66
|
"yargs-parser": "^21.1.1"
|
|
67
67
|
},
|