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.
@@ -45,7 +45,7 @@
45
45
  }
46
46
  },
47
47
  "dependencies": {
48
- "vona": "^5.0.136"
48
+ "vona": "^5.0.138"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@cabloy/lint": "^5.0.16",
@@ -101,6 +101,8 @@ declare module 'vona' {
101
101
  export interface IBeanScopeLocale {
102
102
  'home-index': (typeof locales)[TypeLocaleBase];
103
103
  }
104
+
105
+
104
106
  }
105
107
 
106
108
  export function $locale<K extends keyof (typeof locales)[TypeLocaleBase]>(key: K): `home-index::${K}` {
@@ -595,6 +595,8 @@ declare module 'vona' {
595
595
  export interface IBeanScopeLocale {
596
596
  'home-user': (typeof locales)[TypeLocaleBase];
597
597
  }
598
+
599
+
598
600
  }
599
601
 
600
602
  export function $locale<K extends keyof (typeof locales)[TypeLocaleBase]>(key: K): `home-user::${K}` {
@@ -42,7 +42,7 @@ export class ControllerPassport extends BeanBase {
42
42
 
43
43
  @Web.post('login')
44
44
  @Passport.public()
45
- // @Captcha.verify({ scene: 'a-captchasimple:simple' })
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 enum Errors {}
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 { Errors } from '../config/errors.ts';\n/** error: end */\n">;
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 { Errors } from '../config/errors.ts';
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 Errors>;');
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.230",
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.61",
64
+ "vona-core": "^5.0.63",
65
65
  "why-is-node-running": "^3.2.2",
66
66
  "yargs-parser": "^21.1.1"
67
67
  },