vona-cli-set-api 1.0.285 → 1.0.289

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.
@@ -46,7 +46,7 @@
46
46
  }
47
47
  },
48
48
  "dependencies": {
49
- "vona": "^5.0.165"
49
+ "vona": "^5.0.168"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@cabloy/lint": "^5.0.16",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-module-home-user",
3
3
  "type": "module",
4
- "version": "5.0.12",
4
+ "version": "5.0.14",
5
5
  "title": "home-user",
6
6
  "vonaModule": {
7
7
  "fileVersion": 1,
@@ -1,5 +1,5 @@
1
1
  import type { IPassport, IPassportAdapter } from 'vona-module-a-user';
2
- import type { IPayloadData } from '../types/passport.ts';
2
+ import type { IPayloadDataOfPassport } from '../types/jwt.ts';
3
3
  import { BeanBase } from 'vona';
4
4
  import { Service } from 'vona-module-a-bean';
5
5
 
@@ -15,13 +15,13 @@ export class ServicePassportAdapter extends BeanBase implements IPassportAdapter
15
15
  return passport;
16
16
  }
17
17
 
18
- async serialize(passport: IPassport): Promise<IPayloadData> {
18
+ async serialize(passport: IPassport): Promise<IPayloadDataOfPassport> {
19
19
  const userId = passport.user!.id;
20
20
  const authId = passport.auth!.id;
21
21
  return { userId, authId };
22
22
  }
23
23
 
24
- async deserialize(payloadData: IPayloadData): Promise<IPassport | undefined> {
24
+ async deserialize(payloadData: IPayloadDataOfPassport): Promise<IPassport | undefined> {
25
25
  const user = await this.bean.user.findOneById(payloadData.userId);
26
26
  if (!user) return;
27
27
  const auth = await this.bean.auth.findOne({ id: payloadData.authId });
@@ -0,0 +1,5 @@
1
+ export interface IAuthCustom {}
2
+
3
+ declare module 'vona-module-a-user' {
4
+ export interface IAuth extends IAuthCustom {}
5
+ }
@@ -1,3 +1,5 @@
1
+ export * from './auth.ts';
2
+ export * from './jwt.ts';
1
3
  export * from './passport.ts';
2
4
  export * from './role.ts';
3
5
  export * from './user.ts';
@@ -0,0 +1,8 @@
1
+ import type { TableIdentity } from 'table-identity';
2
+ import type { IPayloadData } from 'vona-module-a-jwt';
3
+
4
+ export interface IPayloadDataOfPassport extends IPayloadData {
5
+ userId: TableIdentity;
6
+ authId: TableIdentity;
7
+ token?: string;
8
+ }
@@ -1,12 +1,3 @@
1
- import type { TableIdentity } from 'table-identity';
2
- import type { IPayloadDataBase } from 'vona-module-a-jwt';
3
-
4
- export interface IPayloadData extends IPayloadDataBase {
5
- userId: TableIdentity;
6
- authId: TableIdentity;
7
- token?: string;
8
- }
9
-
10
1
  export interface IPassportCustom {}
11
2
 
12
3
  declare module 'vona-module-a-user' {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-suite-a-home",
3
3
  "type": "module",
4
- "version": "5.0.13",
4
+ "version": "5.0.15",
5
5
  "title": "a-home",
6
6
  "description": "",
7
7
  "author": "zhennann",
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.285",
4
+ "version": "1.0.289",
5
5
  "description": "vona cli-set-api",
6
6
  "publishConfig": {
7
7
  "access": "public"