karin-plugin-mys-core 1.0.3 → 1.0.5
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/README.md +1031 -76
- package/lib/apps/MiHoYoLogin.js +19 -18
- package/lib/apps/MysDevice.js +16 -17
- package/lib/apps/UIDManage.js +17 -16
- package/lib/{array-DuqoS2wx.d.ts → array-CCexQ14j.d.ts} +1 -1
- package/lib/{chunk-KN5SHBVI.js → chunk-7ZQQ76WC.js} +1 -1
- package/lib/chunk-AY34PPJT.js +72 -0
- package/lib/{chunk-COKAJ7V6.js → chunk-BH4S574A.js} +1 -1
- package/lib/{chunk-UVMX6WUC.js → chunk-BNSHDFFN.js} +4 -4
- package/lib/{chunk-3BIQN6QA.js → chunk-BWFWWHCT.js} +20 -1
- package/lib/{chunk-JKZ5NRPX.js → chunk-BXA3VAQC.js} +3 -2
- package/lib/{chunk-RWBRS7SA.js → chunk-DJTJKSNN.js} +162 -169
- package/lib/{chunk-5NA7ZPDS.js → chunk-EAVXU4Q2.js} +3 -0
- package/lib/{chunk-7WESXE4X.js → chunk-HTH25YE2.js} +1 -1
- package/lib/chunk-UX2BDLJF.js +6 -0
- package/lib/chunk-WCX7WZAQ.js +0 -0
- package/lib/{chunk-HNODD2IL.js → chunk-ZZ5BYFNK.js} +83 -6
- package/lib/{define-BWuQ7acM.d.ts → define-B9r20dK6.d.ts} +4 -5
- package/lib/exports/config/array.d.ts +1 -1
- package/lib/exports/config/config.d.ts +1 -1
- package/lib/exports/config/config.js +1 -1
- package/lib/exports/config/index.d.ts +1 -1
- package/lib/exports/config/index.js +1 -1
- package/lib/exports/database/database.js +1 -1
- package/lib/exports/database/dbs/base.js +1 -1
- package/lib/exports/database/dbs/index.js +2 -2
- package/lib/exports/database/dbs/sqlite3.js +1 -1
- package/lib/exports/database/dbs/table.d.ts +3 -0
- package/lib/exports/database/dbs/table.js +2 -2
- package/lib/exports/database/index.js +12 -13
- package/lib/exports/database/tables/index.js +10 -11
- package/lib/exports/database/tables/mysAccountInfo.js +3 -3
- package/lib/exports/database/tables/mysDeviceInfo.js +5 -6
- package/lib/exports/database/tables/mysUserInfo.js +3 -3
- package/lib/exports/database/types/index.js +3 -3
- package/lib/exports/database/types/tables/index.js +3 -3
- package/lib/exports/mys/api/apis.d.ts +5 -5
- package/lib/exports/mys/api/apis.js +14 -15
- package/lib/exports/mys/api/app.js +7 -8
- package/lib/exports/mys/api/define.d.ts +1 -1
- package/lib/exports/mys/api/define.js +14 -15
- package/lib/exports/mys/api/index.d.ts +2 -2
- package/lib/exports/mys/api/index.js +17 -18
- package/lib/exports/mys/index.d.ts +5 -3
- package/lib/exports/mys/index.js +20 -22
- package/lib/exports/mys/types/api/define.d.ts +1 -1
- package/lib/exports/mys/types/api/index.d.ts +1 -1
- package/lib/exports/mys/types/index.d.ts +4 -2
- package/lib/exports/mys/types/index.js +1 -7
- package/lib/exports/mys/types/user/game.d.ts +17 -4
- package/lib/exports/mys/types/user/index.d.ts +4 -2
- package/lib/exports/mys/types/user/index.js +1 -7
- package/lib/exports/mys/types/user/userInfo.d.ts +40 -8
- package/lib/exports/mys/types/user/userInfo.js +1 -7
- package/lib/exports/mys/user/deviceInfo.js +8 -9
- package/lib/exports/mys/user/game.d.ts +16 -3
- package/lib/exports/mys/user/game.js +5 -3
- package/lib/exports/mys/user/index.d.ts +5 -3
- package/lib/exports/mys/user/index.js +20 -19
- package/lib/exports/mys/user/userInfo.d.ts +49 -6
- package/lib/exports/mys/user/userInfo.js +14 -15
- package/lib/exports/render/index.d.ts +3 -0
- package/lib/exports/render/index.js +13 -0
- package/lib/exports/render/render.d.ts +38 -0
- package/lib/exports/render/render.js +9 -0
- package/lib/exports/utils/common.d.ts +33 -1
- package/lib/exports/utils/index.d.ts +1 -2
- package/lib/exports/utils/index.js +1 -5
- package/package.json +11 -2
- package/resources/styles/karin-plugin-mys-core.css +1059 -0
- package/lib/chunk-HVYNK5BN.js +0 -45
- package/lib/chunk-IVZICDGW.js +0 -19
- package/lib/common-Dw5l6Uud.d.ts +0 -33
- package/lib/exports/utils/render.d.ts +0 -21
- package/lib/exports/utils/render.js +0 -7
- package/lib/index-DEEWbZ0V.d.ts +0 -102
- package/resources/template/ShowBindAccount/index.css +0 -1
- package/resources/template/ShowBindAccount/index.html +0 -65
- package/resources/template/ShowBindDevice/index.html +0 -20
- package/resources/template/ShowBindDevice/inex.css +0 -1
- package/resources/template/layout/default.css +0 -1
- package/resources/template/layout/default.html +0 -27
- /package/lib/{chunk-ARLTXJFJ.js → chunk-UC6INRYV.js} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
1
|
+
export { GameUserInfoBase, gameName } from './game.js';
|
|
2
|
+
export { CookieParamsType, RefreshUidResultType, StokenParamsType, UserGameRoleItemType } from './userInfo.js';
|
|
3
|
+
import '../../../../define-B9r20dK6.js';
|
|
3
4
|
import '../../../database/types/tables/mysAccountInfo.js';
|
|
4
5
|
import 'node-karin';
|
|
5
6
|
import 'node-karin/axios';
|
|
@@ -8,3 +9,4 @@ import '../../api/app.js';
|
|
|
8
9
|
import '../../../database/types/tables/mysUserInfo.js';
|
|
9
10
|
import '../../../database/types/dbs/base.js';
|
|
10
11
|
import 'sequelize';
|
|
12
|
+
import '../../user/userInfo.js';
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import "../../../../chunk-MWYDWDR4.js";
|
|
2
2
|
import "../../../../chunk-FOAQZIZ2.js";
|
|
3
|
-
import
|
|
4
|
-
RegisterGameBase
|
|
5
|
-
} from "../../../../chunk-IVZICDGW.js";
|
|
6
|
-
import "../../../../chunk-MLKGABMK.js";
|
|
7
|
-
export {
|
|
8
|
-
RegisterGameBase
|
|
9
|
-
};
|
|
3
|
+
import "../../../../chunk-WCX7WZAQ.js";
|
|
@@ -1,10 +1,42 @@
|
|
|
1
|
-
import '../../../database/types/tables/mysAccountInfo.js';
|
|
2
|
-
import '../../../database/types/tables/mysUserInfo.js';
|
|
3
|
-
export { C as CookieParamsType, R as RefreshUidResultType, a as RegisterGameBase, S as StokenParamsType, U as UserGameRoleItem } from '../../../../index-DEEWbZ0V.js';
|
|
1
|
+
import { MysAccountType } from '../../../database/types/tables/mysAccountInfo.js';
|
|
2
|
+
import { BaseGameUIDInfoTableType } from '../../../database/types/tables/mysUserInfo.js';
|
|
4
3
|
import '../../../database/types/dbs/base.js';
|
|
5
4
|
import 'sequelize';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
|
|
6
|
+
interface StokenParamsType {
|
|
7
|
+
stuid: string;
|
|
8
|
+
stoken: string;
|
|
9
|
+
mid: string;
|
|
10
|
+
}
|
|
11
|
+
type CookieParamsType = Partial<{
|
|
12
|
+
ltmid_v2: string;
|
|
13
|
+
ltuid: string;
|
|
14
|
+
ltuid_v2: string;
|
|
15
|
+
login_uid: string;
|
|
16
|
+
ltoken: string;
|
|
17
|
+
ltoken_v2: string;
|
|
18
|
+
cookie_token: string;
|
|
19
|
+
cookie_token_v2: string;
|
|
20
|
+
account_id: string;
|
|
21
|
+
account_id_v2: string;
|
|
22
|
+
account_mid_v2: string;
|
|
23
|
+
mi18nLang: string;
|
|
24
|
+
}>;
|
|
25
|
+
interface UserGameRoleItemType {
|
|
26
|
+
game_biz: string;
|
|
27
|
+
region: string;
|
|
28
|
+
game_uid: string;
|
|
29
|
+
nickname: string;
|
|
30
|
+
is_chosen: boolean;
|
|
31
|
+
}
|
|
32
|
+
interface RefreshUidResultType {
|
|
33
|
+
Serv: MysAccountType;
|
|
34
|
+
uids: {
|
|
35
|
+
name: string;
|
|
36
|
+
columnKey: `${string}-uids`;
|
|
37
|
+
data: BaseGameUIDInfoTableType<string>[`${string}-uids`];
|
|
38
|
+
}[];
|
|
39
|
+
message: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type { CookieParamsType, RefreshUidResultType, StokenParamsType, UserGameRoleItemType };
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeviceInfo
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-BH4S574A.js";
|
|
4
4
|
import "../../../chunk-W4DBT7AD.js";
|
|
5
5
|
import "../../../chunk-Z5I6A73Y.js";
|
|
6
|
-
import "../../../chunk-
|
|
7
|
-
import "../../../chunk-
|
|
8
|
-
import "../../../chunk-
|
|
6
|
+
import "../../../chunk-BNSHDFFN.js";
|
|
7
|
+
import "../../../chunk-HTH25YE2.js";
|
|
8
|
+
import "../../../chunk-7ZQQ76WC.js";
|
|
9
9
|
import "../../../chunk-SEWEEPJN.js";
|
|
10
|
-
import "../../../chunk-
|
|
11
|
-
import "../../../chunk-ARLTXJFJ.js";
|
|
12
|
-
import "../../../chunk-LG34FPBI.js";
|
|
13
|
-
import "../../../chunk-HVYNK5BN.js";
|
|
10
|
+
import "../../../chunk-EAVXU4Q2.js";
|
|
14
11
|
import "../../../chunk-G547WVGV.js";
|
|
15
12
|
import "../../../chunk-EMAUATE3.js";
|
|
16
13
|
import "../../../chunk-Y3J3J5B2.js";
|
|
@@ -18,10 +15,12 @@ import "../../../chunk-7KEG6SDX.js";
|
|
|
18
15
|
import "../../../chunk-FBWSEBAW.js";
|
|
19
16
|
import "../../../chunk-JVJQKRJ4.js";
|
|
20
17
|
import "../../../chunk-LYTNREAI.js";
|
|
18
|
+
import "../../../chunk-SHW6FHIB.js";
|
|
21
19
|
import "../../../chunk-K5U2O3HH.js";
|
|
22
20
|
import "../../../chunk-I7XZONDN.js";
|
|
23
|
-
import "../../../chunk-SHW6FHIB.js";
|
|
24
21
|
import "../../../chunk-JRH4JC43.js";
|
|
22
|
+
import "../../../chunk-UC6INRYV.js";
|
|
23
|
+
import "../../../chunk-LG34FPBI.js";
|
|
25
24
|
import "../../../chunk-SHLPPEAY.js";
|
|
26
25
|
import "../../../chunk-MLKGABMK.js";
|
|
27
26
|
export {
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { BaseUserInfoTableType } from '../../database/types/tables/mysUserInfo.js';
|
|
2
|
-
import {
|
|
2
|
+
import { gameName, GameUserInfoBase } from '../types/user/game.js';
|
|
3
|
+
import { UserGameRoleItemType } from '../types/user/userInfo.js';
|
|
3
4
|
import '../../database/types/dbs/base.js';
|
|
4
5
|
import 'sequelize';
|
|
5
|
-
import '../../../define-
|
|
6
|
+
import '../../../define-B9r20dK6.js';
|
|
6
7
|
import '../../database/types/tables/mysAccountInfo.js';
|
|
7
8
|
import 'node-karin';
|
|
8
9
|
import 'node-karin/axios';
|
|
9
10
|
import '../../database/types/tables/mysDeviceInfo.js';
|
|
10
11
|
import '../api/app.js';
|
|
12
|
+
import './userInfo.js';
|
|
11
13
|
|
|
12
14
|
declare const MysGame: {
|
|
13
15
|
"__#private@#games": Map<string, RegisterGameBase<any>>;
|
|
@@ -16,5 +18,16 @@ declare const MysGame: {
|
|
|
16
18
|
RegisterGame<GameUserInfoTableType extends BaseUserInfoTableType>(Game: RegisterGameBase<GameUserInfoTableType>): void;
|
|
17
19
|
forEachGame<GameUserInfoTableType extends BaseUserInfoTableType>(fn: (Game: RegisterGameBase<GameUserInfoTableType>) => Promise<void | "break">): Promise<void>;
|
|
18
20
|
};
|
|
21
|
+
declare class RegisterGameBase<GameUserInfoTableType extends BaseUserInfoTableType> {
|
|
22
|
+
game: string;
|
|
23
|
+
columnKey: `${string}-uids`;
|
|
24
|
+
/** @description 游戏名称 */
|
|
25
|
+
name: gameName;
|
|
26
|
+
/** @description 指令前缀匹配 */
|
|
27
|
+
prefix: RegExp;
|
|
28
|
+
refresh: (info: UserGameRoleItemType[]) => string[];
|
|
29
|
+
UserInfo: typeof GameUserInfoBase<GameUserInfoTableType>;
|
|
30
|
+
constructor(game: string, name: gameName, prefix: RegExp, userInfo: typeof GameUserInfoBase<GameUserInfoTableType>, refreshFuc: (info: UserGameRoleItemType[]) => string[]);
|
|
31
|
+
}
|
|
19
32
|
|
|
20
|
-
export { MysGame };
|
|
33
|
+
export { MysGame, RegisterGameBase };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export { DeviceInfo } from './deviceInfo.js';
|
|
2
|
-
export { MysGame } from './game.js';
|
|
3
|
-
export {
|
|
2
|
+
export { MysGame, RegisterGameBase } from './game.js';
|
|
3
|
+
export { BaseUserInfo, UserInfo } from './userInfo.js';
|
|
4
4
|
import '../../database/types/tables/mysDeviceInfo.js';
|
|
5
5
|
import '../../database/types/tables/mysUserInfo.js';
|
|
6
6
|
import '../../database/types/dbs/base.js';
|
|
7
7
|
import 'sequelize';
|
|
8
|
-
import '
|
|
8
|
+
import '../types/user/game.js';
|
|
9
|
+
import '../types/user/userInfo.js';
|
|
9
10
|
import '../../database/types/tables/mysAccountInfo.js';
|
|
11
|
+
import '../../../define-B9r20dK6.js';
|
|
10
12
|
import 'node-karin';
|
|
11
13
|
import 'node-karin/axios';
|
|
12
14
|
import '../api/app.js';
|
|
@@ -1,35 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseUserInfo,
|
|
3
3
|
UserInfo
|
|
4
|
-
} from "../../../chunk-
|
|
5
|
-
import {
|
|
6
|
-
DeviceInfo
|
|
7
|
-
} from "../../../chunk-COKAJ7V6.js";
|
|
8
|
-
import {
|
|
9
|
-
MysGame
|
|
10
|
-
} from "../../../chunk-3BIQN6QA.js";
|
|
11
|
-
import "../../../chunk-G5W5WAY5.js";
|
|
4
|
+
} from "../../../chunk-DJTJKSNN.js";
|
|
12
5
|
import "../../../chunk-7VAWV6ZE.js";
|
|
13
6
|
import "../../../chunk-LJSDSOY6.js";
|
|
14
7
|
import "../../../chunk-CFS2WFOO.js";
|
|
15
8
|
import "../../../chunk-MWYDWDR4.js";
|
|
16
9
|
import "../../../chunk-FOAQZIZ2.js";
|
|
17
|
-
import "../../../chunk-
|
|
10
|
+
import "../../../chunk-WCX7WZAQ.js";
|
|
11
|
+
import {
|
|
12
|
+
DeviceInfo
|
|
13
|
+
} from "../../../chunk-BH4S574A.js";
|
|
14
|
+
import {
|
|
15
|
+
MysGame,
|
|
16
|
+
RegisterGameBase
|
|
17
|
+
} from "../../../chunk-BWFWWHCT.js";
|
|
18
|
+
import "../../../chunk-G5W5WAY5.js";
|
|
18
19
|
import "../../../chunk-XQWTJIT4.js";
|
|
19
20
|
import "../../../chunk-7SZX3RBZ.js";
|
|
20
21
|
import "../../../chunk-2DHTKQ34.js";
|
|
21
|
-
import "../../../chunk-JKZ5NRPX.js";
|
|
22
|
-
import "../../../chunk-6PIXUPZ6.js";
|
|
23
22
|
import "../../../chunk-W4DBT7AD.js";
|
|
24
23
|
import "../../../chunk-Z5I6A73Y.js";
|
|
25
|
-
import "../../../chunk-
|
|
26
|
-
import "../../../chunk-
|
|
27
|
-
import "../../../chunk-
|
|
24
|
+
import "../../../chunk-BNSHDFFN.js";
|
|
25
|
+
import "../../../chunk-HTH25YE2.js";
|
|
26
|
+
import "../../../chunk-7ZQQ76WC.js";
|
|
28
27
|
import "../../../chunk-SEWEEPJN.js";
|
|
29
|
-
import "../../../chunk-
|
|
30
|
-
import "../../../chunk-ARLTXJFJ.js";
|
|
31
|
-
import "../../../chunk-LG34FPBI.js";
|
|
32
|
-
import "../../../chunk-HVYNK5BN.js";
|
|
28
|
+
import "../../../chunk-EAVXU4Q2.js";
|
|
33
29
|
import "../../../chunk-G547WVGV.js";
|
|
34
30
|
import "../../../chunk-EMAUATE3.js";
|
|
35
31
|
import "../../../chunk-Y3J3J5B2.js";
|
|
@@ -37,15 +33,20 @@ import "../../../chunk-7KEG6SDX.js";
|
|
|
37
33
|
import "../../../chunk-FBWSEBAW.js";
|
|
38
34
|
import "../../../chunk-JVJQKRJ4.js";
|
|
39
35
|
import "../../../chunk-LYTNREAI.js";
|
|
36
|
+
import "../../../chunk-SHW6FHIB.js";
|
|
40
37
|
import "../../../chunk-K5U2O3HH.js";
|
|
41
38
|
import "../../../chunk-I7XZONDN.js";
|
|
42
|
-
import "../../../chunk-SHW6FHIB.js";
|
|
43
39
|
import "../../../chunk-JRH4JC43.js";
|
|
40
|
+
import "../../../chunk-UC6INRYV.js";
|
|
41
|
+
import "../../../chunk-LG34FPBI.js";
|
|
44
42
|
import "../../../chunk-SHLPPEAY.js";
|
|
43
|
+
import "../../../chunk-BXA3VAQC.js";
|
|
44
|
+
import "../../../chunk-6PIXUPZ6.js";
|
|
45
45
|
import "../../../chunk-MLKGABMK.js";
|
|
46
46
|
export {
|
|
47
47
|
BaseUserInfo,
|
|
48
48
|
DeviceInfo,
|
|
49
49
|
MysGame,
|
|
50
|
+
RegisterGameBase,
|
|
50
51
|
UserInfo
|
|
51
52
|
};
|
|
@@ -1,10 +1,53 @@
|
|
|
1
|
-
import '../../database/types/dbs/base.js';
|
|
2
|
-
import '../../database/types/tables/mysAccountInfo.js';
|
|
3
|
-
import '../../database/types/tables/mysDeviceInfo.js';
|
|
4
|
-
import '../../database/types/tables/mysUserInfo.js';
|
|
5
|
-
import '../../../define-
|
|
6
|
-
|
|
1
|
+
import { DatabaseReturn, DatabaseType, DatabaseArray } from '../../database/types/dbs/base.js';
|
|
2
|
+
import { MysAccountInfoTableType, MysAccountType } from '../../database/types/tables/mysAccountInfo.js';
|
|
3
|
+
import { MysDeviceInfoTableType } from '../../database/types/tables/mysDeviceInfo.js';
|
|
4
|
+
import { BaseUserInfoTableType, UidPermission } from '../../database/types/tables/mysUserInfo.js';
|
|
5
|
+
import { a as BaseltuidInfoType } from '../../../define-B9r20dK6.js';
|
|
6
|
+
import { RefreshUidResultType, StokenParamsType, CookieParamsType } from '../types/user/userInfo.js';
|
|
7
7
|
import 'sequelize';
|
|
8
8
|
import 'node-karin';
|
|
9
9
|
import 'node-karin/axios';
|
|
10
10
|
import '../api/app.js';
|
|
11
|
+
|
|
12
|
+
declare class BaseUserInfo<U extends BaseUserInfoTableType> {
|
|
13
|
+
userId: BaseUserInfoTableType['userId'];
|
|
14
|
+
ltuidMap: Map<string, MysAccountInfoTableType & {
|
|
15
|
+
save: (data: Partial<MysAccountInfoTableType>) => Promise<MysAccountInfoTableType & /*elided*/ any>;
|
|
16
|
+
destroy: () => Promise<boolean>;
|
|
17
|
+
}>;
|
|
18
|
+
UserInfo: DatabaseReturn<U>[DatabaseType.Db];
|
|
19
|
+
refresh: () => Promise<this>;
|
|
20
|
+
constructor(userId: string);
|
|
21
|
+
get ltuids(): DatabaseArray<string>;
|
|
22
|
+
get stuids(): DatabaseArray<string>;
|
|
23
|
+
get deviceList(): DatabaseArray<string>;
|
|
24
|
+
get LtuidInfoList(): Readonly<MysAccountInfoTableType & {
|
|
25
|
+
save: (data: Partial<MysAccountInfoTableType>) => Promise<MysAccountInfoTableType & /*elided*/ any>;
|
|
26
|
+
destroy: () => Promise<boolean>;
|
|
27
|
+
}>[];
|
|
28
|
+
initMysAccountInfo(UserInfo: DatabaseReturn<U>[DatabaseType.Db], initAll: boolean): Promise<void>;
|
|
29
|
+
getLtuidInfo(ltuid: string): Readonly<(MysAccountInfoTableType & {
|
|
30
|
+
save: (data: Partial<MysAccountInfoTableType>) => Promise<MysAccountInfoTableType & /*elided*/ any>;
|
|
31
|
+
destroy: () => Promise<boolean>;
|
|
32
|
+
}) | undefined>;
|
|
33
|
+
getDeviceInfoList(): Promise<(MysDeviceInfoTableType & {
|
|
34
|
+
save: (data: Partial<MysDeviceInfoTableType>) => Promise<MysDeviceInfoTableType & /*elided*/ any>;
|
|
35
|
+
destroy: () => Promise<boolean>;
|
|
36
|
+
})[]>;
|
|
37
|
+
saveUserInfo(data: Partial<U>): Promise<void>;
|
|
38
|
+
saveMysAccountInfo(ltuid: string, data: Partial<MysAccountInfoTableType>): Promise<void>;
|
|
39
|
+
}
|
|
40
|
+
declare class UserInfo extends BaseUserInfo<BaseUserInfoTableType> {
|
|
41
|
+
static create(userId: string, initAll?: boolean): Promise<UserInfo>;
|
|
42
|
+
static refreshUid(options: {
|
|
43
|
+
userId: string;
|
|
44
|
+
cookie: string;
|
|
45
|
+
} & BaseltuidInfoType, perm: UidPermission): Promise<RefreshUidResultType>;
|
|
46
|
+
static refreshCookie(stokenParams: StokenParamsType, serv: MysAccountType | MysAccountType[]): Promise<{
|
|
47
|
+
Serv: MysAccountType;
|
|
48
|
+
cookieParams: CookieParamsType;
|
|
49
|
+
message: string;
|
|
50
|
+
}>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { BaseUserInfo, UserInfo };
|
|
@@ -1,31 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseUserInfo,
|
|
3
3
|
UserInfo
|
|
4
|
-
} from "../../../chunk-
|
|
5
|
-
import "../../../chunk-COKAJ7V6.js";
|
|
6
|
-
import "../../../chunk-3BIQN6QA.js";
|
|
7
|
-
import "../../../chunk-G5W5WAY5.js";
|
|
4
|
+
} from "../../../chunk-DJTJKSNN.js";
|
|
8
5
|
import "../../../chunk-7VAWV6ZE.js";
|
|
9
6
|
import "../../../chunk-LJSDSOY6.js";
|
|
10
7
|
import "../../../chunk-CFS2WFOO.js";
|
|
11
8
|
import "../../../chunk-MWYDWDR4.js";
|
|
12
9
|
import "../../../chunk-FOAQZIZ2.js";
|
|
13
|
-
import "../../../chunk-
|
|
10
|
+
import "../../../chunk-WCX7WZAQ.js";
|
|
11
|
+
import "../../../chunk-BH4S574A.js";
|
|
12
|
+
import "../../../chunk-BWFWWHCT.js";
|
|
13
|
+
import "../../../chunk-G5W5WAY5.js";
|
|
14
14
|
import "../../../chunk-XQWTJIT4.js";
|
|
15
15
|
import "../../../chunk-7SZX3RBZ.js";
|
|
16
16
|
import "../../../chunk-2DHTKQ34.js";
|
|
17
|
-
import "../../../chunk-JKZ5NRPX.js";
|
|
18
|
-
import "../../../chunk-6PIXUPZ6.js";
|
|
19
17
|
import "../../../chunk-W4DBT7AD.js";
|
|
20
18
|
import "../../../chunk-Z5I6A73Y.js";
|
|
21
|
-
import "../../../chunk-
|
|
22
|
-
import "../../../chunk-
|
|
23
|
-
import "../../../chunk-
|
|
19
|
+
import "../../../chunk-BNSHDFFN.js";
|
|
20
|
+
import "../../../chunk-HTH25YE2.js";
|
|
21
|
+
import "../../../chunk-7ZQQ76WC.js";
|
|
24
22
|
import "../../../chunk-SEWEEPJN.js";
|
|
25
|
-
import "../../../chunk-
|
|
26
|
-
import "../../../chunk-ARLTXJFJ.js";
|
|
27
|
-
import "../../../chunk-LG34FPBI.js";
|
|
28
|
-
import "../../../chunk-HVYNK5BN.js";
|
|
23
|
+
import "../../../chunk-EAVXU4Q2.js";
|
|
29
24
|
import "../../../chunk-G547WVGV.js";
|
|
30
25
|
import "../../../chunk-EMAUATE3.js";
|
|
31
26
|
import "../../../chunk-Y3J3J5B2.js";
|
|
@@ -33,11 +28,15 @@ import "../../../chunk-7KEG6SDX.js";
|
|
|
33
28
|
import "../../../chunk-FBWSEBAW.js";
|
|
34
29
|
import "../../../chunk-JVJQKRJ4.js";
|
|
35
30
|
import "../../../chunk-LYTNREAI.js";
|
|
31
|
+
import "../../../chunk-SHW6FHIB.js";
|
|
36
32
|
import "../../../chunk-K5U2O3HH.js";
|
|
37
33
|
import "../../../chunk-I7XZONDN.js";
|
|
38
|
-
import "../../../chunk-SHW6FHIB.js";
|
|
39
34
|
import "../../../chunk-JRH4JC43.js";
|
|
35
|
+
import "../../../chunk-UC6INRYV.js";
|
|
36
|
+
import "../../../chunk-LG34FPBI.js";
|
|
40
37
|
import "../../../chunk-SHLPPEAY.js";
|
|
38
|
+
import "../../../chunk-BXA3VAQC.js";
|
|
39
|
+
import "../../../chunk-6PIXUPZ6.js";
|
|
41
40
|
import "../../../chunk-MLKGABMK.js";
|
|
42
41
|
export {
|
|
43
42
|
BaseUserInfo,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
React
|
|
3
|
+
} from "../../chunk-UX2BDLJF.js";
|
|
4
|
+
import {
|
|
5
|
+
ReactRender
|
|
6
|
+
} from "../../chunk-AY34PPJT.js";
|
|
7
|
+
import "../../chunk-UC6INRYV.js";
|
|
8
|
+
import "../../chunk-LG34FPBI.js";
|
|
9
|
+
import "../../chunk-MLKGABMK.js";
|
|
10
|
+
export {
|
|
11
|
+
React,
|
|
12
|
+
ReactRender
|
|
13
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Options } from 'node-karin';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
interface RenderCfg {
|
|
5
|
+
/** @description 插件名称 package.json 的 name */
|
|
6
|
+
name: string;
|
|
7
|
+
/** @description 插件版本 package.json 的 version */
|
|
8
|
+
version: string;
|
|
9
|
+
/** @description 根目录绝对路径 */
|
|
10
|
+
pluginDir: string;
|
|
11
|
+
/** @description 插件资源目录 `@karinjs/karin-plugin-xxx/resources` */
|
|
12
|
+
ResourcesDir: string;
|
|
13
|
+
}
|
|
14
|
+
interface DefaultRenderPluginOptionsType {
|
|
15
|
+
name: string;
|
|
16
|
+
version: string;
|
|
17
|
+
resources: {
|
|
18
|
+
/** @description 插件内部资源 */
|
|
19
|
+
default: string;
|
|
20
|
+
/** @description 插件外部资源 @karinjs/karin-plugin-xxx/resources */
|
|
21
|
+
download: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
declare class ReactRender<P extends Record<string, any>, K extends string> {
|
|
25
|
+
#private;
|
|
26
|
+
constructor(cfg: RenderCfg, pluginOptions?: Omit<P, 'name' | 'version' | 'resources'>);
|
|
27
|
+
get plugin(): Omit<P, 'name' | 'version' | 'resources'> & DefaultRenderPluginOptionsType;
|
|
28
|
+
get karin(): {
|
|
29
|
+
version: string;
|
|
30
|
+
};
|
|
31
|
+
template<C extends React.ComponentType<any>>(template: K, component: C, props: React.ComponentProps<C>, options?: {
|
|
32
|
+
type?: 'png' | 'jpeg' | 'webp';
|
|
33
|
+
plugin?: Record<string, any>;
|
|
34
|
+
render?: Omit<Options, 'file' | 'data'>;
|
|
35
|
+
}): Promise<string | null>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { type DefaultRenderPluginOptionsType, ReactRender, type RenderCfg };
|
|
@@ -1 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @description 生成随机字符串
|
|
3
|
+
* @param length - 字符串长度
|
|
4
|
+
*/
|
|
5
|
+
declare const randomString: (length: number, type: "Lower" | "Upper" | "All") => string;
|
|
6
|
+
/**
|
|
7
|
+
* @description 生成设备guid
|
|
8
|
+
*/
|
|
9
|
+
declare const getDeviceGuid: () => string;
|
|
10
|
+
/**
|
|
11
|
+
* @description 将字符串解析为key-value键值对
|
|
12
|
+
* @param Str - 字符串
|
|
13
|
+
* @param sep - 分隔符
|
|
14
|
+
*/
|
|
15
|
+
declare const StrToObj: <D extends {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
}>(Str: string, sep: string | RegExp) => Partial<D>;
|
|
18
|
+
/**
|
|
19
|
+
* @description 将key-value键值对解析为字符串
|
|
20
|
+
* @param obj - key-value键值对
|
|
21
|
+
* @param sep - 分隔符
|
|
22
|
+
*/
|
|
23
|
+
declare const ObjToStr: (obj: Record<string, string | number>, sep: string) => string;
|
|
24
|
+
|
|
25
|
+
declare const common_ObjToStr: typeof ObjToStr;
|
|
26
|
+
declare const common_StrToObj: typeof StrToObj;
|
|
27
|
+
declare const common_getDeviceGuid: typeof getDeviceGuid;
|
|
28
|
+
declare const common_randomString: typeof randomString;
|
|
29
|
+
declare namespace common {
|
|
30
|
+
export { common_ObjToStr as ObjToStr, common_StrToObj as StrToObj, common_getDeviceGuid as getDeviceGuid, common_randomString as randomString };
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { ObjToStr, StrToObj, common as c, getDeviceGuid, randomString };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { c as common } from '
|
|
2
|
-
export { RenderCfg, RenderTemplate } from './render.js';
|
|
1
|
+
export { c as common } from './common.js';
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-UC6INRYV.js";
|
|
2
2
|
import {
|
|
3
3
|
common_exports
|
|
4
4
|
} from "../../chunk-LG34FPBI.js";
|
|
5
|
-
import {
|
|
6
|
-
RenderTemplate
|
|
7
|
-
} from "../../chunk-HVYNK5BN.js";
|
|
8
5
|
import "../../chunk-MLKGABMK.js";
|
|
9
6
|
export {
|
|
10
|
-
RenderTemplate,
|
|
11
7
|
common_exports as common
|
|
12
8
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "karin-plugin-mys-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"author": "babanbang",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "karin-plugin-mys-core",
|
|
@@ -14,8 +14,10 @@
|
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"app": "node lib/app.js",
|
|
17
|
-
"build": "tsup",
|
|
17
|
+
"build": "npm run build:css && tsup",
|
|
18
|
+
"build:css": "tailwindcss -i src/template/tailwind.css -o resources/styles/karin-plugin-mys-core.css",
|
|
18
19
|
"dev": "cross-env EBV_FILE=\"development.env\" node --import tsx src/app.ts",
|
|
20
|
+
"dev:css": "tailwindcss -i src/template/tailwind.css -o resources/styles/karin-plugin-mys-core.css --watch",
|
|
19
21
|
"pub": "npm publish --access public"
|
|
20
22
|
},
|
|
21
23
|
"exports": {
|
|
@@ -34,6 +36,11 @@
|
|
|
34
36
|
"development": "./src/exports/mys/index.ts",
|
|
35
37
|
"default": "./lib/exports/mys/index.js"
|
|
36
38
|
},
|
|
39
|
+
"./render": {
|
|
40
|
+
"types": "./lib/exports/render/index.d.ts",
|
|
41
|
+
"development": "./src/exports/render/index.ts",
|
|
42
|
+
"default": "./lib/exports/render/index.js"
|
|
43
|
+
},
|
|
37
44
|
"./utils": {
|
|
38
45
|
"types": "./lib/exports/utils/index.d.ts",
|
|
39
46
|
"development": "./src/exports/utils/index.ts",
|
|
@@ -44,6 +51,8 @@
|
|
|
44
51
|
"dependencies": {
|
|
45
52
|
"md5": "^2.3.0",
|
|
46
53
|
"qrcode": "^1.5.4",
|
|
54
|
+
"react": "^19.2.0",
|
|
55
|
+
"react-dom": "^19.2.0",
|
|
47
56
|
"sequelize": "^6.37.7"
|
|
48
57
|
},
|
|
49
58
|
"karin": {
|