karin-plugin-mys-core 1.0.4 → 1.0.6
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 +1045 -79
- package/lib/apps/MiHoYoLogin.js +13 -12
- package/lib/apps/MysDevice.js +12 -13
- package/lib/apps/UIDManage.js +13 -12
- package/lib/{array-DuqoS2wx.d.ts → array-CCexQ14j.d.ts} +1 -1
- package/lib/{chunk-3BIQN6QA.js → chunk-BWFWWHCT.js} +20 -1
- package/lib/{chunk-JKZ5NRPX.js → chunk-BXA3VAQC.js} +3 -2
- package/lib/chunk-CZZETPLY.js +281 -0
- package/lib/{chunk-WQK5RDUV.js → chunk-DJTJKSNN.js} +157 -164
- package/lib/chunk-NUOK4VFP.js +72 -0
- package/lib/chunk-UC6INRYV.js +0 -0
- package/lib/chunk-UX2BDLJF.js +6 -0
- 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 +1 -1
- package/lib/exports/database/dbs/sqlite3.js +1 -1
- package/lib/exports/database/dbs/table.js +1 -1
- package/lib/exports/database/index.js +8 -9
- package/lib/exports/database/tables/index.js +6 -7
- package/lib/exports/database/tables/mysAccountInfo.js +1 -1
- package/lib/exports/database/tables/mysDeviceInfo.js +2 -3
- package/lib/exports/database/tables/mysUserInfo.js +1 -1
- 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 +2 -2
- package/lib/exports/mys/api/apis.js +10 -11
- package/lib/exports/mys/api/app.js +3 -4
- package/lib/exports/mys/api/define.js +10 -11
- package/lib/exports/mys/api/index.js +13 -14
- package/lib/exports/mys/index.d.ts +3 -3
- package/lib/exports/mys/index.js +15 -17
- package/lib/exports/mys/types/index.d.ts +2 -2
- package/lib/exports/mys/types/index.js +1 -7
- package/lib/exports/mys/types/user/game.d.ts +2 -13
- package/lib/exports/mys/types/user/game.js +1 -7
- package/lib/exports/mys/types/user/index.d.ts +2 -2
- package/lib/exports/mys/types/user/index.js +1 -7
- package/lib/exports/mys/types/user/userInfo.d.ts +2 -2
- package/lib/exports/mys/user/deviceInfo.js +3 -4
- package/lib/exports/mys/user/game.d.ts +15 -4
- package/lib/exports/mys/user/game.js +5 -3
- package/lib/exports/mys/user/index.d.ts +1 -1
- package/lib/exports/mys/user/index.js +16 -15
- package/lib/exports/mys/user/userInfo.js +10 -11
- 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 -3
- package/lib/exports/utils/index.js +1 -5
- package/package.json +13 -5
- package/resources/image/frame-logo.png +0 -0
- package/resources/image/mys-core-logo.png +0 -0
- package/resources/styles/karin-plugin-mys-core.css +1095 -0
- package/lib/apps/MiHoYoLogin.d.ts +0 -7
- package/lib/apps/MysDevice.d.ts +0 -5
- package/lib/apps/UIDManage.d.ts +0 -10
- package/lib/chunk-CDBMB57U.js +0 -52
- package/lib/chunk-NC54IKOY.js +0 -179
- package/lib/chunk-T6MFN2MO.js +0 -23
- package/lib/common-Dw5l6Uud.d.ts +0 -33
- package/lib/exports/utils/render.d.ts +0 -27
- package/lib/exports/utils/render.js +0 -7
- 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-FOAQZIZ2.js} +0 -0
|
@@ -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,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-CDBMB57U.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.6",
|
|
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": {
|
|
@@ -70,11 +79,10 @@
|
|
|
70
79
|
"/lib/**/*.js",
|
|
71
80
|
"/lib/**/*.d.ts",
|
|
72
81
|
"resources",
|
|
73
|
-
"!resources/**/*.css.map",
|
|
74
|
-
"!resources/**/*.scss",
|
|
75
82
|
"!lib/app.js",
|
|
76
83
|
"!lib/app.d.ts",
|
|
77
|
-
"!lib/index.d.ts"
|
|
84
|
+
"!lib/index.d.ts",
|
|
85
|
+
"!lib/apps/**/*.d.ts"
|
|
78
86
|
],
|
|
79
87
|
"publishConfig": {
|
|
80
88
|
"access": "public",
|
|
Binary file
|
|
Binary file
|