karin-plugin-mys-core 1.0.19 → 1.0.20
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/lib/apps/MiHoYoLogin.js +4 -4
- package/lib/apps/MysDevice.js +3 -3
- package/lib/apps/UIDManage.js +4 -4
- package/lib/{chunk-JYQZZKAO.js → chunk-32QZ2PSX.js} +1 -1
- package/lib/{chunk-F7ZAG53H.js → chunk-BLE3V6QR.js} +1 -1
- package/lib/{chunk-PX6NFB3F.js → chunk-HI6OZTI2.js} +3 -3
- package/lib/{chunk-I3VGZG6L.js → chunk-SOLISSTT.js} +1 -1
- package/lib/core/index.js +2 -2
- package/lib/exports/config/index.d.ts +8 -3
- package/lib/exports/config/index.js +1 -1
- package/lib/exports/mys/index.js +3 -3
- package/lib/web.config.js +2 -2
- package/package.json +1 -1
package/lib/apps/MiHoYoLogin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ShowBindAccountCmdFunc
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-SOLISSTT.js";
|
|
4
4
|
import "../chunk-S3ALDDWH.js";
|
|
5
5
|
import {
|
|
6
6
|
UserInfo,
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
getTokenByGameToken,
|
|
10
10
|
getUserFullInfo,
|
|
11
11
|
queryQRcode
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-32QZ2PSX.js";
|
|
13
13
|
import "../chunk-5LRGHP36.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-HI6OZTI2.js";
|
|
15
|
+
import "../chunk-BLE3V6QR.js";
|
|
16
16
|
import "../chunk-ER4WMJJ6.js";
|
|
17
17
|
import {
|
|
18
18
|
common_exports
|
package/lib/apps/MysDevice.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeviceInfo,
|
|
3
3
|
UserInfo
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-32QZ2PSX.js";
|
|
5
5
|
import "../chunk-5LRGHP36.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-HI6OZTI2.js";
|
|
7
|
+
import "../chunk-BLE3V6QR.js";
|
|
8
8
|
import "../chunk-ER4WMJJ6.js";
|
|
9
9
|
import "../chunk-RX4VMVAI.js";
|
|
10
10
|
import "../chunk-SHLPPEAY.js";
|
package/lib/apps/UIDManage.js
CHANGED
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
ShowBindAccountCmdFunc,
|
|
6
6
|
UnbindAccount,
|
|
7
7
|
UnbindUID
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-SOLISSTT.js";
|
|
9
9
|
import "../chunk-S3ALDDWH.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-32QZ2PSX.js";
|
|
11
11
|
import "../chunk-5LRGHP36.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-HI6OZTI2.js";
|
|
13
|
+
import "../chunk-BLE3V6QR.js";
|
|
14
14
|
import "../chunk-ER4WMJJ6.js";
|
|
15
15
|
import "../chunk-RX4VMVAI.js";
|
|
16
16
|
import "../chunk-SHLPPEAY.js";
|
|
@@ -134,7 +134,7 @@ var Config = class {
|
|
|
134
134
|
}
|
|
135
135
|
getDef(path2) {
|
|
136
136
|
const defConfig = JSON.parse(JSON.stringify(this.#DefaultConfig));
|
|
137
|
-
return lodash2.get(defConfig, path2);
|
|
137
|
+
return path2 ? lodash2.get(defConfig, path2) : defConfig;
|
|
138
138
|
}
|
|
139
139
|
get(path2, isArray = false, def) {
|
|
140
140
|
const conf = JSON.parse(JSON.stringify(this.#ConfigCache));
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Config
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BLE3V6QR.js";
|
|
4
4
|
import {
|
|
5
5
|
dir
|
|
6
6
|
} from "./chunk-SHLPPEAY.js";
|
|
7
7
|
|
|
8
8
|
// src/core/config/config.ts
|
|
9
|
-
var
|
|
9
|
+
var defaultCoreConfig = {
|
|
10
10
|
proxy: {
|
|
11
11
|
github: "https://gh-proxy.org",
|
|
12
12
|
["hoyolab" /* os */]: ""
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
var defaultConfigDefine = {};
|
|
16
|
-
var CoreCfg = new Config(`${dir.name}:config`, dir.ConfigDir,
|
|
16
|
+
var CoreCfg = new Config(`${dir.name}:config`, dir.ConfigDir, defaultCoreConfig, defaultConfigDefine).watch();
|
|
17
17
|
|
|
18
18
|
// src/core/config/device.ts
|
|
19
19
|
var DefaultDevice = {
|
package/lib/core/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import "../chunk-5LRGHP36.js";
|
|
|
2
2
|
import {
|
|
3
3
|
CoreCfg,
|
|
4
4
|
DeviceCfg
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-HI6OZTI2.js";
|
|
6
|
+
import "../chunk-BLE3V6QR.js";
|
|
7
7
|
import "../chunk-ER4WMJJ6.js";
|
|
8
8
|
import "../chunk-RX4VMVAI.js";
|
|
9
9
|
import "../chunk-SHLPPEAY.js";
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
type
|
|
1
|
+
type ToString<T> = T extends string | number ? `${T}` : never;
|
|
2
|
+
type PathImpl<T, Key extends keyof T> = Key extends string | number ? T[Key] extends Record<string, any> ? T[Key] extends ArrayLike<any> ? ToString<Key> | `${ToString<Key>}.${PathImpl<T[Key], Exclude<keyof T[Key], keyof any[]>>}` : ToString<Key> | `${ToString<Key>}.${PathImpl<T[Key], keyof T[Key]>}` : ToString<Key> : never;
|
|
2
3
|
type Path<T> = PathImpl<T, keyof T> | keyof T;
|
|
3
|
-
type PathValue<T, P extends
|
|
4
|
+
type PathValue<T, P> = P extends keyof T ? T[P] : P extends `${infer K}.${infer Rest}` ? K extends keyof T ? PathValue<T[K], Rest> : {
|
|
5
|
+
[Key in keyof T]: ToString<Key> extends K ? PathValue<T[Key], Rest> : never;
|
|
6
|
+
}[keyof T] : never;
|
|
4
7
|
declare class Config<C extends {
|
|
5
8
|
[key: string]: any;
|
|
6
9
|
}> {
|
|
@@ -15,11 +18,13 @@ declare class Config<C extends {
|
|
|
15
18
|
mergeWithDefaults(userConfig: C, defaultConfig: C, DefineConfig: Record<string, any>): C;
|
|
16
19
|
/**
|
|
17
20
|
* @description 获取配置路径对应的默认配置
|
|
21
|
+
* @param path 配置路径,支持任意深度的嵌套路径,传入空字符串''可获取整个配置对象
|
|
18
22
|
*/
|
|
19
23
|
getDef(path: ''): C;
|
|
24
|
+
getDef<P extends Path<C>>(path: P): PathValue<C, P>;
|
|
20
25
|
/**
|
|
21
26
|
* @description 获取配置路径对应的配置
|
|
22
|
-
* @param path
|
|
27
|
+
* @param path 配置路径,支持任意深度的嵌套路径,传入空字符串''可获取整个配置对象
|
|
23
28
|
* @param isArray 是否返回 EnhancedArray 类型
|
|
24
29
|
* @param def 默认值
|
|
25
30
|
*/
|
package/lib/exports/mys/index.js
CHANGED
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
getUserFullInfo,
|
|
16
16
|
getUserGameRolesByCookie,
|
|
17
17
|
queryQRcode
|
|
18
|
-
} from "../../chunk-
|
|
18
|
+
} from "../../chunk-32QZ2PSX.js";
|
|
19
19
|
import "../../chunk-5LRGHP36.js";
|
|
20
|
-
import "../../chunk-
|
|
21
|
-
import "../../chunk-
|
|
20
|
+
import "../../chunk-HI6OZTI2.js";
|
|
21
|
+
import "../../chunk-BLE3V6QR.js";
|
|
22
22
|
import "../../chunk-ER4WMJJ6.js";
|
|
23
23
|
import "../../chunk-RX4VMVAI.js";
|
|
24
24
|
import "../../chunk-SHLPPEAY.js";
|
package/lib/web.config.js
CHANGED