deeke-script-app 1.7.6 → 1.7.7

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.
Files changed (49) hide show
  1. package/@deekeScript/@type/Class/Global.d.ts +1 -1
  2. package/@deekeScript/@type/Class/Rect.d.ts +16 -16
  3. package/@deekeScript/@type/Class/UiSelector.d.ts +201 -201
  4. package/@deekeScript/@type/Class/WebSocket.d.ts +49 -49
  5. package/@deekeScript/@type/interface/Access.d.ts +141 -141
  6. package/@deekeScript/@type/interface/App.d.ts +101 -101
  7. package/@deekeScript/@type/interface/DeekeScriptJson.d.ts +13 -13
  8. package/@deekeScript/@type/interface/Device.d.ts +212 -88
  9. package/@deekeScript/@type/interface/Encrypt.d.ts +58 -58
  10. package/@deekeScript/@type/interface/Engines.d.ts +39 -39
  11. package/@deekeScript/@type/interface/Files.d.ts +283 -283
  12. package/@deekeScript/@type/interface/FloatDialogs.d.ts +47 -47
  13. package/@deekeScript/@type/interface/ForegroundServiceBridge.d.ts +31 -31
  14. package/@deekeScript/@type/interface/Hid.d.ts +342 -342
  15. package/@deekeScript/@type/interface/Http.d.ts +94 -94
  16. package/@deekeScript/@type/interface/Images.d.ts +71 -71
  17. package/@deekeScript/@type/interface/Java.d.ts +7 -7
  18. package/@deekeScript/@type/interface/KeyBoards.d.ts +54 -54
  19. package/@deekeScript/@type/interface/Log.d.ts +16 -16
  20. package/@deekeScript/@type/interface/MediaStore.d.ts +146 -146
  21. package/@deekeScript/@type/interface/NotificationBridge.d.ts +28 -28
  22. package/@deekeScript/@type/interface/SocketIOClient.d.ts +76 -76
  23. package/@deekeScript/@type/interface/Storage.d.ts +119 -119
  24. package/@deekeScript/@type/interface/System.d.ts +120 -120
  25. package/@deekeScript/@type/interface/UiObject.d.ts +202 -202
  26. package/README.md +67 -67
  27. package/deekeScript.json +670 -670
  28. package/deekeScript.schema.json +681 -681
  29. package/deekeScriptZipBuild +48 -48
  30. package/gulpfile +17 -17
  31. package/init +32 -32
  32. package/jsconfig.json +11 -11
  33. package/package.json +43 -43
  34. package/script/statistics/statistics.js +120 -120
  35. package/script/task/douyin_zan.js +37 -37
  36. package/script/task/dy.js +6 -6
  37. package/script/task/dyApp.js +6 -6
  38. package/script/task/tool.js +9 -9
  39. package/script/task.html +4 -4
  40. package/src/statistics/statistics.js +120 -120
  41. package/src/task/douyin_zan.js +89 -89
  42. package/src/task/dy.js +14 -14
  43. package/src/task/dyApp.js +7 -7
  44. package/src/task/tool.js +19 -19
  45. package/src/task.html +4 -4
  46. package/test.json +132 -132
  47. package/uglify-config.json +15 -15
  48. package/update-types.js +118 -118
  49. package/images/test/statistics.png +0 -0
