deeke-script-app 1.7.6 → 1.7.8
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.
|
@@ -3,17 +3,6 @@ declare global {
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
interface Device {
|
|
6
|
-
/**
|
|
7
|
-
* 息屏后,保持 CPU 唤醒,延时释放
|
|
8
|
-
* @param second 保持 CPU 唤醒,延时释放,单位秒
|
|
9
|
-
*/
|
|
10
|
-
public keepCpuAwake(second: number): void;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 关闭CPU唤醒状态
|
|
14
|
-
*/
|
|
15
|
-
public releaseCpuWakeLock(): void;
|
|
16
|
-
|
|
17
6
|
/**
|
|
18
7
|
* 获取屏幕宽度
|
|
19
8
|
*/
|
|
@@ -59,11 +48,6 @@ interface Device {
|
|
|
59
48
|
*/
|
|
60
49
|
public getAttr(key: string): string;
|
|
61
50
|
|
|
62
|
-
/**
|
|
63
|
-
* 判断屏幕是否亮着
|
|
64
|
-
*/
|
|
65
|
-
public isScreenOn(): boolean;
|
|
66
|
-
|
|
67
51
|
/**
|
|
68
52
|
* 获取设备品牌, 如 "HUAWEI" 或 "Xiaomi"
|
|
69
53
|
*/
|
|
@@ -83,6 +67,146 @@ interface Device {
|
|
|
83
67
|
* 获取设备代号, 例如 "REL" 表示正式发布的版本
|
|
84
68
|
*/
|
|
85
69
|
public codename(): string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 获取设备制造商信息,如 "HUAWEI"、"Xiaomi" 等
|
|
73
|
+
*/
|
|
74
|
+
public manufacturer(): string;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* 获取硬件名称,如 "kirin990" 等
|
|
78
|
+
*/
|
|
79
|
+
public hardware(): string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* 获取主板型号信息
|
|
83
|
+
*/
|
|
84
|
+
public board(): string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* 获取产品名称信息
|
|
88
|
+
*/
|
|
89
|
+
public product(): string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* 获取 Bootloader 版本信息
|
|
93
|
+
*/
|
|
94
|
+
public bootloader(): string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* 获取构建ID信息
|
|
98
|
+
*/
|
|
99
|
+
public buildId(): string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* 获取显示版本信息
|
|
103
|
+
*/
|
|
104
|
+
public display(): string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* 获取设备指纹信息
|
|
108
|
+
*/
|
|
109
|
+
public fingerprint(): string;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* 获取主机名信息
|
|
113
|
+
*/
|
|
114
|
+
public host(): string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* 获取构建用户信息
|
|
118
|
+
*/
|
|
119
|
+
public user(): string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* 获取CPU架构信息,如 "arm64-v8a"、"armeabi-v7a" 等
|
|
123
|
+
*/
|
|
124
|
+
public getCpuAbi(): string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* 获取所有支持的CPU架构列表
|
|
128
|
+
*/
|
|
129
|
+
public getCpuAbis(): string[];
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* 获取WiFi网络的IP地址(仅WiFi连接时有效)
|
|
133
|
+
* @returns WiFi IP地址,如果WiFi未连接返回空字符串
|
|
134
|
+
*/
|
|
135
|
+
public getWifiIPAddress(): string;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* 获取当前活动网络的IP地址(支持WiFi和移动网络,返回局域网IP)
|
|
139
|
+
* @returns 当前活动网络的IP地址,如果获取失败返回 "127.0.0.1"
|
|
140
|
+
*/
|
|
141
|
+
public getIPAddress(): string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* 获取公网IPv4地址(需要通过HTTP请求外部服务)
|
|
145
|
+
* @returns 公网IPv4地址,如果获取失败返回空字符串
|
|
146
|
+
*/
|
|
147
|
+
public getPublicIPAddress(): string;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* 获取公网IPv6地址(需要通过HTTP请求外部服务)
|
|
151
|
+
* @returns 公网IPv6地址,如果获取失败返回空字符串
|
|
152
|
+
*/
|
|
153
|
+
public getPublicIPAddressV6(): string;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* 获取公网IP信息(包含IPv4和IPv6)
|
|
157
|
+
* @returns 包含 ipv4 和 ipv6 的对象
|
|
158
|
+
*/
|
|
159
|
+
public getPublicIPInfo(): {
|
|
160
|
+
ipv4: string;
|
|
161
|
+
ipv6: string;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* 获取完整的IP信息(包括当前IP、WiFi IP、公网IP等)
|
|
166
|
+
* @returns 包含所有IP信息的对象
|
|
167
|
+
*/
|
|
168
|
+
public getIpInfo(): {
|
|
169
|
+
ip: string;
|
|
170
|
+
wifiIP: string;
|
|
171
|
+
publicIP: string;
|
|
172
|
+
publicIPV6: string;
|
|
173
|
+
publicIPInfo: {
|
|
174
|
+
ipv4: string;
|
|
175
|
+
ipv6: string;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* 获取MAC地址(需要WiFi已连接)
|
|
181
|
+
* @returns MAC地址,如果WiFi未连接返回空字符串
|
|
182
|
+
*/
|
|
183
|
+
public getMacAddress(): string;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* 获取网络类型
|
|
187
|
+
* @returns 网络类型:"WiFi" | "Mobile" | "Ethernet" | "Other" | "None"
|
|
188
|
+
*/
|
|
189
|
+
public getNetworkType(): "WiFi" | "Mobile" | "Ethernet" | "Other" | "None";
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* 检查网络是否已连接
|
|
193
|
+
* @returns 网络是否已连接
|
|
194
|
+
*/
|
|
195
|
+
public isNetworkConnected(): boolean;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* 获取完整的网络信息
|
|
199
|
+
* @returns 包含网络类型、连接状态、MAC地址、IP地址等的对象
|
|
200
|
+
*/
|
|
201
|
+
public getNetworkInfo(): {
|
|
202
|
+
type: "WiFi" | "Mobile" | "Ethernet" | "Other" | "None";
|
|
203
|
+
connected: boolean;
|
|
204
|
+
macAddress: string;
|
|
205
|
+
ip: string;
|
|
206
|
+
wifiIP: string;
|
|
207
|
+
publicIP: string;
|
|
208
|
+
publicIPV6: string;
|
|
209
|
+
};
|
|
86
210
|
}
|
|
87
211
|
|
|
88
212
|
export { };
|
package/deekeScript.json
CHANGED
package/deekeScript.schema.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"title": "DeekeScript 配置文件",
|
|
4
4
|
"description": "DeekeScript Android 项目配置文件,用于动态渲染页面",
|
|
5
5
|
"type": "object",
|
|
6
|
-
"required": ["name", "versionCode", "versionName", "icon", "host", "switchSetting", "groups", "bottomMenus", "settingLists", "apis"],
|
|
6
|
+
"required": ["name", "versionCode", "versionName", "icon", "host", "switchSetting", "bottomMenusHidden", "groups", "bottomMenus", "settingLists", "apis"],
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"properties": {
|
|
9
9
|
"$schema": {
|
|
@@ -44,6 +44,11 @@
|
|
|
44
44
|
"description": "接口请求域名",
|
|
45
45
|
"format": "uri"
|
|
46
46
|
},
|
|
47
|
+
"bottomMenusHidden": {
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"default": false,
|
|
50
|
+
"description": "是否隐藏底部菜单"
|
|
51
|
+
},
|
|
47
52
|
"switchSetting": {
|
|
48
53
|
"type": "object",
|
|
49
54
|
"description": "功能开关设置",
|