@@ -1,283 +1,283 @@
1
- declare global {
2
- var Files: files;
3
- }
4
-
5
- interface files {
6
- /**
7
- * 读取文件内容
8
- * @param path 文件路径
9
- * @return 文件内容,如果失败返回null
10
- */
11
- public read(path: string): string | null;
12
-
13
- /**
14
- * 写入内容到文件
15
- * @param path 文件路径
16
- * @param content 要写入的内容
17
- * @return 成功返回true,失败返回false
18
- */
19
- public write(path: string, content: string): boolean;
20
-
21
- /**
22
- * 追加内容到文件
23
- * @param path 文件路径
24
- * @param content 要追加的内容
25
- * @return 成功返回true,失败返回false
26
- */
27
- public append(path: string, content: string): boolean;
28
-
29
- /**
30
- * 删除文件或目录
31
- * @param path 文件或目录路径
32
- * @return 成功返回true,失败返回false
33
- */
34
- public delete(path: string): boolean;
35
-
36
- /**
37
- * 检查文件或目录是否存在
38
- * @param path 文件或目录路径
39
- * @return 存在返回true,不存在返回false
40
- */
41
- public exists(path: string): boolean;
42
-
43
- /**
44
- * 创建目录(包括父目录)
45
- * @param path 目录路径
46
- * @return 成功返回true,失败返回false
47
- */
48
- public mkdirs(path: string): boolean;
49
-
50
- /**
51
- * 列出目录中的文件
52
- * @param path 目录路径
53
- * @return 文件名数组
54
- */
55
- public list(path: string): string[];
56
-
57
- /**
58
- * 列出目录中的文件(包含完整路径)
59
- * @param path 目录路径
60
- * @return 文件完整路径数组
61
- */
62
- public listFiles(path: string): string[];
63
-
64
- /**
65
- * 复制文件
66
- * @param source 源文件路径
67
- * @param destination 目标文件路径
68
- * @return 成功返回true,失败返回false
69
- */
70
- public copy(source: string, destination: string): boolean;
71
-
72
- /**
73
- * 移动文件
74
- * @param source 源文件路径
75
- * @param destination 目标文件路径
76
- * @return 成功返回true,失败返回false
77
- */
78
- public move(source: string, destination: string): boolean;
79
-
80
- /**
81
- * 获取文件大小(字节)
82
- * @param path 文件路径
83
- * @return 文件大小(字节),如果文件不存在或为目录返回-1
84
- */
85
- public size(path: string): number;
86
-
87
- /**
88
- * 检查路径是否为目录
89
- * @param path 路径
90
- * @return 是目录返回true,否则返回false
91
- */
92
- public isDirectory(path: string): boolean;
93
-
94
- /**
95
- * 检查路径是否为文件
96
- * @param path 路径
97
- * @return 是文件返回true,否则返回false
98
- */
99
- public isFile(path: string): boolean;
100
-
101
- /**
102
- * 获取文件名
103
- * @param path 文件路径
104
- * @return 文件名
105
- */
106
- public getName(path: string): string;
107
-
108
- /**
109
- * 获取父目录路径
110
- * @param path 文件路径
111
- * @return 父目录路径
112
- */
113
- public getParent(path: string): string;
114
-
115
- /**
116
- * 获取绝对路径
117
- * @param path 文件路径
118
- * @return 绝对路径
119
- */
120
- public getAbsolutePath(path: string): string;
121
-
122
- /**
123
- * 重命名文件或目录
124
- * @param oldPath 旧路径
125
- * @param newPath 新路径
126
- * @return 成功返回true,失败返回false
127
- */
128
- public rename(oldPath: string, newPath: string): boolean;
129
-
130
- /**
131
- * 获取最后修改时间
132
- * @param path 文件路径
133
- * @return 最后修改时间(毫秒),如果文件不存在返回-1
134
- */
135
- public lastModified(path: string): number;
136
-
137
- /**
138
- * 从URI读取内容(支持content://和file://等URI)
139
- * @param uriString URI字符串
140
- * @return 内容,如果失败返回null
141
- */
142
- public readUri(uriString: string): string | null;
143
-
144
- /**
145
- * 从URI读取字节数组(支持content://和file://等URI,用于读取图片等二进制文件)
146
- * @param uriString URI字符串
147
- * @return 字节数组,如果失败返回null
148
- */
149
- public readBytesFromUri(uriString: string): number[] | null;
150
-
151
- /**
152
- * 从content URI获取真实文件路径
153
- * @param uriString content URI字符串
154
- * @return 真实文件路径,如果失败返回null
155
- */
156
- public getPathFromUri(uriString: string): string | null;
157
-
158
- /**
159
- * 从文件读取字节数组
160
- * @param path 文件路径
161
- * @return 字节数组,如果失败返回null
162
- */
163
- public readBytes(path: string): number[] | null;
164
-
165
- /**
166
- * 写入字节数组到文件
167
- * @param path 文件路径
168
- * @param bytes 要写入的字节数组
169
- * @return 成功返回true,失败返回false
170
- */
171
- public writeBytes(path: string, bytes: number[]): boolean;
172
-
173
- /**
174
- * 从URI复制文件到目标路径
175
- * @param uriString 源URI字符串
176
- * @param destination 目标文件路径
177
- * @return 成功返回true,失败返回false
178
- */
179
- public copyFromUri(uriString: string, destination: string): boolean;
180
-
181
- /**
182
- * 获取外部存储根目录路径
183
- * @return 外部存储路径
184
- */
185
- public getExternalStoragePath(): string;
186
-
187
- /**
188
- * 获取应用私有文件目录路径
189
- * @return 文件目录路径
190
- */
191
- public getFilesPath(): string;
192
-
193
- /**
194
- * 获取应用缓存目录路径
195
- * @return 缓存目录路径
196
- */
197
- public getCachePath(): string;
198
-
199
- /**
200
- * 获取应用外部私有文件目录路径
201
- * @param type 文件目录类型(如"Pictures"、"Documents"),null表示根目录
202
- * @return 外部文件目录路径
203
- */
204
- public getExternalFilesPath(type: string | null): string;
205
-
206
- /**
207
- * 获取应用外部私有文件根目录路径
208
- * @return 外部文件目录路径
209
- */
210
- public getExternalFilesPath(): string;
211
-
212
- /**
213
- * 获取Download目录路径
214
- * @return Download目录路径
215
- */
216
- public getDownloadPath(): string;
217
-
218
- /**
219
- * 获取Pictures目录路径
220
- * @return Pictures目录路径
221
- */
222
- public getPicturesPath(): string;
223
-
224
- /**
225
- * 获取DCIM目录路径
226
- * @return DCIM目录路径
227
- */
228
- public getDCIMPath(): string;
229
-
230
- /**
231
- * 获取Movies目录路径
232
- * @return Movies目录路径
233
- */
234
- public getMoviesPath(): string;
235
-
236
- /**
237
- * 获取Music目录路径
238
- * @return Music目录路径
239
- */
240
- public getMusicPath(): string;
241
-
242
- /**
243
- * 获取Documents目录路径
244
- * @return Documents目录路径
245
- */
246
- public getDocumentsPath(): string;
247
-
248
- /**
249
- * 从assets读取文件
250
- * @param fileName assets目录中的文件名
251
- * @return 文件内容,如果失败返回null
252
- */
253
- public readAsset(fileName: string): string | null;
254
-
255
- /**
256
- * 检查外部存储是否可用且可写
257
- * @return 可用且可写返回true,否则返回false
258
- */
259
- public isExternalStorageWritable(): boolean;
260
-
261
- /**
262
- * 检查外部存储是否可读
263
- * @return 可读返回true,否则返回false
264
- */
265
- public isExternalStorageReadable(): boolean;
266
-
267
- /**
268
- * 获取文件扩展名
269
- * @param path 文件路径
270
- * @return 文件扩展名(不含点),如果没有扩展名返回空字符串
271
- */
272
- public getExtension(path: string): string;
273
-
274
- /**
275
- * 获取不带扩展名的文件名
276
- * @param path 文件路径
277
- * @return 不带扩展名的文件名
278
- */
279
- public getNameWithoutExtension(path: string): string;
280
- }
281
-
282
- export { };
283
-
1
+ declare global {
2
+ var Files: files;
3
+ }
4
+
5
+ interface files {
6
+ /**
7
+ * 读取文件内容
8
+ * @param path 文件路径
9
+ * @return 文件内容,如果失败返回null
10
+ */
11
+ public read(path: string): string | null;
12
+
13
+ /**
14
+ * 写入内容到文件
15
+ * @param path 文件路径
16
+ * @param content 要写入的内容
17
+ * @return 成功返回true,失败返回false
18
+ */
19
+ public write(path: string, content: string): boolean;
20
+
21
+ /**
22
+ * 追加内容到文件
23
+ * @param path 文件路径
24
+ * @param content 要追加的内容
25
+ * @return 成功返回true,失败返回false
26
+ */
27
+ public append(path: string, content: string): boolean;
28
+
29
+ /**
30
+ * 删除文件或目录
31
+ * @param path 文件或目录路径
32
+ * @return 成功返回true,失败返回false
33
+ */
34
+ public delete(path: string): boolean;
35
+
36
+ /**
37
+ * 检查文件或目录是否存在
38
+ * @param path 文件或目录路径
39
+ * @return 存在返回true,不存在返回false
40
+ */
41
+ public exists(path: string): boolean;
42
+
43
+ /**
44
+ * 创建目录(包括父目录)
45
+ * @param path 目录路径
46
+ * @return 成功返回true,失败返回false
47
+ */
48
+ public mkdirs(path: string): boolean;
49
+
50
+ /**
51
+ * 列出目录中的文件
52
+ * @param path 目录路径
53
+ * @return 文件名数组
54
+ */
55
+ public list(path: string): string[];
56
+
57
+ /**
58
+ * 列出目录中的文件(包含完整路径)
59
+ * @param path 目录路径
60
+ * @return 文件完整路径数组
61
+ */
62
+ public listFiles(path: string): string[];
63
+
64
+ /**
65
+ * 复制文件
66
+ * @param source 源文件路径
67
+ * @param destination 目标文件路径
68
+ * @return 成功返回true,失败返回false
69
+ */
70
+ public copy(source: string, destination: string): boolean;
71
+
72
+ /**
73
+ * 移动文件
74
+ * @param source 源文件路径
75
+ * @param destination 目标文件路径
76
+ * @return 成功返回true,失败返回false
77
+ */
78
+ public move(source: string, destination: string): boolean;
79
+
80
+ /**
81
+ * 获取文件大小(字节)
82
+ * @param path 文件路径
83
+ * @return 文件大小(字节),如果文件不存在或为目录返回-1
84
+ */
85
+ public size(path: string): number;
86
+
87
+ /**
88
+ * 检查路径是否为目录
89
+ * @param path 路径
90
+ * @return 是目录返回true,否则返回false
91
+ */
92
+ public isDirectory(path: string): boolean;
93
+
94
+ /**
95
+ * 检查路径是否为文件
96
+ * @param path 路径
97
+ * @return 是文件返回true,否则返回false
98
+ */
99
+ public isFile(path: string): boolean;
100
+
101
+ /**
102
+ * 获取文件名
103
+ * @param path 文件路径
104
+ * @return 文件名
105
+ */
106
+ public getName(path: string): string;
107
+
108
+ /**
109
+ * 获取父目录路径
110
+ * @param path 文件路径
111
+ * @return 父目录路径
112
+ */
113
+ public getParent(path: string): string;
114
+
115
+ /**
116
+ * 获取绝对路径
117
+ * @param path 文件路径
118
+ * @return 绝对路径
119
+ */
120
+ public getAbsolutePath(path: string): string;
121
+
122
+ /**
123
+ * 重命名文件或目录
124
+ * @param oldPath 旧路径
125
+ * @param newPath 新路径
126
+ * @return 成功返回true,失败返回false
127
+ */
128
+ public rename(oldPath: string, newPath: string): boolean;
129
+
130
+ /**
131
+ * 获取最后修改时间
132
+ * @param path 文件路径
133
+ * @return 最后修改时间(毫秒),如果文件不存在返回-1
134
+ */
135
+ public lastModified(path: string): number;
136
+
137
+ /**
138
+ * 从URI读取内容(支持content://和file://等URI)
139
+ * @param uriString URI字符串
140
+ * @return 内容,如果失败返回null
141
+ */
142
+ public readUri(uriString: string): string | null;
143
+
144
+ /**
145
+ * 从URI读取字节数组(支持content://和file://等URI,用于读取图片等二进制文件)
146
+ * @param uriString URI字符串
147
+ * @return 字节数组,如果失败返回null
148
+ */
149
+ public readBytesFromUri(uriString: string): number[] | null;
150
+
151
+ /**
152
+ * 从content URI获取真实文件路径
153
+ * @param uriString content URI字符串
154
+ * @return 真实文件路径,如果失败返回null
155
+ */
156
+ public getPathFromUri(uriString: string): string | null;
157
+
158
+ /**
159
+ * 从文件读取字节数组
160
+ * @param path 文件路径
161
+ * @return 字节数组,如果失败返回null
162
+ */
163
+ public readBytes(path: string): number[] | null;
164
+
165
+ /**
166
+ * 写入字节数组到文件
167
+ * @param path 文件路径
168
+ * @param bytes 要写入的字节数组
169
+ * @return 成功返回true,失败返回false
170
+ */
171
+ public writeBytes(path: string, bytes: number[]): boolean;
172
+
173
+ /**
174
+ * 从URI复制文件到目标路径
175
+ * @param uriString 源URI字符串
176
+ * @param destination 目标文件路径
177
+ * @return 成功返回true,失败返回false
178
+ */
179
+ public copyFromUri(uriString: string, destination: string): boolean;
180
+
181
+ /**
182
+ * 获取外部存储根目录路径
183
+ * @return 外部存储路径
184
+ */
185
+ public getExternalStoragePath(): string;
186
+
187
+ /**
188
+ * 获取应用私有文件目录路径
189
+ * @return 文件目录路径
190
+ */
191
+ public getFilesPath(): string;
192
+
193
+ /**
194
+ * 获取应用缓存目录路径
195
+ * @return 缓存目录路径
196
+ */
197
+ public getCachePath(): string;
198
+
199
+ /**
200
+ * 获取应用外部私有文件目录路径
201
+ * @param type 文件目录类型(如"Pictures"、"Documents"),null表示根目录
202
+ * @return 外部文件目录路径
203
+ */
204
+ public getExternalFilesPath(type: string | null): string;
205
+
206
+ /**
207
+ * 获取应用外部私有文件根目录路径
208
+ * @return 外部文件目录路径
209
+ */
210
+ public getExternalFilesPath(): string;
211
+
212
+ /**
213
+ * 获取Download目录路径
214
+ * @return Download目录路径
215
+ */
216
+ public getDownloadPath(): string;
217
+
218
+ /**
219
+ * 获取Pictures目录路径
220
+ * @return Pictures目录路径
221
+ */
222
+ public getPicturesPath(): string;
223
+
224
+ /**
225
+ * 获取DCIM目录路径
226
+ * @return DCIM目录路径
227
+ */
228
+ public getDCIMPath(): string;
229
+
230
+ /**
231
+ * 获取Movies目录路径
232
+ * @return Movies目录路径
233
+ */
234
+ public getMoviesPath(): string;
235
+
236
+ /**
237
+ * 获取Music目录路径
238
+ * @return Music目录路径
239
+ */
240
+ public getMusicPath(): string;
241
+
242
+ /**
243
+ * 获取Documents目录路径
244
+ * @return Documents目录路径
245
+ */
246
+ public getDocumentsPath(): string;
247
+
248
+ /**
249
+ * 从assets读取文件
250
+ * @param fileName assets目录中的文件名
251
+ * @return 文件内容,如果失败返回null
252
+ */
253
+ public readAsset(fileName: string): string | null;
254
+
255
+ /**
256
+ * 检查外部存储是否可用且可写
257
+ * @return 可用且可写返回true,否则返回false
258
+ */
259
+ public isExternalStorageWritable(): boolean;
260
+
261
+ /**
262
+ * 检查外部存储是否可读
263
+ * @return 可读返回true,否则返回false
264
+ */
265
+ public isExternalStorageReadable(): boolean;
266
+
267
+ /**
268
+ * 获取文件扩展名
269
+ * @param path 文件路径
270
+ * @return 文件扩展名(不含点),如果没有扩展名返回空字符串
271
+ */
272
+ public getExtension(path: string): string;
273
+
274
+ /**
275
+ * 获取不带扩展名的文件名
276
+ * @param path 文件路径
277
+ * @return 不带扩展名的文件名
278
+ */
279
+ public getNameWithoutExtension(path: string): string;
280
+ }
281
+
282
+ export { };
283
+
@@ -1,47 +1,47 @@
1
- declare global {
2
- var FloatDialogs: FloatDialogs;
3
- }
4
-
5
- interface FloatDialogs {
6
- /**
7
- * 悬浮窗弹窗(需要开启悬浮窗权限)
8
- * @param title 弹窗标题
9
- * @param content 弹窗内容
10
- */
11
- public show(title: string, content: string): void;
12
-
13
- /**
14
- * 悬浮窗弹窗(需要开启悬浮窗权限)
15
- * @param content 弹窗内容
16
- */
17
- public show(content: string): void;
18
-
19
- /**
20
- * toast 吐司,与System.toast区别是,可以后台弹出消息
21
- */
22
- public toast(content: string): void;
23
-
24
- /**
25
- * toastLong 吐司(时间更长),与System.toast区别是,可以后台弹出消息
26
- */
27
- public toastLong(content: string): void;
28
-
29
- /**
30
- * 设置悬浮窗是否可点击
31
- * @param clickable 是否可点击
32
- */
33
- public setFloatWindowClickable(clickable: boolean): void;
34
-
35
- /**
36
- * 关闭FloatDialogs开启的所有弹窗
37
- */
38
- public closeAll(): void;
39
-
40
- /**
41
- * 设置悬浮窗显示/隐藏
42
- * @param visible 是否显示
43
- */
44
- public setFloatWindowVisible(visible: boolean): void;
45
- }
46
-
47
- export { };
1
+ declare global {
2
+ var FloatDialogs: FloatDialogs;
3
+ }
4
+
5
+ interface FloatDialogs {
6
+ /**
7
+ * 悬浮窗弹窗(需要开启悬浮窗权限)
8
+ * @param title 弹窗标题
9
+ * @param content 弹窗内容
10
+ */
11
+ public show(title: string, content: string): void;
12
+
13
+ /**
14
+ * 悬浮窗弹窗(需要开启悬浮窗权限)
15
+ * @param content 弹窗内容
16
+ */
17
+ public show(content: string): void;
18
+
19
+ /**
20
+ * toast 吐司,与System.toast区别是,可以后台弹出消息
21
+ */
22
+ public toast(content: string): void;
23
+
24
+ /**
25
+ * toastLong 吐司(时间更长),与System.toast区别是,可以后台弹出消息
26
+ */
27
+ public toastLong(content: string): void;
28
+
29
+ /**
30
+ * 设置悬浮窗是否可点击
31
+ * @param clickable 是否可点击
32
+ */
33
+ public setFloatWindowClickable(clickable: boolean): void;
34
+
35
+ /**
36
+ * 关闭FloatDialogs开启的所有弹窗
37
+ */
38
+ public closeAll(): void;
39
+
40
+ /**
41
+ * 设置悬浮窗显示/隐藏
42
+ * @param visible 是否显示
43
+ */
44
+ public setFloatWindowVisible(visible: boolean): void;
45
+ }
46
+
47
+ export { };